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
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
import type { Label, RowData } from '../table'
|
|
13
13
|
import HeatmapTable from '../table/HeatmapTable.svelte'
|
|
14
14
|
import type { HTMLAttributes } from 'svelte/elements'
|
|
15
|
-
import { SvelteMap
|
|
15
|
+
import { SvelteMap } from 'svelte/reactivity'
|
|
16
|
+
import { create_clipboard_feedback } from '../overlays'
|
|
16
17
|
import type {
|
|
17
18
|
ConvexHullEntry,
|
|
18
19
|
EntryCategoryConfig,
|
|
@@ -36,54 +37,46 @@
|
|
|
36
37
|
min_n_elements = $bindable(1),
|
|
37
38
|
entry_href,
|
|
38
39
|
...rest
|
|
39
|
-
}:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
entry_href?: (entry: ConvexHullEntry) => string | null
|
|
61
|
-
} = $props()
|
|
40
|
+
}: HTMLAttributes<HTMLDivElement> & {
|
|
41
|
+
phase_stats: PhaseStats | null
|
|
42
|
+
stable_entries: ConvexHullEntry[]
|
|
43
|
+
unstable_entries: ConvexHullEntry[]
|
|
44
|
+
show_stable?: boolean
|
|
45
|
+
show_unstable?: boolean
|
|
46
|
+
// Categorical classification + hidden values (excluded from shown counts/table)
|
|
47
|
+
entry_category?: EntryCategoryConfig | null
|
|
48
|
+
hidden_categories?: string[]
|
|
49
|
+
// 'toggle' shows stats/table with toggle buttons (default)
|
|
50
|
+
// 'side-by-side' shows both stats and table next to each other without toggle
|
|
51
|
+
layout?: `toggle` | `side-by-side`
|
|
52
|
+
// Called when a table row is clicked, with the corresponding entry
|
|
53
|
+
on_entry_click?: (entry: ConvexHullEntry) => void
|
|
54
|
+
// Entry ID to highlight in the table (e.g. current material on detail page)
|
|
55
|
+
highlighted_entry_id?: string
|
|
56
|
+
// Minimum number of elements filter for table (bindable for URL sync)
|
|
57
|
+
min_n_elements?: number
|
|
58
|
+
// Generate URL for an entry (makes ID column a clickable link)
|
|
59
|
+
entry_href?: (entry: ConvexHullEntry) => string | null
|
|
60
|
+
} = $props()
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
const { copied, copy } = create_clipboard_feedback()
|
|
64
63
|
let view_mode = $state<`stats` | `table`>(`stats`)
|
|
65
64
|
// Formula filter: when set, table shows only entries with this reduced formula
|
|
66
65
|
let formula_filter = $state(``)
|
|
67
|
-
const table_scroll_height =
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
const table_scroll_height = `var(--hull-stats-table-height, calc(var(--hull-stats-table-row-height, 2.35rem) * 10 + var(--hull-stats-table-header-height, 3.5rem)))`
|
|
67
|
+
const table_scroll_style = $derived(
|
|
68
|
+
layout === `side-by-side`
|
|
69
|
+
? `flex: 1 1 0; height: ${table_scroll_height}; min-height: ${table_scroll_height}; max-width: 100%; overflow: auto`
|
|
70
|
+
: `height: ${table_scroll_height}; min-height: ${table_scroll_height}; max-height: var(--hull-stats-max-height, 70vh); max-width: 100%; overflow: auto`,
|
|
72
71
|
)
|
|
73
|
-
const table_root_style = $derived(
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
const table_root_style = $derived(
|
|
73
|
+
layout === `side-by-side`
|
|
74
|
+
? `flex: 1 1 0; min-height: ${table_scroll_height}; margin-inline: 0`
|
|
75
|
+
: `min-width: 0; margin-inline: 0`,
|
|
76
76
|
)
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
await navigator.clipboard.writeText(`${label}: ${value}`)
|
|
81
|
-
copied_items.add(key)
|
|
82
|
-
setTimeout(() => copied_items.delete(key), 1000)
|
|
83
|
-
} catch (error) {
|
|
84
|
-
console.error(`Failed to copy to clipboard:`, error)
|
|
85
|
-
}
|
|
86
|
-
}
|
|
78
|
+
const copy_to_clipboard = (label: string, value: string, key: string): Promise<void> =>
|
|
79
|
+
copy(`${label}: ${value}`, key)
|
|
87
80
|
function handle_copy_keydown(
|
|
88
81
|
event: KeyboardEvent,
|
|
89
82
|
label: string,
|
|
@@ -99,13 +92,15 @@
|
|
|
99
92
|
let all_entries = $derived([...stable_entries, ...unstable_entries])
|
|
100
93
|
// show_stable/show_unstable respect the caller's partition; pass show flags as true
|
|
101
94
|
// so filter_visible only applies the category filter on top
|
|
102
|
-
let shown_entries = $derived(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
95
|
+
let shown_entries = $derived(
|
|
96
|
+
filter_visible(
|
|
97
|
+
[...(show_stable ? stable_entries : []), ...(show_unstable ? unstable_entries : [])],
|
|
98
|
+
true,
|
|
99
|
+
true,
|
|
100
|
+
entry_category,
|
|
101
|
+
hidden_categories,
|
|
102
|
+
),
|
|
103
|
+
)
|
|
109
104
|
|
|
110
105
|
// Static arity labels for phase breakdown display
|
|
111
106
|
const arity_types: [string, PhaseArityField, number][] = [
|
|
@@ -126,21 +121,25 @@
|
|
|
126
121
|
} as const
|
|
127
122
|
|
|
128
123
|
// Prepare histogram data for formation energies and hull distances
|
|
129
|
-
let e_form_data = $derived([
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
124
|
+
let e_form_data = $derived([
|
|
125
|
+
{
|
|
126
|
+
x: [] as number[],
|
|
127
|
+
y: all_entries
|
|
128
|
+
.map((entry) => entry.e_form_per_atom ?? entry.energy_per_atom)
|
|
129
|
+
.filter((val): val is number => val !== undefined && isFinite(val)),
|
|
130
|
+
label: `Formation Energy`,
|
|
131
|
+
},
|
|
132
|
+
])
|
|
136
133
|
|
|
137
|
-
let hull_distance_data = $derived([
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
134
|
+
let hull_distance_data = $derived([
|
|
135
|
+
{
|
|
136
|
+
x: [] as number[],
|
|
137
|
+
y: all_entries
|
|
138
|
+
.map((entry) => entry.e_above_hull)
|
|
139
|
+
.filter((val): val is number => val !== undefined && isFinite(val)),
|
|
140
|
+
label: `E above hull`,
|
|
141
|
+
},
|
|
142
|
+
])
|
|
144
143
|
|
|
145
144
|
let pane_data = $derived.by(() => {
|
|
146
145
|
if (!phase_stats) return []
|
|
@@ -160,8 +159,8 @@
|
|
|
160
159
|
// Only show phase types that exist or are within the max_arity
|
|
161
160
|
// used when computing stats (respects zeroed-out counts)
|
|
162
161
|
...arity_types
|
|
163
|
-
.filter(
|
|
164
|
-
phase_stats[field] > 0 || phase_stats.max_arity >= arity
|
|
162
|
+
.filter(
|
|
163
|
+
([, field, arity]) => phase_stats[field] > 0 || phase_stats.max_arity >= arity,
|
|
165
164
|
)
|
|
166
165
|
.map(([display, field]) => ({
|
|
167
166
|
label: `${display} phases`,
|
|
@@ -180,34 +179,38 @@
|
|
|
180
179
|
},
|
|
181
180
|
{
|
|
182
181
|
label: `Unstable phases`,
|
|
183
|
-
value: `${format_num(phase_stats.unstable)} (${
|
|
184
|
-
pct(phase_stats.unstable)
|
|
185
|
-
})`,
|
|
182
|
+
value: `${format_num(phase_stats.unstable)} (${pct(phase_stats.unstable)})`,
|
|
186
183
|
key: `unstable-phases`,
|
|
187
184
|
},
|
|
188
185
|
],
|
|
189
186
|
},
|
|
190
187
|
{
|
|
191
188
|
title: `E<sub>form</sub> distribution`,
|
|
192
|
-
items: [
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
189
|
+
items: [
|
|
190
|
+
{
|
|
191
|
+
label: `Min / avg / max (eV/atom)`,
|
|
192
|
+
value: [
|
|
193
|
+
phase_stats.energy_range.min,
|
|
194
|
+
phase_stats.energy_range.avg,
|
|
195
|
+
phase_stats.energy_range.max,
|
|
196
|
+
]
|
|
197
|
+
.map((val) => format_num(val, `.3f`))
|
|
198
|
+
.join(` / `),
|
|
199
|
+
key: `formation-energy`,
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
title: `E<sub>above hull</sub> distribution`,
|
|
205
|
-
items: [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
.
|
|
209
|
-
|
|
210
|
-
|
|
205
|
+
items: [
|
|
206
|
+
{
|
|
207
|
+
label: `Max / avg (eV/atom)`,
|
|
208
|
+
value: [phase_stats.hull_distance.max, phase_stats.hull_distance.avg]
|
|
209
|
+
.map((val) => format_num(val, `.3f`))
|
|
210
|
+
.join(` / `),
|
|
211
|
+
key: `hull-distance`,
|
|
212
|
+
},
|
|
213
|
+
],
|
|
211
214
|
},
|
|
212
215
|
]
|
|
213
216
|
})
|
|
@@ -220,9 +223,9 @@
|
|
|
220
223
|
// Count entries containing each pair
|
|
221
224
|
const pair_counts = new SvelteMap<string, number>()
|
|
222
225
|
for (const entry of all_entries) {
|
|
223
|
-
const active =
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
const active = (
|
|
227
|
+
Object.keys(entry.composition) as (keyof typeof entry.composition)[]
|
|
228
|
+
).filter((el) => (entry.composition[el] ?? 0) > 0)
|
|
226
229
|
// Count all pairs present in this entry
|
|
227
230
|
for (let idx_a = 0; idx_a < active.length; idx_a++) {
|
|
228
231
|
for (let idx_b = idx_a + 1; idx_b < active.length; idx_b++) {
|
|
@@ -236,12 +239,11 @@
|
|
|
236
239
|
elements.slice(idx_a + 1).map((el_b) => {
|
|
237
240
|
const key = [el_a, el_b].sort().join(`-`)
|
|
238
241
|
return { pair: key, count: pair_counts.get(key) ?? 0 }
|
|
239
|
-
})
|
|
242
|
+
}),
|
|
240
243
|
)
|
|
241
244
|
})
|
|
242
245
|
let subsystem_coverage_summary = $derived(
|
|
243
|
-
subsystem_coverage?.map(({ pair, count }) => `${pair}: ${count}`).join(` | `) ??
|
|
244
|
-
null,
|
|
246
|
+
subsystem_coverage?.map(({ pair, count }) => `${pair}: ${count}`).join(` | `) ?? null,
|
|
245
247
|
)
|
|
246
248
|
|
|
247
249
|
// Table view: visible entries filtered by min element count and formula
|
|
@@ -251,13 +253,12 @@
|
|
|
251
253
|
if (
|
|
252
254
|
active_formula_filter &&
|
|
253
255
|
composition_key(entry.composition) !== active_formula_filter
|
|
254
|
-
)
|
|
256
|
+
)
|
|
257
|
+
return false
|
|
255
258
|
return true
|
|
256
259
|
}),
|
|
257
260
|
)
|
|
258
|
-
let has_raw = $derived(
|
|
259
|
-
visible_entries.some((entry) => entry.energy_per_atom !== undefined),
|
|
260
|
-
)
|
|
261
|
+
let has_raw = $derived(visible_entries.some((entry) => entry.energy_per_atom !== undefined))
|
|
261
262
|
let has_ids = $derived(visible_entries.some((entry) => entry.entry_id))
|
|
262
263
|
let max_n_el = $derived(
|
|
263
264
|
all_entries.reduce((max, entry) => Math.max(max, get_arity(entry)), 1),
|
|
@@ -285,7 +286,7 @@
|
|
|
285
286
|
// stoichiometric input before parsing/reordering.
|
|
286
287
|
const normalize_formula_markup = (formula: string): string =>
|
|
287
288
|
unescape_html(formula)
|
|
288
|
-
.replaceAll(/<sub>\s*([^<]+?)\s*<\/sub>/gi, `$1`)
|
|
289
|
+
.replaceAll(/<sub>\s*(?<content>[^<]+?)\s*<\/sub>/gi, `$1`)
|
|
289
290
|
.replaceAll(/<[^>]+>/g, ``)
|
|
290
291
|
.replaceAll(/\s+/g, ``)
|
|
291
292
|
const sanitize_href = (href: string | null | undefined): string | null => {
|
|
@@ -317,9 +318,7 @@
|
|
|
317
318
|
let has_polymorphs = $derived(poly_formulas.length > 0)
|
|
318
319
|
let active_formula_filter = $derived.by(() => {
|
|
319
320
|
if (!formula_filter || !has_polymorphs) return ``
|
|
320
|
-
return poly_formulas.some(([formula]) => formula === formula_filter)
|
|
321
|
-
? formula_filter
|
|
322
|
-
: ``
|
|
321
|
+
return poly_formulas.some(([formula]) => formula === formula_filter) ? formula_filter : ``
|
|
323
322
|
})
|
|
324
323
|
$effect(() => {
|
|
325
324
|
if (formula_filter && formula_filter !== active_formula_filter) {
|
|
@@ -331,12 +330,11 @@
|
|
|
331
330
|
let { table_data, entry_by_row } = $derived.by(() => {
|
|
332
331
|
const map = new WeakMap<RowData, ConvexHullEntry>()
|
|
333
332
|
const rows = visible_entries.map((entry, idx) => {
|
|
334
|
-
const n_atoms = Object.values(entry.composition).reduce(
|
|
335
|
-
(sum, count) => sum + count,
|
|
336
|
-
0,
|
|
337
|
-
)
|
|
333
|
+
const n_atoms = Object.values(entry.composition).reduce((sum, count) => sum + count, 0)
|
|
338
334
|
const on_hull = is_on_hull(entry)
|
|
339
|
-
const formula_source =
|
|
335
|
+
const formula_source =
|
|
336
|
+
entry.reduced_formula ??
|
|
337
|
+
entry.name ??
|
|
340
338
|
get_alphabetical_formula(entry.composition, true, ``)
|
|
341
339
|
const normalized_formula = normalize_formula_markup(formula_source)
|
|
342
340
|
const formatted_formula = get_electro_neg_formula(normalized_formula)
|
|
@@ -344,11 +342,12 @@
|
|
|
344
342
|
// Match by entry_id or common data fields (mat_id, structure_id)
|
|
345
343
|
// since entry_id may be wrapped in HTML (e.g. <a> tags)
|
|
346
344
|
const entry_data = entry.data as Record<string, unknown> | undefined
|
|
347
|
-
const is_highlighted = Boolean(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
345
|
+
const is_highlighted = Boolean(
|
|
346
|
+
highlighted_entry_id &&
|
|
347
|
+
(entry.entry_id === highlighted_entry_id ||
|
|
348
|
+
entry_data?.mat_id === highlighted_entry_id ||
|
|
349
|
+
entry_data?.structure_id === highlighted_entry_id),
|
|
350
|
+
)
|
|
352
351
|
const row: RowData = {
|
|
353
352
|
'#': sort_span(idx + 1, `${idx + 1}`),
|
|
354
353
|
Formula: on_hull ? `<strong>${formula_html}</strong>` : formula_html,
|
|
@@ -359,11 +358,12 @@
|
|
|
359
358
|
if (has_ids) {
|
|
360
359
|
const safe_href = sanitize_href(entry_href?.(entry))
|
|
361
360
|
const safe_id = entry.entry_id ? escape_html(entry.entry_id) : undefined
|
|
362
|
-
row.ID =
|
|
363
|
-
|
|
364
|
-
escape_html(
|
|
365
|
-
|
|
366
|
-
|
|
361
|
+
row.ID =
|
|
362
|
+
safe_href && safe_id
|
|
363
|
+
? `<a href="${escape_html(
|
|
364
|
+
safe_href,
|
|
365
|
+
)}" target="_blank" rel="noopener">${safe_id}</a>`
|
|
366
|
+
: safe_id
|
|
367
367
|
}
|
|
368
368
|
if (has_polymorphs) {
|
|
369
369
|
const comp_key = composition_key(entry.composition)
|
|
@@ -374,8 +374,7 @@
|
|
|
374
374
|
row[`N<sub>at</sub>`] = n_atoms
|
|
375
375
|
// Highlight row for current material
|
|
376
376
|
if (is_highlighted) {
|
|
377
|
-
row.style =
|
|
378
|
-
`background: color-mix(in srgb, var(--hull-stable-color, #22c55e) 15%, transparent)`
|
|
377
|
+
row.style = `background: color-mix(in srgb, var(--hull-stable-color, #22c55e) 15%, transparent)`
|
|
379
378
|
}
|
|
380
379
|
map.set(row, entry)
|
|
381
380
|
return row
|
|
@@ -388,60 +387,59 @@
|
|
|
388
387
|
if (entry) on_entry_click?.(entry)
|
|
389
388
|
}
|
|
390
389
|
|
|
391
|
-
let table_columns: Label[] = $derived(
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
)
|
|
390
|
+
let table_columns: Label[] = $derived([
|
|
391
|
+
{ label: `#`, color_scale: null, description: `Row number` },
|
|
392
|
+
{ label: `Formula`, color_scale: null },
|
|
393
|
+
{
|
|
394
|
+
label: `E<sub>hull</sub>`,
|
|
395
|
+
better: `lower`,
|
|
396
|
+
color_scale: `interpolateRdYlGn`,
|
|
397
|
+
format: `.4f`,
|
|
398
|
+
description: `Energy above convex hull (eV/atom)`,
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
label: `E<sub>form</sub>`,
|
|
402
|
+
better: `lower`,
|
|
403
|
+
color_scale: `interpolateBlues`,
|
|
404
|
+
format: `.4f`,
|
|
405
|
+
description: `Formation energy (eV/atom)`,
|
|
406
|
+
},
|
|
407
|
+
...(has_raw
|
|
408
|
+
? [
|
|
409
|
+
{
|
|
410
|
+
label: `E<sub>raw</sub>`,
|
|
411
|
+
color_scale: `interpolateCool` as const,
|
|
412
|
+
format: `.4f`,
|
|
413
|
+
description: `Raw energy per atom (eV/atom)`,
|
|
414
|
+
},
|
|
415
|
+
]
|
|
416
|
+
: []),
|
|
417
|
+
...(has_ids ? [{ label: `ID`, color_scale: null, description: `Entry identifier` }] : []),
|
|
418
|
+
...(has_polymorphs
|
|
419
|
+
? [
|
|
420
|
+
{
|
|
421
|
+
label: `Poly`,
|
|
422
|
+
color_scale: null,
|
|
423
|
+
description: `Number of polymorphs (same reduced formula)`,
|
|
424
|
+
},
|
|
425
|
+
]
|
|
426
|
+
: []),
|
|
427
|
+
{
|
|
428
|
+
label: `N<sub>el</sub>`,
|
|
429
|
+
color_scale: null,
|
|
430
|
+
description: `Number of elements`,
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
label: `N<sub>at</sub>`,
|
|
434
|
+
color_scale: null,
|
|
435
|
+
format: `d`,
|
|
436
|
+
description: `Number of atoms in unit cell`,
|
|
437
|
+
},
|
|
438
|
+
] satisfies Label[])
|
|
440
439
|
|
|
441
440
|
// Filename for HeatmapTable's built-in CSV/JSON export
|
|
442
441
|
const export_filename = $derived(
|
|
443
|
-
phase_stats?.chemical_system?.toLowerCase().replaceAll(/\s+/g, `-`) ??
|
|
444
|
-
`convex-hull-stats`,
|
|
442
|
+
phase_stats?.chemical_system?.toLowerCase().replaceAll(/\s+/g, `-`) ?? `convex-hull-stats`,
|
|
445
443
|
)
|
|
446
444
|
</script>
|
|
447
445
|
|
|
@@ -462,16 +460,11 @@
|
|
|
462
460
|
role="button"
|
|
463
461
|
tabindex="0"
|
|
464
462
|
onkeydown={(event) =>
|
|
465
|
-
|
|
466
|
-
event,
|
|
467
|
-
item.label,
|
|
468
|
-
String(item.value),
|
|
469
|
-
key ?? item.label,
|
|
470
|
-
)}
|
|
463
|
+
handle_copy_keydown(event, item.label, String(item.value), key ?? item.label)}
|
|
471
464
|
>
|
|
472
465
|
<span>{@html sanitize_html(label)}:</span>
|
|
473
466
|
<span>{@html sanitize_html(value)}</span>
|
|
474
|
-
{#if key &&
|
|
467
|
+
{#if key && copied.has(key)}
|
|
475
468
|
<Icon
|
|
476
469
|
icon="Check"
|
|
477
470
|
style="color: var(--success-color, #10b981); width: 12px; height: 12px"
|
|
@@ -487,23 +480,24 @@
|
|
|
487
480
|
data-testid="pd-binary-subsystem-coverage"
|
|
488
481
|
title="Click to copy: Binary subsystem coverage: {subsystem_coverage_summary ?? ``}"
|
|
489
482
|
onclick={() =>
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
483
|
+
copy_to_clipboard(
|
|
484
|
+
`Binary subsystem coverage`,
|
|
485
|
+
subsystem_coverage_summary ?? ``,
|
|
486
|
+
`binary-subsystem-coverage`,
|
|
487
|
+
)}
|
|
495
488
|
role="button"
|
|
496
489
|
tabindex="0"
|
|
497
490
|
onkeydown={(event) =>
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
491
|
+
handle_copy_keydown(
|
|
492
|
+
event,
|
|
493
|
+
`Binary subsystem coverage`,
|
|
494
|
+
subsystem_coverage_summary ?? ``,
|
|
495
|
+
`binary-subsystem-coverage`,
|
|
496
|
+
)}
|
|
504
497
|
>
|
|
505
498
|
<span class="subsystem-label"
|
|
506
|
-
|
|
499
|
+
>Binary subsystem coverage ({subsystem_coverage.length} pairs)</span
|
|
500
|
+
>
|
|
507
501
|
<span class="subsystem-chips">
|
|
508
502
|
{#each subsystem_coverage as { pair, count } (pair)}
|
|
509
503
|
<span class="subsystem-chip" class:has-entries={count > 0}>
|
|
@@ -512,7 +506,7 @@
|
|
|
512
506
|
</span>
|
|
513
507
|
{/each}
|
|
514
508
|
</span>
|
|
515
|
-
{#if
|
|
509
|
+
{#if copied.has(`binary-subsystem-coverage`)}
|
|
516
510
|
<Icon
|
|
517
511
|
icon="Check"
|
|
518
512
|
style="color: var(--success-color, #10b981); width: 12px; height: 12px"
|
|
@@ -522,8 +516,7 @@
|
|
|
522
516
|
</div>
|
|
523
517
|
{/if}
|
|
524
518
|
|
|
525
|
-
{#if section.title === `E<sub>form</sub> distribution` &&
|
|
526
|
-
e_form_data[0].y.length > 0}
|
|
519
|
+
{#if section.title === `E<sub>form</sub> distribution` && e_form_data[0].y.length > 0}
|
|
527
520
|
<Histogram
|
|
528
521
|
{...histogram_props}
|
|
529
522
|
series={e_form_data}
|
|
@@ -532,8 +525,7 @@
|
|
|
532
525
|
/>
|
|
533
526
|
{/if}
|
|
534
527
|
|
|
535
|
-
{#if section.title === `E<sub>above hull</sub> distribution` &&
|
|
536
|
-
hull_distance_data[0].y.length > 0}
|
|
528
|
+
{#if section.title === `E<sub>above hull</sub> distribution` && hull_distance_data[0].y.length > 0}
|
|
537
529
|
<Histogram
|
|
538
530
|
{...histogram_props}
|
|
539
531
|
series={hull_distance_data}
|
|
@@ -583,7 +575,7 @@
|
|
|
583
575
|
{/snippet}
|
|
584
576
|
|
|
585
577
|
{#if layout === `side-by-side`}
|
|
586
|
-
<div {...rest} class=
|
|
578
|
+
<div {...rest} class={[`convex-hull-stats side-by-side`, rest.class]}>
|
|
587
579
|
<div class="stats-pane">
|
|
588
580
|
{@render stats_panel()}
|
|
589
581
|
</div>
|
|
@@ -592,12 +584,12 @@
|
|
|
592
584
|
</div>
|
|
593
585
|
</div>
|
|
594
586
|
{:else}
|
|
595
|
-
<div {...rest} class=
|
|
587
|
+
<div {...rest} class={[`convex-hull-stats`, rest.class]}>
|
|
596
588
|
<div class="view-toggle">
|
|
597
|
-
<button class:active={view_mode === `stats`} onclick={() => view_mode = `stats`}>
|
|
589
|
+
<button class:active={view_mode === `stats`} onclick={() => (view_mode = `stats`)}>
|
|
598
590
|
Stats
|
|
599
591
|
</button>
|
|
600
|
-
<button class:active={view_mode === `table`} onclick={() => view_mode = `table`}>
|
|
592
|
+
<button class:active={view_mode === `table`} onclick={() => (view_mode = `table`)}>
|
|
601
593
|
Table
|
|
602
594
|
</button>
|
|
603
595
|
</div>
|
|
@@ -635,7 +627,13 @@
|
|
|
635
627
|
.table-pane {
|
|
636
628
|
flex: 1 1 0;
|
|
637
629
|
max-width: 100%;
|
|
638
|
-
min-height: var(
|
|
630
|
+
min-height: var(
|
|
631
|
+
--hull-stats-table-height,
|
|
632
|
+
calc(
|
|
633
|
+
var(--hull-stats-table-row-height, 2.35rem) * 10 +
|
|
634
|
+
var(--hull-stats-table-header-height, 3.5rem)
|
|
635
|
+
)
|
|
636
|
+
);
|
|
639
637
|
min-width: 0;
|
|
640
638
|
overflow: auto;
|
|
641
639
|
display: flex;
|
|
@@ -29,15 +29,11 @@
|
|
|
29
29
|
|
|
30
30
|
const is_element = $derived(is_unary_entry(entry))
|
|
31
31
|
const elem_symbol = $derived(
|
|
32
|
-
is_element
|
|
33
|
-
? (Object.entries(entry.composition).find(([, n]) => n > 0)?.[0] ?? ``)
|
|
34
|
-
: ``,
|
|
32
|
+
is_element ? (Object.entries(entry.composition).find(([, n]) => n > 0)?.[0] ?? ``) : ``,
|
|
35
33
|
) as ElementSymbol | ``
|
|
36
34
|
const elem_name = $derived(elem_symbol && ELEM_SYMBOL_TO_NAME[elem_symbol])
|
|
37
35
|
const polymorph_stats = $derived(
|
|
38
|
-
entry.entry_id && polymorph_stats_map
|
|
39
|
-
? polymorph_stats_map.get(entry.entry_id)
|
|
40
|
-
: null,
|
|
36
|
+
entry.entry_id && polymorph_stats_map ? polymorph_stats_map.get(entry.entry_id) : null,
|
|
41
37
|
)
|
|
42
38
|
const category_value = $derived(get_entry_category(entry, entry_category))
|
|
43
39
|
</script>
|
|
@@ -80,14 +76,11 @@
|
|
|
80
76
|
{/if}
|
|
81
77
|
|
|
82
78
|
{#if show_fractional && !is_element}
|
|
83
|
-
{@const total = Object.values(entry.composition).reduce(
|
|
84
|
-
(sum, amt) => sum + amt,
|
|
85
|
-
0,
|
|
86
|
-
)}
|
|
79
|
+
{@const total = Object.values(entry.composition).reduce((sum, amt) => sum + amt, 0)}
|
|
87
80
|
{#if total > 0}
|
|
88
81
|
{@const fractions = Object.entries(entry.composition)
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
.filter(([, amt]) => amt > 0)
|
|
83
|
+
.map(([el, amt]) => `${el}<sub>${format_num(amt / total, `.2~`)}</sub>`)}
|
|
91
84
|
{#if fractions.length > 1}
|
|
92
85
|
<div>Fractional: {@html sanitize_html(fractions.join(` `))}</div>
|
|
93
86
|
{/if}
|