react-cheminfo 0.10.0 → 0.11.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/lib/chrome/ui/NavLink.d.ts.map +1 -1
- package/lib/chrome/ui/NavLink.js +4 -3
- package/lib/chrome/ui/NavLink.js.map +1 -1
- package/lib/chrome/ui/SiteFooter.d.ts +8 -0
- package/lib/chrome/ui/SiteFooter.d.ts.map +1 -1
- package/lib/chrome/ui/SiteFooter.js +7 -2
- package/lib/chrome/ui/SiteFooter.js.map +1 -1
- package/lib/chrome/ui/SiteHeader.d.ts +11 -0
- package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
- package/lib/chrome/ui/SiteHeader.js +7 -2
- package/lib/chrome/ui/SiteHeader.js.map +1 -1
- package/lib/chrome/ui/navItem.d.ts +12 -0
- package/lib/chrome/ui/navItem.d.ts.map +1 -1
- package/lib/chrome/ui/navItem.js.map +1 -1
- 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/download/core/figureLegend.d.ts +90 -0
- package/lib/download/core/figureLegend.d.ts.map +1 -0
- package/lib/download/core/figureLegend.js +77 -0
- package/lib/download/core/figureLegend.js.map +1 -0
- package/lib/download/core/figureSvg.d.ts.map +1 -1
- package/lib/download/core/figureSvg.js +71 -1
- package/lib/download/core/figureSvg.js.map +1 -1
- package/lib/download/core/figureSvgDocument.d.ts +9 -2
- package/lib/download/core/figureSvgDocument.d.ts.map +1 -1
- package/lib/download/core/figureSvgDocument.js +4 -1
- package/lib/download/core/figureSvgDocument.js.map +1 -1
- package/lib/download/core/figureTarget.d.ts +11 -0
- package/lib/download/core/figureTarget.d.ts.map +1 -1
- package/lib/download/core/figureTarget.js +19 -0
- package/lib/download/core/figureTarget.js.map +1 -1
- package/lib/download/core/index.d.ts +3 -1
- package/lib/download/core/index.d.ts.map +1 -1
- package/lib/download/core/index.js +2 -1
- package/lib/download/core/index.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +13 -0
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +5 -0
- package/lib/ecosystem/ui/glyphs.js.map +1 -1
- package/lib/overlay/ui/OverlayLegend.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayLegend.js +1 -1
- package/lib/overlay/ui/OverlayLegend.js.map +1 -1
- package/lib/projection/core/projectionCopy.d.ts +4 -0
- package/lib/projection/core/projectionCopy.d.ts.map +1 -1
- package/lib/projection/core/projectionCopy.js +3 -0
- package/lib/projection/core/projectionCopy.js.map +1 -1
- package/lib/projection/core/projectionOptions.d.ts +12 -0
- package/lib/projection/core/projectionOptions.d.ts.map +1 -1
- package/lib/projection/core/projectionOptions.js +27 -1
- package/lib/projection/core/projectionOptions.js.map +1 -1
- package/lib/projection/core/projectionStrings.d.ts +4 -0
- package/lib/projection/core/projectionStrings.d.ts.map +1 -1
- package/lib/projection/core/projectionStrings.js +14 -0
- package/lib/projection/core/projectionStrings.js.map +1 -1
- package/lib/projection/core/projectionTabDefaults.d.ts.map +1 -1
- package/lib/projection/core/projectionTabDefaults.js +12 -0
- package/lib/projection/core/projectionTabDefaults.js.map +1 -1
- package/lib/projection/core/projectionTabs.d.ts +1 -1
- package/lib/projection/core/projectionTabs.d.ts.map +1 -1
- package/lib/projection/core/projectionTabs.js +9 -0
- package/lib/projection/core/projectionTabs.js.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.d.ts +6 -0
- package/lib/projection/ui/ProjectionMapTab.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionMapTab.js +2 -1
- package/lib/projection/ui/ProjectionMapTab.js.map +1 -1
- package/lib/projection/ui/ProjectionPanel.d.ts +6 -0
- package/lib/projection/ui/ProjectionPanel.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionPanel.js +15 -1
- package/lib/projection/ui/ProjectionPanel.js.map +1 -1
- package/lib/projection/ui/ProjectionReadout.d.ts +7 -0
- package/lib/projection/ui/ProjectionReadout.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionReadout.js +5 -4
- package/lib/projection/ui/ProjectionReadout.js.map +1 -1
- package/lib/projection/ui/ProjectionSpaceControls.d.ts +51 -0
- package/lib/projection/ui/ProjectionSpaceControls.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionSpaceControls.js +71 -0
- package/lib/projection/ui/ProjectionSpaceControls.js.map +1 -0
- package/lib/projection/ui/ProjectionSpaceMore.d.ts +32 -0
- package/lib/projection/ui/ProjectionSpaceMore.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionSpaceMore.js +57 -0
- package/lib/projection/ui/ProjectionSpaceMore.js.map +1 -0
- package/lib/projection/ui/ProjectionSpaceTab.d.ts +98 -0
- package/lib/projection/ui/ProjectionSpaceTab.d.ts.map +1 -0
- package/lib/projection/ui/ProjectionSpaceTab.js +66 -0
- package/lib/projection/ui/ProjectionSpaceTab.js.map +1 -0
- package/lib/projection/ui/ProjectionViewer.d.ts +1 -0
- package/lib/projection/ui/ProjectionViewer.d.ts.map +1 -1
- package/lib/projection/ui/ProjectionViewer.js +2 -1
- package/lib/projection/ui/ProjectionViewer.js.map +1 -1
- package/lib/projection/ui/index.d.ts +1 -0
- package/lib/projection/ui/index.d.ts.map +1 -1
- package/lib/projection/ui/index.js.map +1 -1
- package/lib/projection/ui/projectionBarModel.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarModel.js +3 -2
- package/lib/projection/ui/projectionBarModel.js.map +1 -1
- package/lib/projection/ui/projectionBarReadings.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarReadings.js +17 -0
- package/lib/projection/ui/projectionBarReadings.js.map +1 -1
- package/lib/projection/ui/projectionBarSlots.d.ts.map +1 -1
- package/lib/projection/ui/projectionBarSlots.js +17 -0
- package/lib/projection/ui/projectionBarSlots.js.map +1 -1
- package/lib/projection/ui/projectionCloudChoices.d.ts +18 -0
- package/lib/projection/ui/projectionCloudChoices.d.ts.map +1 -0
- package/lib/projection/ui/projectionCloudChoices.js +19 -0
- package/lib/projection/ui/projectionCloudChoices.js.map +1 -0
- package/lib/projection/ui/projectionEllipsoid.d.ts +38 -0
- package/lib/projection/ui/projectionEllipsoid.d.ts.map +1 -0
- package/lib/projection/ui/projectionEllipsoid.js +71 -0
- package/lib/projection/ui/projectionEllipsoid.js.map +1 -0
- package/lib/projection/ui/projectionMapChrome.d.ts +8 -0
- package/lib/projection/ui/projectionMapChrome.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapChrome.js +10 -6
- package/lib/projection/ui/projectionMapChrome.js.map +1 -1
- package/lib/projection/ui/projectionMapView.d.ts +13 -0
- package/lib/projection/ui/projectionMapView.d.ts.map +1 -1
- package/lib/projection/ui/projectionMapView.js +26 -0
- package/lib/projection/ui/projectionMapView.js.map +1 -1
- package/lib/projection/ui/projectionSpaceModel.d.ts +14 -0
- package/lib/projection/ui/projectionSpaceModel.d.ts.map +1 -0
- package/lib/projection/ui/projectionSpaceModel.js +14 -0
- package/lib/projection/ui/projectionSpaceModel.js.map +1 -0
- package/lib/projection/ui/projectionViewerProps.d.ts +34 -0
- package/lib/projection/ui/projectionViewerProps.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPlot.d.ts +1 -1
- package/lib/scatter/ui/ScatterPlot.d.ts.map +1 -1
- package/lib/scatter/ui/ScatterPlot.js +18 -2
- package/lib/scatter/ui/ScatterPlot.js.map +1 -1
- package/lib/scatter/ui/lassoGesture.d.ts +14 -2
- package/lib/scatter/ui/lassoGesture.d.ts.map +1 -1
- package/lib/scatter/ui/lassoGesture.js +4 -1
- package/lib/scatter/ui/lassoGesture.js.map +1 -1
- package/lib/scatter/ui/scatterPlotProps.d.ts +34 -0
- package/lib/scatter/ui/scatterPlotProps.d.ts.map +1 -1
- package/lib/scatter/ui/useScatterInteraction.d.ts +9 -0
- package/lib/scatter/ui/useScatterInteraction.d.ts.map +1 -1
- package/lib/scatter/ui/useScatterInteraction.js +9 -1
- package/lib/scatter/ui/useScatterInteraction.js.map +1 -1
- package/lib/scatter3d/core/cloudGesture.d.ts +17 -0
- package/lib/scatter3d/core/cloudGesture.d.ts.map +1 -0
- package/lib/scatter3d/core/cloudGesture.js +2 -0
- package/lib/scatter3d/core/cloudGesture.js.map +1 -0
- package/lib/scatter3d/core/confidenceEllipsoid.d.ts +63 -0
- package/lib/scatter3d/core/confidenceEllipsoid.d.ts.map +1 -0
- package/lib/scatter3d/core/confidenceEllipsoid.js +128 -0
- package/lib/scatter3d/core/confidenceEllipsoid.js.map +1 -0
- package/lib/scatter3d/core/cubeFrame.d.ts +40 -0
- package/lib/scatter3d/core/cubeFrame.d.ts.map +1 -0
- package/lib/scatter3d/core/cubeFrame.js +58 -0
- package/lib/scatter3d/core/cubeFrame.js.map +1 -0
- package/lib/scatter3d/core/cubePoints.d.ts +35 -0
- package/lib/scatter3d/core/cubePoints.d.ts.map +1 -0
- package/lib/scatter3d/core/cubePoints.js +50 -0
- package/lib/scatter3d/core/cubePoints.js.map +1 -0
- package/lib/scatter3d/core/ellipsoidCoverage.d.ts +32 -0
- package/lib/scatter3d/core/ellipsoidCoverage.d.ts.map +1 -0
- package/lib/scatter3d/core/ellipsoidCoverage.js +83 -0
- package/lib/scatter3d/core/ellipsoidCoverage.js.map +1 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.d.ts +42 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.d.ts.map +1 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.js +52 -0
- package/lib/scatter3d/core/ellipsoidSilhouette.js.map +1 -0
- package/lib/scatter3d/core/index.d.ts +29 -0
- package/lib/scatter3d/core/index.d.ts.map +1 -0
- package/lib/scatter3d/core/index.js +22 -0
- package/lib/scatter3d/core/index.js.map +1 -0
- package/lib/scatter3d/core/orbitCamera.d.ts +113 -0
- package/lib/scatter3d/core/orbitCamera.d.ts.map +1 -0
- package/lib/scatter3d/core/orbitCamera.js +104 -0
- package/lib/scatter3d/core/orbitCamera.js.map +1 -0
- package/lib/scatter3d/core/symmetricEigen.d.ts +47 -0
- package/lib/scatter3d/core/symmetricEigen.d.ts.map +1 -0
- package/lib/scatter3d/core/symmetricEigen.js +219 -0
- package/lib/scatter3d/core/symmetricEigen.js.map +1 -0
- package/lib/scatter3d/ui/CloudFrameLayer.d.ts +33 -0
- package/lib/scatter3d/ui/CloudFrameLayer.d.ts.map +1 -0
- package/lib/scatter3d/ui/CloudFrameLayer.js +37 -0
- package/lib/scatter3d/ui/CloudFrameLayer.js.map +1 -0
- package/lib/scatter3d/ui/CloudPointLayer.d.ts +62 -0
- package/lib/scatter3d/ui/CloudPointLayer.d.ts.map +1 -0
- package/lib/scatter3d/ui/CloudPointLayer.js +67 -0
- package/lib/scatter3d/ui/CloudPointLayer.js.map +1 -0
- package/lib/scatter3d/ui/CloudShellLayer.d.ts +52 -0
- package/lib/scatter3d/ui/CloudShellLayer.d.ts.map +1 -0
- package/lib/scatter3d/ui/CloudShellLayer.js +40 -0
- package/lib/scatter3d/ui/CloudShellLayer.js.map +1 -0
- package/lib/scatter3d/ui/ScatterCloud.d.ts +24 -0
- package/lib/scatter3d/ui/ScatterCloud.d.ts.map +1 -0
- package/lib/scatter3d/ui/ScatterCloud.js +189 -0
- package/lib/scatter3d/ui/ScatterCloud.js.map +1 -0
- package/lib/scatter3d/ui/cloudGeometry.d.ts +108 -0
- package/lib/scatter3d/ui/cloudGeometry.d.ts.map +1 -0
- package/lib/scatter3d/ui/cloudGeometry.js +122 -0
- package/lib/scatter3d/ui/cloudGeometry.js.map +1 -0
- package/lib/scatter3d/ui/cloudShellStyles.d.ts +36 -0
- package/lib/scatter3d/ui/cloudShellStyles.d.ts.map +1 -0
- package/lib/scatter3d/ui/cloudShellStyles.js +62 -0
- package/lib/scatter3d/ui/cloudShellStyles.js.map +1 -0
- package/lib/scatter3d/ui/cloudZoom.d.ts +21 -0
- package/lib/scatter3d/ui/cloudZoom.d.ts.map +1 -0
- package/lib/scatter3d/ui/cloudZoom.js +22 -0
- package/lib/scatter3d/ui/cloudZoom.js.map +1 -0
- package/lib/scatter3d/ui/index.d.ts +29 -0
- package/lib/scatter3d/ui/index.d.ts.map +1 -0
- package/lib/scatter3d/ui/index.js +21 -0
- package/lib/scatter3d/ui/index.js.map +1 -0
- package/lib/scatter3d/ui/scatterCloudModel.d.ts +60 -0
- package/lib/scatter3d/ui/scatterCloudModel.d.ts.map +1 -0
- package/lib/scatter3d/ui/scatterCloudModel.js +66 -0
- package/lib/scatter3d/ui/scatterCloudModel.js.map +1 -0
- package/lib/scatter3d/ui/scatterCloudProps.d.ts +185 -0
- package/lib/scatter3d/ui/scatterCloudProps.d.ts.map +1 -0
- package/lib/scatter3d/ui/scatterCloudProps.js +9 -0
- package/lib/scatter3d/ui/scatterCloudProps.js.map +1 -0
- package/lib/scatter3d/ui/useOrbitDrag.d.ts +60 -0
- package/lib/scatter3d/ui/useOrbitDrag.d.ts.map +1 -0
- package/lib/scatter3d/ui/useOrbitDrag.js +129 -0
- package/lib/scatter3d/ui/useOrbitDrag.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/package.json +1 -1
- package/src/chrome/ui/NavLink.tsx +5 -3
- package/src/chrome/ui/SiteFooter.tsx +16 -1
- package/src/chrome/ui/SiteHeader.tsx +19 -1
- package/src/chrome/ui/navItem.ts +12 -0
- package/src/core.ts +1 -0
- package/src/download/core/figureLegend.ts +167 -0
- package/src/download/core/figureSvg.ts +81 -1
- package/src/download/core/figureSvgDocument.ts +13 -3
- package/src/download/core/figureTarget.ts +21 -0
- package/src/download/core/index.ts +8 -0
- package/src/ecosystem/core/sites.ts +14 -0
- package/src/ecosystem/ui/glyphs.tsx +26 -0
- package/src/overlay/ui/OverlayLegend.tsx +7 -1
- package/src/projection/core/projectionCopy.ts +9 -0
- package/src/projection/core/projectionOptions.ts +48 -3
- package/src/projection/core/projectionStrings.ts +16 -0
- package/src/projection/core/projectionTabDefaults.ts +12 -0
- package/src/projection/core/projectionTabs.ts +10 -1
- package/src/projection/ui/ProjectionMapTab.tsx +8 -0
- package/src/projection/ui/ProjectionPanel.tsx +63 -0
- package/src/projection/ui/ProjectionReadout.tsx +16 -6
- package/src/projection/ui/ProjectionSpaceControls.tsx +219 -0
- package/src/projection/ui/ProjectionSpaceMore.tsx +169 -0
- package/src/projection/ui/ProjectionSpaceTab.tsx +217 -0
- package/src/projection/ui/ProjectionViewer.tsx +3 -0
- package/src/projection/ui/index.ts +1 -0
- package/src/projection/ui/projectionBarModel.ts +3 -2
- package/src/projection/ui/projectionBarReadings.ts +18 -0
- package/src/projection/ui/projectionBarSlots.tsx +19 -0
- package/src/projection/ui/projectionCloudChoices.ts +23 -0
- package/src/projection/ui/projectionEllipsoid.ts +78 -0
- package/src/projection/ui/projectionMapChrome.ts +26 -5
- package/src/projection/ui/projectionMapView.ts +45 -0
- package/src/projection/ui/projectionSpaceModel.ts +14 -0
- package/src/projection/ui/projectionViewerProps.ts +35 -0
- package/src/scatter/ui/ScatterPlot.tsx +21 -2
- package/src/scatter/ui/lassoGesture.ts +15 -2
- package/src/scatter/ui/scatterPlotProps.ts +35 -0
- package/src/scatter/ui/useScatterInteraction.ts +22 -1
- package/src/scatter3d/core/cloudGesture.ts +16 -0
- package/src/scatter3d/core/confidenceEllipsoid.ts +177 -0
- package/src/scatter3d/core/cubeFrame.ts +72 -0
- package/src/scatter3d/core/cubePoints.ts +75 -0
- package/src/scatter3d/core/ellipsoidCoverage.ts +86 -0
- package/src/scatter3d/core/ellipsoidSilhouette.ts +76 -0
- package/src/scatter3d/core/index.ts +52 -0
- package/src/scatter3d/core/orbitCamera.ts +159 -0
- package/src/scatter3d/core/symmetricEigen.ts +273 -0
- package/src/scatter3d/ui/CloudFrameLayer.tsx +97 -0
- package/src/scatter3d/ui/CloudPointLayer.tsx +132 -0
- package/src/scatter3d/ui/CloudShellLayer.tsx +107 -0
- package/src/scatter3d/ui/ScatterCloud.tsx +312 -0
- package/src/scatter3d/ui/cloudGeometry.ts +200 -0
- package/src/scatter3d/ui/cloudShellStyles.ts +74 -0
- package/src/scatter3d/ui/cloudZoom.ts +22 -0
- package/src/scatter3d/ui/index.ts +41 -0
- package/src/scatter3d/ui/scatterCloudModel.ts +98 -0
- package/src/scatter3d/ui/scatterCloudProps.ts +191 -0
- package/src/scatter3d/ui/useOrbitDrag.ts +220 -0
- package/src/ui.ts +1 -0
- package/styles/chrome.css +29 -4
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
const PAIRS_MINIMUM_AXES = 3;
|
|
2
|
+
/**
|
|
3
|
+
* How many axes a cloud needs, which is one per direction of the box.
|
|
4
|
+
*
|
|
5
|
+
* A run that produced two is not shown a third empty axis: the cloud would be
|
|
6
|
+
* a flat map stood on its edge, which says less than the map it came from.
|
|
7
|
+
*/
|
|
8
|
+
const SPACE_MINIMUM_AXES = 3;
|
|
2
9
|
/**
|
|
3
10
|
* The tabs a result can actually fill.
|
|
4
11
|
*
|
|
@@ -22,6 +29,8 @@ const PAIRS_MINIMUM_AXES = 3;
|
|
|
22
29
|
export function projectionTabs(result, allowed) {
|
|
23
30
|
const tabs = ['map'];
|
|
24
31
|
const enoughAxes = result.axes.length >= PAIRS_MINIMUM_AXES;
|
|
32
|
+
if (result.axes.length >= SPACE_MINIMUM_AXES)
|
|
33
|
+
tabs.push('space');
|
|
25
34
|
if (enoughAxes)
|
|
26
35
|
tabs.push('pairs');
|
|
27
36
|
if (result.loadings !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectionTabs.js","sourceRoot":"","sources":["../../../src/projection/core/projectionTabs.ts"],"names":[],"mappings":"AAKA,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAA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xB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,wEAAwE;QACxE,uEAAuE;QACvE,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC;IACnE,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import type { ChartViewport } from '../../chart/core/chartViewport.ts';
|
|
3
|
+
import type { ScatterPointOpen } from '../../scatter/ui/scatterPlotProps.ts';
|
|
3
4
|
import type { SelectionChange } from '../../scatter/ui/useScatterSelection.ts';
|
|
4
5
|
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
5
6
|
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
@@ -63,6 +64,11 @@ export interface ProjectionMapTabProps {
|
|
|
63
64
|
* @default undefined
|
|
64
65
|
*/
|
|
65
66
|
onHoverChange?: (index: number) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Called when the reader double-clicks a sample.
|
|
69
|
+
* @default undefined
|
|
70
|
+
*/
|
|
71
|
+
onPointDoubleClick?: (point: ScatterPointOpen) => void;
|
|
66
72
|
/**
|
|
67
73
|
* The card that follows the pointer. The viewer builds it, because it has to
|
|
68
74
|
* say the same thing on every tab.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionMapTab.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionMapTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE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AAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,2DAA2D;IAC3D,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAChC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5D;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvD;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAqF3E"}
|
|
@@ -26,6 +26,7 @@ export function ProjectionMapTab(props) {
|
|
|
26
26
|
const { result, groups, options, copy, chrome, width, height } = props;
|
|
27
27
|
const { ids, selected, viewport = null, report = null } = props;
|
|
28
28
|
const { onSelectionChange, onHoverChange, hoverCard } = props;
|
|
29
|
+
const { onPointDoubleClick } = props;
|
|
29
30
|
const { onViewportChange, wheelZoom, touchLasso, testId } = props;
|
|
30
31
|
const { scores, fittedCount, markers } = result;
|
|
31
32
|
const { xAxis, yAxis, colorBy, showGroupMeans, pointRadius } = options;
|
|
@@ -36,7 +37,7 @@ export function ProjectionMapTab(props) {
|
|
|
36
37
|
const yDomain = useMemo(() => projectionMapDomain(scores, yAxis), [scores, yAxis]);
|
|
37
38
|
const colored = colorBy === 'group' && groups.entries.length > 0;
|
|
38
39
|
const ellipse = colored ? outlines : null;
|
|
39
|
-
return (_jsx(ScatterPlot, { x: cloud.x, y: cloud.y, width: width, height: height, xAxis: { domain: xDomain, label: projectionAxisTitle(result, xAxis) }, yAxis: { domain: yDomain, label: projectionAxisTitle(result, yAxis) }, groupOf: colored ? groups.groupOf : undefined, groups: colored ? projectionScatterGroups(groups) : undefined, ellipse: ellipse, ellipseMinimumPoints: MINIMUM_OUTLINE_POINTS, showGroupMeans: colored && showGroupMeans, showGroupLabels: colored && showGroupLabels, pointLabels: showIds ? ids : undefined, markers: projectionMapMarkers(markers ?? NO_MARKERS, groups, xAxis, yAxis), pointRadius: pointRadius, outlinedFrom: fittedCount, selected: selected, viewport: viewport, onViewportChange: onViewportChange, wheelZoom: wheelZoom, onSelectionChange: onSelectionChange, selectMode: selectMode, onHoverChange: onHoverChange, onLassoChange: setDrawing, touchLasso: touchLasso, testId: testId, overlay: _jsxs(ProjectionSurface, { children: [chrome.entries.length === 0 ? null : (_jsx(ProjectionMapLegend, { title: chrome.title, entries: chrome.entries, cloud: cloud, xDomain: viewport?.x ?? xDomain, yDomain: viewport?.y ?? yDomain, width: width, height: height })), _jsx(ProjectionMapCaption, { report: report, copy: copy, mode: selectMode, drawing: drawing }), hoverCard] }) }));
|
|
40
|
+
return (_jsx(ScatterPlot, { x: cloud.x, y: cloud.y, width: width, height: height, xAxis: { domain: xDomain, label: projectionAxisTitle(result, xAxis) }, yAxis: { domain: yDomain, label: projectionAxisTitle(result, yAxis) }, groupOf: colored ? groups.groupOf : undefined, groups: colored ? projectionScatterGroups(groups) : undefined, ellipse: ellipse, ellipseMinimumPoints: MINIMUM_OUTLINE_POINTS, showGroupMeans: colored && showGroupMeans, showGroupLabels: colored && showGroupLabels, pointLabels: showIds ? ids : undefined, markers: projectionMapMarkers(markers ?? NO_MARKERS, groups, xAxis, yAxis), pointRadius: pointRadius, outlinedFrom: fittedCount, selected: selected, viewport: viewport, onViewportChange: onViewportChange, wheelZoom: wheelZoom, onSelectionChange: onSelectionChange, selectMode: selectMode, onHoverChange: onHoverChange, onPointDoubleClick: onPointDoubleClick, onLassoChange: setDrawing, touchLasso: touchLasso, testId: testId, overlay: _jsxs(ProjectionSurface, { children: [chrome.entries.length === 0 ? null : (_jsx(ProjectionMapLegend, { title: chrome.title, entries: chrome.entries, cloud: cloud, xDomain: viewport?.x ?? xDomain, yDomain: viewport?.y ?? yDomain, width: width, height: height })), _jsx(ProjectionMapCaption, { report: report, copy: copy, mode: selectMode, drawing: drawing }), hoverCard] }) }));
|
|
40
41
|
}
|
|
41
42
|
const NO_MARKERS = [];
|
|
42
43
|
//# sourceMappingURL=ProjectionMapTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionMapTab.js","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionMapTab.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"ProjectionMapTab.js","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionMapTab.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAkC,CAAC;AAY/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;A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ACxB,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,EAC5B,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,EAAE,UAAU,EACzB,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EACL,MAAC,iBAAiB,eACf,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpC,KAAC,mBAAmB,IAClB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,OAAO,EAC/B,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,OAAO,EAC/B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,GACd,CACH,EACD,KAAC,oBAAoB,IACnB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,OAAO,GAChB,EACD,SAAS,IACQ,GAEtB,CACH,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,GAAgC,EAAE,CAAC"}
|
|
@@ -5,6 +5,7 @@ import type { ProjectionSamples } from '../core/projectionSamples.ts';
|
|
|
5
5
|
import type { ProjectionVariableTrack } from './ProjectionVariablesTab.tsx';
|
|
6
6
|
import type { ProjectionMapView } from './projectionMapView.ts';
|
|
7
7
|
import type { ProjectionModels } from './projectionTabModels.ts';
|
|
8
|
+
import type { ProjectionSampleOpen } from './projectionViewerProps.ts';
|
|
8
9
|
import type { ProjectionStateApi } from './useProjectionState.ts';
|
|
9
10
|
/** What {@link ProjectionPanel} needs. */
|
|
10
11
|
export interface ProjectionPanelProps {
|
|
@@ -37,6 +38,11 @@ export interface ProjectionPanelProps {
|
|
|
37
38
|
* @default undefined
|
|
38
39
|
*/
|
|
39
40
|
onHoverSample?: (id: string | null) => void;
|
|
41
|
+
/**
|
|
42
|
+
* Called when the reader double-clicks a sample, on either figure.
|
|
43
|
+
* @default undefined
|
|
44
|
+
*/
|
|
45
|
+
onSampleDoubleClick?: (sample: ProjectionSampleOpen) => void;
|
|
40
46
|
/**
|
|
41
47
|
* Called as the pointer crosses the "what differs" panels.
|
|
42
48
|
* @default undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionPanel.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ProjectionPanel.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,OAAO,CAAC;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAOtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,+DAA+D;IAC/D,KAAK,EAAE,kBAAkB,CAAC;IAC1B,mDAAmD;IACnD,MAAM,EAAE,gBAAgB,CAAC;IACzB,wBAAwB;IACxB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,qEAAqE;IACrE,IAAI,EAAE,cAAc,CAAC;IACrB,wDAAwD;IACxD,MAAM,EAAE,gBAAgB,CAAC;IACzB,iEAAiE;IACjE,GAAG,EAAE,iBAAiB,CAAC;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACvC,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC7D;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,GAAG,IAAI,KAAK,IAAI,CAAC;IAClE;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CA8JzE"}
|
|
@@ -4,6 +4,7 @@ import { ProjectionMapTab } from "./ProjectionMapTab.js";
|
|
|
4
4
|
import { ProjectionPairsTab } from "./ProjectionPairsTab.js";
|
|
5
5
|
import { ProjectionReadout } from "./ProjectionReadout.js";
|
|
6
6
|
import { ProjectionSharesTab } from "./ProjectionSharesTab.js";
|
|
7
|
+
import { ProjectionSpaceTab } from "./ProjectionSpaceTab.js";
|
|
7
8
|
import { ProjectionVariablesTab } from "./ProjectionVariablesTab.js";
|
|
8
9
|
/**
|
|
9
10
|
* The one figure showing, and the card that follows the pointer over it.
|
|
@@ -25,6 +26,7 @@ export function ProjectionPanel(props) {
|
|
|
25
26
|
const { state, result, samples, copy, models, map } = props;
|
|
26
27
|
const { width, height, formatValue, baseId, panelId, strip } = props;
|
|
27
28
|
const { onHoverSample, onTrackVariable, touchLasso, wheelZoom } = props;
|
|
29
|
+
const { onSampleDoubleClick } = props;
|
|
28
30
|
const box = useRef(null);
|
|
29
31
|
const pointer = useRef(NOWHERE);
|
|
30
32
|
const [anchor, setAnchor] = useState(NO_ANCHOR);
|
|
@@ -41,7 +43,19 @@ export function ProjectionPanel(props) {
|
|
|
41
43
|
setAnchor({ index, ...pointer.current });
|
|
42
44
|
onHoverSample?.(index < 0 ? null : (samples.ids[index] ?? null));
|
|
43
45
|
}
|
|
44
|
-
|
|
46
|
+
// The figures speak in row numbers, because that is what a hit test hands
|
|
47
|
+
// back; every callback out of the viewer speaks in names, so a caller never
|
|
48
|
+
// has to keep a second copy of the row order. The translation is one line
|
|
49
|
+
// and it belongs here, once, rather than in each of the two tabs.
|
|
50
|
+
const openSample = onSampleDoubleClick === undefined
|
|
51
|
+
? undefined
|
|
52
|
+
: (point) => {
|
|
53
|
+
const id = samples.ids[point.index];
|
|
54
|
+
if (id === undefined)
|
|
55
|
+
return;
|
|
56
|
+
onSampleDoubleClick({ ...point, id });
|
|
57
|
+
};
|
|
58
|
+
return (_jsxs("div", { ref: box, id: panelId, role: strip ? 'tabpanel' : undefined, "aria-labelledby": strip ? `${baseId}-${state.tab}` : undefined, onPointerMove: trackPointer, children: [state.tab === 'pairs' ? (_jsx(ProjectionPairsTab, { result: result, groups: state.groups, options: state.options, copy: copy, width: width, height: height, selected: state.selected, onSelectPair: state.selectPair })) : null, state.tab === 'variables' ? (_jsx(ProjectionVariablesTab, { profiles: models.profiles, options: state.options, copy: copy, sampleName: models.sampleName, width: width, height: height, onTrackVariable: onTrackVariable, formatValue: formatValue })) : null, state.tab === 'shares' ? (_jsx(ProjectionSharesTab, { result: result, shares: models.shares, copy: copy, width: width, height: height })) : null, state.tab === 'space' ? (_jsx(ProjectionSpaceTab, { result: result, groups: state.groups, options: state.options, copy: copy, chrome: map.spaceChrome, ids: samples.ids, width: width, height: height, selected: state.selected, camera: map.camera, onCameraChange: map.setCamera, zoom: map.zoom, onZoomChange: map.setZoom, wheelZoom: wheelZoom, report: map.report, onSelectionChange: map.settle, onHoverChange: noteHover, onPointDoubleClick: openSample, hoverCard: anchor.index < 0 ? null : (_jsx(ProjectionReadout, { index: anchor.index, result: result, samples: samples, groups: state.groups, xAxis: state.options.xAxis, yAxis: state.options.yAxis, zAxis: state.options.zAxis, x: anchor.x, y: anchor.y, boxWidth: width, boxHeight: height, formatValue: formatValue })) })) : null, state.tab === 'map' ? (_jsx(ProjectionMapTab, { result: result, groups: state.groups, options: state.options, copy: copy, chrome: map.chrome, ids: samples.ids, viewport: map.viewport, onViewportChange: map.setViewport, wheelZoom: wheelZoom, report: map.report, width: width, height: height, selected: state.selected, onSelectionChange: map.settle, onHoverChange: noteHover, onPointDoubleClick: openSample, touchLasso: touchLasso, hoverCard: anchor.index < 0 ? null : (_jsx(ProjectionReadout, { index: anchor.index, result: result, samples: samples, groups: state.groups, xAxis: state.options.xAxis, yAxis: state.options.yAxis, x: anchor.x, y: anchor.y, boxWidth: width, boxHeight: height, formatValue: formatValue })) })) : null] }));
|
|
45
59
|
}
|
|
46
60
|
/** Where the pointer is before it has been anywhere. */
|
|
47
61
|
const NOWHERE = { x: 0, y: 0 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionPanel.js","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionPanel.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|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K,CAAC,QAAQ,EACxB,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAC7B,aAAa,EAAE,SAAS,EACxB,kBAAkB,EAAE,UAAU,EAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EACP,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,KAAC,iBAAiB,IAChB,KAAK,EAAE,MAAM,CAAC,KAAK,EACnB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAC1B,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,EAC1B,CAAC,EAAE,MAAM,CAAC,CAAC,EACX,CAAC,EAAE,MAAM,CAAC,CAAC,EACX,QAAQ,EAAE,KAAK,EACf,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,WAAW,GACxB,CACH,GAEH,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AAED,wDAAwD;AACxD,MAAM,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAE/B;;;;;;;;GAQG;AACH,MAAM,SAAS,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC"}
|
|
@@ -15,6 +15,13 @@ export interface ProjectionReadoutProps {
|
|
|
15
15
|
xAxis: number;
|
|
16
16
|
/** Which axis is drawn vertically. */
|
|
17
17
|
yAxis: number;
|
|
18
|
+
/**
|
|
19
|
+
* Which axis runs away from the reader, on the cloud. It is the one place a
|
|
20
|
+
* cloud's third number is written at all: the box carries no tick labels, so
|
|
21
|
+
* a reader who wants a value points at the sample.
|
|
22
|
+
* @default undefined — the card names two axes, as the map's does
|
|
23
|
+
*/
|
|
24
|
+
zAxis?: number;
|
|
18
25
|
/** Where the pointer is, in pixels from the figure's left. */
|
|
19
26
|
x: number;
|
|
20
27
|
/** Where the pointer is, in pixels from the figure's top. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionReadout.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionReadout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAItC,sDAAsD;AACtD,MAAM,WAAW,sBAAsB;IACrC,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,EAAE,gBAAgB,CAAC;IACzB,wBAAwB;IACxB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,+EAA+E;IAC/E,MAAM,EAAE,wBAAwB,CAAC;IACjC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,CAAC,EAAE,MAAM,CAAC;IACV,6DAA6D;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"ProjectionReadout.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionReadout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EACV,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AAItC,sDAAsD;AACtD,MAAM,WAAW,sBAAsB;IACrC,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,MAAM,EAAE,gBAAgB,CAAC;IACzB,wBAAwB;IACxB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,+EAA+E;IAC/E,MAAM,EAAE,wBAAwB,CAAC;IACjC,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,CAAC,EAAE,MAAM,CAAC;IACV,6DAA6D;IAC7D,CAAC,EAAE,MAAM,CAAC;IACV,2EAA2E;IAC3E,QAAQ,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CA2C7E"}
|
|
@@ -15,15 +15,16 @@ import { formatProjectionValue } from "./projectionFormat.js";
|
|
|
15
15
|
* @returns The card.
|
|
16
16
|
*/
|
|
17
17
|
export function ProjectionReadout(props) {
|
|
18
|
-
const { index, result, samples, groups, xAxis, yAxis, x, y, boxWidth, boxHeight, formatValue = formatProjectionValue, maxRows = 12, pinned = false, onUnpin, testId, } = props;
|
|
19
|
-
const
|
|
18
|
+
const { index, result, samples, groups, xAxis, yAxis, zAxis, x, y, boxWidth, boxHeight, formatValue = formatProjectionValue, maxRows = 12, pinned = false, onUnpin, testId, } = props;
|
|
19
|
+
const drawn = useMemo(() => (zAxis === undefined ? [xAxis, yAxis] : [xAxis, yAxis, zAxis]), [xAxis, yAxis, zAxis]);
|
|
20
|
+
const rows = useMemo(() => readoutRows(index, result, samples, groups, drawn, formatValue), [drawn, formatValue, groups, index, result, samples]);
|
|
20
21
|
return (_jsx(OverlayReadout, { x: x, y: y, boxWidth: boxWidth, boxHeight: boxHeight, title: samples.ids[index] ?? '', rows: rows, maxRows: maxRows, pinned: pinned, onUnpin: onUnpin, testId: testId }));
|
|
21
22
|
}
|
|
22
|
-
function readoutRows(index, result, samples, groups,
|
|
23
|
+
function readoutRows(index, result, samples, groups, drawn, formatValue) {
|
|
23
24
|
const rows = [];
|
|
24
25
|
const { axes, scores } = result;
|
|
25
26
|
const known = index >= 0 && index < scores.rows;
|
|
26
|
-
for (const axis of
|
|
27
|
+
for (const axis of drawn) {
|
|
27
28
|
const name = axes[axis]?.name;
|
|
28
29
|
if (name === undefined)
|
|
29
30
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProjectionReadout.js","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionReadout.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAqC,CAAC;AAOrE,OAAO,E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AK,SAAS,EAAE,CAAC;QAC1C,KAAK,MAAM,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { OverlayTier } from '../../overlay/core/overlayTiers.ts';
|
|
3
|
+
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
4
|
+
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
5
|
+
import type { ProjectionReading } from './projectionBarReadings.ts';
|
|
6
|
+
/** What the cloud's controls are drawn from, wherever in the bar they sit. */
|
|
7
|
+
export interface ProjectionSpaceControlsProps {
|
|
8
|
+
/** What the cloud is showing, already resolved against the result. */
|
|
9
|
+
options: ProjectionOptions;
|
|
10
|
+
/** Called with only the options that changed, for the viewer to merge. */
|
|
11
|
+
onChange: (patch: Partial<ProjectionOptions>) => void;
|
|
12
|
+
/** The words the bar writes, already merged over the defaults. */
|
|
13
|
+
copy: ProjectionCopy;
|
|
14
|
+
/** What the set of groups is called. */
|
|
15
|
+
groupLabel: string;
|
|
16
|
+
/**
|
|
17
|
+
* Whether the samples carry groups at all. Without them the shells stand for
|
|
18
|
+
* nothing, so their control is greyed rather than removed.
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
hasGroups?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* What the settings currently read, built once for the bar and handed down.
|
|
24
|
+
* @default [] — nothing is written, which is what the cog's panel wants
|
|
25
|
+
*/
|
|
26
|
+
readings?: readonly ProjectionReading[];
|
|
27
|
+
/**
|
|
28
|
+
* How much of itself the bar is writing.
|
|
29
|
+
* @default 'full'
|
|
30
|
+
*/
|
|
31
|
+
tier?: OverlayTier;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The cloud settings a reader changes while looking at the picture.
|
|
35
|
+
*
|
|
36
|
+
* One of them is not on the map's bar at all, and it is the first: what a
|
|
37
|
+
* plain drag does. Turning the box and drawing a lasso both want that drag,
|
|
38
|
+
* and neither can be given a modifier without taking one that already means
|
|
39
|
+
* "add" or "take away" inside a lasso — so the choice is written on the bar
|
|
40
|
+
* where the reader can see it, rather than left as a shortcut they would have
|
|
41
|
+
* to be told about. It leads the row because it is the only setting on the bar
|
|
42
|
+
* that changes what the reader's own hand does.
|
|
43
|
+
*
|
|
44
|
+
* The rest are the map's, unchanged: how large the shells are, and the two
|
|
45
|
+
* name switches. The axes and the dot size wait behind the cog exactly as they
|
|
46
|
+
* do on the map.
|
|
47
|
+
* @param props - See {@link ProjectionSpaceControlsProps}.
|
|
48
|
+
* @returns The controls.
|
|
49
|
+
*/
|
|
50
|
+
export declare function ProjectionSpaceControls(props: ProjectionSpaceControlsProps): ReactElement;
|
|
51
|
+
//# sourceMappingURL=ProjectionSpaceControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectionSpaceControls.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionSpaceControls.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAQtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAMpE,8EAA8E;AAC9E,MAAM,WAAW,4BAA4B;IAC3C,sEAAsE;IACtE,OAAO,EAAE,iBAAiB,CAAC;IAC3B,0EAA0E;IAC1E,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACtD,kEAAkE;IAClE,IAAI,EAAE,cAAc,CAAC;IACrB,wCAAwC;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACxC;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,4BAA4B,GAClC,YAAY,CAoEd"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { OverlayChip } from "../../overlay/ui/OverlayChip.js";
|
|
3
|
+
import { OverlaySegmented } from "../../overlay/ui/OverlaySegmented.js";
|
|
4
|
+
import { OverlaySelect } from "../../overlay/ui/OverlaySelect.js";
|
|
5
|
+
import { OverlayToggle } from "../../overlay/ui/OverlayToggle.js";
|
|
6
|
+
import { OverlayValueMenu } from "../../overlay/ui/OverlayValueMenu.js";
|
|
7
|
+
import { CLOUD_GESTURE_CHOICES } from "./projectionCloudChoices.js";
|
|
8
|
+
import { ellipseKey, ellipseSize } from "./projectionEllipse.js";
|
|
9
|
+
import { ellipsoidChoices } from "./projectionEllipsoid.js";
|
|
10
|
+
import { projectionColourChoices } from "./projectionMapChoices.js";
|
|
11
|
+
/**
|
|
12
|
+
* The cloud settings a reader changes while looking at the picture.
|
|
13
|
+
*
|
|
14
|
+
* One of them is not on the map's bar at all, and it is the first: what a
|
|
15
|
+
* plain drag does. Turning the box and drawing a lasso both want that drag,
|
|
16
|
+
* and neither can be given a modifier without taking one that already means
|
|
17
|
+
* "add" or "take away" inside a lasso — so the choice is written on the bar
|
|
18
|
+
* where the reader can see it, rather than left as a shortcut they would have
|
|
19
|
+
* to be told about. It leads the row because it is the only setting on the bar
|
|
20
|
+
* that changes what the reader's own hand does.
|
|
21
|
+
*
|
|
22
|
+
* The rest are the map's, unchanged: how large the shells are, and the two
|
|
23
|
+
* name switches. The axes and the dot size wait behind the cog exactly as they
|
|
24
|
+
* do on the map.
|
|
25
|
+
* @param props - See {@link ProjectionSpaceControlsProps}.
|
|
26
|
+
* @returns The controls.
|
|
27
|
+
*/
|
|
28
|
+
export function ProjectionSpaceControls(props) {
|
|
29
|
+
const { options, onChange, copy, groupLabel, hasGroups = false } = props;
|
|
30
|
+
const { readings = NO_READINGS, tier = 'full' } = props;
|
|
31
|
+
const { bar, help } = copy;
|
|
32
|
+
const uncoloured = !hasGroups || options.colorBy === 'none';
|
|
33
|
+
const names = (_jsxs(_Fragment, { children: [_jsx(OverlayToggle, { label: bar.switches.showGroupLabels, help: help.showGroupLabels, icon: GROUP_LABELS_GLYPH, hideLabel: true, checked: options.showGroupLabels, disabled: uncoloured, onChange: (showGroupLabels) => onChange({ showGroupLabels }) }), _jsx(OverlayToggle, { label: bar.switches.showIds, help: help.showIds, icon: IDS_GLYPH, hideLabel: true, checked: options.showIds, onChange: (showIds) => onChange({ showIds }) })] }));
|
|
34
|
+
if (tier === 'chip' || tier === 'tiny') {
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsx(OverlayChip, { label: bar.settings, settings: chipSettings(readings), children: _jsx(SpaceSettings, { options: options, onChange: onChange, copy: copy, groupLabel: groupLabel, hasGroups: hasGroups }) }), names] }));
|
|
36
|
+
}
|
|
37
|
+
return (_jsxs(_Fragment, { children: [_jsx(OverlayValueMenu, { label: help.cloudGesture.title, keyWord: bar.key.cloudGesture, showKey: tier === 'full', value: options.cloudGesture, options: CLOUD_GESTURE_CHOICES, onChange: (cloudGesture) => onChange({ cloudGesture }) }), _jsx(OverlayValueMenu, { label: help.ellipse.title, keyWord: bar.key.ellipse, showKey: tier === 'full', value: ellipseKey(options.ellipse), disabled: uncoloured, disabledReason: UNCOLOURED_REASON, options: ellipsoidChoices(options.ellipse), onChange: (value) => onChange({ ellipse: ellipseSize(value) }) }), names] }));
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* What the chip reads out, which is every setting spelled in full.
|
|
41
|
+
* @param readings - What the settings currently read.
|
|
42
|
+
* @returns The chip's own settings.
|
|
43
|
+
*/
|
|
44
|
+
function chipSettings(readings) {
|
|
45
|
+
const settings = [];
|
|
46
|
+
for (const reading of readings) {
|
|
47
|
+
settings.push({
|
|
48
|
+
label: reading.label,
|
|
49
|
+
value: reading.value,
|
|
50
|
+
swatches: reading.swatches,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return settings;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The same settings with their captions, for the panel the chip opens.
|
|
57
|
+
* @param props - See {@link SpaceSettingsProps}.
|
|
58
|
+
* @returns The captioned controls.
|
|
59
|
+
*/
|
|
60
|
+
function SpaceSettings(props) {
|
|
61
|
+
const { options, onChange, copy, groupLabel, hasGroups } = props;
|
|
62
|
+
const { bar, help } = copy;
|
|
63
|
+
return (_jsxs(_Fragment, { children: [_jsx(OverlaySegmented, { label: help.cloudGesture.title, help: help.cloudGesture, value: options.cloudGesture, options: CLOUD_GESTURE_CHOICES, onChange: (cloudGesture) => onChange({ cloudGesture }) }), _jsx(OverlaySegmented, { label: help.colorBy.title, help: help.colorBy, value: options.colorBy, disabled: !hasGroups, options: projectionColourChoices(groupLabel, bar.uncoloured), onChange: (colorBy) => onChange({ colorBy }) }), _jsx(OverlaySelect, { label: help.ellipse.title, help: help.ellipse, value: ellipseKey(options.ellipse), disabled: !hasGroups || options.colorBy === 'none', options: ellipsoidChoices(options.ellipse), onChange: (value) => onChange({ ellipse: ellipseSize(value) }) })] }));
|
|
64
|
+
}
|
|
65
|
+
/** The two glyphs the name switches ride as, the same pair the map uses. */
|
|
66
|
+
const GROUP_LABELS_GLYPH = 'tag';
|
|
67
|
+
const IDS_GLYPH = 'id-number';
|
|
68
|
+
const UNCOLOURED_REASON = 'Shells follow the groups, so colour the cloud by them first.';
|
|
69
|
+
/** No readings at all, which is what the panel behind the cog is handed. */
|
|
70
|
+
const NO_READINGS = [];
|
|
71
|
+
//# sourceMappingURL=ProjectionSpaceControls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectionSpaceControls.js","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionSpaceControls.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAkC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAuC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAoC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAoC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAuC,CAAC;AASzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AA8BpE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAmC;IAEnC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IACzE,MAAM,EAAE,QAAQ,GAAG,WAAW,EAAE,IAAI,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;IACxD,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAE3B,MAAM,UAAU,GAAG,CAAC,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,CAAC;IAC5D,MAA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EAAE,OAAO,CAAC,YAAY,EAC3B,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC,GACtD,EACF,KAAC,gBAAgB,IACf,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EACzB,IAAI,EAAE,IAAI,CAAC,OAAO,EAClB,KAAK,EAAE,OAAO,CAAC,OAAO,EACtB,QAAQ,EAAE,CAAC,SAAS,EACpB,OAAO,EAAE,uBAAuB,CAAC,UAAU,EAAE,GAAG,CAAC,UAAU,CAAC,EAC5D,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC,GAC5C,EACF,KAAC,aAAa,IACZ,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,EACzB,IAAI,EAAE,IAAI,CAAC,OAAO,EAClB,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,EAClC,QAAQ,EAAE,CAAC,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,MAAM,EAClD,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,EAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC,GAC9D,IACD,CACJ,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,MAAM,kBAAkB,GAAG,KAAK,CAAC;AACjC,MAAM,SAAS,GAAG,WAAW,CAAC;AAE9B,MAAM,iBAAiB,GACrB,8DAA8D,CAAC;AAEjE,4EAA4E;AAC5E,MAAM,WAAW,GAAiC,EAAE,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
3
|
+
import type { ProjectionSpaceControlsProps } from './ProjectionSpaceControls.tsx';
|
|
4
|
+
/** What {@link ProjectionSpaceMore} needs beyond the cloud's own controls. */
|
|
5
|
+
export interface ProjectionSpaceMoreProps extends ProjectionSpaceControlsProps {
|
|
6
|
+
/** The reduced space the controls apply to; its axes fill the three pickers. */
|
|
7
|
+
result: ProjectionResult;
|
|
8
|
+
/**
|
|
9
|
+
* How many samples are selected, which is what the clearing action needs
|
|
10
|
+
* before it can do anything.
|
|
11
|
+
* @default 0
|
|
12
|
+
*/
|
|
13
|
+
selectedCount?: number;
|
|
14
|
+
/** Puts the box back where it was first seen. */
|
|
15
|
+
onResetView: () => void;
|
|
16
|
+
/** Empties the selection. */
|
|
17
|
+
onClearSelection: () => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* What the cloud keeps behind the cog: its three axes, the dot size, and what
|
|
21
|
+
* the two drags do.
|
|
22
|
+
*
|
|
23
|
+
* It is the map's panel with one picker more and one action fewer. There is no
|
|
24
|
+
* "zoom to selection" here, because a box has no frame to draw round a crowd:
|
|
25
|
+
* the reader turns it until the crowd is facing them, which is the gesture the
|
|
26
|
+
* whole tab exists for, and a button that guessed an angle for them would
|
|
27
|
+
* usually guess wrong.
|
|
28
|
+
* @param props - See {@link ProjectionSpaceMoreProps}.
|
|
29
|
+
* @returns The panel behind the cog.
|
|
30
|
+
*/
|
|
31
|
+
export declare function ProjectionSpaceMore(props: ProjectionSpaceMoreProps): ReactElement;
|
|
32
|
+
//# sourceMappingURL=ProjectionSpaceMore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectionSpaceMore.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionSpaceMore.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAY1C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAOpE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAGlF,8EAA8E;AAC9E,MAAM,WAAW,wBAAyB,SAAQ,4BAA4B;IAC5E,gFAAgF;IAChF,MAAM,EAAE,gBAAgB,CAAC;IACzB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,6BAA6B;IAC7B,gBAAgB,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,wBAAwB,GAC9B,YAAY,CAmFd"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { chartAxisTitle } from "../../chart/core/chartLabels.js";
|
|
3
|
+
import { OverlayAction } from "../../overlay/ui/OverlayAction.js";
|
|
4
|
+
import { OverlayGroup } from "../../overlay/ui/OverlayGroup.js";
|
|
5
|
+
import { OverlayNumber } from "../../overlay/ui/OverlayNumber.js";
|
|
6
|
+
import { OverlayPanel } from "../../overlay/ui/OverlayPanel.js";
|
|
7
|
+
import { OverlaySegmented } from "../../overlay/ui/OverlaySegmented.js";
|
|
8
|
+
import { OverlaySelect } from "../../overlay/ui/OverlaySelect.js";
|
|
9
|
+
import { PROJECTION_PANEL_NAME, PROJECTION_PANEL_SECTION, } from "../core/projectionStrings.js";
|
|
10
|
+
import { PROJECTION_TAB_DEFAULTS } from "../core/projectionTabDefaults.js";
|
|
11
|
+
import { CLOUD_GESTURE_CHOICES } from "./projectionCloudChoices.js";
|
|
12
|
+
/**
|
|
13
|
+
* What the cloud keeps behind the cog: its three axes, the dot size, and what
|
|
14
|
+
* the two drags do.
|
|
15
|
+
*
|
|
16
|
+
* It is the map's panel with one picker more and one action fewer. There is no
|
|
17
|
+
* "zoom to selection" here, because a box has no frame to draw round a crowd:
|
|
18
|
+
* the reader turns it until the crowd is facing them, which is the gesture the
|
|
19
|
+
* whole tab exists for, and a button that guessed an angle for them would
|
|
20
|
+
* usually guess wrong.
|
|
21
|
+
* @param props - See {@link ProjectionSpaceMoreProps}.
|
|
22
|
+
* @returns The panel behind the cog.
|
|
23
|
+
*/
|
|
24
|
+
export function ProjectionSpaceMore(props) {
|
|
25
|
+
const { result, options, onChange, copy } = props;
|
|
26
|
+
const { selectedCount = 0, onResetView, onClearSelection } = props;
|
|
27
|
+
const { action, help, tab } = copy;
|
|
28
|
+
const nothingPicked = selectedCount === 0;
|
|
29
|
+
return (_jsxs(OverlayPanel, { title: tab.space, onReset: () => onChange(PROJECTION_TAB_DEFAULTS.space), actions: _jsxs(_Fragment, { children: [_jsx(OverlayAction, { text: action.resetView, icon: "reset", onClick: onResetView }), _jsx(OverlayAction, { text: action.clearSelection, icon: "cross", disabled: nothingPicked, onClick: onClearSelection })] }), children: [_jsxs(OverlayGroup, { label: PROJECTION_PANEL_SECTION.axes, divider: false, children: [_jsx(OverlaySelect, { label: PROJECTION_PANEL_NAME.xAxis, help: help.xAxis, value: String(options.xAxis), options: axisChoices(result, [options.yAxis, options.zAxis]), onChange: (value) => onChange({ xAxis: Number(value) }) }), _jsx(OverlaySelect, { label: PROJECTION_PANEL_NAME.yAxis, help: help.yAxis, value: String(options.yAxis), options: axisChoices(result, [options.xAxis, options.zAxis]), onChange: (value) => onChange({ yAxis: Number(value) }) }), _jsx(OverlaySelect, { label: PROJECTION_PANEL_NAME.zAxis, help: help.zAxis, value: String(options.zAxis), options: axisChoices(result, [options.xAxis, options.yAxis]), onChange: (value) => onChange({ zAxis: Number(value) }) })] }), _jsx(OverlayGroup, { label: PROJECTION_PANEL_SECTION.drawing, children: _jsx(OverlayNumber, { label: PROJECTION_PANEL_NAME.pointRadius, help: help.pointRadius, value: options.pointRadius, min: 1, max: 12, step: 0.5, digits: 1, unit: "px", onChange: (pointRadius) => onChange({ pointRadius }) }) }), _jsx(OverlayGroup, { label: PROJECTION_PANEL_SECTION.handling, children: _jsx(OverlaySegmented, { label: PROJECTION_PANEL_NAME.cloudGesture, help: help.cloudGesture, value: options.cloudGesture, options: CLOUD_GESTURE_CHOICES, onChange: (cloudGesture) => onChange({ cloudGesture }) }) }), _jsx(OverlayGroup, { label: PROJECTION_PANEL_SECTION.selecting, children: _jsx(OverlaySegmented, { label: PROJECTION_PANEL_NAME.selectMode, help: help.selectMode, value: options.selectMode, options: SELECT_MODE_CHOICES, onChange: (selectMode) => onChange({ selectMode }) }) })] }));
|
|
30
|
+
}
|
|
31
|
+
const AXIS_TAKEN_NOTE = 'Already drawn on another axis.';
|
|
32
|
+
/** The same three words the map's panel offers, for the same reason. */
|
|
33
|
+
const SELECT_MODE_CHOICES = [
|
|
34
|
+
{ value: 'replace', label: 'Replace' },
|
|
35
|
+
{ value: 'add', label: 'Add' },
|
|
36
|
+
{ value: 'remove', label: 'Remove' },
|
|
37
|
+
];
|
|
38
|
+
/**
|
|
39
|
+
* The axes one picker offers, with the ones already drawn kept but unreachable.
|
|
40
|
+
* @param result - The reduced space being drawn.
|
|
41
|
+
* @param taken - The axes the other two pickers are showing.
|
|
42
|
+
* @returns The choices, in the order the run produced them.
|
|
43
|
+
*/
|
|
44
|
+
function axisChoices(result, taken) {
|
|
45
|
+
const choices = [];
|
|
46
|
+
for (const [index, axis] of result.axes.entries()) {
|
|
47
|
+
const drawn = taken.includes(index);
|
|
48
|
+
choices.push({
|
|
49
|
+
value: String(index),
|
|
50
|
+
label: chartAxisTitle(axis.name, { share: axis.share }),
|
|
51
|
+
disabled: drawn,
|
|
52
|
+
title: drawn ? AXIS_TAKEN_NOTE : undefined,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return choices;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=ProjectionSpaceMore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectionSpaceMore.js","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionSpaceMore.tsx"],"names":[],"mappings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C,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACrC,CAAC;AAEJ;;;;;GAKG;AACH,SAAS,WAAW,CAClB,MAAwB,EACxB,KAAwB;IAExB,MAAM,OAAO,GAAoB,EAAE,CAAC;IACpC,KAAK,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,CAAC;QAClD,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC;YACX,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC;YACpB,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;YACvD,QAAQ,EAAE,KAAK;YACf,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;SAC3C,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import type { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { ScatterPointOpen } from '../../scatter/ui/scatterPlotProps.ts';
|
|
3
|
+
import type { SelectionChange } from '../../scatter/ui/useScatterSelection.ts';
|
|
4
|
+
import type { OrbitCamera } from '../../scatter3d/core/orbitCamera.ts';
|
|
5
|
+
import type { ProjectionCopy } from '../core/projectionCopy.ts';
|
|
6
|
+
import type { ProjectionOptions } from '../core/projectionOptions.ts';
|
|
7
|
+
import type { ProjectionResult } from '../core/projectionResult.ts';
|
|
8
|
+
import type { ResolvedProjectionGroups } from '../core/projectionSamples.ts';
|
|
9
|
+
import type { SelectionReport } from './ProjectionMapCaption.tsx';
|
|
10
|
+
import type { ProjectionMapChrome } from './projectionMapChrome.ts';
|
|
11
|
+
/** What {@link ProjectionSpaceTab} needs. */
|
|
12
|
+
export interface ProjectionSpaceTabProps {
|
|
13
|
+
/** What the run produced, whatever produced it. */
|
|
14
|
+
result: ProjectionResult;
|
|
15
|
+
/** The groups, resolved once by the viewer so every tab colours alike. */
|
|
16
|
+
groups: ResolvedProjectionGroups;
|
|
17
|
+
/** What the cloud is showing, already resolved against `result`. */
|
|
18
|
+
options: ProjectionOptions;
|
|
19
|
+
/** The words the cloud writes, already merged over the defaults. */
|
|
20
|
+
copy: ProjectionCopy;
|
|
21
|
+
/** The key's title and entries, built once with the bar's explanation. */
|
|
22
|
+
chrome: ProjectionMapChrome;
|
|
23
|
+
/**
|
|
24
|
+
* What each sample is called, in the score matrix's row order.
|
|
25
|
+
* @default undefined — the setting has nothing to write and draws nothing
|
|
26
|
+
*/
|
|
27
|
+
ids?: readonly string[];
|
|
28
|
+
/** Width of the figure, in pixels. */
|
|
29
|
+
width: number;
|
|
30
|
+
/** Height of the figure, in pixels. */
|
|
31
|
+
height: number;
|
|
32
|
+
/** The selected rows, as indices into the score matrix. */
|
|
33
|
+
selected: readonly number[];
|
|
34
|
+
/** Where the reader is standing, which the viewer keeps between visits. */
|
|
35
|
+
camera: OrbitCamera;
|
|
36
|
+
/** Called with the camera every frame of a turn leaves behind. */
|
|
37
|
+
onCameraChange: (camera: OrbitCamera) => void;
|
|
38
|
+
/** How far in the reader has zoomed. */
|
|
39
|
+
zoom: number;
|
|
40
|
+
/** Called with the zoom the wheel asks for. */
|
|
41
|
+
onZoomChange: (zoom: number) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the wheel zooms the box.
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
wheelZoom?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* What the last gesture picked out, for the line over the picture.
|
|
49
|
+
* @default null — nothing has happened yet
|
|
50
|
+
*/
|
|
51
|
+
report?: SelectionReport | null;
|
|
52
|
+
/**
|
|
53
|
+
* Called when a lasso is released or a dot is tapped.
|
|
54
|
+
* @default undefined
|
|
55
|
+
*/
|
|
56
|
+
onSelectionChange?: (change: SelectionChange) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Called with the row under the pointer, or `-1`.
|
|
59
|
+
* @default undefined
|
|
60
|
+
*/
|
|
61
|
+
onHoverChange?: (index: number) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Called when the reader double-clicks a sample.
|
|
64
|
+
* @default undefined
|
|
65
|
+
*/
|
|
66
|
+
onPointDoubleClick?: (point: ScatterPointOpen) => void;
|
|
67
|
+
/**
|
|
68
|
+
* The card that follows the pointer, built by the viewer so that it says the
|
|
69
|
+
* same thing on every tab.
|
|
70
|
+
* @default undefined — no card is drawn
|
|
71
|
+
*/
|
|
72
|
+
hoverCard?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Value of the `data-testid` attribute of the figure.
|
|
75
|
+
* @default undefined
|
|
76
|
+
*/
|
|
77
|
+
testId?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* The cloud: the same samples as the map, in a box the reader can turn.
|
|
81
|
+
*
|
|
82
|
+
* It earns a tab of its own rather than a switch on the map because it answers
|
|
83
|
+
* a different question. The map shows the two strongest patterns and is the
|
|
84
|
+
* right picture nine times in ten; the cloud is what a reader reaches for when
|
|
85
|
+
* two groups sit on top of each other there, because a third component often
|
|
86
|
+
* pulls them apart and no flat picture can show that.
|
|
87
|
+
*
|
|
88
|
+
* Everything it can share with the map it does share — the colours, the
|
|
89
|
+
* selection, the lasso, the key, the card and the names — so moving between
|
|
90
|
+
* the two tabs changes the picture and nothing else. What it cannot share is
|
|
91
|
+
* the scale: all three axes are stretched to one box, because a solid seen
|
|
92
|
+
* from an angle has nowhere to put three sets of tick labels, and a box drawn
|
|
93
|
+
* at three scales would tilt a group in a direction the data never did.
|
|
94
|
+
* @param props - See {@link ProjectionSpaceTabProps}.
|
|
95
|
+
* @returns The figure.
|
|
96
|
+
*/
|
|
97
|
+
export declare function ProjectionSpaceTab(props: ProjectionSpaceTabProps): ReactElement;
|
|
98
|
+
//# sourceMappingURL=ProjectionSpaceTab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProjectionSpaceTab.d.ts","sourceRoot":"","sources":["../../../src/projection/ui/ProjectionSpaceTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,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;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAIlE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAQpE,6CAA6C;AAC7C,MAAM,WAAW,uBAAuB;IACtC,mDAAmD;IACnD,MAAM,EAAE,gBAAgB,CAAC;IACzB,0EAA0E;IAC1E,MAAM,EAAE,wBAAwB,CAAC;IACjC,oEAAoE;IACpE,OAAO,EAAE,iBAAiB,CAAC;IAC3B,oEAAoE;IACpE,IAAI,EAAE,cAAc,CAAC;IACrB,0EAA0E;IAC1E,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;;OAGG;IACH,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,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