matterviz 0.3.7 → 0.4.1
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/dist/Icon.svelte +7 -4
- package/dist/MillerIndexInput.svelte +1 -1
- package/dist/api/optimade.js +32 -26
- package/dist/app.css +0 -3
- package/dist/brillouin/BrillouinZone.svelte +76 -148
- package/dist/brillouin/BrillouinZone.svelte.d.ts +6 -14
- package/dist/brillouin/BrillouinZoneExportPane.svelte +43 -96
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +1 -1
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +9 -32
- package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +2 -3
- package/dist/brillouin/BrillouinZoneScene.svelte +97 -205
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +4 -23
- package/dist/brillouin/BrillouinZoneTooltip.svelte +16 -25
- package/dist/brillouin/ReciprocalVectors.svelte +39 -0
- package/dist/brillouin/ReciprocalVectors.svelte.d.ts +9 -0
- package/dist/brillouin/compute.d.ts +2 -0
- package/dist/brillouin/compute.js +89 -90
- package/dist/brillouin/geometry.d.ts +8 -0
- package/dist/brillouin/geometry.js +57 -0
- package/dist/brillouin/index.d.ts +2 -0
- package/dist/brillouin/index.js +2 -0
- package/dist/brillouin/types.d.ts +2 -2
- package/dist/chempot-diagram/ChemPotDiagram.svelte +14 -13
- package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +109 -203
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +4 -1
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +180 -470
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +7 -1
- package/dist/chempot-diagram/async-compute.svelte.js +3 -1
- package/dist/chempot-diagram/chempot-worker.js +2 -1
- package/dist/chempot-diagram/color.d.ts +3 -6
- package/dist/chempot-diagram/color.js +5 -5
- package/dist/chempot-diagram/compute.d.ts +4 -4
- package/dist/chempot-diagram/compute.js +20 -20
- package/dist/chempot-diagram/controls-state.svelte.d.ts +10 -0
- package/dist/chempot-diagram/controls-state.svelte.js +42 -0
- package/dist/chempot-diagram/export.d.ts +47 -0
- package/dist/chempot-diagram/export.js +133 -0
- package/dist/chempot-diagram/index.d.ts +1 -0
- package/dist/chempot-diagram/index.js +1 -0
- package/dist/chempot-diagram/pointer.d.ts +0 -10
- package/dist/chempot-diagram/pointer.js +4 -4
- package/dist/chempot-diagram/types.d.ts +3 -3
- package/dist/colors/index.js +8 -7
- package/dist/composition/FormulaFilter.svelte +18 -11
- package/dist/composition/PieChart.svelte +11 -10
- package/dist/composition/chem-sys.d.ts +8 -0
- package/dist/composition/chem-sys.js +86 -0
- package/dist/composition/format.js +7 -4
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/index.js +1 -0
- package/dist/composition/parse.d.ts +0 -1
- package/dist/composition/parse.js +41 -31
- package/dist/controls.d.ts +1 -0
- package/dist/controls.js +0 -1
- package/dist/convex-hull/ConvexHull.svelte +8 -10
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -4
- package/dist/convex-hull/ConvexHull2D.svelte +106 -185
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +179 -683
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +183 -687
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullChrome.svelte +268 -0
- package/dist/convex-hull/ConvexHullChrome.svelte.d.ts +30 -0
- package/dist/convex-hull/ConvexHullControls.svelte +88 -7
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +7 -6
- package/dist/convex-hull/ConvexHullInfoPane.svelte +18 -5
- package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +6 -5
- package/dist/convex-hull/ConvexHullStats.svelte +36 -175
- package/dist/convex-hull/ConvexHullStats.svelte.d.ts +3 -1
- package/dist/convex-hull/ConvexHullTooltip.svelte +11 -2
- package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +2 -1
- package/dist/convex-hull/GasPressureControls.svelte +4 -4
- package/dist/convex-hull/TemperatureSlider.svelte +2 -2
- package/dist/convex-hull/barycentric-coords.d.ts +2 -4
- package/dist/convex-hull/barycentric-coords.js +6 -33
- package/dist/convex-hull/canvas-interactions.svelte.d.ts +79 -0
- package/dist/convex-hull/canvas-interactions.svelte.js +278 -0
- package/dist/convex-hull/demo-temperature.d.ts +1 -1
- package/dist/convex-hull/demo-temperature.js +20 -22
- package/dist/convex-hull/gas-thermodynamics.d.ts +2 -2
- package/dist/convex-hull/gas-thermodynamics.js +22 -30
- package/dist/convex-hull/helpers.d.ts +42 -7
- package/dist/convex-hull/helpers.js +171 -78
- package/dist/convex-hull/hull-state.svelte.d.ts +44 -0
- package/dist/convex-hull/hull-state.svelte.js +124 -0
- package/dist/convex-hull/index.d.ts +10 -8
- package/dist/convex-hull/index.js +7 -2
- package/dist/convex-hull/thermodynamics.js +136 -960
- package/dist/convex-hull/types.d.ts +13 -5
- package/dist/convex-hull/types.js +12 -0
- package/dist/coordination/CoordinationBarPlot.svelte +27 -34
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +1 -1
- package/dist/element/BohrAtom.svelte +2 -1
- package/dist/element/index.d.ts +4 -0
- package/dist/element/index.js +18 -0
- package/dist/feedback/DragOverlay.svelte +3 -1
- package/dist/feedback/DragOverlay.svelte.d.ts +1 -0
- package/dist/feedback/StatusMessage.svelte +13 -3
- package/dist/fermi-surface/FermiSlice.svelte +13 -5
- package/dist/fermi-surface/FermiSurface.svelte +78 -151
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +5 -14
- package/dist/fermi-surface/FermiSurfaceControls.svelte +1 -1
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceScene.svelte +72 -221
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +3 -23
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +8 -34
- package/dist/fermi-surface/compute.js +67 -66
- package/dist/fermi-surface/export.js +6 -16
- package/dist/fermi-surface/index.d.ts +0 -1
- package/dist/fermi-surface/index.js +0 -1
- package/dist/fermi-surface/parse.d.ts +1 -1
- package/dist/fermi-surface/parse.js +71 -79
- package/dist/fermi-surface/types.d.ts +3 -2
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +69 -52
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +4 -3
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +3 -2
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +5 -5
- package/dist/heatmap-matrix/index.d.ts +3 -2
- package/dist/heatmap-matrix/index.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/io/ExportPane.svelte +166 -0
- package/dist/io/ExportPane.svelte.d.ts +17 -0
- package/dist/io/decompress.js +5 -4
- package/dist/io/export.d.ts +9 -5
- package/dist/io/export.js +77 -51
- package/dist/io/fetch.d.ts +2 -1
- package/dist/io/fetch.js +5 -1
- package/dist/io/file-drop.d.ts +8 -1
- package/dist/io/file-drop.js +48 -36
- package/dist/io/index.d.ts +2 -0
- package/dist/io/index.js +10 -0
- package/dist/io/types.d.ts +13 -0
- package/dist/io/url-drop.js +64 -33
- package/dist/isosurface/parse.js +52 -51
- package/dist/isosurface/slice.js +5 -4
- package/dist/isosurface/types.js +1 -1
- package/dist/keyboard.d.ts +3 -0
- package/dist/keyboard.js +23 -0
- package/dist/labels.d.ts +1 -1
- package/dist/labels.js +9 -8
- package/dist/layout/FullscreenButton.svelte +33 -0
- package/dist/layout/FullscreenButton.svelte.d.ts +10 -0
- package/dist/layout/FullscreenToggle.svelte +8 -14
- package/dist/layout/PropertyFilter.svelte +3 -2
- package/dist/layout/SettingsSection.svelte +1 -1
- package/dist/layout/ViewerChrome.svelte +116 -0
- package/dist/layout/ViewerChrome.svelte.d.ts +17 -0
- package/dist/layout/fullscreen.d.ts +4 -0
- package/dist/layout/fullscreen.svelte.d.ts +8 -0
- package/dist/layout/fullscreen.svelte.js +37 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.js +3 -0
- package/dist/layout/json-tree/JsonNode.svelte +1 -1
- package/dist/layout/json-tree/JsonTree.svelte +2 -2
- package/dist/layout/json-tree/utils.js +5 -4
- package/dist/marching-cubes.js +8 -13
- package/dist/math.d.ts +12 -4
- package/dist/math.js +42 -30
- package/dist/overlays/DraggablePane.svelte +4 -4
- package/dist/overlays/index.d.ts +4 -0
- package/dist/periodic-table/PeriodicTable.svelte +27 -15
- package/dist/periodic-table/PropertySelect.svelte +1 -0
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +9 -3
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramControls.svelte +3 -2
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +4 -3
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +4 -2
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +2 -3
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +47 -132
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +3 -4
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +1 -1
- package/dist/phase-diagram/build-diagram.js +2 -2
- package/dist/phase-diagram/colors.js +1 -1
- package/dist/phase-diagram/parse.d.ts +2 -1
- package/dist/phase-diagram/parse.js +6 -5
- package/dist/phase-diagram/types.d.ts +1 -1
- package/dist/phase-diagram/utils.d.ts +3 -3
- package/dist/phase-diagram/utils.js +8 -12
- package/dist/plot/{BarPlot.svelte → bar/BarPlot.svelte} +246 -841
- package/dist/plot/{BarPlot.svelte.d.ts → bar/BarPlot.svelte.d.ts} +8 -16
- package/dist/plot/{BarPlotControls.svelte → bar/BarPlotControls.svelte} +6 -5
- package/dist/plot/{BarPlotControls.svelte.d.ts → bar/BarPlotControls.svelte.d.ts} +3 -3
- package/dist/plot/{SpacegroupBarPlot.svelte → bar/SpacegroupBarPlot.svelte} +8 -7
- package/dist/plot/{SpacegroupBarPlot.svelte.d.ts → bar/SpacegroupBarPlot.svelte.d.ts} +1 -1
- package/dist/plot/bar/data.d.ts +40 -0
- package/dist/plot/bar/data.js +154 -0
- package/dist/plot/bar/geometry.d.ts +39 -0
- package/dist/plot/bar/geometry.js +60 -0
- package/dist/plot/bar/index.d.ts +3 -0
- package/dist/plot/bar/index.js +3 -0
- package/dist/plot/box/BoxPlot.svelte +1292 -0
- package/dist/plot/box/BoxPlot.svelte.d.ts +95 -0
- package/dist/plot/box/BoxPlotControls.svelte +109 -0
- package/dist/plot/box/BoxPlotControls.svelte.d.ts +19 -0
- package/dist/plot/box/Violin.svelte +14 -0
- package/dist/plot/box/Violin.svelte.d.ts +70 -0
- package/dist/plot/box/box-plot.d.ts +56 -0
- package/dist/plot/box/box-plot.js +129 -0
- package/dist/plot/box/index.d.ts +5 -0
- package/dist/plot/box/index.js +5 -0
- package/dist/plot/box/kde.d.ts +17 -0
- package/dist/plot/box/kde.js +160 -0
- package/dist/plot/box/quantile.d.ts +3 -0
- package/dist/plot/box/quantile.js +53 -0
- package/dist/plot/{auto-place.d.ts → core/auto-place.d.ts} +1 -1
- package/dist/plot/{auto-place.js → core/auto-place.js} +6 -3
- package/dist/plot/core/axis-utils.d.ts +46 -0
- package/dist/plot/core/axis-utils.js +110 -0
- package/dist/plot/{AxisLabel.svelte → core/components/AxisLabel.svelte} +2 -2
- package/dist/plot/{AxisLabel.svelte.d.ts → core/components/AxisLabel.svelte.d.ts} +1 -1
- package/dist/plot/{ColorBar.svelte → core/components/ColorBar.svelte} +41 -38
- package/dist/plot/{ColorBar.svelte.d.ts → core/components/ColorBar.svelte.d.ts} +7 -6
- package/dist/plot/{ColorScaleSelect.svelte → core/components/ColorScaleSelect.svelte} +4 -3
- package/dist/plot/{ColorScaleSelect.svelte.d.ts → core/components/ColorScaleSelect.svelte.d.ts} +2 -2
- package/dist/plot/core/components/ControlPane.svelte +46 -0
- package/dist/plot/core/components/ControlPane.svelte.d.ts +13 -0
- package/dist/plot/{FillArea.svelte → core/components/FillArea.svelte} +17 -6
- package/dist/plot/{FillArea.svelte.d.ts → core/components/FillArea.svelte.d.ts} +1 -1
- package/dist/plot/{InteractiveAxisLabel.svelte → core/components/InteractiveAxisLabel.svelte} +3 -3
- package/dist/plot/{InteractiveAxisLabel.svelte.d.ts → core/components/InteractiveAxisLabel.svelte.d.ts} +2 -2
- package/dist/plot/{Line.svelte → core/components/Line.svelte} +33 -15
- package/dist/plot/{Line.svelte.d.ts → core/components/Line.svelte.d.ts} +3 -2
- package/dist/plot/{PlotAxis.svelte → core/components/PlotAxis.svelte} +9 -6
- package/dist/plot/{PlotAxis.svelte.d.ts → core/components/PlotAxis.svelte.d.ts} +5 -3
- package/dist/plot/{PlotControls.svelte → core/components/PlotControls.svelte} +17 -29
- package/dist/plot/core/components/PlotControls.svelte.d.ts +4 -0
- package/dist/plot/{PlotLegend.svelte → core/components/PlotLegend.svelte} +21 -10
- package/dist/plot/{PlotLegend.svelte.d.ts → core/components/PlotLegend.svelte.d.ts} +3 -2
- package/dist/plot/{PlotTooltip.svelte → core/components/PlotTooltip.svelte} +17 -1
- package/dist/plot/{PlotTooltip.svelte.d.ts → core/components/PlotTooltip.svelte.d.ts} +8 -0
- package/dist/plot/{PortalSelect.svelte → core/components/PortalSelect.svelte} +11 -7
- package/dist/plot/{ReferenceLine.svelte → core/components/ReferenceLine.svelte} +3 -3
- package/dist/plot/{ReferenceLine.svelte.d.ts → core/components/ReferenceLine.svelte.d.ts} +1 -1
- package/dist/plot/{ReferenceLine3D.svelte → core/components/ReferenceLine3D.svelte} +5 -5
- package/dist/plot/{ReferenceLine3D.svelte.d.ts → core/components/ReferenceLine3D.svelte.d.ts} +5 -5
- package/dist/plot/{ReferencePlane.svelte → core/components/ReferencePlane.svelte} +8 -8
- package/dist/plot/{ReferencePlane.svelte.d.ts → core/components/ReferencePlane.svelte.d.ts} +5 -5
- package/dist/plot/{ZeroLines.svelte → core/components/ZeroLines.svelte} +3 -3
- package/dist/plot/{ZeroLines.svelte.d.ts → core/components/ZeroLines.svelte.d.ts} +3 -3
- package/dist/plot/{ZoomRect.svelte → core/components/ZoomRect.svelte} +1 -1
- package/dist/plot/{ZoomRect.svelte.d.ts → core/components/ZoomRect.svelte.d.ts} +1 -1
- package/dist/plot/core/components/index.d.ts +17 -0
- package/dist/plot/core/components/index.js +17 -0
- package/dist/plot/{data-cleaning.d.ts → core/data-cleaning.d.ts} +71 -1
- package/dist/plot/{data-cleaning.js → core/data-cleaning.js} +21 -23
- package/dist/plot/{data-transform.d.ts → core/data-transform.d.ts} +2 -2
- package/dist/plot/{data-transform.js → core/data-transform.js} +3 -3
- package/dist/plot/core/fill-utils.d.ts +34 -0
- package/dist/plot/core/fill-utils.js +391 -0
- package/dist/plot/core/index.d.ts +10 -0
- package/dist/plot/core/index.js +11 -0
- package/dist/plot/core/interactions.d.ts +39 -0
- package/dist/plot/core/interactions.js +209 -0
- package/dist/plot/{layout.d.ts → core/layout.d.ts} +1 -0
- package/dist/plot/{layout.js → core/layout.js} +16 -8
- package/dist/plot/core/pan-zoom.svelte.d.ts +35 -0
- package/dist/plot/core/pan-zoom.svelte.js +221 -0
- package/dist/plot/core/placed-tween.svelte.d.ts +21 -0
- package/dist/plot/core/placed-tween.svelte.js +68 -0
- package/dist/plot/{reference-line.d.ts → core/reference-line.d.ts} +11 -11
- package/dist/plot/{reference-line.js → core/reference-line.js} +29 -42
- package/dist/plot/core/scales.d.ts +40 -0
- package/dist/plot/{scales.js → core/scales.js} +94 -93
- package/dist/plot/core/svg.d.ts +3 -0
- package/dist/plot/core/svg.js +41 -0
- package/dist/plot/{types.d.ts → core/types.d.ts} +36 -85
- package/dist/plot/{types.js → core/types.js} +1 -1
- package/dist/plot/{utils → core/utils}/label-placement.d.ts +3 -3
- package/dist/plot/{utils → core/utils}/label-placement.js +3 -3
- package/dist/plot/core/utils/series-visibility.d.ts +26 -0
- package/dist/plot/{utils → core/utils}/series-visibility.js +29 -2
- package/dist/plot/core/utils.d.ts +12 -0
- package/dist/plot/core/utils.js +27 -0
- package/dist/plot/{Histogram.svelte → histogram/Histogram.svelte} +174 -551
- package/dist/plot/{Histogram.svelte.d.ts → histogram/Histogram.svelte.d.ts} +2 -2
- package/dist/plot/{HistogramControls.svelte → histogram/HistogramControls.svelte} +6 -6
- package/dist/plot/{HistogramControls.svelte.d.ts → histogram/HistogramControls.svelte.d.ts} +4 -4
- package/dist/plot/histogram/index.d.ts +2 -0
- package/dist/plot/histogram/index.js +2 -0
- package/dist/plot/index.d.ts +8 -41
- package/dist/plot/index.js +10 -39
- package/dist/plot/sankey/Sankey.svelte +697 -0
- package/dist/plot/sankey/Sankey.svelte.d.ts +74 -0
- package/dist/plot/sankey/SankeyControls.svelte +98 -0
- package/dist/plot/sankey/SankeyControls.svelte.d.ts +19 -0
- package/dist/plot/sankey/index.d.ts +4 -0
- package/dist/plot/sankey/index.js +3 -0
- package/dist/plot/sankey/sankey-types.d.ts +42 -0
- package/dist/plot/sankey/sankey-types.js +4 -0
- package/dist/plot/sankey/sankey.d.ts +52 -0
- package/dist/plot/sankey/sankey.js +189 -0
- package/dist/plot/{BinnedScatterPlot.svelte → scatter/BinnedScatterPlot.svelte} +64 -64
- package/dist/plot/{BinnedScatterPlot.svelte.d.ts → scatter/BinnedScatterPlot.svelte.d.ts} +6 -6
- package/dist/plot/{ElementScatter.svelte → scatter/ElementScatter.svelte} +6 -6
- package/dist/plot/{ElementScatter.svelte.d.ts → scatter/ElementScatter.svelte.d.ts} +2 -2
- package/dist/plot/{ScatterPlot.svelte → scatter/ScatterPlot.svelte} +297 -1008
- package/dist/plot/{ScatterPlot.svelte.d.ts → scatter/ScatterPlot.svelte.d.ts} +10 -18
- package/dist/plot/{ScatterPlotControls.svelte → scatter/ScatterPlotControls.svelte} +6 -5
- package/dist/plot/{ScatterPlotControls.svelte.d.ts → scatter/ScatterPlotControls.svelte.d.ts} +2 -2
- package/dist/plot/{ScatterPoint.svelte → scatter/ScatterPoint.svelte} +7 -7
- package/dist/plot/{ScatterPoint.svelte.d.ts → scatter/ScatterPoint.svelte.d.ts} +3 -3
- package/dist/plot/{adaptive-density.d.ts → scatter/adaptive-density.d.ts} +14 -4
- package/dist/plot/{adaptive-density.js → scatter/adaptive-density.js} +46 -20
- package/dist/plot/{binned-scatter-types.d.ts → scatter/binned-scatter-types.d.ts} +5 -12
- package/dist/plot/scatter/index.d.ts +7 -0
- package/dist/plot/scatter/index.js +5 -0
- package/dist/plot/scatter/scatter-data.d.ts +19 -0
- package/dist/plot/scatter/scatter-data.js +212 -0
- package/dist/plot/{ScatterPlot3D.svelte → scatter-3d/ScatterPlot3D.svelte} +25 -34
- package/dist/plot/{ScatterPlot3D.svelte.d.ts → scatter-3d/ScatterPlot3D.svelte.d.ts} +9 -17
- package/dist/plot/{ScatterPlot3DControls.svelte → scatter-3d/ScatterPlot3DControls.svelte} +14 -14
- package/dist/plot/{ScatterPlot3DControls.svelte.d.ts → scatter-3d/ScatterPlot3DControls.svelte.d.ts} +6 -6
- package/dist/plot/{ScatterPlot3DScene.svelte → scatter-3d/ScatterPlot3DScene.svelte} +129 -128
- package/dist/plot/{ScatterPlot3DScene.svelte.d.ts → scatter-3d/ScatterPlot3DScene.svelte.d.ts} +6 -15
- package/dist/plot/{Surface3D.svelte → scatter-3d/Surface3D.svelte} +7 -6
- package/dist/plot/{Surface3D.svelte.d.ts → scatter-3d/Surface3D.svelte.d.ts} +5 -4
- package/dist/plot/scatter-3d/index.d.ts +4 -0
- package/dist/plot/scatter-3d/index.js +4 -0
- package/dist/plot/sunburst/Sunburst.svelte +1041 -0
- package/dist/plot/sunburst/Sunburst.svelte.d.ts +97 -0
- package/dist/plot/sunburst/SunburstControls.svelte +200 -0
- package/dist/plot/sunburst/SunburstControls.svelte.d.ts +26 -0
- package/dist/plot/sunburst/index.d.ts +4 -0
- package/dist/plot/sunburst/index.js +4 -0
- package/dist/plot/sunburst/render.d.ts +34 -0
- package/dist/plot/sunburst/render.js +122 -0
- package/dist/plot/sunburst/sunburst.d.ts +62 -0
- package/dist/plot/sunburst/sunburst.js +269 -0
- package/dist/rdf/RdfPlot.svelte +2 -1
- package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
- package/dist/rdf/calc-rdf.js +11 -24
- package/dist/sanitize.js +14 -3
- package/dist/scene/SceneCamera.svelte +62 -0
- package/dist/scene/SceneCamera.svelte.d.ts +19 -0
- package/dist/scene/bind-renderer.svelte.d.ts +2 -0
- package/dist/scene/bind-renderer.svelte.js +14 -0
- package/dist/scene/index.d.ts +4 -0
- package/dist/scene/index.js +5 -0
- package/dist/scene/props.js +52 -0
- package/dist/scene/types.d.ts +26 -0
- package/dist/scene/types.js +1 -0
- package/dist/settings.d.ts +79 -3
- package/dist/settings.js +321 -1
- package/dist/spectral/Bands.svelte +47 -36
- package/dist/spectral/Bands.svelte.d.ts +6 -6
- package/dist/spectral/BandsAndDos.svelte +23 -25
- package/dist/spectral/BrillouinBandsDos.svelte +42 -30
- package/dist/spectral/Dos.svelte +15 -23
- package/dist/spectral/Dos.svelte.d.ts +4 -3
- package/dist/spectral/helpers.d.ts +8 -6
- package/dist/spectral/helpers.js +137 -65
- package/dist/state.svelte.d.ts +0 -7
- package/dist/state.svelte.js +0 -6
- package/dist/structure/Arrow.svelte +2 -4
- package/dist/structure/AtomLegend.svelte +8 -9
- package/dist/structure/AtomLegend.svelte.d.ts +1 -1
- package/dist/structure/CanvasTooltip.svelte +1 -0
- package/dist/structure/CellSelect.svelte +12 -5
- package/dist/structure/CellSelect.svelte.d.ts +2 -1
- package/dist/structure/Cylinder.svelte +12 -8
- package/dist/structure/Cylinder.svelte.d.ts +4 -1
- package/dist/structure/Lattice.svelte +2 -2
- package/dist/structure/Structure.svelte +365 -423
- package/dist/structure/Structure.svelte.d.ts +5 -15
- package/dist/structure/StructureControls.svelte +217 -2
- package/dist/structure/StructureControls.svelte.d.ts +5 -3
- package/dist/structure/StructureExportPane.svelte +54 -156
- package/dist/structure/StructureExportPane.svelte.d.ts +4 -5
- package/dist/structure/StructureInfoPane.svelte +10 -9
- package/dist/structure/StructureInfoPane.svelte.d.ts +5 -5
- package/dist/structure/StructureScene.svelte +376 -208
- package/dist/structure/StructureScene.svelte.d.ts +22 -20
- package/dist/structure/{label-placement.d.ts → atom-label-placement.d.ts} +3 -3
- package/dist/structure/{label-placement.js → atom-label-placement.js} +15 -5
- package/dist/structure/atom-properties.d.ts +1 -1
- package/dist/structure/atom-properties.js +17 -22
- package/dist/structure/bond-order-perception.js +3 -5
- package/dist/structure/bonding.d.ts +4 -0
- package/dist/structure/bonding.js +134 -63
- package/dist/structure/export.d.ts +24 -4
- package/dist/structure/export.js +89 -143
- package/dist/structure/index.d.ts +4 -4
- package/dist/structure/index.js +3 -3
- package/dist/structure/measure.d.ts +3 -2
- package/dist/structure/measure.js +6 -5
- package/dist/structure/parse.d.ts +3 -2
- package/dist/structure/parse.js +419 -438
- package/dist/structure/partial-occupancy.d.ts +0 -1
- package/dist/structure/partial-occupancy.js +1 -1
- package/dist/structure/pbc.d.ts +1 -1
- package/dist/structure/pbc.js +190 -13
- package/dist/structure/polyhedra.d.ts +41 -0
- package/dist/structure/polyhedra.js +602 -0
- package/dist/structure/site.d.ts +4 -0
- package/dist/structure/site.js +1 -0
- package/dist/structure/supercell.js +3 -2
- package/dist/structure/validation.js +5 -6
- package/dist/symmetry/SymmetryElementControls.svelte +69 -0
- package/dist/symmetry/SymmetryElementControls.svelte.d.ts +9 -0
- package/dist/symmetry/SymmetryElements.svelte +354 -0
- package/dist/symmetry/SymmetryElements.svelte.d.ts +24 -0
- package/dist/symmetry/SymmetryStats.svelte +113 -8
- package/dist/symmetry/WyckoffTable.svelte +68 -7
- package/dist/symmetry/WyckoffTable.svelte.d.ts +3 -0
- package/dist/symmetry/cell-transform.js +7 -14
- package/dist/symmetry/index.d.ts +14 -4
- package/dist/symmetry/index.js +291 -72
- package/dist/symmetry/spacegroups.d.ts +12 -1
- package/dist/symmetry/spacegroups.js +63 -14
- package/dist/symmetry/symmetry-elements.d.ts +33 -0
- package/dist/symmetry/symmetry-elements.js +521 -0
- package/dist/symmetry/wyckoff-db.d.ts +9 -0
- package/dist/symmetry/wyckoff-db.js +87 -0
- package/dist/table/HeatmapTable.svelte +66 -25
- package/dist/table/HeatmapTable.svelte.d.ts +1 -1
- package/dist/table/index.d.ts +1 -3
- package/dist/table/index.js +1 -1
- package/dist/theme/index.js +8 -8
- package/dist/tooltip/KCoords.svelte +45 -0
- package/dist/tooltip/KCoords.svelte.d.ts +8 -0
- package/dist/tooltip/index.d.ts +1 -0
- package/dist/tooltip/index.js +1 -0
- package/dist/trajectory/Trajectory.svelte +123 -100
- package/dist/trajectory/Trajectory.svelte.d.ts +11 -22
- package/dist/trajectory/TrajectoryExportPane.svelte +17 -25
- package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +4 -5
- package/dist/trajectory/TrajectoryInfoPane.svelte +5 -3
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +3 -2
- package/dist/trajectory/constants.js +6 -2
- package/dist/trajectory/extract.js +17 -37
- package/dist/trajectory/format-detect.d.ts +1 -1
- package/dist/trajectory/format-detect.js +27 -19
- package/dist/trajectory/frame-reader.d.ts +0 -1
- package/dist/trajectory/frame-reader.js +63 -162
- package/dist/trajectory/helpers.d.ts +10 -2
- package/dist/trajectory/helpers.js +56 -36
- package/dist/trajectory/index.js +1 -1
- package/dist/trajectory/parse/ase.d.ts +9 -1
- package/dist/trajectory/parse/ase.js +47 -32
- package/dist/trajectory/parse/diagnostics.d.ts +3 -0
- package/dist/trajectory/parse/diagnostics.js +14 -0
- package/dist/trajectory/parse/hdf5.js +1 -1
- package/dist/trajectory/parse/index.d.ts +1 -1
- package/dist/trajectory/parse/index.js +65 -105
- package/dist/trajectory/parse/lammps.d.ts +0 -2
- package/dist/trajectory/parse/lammps.js +8 -6
- package/dist/trajectory/parse/pymatgen.d.ts +2 -0
- package/dist/trajectory/parse/pymatgen.js +74 -0
- package/dist/trajectory/parse/vasp.js +38 -18
- package/dist/trajectory/parse/xyz.d.ts +13 -1
- package/dist/trajectory/parse/xyz.js +102 -94
- package/dist/trajectory/plotting.d.ts +1 -2
- package/dist/trajectory/plotting.js +16 -113
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +7 -5
- package/dist/xrd/XrdPlot.svelte +16 -30
- package/dist/xrd/broadening.d.ts +2 -1
- package/dist/xrd/calc-xrd.js +18 -20
- package/dist/xrd/index.d.ts +2 -2
- package/dist/xrd/parse.js +2 -2
- package/package.json +43 -26
- package/dist/element/data.json +0 -11864
- package/dist/fermi-surface/marching-cubes.d.ts +0 -2
- package/dist/fermi-surface/marching-cubes.js +0 -2
- package/dist/plot/PlotControls.svelte.d.ts +0 -4
- package/dist/plot/axis-utils.d.ts +0 -19
- package/dist/plot/axis-utils.js +0 -78
- package/dist/plot/defaults.d.ts +0 -19
- package/dist/plot/defaults.js +0 -9
- package/dist/plot/fill-utils.d.ts +0 -46
- package/dist/plot/fill-utils.js +0 -322
- package/dist/plot/hover-lock.svelte.d.ts +0 -14
- package/dist/plot/hover-lock.svelte.js +0 -46
- package/dist/plot/interactions.d.ts +0 -12
- package/dist/plot/interactions.js +0 -101
- package/dist/plot/scales.d.ts +0 -48
- package/dist/plot/svg.d.ts +0 -1
- package/dist/plot/svg.js +0 -11
- package/dist/plot/utils/series-visibility.d.ts +0 -15
- package/dist/plot/utils.d.ts +0 -1
- package/dist/plot/utils.js +0 -14
- /package/dist/plot/{PortalSelect.svelte.d.ts → core/components/PortalSelect.svelte.d.ts} +0 -0
- /package/dist/plot/{binned-scatter-types.js → scatter/binned-scatter-types.js} +0 -0
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { format_value } from '
|
|
2
|
-
import { euclidean_dist } from '
|
|
1
|
+
import { format_value } from '../../labels';
|
|
2
|
+
import { euclidean_dist } from '../../math';
|
|
3
3
|
// Default gap between tick labels and axis labels
|
|
4
4
|
export const LABEL_GAP_DEFAULT = 30;
|
|
5
|
+
// X position for a right-side (y2) axis label: past the plot edge plus tick shift and
|
|
6
|
+
// measured tick-label width (both zero when tick labels render inside the plot)
|
|
7
|
+
export function y2_axis_label_x(axis, width, pad_r, max_tick_width) {
|
|
8
|
+
const inside = axis.tick?.label?.inside ?? false;
|
|
9
|
+
const tick_shift = inside ? 0 : (axis.tick?.label?.shift?.x ?? 0) + 8;
|
|
10
|
+
const label_offset = (inside ? 0 : max_tick_width) + LABEL_GAP_DEFAULT + (axis.label_shift?.x ?? 0);
|
|
11
|
+
return width - pad_r + tick_shift + label_offset;
|
|
12
|
+
}
|
|
5
13
|
// Filter undefined values from padding to prevent overriding defaults when spreading
|
|
6
14
|
// Guards against undefined/null padding inputs (common for optional props)
|
|
7
15
|
export const filter_padding = (padding, defaults) => ({
|
|
@@ -157,10 +165,9 @@ export function sample_series_obstacle_points(pixel_points, draws_line, step) {
|
|
|
157
165
|
const n_samples = Math.floor(Math.hypot(point.x - prev.x, point.y - prev.y) / step);
|
|
158
166
|
for (let idx = 1; idx < n_samples; idx++) {
|
|
159
167
|
const frac = idx / n_samples;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
});
|
|
168
|
+
const x = prev.x + (point.x - prev.x) * frac;
|
|
169
|
+
const y = prev.y + (point.y - prev.y) * frac;
|
|
170
|
+
obstacles.push({ x, y });
|
|
164
171
|
}
|
|
165
172
|
}
|
|
166
173
|
prev = point;
|
|
@@ -254,8 +261,9 @@ export function compute_element_placement(config) {
|
|
|
254
261
|
const min_distance = min_distance_sq === Infinity ? 0 : Math.sqrt(min_distance_sq);
|
|
255
262
|
// Corner preference: use element's actual corner (not center) for distance
|
|
256
263
|
// This ensures a wide element at the left edge gets proper corner credit
|
|
257
|
-
|
|
258
|
-
const
|
|
264
|
+
// (measured footprint, same as cand_rect — not the element_size fallback)
|
|
265
|
+
const elem_right = cand_x + elem_width;
|
|
266
|
+
const elem_bottom = cand_y + elem_height;
|
|
259
267
|
// Distance from element's matching corner to each plot corner
|
|
260
268
|
const min_corner_dist = Math.min(euclidean_dist([cand_x, cand_y], [plot_left, plot_top]), // top-left
|
|
261
269
|
euclidean_dist([elem_right, cand_y], [plot_right, plot_top]), // top-right
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Point2D, Vec2 } from '../../math';
|
|
2
|
+
import type { AxisRanges, PanConfig, ScaleType } from './types';
|
|
3
|
+
type Axis = `x` | `x2` | `y` | `y2`;
|
|
4
|
+
export interface PanZoomOptions {
|
|
5
|
+
ranges: () => AxisRanges;
|
|
6
|
+
scale_type: (axis: Axis) => ScaleType | undefined;
|
|
7
|
+
plot_dims: () => {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
};
|
|
11
|
+
pan: () => PanConfig | undefined;
|
|
12
|
+
set_range: (axis: Axis, range: Vec2) => void;
|
|
13
|
+
svg: () => SVGElement | null;
|
|
14
|
+
on_rect_zoom: (start: Point2D, current: Point2D) => void;
|
|
15
|
+
on_reset: () => void;
|
|
16
|
+
on_drag_move?: (coords: Point2D, inside_svg: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function create_pan_zoom(opts: PanZoomOptions): {
|
|
19
|
+
readonly drag_start: Point2D | null;
|
|
20
|
+
readonly drag_current: Point2D | null;
|
|
21
|
+
readonly is_pan_dragging: boolean;
|
|
22
|
+
readonly cursor: string;
|
|
23
|
+
set_focused: (focused: boolean) => void;
|
|
24
|
+
on_mouse_down: (evt: MouseEvent) => void;
|
|
25
|
+
on_wheel: (evt: WheelEvent) => void;
|
|
26
|
+
on_touch_start: (evt: TouchEvent) => void;
|
|
27
|
+
on_touch_move: (evt: TouchEvent) => void;
|
|
28
|
+
on_touch_end: () => void;
|
|
29
|
+
on_key_down: (evt: KeyboardEvent) => void;
|
|
30
|
+
on_window_key_down: (evt: KeyboardEvent) => void;
|
|
31
|
+
on_window_key_up: (evt: KeyboardEvent) => void;
|
|
32
|
+
reset_view: () => void;
|
|
33
|
+
destroy: () => void;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
// Shared pan/zoom/touch/drag-rect interaction controller for the 2D plot components
|
|
2
|
+
// (BarPlot, BoxPlot, Histogram, ScatterPlot). Owns the interaction state machine;
|
|
3
|
+
// per-component policy (which axis props to write on rect-zoom, reset semantics)
|
|
4
|
+
// stays in the component via the on_rect_zoom/on_reset/set_range callbacks.
|
|
5
|
+
import { MIN_TOUCH_DISTANCE_PIXELS, pan_range_by_pixels, PINCH_ZOOM_THRESHOLD, remove_drag_listeners, snapshot_ranges, zoom_range_by_factor, } from './interactions';
|
|
6
|
+
const AXES = [`x`, `x2`, `y`, `y2`];
|
|
7
|
+
export function create_pan_zoom(opts) {
|
|
8
|
+
// Rect-zoom drag state
|
|
9
|
+
let drag_state = $state({ start: null, current: null, bounds: null });
|
|
10
|
+
// Pan state
|
|
11
|
+
let is_focused = $state(false);
|
|
12
|
+
let shift_held = $state(false);
|
|
13
|
+
let pan_drag_state = $state(null);
|
|
14
|
+
let touch_state = $state(null);
|
|
15
|
+
const cancel_rect_drag = () => {
|
|
16
|
+
drag_state = { start: null, current: null, bounds: null };
|
|
17
|
+
if (typeof window !== `undefined`) {
|
|
18
|
+
window.removeEventListener(`mousemove`, on_window_mouse_move);
|
|
19
|
+
window.removeEventListener(`mouseup`, on_window_mouse_up);
|
|
20
|
+
document.body.style.cursor = ``;
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const on_window_mouse_move = (evt) => {
|
|
24
|
+
if (!drag_state.start || !drag_state.bounds)
|
|
25
|
+
return;
|
|
26
|
+
const coords = {
|
|
27
|
+
x: evt.clientX - drag_state.bounds.left,
|
|
28
|
+
y: evt.clientY - drag_state.bounds.top,
|
|
29
|
+
};
|
|
30
|
+
drag_state.current = coords;
|
|
31
|
+
const inside_svg = coords.x >= 0 &&
|
|
32
|
+
coords.x <= drag_state.bounds.width &&
|
|
33
|
+
coords.y >= 0 &&
|
|
34
|
+
coords.y <= drag_state.bounds.height;
|
|
35
|
+
opts.on_drag_move?.(coords, inside_svg);
|
|
36
|
+
};
|
|
37
|
+
const on_window_mouse_up = () => {
|
|
38
|
+
if (drag_state.start && drag_state.current) {
|
|
39
|
+
// Ignore minuscule drag rects (e.g. accidental clicks)
|
|
40
|
+
const dx = Math.abs(drag_state.start.x - drag_state.current.x);
|
|
41
|
+
const dy = Math.abs(drag_state.start.y - drag_state.current.y);
|
|
42
|
+
if (dx > 5 && dy > 5)
|
|
43
|
+
opts.on_rect_zoom(drag_state.start, drag_state.current);
|
|
44
|
+
}
|
|
45
|
+
cancel_rect_drag();
|
|
46
|
+
};
|
|
47
|
+
// Pan/zoom all four axes from an interaction-start snapshot, each in its own
|
|
48
|
+
// scale's transform space (log axes pan by a constant factor, linear by a shift)
|
|
49
|
+
const pan_all_axes = (init, dx_px, dy_px) => {
|
|
50
|
+
const dims = opts.plot_dims();
|
|
51
|
+
for (const axis of AXES) {
|
|
52
|
+
const horizontal = axis === `x` || axis === `x2`;
|
|
53
|
+
opts.set_range(axis, pan_range_by_pixels(init[`initial_${axis}_range`], horizontal ? dx_px : dy_px, horizontal ? dims.width : dims.height, opts.scale_type(axis)));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const zoom_all_axes = (init, factor) => {
|
|
57
|
+
for (const axis of AXES) {
|
|
58
|
+
opts.set_range(axis, zoom_range_by_factor(init[`initial_${axis}_range`], factor, opts.scale_type(axis)));
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
// Pan drag handler (drag direction inverted on x for natural pan feel)
|
|
62
|
+
const on_pan_move = (evt) => {
|
|
63
|
+
if (!pan_drag_state)
|
|
64
|
+
return;
|
|
65
|
+
const sensitivity = opts.pan()?.drag_sensitivity ?? 1;
|
|
66
|
+
pan_all_axes(pan_drag_state, -(evt.clientX - pan_drag_state.start.x) * sensitivity, (evt.clientY - pan_drag_state.start.y) * sensitivity);
|
|
67
|
+
};
|
|
68
|
+
const on_pan_end = () => {
|
|
69
|
+
pan_drag_state = null;
|
|
70
|
+
document.body.style.cursor = ``;
|
|
71
|
+
window.removeEventListener(`mousemove`, on_pan_move);
|
|
72
|
+
window.removeEventListener(`mouseup`, on_pan_end);
|
|
73
|
+
};
|
|
74
|
+
const on_mouse_down = (evt) => {
|
|
75
|
+
const svg = opts.svg();
|
|
76
|
+
if (!svg)
|
|
77
|
+
return;
|
|
78
|
+
// Shift+drag pans (when enabled); plain drag draws the zoom rect
|
|
79
|
+
const pan_enabled = opts.pan()?.enabled !== false;
|
|
80
|
+
if (pan_enabled && evt.shiftKey) {
|
|
81
|
+
evt.preventDefault();
|
|
82
|
+
pan_drag_state = {
|
|
83
|
+
start: { x: evt.clientX, y: evt.clientY },
|
|
84
|
+
...snapshot_ranges(opts.ranges()),
|
|
85
|
+
};
|
|
86
|
+
document.body.style.cursor = `grabbing`;
|
|
87
|
+
window.addEventListener(`mousemove`, on_pan_move);
|
|
88
|
+
window.addEventListener(`mouseup`, on_pan_end);
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
// Cache bounds at drag start so window mousemove can compute relative coords
|
|
92
|
+
const bounds = svg.getBoundingClientRect();
|
|
93
|
+
const coords = { x: evt.clientX - bounds.left, y: evt.clientY - bounds.top };
|
|
94
|
+
drag_state = { start: coords, current: coords, bounds };
|
|
95
|
+
window.addEventListener(`mousemove`, on_window_mouse_move);
|
|
96
|
+
window.addEventListener(`mouseup`, on_window_mouse_up);
|
|
97
|
+
document.body.style.cursor = `crosshair`;
|
|
98
|
+
evt.preventDefault();
|
|
99
|
+
};
|
|
100
|
+
// Wheel handler for pan (requires focus and shift). Use shift_held state
|
|
101
|
+
// (tracked via window keydown/keyup) for compatibility with synthetic events.
|
|
102
|
+
const on_wheel = (evt) => {
|
|
103
|
+
const pan_cfg = opts.pan();
|
|
104
|
+
if (pan_cfg?.enabled === false || !is_focused || !shift_held)
|
|
105
|
+
return;
|
|
106
|
+
evt.preventDefault();
|
|
107
|
+
const dims = opts.plot_dims();
|
|
108
|
+
const sensitivity = pan_cfg?.wheel_sensitivity ?? 1;
|
|
109
|
+
const ranges = opts.ranges();
|
|
110
|
+
// Pan along the dominant wheel direction
|
|
111
|
+
if (Math.abs(evt.deltaX) > Math.abs(evt.deltaY)) {
|
|
112
|
+
const dx = evt.deltaX * sensitivity;
|
|
113
|
+
opts.set_range(`x`, pan_range_by_pixels(ranges.x, dx, dims.width, opts.scale_type(`x`)));
|
|
114
|
+
opts.set_range(`x2`, pan_range_by_pixels(ranges.x2, dx, dims.width, opts.scale_type(`x2`)));
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
const dy = evt.deltaY * sensitivity;
|
|
118
|
+
opts.set_range(`y`, pan_range_by_pixels(ranges.y, dy, dims.height, opts.scale_type(`y`)));
|
|
119
|
+
opts.set_range(`y2`, pan_range_by_pixels(ranges.y2, dy, dims.height, opts.scale_type(`y2`)));
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
// Touch handlers for pinch-zoom and two-finger pan
|
|
123
|
+
const on_touch_start = (evt) => {
|
|
124
|
+
const pan_cfg = opts.pan();
|
|
125
|
+
const touch_enabled = pan_cfg?.enabled !== false && pan_cfg?.touch_enabled !== false;
|
|
126
|
+
if (!touch_enabled || evt.touches.length !== 2)
|
|
127
|
+
return;
|
|
128
|
+
evt.preventDefault();
|
|
129
|
+
touch_state = {
|
|
130
|
+
start_touches: Array.from(evt.touches).map((touch) => ({
|
|
131
|
+
x: touch.clientX,
|
|
132
|
+
y: touch.clientY,
|
|
133
|
+
})),
|
|
134
|
+
...snapshot_ranges(opts.ranges()),
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
const on_touch_move = (evt) => {
|
|
138
|
+
if (!touch_state || evt.touches.length !== 2)
|
|
139
|
+
return;
|
|
140
|
+
evt.preventDefault();
|
|
141
|
+
const [t1, t2] = Array.from(evt.touches);
|
|
142
|
+
const [s1, s2] = touch_state.start_touches;
|
|
143
|
+
// Calculate center movement for pan
|
|
144
|
+
const start_center = { x: (s1.x + s2.x) / 2, y: (s1.y + s2.y) / 2 };
|
|
145
|
+
const curr_center = { x: (t1.clientX + t2.clientX) / 2, y: (t1.clientY + t2.clientY) / 2 };
|
|
146
|
+
const dx = curr_center.x - start_center.x;
|
|
147
|
+
const dy = curr_center.y - start_center.y;
|
|
148
|
+
// Calculate pinch scale (curr/start so spread = zoom in, pinch = zoom out)
|
|
149
|
+
const start_dist = Math.hypot(s2.x - s1.x, s2.y - s1.y);
|
|
150
|
+
// ignore near-coincident touches so curr_dist / start_dist can't blow up the scale
|
|
151
|
+
if (start_dist < MIN_TOUCH_DISTANCE_PIXELS)
|
|
152
|
+
return;
|
|
153
|
+
const curr_dist = Math.hypot(t2.clientX - t1.clientX, t2.clientY - t1.clientY);
|
|
154
|
+
const scale = curr_dist / start_dist;
|
|
155
|
+
// Pinch zoom about the view center if scale changed significantly, else pan
|
|
156
|
+
if (Math.abs(scale - 1) > PINCH_ZOOM_THRESHOLD && scale > Number.EPSILON) {
|
|
157
|
+
zoom_all_axes(touch_state, scale);
|
|
158
|
+
}
|
|
159
|
+
else
|
|
160
|
+
pan_all_axes(touch_state, -dx, dy);
|
|
161
|
+
};
|
|
162
|
+
const on_touch_end = () => {
|
|
163
|
+
touch_state = null;
|
|
164
|
+
};
|
|
165
|
+
// SVG keydown: Escape cancels an in-flight rect drag, Enter/Space resets the view.
|
|
166
|
+
// Target check keeps focusable plot children (bars, points) from triggering a reset
|
|
167
|
+
// when their own Enter/Space activation bubbles up.
|
|
168
|
+
const on_key_down = (evt) => {
|
|
169
|
+
if (evt.target !== evt.currentTarget)
|
|
170
|
+
return;
|
|
171
|
+
if (evt.key === `Escape` && drag_state.start)
|
|
172
|
+
cancel_rect_drag();
|
|
173
|
+
if ([`Enter`, ` `].includes(evt.key)) {
|
|
174
|
+
evt.preventDefault();
|
|
175
|
+
opts.on_reset();
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
return {
|
|
179
|
+
get drag_start() {
|
|
180
|
+
return drag_state.start;
|
|
181
|
+
},
|
|
182
|
+
get drag_current() {
|
|
183
|
+
return drag_state.current;
|
|
184
|
+
},
|
|
185
|
+
get is_pan_dragging() {
|
|
186
|
+
return pan_drag_state !== null;
|
|
187
|
+
},
|
|
188
|
+
get cursor() {
|
|
189
|
+
if (pan_drag_state)
|
|
190
|
+
return `grabbing`;
|
|
191
|
+
return shift_held && opts.pan()?.enabled !== false ? `grab` : `crosshair`;
|
|
192
|
+
},
|
|
193
|
+
set_focused: (focused) => {
|
|
194
|
+
is_focused = focused;
|
|
195
|
+
},
|
|
196
|
+
on_mouse_down,
|
|
197
|
+
on_wheel,
|
|
198
|
+
on_touch_start,
|
|
199
|
+
on_touch_move,
|
|
200
|
+
on_touch_end,
|
|
201
|
+
on_key_down,
|
|
202
|
+
on_window_key_down: (evt) => {
|
|
203
|
+
if (evt.key === `Shift`)
|
|
204
|
+
shift_held = true;
|
|
205
|
+
},
|
|
206
|
+
on_window_key_up: (evt) => {
|
|
207
|
+
if (evt.key === `Shift`)
|
|
208
|
+
shift_held = false;
|
|
209
|
+
},
|
|
210
|
+
reset_view: () => opts.on_reset(),
|
|
211
|
+
// Tear down any window listeners + cursor override if the component unmounts
|
|
212
|
+
// mid-drag (mouseup/panend would otherwise never fire, leaking listeners and a
|
|
213
|
+
// stuck cursor). Safe during SSR teardown, where window/document don't exist.
|
|
214
|
+
destroy: () => {
|
|
215
|
+
remove_drag_listeners([on_window_mouse_move, on_pan_move], [on_window_mouse_up, on_pan_end]);
|
|
216
|
+
drag_state = { start: null, current: null, bounds: null };
|
|
217
|
+
pan_drag_state = null;
|
|
218
|
+
touch_state = null;
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Tween, type TweenOptions } from 'svelte/motion';
|
|
2
|
+
type Point = {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
};
|
|
6
|
+
export declare function create_placed_tween(opts: {
|
|
7
|
+
placement: () => Point | null;
|
|
8
|
+
dims: () => {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
responsive: () => boolean;
|
|
13
|
+
element: () => Element | null | undefined;
|
|
14
|
+
tween?: () => TweenOptions<Point> | undefined;
|
|
15
|
+
suspended?: () => boolean;
|
|
16
|
+
manual_position?: () => Point | null;
|
|
17
|
+
}): {
|
|
18
|
+
coords: Tween<Point>;
|
|
19
|
+
set_locked: (locked: boolean) => void;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Tweened position for auto-placed plot elements (legend, colorbar) with hover lock,
|
|
2
|
+
// debounced release, resize detection, and stability gating
|
|
3
|
+
import { untrack } from 'svelte';
|
|
4
|
+
import { Tween } from 'svelte/motion';
|
|
5
|
+
const HOVER_DEBOUNCE_MS = 300;
|
|
6
|
+
// Tweened position for an auto-placed plot element with the stability gating shared
|
|
7
|
+
// by BarPlot/BoxPlot/Histogram/ScatterPlot legends: snap (no animation) on first
|
|
8
|
+
// placement, follow container resizes, stay put while hovered (debounced hover lock),
|
|
9
|
+
// and track placement continuously only when `responsive`. Creates $effects, so it
|
|
10
|
+
// must be called during component init.
|
|
11
|
+
export function create_placed_tween(opts) {
|
|
12
|
+
// Hover lock: placement updates pause while the element is hovered; release is
|
|
13
|
+
// debounced so brief mouse-outs don't cause jumps
|
|
14
|
+
let hover_locked = $state(false);
|
|
15
|
+
let unlock_timeout = null;
|
|
16
|
+
const set_locked = (locked) => {
|
|
17
|
+
// Always clear any pending unlock so rapid calls don't queue multiple timeouts
|
|
18
|
+
if (unlock_timeout)
|
|
19
|
+
clearTimeout(unlock_timeout);
|
|
20
|
+
if (locked)
|
|
21
|
+
hover_locked = true;
|
|
22
|
+
else
|
|
23
|
+
unlock_timeout = setTimeout(() => (hover_locked = false), HOVER_DEBOUNCE_MS);
|
|
24
|
+
};
|
|
25
|
+
// Plain (untracked) flags: only read/written inside the effect below, and outcomes
|
|
26
|
+
// don't depend on re-running when they flip
|
|
27
|
+
let prev_dims = null;
|
|
28
|
+
let has_initial_placement = false;
|
|
29
|
+
const coords = new Tween({ x: 0, y: 0 }, untrack(() => ({ duration: 400, ...opts.tween?.() })));
|
|
30
|
+
// Clear pending unlock timeout to prevent state updates after unmount
|
|
31
|
+
$effect(() => () => {
|
|
32
|
+
if (unlock_timeout)
|
|
33
|
+
clearTimeout(unlock_timeout);
|
|
34
|
+
});
|
|
35
|
+
// Update position with stability checks
|
|
36
|
+
$effect(() => {
|
|
37
|
+
const { width, height } = opts.dims();
|
|
38
|
+
if (!width || !height)
|
|
39
|
+
return;
|
|
40
|
+
if (opts.suspended?.())
|
|
41
|
+
return;
|
|
42
|
+
const manual = opts.manual_position?.();
|
|
43
|
+
if (manual) {
|
|
44
|
+
// Immediate update (no animation) for manually positioned elements
|
|
45
|
+
void coords.set({ x: manual.x, y: manual.y }, { duration: 0 });
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const placement = opts.placement();
|
|
49
|
+
if (!placement)
|
|
50
|
+
return;
|
|
51
|
+
// Track dimensions for resize detection
|
|
52
|
+
const dims_changed = !prev_dims || prev_dims.width !== width || prev_dims.height !== height;
|
|
53
|
+
if (dims_changed)
|
|
54
|
+
prev_dims = { width, height };
|
|
55
|
+
// Only update if: resize occurred, OR (not hover-locked AND (responsive OR not
|
|
56
|
+
// yet initially placed))
|
|
57
|
+
const should_update = dims_changed || (!hover_locked && (opts.responsive() || !has_initial_placement));
|
|
58
|
+
if (should_update) {
|
|
59
|
+
void coords.set({ x: placement.x, y: placement.y },
|
|
60
|
+
// Skip animation on initial placement to avoid jump from (0, 0)
|
|
61
|
+
has_initial_placement ? undefined : { duration: 0 });
|
|
62
|
+
// Only lock position after the element has an actual measured size
|
|
63
|
+
if (opts.element())
|
|
64
|
+
has_initial_placement = true;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
return { coords, set_locked };
|
|
68
|
+
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { Vec2, Vec4 } from '../../math';
|
|
1
2
|
import type { RefLine, RefLineValue } from './types';
|
|
2
3
|
export type IndexedRefLine = RefLine & {
|
|
3
4
|
idx: number;
|
|
4
5
|
};
|
|
5
|
-
export declare
|
|
6
|
+
export declare const index_ref_lines: (ref_lines: RefLine[] | undefined) => IndexedRefLine[];
|
|
6
7
|
export interface RefLinesByZIndex {
|
|
7
8
|
below_grid: IndexedRefLine[];
|
|
8
9
|
below_lines: IndexedRefLine[];
|
|
@@ -11,18 +12,18 @@ export interface RefLinesByZIndex {
|
|
|
11
12
|
}
|
|
12
13
|
export declare function group_ref_lines_by_z(lines: IndexedRefLine[]): RefLinesByZIndex;
|
|
13
14
|
export declare function normalize_value(value: RefLineValue): number;
|
|
14
|
-
export declare const normalize_point: (point: [RefLineValue, RefLineValue]) =>
|
|
15
|
-
export declare function resolve_line_endpoints(ref_line: RefLine,
|
|
15
|
+
export declare const normalize_point: (point: [RefLineValue, RefLineValue]) => Vec2;
|
|
16
|
+
export declare function resolve_line_endpoints(ref_line: RefLine, bounds: {
|
|
16
17
|
x_min: number;
|
|
17
18
|
x_max: number;
|
|
18
19
|
y_min: number;
|
|
19
20
|
y_max: number;
|
|
20
|
-
},
|
|
21
|
+
}, scales: {
|
|
21
22
|
x_scale: (val: number) => number;
|
|
22
23
|
x2_scale?: (val: number) => number;
|
|
23
24
|
y_scale: (val: number) => number;
|
|
24
25
|
y2_scale?: (val: number) => number;
|
|
25
|
-
}):
|
|
26
|
+
}): Vec4 | null;
|
|
26
27
|
interface AnnotationPosition {
|
|
27
28
|
x: number;
|
|
28
29
|
y: number;
|
|
@@ -45,13 +46,12 @@ export interface Scene3DParams {
|
|
|
45
46
|
scene_x: number;
|
|
46
47
|
scene_y: number;
|
|
47
48
|
scene_z: number;
|
|
48
|
-
x_range:
|
|
49
|
-
y_range:
|
|
50
|
-
z_range:
|
|
49
|
+
x_range: Vec2;
|
|
50
|
+
y_range: Vec2;
|
|
51
|
+
z_range: Vec2;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
-
export declare
|
|
54
|
-
export declare function normalize_to_scene(value: number, [min_val, max_val]: [number, number], scene_size: number): number;
|
|
53
|
+
export declare const span_or: (span: [number | null, number | null] | undefined, range: Vec2) => Vec2;
|
|
54
|
+
export declare function normalize_to_scene(value: number, [min_val, max_val]: Vec2, scene_size: number): number;
|
|
55
55
|
export declare function create_to_threejs(params: Scene3DParams): (user_x: number, user_y: number, user_z: number) => {
|
|
56
56
|
x: number;
|
|
57
57
|
y: number;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
// Create indexed ref_lines, filtering out invisible ones
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.map((line, idx) => ({ ...line, idx }));
|
|
6
|
-
}
|
|
2
|
+
export const index_ref_lines = (ref_lines) => (ref_lines ?? [])
|
|
3
|
+
.filter((line) => line.visible !== false)
|
|
4
|
+
.map((line, idx) => ({ ...line, idx }));
|
|
7
5
|
// Map z-index type values to object keys
|
|
8
6
|
const Z_INDEX_KEY_MAP = {
|
|
9
7
|
'below-grid': `below_grid`,
|
|
@@ -92,7 +90,9 @@ function clip_segment_to_rect(p1x, p1y, p2x, p2y, x_min, x_max, y_min, y_max) {
|
|
|
92
90
|
}
|
|
93
91
|
// Compute the screen coordinates for a reference line
|
|
94
92
|
// Returns [x1, y1, x2, y2] in pixel coordinates, or null if line is not visible
|
|
95
|
-
export function resolve_line_endpoints(ref_line,
|
|
93
|
+
export function resolve_line_endpoints(ref_line, bounds, scales) {
|
|
94
|
+
const { x_min, x_max, y_min, y_max } = bounds;
|
|
95
|
+
const { x_scale, x2_scale, y_scale, y2_scale } = scales;
|
|
96
96
|
// Determine which scales to use based on axis assignment
|
|
97
97
|
const active_x_scale = ref_line.x_axis === `x2` && x2_scale ? x2_scale : x_scale;
|
|
98
98
|
const active_y_scale = ref_line.y_axis === `y2` && y2_scale ? y2_scale : y_scale;
|
|
@@ -105,10 +105,8 @@ export function resolve_line_endpoints(ref_line, { x_min, x_max, y_min, y_max, }
|
|
|
105
105
|
// Relative to data coordinate conversion
|
|
106
106
|
const to_data_x = (rel) => x_min + rel * (x_max - x_min);
|
|
107
107
|
const to_data_y = (rel) => y_min + rel * (y_max - y_min);
|
|
108
|
-
let x1_data = 0;
|
|
109
|
-
let y1_data = 0;
|
|
110
|
-
let x2_data = 0;
|
|
111
|
-
let y2_data = 0;
|
|
108
|
+
let [x1_data, x2_data] = [0, 0];
|
|
109
|
+
let [y1_data, y2_data] = [0, 0];
|
|
112
110
|
const line_type = ref_line.type;
|
|
113
111
|
if (line_type === `horizontal`) {
|
|
114
112
|
const y_val = normalize_value(ref_line.y);
|
|
@@ -158,31 +156,18 @@ export function resolve_line_endpoints(ref_line, { x_min, x_max, y_min, y_max, }
|
|
|
158
156
|
}
|
|
159
157
|
}
|
|
160
158
|
if (!handled_as_vertical) {
|
|
161
|
-
//
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
// Clip each endpoint to y bounds
|
|
172
|
-
const clip_y = (x, y, bound) => y < y_min || y > y_max ? [(bound - intercept) / slope, bound] : [x, y];
|
|
173
|
-
[x1, y1] = clip_y(x1, y1, y1 < y_min ? y_min : y_max);
|
|
174
|
-
[x2, y2] = clip_y(x2, y2, y2 < y_min ? y_min : y_max);
|
|
175
|
-
// If both endpoints clipped to same point, line is entirely outside bounds
|
|
176
|
-
if (x1 === x2 && y1 === y2)
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
// Ensure consistent ordering before applying span constraints
|
|
180
|
-
const [x_lo, x_hi] = x1 <= x2 ? [x1, x2] : [x2, x1];
|
|
181
|
-
const [y_lo, y_hi] = y1 <= y2 ? [y1, y2] : [y2, y1];
|
|
182
|
-
[x1_data, x2_data] = apply_x_span(x_lo, x_hi);
|
|
183
|
-
[y1_data, y2_data] = apply_y_span(y_lo, y_hi);
|
|
184
|
-
if (x1_data > x_max || x2_data < x_min)
|
|
159
|
+
// Intersect bounds with span constraints, then clip the line segment spanning the
|
|
160
|
+
// clipped x-extent to that rect — keeps endpoints paired on y = slope·x + intercept
|
|
161
|
+
const [x_lo, x_hi] = apply_x_span(x_min, x_max);
|
|
162
|
+
const [y_lo, y_hi] = apply_y_span(y_min, y_max);
|
|
163
|
+
if (x_lo > x_hi || y_lo > y_hi)
|
|
164
|
+
return null;
|
|
165
|
+
const [y_at_lo, y_at_hi] = [slope * x_lo + intercept, slope * x_hi + intercept];
|
|
166
|
+
const seg = clip_segment_to_rect(x_lo, y_at_lo, x_hi, y_at_hi, x_lo, x_hi, y_lo, y_hi);
|
|
167
|
+
// Degenerate (single-point) result means the line only grazes a corner
|
|
168
|
+
if (!seg || (seg[0] === seg[2] && seg[1] === seg[3]))
|
|
185
169
|
return null;
|
|
170
|
+
[x1_data, y1_data, x2_data, y2_data] = seg;
|
|
186
171
|
}
|
|
187
172
|
}
|
|
188
173
|
else if (line_type === `segment`) {
|
|
@@ -243,19 +228,21 @@ export function calculate_annotation_position(x1, y1, x2, y2, annotation) {
|
|
|
243
228
|
// Perpendicular vector (normalized)
|
|
244
229
|
const nx = -dy / len;
|
|
245
230
|
const ny = dx / len;
|
|
231
|
+
let sign;
|
|
246
232
|
if (side === `above` || side === `below`) {
|
|
247
233
|
// In SVG, y increases downward. Flip sign if 'above' and perpendicular points down (ny > 0),
|
|
248
234
|
// or if 'below' and perpendicular points up (ny <= 0), to ensure offset is in correct direction
|
|
249
|
-
|
|
250
|
-
perp_x = sign * nx * gap;
|
|
251
|
-
perp_y = sign * ny * gap;
|
|
235
|
+
sign = (side === `above`) === ny > 0 ? -1 : 1;
|
|
252
236
|
}
|
|
253
237
|
else {
|
|
254
|
-
// left
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
238
|
+
// left/right offset to the side of the line in screen space (right -> +x, left -> -x), stable
|
|
239
|
+
// regardless of endpoint order — vertical ref lines are stored bottom->top, which flips the
|
|
240
|
+
// perpendicular. Horizontal lines (nx == 0) fall back to right = up (-y), left = down (+y).
|
|
241
|
+
const want_right = side === `right`;
|
|
242
|
+
sign = Math.abs(nx) > 1e-9 ? (want_right ? 1 : -1) * Math.sign(nx) : want_right ? -1 : 1;
|
|
258
243
|
}
|
|
244
|
+
perp_x = sign * nx * gap;
|
|
245
|
+
perp_y = sign * ny * gap;
|
|
259
246
|
}
|
|
260
247
|
const final_x = base_x + perp_x + offset_x;
|
|
261
248
|
const final_y = base_y + perp_y + offset_y;
|
|
@@ -289,7 +276,7 @@ export function calculate_annotation_position(x1, y1, x2, y2, annotation) {
|
|
|
289
276
|
}
|
|
290
277
|
return { x: final_x, y: final_y, text_anchor, dominant_baseline, rotation };
|
|
291
278
|
}
|
|
292
|
-
|
|
279
|
+
// Apply span constraints or use full range as fallback
|
|
293
280
|
export const span_or = (span, range) => [span?.[0] ?? range[0], span?.[1] ?? range[1]];
|
|
294
281
|
// Normalize a data value to scene coordinates (centered around 0)
|
|
295
282
|
export function normalize_to_scene(value, [min_val, max_val], scene_size) {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Vec2 } from '../../math';
|
|
2
|
+
import type { ColorScaleConfig, Point, ScaleType, SizeScaleConfig, TimeInterval } from '..';
|
|
3
|
+
import type { ScaleContinuousNumeric, ScaleTime } from 'd3-scale';
|
|
4
|
+
export type TicksOption = number | number[] | TimeInterval | Record<number, string>;
|
|
5
|
+
export interface ArcsinhScale {
|
|
6
|
+
(value: number | Date): number;
|
|
7
|
+
domain(): Vec2;
|
|
8
|
+
domain(domain: Vec2): ArcsinhScale;
|
|
9
|
+
range(): Vec2;
|
|
10
|
+
range(range: Vec2): ArcsinhScale;
|
|
11
|
+
invert(value: number): number;
|
|
12
|
+
copy(): ArcsinhScale;
|
|
13
|
+
ticks(count?: number): number[];
|
|
14
|
+
threshold: number;
|
|
15
|
+
}
|
|
16
|
+
export type PlotScaleFn = ScaleContinuousNumeric<number, number> | ScaleTime<number, number> | ArcsinhScale;
|
|
17
|
+
export declare function scale_arcsinh(threshold?: number): ArcsinhScale;
|
|
18
|
+
export declare function generate_arcsinh_ticks(min: number, max: number, threshold?: number, count?: number): number[];
|
|
19
|
+
export declare function create_scale(scale_type: ScaleType, domain: Vec2, output_range: Vec2): ScaleContinuousNumeric<number, number> | ArcsinhScale;
|
|
20
|
+
export declare const create_time_scale: (domain: Vec2, output_range: Vec2) => ScaleTime<number, number, never>;
|
|
21
|
+
export declare function generate_ticks(domain: Vec2, scale_type: ScaleType, ticks_option: TicksOption | undefined, scale_fn: PlotScaleFn, // D3 scale function with .ticks() method
|
|
22
|
+
options?: {
|
|
23
|
+
format?: string;
|
|
24
|
+
default_count?: number;
|
|
25
|
+
interval_padding?: number;
|
|
26
|
+
}): number[];
|
|
27
|
+
export declare function calculate_domain(values: number[], scale_type?: ScaleType): Vec2;
|
|
28
|
+
export declare function get_nice_data_range(points: Point[], get_value: (point: Point) => number, limits: [number | null, number | null], scale_type: ScaleType, padding_factor: number, is_time?: boolean): Vec2;
|
|
29
|
+
export declare function generate_log_ticks(min: number, max: number, ticks_option?: TicksOption): number[];
|
|
30
|
+
export declare function get_tick_label(tick_value: number, ticks_option: TicksOption | undefined): string | null;
|
|
31
|
+
export declare function create_color_scale(color_scale_config: ColorScaleConfig | string, auto_color_range: Vec2): ((value: number) => string) & {
|
|
32
|
+
domain: {
|
|
33
|
+
(): Vec2;
|
|
34
|
+
(new_domain: Vec2): ((value: number) => string) & /*elided*/ any;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare function create_size_scale(config: SizeScaleConfig, all_size_values: (number | null)[]): import("d3-scale").ScaleLinear<number, number, never> | (((value: number) => number) & {
|
|
38
|
+
domain: () => Vec2;
|
|
39
|
+
range: () => Vec2;
|
|
40
|
+
});
|