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,8 +1,7 @@
|
|
|
1
1
|
import type { CompositionType } from '../composition';
|
|
2
|
-
import type { ShowControlsProp } from '../controls';
|
|
3
2
|
import type { ElementSymbol } from '../element';
|
|
4
|
-
import type { Point2D, Point3D, Vec3 } from '../math';
|
|
5
|
-
import type { Rect, Sides } from '../plot/layout';
|
|
3
|
+
import type { Point2D, Point3D, Vec2, Vec3 } from '../math';
|
|
4
|
+
import type { Rect, Sides } from '../plot/core/layout';
|
|
6
5
|
import type { AnyStructure } from '../structure';
|
|
7
6
|
export interface StructurePopupStats {
|
|
8
7
|
id?: string;
|
|
@@ -36,7 +35,17 @@ export interface PhaseData {
|
|
|
36
35
|
data?: Record<string, unknown>;
|
|
37
36
|
structure?: Record<string, unknown>;
|
|
38
37
|
attributes?: Record<string, unknown>;
|
|
38
|
+
magnetic_ordering?: MagneticOrdering | (string & {});
|
|
39
39
|
}
|
|
40
|
+
export interface EntryCategoryConfig {
|
|
41
|
+
label: string;
|
|
42
|
+
property: string | string[];
|
|
43
|
+
markers: Record<string, MarkerSymbol>;
|
|
44
|
+
labels?: Record<string, string>;
|
|
45
|
+
aliases?: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
export type MagneticOrdering = `FM` | `FiM` | `AFM` | `NM`;
|
|
48
|
+
export declare const MAGNETIC_ORDERING_CATEGORY: EntryCategoryConfig;
|
|
40
49
|
export interface ProcessedPhaseData {
|
|
41
50
|
entries: PhaseData[];
|
|
42
51
|
stable_entries: PhaseData[];
|
|
@@ -77,7 +86,6 @@ export interface ConvexHullConfig {
|
|
|
77
86
|
}
|
|
78
87
|
export interface ConvexHullControlsType {
|
|
79
88
|
title?: string;
|
|
80
|
-
show?: ShowControlsProp;
|
|
81
89
|
position?: `top-left` | `top-right` | `bottom-left` | `bottom-right`;
|
|
82
90
|
width?: number;
|
|
83
91
|
show_counts?: boolean;
|
|
@@ -145,7 +153,7 @@ export declare const DEFAULT_GAS_PRESSURES: Readonly<Record<GasSpecies, number>>
|
|
|
145
153
|
export interface GasThermodynamicsProvider {
|
|
146
154
|
get_standard_chemical_potential(gas: GasSpecies, T: number): number;
|
|
147
155
|
get_supported_gases(): GasSpecies[];
|
|
148
|
-
get_temperature_range():
|
|
156
|
+
get_temperature_range(): Vec2;
|
|
149
157
|
}
|
|
150
158
|
export interface GasThermodynamicsConfig {
|
|
151
159
|
enabled_gases?: GasSpecies[];
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
// Built-in preset for magnetic orderings (MP/pymatgen conventions) and the default
|
|
2
|
+
// entry_category of all convex hull components: entries carrying magnetic_ordering
|
|
3
|
+
// (or an MP-style `ordering` field) auto-render as shape-coded points with filter toggles
|
|
4
|
+
export const MAGNETIC_ORDERING_CATEGORY = {
|
|
5
|
+
label: `Magnetic`,
|
|
6
|
+
property: [`magnetic_ordering`, `ordering`],
|
|
7
|
+
markers: { FM: `triangle`, FiM: `diamond`, AFM: `square`, NM: `circle` },
|
|
8
|
+
// oxfmt-ignore
|
|
9
|
+
labels: { FM: `Ferromagnetic`, FiM: `Ferrimagnetic`, AFM: `Antiferromagnetic`, NM: `Non-magnetic` },
|
|
10
|
+
// oxfmt-ignore
|
|
11
|
+
aliases: { ferromagnetic: `FM`, ferrimagnetic: `FiM`, antiferromagnetic: `AFM`, 'non-magnetic': `NM`, nonmagnetic: `NM`, diamagnetic: `NM` },
|
|
12
|
+
};
|
|
1
13
|
export const HULL_FACE_COLOR_MODES = [
|
|
2
14
|
`uniform`,
|
|
3
15
|
`formation_energy`,
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { PLOT_COLORS } from '../colors'
|
|
3
3
|
import { StatusMessage } from '../feedback'
|
|
4
|
-
import { create_file_drop_handler } from '../io'
|
|
4
|
+
import { create_file_drop_handler, drag_over_handlers } from '../io'
|
|
5
5
|
import { format_value } from '../labels'
|
|
6
|
+
import type { Vec2 } from '../math'
|
|
6
7
|
import { BarPlot } from '../plot'
|
|
7
8
|
import type {
|
|
8
9
|
AxisConfig,
|
|
9
10
|
BarHandlerProps,
|
|
10
11
|
BarSeries,
|
|
11
12
|
Orientation,
|
|
12
|
-
} from '../plot/types'
|
|
13
|
+
} from '../plot/core/types'
|
|
13
14
|
import type { AnyStructure } from '../structure'
|
|
14
15
|
import type { BondingStrategy } from '../structure/bonding'
|
|
15
16
|
import { parse_any_structure } from '../structure/parse'
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
import { SvelteMap, SvelteSet } from 'svelte/reactivity'
|
|
19
20
|
import { calc_coordination_nums, type CoordinationData } from './calc-coordination'
|
|
20
21
|
import type { SplitMode } from './index'
|
|
22
|
+
import { to_error } from '../utils'
|
|
21
23
|
|
|
22
24
|
type CoordinationMetadata = {
|
|
23
25
|
element?: string
|
|
@@ -98,7 +100,7 @@
|
|
|
98
100
|
for (const entry of entries_with_data) {
|
|
99
101
|
for (const [cn] of entry.data.cn_histogram) max_cn = Math.max(max_cn, cn)
|
|
100
102
|
}
|
|
101
|
-
const cn_range:
|
|
103
|
+
const cn_range: Vec2 = [-0.5, max_cn + 0.5]
|
|
102
104
|
|
|
103
105
|
return { count: [0, null] as [number, null], cn: cn_range } // Count axis should always start at 0
|
|
104
106
|
})
|
|
@@ -178,31 +180,30 @@
|
|
|
178
180
|
metadata: { structure_label: entry.label },
|
|
179
181
|
}
|
|
180
182
|
})
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
183
|
+
}
|
|
184
|
+
// split_mode === 'none': combine all into single series
|
|
185
|
+
const combined_histogram = new SvelteMap<number, number>()
|
|
184
186
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
187
|
+
for (const entry of entries_with_data) {
|
|
188
|
+
for (const [cn, count] of entry.data.cn_histogram) {
|
|
189
|
+
combined_histogram.set(cn, (combined_histogram.get(cn) ?? 0) + count)
|
|
189
190
|
}
|
|
191
|
+
}
|
|
190
192
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
+
const x_vals = Array.from(combined_histogram.keys()).sort((a, b) => a - b)
|
|
194
|
+
const y_vals = x_vals.map((cn) => combined_histogram.get(cn) ?? 0)
|
|
193
195
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
}
|
|
196
|
+
return [
|
|
197
|
+
{
|
|
198
|
+
x: x_vals,
|
|
199
|
+
y: y_vals,
|
|
200
|
+
label: `All Sites`,
|
|
201
|
+
color: PLOT_COLORS[0],
|
|
202
|
+
bar_width: 0.8,
|
|
203
|
+
visible: true,
|
|
204
|
+
metadata: {},
|
|
205
|
+
},
|
|
206
|
+
]
|
|
206
207
|
})
|
|
207
208
|
|
|
208
209
|
const compute_and_add = (content: string | ArrayBuffer, filename: string) => {
|
|
@@ -221,7 +222,7 @@
|
|
|
221
222
|
}
|
|
222
223
|
} catch (exc) {
|
|
223
224
|
error_msg = `Failed to process structure: ${
|
|
224
|
-
exc
|
|
225
|
+
to_error(exc).message
|
|
225
226
|
}`
|
|
226
227
|
}
|
|
227
228
|
}
|
|
@@ -297,15 +298,7 @@
|
|
|
297
298
|
bind:display
|
|
298
299
|
{tooltip}
|
|
299
300
|
ondrop={handle_file_drop}
|
|
300
|
-
|
|
301
|
-
event.preventDefault()
|
|
302
|
-
if (!allow_file_drop) return
|
|
303
|
-
dragover = true
|
|
304
|
-
}}
|
|
305
|
-
ondragleave={(event) => {
|
|
306
|
-
event.preventDefault()
|
|
307
|
-
dragover = false
|
|
308
|
-
}}
|
|
301
|
+
{...drag_over_handlers({ allow: () => allow_file_drop, set_dragover: (over) => dragover = over })}
|
|
309
302
|
class={(rest.class ?? ``) + (dragover ? ` dragover` : ``)}
|
|
310
303
|
/>
|
|
311
304
|
{/if}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BarPlot } from '../plot';
|
|
2
|
-
import type { AxisConfig } from '../plot/types';
|
|
2
|
+
import type { AxisConfig } from '../plot/core/types';
|
|
3
3
|
import type { AnyStructure } from '../structure';
|
|
4
4
|
import type { BondingStrategy } from '../structure/bonding';
|
|
5
5
|
import type { ComponentProps } from 'svelte';
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
{shell_idx + 1}.{elec_idx + 1}
|
|
116
116
|
<!-- {:else if [`sequential`, true].includes(number_electrons)} -->
|
|
117
117
|
{:else}
|
|
118
|
-
{@const nth_electron =
|
|
118
|
+
{@const nth_electron =
|
|
119
|
+
shells.slice(0, shell_idx).reduce((sum, count) => sum + count, 0) +
|
|
119
120
|
elec_idx + 1}
|
|
120
121
|
{nth_electron}
|
|
121
122
|
{/if}
|
package/dist/element/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ElementSymbol } from './types';
|
|
1
2
|
export type * from './types';
|
|
2
3
|
export { default as BohrAtom } from './BohrAtom.svelte';
|
|
3
4
|
export { default as element_data } from './data';
|
|
@@ -6,3 +7,6 @@ export { default as ElementPhoto } from './ElementPhoto.svelte';
|
|
|
6
7
|
export { default as ElementStats } from './ElementStats.svelte';
|
|
7
8
|
export { default as ElementTile } from './ElementTile.svelte';
|
|
8
9
|
export { default as Nucleus } from './Nucleus.svelte';
|
|
10
|
+
export declare const is_elem_symbol: (symbol: string) => symbol is ElementSymbol;
|
|
11
|
+
export declare const coerce_elem_symbol: (symbol: string) => ElementSymbol | undefined;
|
|
12
|
+
export declare const FALLBACK_ELEMENTS: readonly ["H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne"];
|
package/dist/element/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ELEM_SYMBOLS } from '../labels';
|
|
1
2
|
export { default as BohrAtom } from './BohrAtom.svelte';
|
|
2
3
|
export { default as element_data } from './data';
|
|
3
4
|
export { default as ElementHeading } from './ElementHeading.svelte';
|
|
@@ -5,3 +6,20 @@ export { default as ElementPhoto } from './ElementPhoto.svelte';
|
|
|
5
6
|
export { default as ElementStats } from './ElementStats.svelte';
|
|
6
7
|
export { default as ElementTile } from './ElementTile.svelte';
|
|
7
8
|
export { default as Nucleus } from './Nucleus.svelte';
|
|
9
|
+
// Set-backed O(1) element-symbol guard shared by all parsers
|
|
10
|
+
const ELEM_SYMBOL_SET = new Set(ELEM_SYMBOLS);
|
|
11
|
+
export const is_elem_symbol = (symbol) => ELEM_SYMBOL_SET.has(symbol);
|
|
12
|
+
export const coerce_elem_symbol = (symbol) => is_elem_symbol(symbol) ? symbol : undefined;
|
|
13
|
+
// Default element symbols used when a file omits or mangles element info
|
|
14
|
+
export const FALLBACK_ELEMENTS = [
|
|
15
|
+
`H`,
|
|
16
|
+
`He`,
|
|
17
|
+
`Li`,
|
|
18
|
+
`Be`,
|
|
19
|
+
`B`,
|
|
20
|
+
`C`,
|
|
21
|
+
`N`,
|
|
22
|
+
`O`,
|
|
23
|
+
`F`,
|
|
24
|
+
`Ne`,
|
|
25
|
+
];
|
|
@@ -4,14 +4,16 @@
|
|
|
4
4
|
let {
|
|
5
5
|
visible = false,
|
|
6
6
|
message = `Drop JSON file to load phase diagram data`,
|
|
7
|
+
style = undefined,
|
|
7
8
|
}: {
|
|
8
9
|
visible?: boolean
|
|
9
10
|
message?: string
|
|
11
|
+
style?: string
|
|
10
12
|
} = $props()
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
{#if visible}
|
|
14
|
-
<div class="drag-overlay">
|
|
16
|
+
<div class="drag-overlay" {style}>
|
|
15
17
|
<div class="drag-message">
|
|
16
18
|
<Icon icon="Info" />
|
|
17
19
|
<span>{message}</span>
|
|
@@ -26,7 +26,11 @@
|
|
|
26
26
|
|
|
27
27
|
<style>
|
|
28
28
|
.status-message {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 1em;
|
|
29
32
|
border-radius: var(--border-radius, 3pt);
|
|
33
|
+
backdrop-filter: blur(8px);
|
|
30
34
|
&.info {
|
|
31
35
|
border: 2px dashed var(--text-color-muted, #ccc);
|
|
32
36
|
background: transparent;
|
|
@@ -47,11 +51,17 @@
|
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
button {
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
flex: none;
|
|
55
|
+
display: grid;
|
|
56
|
+
place-items: center;
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
width: 1.6em;
|
|
60
|
+
height: 1.6em;
|
|
61
|
+
padding: 0;
|
|
52
62
|
background: var(--btn-bg, #ddd);
|
|
53
63
|
border: 1px solid var(--border-color, #bbb);
|
|
54
|
-
border-radius:
|
|
64
|
+
border-radius: 50%;
|
|
55
65
|
cursor: pointer;
|
|
56
66
|
&:hover {
|
|
57
67
|
background: var(--btn-bg-hover, #ccc);
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { compute_fermi_slice } from './compute'
|
|
9
9
|
import { BAND_COLORS } from './constants'
|
|
10
10
|
import type { FermiSliceData, FermiSurfaceData } from './types'
|
|
11
|
+
import { to_error } from '../utils'
|
|
11
12
|
|
|
12
13
|
let {
|
|
13
14
|
fermi_data,
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
slice_data = compute_fermi_slice(fermi_data, { miller_indices, distance })
|
|
61
62
|
} catch (err) {
|
|
62
63
|
slice_data = null
|
|
63
|
-
on_error?.(
|
|
64
|
+
on_error?.(to_error(err))
|
|
64
65
|
}
|
|
65
66
|
})
|
|
66
67
|
|
|
@@ -114,7 +115,7 @@
|
|
|
114
115
|
const band = slice_data?.isolines[series_idx]?.band_index
|
|
115
116
|
if (band === undefined) return
|
|
116
117
|
const all_bands = [
|
|
117
|
-
...new Set(slice_data?.isolines.map((iso) => iso.band_index)
|
|
118
|
+
...new Set(slice_data?.isolines.map((iso) => iso.band_index)),
|
|
118
119
|
]
|
|
119
120
|
const is_solo = all_bands.every((bid) => bid === band || hidden_bands.has(bid))
|
|
120
121
|
hidden_bands.clear()
|
|
@@ -136,12 +137,19 @@
|
|
|
136
137
|
x_axis={{ ticks: [], range: [bounds.min[0], bounds.max[0]] }}
|
|
137
138
|
y_axis={{ ticks: [], range: [bounds.min[1], bounds.max[1]] }}
|
|
138
139
|
range_padding={0}
|
|
140
|
+
line_tween={{ duration: 0 }}
|
|
139
141
|
display={{ x_grid: false, y_grid: false, x_zero_line: show_axes, y_zero_line: show_axes }}
|
|
140
142
|
styles={{ show_points: false, show_lines: true }}
|
|
141
143
|
controls={{ show: false }}
|
|
142
144
|
fullscreen_toggle={false}
|
|
143
145
|
legend={show_legend && series.length > 0
|
|
144
|
-
? {
|
|
146
|
+
? {
|
|
147
|
+
on_toggle: toggle_band,
|
|
148
|
+
on_double_click: isolate_band,
|
|
149
|
+
draggable: false,
|
|
150
|
+
// pin bottom-right so it clears the top-left title/controls overlay (e.g. in the demo)
|
|
151
|
+
style: `left: auto; top: auto; right: 8px; bottom: 8px`,
|
|
152
|
+
}
|
|
145
153
|
: null}
|
|
146
154
|
padding={{ t: 5, b: 5, l: 5, r: 5 }}
|
|
147
155
|
class="fermi-slice {rest.class ?? ``}"
|
|
@@ -177,12 +185,12 @@
|
|
|
177
185
|
:global(.fermi-slice .zero-line) {
|
|
178
186
|
display: none;
|
|
179
187
|
}
|
|
180
|
-
|
|
188
|
+
.fermi-axis {
|
|
181
189
|
stroke: var(--fermi-surface-axis-color, #888);
|
|
182
190
|
stroke-dasharray: 4, 4;
|
|
183
191
|
stroke-width: 1;
|
|
184
192
|
}
|
|
185
|
-
|
|
193
|
+
.fermi-label {
|
|
186
194
|
fill: var(--fermi-surface-axis-color, #888);
|
|
187
195
|
font: 12px system-ui, sans-serif;
|
|
188
196
|
}
|