matterviz 0.4.1 → 0.4.2
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/EmptyState.svelte +10 -4
- package/dist/FilePicker.svelte +12 -14
- package/dist/Icon.svelte +7 -4
- package/dist/MillerIndexInput.svelte +2 -2
- package/dist/app.css +53 -0
- package/dist/brillouin/BrillouinZone.svelte +75 -85
- package/dist/brillouin/BrillouinZone.svelte.d.ts +5 -7
- package/dist/brillouin/BrillouinZoneControls.svelte +3 -6
- package/dist/brillouin/BrillouinZoneExportPane.svelte +18 -14
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +6 -10
- package/dist/brillouin/BrillouinZoneScene.svelte +26 -39
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram.svelte +33 -38
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +62 -74
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +511 -547
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +1 -1
- package/dist/chempot-diagram/async-compute.svelte.js +1 -1
- package/dist/chempot-diagram/controls-state.svelte.js +1 -1
- package/dist/colors/index.d.ts +0 -4
- package/dist/colors/index.js +19 -20
- package/dist/composition/BarChart.svelte +37 -31
- package/dist/composition/BubbleChart.svelte +17 -17
- package/dist/composition/Composition.svelte +7 -11
- package/dist/composition/Formula.svelte +18 -25
- package/dist/composition/FormulaFilter.svelte +92 -95
- package/dist/composition/PieChart.svelte +55 -41
- package/dist/composition/format.js +1 -1
- package/dist/composition/index.d.ts +2 -0
- package/dist/composition/index.js +14 -0
- package/dist/composition/parse.d.ts +2 -2
- package/dist/composition/parse.js +11 -10
- package/dist/constants.js +11 -9
- package/dist/convex-hull/ConvexHull.svelte +12 -15
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull2D.svelte +93 -92
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +109 -140
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +75 -94
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullChrome.svelte +36 -40
- package/dist/convex-hull/ConvexHullControls.svelte +46 -48
- package/dist/convex-hull/ConvexHullStats.svelte +193 -195
- package/dist/convex-hull/ConvexHullTooltip.svelte +5 -12
- package/dist/convex-hull/GasPressureControls.svelte +5 -12
- package/dist/convex-hull/StructurePopup.svelte +17 -21
- package/dist/convex-hull/StructurePopup.svelte.d.ts +2 -0
- package/dist/convex-hull/TemperatureSlider.svelte +4 -10
- package/dist/convex-hull/canvas-interactions.svelte.js +2 -1
- package/dist/convex-hull/helpers.d.ts +8 -10
- package/dist/convex-hull/helpers.js +36 -36
- package/dist/convex-hull/hull-state.svelte.d.ts +1 -1
- package/dist/convex-hull/thermodynamics.js +18 -17
- package/dist/coordination/CoordinationBarPlot.svelte +38 -33
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +1 -1
- package/dist/coordination/calc-coordination.d.ts +1 -1
- package/dist/coordination/calc-coordination.js +28 -25
- package/dist/element/BohrAtom.svelte +5 -8
- package/dist/element/ElementHeading.svelte +4 -1
- package/dist/element/ElementPhoto.svelte +11 -9
- package/dist/element/ElementStats.svelte +12 -10
- package/dist/element/ElementTile.svelte +24 -29
- package/dist/element/Nucleus.svelte +4 -2
- package/dist/element/data.d.ts +1 -2
- package/dist/element/helpers.d.ts +4 -0
- package/dist/element/helpers.js +18 -0
- package/dist/element/index.d.ts +1 -4
- package/dist/element/index.js +3 -18
- package/dist/feedback/DragOverlay.svelte +5 -5
- package/dist/feedback/DragOverlay.svelte.d.ts +2 -2
- package/dist/feedback/StatusMessage.svelte +7 -4
- package/dist/fermi-surface/FermiSlice.svelte +21 -18
- package/dist/fermi-surface/FermiSurface.svelte +14 -22
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +5 -7
- package/dist/fermi-surface/FermiSurfaceControls.svelte +6 -20
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceScene.svelte +37 -64
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +9 -6
- package/dist/fermi-surface/compute.js +3 -3
- package/dist/fermi-surface/parse.js +22 -24
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +109 -148
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +2 -2
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +9 -7
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +1 -1
- package/dist/heatmap-matrix/index.d.ts +5 -0
- package/dist/icons.d.ts +4 -0
- package/dist/icons.js +4 -0
- package/dist/io/ExportPane.svelte +10 -6
- package/dist/io/decompress.d.ts +2 -1
- package/dist/io/decompress.js +22 -35
- package/dist/io/export.d.ts +4 -0
- package/dist/io/export.js +5 -1
- package/dist/io/fetch.d.ts +0 -3
- package/dist/io/fetch.js +0 -11
- package/dist/io/index.d.ts +0 -1
- package/dist/io/index.js +2 -9
- package/dist/io/is-binary.d.ts +9 -0
- package/dist/io/is-binary.js +45 -1
- package/dist/io/url-drop.js +13 -25
- package/dist/isosurface/Isosurface.svelte +17 -23
- package/dist/isosurface/IsosurfaceControls.svelte +37 -42
- package/dist/isosurface/parse-vaspwave.d.ts +3 -0
- package/dist/isosurface/parse-vaspwave.js +138 -0
- package/dist/isosurface/parse.js +6 -6
- package/dist/labels.d.ts +6 -2
- package/dist/labels.js +43 -13
- package/dist/layout/FullscreenButton.svelte +2 -1
- package/dist/layout/FullscreenToggle.svelte +10 -4
- package/dist/layout/InfoCard.svelte +7 -18
- package/dist/layout/InfoTag.svelte +1 -3
- package/dist/layout/NumberRangeInput.svelte +46 -0
- package/dist/layout/NumberRangeInput.svelte.d.ts +12 -0
- package/dist/layout/PropertyFilter.svelte +2 -6
- package/dist/layout/SettingsSection.svelte +21 -17
- package/dist/layout/SubpageGrid.svelte +3 -1
- package/dist/layout/ViewerChrome.svelte +9 -10
- package/dist/layout/ViewerChrome.svelte.d.ts +2 -1
- package/dist/layout/fullscreen.js +3 -5
- package/dist/layout/fullscreen.svelte.js +1 -2
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +1 -0
- package/dist/layout/json-tree/JsonNode.svelte +8 -11
- package/dist/layout/json-tree/JsonTree.svelte +53 -77
- package/dist/layout/json-tree/JsonValue.svelte +7 -15
- package/dist/layout/json-tree/utils.js +14 -23
- package/dist/math.d.ts +2 -0
- package/dist/math.js +19 -0
- package/dist/overlays/ContextMenu.svelte +4 -2
- package/dist/overlays/CopyButton.svelte +11 -5
- package/dist/overlays/DragControlTab.svelte +6 -1
- package/dist/overlays/DraggablePane.svelte +81 -26
- package/dist/overlays/DraggablePane.svelte.d.ts +1 -0
- package/dist/overlays/GlassChip.svelte +30 -0
- package/dist/overlays/GlassChip.svelte.d.ts +8 -0
- package/dist/overlays/InfoPaneCards.svelte +11 -23
- package/dist/overlays/index.d.ts +7 -0
- package/dist/overlays/index.js +26 -0
- package/dist/overlays/portal.d.ts +2 -0
- package/dist/overlays/portal.js +14 -0
- package/dist/periodic-table/PeriodicTable.svelte +113 -145
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +5 -3
- package/dist/periodic-table/PeriodicTableControls.svelte +11 -63
- package/dist/periodic-table/TableInset.svelte +9 -4
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +50 -71
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +6 -8
- package/dist/phase-diagram/PhaseDiagramControls.svelte +70 -94
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +2 -1
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +12 -12
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +54 -58
- package/dist/phase-diagram/TdbInfoPanel.svelte +21 -15
- package/dist/phase-diagram/build-diagram.js +3 -3
- package/dist/phase-diagram/diagram-input.d.ts +1 -2
- package/dist/phase-diagram/parse.js +15 -15
- package/dist/phase-diagram/svg-to-diagram.js +21 -15
- package/dist/phase-diagram/utils.js +2 -3
- package/dist/plot/bar/BarPlot.svelte +430 -391
- package/dist/plot/bar/BarPlot.svelte.d.ts +2 -0
- package/dist/plot/bar/BarPlotControls.svelte +1 -3
- package/dist/plot/bar/BarPlotControls.svelte.d.ts +4 -6
- package/dist/plot/bar/SpacegroupBarPlot.svelte +29 -36
- package/dist/plot/bar/data.d.ts +5 -4
- package/dist/plot/bar/data.js +2 -1
- package/dist/plot/box/BoxPlot.svelte +301 -209
- package/dist/plot/box/BoxPlot.svelte.d.ts +2 -0
- package/dist/plot/box/Violin.svelte.d.ts +1 -0
- package/dist/plot/box/box-plot.js +1 -1
- package/dist/plot/core/auto-place.js +1 -1
- package/dist/plot/core/axis-utils.d.ts +12 -7
- package/dist/plot/core/axis-utils.js +48 -48
- package/dist/plot/core/components/AxisLabel.svelte +82 -20
- package/dist/plot/core/components/AxisLabel.svelte.d.ts +1 -0
- package/dist/plot/core/components/ColorBar.svelte +101 -106
- package/dist/plot/core/components/ColorScaleSelect.svelte +1 -1
- package/dist/plot/core/components/FillArea.svelte +10 -17
- package/dist/plot/core/components/HierarchyControls.svelte +249 -0
- package/dist/plot/{sunburst/SunburstControls.svelte.d.ts → core/components/HierarchyControls.svelte.d.ts} +12 -8
- package/dist/plot/core/components/InteractiveAxisLabel.svelte +1 -1
- package/dist/plot/core/components/InteractiveAxisLabel.svelte.d.ts +1 -1
- package/dist/plot/core/components/Line.svelte +18 -9
- package/dist/plot/core/components/Line.svelte.d.ts +2 -0
- package/dist/plot/core/components/PlotAxis.svelte +40 -17
- package/dist/plot/core/components/PlotControls.svelte +65 -41
- package/dist/plot/core/components/PlotLegend.svelte +31 -35
- package/dist/plot/core/components/PlotMarginals.svelte +616 -0
- package/dist/plot/core/components/PlotMarginals.svelte.d.ts +15 -0
- package/dist/plot/core/components/PlotTooltip.svelte +1 -1
- package/dist/plot/core/components/PortalSelect.svelte +4 -8
- package/dist/plot/core/components/ReferenceLine.svelte +27 -24
- package/dist/plot/core/components/ReferenceLine3D.svelte +54 -57
- package/dist/plot/core/components/ReferencePlane.svelte +7 -8
- package/dist/plot/core/components/ZeroLines.svelte +4 -8
- package/dist/plot/core/components/ZoomRect.svelte +1 -2
- package/dist/plot/core/components/index.d.ts +1 -0
- package/dist/plot/core/components/index.js +1 -0
- package/dist/plot/core/data-cleaning-signal.d.ts +46 -0
- package/dist/plot/core/data-cleaning-signal.js +467 -0
- package/dist/plot/core/data-cleaning.d.ts +2 -42
- package/dist/plot/core/data-cleaning.js +27 -474
- package/dist/plot/core/data-transform.js +9 -5
- package/dist/plot/core/fill-utils.d.ts +3 -1
- package/dist/plot/core/fill-utils.js +28 -6
- package/dist/plot/core/index.d.ts +1 -0
- package/dist/plot/core/index.js +1 -0
- package/dist/plot/core/interactions.js +0 -2
- package/dist/plot/core/layout.d.ts +3 -1
- package/dist/plot/core/layout.js +22 -13
- package/dist/plot/core/marginals.d.ts +170 -0
- package/dist/plot/core/marginals.js +436 -0
- package/dist/plot/core/reference-line.js +1 -1
- package/dist/plot/core/scales.d.ts +23 -0
- package/dist/plot/core/scales.js +39 -13
- package/dist/plot/core/types/fills.d.ts +101 -0
- package/dist/plot/core/types/fills.js +15 -0
- package/dist/plot/core/types/plot-3d.d.ts +87 -0
- package/dist/plot/core/types/plot-3d.js +4 -0
- package/dist/plot/core/types/reference-lines.d.ts +140 -0
- package/dist/plot/core/types/reference-lines.js +9 -0
- package/dist/plot/core/types.d.ts +29 -324
- package/dist/plot/core/types.js +23 -20
- package/dist/plot/core/utils/hierarchy-chart.d.ts +51 -0
- package/dist/plot/core/utils/hierarchy-chart.js +179 -0
- package/dist/plot/core/utils/hierarchy-labels.d.ts +20 -0
- package/dist/plot/core/utils/hierarchy-labels.js +99 -0
- package/dist/plot/core/utils/label-placement.js +2 -2
- package/dist/plot/histogram/Histogram.svelte +304 -325
- package/dist/plot/histogram/Histogram.svelte.d.ts +7 -7
- package/dist/plot/histogram/HistogramControls.svelte +30 -28
- package/dist/plot/histogram/histogram.d.ts +31 -0
- package/dist/plot/histogram/histogram.js +70 -0
- package/dist/plot/histogram/index.d.ts +1 -0
- package/dist/plot/histogram/index.js +1 -0
- package/dist/plot/index.d.ts +1 -0
- package/dist/plot/index.js +1 -0
- package/dist/plot/sankey/Sankey.svelte +78 -69
- package/dist/plot/sankey/Sankey.svelte.d.ts +2 -2
- package/dist/plot/sankey/SankeyControls.svelte +22 -16
- package/dist/plot/scatter/BinnedScatterPlot.svelte +263 -109
- package/dist/plot/scatter/BinnedScatterPlot.svelte.d.ts +7 -0
- package/dist/plot/scatter/ElementScatter.svelte +4 -1
- package/dist/plot/scatter/ScatterPlot.svelte +477 -385
- package/dist/plot/scatter/ScatterPlot.svelte.d.ts +2 -0
- package/dist/plot/scatter/ScatterPlotControls.svelte +18 -19
- package/dist/plot/scatter/ScatterPlotControls.svelte.d.ts +1 -1
- package/dist/plot/scatter/ScatterPoint.svelte +16 -9
- package/dist/plot/scatter/binned-scatter-types.d.ts +3 -2
- package/dist/plot/scatter/binned-scatter-types.js +6 -1
- package/dist/plot/scatter/scatter-data.d.ts +1 -1
- package/dist/plot/scatter/scatter-data.js +8 -7
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte +25 -34
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte.d.ts +2 -2
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte +8 -5
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte +113 -116
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte.d.ts +2 -2
- package/dist/plot/scatter-3d/Surface3D.svelte +4 -13
- package/dist/plot/sunburst/Sunburst.svelte +251 -329
- package/dist/plot/sunburst/Sunburst.svelte.d.ts +2 -2
- package/dist/plot/sunburst/index.d.ts +1 -1
- package/dist/plot/sunburst/index.js +2 -1
- package/dist/plot/sunburst/render.d.ts +2 -2
- package/dist/plot/sunburst/render.js +47 -22
- package/dist/plot/sunburst/sunburst.d.ts +5 -1
- package/dist/plot/sunburst/sunburst.js +10 -3
- package/dist/plot/treemap/Treemap.svelte +907 -0
- package/dist/plot/treemap/Treemap.svelte.d.ts +84 -0
- package/dist/plot/treemap/index.d.ts +3 -0
- package/dist/plot/treemap/index.js +4 -0
- package/dist/plot/treemap/treemap.d.ts +26 -0
- package/dist/plot/treemap/treemap.js +99 -0
- package/dist/rdf/RdfPlot.svelte +22 -26
- package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
- package/dist/rdf/calc-rdf.js +4 -8
- package/dist/sanitize.js +1 -1
- package/dist/scene/bind-renderer.svelte.js +14 -6
- package/dist/settings.d.ts +19 -9
- package/dist/settings.js +77 -50
- package/dist/spectral/Bands.svelte +223 -230
- package/dist/spectral/BandsAndDos.svelte +11 -9
- package/dist/spectral/BrillouinBandsDos.svelte +19 -27
- package/dist/spectral/Dos.svelte +70 -73
- package/dist/spectral/helpers.d.ts +3 -3
- package/dist/spectral/helpers.js +25 -35
- package/dist/state.svelte.js +5 -18
- package/dist/structure/Arrow.svelte +5 -18
- package/dist/structure/ArrowInstances.svelte +160 -0
- package/dist/structure/ArrowInstances.svelte.d.ts +16 -0
- package/dist/structure/AtomLegend.svelte +115 -75
- package/dist/structure/AtomLegend.svelte.d.ts +1 -1
- package/dist/structure/Bond.svelte +31 -23
- package/dist/structure/CanvasTooltip.svelte +15 -3
- package/dist/structure/CellSelect.svelte +11 -26
- package/dist/structure/Cylinder.svelte +24 -40
- package/dist/structure/InstancedAtoms.svelte +114 -0
- package/dist/structure/InstancedAtoms.svelte.d.ts +15 -0
- package/dist/structure/Lattice.svelte +85 -149
- package/dist/structure/SiteLabels.svelte +122 -0
- package/dist/structure/SiteLabels.svelte.d.ts +18 -0
- package/dist/structure/Structure.svelte +473 -419
- package/dist/structure/Structure.svelte.d.ts +4 -2
- package/dist/structure/StructureCarousel.svelte +630 -0
- package/dist/structure/StructureCarousel.svelte.d.ts +19 -0
- package/dist/structure/StructureControls.svelte +157 -399
- package/dist/structure/StructureControls.svelte.d.ts +1 -1
- package/dist/structure/StructureExportPane.svelte +17 -21
- package/dist/structure/StructureInfoPane.svelte +72 -66
- package/dist/structure/StructureInfoPane.svelte.d.ts +1 -1
- package/dist/structure/StructureScene.svelte +467 -476
- package/dist/structure/StructureScene.svelte.d.ts +3 -1
- package/dist/structure/StructureViewport.svelte +386 -0
- package/dist/structure/StructureViewport.svelte.d.ts +63 -0
- package/dist/structure/atom-label-placement.d.ts +16 -12
- package/dist/structure/atom-label-placement.js +70 -37
- package/dist/structure/atom-properties.d.ts +2 -0
- package/dist/structure/atom-properties.js +104 -38
- package/dist/structure/bonding.d.ts +10 -3
- package/dist/structure/bonding.js +84 -28
- package/dist/structure/edit-history.d.ts +6 -0
- package/dist/structure/edit-history.js +27 -0
- package/dist/structure/export.d.ts +1 -0
- package/dist/structure/export.js +39 -31
- package/dist/structure/format-detect.d.ts +1 -0
- package/dist/structure/format-detect.js +22 -0
- package/dist/structure/geometry.d.ts +9 -0
- package/dist/structure/geometry.js +27 -0
- package/dist/structure/index.d.ts +16 -1
- package/dist/structure/index.js +13 -2
- package/dist/structure/measure.d.ts +1 -1
- package/dist/structure/measure.js +6 -12
- package/dist/structure/parse.d.ts +2 -1
- package/dist/structure/parse.js +243 -222
- package/dist/structure/partial-occupancy.js +4 -2
- package/dist/structure/pbc.js +78 -98
- package/dist/structure/polyhedra.d.ts +0 -1
- package/dist/structure/polyhedra.js +3 -18
- package/dist/structure/supercell.d.ts +1 -2
- package/dist/structure/supercell.js +7 -13
- package/dist/symmetry/SymmetryElements.svelte +11 -15
- package/dist/symmetry/SymmetryStats.svelte +56 -68
- package/dist/symmetry/WyckoffTable.svelte +5 -24
- package/dist/symmetry/cell-transform.js +1 -0
- package/dist/symmetry/index.d.ts +1 -0
- package/dist/symmetry/index.js +8 -2
- package/dist/symmetry/spacegroups.js +3 -2
- package/dist/table/HeatmapTable.svelte +1102 -365
- package/dist/table/HeatmapTable.svelte.d.ts +12 -2
- package/dist/table/ToggleMenu.svelte +5 -12
- package/dist/table/index.d.ts +21 -6
- package/dist/table/index.js +34 -21
- package/dist/theme/ThemeControl.svelte +16 -8
- package/dist/theme/index.d.ts +1 -5
- package/dist/theme/index.js +4 -10
- package/dist/theme/themes.mjs +14 -7
- package/dist/tooltip/KCoords.svelte +4 -1
- package/dist/tooltip/TooltipContent.svelte +2 -5
- package/dist/trajectory/Trajectory.svelte +515 -308
- package/dist/trajectory/Trajectory.svelte.d.ts +1 -1
- package/dist/trajectory/TrajectoryError.svelte +11 -8
- package/dist/trajectory/TrajectoryExportPane.svelte +14 -31
- package/dist/trajectory/TrajectoryInfoPane.svelte +85 -97
- package/dist/trajectory/extract.js +56 -34
- package/dist/trajectory/format-detect.js +11 -9
- package/dist/trajectory/frame-reader.d.ts +2 -0
- package/dist/trajectory/frame-reader.js +33 -29
- package/dist/trajectory/helpers.d.ts +2 -0
- package/dist/trajectory/helpers.js +18 -7
- package/dist/trajectory/index.d.ts +1 -0
- package/dist/trajectory/index.js +3 -0
- package/dist/trajectory/parse/h5-utils.d.ts +13 -0
- package/dist/trajectory/parse/h5-utils.js +109 -0
- package/dist/trajectory/parse/hdf5.d.ts +1 -1
- package/dist/trajectory/parse/hdf5.js +116 -106
- package/dist/trajectory/parse/index.d.ts +2 -3
- package/dist/trajectory/parse/index.js +17 -20
- package/dist/trajectory/parse/lammps.js +8 -12
- package/dist/trajectory/parse/vasp.js +10 -7
- package/dist/trajectory/parse/vaspout-electronic.d.ts +13 -0
- package/dist/trajectory/parse/vaspout-electronic.js +207 -0
- package/dist/trajectory/parse/vaspout-h5.d.ts +5 -0
- package/dist/trajectory/parse/vaspout-h5.js +284 -0
- package/dist/trajectory/parse/xyz.js +11 -7
- package/dist/trajectory/plotting.d.ts +8 -9
- package/dist/trajectory/plotting.js +99 -27
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +7 -0
- package/dist/xrd/XrdPlot.svelte +47 -61
- package/dist/xrd/broadening.js +2 -1
- package/dist/xrd/calc-xrd.js +2 -4
- package/dist/xrd/parse.d.ts +0 -1
- package/dist/xrd/parse.js +56 -73
- package/package.json +61 -33
- package/dist/api/mp.d.ts +0 -6
- package/dist/api/mp.js +0 -22
- package/dist/plot/sunburst/SunburstControls.svelte +0 -200
|
@@ -29,12 +29,7 @@
|
|
|
29
29
|
import TemperatureSlider from './TemperatureSlider.svelte'
|
|
30
30
|
import type { Point4D } from './thermodynamics'
|
|
31
31
|
import * as thermo from './thermodynamics'
|
|
32
|
-
import type {
|
|
33
|
-
ConvexHullEntry,
|
|
34
|
-
HighlightStyle,
|
|
35
|
-
HullFaceColorMode,
|
|
36
|
-
PhaseData,
|
|
37
|
-
} from './types'
|
|
32
|
+
import type { ConvexHullEntry, HighlightStyle, HullFaceColorMode, PhaseData } from './types'
|
|
38
33
|
import { MAGNETIC_ORDERING_CATEGORY } from './types'
|
|
39
34
|
import { compute_hull_stability } from './helpers'
|
|
40
35
|
|
|
@@ -61,9 +56,7 @@
|
|
|
61
56
|
),
|
|
62
57
|
element_colors = vesta_hex,
|
|
63
58
|
color_mode = $bindable(DEFAULTS.convex_hull.quaternary.color_mode),
|
|
64
|
-
color_scale = $bindable(
|
|
65
|
-
DEFAULTS.convex_hull.quaternary.color_scale as D3InterpolateName,
|
|
66
|
-
),
|
|
59
|
+
color_scale = $bindable(DEFAULTS.convex_hull.quaternary.color_scale as D3InterpolateName),
|
|
67
60
|
info_pane_open = $bindable(DEFAULTS.convex_hull.quaternary.info_pane_open),
|
|
68
61
|
controls_open = $bindable(DEFAULTS.convex_hull.quaternary.legend_pane_open),
|
|
69
62
|
max_hull_dist_show_phases = $bindable(
|
|
@@ -72,12 +65,8 @@
|
|
|
72
65
|
max_hull_dist_show_labels = $bindable(
|
|
73
66
|
DEFAULTS.convex_hull.quaternary.max_hull_dist_show_labels,
|
|
74
67
|
),
|
|
75
|
-
show_stable_labels = $bindable(
|
|
76
|
-
|
|
77
|
-
),
|
|
78
|
-
show_unstable_labels = $bindable(
|
|
79
|
-
DEFAULTS.convex_hull.quaternary.show_unstable_labels,
|
|
80
|
-
),
|
|
68
|
+
show_stable_labels = $bindable(DEFAULTS.convex_hull.quaternary.show_stable_labels),
|
|
69
|
+
show_unstable_labels = $bindable(DEFAULTS.convex_hull.quaternary.show_unstable_labels),
|
|
81
70
|
on_file_drop,
|
|
82
71
|
enable_click_selection = true,
|
|
83
72
|
enable_structure_preview = true,
|
|
@@ -96,9 +85,10 @@
|
|
|
96
85
|
children,
|
|
97
86
|
tooltip,
|
|
98
87
|
...rest
|
|
99
|
-
}: BaseConvexHullProps<ConvexHullEntry> &
|
|
100
|
-
|
|
101
|
-
|
|
88
|
+
}: BaseConvexHullProps<ConvexHullEntry> &
|
|
89
|
+
Hull3DProps & {
|
|
90
|
+
highlight_style?: HighlightStyle
|
|
91
|
+
} = $props()
|
|
102
92
|
|
|
103
93
|
const merged_controls = $derived({ ...default_controls, ...controls })
|
|
104
94
|
const controls_config = $derived(normalize_show_controls(show_controls))
|
|
@@ -111,7 +101,7 @@
|
|
|
111
101
|
|
|
112
102
|
// Reactive dark mode detection for canvas text color
|
|
113
103
|
let dark_mode = $state(is_dark_mode())
|
|
114
|
-
$effect(() => watch_dark_mode((dark) => dark_mode = dark))
|
|
104
|
+
$effect(() => watch_dark_mode((dark) => (dark_mode = dark)))
|
|
115
105
|
const text_color = $derived(helpers.get_canvas_text_color(dark_mode))
|
|
116
106
|
|
|
117
107
|
// Shared reactive data pipeline (temperature → gas → energy mode → hull data → threshold)
|
|
@@ -131,14 +121,11 @@
|
|
|
131
121
|
show_unstable: () => show_unstable,
|
|
132
122
|
entry_category: () => entry_category,
|
|
133
123
|
hidden_categories: () => hidden_categories,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
set_max_hull_dist_show_phases: (value) => max_hull_dist_show_phases = value,
|
|
140
|
-
set_stable_entries: (value) => stable_entries = value,
|
|
141
|
-
set_unstable_entries: (value) => unstable_entries = value,
|
|
124
|
+
keep_plot_entry: helpers.entry_within_hull_dist,
|
|
125
|
+
set_temperature: (next_temp) => (temperature = next_temp),
|
|
126
|
+
set_max_hull_dist_show_phases: (value) => (max_hull_dist_show_phases = value),
|
|
127
|
+
set_stable_entries: (value) => (stable_entries = value),
|
|
128
|
+
set_unstable_entries: (value) => (unstable_entries = value),
|
|
142
129
|
})
|
|
143
130
|
const merged_gas_config = $derived(hull_data.merged_gas_config)
|
|
144
131
|
const pd_data = $derived(hull_data.pd_data)
|
|
@@ -151,8 +138,9 @@
|
|
|
151
138
|
|
|
152
139
|
try {
|
|
153
140
|
// Get coords with formation energies, excluding entries that don't participate in hull
|
|
154
|
-
const coords = compute_4d_coords(pd_data.entries, elements)
|
|
155
|
-
|
|
141
|
+
const coords = compute_4d_coords(pd_data.entries, elements).filter(
|
|
142
|
+
(ent) => !ent.exclude_from_hull,
|
|
143
|
+
)
|
|
156
144
|
|
|
157
145
|
// Convert to 4D points for hull computation using barycentric coordinates (composition fractions)
|
|
158
146
|
const points_4d: Point4D[] = coords
|
|
@@ -192,22 +180,26 @@
|
|
|
192
180
|
if (
|
|
193
181
|
!Number.isFinite(entry.e_form_per_atom) ||
|
|
194
182
|
![entry.x, entry.y, entry.z].every(Number.isFinite)
|
|
195
|
-
)
|
|
183
|
+
)
|
|
184
|
+
return []
|
|
196
185
|
const amounts = elements.map((el) => entry.composition[el] || 0)
|
|
197
|
-
|
|
186
|
+
const total = amounts.reduce((sum, amt) => sum + amt, 0)
|
|
198
187
|
if (!(total > 0)) return []
|
|
199
|
-
|
|
188
|
+
const [x, y, z] = amounts.map((amt) => amt / total)
|
|
200
189
|
return [x, y, z].every(Number.isFinite)
|
|
201
190
|
? [{ idx, pt: { x, y, z, w: entry.e_form_per_atom ?? NaN } }]
|
|
202
191
|
: []
|
|
203
192
|
})
|
|
204
|
-
const raw_dists = thermo.compute_e_above_hull_4d(
|
|
193
|
+
const raw_dists = thermo.compute_e_above_hull_4d(
|
|
194
|
+
valid.map((item) => item.pt),
|
|
195
|
+
hull_4d,
|
|
196
|
+
)
|
|
205
197
|
const hull_map = new Map(valid.map((item, hull_idx) => [item.idx, raw_dists[hull_idx]]))
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
})
|
|
198
|
+
// missing/non-finite distance (no energy or point outside hull projection) -> unknown
|
|
199
|
+
return coords.map((entry, idx) => ({
|
|
200
|
+
...entry,
|
|
201
|
+
...compute_hull_stability(hull_map.get(idx), entry.exclude_from_hull),
|
|
202
|
+
}))
|
|
211
203
|
} catch (err) {
|
|
212
204
|
console.error(`Error computing quaternary coordinates:`, err)
|
|
213
205
|
return []
|
|
@@ -234,12 +226,12 @@
|
|
|
234
226
|
canvas: () => canvas,
|
|
235
227
|
wrapper: () => wrapper,
|
|
236
228
|
ctx: () => ctx,
|
|
237
|
-
set_ctx: (context) => ctx = context,
|
|
238
|
-
set_canvas_dims: (dims) => canvas_dims = dims,
|
|
229
|
+
set_ctx: (context) => (ctx = context),
|
|
230
|
+
set_canvas_dims: (dims) => (canvas_dims = dims),
|
|
239
231
|
visible_entries: () => hull_data.visible_entries,
|
|
240
232
|
plot_entries: () => plot_entries,
|
|
241
233
|
selected_entry: () => selected_entry,
|
|
242
|
-
set_selected_entry: (entry) => selected_entry = entry,
|
|
234
|
+
set_selected_entry: (entry) => (selected_entry = entry),
|
|
243
235
|
fullscreen: () => fullscreen,
|
|
244
236
|
enable_click_selection: () => enable_click_selection,
|
|
245
237
|
enable_structure_preview: () => enable_structure_preview,
|
|
@@ -248,7 +240,7 @@
|
|
|
248
240
|
on_file_drop: () => on_file_drop,
|
|
249
241
|
entry_category: () => entry_category,
|
|
250
242
|
zoom: () => camera.zoom,
|
|
251
|
-
set_zoom: (zoom) => camera.zoom = zoom,
|
|
243
|
+
set_zoom: (zoom) => (camera.zoom = zoom),
|
|
252
244
|
project_point: project_3d_point,
|
|
253
245
|
extract_structure: extract_structure_from_entry,
|
|
254
246
|
render_frame,
|
|
@@ -271,11 +263,11 @@
|
|
|
271
263
|
},
|
|
272
264
|
actions: () => ({
|
|
273
265
|
r: reset_camera,
|
|
274
|
-
b: () => color_mode = color_mode === `stability` ? `energy` : `stability
|
|
275
|
-
s: () => show_stable = !show_stable,
|
|
276
|
-
u: () => show_unstable = !show_unstable,
|
|
277
|
-
h: () => show_hull_faces = !show_hull_faces,
|
|
278
|
-
l: () => show_stable_labels = !show_stable_labels,
|
|
266
|
+
b: () => (color_mode = color_mode === `stability` ? `energy` : `stability`),
|
|
267
|
+
s: () => (show_stable = !show_stable),
|
|
268
|
+
u: () => (show_unstable = !show_unstable),
|
|
269
|
+
h: () => (show_hull_faces = !show_hull_faces),
|
|
270
|
+
l: () => (show_stable_labels = !show_stable_labels),
|
|
279
271
|
}),
|
|
280
272
|
})
|
|
281
273
|
const { render_once } = interactions
|
|
@@ -292,9 +284,7 @@
|
|
|
292
284
|
let pulse_opacity = $derived(0.3 + 0.4 * pulse.unit)
|
|
293
285
|
|
|
294
286
|
// Merge highlight style with defaults
|
|
295
|
-
const merged_highlight_style = $derived(
|
|
296
|
-
helpers.merge_highlight_style(highlight_style),
|
|
297
|
-
)
|
|
287
|
+
const merged_highlight_style = $derived(helpers.merge_highlight_style(highlight_style))
|
|
298
288
|
|
|
299
289
|
// Helper to check if entry is highlighted
|
|
300
290
|
const is_highlighted = (entry: ConvexHullEntry): boolean =>
|
|
@@ -347,8 +337,7 @@
|
|
|
347
337
|
show_unstable_labels = DEFAULTS.convex_hull.quaternary.show_unstable_labels
|
|
348
338
|
// Use auto-computed threshold based on entry count instead of static default
|
|
349
339
|
max_hull_dist_show_phases = hull_data.auto_default_threshold
|
|
350
|
-
max_hull_dist_show_labels =
|
|
351
|
-
DEFAULTS.convex_hull.quaternary.max_hull_dist_show_labels
|
|
340
|
+
max_hull_dist_show_labels = DEFAULTS.convex_hull.quaternary.max_hull_dist_show_labels
|
|
352
341
|
show_hull_faces = DEFAULTS.convex_hull.quaternary.show_hull_faces
|
|
353
342
|
hull_face_color = DEFAULTS.convex_hull.quaternary.hull_face_color
|
|
354
343
|
hull_face_opacity = DEFAULTS.convex_hull.quaternary.hull_face_opacity
|
|
@@ -366,7 +355,7 @@
|
|
|
366
355
|
|
|
367
356
|
// Cache energy color scale per frame/setting
|
|
368
357
|
const energy_color_scale = $derived.by(() =>
|
|
369
|
-
helpers.get_energy_color_scale(color_mode, color_scale, plot_entries)
|
|
358
|
+
helpers.get_energy_color_scale(color_mode, color_scale, plot_entries),
|
|
370
359
|
)
|
|
371
360
|
|
|
372
361
|
// Convex hull statistics - compute internally and expose via bindable prop
|
|
@@ -527,30 +516,10 @@
|
|
|
527
516
|
const [p0, p1, p2, p3] = tet.vertices
|
|
528
517
|
|
|
529
518
|
// Convert barycentric coordinates to tetrahedral 3D coordinates
|
|
530
|
-
const tet0 = barycentric_to_tetrahedral([
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
1 - p0.x - p0.y - p0.z,
|
|
535
|
-
])
|
|
536
|
-
const tet1 = barycentric_to_tetrahedral([
|
|
537
|
-
p1.x,
|
|
538
|
-
p1.y,
|
|
539
|
-
p1.z,
|
|
540
|
-
1 - p1.x - p1.y - p1.z,
|
|
541
|
-
])
|
|
542
|
-
const tet2 = barycentric_to_tetrahedral([
|
|
543
|
-
p2.x,
|
|
544
|
-
p2.y,
|
|
545
|
-
p2.z,
|
|
546
|
-
1 - p2.x - p2.y - p2.z,
|
|
547
|
-
])
|
|
548
|
-
const tet3 = barycentric_to_tetrahedral([
|
|
549
|
-
p3.x,
|
|
550
|
-
p3.y,
|
|
551
|
-
p3.z,
|
|
552
|
-
1 - p3.x - p3.y - p3.z,
|
|
553
|
-
])
|
|
519
|
+
const tet0 = barycentric_to_tetrahedral([p0.x, p0.y, p0.z, 1 - p0.x - p0.y - p0.z])
|
|
520
|
+
const tet1 = barycentric_to_tetrahedral([p1.x, p1.y, p1.z, 1 - p1.x - p1.y - p1.z])
|
|
521
|
+
const tet2 = barycentric_to_tetrahedral([p2.x, p2.y, p2.z, 1 - p2.x - p2.y - p2.z])
|
|
522
|
+
const tet3 = barycentric_to_tetrahedral([p3.x, p3.y, p3.z, 1 - p3.x - p3.y - p3.z])
|
|
554
523
|
|
|
555
524
|
// Project to 2D screen space
|
|
556
525
|
const proj0 = project_3d_point(tet0.x, tet0.y, tet0.z)
|
|
@@ -564,8 +533,14 @@
|
|
|
564
533
|
(p0.x + p1.x + p2.x + p3.x) / 4,
|
|
565
534
|
(p0.y + p1.y + p2.y + p3.y) / 4,
|
|
566
535
|
(p0.z + p1.z + p2.z + p3.z) / 4,
|
|
567
|
-
(
|
|
568
|
-
|
|
536
|
+
(1 -
|
|
537
|
+
p0.x -
|
|
538
|
+
p0.y -
|
|
539
|
+
p0.z +
|
|
540
|
+
(1 - p1.x - p1.y - p1.z) +
|
|
541
|
+
(1 - p2.x - p2.y - p2.z) +
|
|
542
|
+
(1 - p3.x - p3.y - p3.z)) /
|
|
543
|
+
4,
|
|
569
544
|
]
|
|
570
545
|
|
|
571
546
|
// Each tetrahedron has 4 triangular faces
|
|
@@ -607,7 +582,7 @@
|
|
|
607
582
|
let min_w = 0
|
|
608
583
|
if (hull_face_color_mode === `formation_energy`) {
|
|
609
584
|
const all_avg_w = triangles.map((tri) => tri.avg_w)
|
|
610
|
-
min_w =
|
|
585
|
+
min_w = helpers.array_min(all_avg_w)
|
|
611
586
|
energy_face_scale = helpers.get_energy_color_scale(
|
|
612
587
|
`energy`,
|
|
613
588
|
color_scale,
|
|
@@ -625,7 +600,7 @@
|
|
|
625
600
|
}
|
|
626
601
|
if (hull_face_color_mode === `dominant_element`) {
|
|
627
602
|
// Find element with highest fraction
|
|
628
|
-
const max_idx = tri.centroid_bary.indexOf(
|
|
603
|
+
const max_idx = tri.centroid_bary.indexOf(helpers.array_max(tri.centroid_bary))
|
|
629
604
|
const el = elements[max_idx]
|
|
630
605
|
return element_colors[el] ?? `#888888`
|
|
631
606
|
}
|
|
@@ -639,9 +614,10 @@
|
|
|
639
614
|
for (const tri of triangles) {
|
|
640
615
|
const [v0, v1, v2] = tri.vertices
|
|
641
616
|
// Uniform mode uses variable opacity; other modes use fixed opacity
|
|
642
|
-
const alpha =
|
|
643
|
-
|
|
644
|
-
|
|
617
|
+
const alpha =
|
|
618
|
+
hull_face_color_mode === `uniform`
|
|
619
|
+
? (norm_alpha?.(tri.avg_w) ?? hull_face_opacity)
|
|
620
|
+
: hull_face_opacity
|
|
645
621
|
const face_color = get_face_color(tri)
|
|
646
622
|
|
|
647
623
|
ctx.save()
|
|
@@ -683,9 +659,12 @@
|
|
|
683
659
|
.filter((entry) => {
|
|
684
660
|
if (entry.is_element) return false
|
|
685
661
|
const is_stable = helpers.entry_is_stable(entry)
|
|
686
|
-
return (
|
|
687
|
-
(
|
|
662
|
+
return (
|
|
663
|
+
(is_stable && show_stable_labels) ||
|
|
664
|
+
(!is_stable &&
|
|
665
|
+
show_unstable_labels &&
|
|
688
666
|
(entry.e_above_hull ?? 0) <= max_hull_dist_show_labels)
|
|
667
|
+
)
|
|
689
668
|
}),
|
|
690
669
|
)
|
|
691
670
|
|
|
@@ -761,7 +740,7 @@
|
|
|
761
740
|
|
|
762
741
|
<div
|
|
763
742
|
{...rest}
|
|
764
|
-
class=
|
|
743
|
+
class={[`convex-hull-4d`, rest.class]}
|
|
765
744
|
class:dragover={interactions.drag_over}
|
|
766
745
|
style={`${style}; ${rest.style ?? ``}`}
|
|
767
746
|
data-has-selection={selected_entry !== null}
|
|
@@ -776,11 +755,11 @@
|
|
|
776
755
|
aria-label="Convex hull visualization"
|
|
777
756
|
>
|
|
778
757
|
{@render children?.({
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
758
|
+
stable_entries,
|
|
759
|
+
unstable_entries,
|
|
760
|
+
highlighted_entries,
|
|
761
|
+
selected_entry,
|
|
762
|
+
})}
|
|
784
763
|
<h3 style="position: absolute; left: 1em; top: 1ex; margin: 0">
|
|
785
764
|
{@html sanitize_html(merged_controls.title || phase_stats?.chemical_system || ``)}
|
|
786
765
|
</h3>
|
|
@@ -853,7 +832,10 @@
|
|
|
853
832
|
/>
|
|
854
833
|
|
|
855
834
|
{#if hull_data.has_temp_data && temperature !== undefined}
|
|
856
|
-
<TemperatureSlider
|
|
835
|
+
<TemperatureSlider
|
|
836
|
+
available_temperatures={hull_data.available_temperatures}
|
|
837
|
+
bind:temperature
|
|
838
|
+
/>
|
|
857
839
|
{/if}
|
|
858
840
|
|
|
859
841
|
{#if hull_data.gas_analysis.has_gas_dependent_elements && merged_gas_config}
|
|
@@ -863,7 +845,6 @@
|
|
|
863
845
|
temperature={temperature ?? 300}
|
|
864
846
|
/>
|
|
865
847
|
{/if}
|
|
866
|
-
|
|
867
848
|
</div>
|
|
868
849
|
|
|
869
850
|
<style>
|
|
@@ -3,6 +3,6 @@ import type { ConvexHullEntry, HighlightStyle } from './types';
|
|
|
3
3
|
type $$ComponentProps = BaseConvexHullProps<ConvexHullEntry> & Hull3DProps & {
|
|
4
4
|
highlight_style?: HighlightStyle;
|
|
5
5
|
};
|
|
6
|
-
declare const ConvexHull4D: import("svelte").Component<$$ComponentProps, {}, "
|
|
6
|
+
declare const ConvexHull4D: import("svelte").Component<$$ComponentProps, {}, "fullscreen" | "wrapper" | "controls_open" | "color_scale" | "info_pane_open" | "temperature" | "show_hull_faces" | "hull_face_opacity" | "hull_face_color_mode" | "color_mode" | "show_stable" | "show_unstable" | "show_stable_labels" | "show_unstable_labels" | "max_hull_dist_show_phases" | "max_hull_dist_show_labels" | "hidden_categories" | "energy_source_mode" | "stable_entries" | "unstable_entries" | "phase_stats" | "highlighted_entries" | "selected_entry" | "gas_pressures">;
|
|
7
7
|
type ConvexHull4D = ReturnType<typeof ConvexHull4D>;
|
|
8
8
|
export default ConvexHull4D;
|
|
@@ -59,32 +59,30 @@
|
|
|
59
59
|
max_hull_dist_show_phases = $bindable(0),
|
|
60
60
|
max_hull_dist_show_labels = $bindable(0.1),
|
|
61
61
|
energy_source_mode = $bindable(`precomputed`),
|
|
62
|
-
}:
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
& Pick<ComponentProps<typeof ConvexHullInfoPane>, `phase_stats` | `label_threshold`>
|
|
87
|
-
& {
|
|
62
|
+
}: Pick<
|
|
63
|
+
ControlsProps,
|
|
64
|
+
| `camera`
|
|
65
|
+
| `merged_controls`
|
|
66
|
+
| `stable_entries`
|
|
67
|
+
| `unstable_entries`
|
|
68
|
+
| `color_mode`
|
|
69
|
+
| `color_scale`
|
|
70
|
+
| `show_stable`
|
|
71
|
+
| `show_unstable`
|
|
72
|
+
| `entry_category`
|
|
73
|
+
| `hidden_categories`
|
|
74
|
+
| `show_stable_labels`
|
|
75
|
+
| `show_unstable_labels`
|
|
76
|
+
| `max_hull_dist_show_phases`
|
|
77
|
+
| `max_hull_dist_show_labels`
|
|
78
|
+
| `energy_source_mode`
|
|
79
|
+
| `controls_open`
|
|
80
|
+
| `show_hull_faces`
|
|
81
|
+
| `hull_face_color`
|
|
82
|
+
| `hull_face_opacity`
|
|
83
|
+
| `hull_face_color_mode`
|
|
84
|
+
> &
|
|
85
|
+
Pick<ComponentProps<typeof ConvexHullInfoPane>, `phase_stats` | `label_threshold`> & {
|
|
88
86
|
interactions: ReturnType<typeof create_canvas_interactions>
|
|
89
87
|
hull_data: ReturnType<typeof create_hull_data_pipeline<ConvexHullEntry>>
|
|
90
88
|
controls_config: ShowControlsState
|
|
@@ -107,12 +105,7 @@
|
|
|
107
105
|
{#if controls_config.mode !== `never`}
|
|
108
106
|
<section class="control-buttons {controls_config.class}">
|
|
109
107
|
{#if controls_config.visible(`reset`)}
|
|
110
|
-
<button
|
|
111
|
-
type="button"
|
|
112
|
-
onclick={reset_all}
|
|
113
|
-
title={reset_title}
|
|
114
|
-
class="reset-camera-btn"
|
|
115
|
-
>
|
|
108
|
+
<button type="button" onclick={reset_all} title={reset_title} class="reset-camera-btn">
|
|
116
109
|
<Icon icon="Reset" />
|
|
117
110
|
</button>
|
|
118
111
|
{/if}
|
|
@@ -159,14 +152,14 @@
|
|
|
159
152
|
{merged_controls}
|
|
160
153
|
toggle_props={{ class: `legend-controls-btn` }}
|
|
161
154
|
{show_hull_faces}
|
|
162
|
-
on_hull_faces_change={(value: boolean) => show_hull_faces = value}
|
|
155
|
+
on_hull_faces_change={(value: boolean) => (show_hull_faces = value)}
|
|
163
156
|
{hull_face_color}
|
|
164
|
-
on_hull_face_color_change={(value: string) => hull_face_color = value}
|
|
157
|
+
on_hull_face_color_change={(value: string) => (hull_face_color = value)}
|
|
165
158
|
{hull_face_opacity}
|
|
166
|
-
on_hull_face_opacity_change={(value: number) => hull_face_opacity = value}
|
|
159
|
+
on_hull_face_opacity_change={(value: number) => (hull_face_opacity = value)}
|
|
167
160
|
{hull_face_color_mode}
|
|
168
161
|
on_hull_face_color_mode_change={(value: HullFaceColorMode) =>
|
|
169
|
-
|
|
162
|
+
(hull_face_color_mode = value)}
|
|
170
163
|
bind:energy_source_mode
|
|
171
164
|
has_precomputed_e_form={hull_data.has_precomputed_e_form}
|
|
172
165
|
can_compute_e_form={hull_data.can_compute_e_form}
|
|
@@ -181,8 +174,7 @@
|
|
|
181
174
|
{#if interactions.hover_data}
|
|
182
175
|
{@const { entry, position } = interactions.hover_data}
|
|
183
176
|
{@const entry_highlight = is_highlighted(entry) ? merged_highlight_style : undefined}
|
|
184
|
-
{@const tooltip_style =
|
|
185
|
-
`z-index: ${CONVEX_HULL_STYLE.z_index.tooltip}; backdrop-filter: blur(4px);
|
|
177
|
+
{@const tooltip_style = `z-index: ${CONVEX_HULL_STYLE.z_index.tooltip}; backdrop-filter: blur(4px);
|
|
186
178
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);`}
|
|
187
179
|
<PlotTooltip
|
|
188
180
|
x={position.x}
|
|
@@ -209,7 +201,11 @@
|
|
|
209
201
|
/>
|
|
210
202
|
|
|
211
203
|
<!-- z-index 1: above auto-stacked siblings after the chrome (3D gizmo, gas controls), below z-2 sliders -->
|
|
212
|
-
<DragOverlay
|
|
204
|
+
<DragOverlay
|
|
205
|
+
visible={interactions.drag_over}
|
|
206
|
+
message="Drop JSON file to load phase diagram data"
|
|
207
|
+
style="z-index: 1"
|
|
208
|
+
/>
|
|
213
209
|
|
|
214
210
|
{#if interactions.modal_open && interactions.selected_structure}
|
|
215
211
|
<StructurePopup
|
|
@@ -260,7 +256,7 @@
|
|
|
260
256
|
color: var(--text-color, currentColor);
|
|
261
257
|
transition: background-color 0.2s;
|
|
262
258
|
display: flex;
|
|
263
|
-
font-size: clamp(0.
|
|
259
|
+
font-size: var(--ctrl-btn-icon-size, clamp(0.7rem, 2cqmin, 0.85rem));
|
|
264
260
|
}
|
|
265
261
|
.control-buttons :global(button):hover {
|
|
266
262
|
background-color: color-mix(in srgb, currentColor 8%, transparent);
|