matterviz 0.3.4 → 0.3.6
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/.vscode/launch.json +13 -0
- package/.vscodeignore +7 -0
- package/dist/assets/STLExporter-BpTH3YHE.js +8 -0
- package/dist/assets/browser-DdDecX_W.js +1 -0
- package/dist/assets/export-qgn-H9y6.js +2 -0
- package/dist/assets/main-DiKYzti2.css +1 -0
- package/dist/assets/moyo_wasm_bg-0ocwg7xY.wasm +0 -0
- package/dist/extension.js +31293 -0
- package/dist/src/lib/FilePicker.svelte +360 -0
- package/dist/src/lib/MillerIndexInput.svelte +66 -0
- package/dist/src/lib/api/mp.ts +26 -0
- package/dist/src/lib/api/optimade.ts +204 -0
- package/dist/src/lib/app.css +247 -0
- package/dist/src/lib/brillouin/BrillouinZone.svelte +549 -0
- package/dist/src/lib/brillouin/BrillouinZoneControls.svelte +144 -0
- package/dist/src/lib/brillouin/BrillouinZoneExportPane.svelte +146 -0
- package/dist/src/lib/brillouin/BrillouinZoneInfoPane.svelte +146 -0
- package/dist/src/lib/brillouin/BrillouinZoneScene.svelte +476 -0
- package/dist/src/lib/brillouin/BrillouinZoneTooltip.svelte +92 -0
- package/dist/src/lib/brillouin/compute.ts +529 -0
- package/dist/src/lib/brillouin/index.ts +8 -0
- package/dist/src/lib/brillouin/types.ts +51 -0
- package/dist/src/lib/chempot-diagram/ChemPotDiagram.svelte +327 -0
- package/dist/src/lib/chempot-diagram/ChemPotDiagram2D.svelte +846 -0
- package/dist/src/lib/chempot-diagram/ChemPotDiagram3D.svelte +3193 -0
- package/dist/src/lib/chempot-diagram/async-compute.svelte.ts +94 -0
- package/dist/src/lib/chempot-diagram/chempot-worker.ts +11 -0
- package/dist/src/lib/chempot-diagram/color.ts +42 -0
- package/dist/src/lib/chempot-diagram/compute.ts +1014 -0
- package/dist/src/lib/chempot-diagram/index.ts +6 -0
- package/dist/src/lib/chempot-diagram/pointer.ts +56 -0
- package/dist/src/lib/chempot-diagram/temperature.ts +77 -0
- package/dist/src/lib/chempot-diagram/types.ts +130 -0
- package/dist/src/lib/colors/index.ts +249 -0
- package/dist/src/lib/composition/BarChart.svelte +297 -0
- package/dist/src/lib/composition/BubbleChart.svelte +218 -0
- package/dist/src/lib/composition/Composition.svelte +165 -0
- package/dist/src/lib/composition/Formula.svelte +268 -0
- package/dist/src/lib/composition/FormulaFilter.svelte +1257 -0
- package/dist/src/lib/composition/PieChart.svelte +323 -0
- package/dist/src/lib/composition/format.ts +155 -0
- package/dist/src/lib/composition/index.ts +37 -0
- package/dist/src/lib/composition/parse.ts +605 -0
- package/dist/src/lib/constants.ts +134 -0
- package/dist/src/lib/controls.ts +42 -0
- package/dist/src/lib/convex-hull/ConvexHull.svelte +157 -0
- package/dist/src/lib/convex-hull/ConvexHull2D.svelte +825 -0
- package/dist/src/lib/convex-hull/ConvexHull3D.svelte +1801 -0
- package/dist/src/lib/convex-hull/ConvexHull4D.svelte +1398 -0
- package/dist/src/lib/convex-hull/ConvexHullControls.svelte +535 -0
- package/dist/src/lib/convex-hull/ConvexHullInfoPane.svelte +125 -0
- package/dist/src/lib/convex-hull/ConvexHullStats.svelte +929 -0
- package/dist/src/lib/convex-hull/ConvexHullTooltip.svelte +131 -0
- package/dist/src/lib/convex-hull/GasPressureControls.svelte +247 -0
- package/dist/src/lib/convex-hull/StructurePopup.svelte +151 -0
- package/dist/src/lib/convex-hull/TemperatureSlider.svelte +140 -0
- package/dist/src/lib/convex-hull/barycentric-coords.ts +246 -0
- package/dist/src/lib/convex-hull/demo-temperature.ts +63 -0
- package/dist/src/lib/convex-hull/gas-thermodynamics.ts +405 -0
- package/dist/src/lib/convex-hull/helpers.ts +932 -0
- package/dist/src/lib/convex-hull/index.ts +202 -0
- package/dist/src/lib/convex-hull/thermodynamics.ts +2192 -0
- package/dist/src/lib/convex-hull/types.ts +267 -0
- package/dist/src/lib/coordination/CoordinationBarPlot.svelte +311 -0
- package/dist/src/lib/coordination/calc-coordination.ts +93 -0
- package/dist/src/lib/coordination/index.ts +9 -0
- package/dist/src/lib/effects.svelte.ts +48 -0
- package/dist/src/lib/element/BohrAtom.svelte +147 -0
- package/dist/src/lib/element/ElementHeading.svelte +26 -0
- package/dist/src/lib/element/ElementPhoto.svelte +57 -0
- package/dist/src/lib/element/ElementStats.svelte +80 -0
- package/dist/src/lib/element/ElementTile.svelte +484 -0
- package/dist/src/lib/element/data.json.gz.d.ts +4 -0
- package/dist/src/lib/element/data.ts +14 -0
- package/dist/src/lib/element/index.ts +8 -0
- package/dist/src/lib/element/types.ts +62 -0
- package/dist/src/lib/feedback/ClickFeedback.svelte +58 -0
- package/dist/src/lib/feedback/DragOverlay.svelte +42 -0
- package/dist/src/lib/feedback/index.ts +4 -0
- package/dist/src/lib/fermi-surface/FermiSlice.svelte +189 -0
- package/dist/src/lib/fermi-surface/FermiSurface.svelte +600 -0
- package/dist/src/lib/fermi-surface/FermiSurfaceControls.svelte +448 -0
- package/dist/src/lib/fermi-surface/FermiSurfaceScene.svelte +794 -0
- package/dist/src/lib/fermi-surface/FermiSurfaceTooltip.svelte +111 -0
- package/dist/src/lib/fermi-surface/compute.ts +728 -0
- package/dist/src/lib/fermi-surface/constants.ts +32 -0
- package/dist/src/lib/fermi-surface/export.ts +64 -0
- package/dist/src/lib/fermi-surface/index.ts +14 -0
- package/dist/src/lib/fermi-surface/marching-cubes.ts +3 -0
- package/dist/src/lib/fermi-surface/parse.ts +574 -0
- package/dist/src/lib/fermi-surface/symmetry.ts +56 -0
- package/dist/src/lib/fermi-surface/types.ts +159 -0
- package/dist/src/lib/heatmap-matrix/HeatmapMatrix.svelte +1545 -0
- package/dist/src/lib/heatmap-matrix/HeatmapMatrixControls.svelte +225 -0
- package/dist/src/lib/heatmap-matrix/index.ts +167 -0
- package/dist/src/lib/heatmap-matrix/shared.ts +7 -0
- package/dist/src/lib/icons.ts +650 -0
- package/dist/src/lib/index.ts +61 -0
- package/dist/src/lib/io/decompress.ts +92 -0
- package/dist/src/lib/io/export.ts +385 -0
- package/dist/src/lib/io/fetch.ts +46 -0
- package/dist/src/lib/io/file-drop.ts +51 -0
- package/dist/src/lib/io/index.ts +7 -0
- package/dist/src/lib/io/is-binary.ts +24 -0
- package/dist/src/lib/io/types.ts +8 -0
- package/dist/src/lib/io/url-drop.ts +141 -0
- package/dist/src/lib/isosurface/Isosurface.svelte +285 -0
- package/dist/src/lib/isosurface/IsosurfaceControls.svelte +277 -0
- package/dist/src/lib/isosurface/index.ts +7 -0
- package/dist/src/lib/isosurface/parse.ts +656 -0
- package/dist/src/lib/isosurface/slice.ts +175 -0
- package/dist/src/lib/isosurface/types.ts +309 -0
- package/dist/src/lib/labels.ts +320 -0
- package/dist/src/lib/layout/FullscreenToggle.svelte +50 -0
- package/dist/src/lib/layout/InfoCard.svelte +120 -0
- package/dist/src/lib/layout/InfoTag.svelte +185 -0
- package/dist/src/lib/layout/PropertyFilter.svelte +246 -0
- package/dist/src/lib/layout/SettingsSection.svelte +148 -0
- package/dist/src/lib/layout/SubpageGrid.svelte +82 -0
- package/dist/src/lib/layout/fullscreen.ts +65 -0
- package/dist/src/lib/layout/index.ts +11 -0
- package/dist/src/lib/layout/json-tree/JsonNode.svelte +548 -0
- package/dist/src/lib/layout/json-tree/JsonTree.svelte +1230 -0
- package/dist/src/lib/layout/json-tree/JsonValue.svelte +334 -0
- package/dist/src/lib/layout/json-tree/index.ts +3 -0
- package/dist/src/lib/layout/json-tree/types.ts +126 -0
- package/dist/src/lib/layout/json-tree/utils.ts +682 -0
- package/dist/src/lib/marching-cubes.ts +614 -0
- package/dist/src/lib/math.ts +1081 -0
- package/dist/src/lib/overlays/ContextMenu.svelte +162 -0
- package/dist/src/lib/overlays/CopyButton.svelte +45 -0
- package/dist/src/lib/overlays/DragControlTab.svelte +98 -0
- package/dist/src/lib/overlays/DraggablePane.svelte +487 -0
- package/dist/src/lib/overlays/InfoPaneCards.svelte +149 -0
- package/dist/src/lib/overlays/index.ts +3 -0
- package/dist/src/lib/periodic-table/PeriodicTable.svelte +469 -0
- package/dist/src/lib/periodic-table/PeriodicTableControls.svelte +557 -0
- package/dist/src/lib/periodic-table/PropertySelect.svelte +37 -0
- package/dist/src/lib/periodic-table/index.ts +12 -0
- package/dist/src/lib/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +1086 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramControls.svelte +444 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramEditorPane.svelte +126 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramExportPane.svelte +184 -0
- package/dist/src/lib/phase-diagram/PhaseDiagramTooltip.svelte +391 -0
- package/dist/src/lib/phase-diagram/TdbInfoPanel.svelte +203 -0
- package/dist/src/lib/phase-diagram/build-diagram.ts +186 -0
- package/dist/src/lib/phase-diagram/colors.ts +58 -0
- package/dist/src/lib/phase-diagram/diagram-input.ts +40 -0
- package/dist/src/lib/phase-diagram/index.ts +13 -0
- package/dist/src/lib/phase-diagram/parse.ts +348 -0
- package/dist/src/lib/phase-diagram/svg-to-diagram.ts +1023 -0
- package/dist/src/lib/phase-diagram/types.ts +144 -0
- package/dist/src/lib/phase-diagram/utils.ts +775 -0
- package/dist/src/lib/plot/AxisLabel.svelte +51 -0
- package/dist/src/lib/plot/BarPlot.svelte +2113 -0
- package/dist/src/lib/plot/BarPlotControls.svelte +66 -0
- package/dist/src/lib/plot/BinnedScatterPlot.svelte +1114 -0
- package/dist/src/lib/plot/ColorBar.svelte +721 -0
- package/dist/src/lib/plot/ColorScaleSelect.svelte +54 -0
- package/dist/src/lib/plot/ElementScatter.svelte +63 -0
- package/dist/src/lib/plot/FillArea.svelte +223 -0
- package/dist/src/lib/plot/Histogram.svelte +1558 -0
- package/dist/src/lib/plot/HistogramControls.svelte +212 -0
- package/dist/src/lib/plot/InteractiveAxisLabel.svelte +96 -0
- package/dist/src/lib/plot/Line.svelte +84 -0
- package/dist/src/lib/plot/PlotAxis.svelte +169 -0
- package/dist/src/lib/plot/PlotControls.svelte +537 -0
- package/dist/src/lib/plot/PlotLegend.svelte +569 -0
- package/dist/src/lib/plot/PlotTooltip.svelte +67 -0
- package/dist/src/lib/plot/PortalSelect.svelte +253 -0
- package/dist/src/lib/plot/ReferenceLine3D.svelte +156 -0
- package/dist/src/lib/plot/ReferencePlane.svelte +175 -0
- package/dist/src/lib/plot/ScatterPlot.svelte +2778 -0
- package/dist/src/lib/plot/ScatterPlot3D.svelte +529 -0
- package/dist/src/lib/plot/ScatterPlot3DControls.svelte +437 -0
- package/dist/src/lib/plot/ScatterPlot3DScene.svelte +912 -0
- package/dist/src/lib/plot/ScatterPlotControls.svelte +306 -0
- package/dist/src/lib/plot/ScatterPoint.svelte +182 -0
- package/dist/src/lib/plot/SpacegroupBarPlot.svelte +293 -0
- package/dist/src/lib/plot/Surface3D.svelte +197 -0
- package/dist/src/lib/plot/ZeroLines.svelte +97 -0
- package/dist/src/lib/plot/ZoomRect.svelte +23 -0
- package/dist/src/lib/plot/adaptive-density.ts +316 -0
- package/dist/src/lib/plot/auto-place.ts +184 -0
- package/dist/src/lib/plot/axis-utils.ts +122 -0
- package/dist/src/lib/plot/binned-scatter-types.ts +83 -0
- package/dist/src/lib/plot/data-cleaning.ts +1069 -0
- package/dist/src/lib/plot/data-transform.ts +69 -0
- package/dist/src/lib/plot/defaults.ts +9 -0
- package/dist/src/lib/plot/fill-utils.ts +494 -0
- package/dist/src/lib/plot/hover-lock.svelte.ts +60 -0
- package/dist/src/lib/plot/index.ts +53 -0
- package/dist/src/lib/plot/interactions.ts +119 -0
- package/dist/src/lib/plot/layout.ts +425 -0
- package/dist/src/lib/plot/reference-line.ts +426 -0
- package/dist/src/lib/plot/scales.ts +654 -0
- package/dist/src/lib/plot/svg.ts +23 -0
- package/dist/src/lib/plot/types.ts +1144 -0
- package/dist/src/lib/plot/utils/label-placement.ts +541 -0
- package/dist/src/lib/plot/utils/series-visibility.ts +140 -0
- package/dist/src/lib/plot/utils.ts +11 -0
- package/dist/src/lib/rdf/RdfPlot.svelte +247 -0
- package/dist/src/lib/rdf/calc-rdf.ts +167 -0
- package/dist/src/lib/rdf/index.ts +27 -0
- package/dist/src/lib/sanitize.ts +126 -0
- package/dist/src/lib/settings.ts +1479 -0
- package/dist/src/lib/spectral/Bands.svelte +1040 -0
- package/dist/src/lib/spectral/BandsAndDos.svelte +134 -0
- package/dist/src/lib/spectral/BrillouinBandsDos.svelte +252 -0
- package/dist/src/lib/spectral/Dos.svelte +697 -0
- package/dist/src/lib/spectral/helpers.ts +1381 -0
- package/dist/src/lib/spectral/index.ts +8 -0
- package/dist/src/lib/spectral/types.ts +112 -0
- package/dist/src/lib/state.svelte.ts +64 -0
- package/dist/src/lib/structure/Arrow.svelte +72 -0
- package/dist/src/lib/structure/AtomLegend.svelte +815 -0
- package/dist/src/lib/structure/Bond.svelte +140 -0
- package/dist/src/lib/structure/CanvasTooltip.svelte +33 -0
- package/dist/src/lib/structure/CellSelect.svelte +349 -0
- package/dist/src/lib/structure/Cylinder.svelte +45 -0
- package/dist/src/lib/structure/Lattice.svelte +196 -0
- package/dist/src/lib/structure/Structure.svelte +2248 -0
- package/dist/src/lib/structure/StructureControls.svelte +1273 -0
- package/dist/src/lib/structure/StructureExportPane.svelte +252 -0
- package/dist/src/lib/structure/StructureInfoPane.svelte +737 -0
- package/dist/src/lib/structure/StructureScene.svelte +2255 -0
- package/dist/src/lib/structure/atom-properties.ts +316 -0
- package/dist/src/lib/structure/bond-order-perception.ts +447 -0
- package/dist/src/lib/structure/bonding.ts +944 -0
- package/dist/src/lib/structure/export.ts +861 -0
- package/dist/src/lib/structure/index.ts +291 -0
- package/dist/src/lib/structure/label-placement.ts +130 -0
- package/dist/src/lib/structure/measure.ts +45 -0
- package/dist/src/lib/structure/parse.ts +1705 -0
- package/dist/src/lib/structure/partial-occupancy.ts +183 -0
- package/dist/src/lib/structure/pbc.ts +164 -0
- package/dist/src/lib/structure/supercell.ts +226 -0
- package/dist/src/lib/structure/validation.ts +11 -0
- package/dist/src/lib/symmetry/SymmetryStats.svelte +226 -0
- package/dist/src/lib/symmetry/WyckoffTable.svelte +120 -0
- package/dist/src/lib/symmetry/cell-transform.ts +118 -0
- package/dist/src/lib/symmetry/index.ts +348 -0
- package/dist/src/lib/symmetry/spacegroups.ts +404 -0
- package/dist/src/lib/table/HeatmapTable.svelte +1833 -0
- package/dist/src/lib/table/ToggleMenu.svelte +385 -0
- package/dist/src/lib/table/index.ts +139 -0
- package/dist/src/lib/theme/ThemeControl.svelte +53 -0
- package/dist/src/lib/theme/index.ts +107 -0
- package/dist/src/lib/theme/themes.mjs +297 -0
- package/dist/src/lib/time.ts +71 -0
- package/dist/src/lib/tooltip/TooltipContent.svelte +58 -0
- package/dist/src/lib/tooltip/index.ts +2 -0
- package/dist/src/lib/tooltip/types.ts +13 -0
- package/dist/src/lib/trajectory/Trajectory.svelte +1545 -0
- package/dist/src/lib/trajectory/TrajectoryError.svelte +128 -0
- package/dist/src/lib/trajectory/TrajectoryExportPane.svelte +357 -0
- package/dist/src/lib/trajectory/TrajectoryInfoPane.svelte +313 -0
- package/dist/src/lib/trajectory/constants.ts +7 -0
- package/dist/src/lib/trajectory/extract.ts +196 -0
- package/dist/src/lib/trajectory/format-detect.ts +96 -0
- package/dist/src/lib/trajectory/frame-reader.ts +456 -0
- package/dist/src/lib/trajectory/helpers.ts +217 -0
- package/dist/src/lib/trajectory/index.ts +218 -0
- package/dist/src/lib/trajectory/parse/ase.ts +109 -0
- package/dist/src/lib/trajectory/parse/hdf5.ts +173 -0
- package/dist/src/lib/trajectory/parse/index.ts +411 -0
- package/dist/src/lib/trajectory/parse/lammps.ts +215 -0
- package/dist/src/lib/trajectory/parse/vasp.ts +102 -0
- package/dist/src/lib/trajectory/parse/xyz.ts +143 -0
- package/dist/src/lib/trajectory/plotting.ts +599 -0
- package/dist/src/lib/trajectory/types.ts +13 -0
- package/dist/src/lib/utils.ts +56 -0
- package/dist/src/lib/xrd/XrdPlot.svelte +615 -0
- package/dist/src/lib/xrd/broadening.ts +130 -0
- package/dist/src/lib/xrd/calc-xrd.ts +397 -0
- package/dist/src/lib/xrd/index.ts +38 -0
- package/dist/src/lib/xrd/parse.ts +858 -0
- package/dist/webview.js +29421 -0
- package/icon.png +0 -0
- package/license +1 -1
- package/matterviz-0.3.2.vsix +0 -0
- package/matterviz-0.3.4.vsix +0 -0
- package/matterviz-0.3.5.vsix +0 -0
- package/package.json +1461 -231
- package/readme.md +171 -98
- package/scripts/sync-config.ts +101 -0
- package/src/declarations.d.ts +2 -0
- package/src/extension.ts +972 -0
- package/src/node-io.ts +65 -0
- package/src/types.ts +17 -0
- package/src/webview/JsonBrowser.svelte +1079 -0
- package/src/webview/PlotPanel.svelte +346 -0
- package/src/webview/detect.ts +444 -0
- package/src/webview/main.ts +764 -0
- package/src/webview/plot-utils.ts +250 -0
- package/test-fixtures/all-viz-types.json.gz +0 -0
- package/test-fixtures/plot-demo-data.json.gz +0 -0
- package/tests/detect.test.ts +604 -0
- package/tests/extension.test.ts +2041 -0
- package/tests/node-io.test.ts +39 -0
- package/tests/plot-utils.test.ts +302 -0
- package/tests/vite-plugin-json-gz.test.ts +114 -0
- package/tests/vscode-mock.ts +18 -0
- package/tests/webview.test.ts +231 -0
- package/tsconfig.json +20 -0
- package/vite-plugin-json-gz.ts +29 -0
- package/vite.config.ts +34 -0
- package/vite.extension.config.ts +34 -0
- package/dist/EmptyState.svelte.d.ts +0 -9
- package/dist/FilePicker.svelte +0 -360
- package/dist/FilePicker.svelte.d.ts +0 -17
- package/dist/Icon.svelte.d.ts +0 -13
- package/dist/MillerIndexInput.svelte +0 -66
- package/dist/MillerIndexInput.svelte.d.ts +0 -7
- package/dist/api/mp.d.ts +0 -6
- package/dist/api/mp.js +0 -22
- package/dist/api/optimade.d.ts +0 -45
- package/dist/api/optimade.js +0 -135
- package/dist/app.css +0 -240
- package/dist/brillouin/BrillouinZone.svelte +0 -543
- package/dist/brillouin/BrillouinZone.svelte.d.ts +0 -83
- package/dist/brillouin/BrillouinZoneControls.svelte +0 -144
- package/dist/brillouin/BrillouinZoneControls.svelte.d.ts +0 -17
- package/dist/brillouin/BrillouinZoneExportPane.svelte +0 -148
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +0 -15
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +0 -146
- package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +0 -13
- package/dist/brillouin/BrillouinZoneScene.svelte +0 -476
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +0 -48
- package/dist/brillouin/BrillouinZoneTooltip.svelte +0 -92
- package/dist/brillouin/BrillouinZoneTooltip.svelte.d.ts +0 -8
- package/dist/brillouin/compute.d.ts +0 -17
- package/dist/brillouin/compute.js +0 -422
- package/dist/brillouin/index.d.ts +0 -8
- package/dist/brillouin/index.js +0 -8
- package/dist/brillouin/types.d.ts +0 -48
- package/dist/brillouin/types.js +0 -1
- package/dist/chempot-diagram/ChemPotDiagram.svelte +0 -327
- package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +0 -13
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +0 -847
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +0 -16
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +0 -3194
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +0 -16
- package/dist/chempot-diagram/ChemPotScene3D.svelte.d.ts +0 -7
- package/dist/chempot-diagram/async-compute.svelte.d.ts +0 -3
- package/dist/chempot-diagram/async-compute.svelte.js +0 -77
- package/dist/chempot-diagram/chempot-worker.d.ts +0 -1
- package/dist/chempot-diagram/chempot-worker.js +0 -11
- package/dist/chempot-diagram/color.d.ts +0 -10
- package/dist/chempot-diagram/color.js +0 -32
- package/dist/chempot-diagram/compute.d.ts +0 -48
- package/dist/chempot-diagram/compute.js +0 -812
- package/dist/chempot-diagram/index.d.ts +0 -6
- package/dist/chempot-diagram/index.js +0 -6
- package/dist/chempot-diagram/pointer.d.ts +0 -16
- package/dist/chempot-diagram/pointer.js +0 -40
- package/dist/chempot-diagram/temperature.d.ts +0 -15
- package/dist/chempot-diagram/temperature.js +0 -36
- package/dist/chempot-diagram/types.d.ts +0 -86
- package/dist/chempot-diagram/types.js +0 -28
- package/dist/colors/index.d.ts +0 -47
- package/dist/colors/index.js +0 -203
- package/dist/composition/BarChart.svelte +0 -297
- package/dist/composition/BarChart.svelte.d.ts +0 -39
- package/dist/composition/BubbleChart.svelte +0 -218
- package/dist/composition/BubbleChart.svelte.d.ts +0 -28
- package/dist/composition/Composition.svelte +0 -164
- package/dist/composition/Composition.svelte.d.ts +0 -15
- package/dist/composition/Formula.svelte +0 -265
- package/dist/composition/Formula.svelte.d.ts +0 -19
- package/dist/composition/FormulaFilter.svelte +0 -1259
- package/dist/composition/FormulaFilter.svelte.d.ts +0 -51
- package/dist/composition/PieChart.svelte +0 -323
- package/dist/composition/PieChart.svelte.d.ts +0 -37
- package/dist/composition/format.d.ts +0 -15
- package/dist/composition/format.js +0 -109
- package/dist/composition/index.d.ts +0 -20
- package/dist/composition/index.js +0 -14
- package/dist/composition/parse.d.ts +0 -55
- package/dist/composition/parse.js +0 -459
- package/dist/constants.d.ts +0 -29
- package/dist/constants.js +0 -105
- package/dist/controls.d.ts +0 -14
- package/dist/controls.js +0 -30
- package/dist/convex-hull/ConvexHull.svelte +0 -157
- package/dist/convex-hull/ConvexHull.svelte.d.ts +0 -13
- package/dist/convex-hull/ConvexHull2D.svelte +0 -813
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +0 -11
- package/dist/convex-hull/ConvexHull3D.svelte +0 -1788
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +0 -8
- package/dist/convex-hull/ConvexHull4D.svelte +0 -1374
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +0 -8
- package/dist/convex-hull/ConvexHullControls.svelte +0 -546
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +0 -48
- package/dist/convex-hull/ConvexHullInfoPane.svelte +0 -115
- package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +0 -18
- package/dist/convex-hull/ConvexHullStats.svelte +0 -905
- package/dist/convex-hull/ConvexHullStats.svelte.d.ts +0 -15
- package/dist/convex-hull/ConvexHullTooltip.svelte +0 -131
- package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +0 -33
- package/dist/convex-hull/GasPressureControls.svelte +0 -247
- package/dist/convex-hull/GasPressureControls.svelte.d.ts +0 -11
- package/dist/convex-hull/StructurePopup.svelte +0 -116
- package/dist/convex-hull/StructurePopup.svelte.d.ts +0 -18
- package/dist/convex-hull/TemperatureSlider.svelte +0 -137
- package/dist/convex-hull/TemperatureSlider.svelte.d.ts +0 -8
- package/dist/convex-hull/barycentric-coords.d.ts +0 -18
- package/dist/convex-hull/barycentric-coords.js +0 -182
- package/dist/convex-hull/demo-temperature.d.ts +0 -6
- package/dist/convex-hull/demo-temperature.js +0 -40
- package/dist/convex-hull/gas-thermodynamics.d.ts +0 -16
- package/dist/convex-hull/gas-thermodynamics.js +0 -316
- package/dist/convex-hull/helpers.d.ts +0 -103
- package/dist/convex-hull/helpers.js +0 -671
- package/dist/convex-hull/index.d.ts +0 -118
- package/dist/convex-hull/index.js +0 -57
- package/dist/convex-hull/thermodynamics.d.ts +0 -66
- package/dist/convex-hull/thermodynamics.js +0 -1752
- package/dist/convex-hull/types.d.ts +0 -162
- package/dist/convex-hull/types.js +0 -36
- package/dist/coordination/CoordinationBarPlot.svelte +0 -311
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +0 -30
- package/dist/coordination/calc-coordination.d.ts +0 -15
- package/dist/coordination/calc-coordination.js +0 -63
- package/dist/coordination/index.d.ts +0 -8
- package/dist/coordination/index.js +0 -7
- package/dist/element/BohrAtom.svelte +0 -149
- package/dist/element/BohrAtom.svelte.d.ts +0 -20
- package/dist/element/ElementHeading.svelte +0 -26
- package/dist/element/ElementHeading.svelte.d.ts +0 -8
- package/dist/element/ElementPhoto.svelte +0 -57
- package/dist/element/ElementPhoto.svelte.d.ts +0 -9
- package/dist/element/ElementStats.svelte +0 -80
- package/dist/element/ElementStats.svelte.d.ts +0 -8
- package/dist/element/ElementTile.svelte +0 -484
- package/dist/element/ElementTile.svelte.d.ts +0 -29
- package/dist/element/Nucleus.svelte.d.ts +0 -17
- package/dist/element/data.d.ts +0 -3
- package/dist/element/data.js +0 -2
- package/dist/element/data.json.gz.d.ts +0 -2
- package/dist/element/index.d.ts +0 -8
- package/dist/element/index.js +0 -8
- package/dist/element/types.d.ts +0 -57
- package/dist/element/types.js +0 -1
- package/dist/feedback/ClickFeedback.svelte +0 -58
- package/dist/feedback/ClickFeedback.svelte.d.ts +0 -12
- package/dist/feedback/DragOverlay.svelte +0 -42
- package/dist/feedback/DragOverlay.svelte.d.ts +0 -7
- package/dist/feedback/Spinner.svelte.d.ts +0 -7
- package/dist/feedback/StatusMessage.svelte.d.ts +0 -9
- package/dist/feedback/index.d.ts +0 -4
- package/dist/feedback/index.js +0 -4
- package/dist/fermi-surface/FermiSlice.svelte +0 -189
- package/dist/fermi-surface/FermiSlice.svelte.d.ts +0 -24
- package/dist/fermi-surface/FermiSurface.svelte +0 -597
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +0 -83
- package/dist/fermi-surface/FermiSurfaceControls.svelte +0 -452
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +0 -35
- package/dist/fermi-surface/FermiSurfaceScene.svelte +0 -792
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +0 -50
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +0 -111
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte.d.ts +0 -8
- package/dist/fermi-surface/compute.d.ts +0 -5
- package/dist/fermi-surface/compute.js +0 -538
- package/dist/fermi-surface/constants.d.ts +0 -9
- package/dist/fermi-surface/constants.js +0 -27
- package/dist/fermi-surface/export.d.ts +0 -5
- package/dist/fermi-surface/export.js +0 -63
- package/dist/fermi-surface/index.d.ts +0 -12
- package/dist/fermi-surface/index.js +0 -13
- package/dist/fermi-surface/marching-cubes.d.ts +0 -2
- package/dist/fermi-surface/marching-cubes.js +0 -2
- package/dist/fermi-surface/parse.d.ts +0 -2
- package/dist/fermi-surface/parse.js +0 -495
- package/dist/fermi-surface/symmetry.d.ts +0 -3
- package/dist/fermi-surface/symmetry.js +0 -46
- package/dist/fermi-surface/types.d.ts +0 -113
- package/dist/fermi-surface/types.js +0 -4
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +0 -1527
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +0 -110
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +0 -225
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +0 -30
- package/dist/heatmap-matrix/index.d.ts +0 -53
- package/dist/heatmap-matrix/index.js +0 -100
- package/dist/heatmap-matrix/shared.d.ts +0 -2
- package/dist/heatmap-matrix/shared.js +0 -4
- package/dist/icons.d.ts +0 -569
- package/dist/icons.js +0 -648
- package/dist/index.d.ts +0 -39
- package/dist/index.js +0 -39
- package/dist/io/decompress.d.ts +0 -10
- package/dist/io/decompress.js +0 -69
- package/dist/io/export.d.ts +0 -16
- package/dist/io/export.js +0 -312
- package/dist/io/fetch.d.ts +0 -5
- package/dist/io/fetch.js +0 -39
- package/dist/io/file-drop.d.ts +0 -7
- package/dist/io/file-drop.js +0 -43
- package/dist/io/index.d.ts +0 -7
- package/dist/io/index.js +0 -7
- package/dist/io/is-binary.d.ts +0 -1
- package/dist/io/is-binary.js +0 -5
- package/dist/io/types.d.ts +0 -8
- package/dist/io/types.js +0 -1
- package/dist/io/url-drop.d.ts +0 -2
- package/dist/io/url-drop.js +0 -117
- package/dist/isosurface/Isosurface.svelte +0 -285
- package/dist/isosurface/Isosurface.svelte.d.ts +0 -8
- package/dist/isosurface/IsosurfaceControls.svelte +0 -291
- package/dist/isosurface/IsosurfaceControls.svelte.d.ts +0 -9
- package/dist/isosurface/index.d.ts +0 -5
- package/dist/isosurface/index.js +0 -6
- package/dist/isosurface/parse.d.ts +0 -6
- package/dist/isosurface/parse.js +0 -553
- package/dist/isosurface/slice.d.ts +0 -11
- package/dist/isosurface/slice.js +0 -140
- package/dist/isosurface/types.d.ts +0 -56
- package/dist/isosurface/types.js +0 -227
- package/dist/labels.d.ts +0 -53
- package/dist/labels.js +0 -274
- package/dist/layout/FullscreenToggle.svelte +0 -50
- package/dist/layout/FullscreenToggle.svelte.d.ts +0 -7
- package/dist/layout/InfoCard.svelte +0 -120
- package/dist/layout/InfoCard.svelte.d.ts +0 -21
- package/dist/layout/InfoTag.svelte +0 -183
- package/dist/layout/InfoTag.svelte.d.ts +0 -19
- package/dist/layout/PropertyFilter.svelte +0 -244
- package/dist/layout/PropertyFilter.svelte.d.ts +0 -24
- package/dist/layout/SettingsSection.svelte +0 -148
- package/dist/layout/SettingsSection.svelte.d.ts +0 -17
- package/dist/layout/SubpageGrid.svelte +0 -82
- package/dist/layout/SubpageGrid.svelte.d.ts +0 -14
- package/dist/layout/fullscreen.d.ts +0 -9
- package/dist/layout/fullscreen.js +0 -53
- package/dist/layout/index.d.ts +0 -10
- package/dist/layout/index.js +0 -8
- package/dist/layout/json-tree/JsonNode.svelte +0 -547
- package/dist/layout/json-tree/JsonNode.svelte.d.ts +0 -11
- package/dist/layout/json-tree/JsonTree.svelte +0 -1222
- package/dist/layout/json-tree/JsonTree.svelte.d.ts +0 -6
- package/dist/layout/json-tree/JsonValue.svelte +0 -334
- package/dist/layout/json-tree/JsonValue.svelte.d.ts +0 -9
- package/dist/layout/json-tree/index.d.ts +0 -3
- package/dist/layout/json-tree/index.js +0 -3
- package/dist/layout/json-tree/types.d.ts +0 -73
- package/dist/layout/json-tree/types.js +0 -3
- package/dist/layout/json-tree/utils.d.ts +0 -29
- package/dist/layout/json-tree/utils.js +0 -648
- package/dist/marching-cubes.d.ts +0 -14
- package/dist/marching-cubes.js +0 -542
- package/dist/math.d.ts +0 -91
- package/dist/math.js +0 -896
- package/dist/overlays/ContextMenu.svelte +0 -162
- package/dist/overlays/ContextMenu.svelte.d.ts +0 -25
- package/dist/overlays/DraggablePane.svelte +0 -564
- package/dist/overlays/DraggablePane.svelte.d.ts +0 -36
- package/dist/overlays/index.d.ts +0 -2
- package/dist/overlays/index.js +0 -2
- package/dist/periodic-table/PeriodicTable.svelte +0 -469
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +0 -55
- package/dist/periodic-table/PeriodicTableControls.svelte +0 -557
- package/dist/periodic-table/PeriodicTableControls.svelte.d.ts +0 -24
- package/dist/periodic-table/PropertySelect.svelte +0 -37
- package/dist/periodic-table/PropertySelect.svelte.d.ts +0 -13
- package/dist/periodic-table/TableInset.svelte.d.ts +0 -9
- package/dist/periodic-table/index.d.ts +0 -10
- package/dist/periodic-table/index.js +0 -4
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +0 -1086
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +0 -44
- package/dist/phase-diagram/PhaseDiagramControls.svelte +0 -451
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +0 -30
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +0 -126
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +0 -15
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +0 -192
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +0 -19
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +0 -392
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte.d.ts +0 -16
- package/dist/phase-diagram/TdbInfoPanel.svelte +0 -203
- package/dist/phase-diagram/TdbInfoPanel.svelte.d.ts +0 -12
- package/dist/phase-diagram/build-diagram.d.ts +0 -11
- package/dist/phase-diagram/build-diagram.js +0 -167
- package/dist/phase-diagram/colors.d.ts +0 -35
- package/dist/phase-diagram/colors.js +0 -51
- package/dist/phase-diagram/diagram-input.d.ts +0 -33
- package/dist/phase-diagram/diagram-input.js +0 -3
- package/dist/phase-diagram/index.d.ts +0 -13
- package/dist/phase-diagram/index.js +0 -13
- package/dist/phase-diagram/parse.d.ts +0 -55
- package/dist/phase-diagram/parse.js +0 -276
- package/dist/phase-diagram/svg-to-diagram.d.ts +0 -2
- package/dist/phase-diagram/svg-to-diagram.js +0 -869
- package/dist/phase-diagram/types.d.ts +0 -99
- package/dist/phase-diagram/types.js +0 -1
- package/dist/phase-diagram/utils.d.ts +0 -118
- package/dist/phase-diagram/utils.js +0 -606
- package/dist/plot/AxisLabel.svelte +0 -51
- package/dist/plot/AxisLabel.svelte.d.ts +0 -16
- package/dist/plot/BarPlot.svelte +0 -2256
- package/dist/plot/BarPlot.svelte.d.ts +0 -82
- package/dist/plot/BarPlotControls.svelte +0 -66
- package/dist/plot/BarPlotControls.svelte.d.ts +0 -18
- package/dist/plot/ColorBar.svelte +0 -719
- package/dist/plot/ColorBar.svelte.d.ts +0 -31
- package/dist/plot/ColorScaleSelect.svelte +0 -54
- package/dist/plot/ColorScaleSelect.svelte.d.ts +0 -15
- package/dist/plot/ElementScatter.svelte +0 -63
- package/dist/plot/ElementScatter.svelte.d.ts +0 -14
- package/dist/plot/FillArea.svelte +0 -226
- package/dist/plot/FillArea.svelte.d.ts +0 -20
- package/dist/plot/Histogram.svelte +0 -1654
- package/dist/plot/Histogram.svelte.d.ts +0 -50
- package/dist/plot/HistogramControls.svelte +0 -212
- package/dist/plot/HistogramControls.svelte.d.ts +0 -22
- package/dist/plot/InteractiveAxisLabel.svelte +0 -94
- package/dist/plot/InteractiveAxisLabel.svelte.d.ts +0 -14
- package/dist/plot/Line.svelte +0 -85
- package/dist/plot/Line.svelte.d.ts +0 -15
- package/dist/plot/PlotControls.svelte +0 -537
- package/dist/plot/PlotControls.svelte.d.ts +0 -4
- package/dist/plot/PlotLegend.svelte +0 -498
- package/dist/plot/PlotLegend.svelte.d.ts +0 -25
- package/dist/plot/PlotTooltip.svelte +0 -67
- package/dist/plot/PlotTooltip.svelte.d.ts +0 -17
- package/dist/plot/PortalSelect.svelte +0 -253
- package/dist/plot/PortalSelect.svelte.d.ts +0 -16
- package/dist/plot/ReferenceLine.svelte.d.ts +0 -20
- package/dist/plot/ReferenceLine3D.svelte +0 -154
- package/dist/plot/ReferenceLine3D.svelte.d.ts +0 -14
- package/dist/plot/ReferencePlane.svelte +0 -178
- package/dist/plot/ReferencePlane.svelte.d.ts +0 -14
- package/dist/plot/ScatterPlot.svelte +0 -2831
- package/dist/plot/ScatterPlot.svelte.d.ts +0 -92
- package/dist/plot/ScatterPlot3D.svelte +0 -499
- package/dist/plot/ScatterPlot3D.svelte.d.ts +0 -94
- package/dist/plot/ScatterPlot3DControls.svelte +0 -437
- package/dist/plot/ScatterPlot3DControls.svelte.d.ts +0 -20
- package/dist/plot/ScatterPlot3DScene.svelte +0 -912
- package/dist/plot/ScatterPlot3DScene.svelte.d.ts +0 -74
- package/dist/plot/ScatterPlotControls.svelte +0 -307
- package/dist/plot/ScatterPlotControls.svelte.d.ts +0 -17
- package/dist/plot/ScatterPoint.svelte +0 -185
- package/dist/plot/ScatterPoint.svelte.d.ts +0 -19
- package/dist/plot/SpacegroupBarPlot.svelte +0 -292
- package/dist/plot/SpacegroupBarPlot.svelte.d.ts +0 -9
- package/dist/plot/Surface3D.svelte +0 -200
- package/dist/plot/Surface3D.svelte.d.ts +0 -13
- package/dist/plot/ZeroLines.svelte +0 -96
- package/dist/plot/ZeroLines.svelte.d.ts +0 -32
- package/dist/plot/ZoomRect.svelte +0 -23
- package/dist/plot/ZoomRect.svelte.d.ts +0 -8
- package/dist/plot/axis-utils.d.ts +0 -19
- package/dist/plot/axis-utils.js +0 -80
- package/dist/plot/data-cleaning.d.ts +0 -37
- package/dist/plot/data-cleaning.js +0 -855
- package/dist/plot/data-transform.d.ts +0 -16
- package/dist/plot/data-transform.js +0 -45
- package/dist/plot/defaults.d.ts +0 -19
- package/dist/plot/defaults.js +0 -9
- package/dist/plot/fill-utils.d.ts +0 -51
- package/dist/plot/fill-utils.js +0 -337
- package/dist/plot/hover-lock.svelte.d.ts +0 -14
- package/dist/plot/hover-lock.svelte.js +0 -46
- package/dist/plot/index.d.ts +0 -43
- package/dist/plot/index.js +0 -37
- package/dist/plot/interactions.d.ts +0 -12
- package/dist/plot/interactions.js +0 -100
- package/dist/plot/layout.d.ts +0 -60
- package/dist/plot/layout.js +0 -230
- package/dist/plot/reference-line.d.ts +0 -60
- package/dist/plot/reference-line.js +0 -316
- package/dist/plot/scales.d.ts +0 -48
- package/dist/plot/scales.js +0 -484
- package/dist/plot/svg.d.ts +0 -1
- package/dist/plot/svg.js +0 -11
- package/dist/plot/types.d.ts +0 -863
- package/dist/plot/types.js +0 -103
- package/dist/plot/utils/label-placement.d.ts +0 -47
- package/dist/plot/utils/label-placement.js +0 -256
- package/dist/plot/utils/series-visibility.d.ts +0 -9
- package/dist/plot/utils/series-visibility.js +0 -67
- package/dist/plot/utils.d.ts +0 -1
- package/dist/plot/utils.js +0 -14
- package/dist/rdf/RdfPlot.svelte +0 -247
- package/dist/rdf/RdfPlot.svelte.d.ts +0 -27
- package/dist/rdf/calc-rdf.d.ts +0 -4
- package/dist/rdf/calc-rdf.js +0 -111
- package/dist/rdf/index.d.ts +0 -23
- package/dist/rdf/index.js +0 -2
- package/dist/sanitize.d.ts +0 -4
- package/dist/sanitize.js +0 -107
- package/dist/settings.d.ts +0 -253
- package/dist/settings.js +0 -1123
- package/dist/spectral/Bands.svelte +0 -1040
- package/dist/spectral/Bands.svelte.d.ts +0 -40
- package/dist/spectral/BandsAndDos.svelte +0 -128
- package/dist/spectral/BandsAndDos.svelte.d.ts +0 -18
- package/dist/spectral/BrillouinBandsDos.svelte +0 -248
- package/dist/spectral/BrillouinBandsDos.svelte.d.ts +0 -20
- package/dist/spectral/Dos.svelte +0 -697
- package/dist/spectral/Dos.svelte.d.ts +0 -29
- package/dist/spectral/helpers.d.ts +0 -117
- package/dist/spectral/helpers.js +0 -1023
- package/dist/spectral/index.d.ts +0 -6
- package/dist/spectral/index.js +0 -7
- package/dist/spectral/types.d.ts +0 -84
- package/dist/spectral/types.js +0 -2
- package/dist/state.svelte.d.ts +0 -25
- package/dist/state.svelte.js +0 -45
- package/dist/structure/Arrow.svelte +0 -72
- package/dist/structure/Arrow.svelte.d.ts +0 -15
- package/dist/structure/AtomLegend.svelte +0 -798
- package/dist/structure/AtomLegend.svelte.d.ts +0 -34
- package/dist/structure/Bond.svelte +0 -140
- package/dist/structure/Bond.svelte.d.ts +0 -9
- package/dist/structure/CanvasTooltip.svelte +0 -33
- package/dist/structure/CanvasTooltip.svelte.d.ts +0 -12
- package/dist/structure/CellSelect.svelte +0 -351
- package/dist/structure/CellSelect.svelte.d.ts +0 -13
- package/dist/structure/Cylinder.svelte +0 -45
- package/dist/structure/Cylinder.svelte.d.ts +0 -10
- package/dist/structure/Lattice.svelte +0 -196
- package/dist/structure/Lattice.svelte.d.ts +0 -17
- package/dist/structure/Structure.svelte +0 -1857
- package/dist/structure/Structure.svelte.d.ts +0 -83
- package/dist/structure/StructureControls.svelte +0 -1184
- package/dist/structure/StructureControls.svelte.d.ts +0 -31
- package/dist/structure/StructureExportPane.svelte +0 -251
- package/dist/structure/StructureExportPane.svelte.d.ts +0 -17
- package/dist/structure/StructureInfoPane.svelte +0 -434
- package/dist/structure/StructureInfoPane.svelte.d.ts +0 -18
- package/dist/structure/StructureScene.svelte +0 -1574
- package/dist/structure/StructureScene.svelte.d.ts +0 -104
- package/dist/structure/atom-properties.d.ts +0 -37
- package/dist/structure/atom-properties.js +0 -198
- package/dist/structure/bonding.d.ts +0 -33
- package/dist/structure/bonding.js +0 -304
- package/dist/structure/export.d.ts +0 -20
- package/dist/structure/export.js +0 -725
- package/dist/structure/ferrox-wasm-types.d.ts +0 -46
- package/dist/structure/ferrox-wasm-types.js +0 -18
- package/dist/structure/ferrox-wasm.d.ts +0 -94
- package/dist/structure/ferrox-wasm.js +0 -249
- package/dist/structure/index.d.ts +0 -110
- package/dist/structure/index.js +0 -168
- package/dist/structure/measure.d.ts +0 -6
- package/dist/structure/measure.js +0 -29
- package/dist/structure/parse.d.ts +0 -65
- package/dist/structure/parse.js +0 -1374
- package/dist/structure/partial-occupancy.d.ts +0 -25
- package/dist/structure/partial-occupancy.js +0 -99
- package/dist/structure/pbc.d.ts +0 -9
- package/dist/structure/pbc.js +0 -123
- package/dist/structure/supercell.d.ts +0 -8
- package/dist/structure/supercell.js +0 -137
- package/dist/structure/validation.d.ts +0 -2
- package/dist/structure/validation.js +0 -10
- package/dist/symmetry/SymmetryStats.svelte +0 -226
- package/dist/symmetry/SymmetryStats.svelte.d.ts +0 -21
- package/dist/symmetry/WyckoffTable.svelte +0 -113
- package/dist/symmetry/WyckoffTable.svelte.d.ts +0 -11
- package/dist/symmetry/cell-transform.d.ts +0 -12
- package/dist/symmetry/cell-transform.js +0 -77
- package/dist/symmetry/index.d.ts +0 -43
- package/dist/symmetry/index.js +0 -229
- package/dist/symmetry/spacegroups.d.ts +0 -9
- package/dist/symmetry/spacegroups.js +0 -394
- package/dist/table/HeatmapTable.svelte +0 -1854
- package/dist/table/HeatmapTable.svelte.d.ts +0 -49
- package/dist/table/ToggleMenu.svelte +0 -376
- package/dist/table/ToggleMenu.svelte.d.ts +0 -11
- package/dist/table/index.d.ts +0 -74
- package/dist/table/index.js +0 -38
- package/dist/theme/ThemeControl.svelte +0 -53
- package/dist/theme/ThemeControl.svelte.d.ts +0 -9
- package/dist/theme/index.d.ts +0 -29
- package/dist/theme/index.js +0 -79
- package/dist/theme/themes.mjs +0 -285
- package/dist/time.d.ts +0 -4
- package/dist/time.js +0 -70
- package/dist/tooltip/TooltipContent.svelte +0 -58
- package/dist/tooltip/TooltipContent.svelte.d.ts +0 -31
- package/dist/tooltip/index.d.ts +0 -2
- package/dist/tooltip/index.js +0 -2
- package/dist/tooltip/types.d.ts +0 -8
- package/dist/tooltip/types.js +0 -1
- package/dist/trajectory/Trajectory.svelte +0 -1517
- package/dist/trajectory/Trajectory.svelte.d.ts +0 -77
- package/dist/trajectory/TrajectoryError.svelte +0 -128
- package/dist/trajectory/TrajectoryError.svelte.d.ts +0 -13
- package/dist/trajectory/TrajectoryExportPane.svelte +0 -357
- package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +0 -17
- package/dist/trajectory/TrajectoryInfoPane.svelte +0 -387
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +0 -17
- package/dist/trajectory/constants.d.ts +0 -6
- package/dist/trajectory/constants.js +0 -7
- package/dist/trajectory/extract.d.ts +0 -5
- package/dist/trajectory/extract.js +0 -162
- package/dist/trajectory/format-detect.d.ts +0 -9
- package/dist/trajectory/format-detect.js +0 -76
- package/dist/trajectory/frame-reader.d.ts +0 -17
- package/dist/trajectory/frame-reader.js +0 -332
- package/dist/trajectory/helpers.d.ts +0 -14
- package/dist/trajectory/helpers.js +0 -172
- package/dist/trajectory/index.d.ts +0 -63
- package/dist/trajectory/index.js +0 -126
- package/dist/trajectory/parse/ase.d.ts +0 -2
- package/dist/trajectory/parse/ase.js +0 -77
- package/dist/trajectory/parse/hdf5.d.ts +0 -2
- package/dist/trajectory/parse/hdf5.js +0 -129
- package/dist/trajectory/parse/index.d.ts +0 -12
- package/dist/trajectory/parse/index.js +0 -299
- package/dist/trajectory/parse/lammps.d.ts +0 -5
- package/dist/trajectory/parse/lammps.js +0 -179
- package/dist/trajectory/parse/vasp.d.ts +0 -2
- package/dist/trajectory/parse/vasp.js +0 -68
- package/dist/trajectory/parse/xyz.d.ts +0 -2
- package/dist/trajectory/parse/xyz.js +0 -110
- package/dist/trajectory/plotting.d.ts +0 -28
- package/dist/trajectory/plotting.js +0 -423
- package/dist/trajectory/types.d.ts +0 -11
- package/dist/trajectory/types.js +0 -1
- package/dist/utils.d.ts +0 -5
- package/dist/utils.js +0 -36
- package/dist/xrd/XrdPlot.svelte +0 -615
- package/dist/xrd/XrdPlot.svelte.d.ts +0 -28
- package/dist/xrd/broadening.d.ts +0 -20
- package/dist/xrd/broadening.js +0 -97
- package/dist/xrd/calc-xrd.d.ts +0 -37
- package/dist/xrd/calc-xrd.js +0 -337
- package/dist/xrd/index.d.ts +0 -37
- package/dist/xrd/index.js +0 -4
- package/dist/xrd/parse.d.ts +0 -13
- package/dist/xrd/parse.js +0 -749
- /package/dist/{EmptyState.svelte → src/lib/EmptyState.svelte} +0 -0
- /package/dist/{Icon.svelte → src/lib/Icon.svelte} +0 -0
- /package/dist/{chempot-diagram → src/lib/chempot-diagram}/ChemPotScene3D.svelte +0 -0
- /package/dist/{colors → src/lib/colors}/alloy-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/dark-mode-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/jmol-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/muted-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/pastel-colors.json +0 -0
- /package/dist/{colors → src/lib/colors}/vesta-colors.json +0 -0
- /package/dist/{element → src/lib/element}/Nucleus.svelte +0 -0
- /package/dist/{element → src/lib/element}/data.json +0 -0
- /package/dist/{element → src/lib/element}/data.json.gz +0 -0
- /package/dist/{element → src/lib/element}/data.schema.json +0 -0
- /package/dist/{element-image-urls.json → src/lib/element-image-urls.json} +0 -0
- /package/dist/{feedback → src/lib/feedback}/Spinner.svelte +0 -0
- /package/dist/{feedback → src/lib/feedback}/StatusMessage.svelte +0 -0
- /package/dist/{periodic-table → src/lib/periodic-table}/TableInset.svelte +0 -0
- /package/dist/{plot → src/lib/plot}/ReferenceLine.svelte +0 -0
- /package/dist/{xrd → src/lib/xrd}/atomic_scattering_params.json +0 -0
|
@@ -1,813 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { D3InterpolateName } from '../colors'
|
|
3
|
-
import type { CompositionType } from '../composition'
|
|
4
|
-
import { normalize_show_controls } from '../controls'
|
|
5
|
-
import { sanitize_html } from '../sanitize'
|
|
6
|
-
import type { ElementSymbol } from '../element'
|
|
7
|
-
import { ClickFeedback, DragOverlay } from '../feedback'
|
|
8
|
-
import Icon from '../Icon.svelte'
|
|
9
|
-
import type { D3SymbolName } from '../labels'
|
|
10
|
-
import { symbol_map } from '../labels'
|
|
11
|
-
import { set_fullscreen_bg, setup_fullscreen_effect } from '../layout'
|
|
12
|
-
import type {
|
|
13
|
-
AxisConfig,
|
|
14
|
-
ScatterHandlerEvent,
|
|
15
|
-
ScatterHandlerProps,
|
|
16
|
-
UserContentProps,
|
|
17
|
-
} from '../plot'
|
|
18
|
-
import { ScatterPlot } from '../plot'
|
|
19
|
-
import { DEFAULTS } from '../settings'
|
|
20
|
-
import type { AnyStructure } from '../structure'
|
|
21
|
-
import { SvelteMap } from 'svelte/reactivity'
|
|
22
|
-
import ConvexHullControls from './ConvexHullControls.svelte'
|
|
23
|
-
import ConvexHullInfoPane from './ConvexHullInfoPane.svelte'
|
|
24
|
-
import ConvexHullTooltip from './ConvexHullTooltip.svelte'
|
|
25
|
-
import GasPressureControls from './GasPressureControls.svelte'
|
|
26
|
-
import * as helpers from './helpers'
|
|
27
|
-
import type { BaseConvexHullProps } from './index'
|
|
28
|
-
import { CONVEX_HULL_STYLE, default_controls, default_hull_config } from './index'
|
|
29
|
-
import StructurePopup from './StructurePopup.svelte'
|
|
30
|
-
import TemperatureSlider from './TemperatureSlider.svelte'
|
|
31
|
-
import * as thermo from './thermodynamics'
|
|
32
|
-
import type {
|
|
33
|
-
ConvexHullEntry,
|
|
34
|
-
HighlightStyle,
|
|
35
|
-
HoverData3D,
|
|
36
|
-
PhaseData,
|
|
37
|
-
} from './types'
|
|
38
|
-
import { compute_hull_stability, is_unary_entry } from './helpers'
|
|
39
|
-
|
|
40
|
-
// Binary convex hull rendered as energy vs composition (x in [0, 1])
|
|
41
|
-
let {
|
|
42
|
-
entries = [],
|
|
43
|
-
controls = {},
|
|
44
|
-
config = {},
|
|
45
|
-
on_point_click,
|
|
46
|
-
on_point_hover,
|
|
47
|
-
fullscreen = $bindable(DEFAULTS.convex_hull.binary.fullscreen),
|
|
48
|
-
enable_info_pane = true,
|
|
49
|
-
wrapper = $bindable(),
|
|
50
|
-
label_threshold = 50,
|
|
51
|
-
show_stable = $bindable(DEFAULTS.convex_hull.binary.show_stable),
|
|
52
|
-
show_unstable = $bindable(DEFAULTS.convex_hull.binary.show_unstable),
|
|
53
|
-
color_mode = $bindable(DEFAULTS.convex_hull.binary.color_mode),
|
|
54
|
-
color_scale = $bindable(
|
|
55
|
-
DEFAULTS.convex_hull.binary.color_scale as D3InterpolateName,
|
|
56
|
-
),
|
|
57
|
-
info_pane_open = $bindable(DEFAULTS.convex_hull.binary.info_pane_open),
|
|
58
|
-
legend_pane_open = $bindable(DEFAULTS.convex_hull.binary.legend_pane_open),
|
|
59
|
-
max_hull_dist_show_phases = $bindable(
|
|
60
|
-
DEFAULTS.convex_hull.binary.max_hull_dist_show_phases,
|
|
61
|
-
),
|
|
62
|
-
max_hull_dist_show_labels = $bindable(
|
|
63
|
-
DEFAULTS.convex_hull.binary.max_hull_dist_show_labels,
|
|
64
|
-
),
|
|
65
|
-
show_stable_labels = $bindable(DEFAULTS.convex_hull.binary.show_stable_labels),
|
|
66
|
-
show_unstable_labels = $bindable(
|
|
67
|
-
DEFAULTS.convex_hull.binary.show_unstable_labels,
|
|
68
|
-
),
|
|
69
|
-
on_file_drop,
|
|
70
|
-
enable_click_selection = true,
|
|
71
|
-
enable_structure_preview = true,
|
|
72
|
-
energy_source_mode = $bindable(`precomputed`),
|
|
73
|
-
phase_stats = $bindable(null),
|
|
74
|
-
display = $bindable({ x_grid: false, y_grid: false }),
|
|
75
|
-
stable_entries = $bindable([]),
|
|
76
|
-
unstable_entries = $bindable([]),
|
|
77
|
-
highlighted_entries = $bindable([]),
|
|
78
|
-
highlight_style = {},
|
|
79
|
-
x_axis = {},
|
|
80
|
-
y_axis = {},
|
|
81
|
-
selected_entry = $bindable(null),
|
|
82
|
-
temperature = $bindable(),
|
|
83
|
-
interpolate_temperature = true,
|
|
84
|
-
max_interpolation_gap = 500,
|
|
85
|
-
gas_config,
|
|
86
|
-
gas_pressures = $bindable({}),
|
|
87
|
-
children,
|
|
88
|
-
tooltip: custom_tooltip,
|
|
89
|
-
...rest
|
|
90
|
-
}: BaseConvexHullProps<ConvexHullEntry> & {
|
|
91
|
-
highlight_style?: HighlightStyle
|
|
92
|
-
x_axis?: AxisConfig
|
|
93
|
-
y_axis?: AxisConfig
|
|
94
|
-
} = $props()
|
|
95
|
-
|
|
96
|
-
const merged_controls = $derived({ ...default_controls, ...controls })
|
|
97
|
-
const controls_config = $derived(normalize_show_controls(merged_controls.show))
|
|
98
|
-
const merged_config = $derived({
|
|
99
|
-
...default_hull_config,
|
|
100
|
-
point_size: 6, // Binary diagrams use slightly smaller points
|
|
101
|
-
...config,
|
|
102
|
-
colors: { ...default_hull_config.colors, ...(config.colors || {}) },
|
|
103
|
-
margin: { t: 40, r: 40, b: 60, l: 60, ...(config.margin || {}) },
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
// Merge highlight style with defaults (consistent with 3D/4D)
|
|
107
|
-
const merged_highlight_style = $derived(
|
|
108
|
-
helpers.merge_highlight_style(highlight_style),
|
|
109
|
-
)
|
|
110
|
-
|
|
111
|
-
// Helper to check if entry is highlighted
|
|
112
|
-
const is_highlighted = (entry: ConvexHullEntry): boolean =>
|
|
113
|
-
helpers.is_entry_highlighted(entry, highlighted_entries)
|
|
114
|
-
|
|
115
|
-
// Temperature-dependent free energy support
|
|
116
|
-
const { has_temp_data, available_temperatures } = $derived(
|
|
117
|
-
helpers.analyze_temperature_data(entries),
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
// Initialize or reset temperature when it's undefined or no longer valid
|
|
121
|
-
$effect(() => {
|
|
122
|
-
if (
|
|
123
|
-
has_temp_data &&
|
|
124
|
-
available_temperatures.length > 0 &&
|
|
125
|
-
(temperature === undefined || !available_temperatures.includes(temperature))
|
|
126
|
-
) temperature = available_temperatures[0]
|
|
127
|
-
})
|
|
128
|
-
|
|
129
|
-
// Filter entries by temperature when in temperature mode
|
|
130
|
-
const temp_filtered_entries = $derived(
|
|
131
|
-
has_temp_data && temperature !== undefined
|
|
132
|
-
? helpers.filter_entries_at_temperature(entries, temperature, {
|
|
133
|
-
interpolate: interpolate_temperature,
|
|
134
|
-
max_interpolation_gap,
|
|
135
|
-
})
|
|
136
|
-
: entries,
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
// Gas-dependent chemical potential support (corrections based on T, P)
|
|
140
|
-
const {
|
|
141
|
-
entries: gas_corrected_entries,
|
|
142
|
-
analysis: gas_analysis,
|
|
143
|
-
merged_config: merged_gas_config,
|
|
144
|
-
} = $derived(
|
|
145
|
-
helpers.get_gas_corrected_entries(
|
|
146
|
-
temp_filtered_entries,
|
|
147
|
-
gas_config,
|
|
148
|
-
gas_pressures,
|
|
149
|
-
temperature ?? helpers.DEFAULT_GAS_TEMP,
|
|
150
|
-
),
|
|
151
|
-
)
|
|
152
|
-
|
|
153
|
-
let { // Compute energy mode information
|
|
154
|
-
has_precomputed_e_form,
|
|
155
|
-
has_precomputed_hull,
|
|
156
|
-
can_compute_e_form,
|
|
157
|
-
can_compute_hull,
|
|
158
|
-
energy_mode,
|
|
159
|
-
unary_refs,
|
|
160
|
-
} = $derived(
|
|
161
|
-
helpers.compute_energy_mode_info(
|
|
162
|
-
gas_corrected_entries,
|
|
163
|
-
thermo.find_lowest_energy_unary_refs,
|
|
164
|
-
energy_source_mode,
|
|
165
|
-
),
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
const effective_entries = $derived(
|
|
169
|
-
helpers.get_effective_entries(
|
|
170
|
-
gas_corrected_entries,
|
|
171
|
-
energy_mode,
|
|
172
|
-
unary_refs,
|
|
173
|
-
thermo.compute_e_form_per_atom,
|
|
174
|
-
),
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
// Process data and element set
|
|
178
|
-
const pd_data = $derived(thermo.process_hull_entries(effective_entries))
|
|
179
|
-
|
|
180
|
-
const polymorph_stats_map = $derived(
|
|
181
|
-
helpers.compute_all_polymorph_stats(effective_entries),
|
|
182
|
-
) // Pre-compute polymorph stats once for O(1) tooltip lookups
|
|
183
|
-
|
|
184
|
-
const elements = $derived.by(() => {
|
|
185
|
-
if (pd_data.elements.length > 2) {
|
|
186
|
-
console.error(
|
|
187
|
-
`ConvexHull2D: Dataset contains ${pd_data.elements.length} elements, but binary diagrams require exactly 2. Found: [${
|
|
188
|
-
pd_data.elements.join(`, `)
|
|
189
|
-
}]`,
|
|
190
|
-
)
|
|
191
|
-
return []
|
|
192
|
-
}
|
|
193
|
-
return pd_data.elements
|
|
194
|
-
})
|
|
195
|
-
|
|
196
|
-
// Coordinate computation ----------------------------------------------------
|
|
197
|
-
function compute_binary_coordinates(
|
|
198
|
-
raw_entries: PhaseData[],
|
|
199
|
-
elems: ElementSymbol[],
|
|
200
|
-
): ConvexHullEntry[] {
|
|
201
|
-
if (elems.length !== 2) return []
|
|
202
|
-
const [el1, el2] = elems
|
|
203
|
-
const coords: ConvexHullEntry[] = []
|
|
204
|
-
for (const entry of raw_entries) {
|
|
205
|
-
// Require formation energy per atom to place along y
|
|
206
|
-
const e_form = entry.e_form_per_atom
|
|
207
|
-
if (typeof e_form !== `number`) continue
|
|
208
|
-
const total = Object.values(entry.composition).reduce((s, v) => s + v, 0)
|
|
209
|
-
if (total <= 0) continue
|
|
210
|
-
const frac_b = (entry.composition[el2] || 0) / total
|
|
211
|
-
const is_element = is_unary_entry(entry)
|
|
212
|
-
coords.push({ ...entry, x: frac_b, y: e_form, z: 0, is_element, visible: true })
|
|
213
|
-
}
|
|
214
|
-
// Ensure elemental references at x=0 and x=1 with y=0 to close the hull
|
|
215
|
-
const el_a: ConvexHullEntry | undefined = coords.find((e) =>
|
|
216
|
-
e.is_element && e.x === 0
|
|
217
|
-
)
|
|
218
|
-
const el_b: ConvexHullEntry | undefined = coords.find((e) =>
|
|
219
|
-
e.is_element && e.x === 1
|
|
220
|
-
)
|
|
221
|
-
if (!el_a) {
|
|
222
|
-
coords.push({
|
|
223
|
-
composition: { [el1]: 1 } as CompositionType,
|
|
224
|
-
energy: 0,
|
|
225
|
-
x: 0,
|
|
226
|
-
y: 0,
|
|
227
|
-
z: 0,
|
|
228
|
-
is_element: true,
|
|
229
|
-
visible: true,
|
|
230
|
-
})
|
|
231
|
-
}
|
|
232
|
-
if (!el_b) {
|
|
233
|
-
coords.push({
|
|
234
|
-
composition: { [el2]: 1 } as CompositionType,
|
|
235
|
-
energy: 0,
|
|
236
|
-
x: 1,
|
|
237
|
-
y: 0,
|
|
238
|
-
z: 0,
|
|
239
|
-
is_element: true,
|
|
240
|
-
visible: true,
|
|
241
|
-
})
|
|
242
|
-
}
|
|
243
|
-
return coords
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
const coords_entries = $derived.by(() => {
|
|
247
|
-
if (elements.length !== 2) return []
|
|
248
|
-
try {
|
|
249
|
-
return compute_binary_coordinates(pd_data.entries, elements)
|
|
250
|
-
} catch (error) {
|
|
251
|
-
console.error(`Error computing binary coordinates:`, error)
|
|
252
|
-
return []
|
|
253
|
-
}
|
|
254
|
-
})
|
|
255
|
-
|
|
256
|
-
// Compute hull and enrich entries with e_above_hull (before filtering)
|
|
257
|
-
const { all_enriched_entries, hull_points } = $derived.by(() => {
|
|
258
|
-
if (coords_entries.length === 0) {
|
|
259
|
-
return { all_enriched_entries: [], hull_points: [] }
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Build lower hull input: one minimum-energy point per composition x.
|
|
263
|
-
// Excluded entries don't participate in hull construction.
|
|
264
|
-
const min_y_by_x = new SvelteMap<number, number>()
|
|
265
|
-
for (const entry of coords_entries) {
|
|
266
|
-
if (entry.exclude_from_hull) continue
|
|
267
|
-
const current_min_y = min_y_by_x.get(entry.x)
|
|
268
|
-
if (current_min_y === undefined || entry.y < current_min_y) {
|
|
269
|
-
min_y_by_x.set(entry.x, entry.y)
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
const hull_input = [...min_y_by_x].map(([x_coord, min_y]) => ({
|
|
274
|
-
x: x_coord,
|
|
275
|
-
y: min_y,
|
|
276
|
-
}))
|
|
277
|
-
const hull_points = thermo.compute_lower_hull_2d(hull_input)
|
|
278
|
-
|
|
279
|
-
const all_enriched_entries = coords_entries.map((entry) => {
|
|
280
|
-
const y_hull = thermo.interpolate_hull_2d(hull_points, entry.x)
|
|
281
|
-
const raw_dist = y_hull == null ? 0 : entry.y - y_hull
|
|
282
|
-
return {
|
|
283
|
-
...entry, ...compute_hull_stability(raw_dist, entry.exclude_from_hull), visible: true,
|
|
284
|
-
}
|
|
285
|
-
})
|
|
286
|
-
return { all_enriched_entries, hull_points }
|
|
287
|
-
})
|
|
288
|
-
|
|
289
|
-
// Auto threshold: show all for few entries, use default for many, interpolate between
|
|
290
|
-
const max_hull_dist_in_data = $derived(
|
|
291
|
-
helpers.calc_max_hull_dist_in_data(all_enriched_entries),
|
|
292
|
-
)
|
|
293
|
-
const auto_default_threshold = $derived(helpers.compute_auto_hull_dist_threshold(
|
|
294
|
-
all_enriched_entries.length,
|
|
295
|
-
max_hull_dist_in_data,
|
|
296
|
-
DEFAULTS.convex_hull.binary.max_hull_dist_show_phases,
|
|
297
|
-
))
|
|
298
|
-
|
|
299
|
-
// Initialize threshold to auto value on first load
|
|
300
|
-
let initialized = $state(false)
|
|
301
|
-
$effect(() => {
|
|
302
|
-
if (!initialized && all_enriched_entries.length > 0) {
|
|
303
|
-
initialized = true
|
|
304
|
-
max_hull_dist_show_phases = auto_default_threshold
|
|
305
|
-
}
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
// Filter by threshold and compute visibility
|
|
309
|
-
const plot_entries = $derived(
|
|
310
|
-
all_enriched_entries
|
|
311
|
-
.filter((e) =>
|
|
312
|
-
e.is_stable || (e.e_above_hull ?? 0) <= max_hull_dist_show_phases
|
|
313
|
-
)
|
|
314
|
-
.map((e) => ({
|
|
315
|
-
...e,
|
|
316
|
-
visible: (e.is_stable && show_stable) || (!e.is_stable && show_unstable),
|
|
317
|
-
})),
|
|
318
|
-
)
|
|
319
|
-
|
|
320
|
-
// Update bindable entries arrays when plot_entries change (single pass)
|
|
321
|
-
$effect(() => {
|
|
322
|
-
const stable: ConvexHullEntry[] = []
|
|
323
|
-
const unstable: ConvexHullEntry[] = []
|
|
324
|
-
for (const entry of plot_entries) {
|
|
325
|
-
if (entry.is_stable) stable.push(entry)
|
|
326
|
-
else unstable.push(entry)
|
|
327
|
-
}
|
|
328
|
-
stable_entries = stable
|
|
329
|
-
unstable_entries = unstable
|
|
330
|
-
})
|
|
331
|
-
|
|
332
|
-
let reset_counter = $state(0)
|
|
333
|
-
// Drag and drop state (to match 3D/4D components)
|
|
334
|
-
let drag_over = $state(false)
|
|
335
|
-
// Copy feedback state
|
|
336
|
-
let copy_feedback = $state({ visible: false, position: { x: 0, y: 0 } })
|
|
337
|
-
|
|
338
|
-
// Structure popup state
|
|
339
|
-
let structure_popup = $state<{
|
|
340
|
-
open: boolean
|
|
341
|
-
structure: AnyStructure | null
|
|
342
|
-
entry: ConvexHullEntry | null
|
|
343
|
-
place_right: boolean
|
|
344
|
-
}>({
|
|
345
|
-
open: false,
|
|
346
|
-
structure: null,
|
|
347
|
-
entry: null,
|
|
348
|
-
place_right: true,
|
|
349
|
-
})
|
|
350
|
-
|
|
351
|
-
// Axis mapping helpers ------------------------------------------------------
|
|
352
|
-
const x_domain = $derived<[number, number]>([0, 1])
|
|
353
|
-
const y_domain = $derived.by((): [number, number] => {
|
|
354
|
-
const ys = plot_entries.map((entry) => entry.y)
|
|
355
|
-
if (ys.length === 0) return [-1, 0]
|
|
356
|
-
const min_y_data = Math.min(...ys)
|
|
357
|
-
const max_y_data = Math.max(...ys)
|
|
358
|
-
const span = Math.max(1e-9, max_y_data - min_y_data)
|
|
359
|
-
const pad = 0.05 * span
|
|
360
|
-
return [min_y_data - pad, max_y_data + pad]
|
|
361
|
-
})
|
|
362
|
-
|
|
363
|
-
// Build ScatterPlot series --------------------------------------------------
|
|
364
|
-
|
|
365
|
-
// Map MarkerSymbol to D3SymbolName (type-safe via symbol_map lookup)
|
|
366
|
-
const marker_to_d3_symbol = (marker?: string): D3SymbolName | undefined => {
|
|
367
|
-
if (!marker) return undefined
|
|
368
|
-
const name = marker.charAt(0).toUpperCase() + marker.slice(1)
|
|
369
|
-
return name in symbol_map ? (name as D3SymbolName) : undefined
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
// Pre-compute visible entries to avoid redundant filtering
|
|
373
|
-
const visible_entries = $derived(plot_entries.filter((e) => e.visible))
|
|
374
|
-
|
|
375
|
-
const scatter_points_series = $derived.by(() => {
|
|
376
|
-
const is_energy_mode = color_mode === `energy`
|
|
377
|
-
const count = visible_entries.length
|
|
378
|
-
|
|
379
|
-
// Single pass: extract x, y, color_values, and point_style simultaneously
|
|
380
|
-
const x_vals: number[] = new Array(count)
|
|
381
|
-
const y_vals: number[] = new Array(count)
|
|
382
|
-
const color_values: number[] = is_energy_mode ? new Array(count) : []
|
|
383
|
-
const point_style = new Array(count)
|
|
384
|
-
|
|
385
|
-
for (let idx = 0; idx < count; idx++) {
|
|
386
|
-
const entry = visible_entries[idx]
|
|
387
|
-
x_vals[idx] = entry.x
|
|
388
|
-
y_vals[idx] = entry.y
|
|
389
|
-
if (is_energy_mode) color_values[idx] = entry.e_above_hull ?? 0
|
|
390
|
-
|
|
391
|
-
const is_stable = entry.is_stable || entry.e_above_hull === 0
|
|
392
|
-
const base_radius = entry.size || (is_stable ? 6 : 4)
|
|
393
|
-
const hl = is_highlighted(entry) ? merged_highlight_style : null
|
|
394
|
-
|
|
395
|
-
point_style[idx] = {
|
|
396
|
-
fill: hl && (hl.effect === `color` || hl.effect === `both`)
|
|
397
|
-
? hl.color
|
|
398
|
-
: is_energy_mode
|
|
399
|
-
? undefined
|
|
400
|
-
: merged_config.colors?.[is_stable ? `stable` : `unstable`],
|
|
401
|
-
stroke: is_stable ? `#ffffff` : `#000000`,
|
|
402
|
-
radius: hl && (hl.effect === `size` || hl.effect === `both`)
|
|
403
|
-
? base_radius * hl.size_multiplier
|
|
404
|
-
: base_radius,
|
|
405
|
-
symbol_type: marker_to_d3_symbol(entry.marker),
|
|
406
|
-
is_highlighted: !!hl,
|
|
407
|
-
highlight_effect: hl?.effect,
|
|
408
|
-
highlight_color: hl?.color,
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
return {
|
|
413
|
-
x: x_vals,
|
|
414
|
-
y: y_vals,
|
|
415
|
-
metadata: visible_entries,
|
|
416
|
-
markers: `points` as const,
|
|
417
|
-
point_style,
|
|
418
|
-
...(is_energy_mode ? { color_values } : {}),
|
|
419
|
-
}
|
|
420
|
-
})
|
|
421
|
-
|
|
422
|
-
const hull_segments_series = $derived.by(() => {
|
|
423
|
-
if (!merged_config.show_hull || hull_points.length < 2) return []
|
|
424
|
-
const segments = []
|
|
425
|
-
for (let idx = 0; idx < hull_points.length - 1; idx++) {
|
|
426
|
-
const p1 = hull_points[idx]
|
|
427
|
-
const p2 = hull_points[idx + 1]
|
|
428
|
-
segments.push({
|
|
429
|
-
x: [p1.x, p2.x] as const,
|
|
430
|
-
y: [p1.y, p2.y] as const,
|
|
431
|
-
markers: `line` as const,
|
|
432
|
-
line_style: {
|
|
433
|
-
stroke: CONVEX_HULL_STYLE.structure_line.color,
|
|
434
|
-
stroke_width: CONVEX_HULL_STYLE.structure_line.line_width,
|
|
435
|
-
line_dash: `${CONVEX_HULL_STYLE.structure_line.dash[0]},${
|
|
436
|
-
CONVEX_HULL_STYLE.structure_line.dash[1]
|
|
437
|
-
}`,
|
|
438
|
-
},
|
|
439
|
-
})
|
|
440
|
-
}
|
|
441
|
-
return segments
|
|
442
|
-
})
|
|
443
|
-
|
|
444
|
-
const scatter_series = $derived([scatter_points_series, ...hull_segments_series])
|
|
445
|
-
|
|
446
|
-
// Map selected_entry to ScatterPlot point index (series_idx: 0 = points series)
|
|
447
|
-
// Use object identity comparison (e === entry) instead of entry_id comparison
|
|
448
|
-
// because synthetic elemental entries lack entry_id, and undefined === undefined
|
|
449
|
-
// would incorrectly match the first entry with undefined entry_id
|
|
450
|
-
const selected_scatter_point = $derived.by(() => {
|
|
451
|
-
const entry = selected_entry
|
|
452
|
-
if (!entry) return null
|
|
453
|
-
const idx = visible_entries.findIndex((vis_entry) => vis_entry === entry)
|
|
454
|
-
return idx >= 0 ? { series_idx: 0, point_idx: idx } : null
|
|
455
|
-
})
|
|
456
|
-
|
|
457
|
-
// Convex hull statistics - compute internally and expose via bindable prop
|
|
458
|
-
$effect(() => {
|
|
459
|
-
phase_stats = thermo.get_convex_hull_stats(plot_entries, elements, 3)
|
|
460
|
-
})
|
|
461
|
-
|
|
462
|
-
function extract_structure_from_entry(
|
|
463
|
-
entry: ConvexHullEntry,
|
|
464
|
-
): AnyStructure | null {
|
|
465
|
-
if (!entry.entry_id) return null
|
|
466
|
-
const orig_entry = entries.find((ent) => ent.entry_id === entry.entry_id)
|
|
467
|
-
return orig_entry?.structure as AnyStructure || null
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
function reset_all() {
|
|
471
|
-
fullscreen = DEFAULTS.convex_hull.binary.fullscreen
|
|
472
|
-
info_pane_open = DEFAULTS.convex_hull.binary.info_pane_open
|
|
473
|
-
legend_pane_open = DEFAULTS.convex_hull.binary.legend_pane_open
|
|
474
|
-
color_mode = DEFAULTS.convex_hull.binary.color_mode
|
|
475
|
-
color_scale = DEFAULTS.convex_hull.binary.color_scale as D3InterpolateName
|
|
476
|
-
show_stable = DEFAULTS.convex_hull.binary.show_stable
|
|
477
|
-
show_unstable = DEFAULTS.convex_hull.binary.show_unstable
|
|
478
|
-
show_stable_labels = DEFAULTS.convex_hull.binary.show_stable_labels
|
|
479
|
-
show_unstable_labels = DEFAULTS.convex_hull.binary.show_unstable_labels
|
|
480
|
-
// Use auto-computed threshold based on entry count instead of static default
|
|
481
|
-
max_hull_dist_show_phases = auto_default_threshold
|
|
482
|
-
max_hull_dist_show_labels = DEFAULTS.convex_hull.binary.max_hull_dist_show_labels
|
|
483
|
-
reset_counter += 1
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
// Track whether any settings differ from defaults (to show/hide reset button)
|
|
487
|
-
// Must match all properties that reset_all() resets
|
|
488
|
-
// Use auto_default_threshold for comparison since that's the effective default
|
|
489
|
-
const has_changes_to_reset = $derived(
|
|
490
|
-
fullscreen !== DEFAULTS.convex_hull.binary.fullscreen ||
|
|
491
|
-
info_pane_open !== DEFAULTS.convex_hull.binary.info_pane_open ||
|
|
492
|
-
legend_pane_open !== DEFAULTS.convex_hull.binary.legend_pane_open ||
|
|
493
|
-
color_mode !== DEFAULTS.convex_hull.binary.color_mode ||
|
|
494
|
-
color_scale !== DEFAULTS.convex_hull.binary.color_scale ||
|
|
495
|
-
show_stable !== DEFAULTS.convex_hull.binary.show_stable ||
|
|
496
|
-
show_unstable !== DEFAULTS.convex_hull.binary.show_unstable ||
|
|
497
|
-
show_stable_labels !== DEFAULTS.convex_hull.binary.show_stable_labels ||
|
|
498
|
-
show_unstable_labels !== DEFAULTS.convex_hull.binary.show_unstable_labels ||
|
|
499
|
-
// Compare with auto-computed threshold, with small tolerance for floating point
|
|
500
|
-
Math.abs(max_hull_dist_show_phases - auto_default_threshold) > 0.001 ||
|
|
501
|
-
max_hull_dist_show_labels !==
|
|
502
|
-
DEFAULTS.convex_hull.binary.max_hull_dist_show_labels,
|
|
503
|
-
)
|
|
504
|
-
|
|
505
|
-
// Custom hover tooltip state used with ScatterPlot events
|
|
506
|
-
let hover_data = $state<HoverData3D<ConvexHullEntry> | null>(null)
|
|
507
|
-
|
|
508
|
-
const handle_keydown = (event: KeyboardEvent) => {
|
|
509
|
-
if ((event.target as HTMLElement).tagName.match(/INPUT|TEXTAREA/)) return
|
|
510
|
-
const actions: Record<string, () => void> = {
|
|
511
|
-
b: () => color_mode = color_mode === `stability` ? `energy` : `stability`,
|
|
512
|
-
s: () => show_stable = !show_stable,
|
|
513
|
-
u: () => show_unstable = !show_unstable,
|
|
514
|
-
l: () => show_stable_labels = !show_stable_labels,
|
|
515
|
-
}
|
|
516
|
-
actions[event.key.toLowerCase()]?.()
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
async function handle_file_drop(event: DragEvent): Promise<void> {
|
|
520
|
-
drag_over = false
|
|
521
|
-
const data = await helpers.parse_hull_entries_from_drop(event)
|
|
522
|
-
if (data) on_file_drop?.(data)
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
async function copy_entry_data(
|
|
526
|
-
entry: ConvexHullEntry,
|
|
527
|
-
position: { x: number; y: number },
|
|
528
|
-
) {
|
|
529
|
-
await helpers.copy_entry_to_clipboard(entry, position, (visible, pos) => {
|
|
530
|
-
copy_feedback.visible = visible
|
|
531
|
-
copy_feedback.position = pos
|
|
532
|
-
})
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
function close_structure_popup() {
|
|
536
|
-
structure_popup = { open: false, structure: null, entry: null, place_right: true }
|
|
537
|
-
selected_entry = null
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
// Track last clicked entry for double-click detection
|
|
541
|
-
let last_clicked_entry: ConvexHullEntry | null = null
|
|
542
|
-
let last_click_time = 0
|
|
543
|
-
|
|
544
|
-
function handle_point_click_internal(data: ScatterHandlerEvent<ConvexHullEntry>) {
|
|
545
|
-
const { metadata: entry, event } = data
|
|
546
|
-
if (!entry) return
|
|
547
|
-
|
|
548
|
-
const now = Date.now()
|
|
549
|
-
const is_double_click = last_clicked_entry === entry &&
|
|
550
|
-
now - last_click_time < 300
|
|
551
|
-
|
|
552
|
-
if (is_double_click) {
|
|
553
|
-
// Double-click: copy to clipboard
|
|
554
|
-
copy_entry_data(entry, { x: event.clientX, y: event.clientY })
|
|
555
|
-
last_clicked_entry = null
|
|
556
|
-
last_click_time = 0
|
|
557
|
-
} else {
|
|
558
|
-
// Single click: select entry and optionally show structure preview
|
|
559
|
-
last_clicked_entry = entry
|
|
560
|
-
last_click_time = now
|
|
561
|
-
|
|
562
|
-
on_point_click?.(entry)
|
|
563
|
-
if (enable_click_selection) {
|
|
564
|
-
selected_entry = entry
|
|
565
|
-
if (enable_structure_preview) {
|
|
566
|
-
const structure = extract_structure_from_entry(entry)
|
|
567
|
-
if (structure) {
|
|
568
|
-
const viewport_width = globalThis.innerWidth
|
|
569
|
-
const click_x = event.clientX
|
|
570
|
-
const space_on_right = viewport_width - click_x
|
|
571
|
-
const space_on_left = click_x
|
|
572
|
-
const place_right = space_on_right >= space_on_left
|
|
573
|
-
|
|
574
|
-
structure_popup = { open: true, structure, entry, place_right }
|
|
575
|
-
event.stopPropagation()
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
// Fullscreen handling
|
|
583
|
-
$effect(() => {
|
|
584
|
-
setup_fullscreen_effect(fullscreen, wrapper)
|
|
585
|
-
set_fullscreen_bg(wrapper, fullscreen, `--hull-2d-bg-fullscreen`)
|
|
586
|
-
})
|
|
587
|
-
|
|
588
|
-
let style = $derived(
|
|
589
|
-
`--hull-stable-color:${merged_config.colors?.stable || `#0072B2`};
|
|
590
|
-
--hull-unstable-color:${merged_config.colors?.unstable || `#E69F00`};
|
|
591
|
-
--hull-edge-color:${merged_config.colors?.edge || `var(--text-color, #212121)`};
|
|
592
|
-
--hull-text-color:${
|
|
593
|
-
merged_config.colors?.annotation || `var(--text-color, #212121)`
|
|
594
|
-
};`,
|
|
595
|
-
)
|
|
596
|
-
</script>
|
|
597
|
-
|
|
598
|
-
<svelte:document
|
|
599
|
-
onfullscreenchange={() => {
|
|
600
|
-
fullscreen = Boolean(document.fullscreenElement)
|
|
601
|
-
}}
|
|
602
|
-
/>
|
|
603
|
-
|
|
604
|
-
<!-- Hover tooltip matching 3D/4D style (content only; container handled by ScatterPlot) -->
|
|
605
|
-
{#snippet tooltip(point: ScatterHandlerProps<ConvexHullEntry>)}
|
|
606
|
-
{@const entry = point.metadata}
|
|
607
|
-
{@const entry_highlight = entry && is_highlighted(entry)
|
|
608
|
-
? merged_highlight_style
|
|
609
|
-
: undefined}
|
|
610
|
-
{#if entry}
|
|
611
|
-
<ConvexHullTooltip
|
|
612
|
-
{entry}
|
|
613
|
-
{polymorph_stats_map}
|
|
614
|
-
highlight_style={entry_highlight}
|
|
615
|
-
tooltip={custom_tooltip}
|
|
616
|
-
/>
|
|
617
|
-
{/if}
|
|
618
|
-
{/snippet}
|
|
619
|
-
|
|
620
|
-
{#snippet pd_header_controls()}
|
|
621
|
-
{#if controls_config.mode !== `never` && !structure_popup.open}
|
|
622
|
-
{#if has_changes_to_reset && controls_config.visible(`reset`)}
|
|
623
|
-
<button
|
|
624
|
-
type="button"
|
|
625
|
-
onclick={reset_all}
|
|
626
|
-
title="Reset view and settings"
|
|
627
|
-
class="control-btn reset-camera-btn"
|
|
628
|
-
>
|
|
629
|
-
<Icon icon="Reset" />
|
|
630
|
-
</button>
|
|
631
|
-
{/if}
|
|
632
|
-
|
|
633
|
-
{#if enable_info_pane && phase_stats && controls_config.visible(`info-pane`)}
|
|
634
|
-
<ConvexHullInfoPane
|
|
635
|
-
bind:pane_open={info_pane_open}
|
|
636
|
-
{phase_stats}
|
|
637
|
-
{stable_entries}
|
|
638
|
-
{unstable_entries}
|
|
639
|
-
{max_hull_dist_show_phases}
|
|
640
|
-
{max_hull_dist_show_labels}
|
|
641
|
-
{label_threshold}
|
|
642
|
-
toggle_props={{ class: `control-btn info-btn` }}
|
|
643
|
-
/>
|
|
644
|
-
{/if}
|
|
645
|
-
|
|
646
|
-
{#if controls_config.visible(`controls`)}
|
|
647
|
-
<ConvexHullControls
|
|
648
|
-
bind:controls_open={legend_pane_open}
|
|
649
|
-
bind:color_mode
|
|
650
|
-
bind:color_scale
|
|
651
|
-
bind:show_stable
|
|
652
|
-
bind:show_unstable
|
|
653
|
-
bind:show_stable_labels
|
|
654
|
-
bind:show_unstable_labels
|
|
655
|
-
bind:max_hull_dist_show_phases
|
|
656
|
-
bind:max_hull_dist_show_labels
|
|
657
|
-
{max_hull_dist_in_data}
|
|
658
|
-
{stable_entries}
|
|
659
|
-
{unstable_entries}
|
|
660
|
-
{merged_controls}
|
|
661
|
-
toggle_props={{ class: `control-btn legend-controls-btn` }}
|
|
662
|
-
bind:energy_source_mode
|
|
663
|
-
{has_precomputed_e_form}
|
|
664
|
-
{can_compute_e_form}
|
|
665
|
-
{has_precomputed_hull}
|
|
666
|
-
{can_compute_hull}
|
|
667
|
-
/>
|
|
668
|
-
{/if}
|
|
669
|
-
{/if}
|
|
670
|
-
{/snippet}
|
|
671
|
-
|
|
672
|
-
{#snippet user_content(
|
|
673
|
-
{ x_scale_fn, pad, height, y_scale_fn, y_range, width }: UserContentProps,
|
|
674
|
-
)}
|
|
675
|
-
{@const [x0, x1, y0] = [x_scale_fn(0), x_scale_fn(1), y_scale_fn(y_range[0])]}
|
|
676
|
-
{@const stroke = {
|
|
677
|
-
stroke: `var(--scatter-grid-stroke, gray)`,
|
|
678
|
-
'stroke-width': `var(--scatter-grid-width, 0.4)`,
|
|
679
|
-
'stroke-dasharray': `var(--scatter-grid-dash, 4)`,
|
|
680
|
-
}}
|
|
681
|
-
<line y1={pad.t} y2={height - pad.b} x1={x0} x2={x0} {...stroke} />
|
|
682
|
-
<line y1={pad.t} y2={height - pad.b} {x1} x2={x1} {...stroke} />
|
|
683
|
-
<line x1={pad.l} x2={width - pad.r} y1={y0} y2={y0} {...stroke} />
|
|
684
|
-
{/snippet}
|
|
685
|
-
{#key reset_counter}
|
|
686
|
-
<ScatterPlot
|
|
687
|
-
{...rest}
|
|
688
|
-
class="convex-hull-2d {rest.class ?? ``} {drag_over ? `dragover` : ``}"
|
|
689
|
-
style={`${style}; ${rest.style ?? ``}`}
|
|
690
|
-
data-has-selection={selected_entry !== null}
|
|
691
|
-
bind:wrapper
|
|
692
|
-
bind:fullscreen
|
|
693
|
-
role="application"
|
|
694
|
-
tabindex={-1}
|
|
695
|
-
onkeydown={handle_keydown}
|
|
696
|
-
ondrop={handle_file_drop}
|
|
697
|
-
ondragover={(event) => {
|
|
698
|
-
event.preventDefault()
|
|
699
|
-
drag_over = true
|
|
700
|
-
}}
|
|
701
|
-
ondragleave={(event) => {
|
|
702
|
-
event.preventDefault()
|
|
703
|
-
drag_over = false
|
|
704
|
-
}}
|
|
705
|
-
aria-label="Binary convex hull visualization"
|
|
706
|
-
series={scatter_series}
|
|
707
|
-
bind:display
|
|
708
|
-
controls={{ show: false }}
|
|
709
|
-
x_axis={{
|
|
710
|
-
label: elements.length === 2 ? `x in ${elements[0]}₁₋ₓ ${elements[1]}ₓ` : `x`,
|
|
711
|
-
range: x_domain,
|
|
712
|
-
ticks: 4,
|
|
713
|
-
...x_axis,
|
|
714
|
-
}}
|
|
715
|
-
y_axis={{
|
|
716
|
-
label: `E<sub>form</sub> (eV/atom)`,
|
|
717
|
-
range: y_domain,
|
|
718
|
-
ticks: 4,
|
|
719
|
-
label_shift: { y: 15 },
|
|
720
|
-
...y_axis,
|
|
721
|
-
}}
|
|
722
|
-
legend={null}
|
|
723
|
-
color_bar={{
|
|
724
|
-
title: `E<sub>above hull</sub> (eV/atom)`,
|
|
725
|
-
bar_style: `width: 220px; height: 16px;`,
|
|
726
|
-
}}
|
|
727
|
-
{tooltip}
|
|
728
|
-
{user_content}
|
|
729
|
-
header_controls={pd_header_controls}
|
|
730
|
-
selected_point={selected_scatter_point}
|
|
731
|
-
on_point_click={handle_point_click_internal}
|
|
732
|
-
on_point_hover={(data: ScatterHandlerEvent<ConvexHullEntry> | null) => {
|
|
733
|
-
if (!data) {
|
|
734
|
-
hover_data = null
|
|
735
|
-
on_point_hover?.(null)
|
|
736
|
-
return
|
|
737
|
-
}
|
|
738
|
-
const { metadata: entry, event } = data
|
|
739
|
-
hover_data = entry
|
|
740
|
-
? { entry, position: { x: event.clientX, y: event.clientY } }
|
|
741
|
-
: null
|
|
742
|
-
on_point_hover?.(hover_data)
|
|
743
|
-
}}
|
|
744
|
-
padding={{ t: 30, b: 60, l: 60, r: 30 }}
|
|
745
|
-
>
|
|
746
|
-
{@render children?.({
|
|
747
|
-
stable_entries,
|
|
748
|
-
unstable_entries,
|
|
749
|
-
highlighted_entries,
|
|
750
|
-
selected_entry,
|
|
751
|
-
})}
|
|
752
|
-
<h3 style="position: absolute; left: 1em; top: 1ex; margin: 0">
|
|
753
|
-
{@html sanitize_html(merged_controls.title || phase_stats?.chemical_system || ``)}
|
|
754
|
-
</h3>
|
|
755
|
-
|
|
756
|
-
<ClickFeedback
|
|
757
|
-
bind:visible={copy_feedback.visible}
|
|
758
|
-
position={copy_feedback.position}
|
|
759
|
-
/>
|
|
760
|
-
<DragOverlay visible={drag_over} />
|
|
761
|
-
|
|
762
|
-
{#if has_temp_data && temperature !== undefined}
|
|
763
|
-
<TemperatureSlider {available_temperatures} bind:temperature />
|
|
764
|
-
{/if}
|
|
765
|
-
|
|
766
|
-
{#if gas_analysis.has_gas_dependent_elements && merged_gas_config}
|
|
767
|
-
<GasPressureControls
|
|
768
|
-
config={merged_gas_config}
|
|
769
|
-
bind:pressures={gas_pressures}
|
|
770
|
-
temperature={temperature ?? 300}
|
|
771
|
-
/>
|
|
772
|
-
{/if}
|
|
773
|
-
|
|
774
|
-
{#if structure_popup.open && structure_popup.structure}
|
|
775
|
-
<StructurePopup
|
|
776
|
-
structure={structure_popup.structure}
|
|
777
|
-
place_right={structure_popup.place_right}
|
|
778
|
-
stats={{
|
|
779
|
-
id: structure_popup.entry?.entry_id,
|
|
780
|
-
e_above_hull: structure_popup.entry?.e_above_hull,
|
|
781
|
-
e_form: structure_popup.entry?.e_form_per_atom,
|
|
782
|
-
}}
|
|
783
|
-
onclose={close_structure_popup}
|
|
784
|
-
/>
|
|
785
|
-
{/if}
|
|
786
|
-
</ScatterPlot>
|
|
787
|
-
{/key}
|
|
788
|
-
|
|
789
|
-
<style>
|
|
790
|
-
:global(.convex-hull-2d:fullscreen) {
|
|
791
|
-
background: var(--hull-2d-bg-fullscreen, var(--hull-2d-bg, var(--hull-bg)))
|
|
792
|
-
!important;
|
|
793
|
-
overflow: hidden;
|
|
794
|
-
}
|
|
795
|
-
:global(.convex-hull-2d.dragover) {
|
|
796
|
-
border: 2px dashed var(--accent-color, #1976d2) !important;
|
|
797
|
-
}
|
|
798
|
-
/* Styles for control buttons rendered via header_controls snippet */
|
|
799
|
-
:global(.convex-hull-2d .control-btn) {
|
|
800
|
-
background: transparent;
|
|
801
|
-
border: none;
|
|
802
|
-
padding: 4px;
|
|
803
|
-
cursor: pointer;
|
|
804
|
-
border-radius: 3px;
|
|
805
|
-
color: var(--text-color, currentColor);
|
|
806
|
-
transition: background-color 0.2s, opacity 0.2s;
|
|
807
|
-
display: flex;
|
|
808
|
-
font-size: clamp(0.85em, 2cqmin, 1.3em);
|
|
809
|
-
}
|
|
810
|
-
:global(.convex-hull-2d .control-btn:hover) {
|
|
811
|
-
background-color: color-mix(in srgb, currentColor 8%, transparent);
|
|
812
|
-
}
|
|
813
|
-
</style>
|