matterviz 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brillouin/BrillouinZone.svelte +68 -145
- package/dist/brillouin/BrillouinZone.svelte.d.ts +5 -14
- package/dist/brillouin/BrillouinZoneExportPane.svelte +43 -96
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +1 -1
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +9 -32
- package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +2 -3
- package/dist/brillouin/BrillouinZoneScene.svelte +49 -203
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +3 -23
- package/dist/brillouin/ReciprocalVectors.svelte +39 -0
- package/dist/brillouin/ReciprocalVectors.svelte.d.ts +9 -0
- package/dist/brillouin/compute.d.ts +2 -0
- package/dist/brillouin/compute.js +80 -77
- package/dist/brillouin/geometry.d.ts +8 -0
- package/dist/brillouin/geometry.js +57 -0
- package/dist/brillouin/index.d.ts +2 -0
- package/dist/brillouin/index.js +2 -0
- package/dist/brillouin/types.d.ts +2 -2
- package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +100 -191
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +4 -1
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +176 -464
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +7 -1
- package/dist/chempot-diagram/color.d.ts +3 -6
- package/dist/chempot-diagram/color.js +5 -5
- package/dist/chempot-diagram/compute.d.ts +3 -3
- package/dist/chempot-diagram/compute.js +3 -1
- package/dist/chempot-diagram/controls-state.svelte.d.ts +10 -0
- package/dist/chempot-diagram/controls-state.svelte.js +42 -0
- package/dist/chempot-diagram/export.d.ts +47 -0
- package/dist/chempot-diagram/export.js +133 -0
- package/dist/chempot-diagram/index.d.ts +1 -0
- package/dist/chempot-diagram/index.js +1 -0
- package/dist/chempot-diagram/pointer.d.ts +0 -10
- package/dist/chempot-diagram/pointer.js +4 -4
- package/dist/chempot-diagram/types.d.ts +3 -3
- package/dist/colors/index.js +2 -2
- package/dist/composition/FormulaFilter.svelte +6 -5
- package/dist/composition/PieChart.svelte +5 -5
- package/dist/composition/chem-sys.js +3 -2
- package/dist/composition/format.js +3 -2
- package/dist/composition/parse.d.ts +0 -1
- package/dist/composition/parse.js +17 -19
- package/dist/controls.d.ts +1 -0
- package/dist/controls.js +0 -1
- package/dist/convex-hull/ConvexHull.svelte +8 -10
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -4
- package/dist/convex-hull/ConvexHull2D.svelte +94 -175
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +176 -680
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +180 -680
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullChrome.svelte +268 -0
- package/dist/convex-hull/ConvexHullChrome.svelte.d.ts +30 -0
- package/dist/convex-hull/ConvexHullControls.svelte +88 -7
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +7 -6
- package/dist/convex-hull/ConvexHullInfoPane.svelte +18 -5
- package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +6 -5
- package/dist/convex-hull/ConvexHullStats.svelte +29 -168
- package/dist/convex-hull/ConvexHullStats.svelte.d.ts +3 -1
- package/dist/convex-hull/ConvexHullTooltip.svelte +11 -2
- package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +2 -1
- package/dist/convex-hull/barycentric-coords.d.ts +2 -4
- package/dist/convex-hull/barycentric-coords.js +6 -33
- package/dist/convex-hull/canvas-interactions.svelte.d.ts +79 -0
- package/dist/convex-hull/canvas-interactions.svelte.js +278 -0
- package/dist/convex-hull/helpers.d.ts +39 -7
- package/dist/convex-hull/helpers.js +154 -69
- package/dist/convex-hull/hull-state.svelte.d.ts +44 -0
- package/dist/convex-hull/hull-state.svelte.js +124 -0
- package/dist/convex-hull/index.d.ts +9 -7
- package/dist/convex-hull/index.js +7 -2
- package/dist/convex-hull/thermodynamics.js +91 -920
- package/dist/convex-hull/types.d.ts +12 -4
- package/dist/convex-hull/types.js +12 -0
- package/dist/coordination/CoordinationBarPlot.svelte +4 -11
- package/dist/element/BohrAtom.svelte +2 -1
- package/dist/element/ElementTile.svelte.d.ts +1 -1
- package/dist/element/index.d.ts +4 -0
- package/dist/element/index.js +18 -0
- package/dist/feedback/DragOverlay.svelte +3 -1
- package/dist/feedback/DragOverlay.svelte.d.ts +1 -0
- package/dist/feedback/StatusMessage.svelte +13 -3
- package/dist/fermi-surface/FermiSurface.svelte +67 -146
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +5 -14
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceScene.svelte +72 -224
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +3 -23
- package/dist/fermi-surface/compute.js +11 -10
- package/dist/fermi-surface/export.js +4 -15
- package/dist/fermi-surface/index.d.ts +0 -1
- package/dist/fermi-surface/index.js +0 -1
- package/dist/fermi-surface/parse.d.ts +1 -1
- package/dist/fermi-surface/parse.js +64 -75
- package/dist/fermi-surface/types.d.ts +2 -2
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +55 -40
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +4 -3
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +3 -2
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +5 -5
- package/dist/heatmap-matrix/index.d.ts +3 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/io/ExportPane.svelte +166 -0
- package/dist/io/ExportPane.svelte.d.ts +17 -0
- package/dist/io/decompress.js +1 -2
- package/dist/io/export.d.ts +5 -1
- package/dist/io/export.js +32 -28
- package/dist/io/fetch.d.ts +2 -1
- package/dist/io/file-drop.d.ts +7 -0
- package/dist/io/file-drop.js +13 -0
- package/dist/io/index.d.ts +2 -0
- package/dist/io/index.js +10 -0
- package/dist/io/types.d.ts +13 -0
- package/dist/isosurface/parse.js +46 -44
- package/dist/labels.js +1 -1
- package/dist/layout/FullscreenButton.svelte +33 -0
- package/dist/layout/FullscreenButton.svelte.d.ts +10 -0
- package/dist/layout/FullscreenToggle.svelte +8 -14
- package/dist/layout/ViewerChrome.svelte +116 -0
- package/dist/layout/ViewerChrome.svelte.d.ts +17 -0
- package/dist/layout/fullscreen.d.ts +4 -0
- package/dist/layout/fullscreen.svelte.d.ts +8 -0
- package/dist/layout/fullscreen.svelte.js +37 -0
- package/dist/layout/index.d.ts +3 -0
- package/dist/layout/index.js +3 -0
- package/dist/math.d.ts +7 -3
- package/dist/math.js +18 -21
- package/dist/overlays/index.d.ts +4 -0
- package/dist/periodic-table/PeriodicTable.svelte +9 -8
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramControls.svelte +3 -2
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +4 -3
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +2 -1
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +2 -3
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +47 -132
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +3 -4
- package/dist/phase-diagram/colors.js +1 -1
- package/dist/phase-diagram/parse.d.ts +2 -1
- package/dist/plot/bar/BarPlot.svelte +79 -316
- package/dist/plot/bar/BarPlot.svelte.d.ts +7 -15
- package/dist/plot/bar/BarPlotControls.svelte.d.ts +1 -1
- package/dist/plot/bar/SpacegroupBarPlot.svelte +2 -1
- package/dist/plot/box/BoxPlot.svelte +76 -246
- package/dist/plot/box/BoxPlot.svelte.d.ts +4 -3
- package/dist/plot/box/BoxPlotControls.svelte.d.ts +1 -1
- package/dist/plot/box/Violin.svelte.d.ts +1 -1
- package/dist/plot/box/box-plot.d.ts +3 -2
- package/dist/plot/box/box-plot.js +5 -2
- package/dist/plot/box/kde.d.ts +2 -1
- package/dist/plot/box/kde.js +4 -4
- package/dist/plot/core/auto-place.d.ts +1 -1
- package/dist/plot/core/auto-place.js +4 -1
- package/dist/plot/core/components/ColorBar.svelte +5 -5
- package/dist/plot/core/components/ColorBar.svelte.d.ts +5 -4
- package/dist/plot/core/components/Line.svelte +3 -2
- package/dist/plot/core/components/Line.svelte.d.ts +3 -2
- package/dist/plot/core/components/PlotAxis.svelte +2 -1
- package/dist/plot/core/components/PlotAxis.svelte.d.ts +2 -1
- package/dist/plot/core/components/PlotControls.svelte.d.ts +1 -1
- package/dist/plot/core/components/ReferenceLine3D.svelte +2 -2
- package/dist/plot/core/components/ReferenceLine3D.svelte.d.ts +4 -4
- package/dist/plot/core/components/ReferencePlane.svelte +2 -2
- package/dist/plot/core/components/ReferencePlane.svelte.d.ts +4 -4
- package/dist/plot/core/data-cleaning.js +18 -18
- package/dist/plot/core/fill-utils.d.ts +4 -3
- package/dist/plot/core/fill-utils.js +6 -3
- package/dist/plot/core/interactions.d.ts +5 -1
- package/dist/plot/core/interactions.js +14 -0
- package/dist/plot/core/pan-zoom.svelte.d.ts +35 -0
- package/dist/plot/core/pan-zoom.svelte.js +221 -0
- package/dist/plot/core/placed-tween.svelte.d.ts +21 -0
- package/dist/plot/core/placed-tween.svelte.js +68 -0
- package/dist/plot/core/reference-line.d.ts +10 -10
- package/dist/plot/core/reference-line.js +6 -6
- package/dist/plot/core/scales.d.ts +17 -25
- package/dist/plot/core/scales.js +10 -8
- package/dist/plot/core/svg.d.ts +2 -1
- package/dist/plot/core/types.d.ts +18 -7
- package/dist/plot/core/utils/label-placement.d.ts +1 -1
- package/dist/plot/core/utils/label-placement.js +3 -3
- package/dist/plot/core/utils.d.ts +2 -1
- package/dist/plot/histogram/Histogram.svelte +77 -314
- package/dist/plot/histogram/HistogramControls.svelte.d.ts +1 -1
- package/dist/plot/sankey/Sankey.svelte +2 -5
- package/dist/plot/sankey/Sankey.svelte.d.ts +1 -1
- package/dist/plot/sankey/sankey.js +3 -1
- package/dist/plot/scatter/BinnedScatterPlot.svelte +3 -5
- package/dist/plot/scatter/BinnedScatterPlot.svelte.d.ts +4 -4
- package/dist/plot/scatter/ScatterPlot.svelte +160 -450
- package/dist/plot/scatter/ScatterPlot.svelte.d.ts +7 -15
- package/dist/plot/scatter/ScatterPlotControls.svelte.d.ts +1 -1
- package/dist/plot/scatter/binned-scatter-types.d.ts +4 -11
- package/dist/plot/scatter/index.d.ts +1 -1
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte +15 -26
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte.d.ts +6 -14
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte +9 -10
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte.d.ts +5 -5
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte +122 -121
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte.d.ts +5 -14
- package/dist/plot/scatter-3d/Surface3D.svelte +6 -5
- package/dist/plot/scatter-3d/Surface3D.svelte.d.ts +4 -3
- package/dist/plot/sunburst/Sunburst.svelte +16 -20
- package/dist/plot/sunburst/Sunburst.svelte.d.ts +4 -3
- package/dist/plot/sunburst/SunburstControls.svelte.d.ts +1 -1
- package/dist/plot/sunburst/sunburst.js +4 -1
- package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
- package/dist/sanitize.js +13 -2
- package/dist/scene/SceneCamera.svelte +62 -0
- package/dist/scene/SceneCamera.svelte.d.ts +19 -0
- package/dist/scene/bind-renderer.svelte.d.ts +2 -0
- package/dist/scene/bind-renderer.svelte.js +14 -0
- package/dist/scene/index.d.ts +4 -0
- package/dist/scene/index.js +5 -0
- package/dist/scene/props.js +52 -0
- package/dist/scene/types.d.ts +26 -0
- package/dist/scene/types.js +1 -0
- package/dist/settings.d.ts +14 -2
- package/dist/settings.js +59 -1
- package/dist/spectral/Bands.svelte +8 -7
- package/dist/spectral/Bands.svelte.d.ts +3 -2
- package/dist/spectral/BandsAndDos.svelte +22 -24
- package/dist/spectral/BrillouinBandsDos.svelte +3 -3
- package/dist/spectral/Dos.svelte +5 -4
- package/dist/spectral/Dos.svelte.d.ts +2 -1
- package/dist/spectral/helpers.d.ts +6 -6
- package/dist/spectral/helpers.js +43 -37
- package/dist/state.svelte.d.ts +0 -7
- package/dist/state.svelte.js +0 -6
- package/dist/structure/Arrow.svelte +2 -4
- package/dist/structure/AtomLegend.svelte.d.ts +1 -1
- package/dist/structure/CanvasTooltip.svelte +1 -0
- package/dist/structure/CellSelect.svelte +11 -3
- package/dist/structure/CellSelect.svelte.d.ts +2 -1
- package/dist/structure/Lattice.svelte +2 -2
- package/dist/structure/Structure.svelte +291 -355
- package/dist/structure/Structure.svelte.d.ts +5 -15
- package/dist/structure/StructureControls.svelte +217 -2
- package/dist/structure/StructureControls.svelte.d.ts +5 -3
- package/dist/structure/StructureExportPane.svelte +54 -156
- package/dist/structure/StructureExportPane.svelte.d.ts +4 -5
- package/dist/structure/StructureInfoPane.svelte +5 -3
- package/dist/structure/StructureInfoPane.svelte.d.ts +5 -5
- package/dist/structure/StructureScene.svelte +365 -198
- package/dist/structure/StructureScene.svelte.d.ts +22 -20
- package/dist/structure/{label-placement.d.ts → atom-label-placement.d.ts} +3 -3
- package/dist/structure/{label-placement.js → atom-label-placement.js} +12 -2
- package/dist/structure/atom-properties.d.ts +1 -1
- package/dist/structure/atom-properties.js +11 -16
- package/dist/structure/bond-order-perception.js +2 -4
- package/dist/structure/bonding.d.ts +3 -0
- package/dist/structure/bonding.js +91 -48
- package/dist/structure/export.d.ts +24 -4
- package/dist/structure/export.js +64 -122
- package/dist/structure/index.d.ts +2 -0
- package/dist/structure/index.js +2 -0
- package/dist/structure/parse.d.ts +3 -2
- package/dist/structure/parse.js +333 -370
- package/dist/structure/partial-occupancy.d.ts +0 -1
- package/dist/structure/partial-occupancy.js +1 -1
- package/dist/structure/pbc.d.ts +1 -1
- package/dist/structure/pbc.js +186 -13
- package/dist/structure/polyhedra.d.ts +41 -0
- package/dist/structure/polyhedra.js +602 -0
- package/dist/structure/site.d.ts +4 -0
- package/dist/structure/site.js +1 -0
- package/dist/structure/supercell.js +3 -2
- package/dist/structure/validation.js +5 -6
- package/dist/symmetry/SymmetryElementControls.svelte +69 -0
- package/dist/symmetry/SymmetryElementControls.svelte.d.ts +9 -0
- package/dist/symmetry/SymmetryElements.svelte +354 -0
- package/dist/symmetry/SymmetryElements.svelte.d.ts +24 -0
- package/dist/symmetry/SymmetryStats.svelte +111 -6
- package/dist/symmetry/WyckoffTable.svelte +68 -7
- package/dist/symmetry/WyckoffTable.svelte.d.ts +3 -0
- package/dist/symmetry/cell-transform.js +7 -14
- package/dist/symmetry/index.d.ts +14 -4
- package/dist/symmetry/index.js +301 -80
- package/dist/symmetry/spacegroups.d.ts +5 -1
- package/dist/symmetry/spacegroups.js +15 -1
- package/dist/symmetry/symmetry-elements.d.ts +33 -0
- package/dist/symmetry/symmetry-elements.js +521 -0
- package/dist/symmetry/wyckoff-db.d.ts +9 -0
- package/dist/symmetry/wyckoff-db.js +87 -0
- package/dist/table/HeatmapTable.svelte +4 -15
- package/dist/table/HeatmapTable.svelte.d.ts +1 -1
- package/dist/trajectory/Trajectory.svelte +58 -61
- package/dist/trajectory/Trajectory.svelte.d.ts +10 -22
- package/dist/trajectory/TrajectoryExportPane.svelte +15 -24
- package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +4 -5
- package/dist/trajectory/TrajectoryInfoPane.svelte +3 -2
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +3 -2
- package/dist/trajectory/constants.js +6 -2
- package/dist/trajectory/extract.js +17 -37
- package/dist/trajectory/format-detect.d.ts +0 -1
- package/dist/trajectory/format-detect.js +3 -9
- package/dist/trajectory/frame-reader.d.ts +0 -1
- package/dist/trajectory/frame-reader.js +62 -128
- package/dist/trajectory/helpers.d.ts +10 -2
- package/dist/trajectory/helpers.js +56 -36
- package/dist/trajectory/parse/ase.d.ts +9 -1
- package/dist/trajectory/parse/ase.js +47 -32
- package/dist/trajectory/parse/diagnostics.d.ts +3 -0
- package/dist/trajectory/parse/diagnostics.js +14 -0
- package/dist/trajectory/parse/index.d.ts +1 -1
- package/dist/trajectory/parse/index.js +54 -102
- package/dist/trajectory/parse/lammps.d.ts +0 -2
- package/dist/trajectory/parse/lammps.js +8 -6
- package/dist/trajectory/parse/pymatgen.d.ts +2 -0
- package/dist/trajectory/parse/pymatgen.js +74 -0
- package/dist/trajectory/parse/vasp.js +4 -3
- package/dist/trajectory/parse/xyz.d.ts +9 -21
- package/dist/trajectory/parse/xyz.js +28 -33
- package/dist/trajectory/plotting.d.ts +0 -1
- package/dist/trajectory/plotting.js +3 -100
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +1 -1
- package/dist/xrd/XrdPlot.svelte +14 -29
- package/dist/xrd/broadening.d.ts +2 -1
- package/dist/xrd/calc-xrd.js +6 -11
- package/dist/xrd/index.d.ts +2 -2
- package/package.json +29 -16
- package/dist/element/data.json +0 -11864
- package/dist/fermi-surface/marching-cubes.d.ts +0 -2
- package/dist/fermi-surface/marching-cubes.js +0 -2
- package/dist/plot/core/hover-lock.svelte.d.ts +0 -14
- package/dist/plot/core/hover-lock.svelte.js +0 -45
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
import Icon from '../Icon.svelte'
|
|
9
9
|
import type { D3SymbolName } from '../labels'
|
|
10
10
|
import { symbol_map } from '../labels'
|
|
11
|
-
import { set_fullscreen_bg, setup_fullscreen_effect } from '../layout'
|
|
11
|
+
import { FullscreenButton, set_fullscreen_bg, setup_fullscreen_effect } from '../layout'
|
|
12
|
+
import type { Point2D, Vec2 } from '../math'
|
|
12
13
|
import type {
|
|
13
14
|
AxisConfig,
|
|
14
15
|
PointStyle,
|
|
@@ -25,6 +26,7 @@
|
|
|
25
26
|
import ConvexHullTooltip from './ConvexHullTooltip.svelte'
|
|
26
27
|
import GasPressureControls from './GasPressureControls.svelte'
|
|
27
28
|
import * as helpers from './helpers'
|
|
29
|
+
import { create_hull_data_pipeline } from './hull-state.svelte'
|
|
28
30
|
import type { BaseConvexHullProps } from './index'
|
|
29
31
|
import { CONVEX_HULL_STYLE, default_controls, default_hull_config } from './index'
|
|
30
32
|
import StructurePopup from './StructurePopup.svelte'
|
|
@@ -36,27 +38,31 @@
|
|
|
36
38
|
HoverData3D,
|
|
37
39
|
PhaseData,
|
|
38
40
|
} from './types'
|
|
39
|
-
import {
|
|
41
|
+
import { MAGNETIC_ORDERING_CATEGORY } from './types'
|
|
40
42
|
|
|
41
43
|
// Binary convex hull rendered as energy vs composition (x in [0, 1])
|
|
42
44
|
let {
|
|
43
45
|
entries = [],
|
|
44
46
|
controls = {},
|
|
45
47
|
config = {},
|
|
48
|
+
show_controls,
|
|
46
49
|
on_point_click,
|
|
47
50
|
on_point_hover,
|
|
48
51
|
fullscreen = $bindable(DEFAULTS.convex_hull.binary.fullscreen),
|
|
52
|
+
fullscreen_toggle = true,
|
|
49
53
|
enable_info_pane = true,
|
|
50
54
|
wrapper = $bindable(),
|
|
51
55
|
label_threshold = 50,
|
|
52
56
|
show_stable = $bindable(DEFAULTS.convex_hull.binary.show_stable),
|
|
53
57
|
show_unstable = $bindable(DEFAULTS.convex_hull.binary.show_unstable),
|
|
58
|
+
entry_category = MAGNETIC_ORDERING_CATEGORY,
|
|
59
|
+
hidden_categories = $bindable([]),
|
|
54
60
|
color_mode = $bindable(DEFAULTS.convex_hull.binary.color_mode),
|
|
55
61
|
color_scale = $bindable(
|
|
56
62
|
DEFAULTS.convex_hull.binary.color_scale as D3InterpolateName,
|
|
57
63
|
),
|
|
58
64
|
info_pane_open = $bindable(DEFAULTS.convex_hull.binary.info_pane_open),
|
|
59
|
-
|
|
65
|
+
controls_open = $bindable(DEFAULTS.convex_hull.binary.legend_pane_open),
|
|
60
66
|
max_hull_dist_show_phases = $bindable(
|
|
61
67
|
DEFAULTS.convex_hull.binary.max_hull_dist_show_phases,
|
|
62
68
|
),
|
|
@@ -95,7 +101,7 @@
|
|
|
95
101
|
} = $props()
|
|
96
102
|
|
|
97
103
|
const merged_controls = $derived({ ...default_controls, ...controls })
|
|
98
|
-
const controls_config = $derived(normalize_show_controls(
|
|
104
|
+
const controls_config = $derived(normalize_show_controls(show_controls))
|
|
99
105
|
const merged_config = $derived({
|
|
100
106
|
...default_hull_config,
|
|
101
107
|
point_size: 6, // Binary diagrams use slightly smaller points
|
|
@@ -104,6 +110,12 @@
|
|
|
104
110
|
margin: { t: 40, r: 40, b: 60, l: 60, ...config.margin },
|
|
105
111
|
})
|
|
106
112
|
|
|
113
|
+
// Narrow deriveds to primitive fields so heavy downstream deriveds (scatter series,
|
|
114
|
+
// hull segments) don't recompute whenever the broad merged_config object is recreated.
|
|
115
|
+
const stable_color = $derived(merged_config.colors?.stable)
|
|
116
|
+
const unstable_color = $derived(merged_config.colors?.unstable)
|
|
117
|
+
const show_hull_line = $derived(merged_config.show_hull)
|
|
118
|
+
|
|
107
119
|
// Merge highlight style with defaults (consistent with 3D/4D)
|
|
108
120
|
const merged_highlight_style = $derived(
|
|
109
121
|
helpers.merge_highlight_style(highlight_style),
|
|
@@ -113,86 +125,35 @@
|
|
|
113
125
|
const is_highlighted = (entry: ConvexHullEntry): boolean =>
|
|
114
126
|
helpers.is_entry_highlighted(entry, highlighted_entries)
|
|
115
127
|
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
)
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
// Gas-dependent chemical potential support (corrections based on T, P)
|
|
141
|
-
const {
|
|
142
|
-
entries: gas_corrected_entries,
|
|
143
|
-
analysis: gas_analysis,
|
|
144
|
-
merged_config: merged_gas_config,
|
|
145
|
-
} = $derived(
|
|
146
|
-
helpers.get_gas_corrected_entries(
|
|
147
|
-
temp_filtered_entries,
|
|
148
|
-
gas_config,
|
|
149
|
-
gas_pressures,
|
|
150
|
-
temperature ?? helpers.DEFAULT_GAS_TEMP,
|
|
151
|
-
),
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
let { // Compute energy mode information
|
|
155
|
-
has_precomputed_e_form,
|
|
156
|
-
has_precomputed_hull,
|
|
157
|
-
can_compute_e_form,
|
|
158
|
-
can_compute_hull,
|
|
159
|
-
energy_mode,
|
|
160
|
-
unary_refs,
|
|
161
|
-
} = $derived(
|
|
162
|
-
helpers.compute_energy_mode_info(
|
|
163
|
-
gas_corrected_entries,
|
|
164
|
-
thermo.find_lowest_energy_unary_refs,
|
|
165
|
-
energy_source_mode,
|
|
166
|
-
),
|
|
167
|
-
)
|
|
168
|
-
|
|
169
|
-
const effective_entries = $derived(
|
|
170
|
-
helpers.get_effective_entries(
|
|
171
|
-
gas_corrected_entries,
|
|
172
|
-
energy_mode,
|
|
173
|
-
unary_refs,
|
|
174
|
-
thermo.compute_e_form_per_atom,
|
|
175
|
-
),
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
// Process data and element set
|
|
179
|
-
const pd_data = $derived(thermo.process_hull_entries(effective_entries))
|
|
180
|
-
|
|
181
|
-
const polymorph_stats_map = $derived(
|
|
182
|
-
helpers.compute_all_polymorph_stats(effective_entries),
|
|
183
|
-
) // Pre-compute polymorph stats once for O(1) tooltip lookups
|
|
184
|
-
|
|
185
|
-
const elements = $derived.by(() => {
|
|
186
|
-
if (pd_data.elements.length > 2) {
|
|
187
|
-
console.error(
|
|
188
|
-
`ConvexHull2D: Dataset contains ${pd_data.elements.length} elements, but binary diagrams require exactly 2. Found: [${
|
|
189
|
-
pd_data.elements.join(`, `)
|
|
190
|
-
}]`,
|
|
191
|
-
)
|
|
192
|
-
return []
|
|
193
|
-
}
|
|
194
|
-
return pd_data.elements
|
|
128
|
+
// Shared reactive data pipeline (temperature → gas → energy mode → hull data → threshold)
|
|
129
|
+
// Explicit generic breaks the circular type inference through the all_enriched_entries thunk
|
|
130
|
+
const hull_data = create_hull_data_pipeline<ConvexHullEntry>({
|
|
131
|
+
dim: 2,
|
|
132
|
+
entries: () => entries,
|
|
133
|
+
temperature: () => temperature,
|
|
134
|
+
interpolate_temperature: () => interpolate_temperature,
|
|
135
|
+
max_interpolation_gap: () => max_interpolation_gap,
|
|
136
|
+
gas_config: () => gas_config,
|
|
137
|
+
gas_pressures: () => gas_pressures,
|
|
138
|
+
energy_source_mode: () => energy_source_mode,
|
|
139
|
+
all_enriched_entries: () => all_enriched_entries,
|
|
140
|
+
max_hull_dist_show_phases: () => max_hull_dist_show_phases,
|
|
141
|
+
show_stable: () => show_stable,
|
|
142
|
+
show_unstable: () => show_unstable,
|
|
143
|
+
entry_category: () => entry_category,
|
|
144
|
+
hidden_categories: () => hidden_categories,
|
|
145
|
+
keep_plot_entry: (entry, max_dist) =>
|
|
146
|
+
helpers.entry_is_stable(entry) || (entry.e_above_hull ?? 0) <= max_dist,
|
|
147
|
+
set_temperature: (next_temp) => temperature = next_temp,
|
|
148
|
+
set_max_hull_dist_show_phases: (value) => max_hull_dist_show_phases = value,
|
|
149
|
+
set_stable_entries: (value) => stable_entries = value,
|
|
150
|
+
set_unstable_entries: (value) => unstable_entries = value,
|
|
195
151
|
})
|
|
152
|
+
const merged_gas_config = $derived(hull_data.merged_gas_config)
|
|
153
|
+
const elements = $derived(hull_data.elements)
|
|
154
|
+
const auto_default_threshold = $derived(hull_data.auto_default_threshold)
|
|
155
|
+
const plot_entries = $derived(hull_data.plot_entries)
|
|
156
|
+
const visible_entries = $derived(hull_data.visible_entries)
|
|
196
157
|
|
|
197
158
|
// Coordinate computation ----------------------------------------------------
|
|
198
159
|
function compute_binary_coordinates(
|
|
@@ -209,7 +170,7 @@
|
|
|
209
170
|
const total = Object.values(entry.composition).reduce((sum, amount) => sum + amount, 0)
|
|
210
171
|
if (total <= 0) continue
|
|
211
172
|
const frac_b = (entry.composition[el2] || 0) / total
|
|
212
|
-
const is_element = is_unary_entry(entry)
|
|
173
|
+
const is_element = helpers.is_unary_entry(entry)
|
|
213
174
|
coords.push({ ...entry, x: frac_b, y: e_form, z: 0, is_element })
|
|
214
175
|
}
|
|
215
176
|
// Ensure elemental references at x=0 and x=1 with y=0 to close the hull
|
|
@@ -234,7 +195,7 @@
|
|
|
234
195
|
const coords_entries = $derived.by(() => {
|
|
235
196
|
if (elements.length !== 2) return []
|
|
236
197
|
try {
|
|
237
|
-
return compute_binary_coordinates(pd_data.entries, elements)
|
|
198
|
+
return compute_binary_coordinates(hull_data.pd_data.entries, elements)
|
|
238
199
|
} catch (error) {
|
|
239
200
|
console.error(`Error computing binary coordinates:`, error)
|
|
240
201
|
return []
|
|
@@ -242,10 +203,12 @@
|
|
|
242
203
|
})
|
|
243
204
|
|
|
244
205
|
// Compute hull and enrich entries with e_above_hull (before filtering)
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
206
|
+
// Explicit return type breaks circular type inference with the hull_data pipeline
|
|
207
|
+
const { all_enriched_entries, hull_points } = $derived.by(
|
|
208
|
+
(): { all_enriched_entries: ConvexHullEntry[]; hull_points: Point2D[] } => {
|
|
209
|
+
if (coords_entries.length === 0) {
|
|
210
|
+
return { all_enriched_entries: [], hull_points: [] }
|
|
211
|
+
}
|
|
249
212
|
|
|
250
213
|
// Build lower hull input: one minimum-energy point per composition x.
|
|
251
214
|
// Excluded entries don't participate in hull construction.
|
|
@@ -267,52 +230,11 @@
|
|
|
267
230
|
const enriched_entries = coords_entries.map((entry) => {
|
|
268
231
|
const y_hull = thermo.interpolate_hull_2d(computed_hull_points, entry.x)
|
|
269
232
|
const raw_dist = y_hull == null ? 0 : entry.y - y_hull
|
|
270
|
-
return { ...entry, ...compute_hull_stability(raw_dist, entry.exclude_from_hull) }
|
|
233
|
+
return { ...entry, ...helpers.compute_hull_stability(raw_dist, entry.exclude_from_hull) }
|
|
271
234
|
})
|
|
272
235
|
return { all_enriched_entries: enriched_entries, hull_points: computed_hull_points }
|
|
273
236
|
})
|
|
274
237
|
|
|
275
|
-
// Auto threshold: show all for few entries, use default for many, interpolate between
|
|
276
|
-
const max_hull_dist_in_data = $derived(
|
|
277
|
-
helpers.calc_max_hull_dist_in_data(all_enriched_entries),
|
|
278
|
-
)
|
|
279
|
-
const auto_default_threshold = $derived(helpers.compute_auto_hull_dist_threshold(
|
|
280
|
-
all_enriched_entries.length,
|
|
281
|
-
max_hull_dist_in_data,
|
|
282
|
-
DEFAULTS.convex_hull.binary.max_hull_dist_show_phases,
|
|
283
|
-
))
|
|
284
|
-
|
|
285
|
-
const next_auto_threshold = helpers.auto_threshold_reset(
|
|
286
|
-
DEFAULTS.convex_hull.binary.max_hull_dist_show_phases,
|
|
287
|
-
)
|
|
288
|
-
$effect(() => {
|
|
289
|
-
max_hull_dist_show_phases = next_auto_threshold(
|
|
290
|
-
entries,
|
|
291
|
-
max_hull_dist_show_phases,
|
|
292
|
-
auto_default_threshold,
|
|
293
|
-
) ?? max_hull_dist_show_phases
|
|
294
|
-
})
|
|
295
|
-
|
|
296
|
-
// Filter by threshold; visibility is a view predicate, not entry state.
|
|
297
|
-
const plot_entries = $derived(
|
|
298
|
-
all_enriched_entries.filter((entry) =>
|
|
299
|
-
helpers.entry_is_stable(entry) ||
|
|
300
|
-
(entry.e_above_hull ?? 0) <= max_hull_dist_show_phases
|
|
301
|
-
),
|
|
302
|
-
)
|
|
303
|
-
|
|
304
|
-
// Update bindable entries arrays when plot_entries change (single pass)
|
|
305
|
-
$effect(() => {
|
|
306
|
-
const stable: ConvexHullEntry[] = []
|
|
307
|
-
const unstable: ConvexHullEntry[] = []
|
|
308
|
-
for (const entry of plot_entries) {
|
|
309
|
-
if (helpers.entry_is_stable(entry)) stable.push(entry)
|
|
310
|
-
else unstable.push(entry)
|
|
311
|
-
}
|
|
312
|
-
stable_entries = stable
|
|
313
|
-
unstable_entries = unstable
|
|
314
|
-
})
|
|
315
|
-
|
|
316
238
|
let reset_counter = $state(0)
|
|
317
239
|
// Drag and drop state (to match 3D/4D components)
|
|
318
240
|
let drag_over = $state(false)
|
|
@@ -333,8 +255,8 @@
|
|
|
333
255
|
})
|
|
334
256
|
|
|
335
257
|
// Axis mapping helpers ------------------------------------------------------
|
|
336
|
-
const x_domain = $derived<
|
|
337
|
-
const y_domain = $derived.by(():
|
|
258
|
+
const x_domain = $derived<Vec2>([0, 1])
|
|
259
|
+
const y_domain = $derived.by((): Vec2 => {
|
|
338
260
|
const ys = plot_entries.map((entry) => entry.y)
|
|
339
261
|
if (ys.length === 0) return [-1, 0]
|
|
340
262
|
const min_y_data = Math.min(...ys)
|
|
@@ -353,13 +275,6 @@
|
|
|
353
275
|
return name in symbol_map ? (name as D3SymbolName) : undefined
|
|
354
276
|
}
|
|
355
277
|
|
|
356
|
-
// Pre-compute visible entries to avoid redundant filtering
|
|
357
|
-
const visible_entries = $derived(helpers.visible_entries(
|
|
358
|
-
plot_entries,
|
|
359
|
-
show_stable,
|
|
360
|
-
show_unstable,
|
|
361
|
-
))
|
|
362
|
-
|
|
363
278
|
const scatter_points_series = $derived.by(() => {
|
|
364
279
|
const is_energy_mode = color_mode === `energy`
|
|
365
280
|
const count = visible_entries.length
|
|
@@ -385,7 +300,7 @@
|
|
|
385
300
|
? hl?.color
|
|
386
301
|
: is_energy_mode
|
|
387
302
|
? undefined
|
|
388
|
-
:
|
|
303
|
+
: (is_stable ? stable_color : unstable_color),
|
|
389
304
|
stroke: is_stable ? `#ffffff` : `#000000`,
|
|
390
305
|
radius: hl?.effect === `size` || hl?.effect === `both`
|
|
391
306
|
? base_radius * (hl?.size_multiplier ?? 1)
|
|
@@ -400,7 +315,9 @@
|
|
|
400
315
|
return {
|
|
401
316
|
x: x_vals,
|
|
402
317
|
y: y_vals,
|
|
403
|
-
|
|
318
|
+
// ConvexHullEntry is an interface (no implicit index signature), so cast for
|
|
319
|
+
// ScatterPlot's Metadata extends Record<string, unknown> constraint
|
|
320
|
+
metadata: visible_entries as (ConvexHullEntry & Record<string, unknown>)[],
|
|
404
321
|
markers: `points` as const,
|
|
405
322
|
point_style,
|
|
406
323
|
...(is_energy_mode ? { color_values } : {}),
|
|
@@ -408,7 +325,7 @@
|
|
|
408
325
|
})
|
|
409
326
|
|
|
410
327
|
const hull_segments_series = $derived.by(() => {
|
|
411
|
-
if (!
|
|
328
|
+
if (!show_hull_line || hull_points.length < 2) return []
|
|
412
329
|
const segments = []
|
|
413
330
|
for (let idx = 0; idx < hull_points.length - 1; idx++) {
|
|
414
331
|
const p1 = hull_points[idx]
|
|
@@ -447,22 +364,18 @@
|
|
|
447
364
|
phase_stats = thermo.get_convex_hull_stats(plot_entries, elements, 3)
|
|
448
365
|
})
|
|
449
366
|
|
|
450
|
-
|
|
451
|
-
entry
|
|
452
|
-
): AnyStructure | null {
|
|
453
|
-
if (!entry.entry_id) return null
|
|
454
|
-
const orig_entry = entries.find((ent) => ent.entry_id === entry.entry_id)
|
|
455
|
-
return orig_entry?.structure as AnyStructure || null
|
|
456
|
-
}
|
|
367
|
+
const extract_structure_from_entry = (entry: ConvexHullEntry): AnyStructure | null =>
|
|
368
|
+
helpers.extract_structure_from_entry(entries, entry)
|
|
457
369
|
|
|
458
370
|
function reset_all() {
|
|
459
371
|
fullscreen = DEFAULTS.convex_hull.binary.fullscreen
|
|
460
372
|
info_pane_open = DEFAULTS.convex_hull.binary.info_pane_open
|
|
461
|
-
|
|
373
|
+
controls_open = DEFAULTS.convex_hull.binary.legend_pane_open
|
|
462
374
|
color_mode = DEFAULTS.convex_hull.binary.color_mode
|
|
463
375
|
color_scale = DEFAULTS.convex_hull.binary.color_scale as D3InterpolateName
|
|
464
376
|
show_stable = DEFAULTS.convex_hull.binary.show_stable
|
|
465
377
|
show_unstable = DEFAULTS.convex_hull.binary.show_unstable
|
|
378
|
+
hidden_categories = []
|
|
466
379
|
show_stable_labels = DEFAULTS.convex_hull.binary.show_stable_labels
|
|
467
380
|
show_unstable_labels = DEFAULTS.convex_hull.binary.show_unstable_labels
|
|
468
381
|
// Use auto-computed threshold based on entry count instead of static default
|
|
@@ -477,11 +390,12 @@
|
|
|
477
390
|
const has_changes_to_reset = $derived(
|
|
478
391
|
fullscreen !== DEFAULTS.convex_hull.binary.fullscreen ||
|
|
479
392
|
info_pane_open !== DEFAULTS.convex_hull.binary.info_pane_open ||
|
|
480
|
-
|
|
393
|
+
controls_open !== DEFAULTS.convex_hull.binary.legend_pane_open ||
|
|
481
394
|
color_mode !== DEFAULTS.convex_hull.binary.color_mode ||
|
|
482
395
|
color_scale !== DEFAULTS.convex_hull.binary.color_scale ||
|
|
483
396
|
show_stable !== DEFAULTS.convex_hull.binary.show_stable ||
|
|
484
397
|
show_unstable !== DEFAULTS.convex_hull.binary.show_unstable ||
|
|
398
|
+
hidden_categories.length > 0 ||
|
|
485
399
|
show_stable_labels !== DEFAULTS.convex_hull.binary.show_stable_labels ||
|
|
486
400
|
show_unstable_labels !== DEFAULTS.convex_hull.binary.show_unstable_labels ||
|
|
487
401
|
// Compare with auto-computed threshold, with small tolerance for floating point
|
|
@@ -541,7 +455,7 @@
|
|
|
541
455
|
await helpers.copy_entry_to_clipboard(entry, position, (visible, pos) => {
|
|
542
456
|
copy_feedback.visible = visible
|
|
543
457
|
copy_feedback.position = pos
|
|
544
|
-
})
|
|
458
|
+
}, entry_category)
|
|
545
459
|
}
|
|
546
460
|
|
|
547
461
|
function close_structure_popup() {
|
|
@@ -597,19 +511,13 @@
|
|
|
597
511
|
set_fullscreen_bg(wrapper, fullscreen, `--hull-2d-bg-fullscreen`)
|
|
598
512
|
})
|
|
599
513
|
|
|
600
|
-
let style = $derived(
|
|
601
|
-
`--hull-stable-color:${merged_config.colors?.stable || `#0072B2`};
|
|
602
|
-
--hull-unstable-color:${merged_config.colors?.unstable || `#E69F00`};
|
|
603
|
-
--hull-edge-color:${merged_config.colors?.edge || `var(--text-color, #212121)`};
|
|
604
|
-
--hull-text-color:${
|
|
605
|
-
merged_config.colors?.annotation || `var(--text-color, #212121)`
|
|
606
|
-
};`,
|
|
607
|
-
)
|
|
514
|
+
let style = $derived(helpers.hull_style_css(merged_config.colors))
|
|
608
515
|
</script>
|
|
609
516
|
|
|
610
517
|
<svelte:document
|
|
611
518
|
onfullscreenchange={() => {
|
|
612
|
-
fullscreen
|
|
519
|
+
// tie fullscreen state to this component's own wrapper, not any fullscreen element
|
|
520
|
+
fullscreen = document.fullscreenElement === wrapper
|
|
613
521
|
}}
|
|
614
522
|
/>
|
|
615
523
|
|
|
@@ -622,8 +530,9 @@
|
|
|
622
530
|
{#if entry}
|
|
623
531
|
<ConvexHullTooltip
|
|
624
532
|
{entry}
|
|
625
|
-
{polymorph_stats_map}
|
|
533
|
+
polymorph_stats_map={hull_data.polymorph_stats_map}
|
|
626
534
|
highlight_style={entry_highlight}
|
|
535
|
+
{entry_category}
|
|
627
536
|
tooltip={custom_tooltip}
|
|
628
537
|
/>
|
|
629
538
|
{/if}
|
|
@@ -650,6 +559,8 @@
|
|
|
650
559
|
{unstable_entries}
|
|
651
560
|
{show_stable}
|
|
652
561
|
{show_unstable}
|
|
562
|
+
{entry_category}
|
|
563
|
+
{hidden_categories}
|
|
653
564
|
{max_hull_dist_show_phases}
|
|
654
565
|
{max_hull_dist_show_labels}
|
|
655
566
|
{label_threshold}
|
|
@@ -657,27 +568,33 @@
|
|
|
657
568
|
/>
|
|
658
569
|
{/if}
|
|
659
570
|
|
|
571
|
+
{#if fullscreen_toggle && controls_config.visible(`fullscreen`)}
|
|
572
|
+
<FullscreenButton {fullscreen} toggle={fullscreen_toggle} {wrapper} />
|
|
573
|
+
{/if}
|
|
574
|
+
|
|
660
575
|
{#if controls_config.visible(`controls`)}
|
|
661
576
|
<ConvexHullControls
|
|
662
|
-
bind:controls_open
|
|
577
|
+
bind:controls_open
|
|
663
578
|
bind:color_mode
|
|
664
579
|
bind:color_scale
|
|
665
580
|
bind:show_stable
|
|
666
581
|
bind:show_unstable
|
|
582
|
+
{entry_category}
|
|
583
|
+
bind:hidden_categories
|
|
667
584
|
bind:show_stable_labels
|
|
668
585
|
bind:show_unstable_labels
|
|
669
586
|
bind:max_hull_dist_show_phases
|
|
670
587
|
bind:max_hull_dist_show_labels
|
|
671
|
-
{max_hull_dist_in_data}
|
|
588
|
+
max_hull_dist_in_data={hull_data.max_hull_dist_in_data}
|
|
672
589
|
{stable_entries}
|
|
673
590
|
{unstable_entries}
|
|
674
591
|
{merged_controls}
|
|
675
592
|
toggle_props={{ class: `control-btn legend-controls-btn` }}
|
|
676
593
|
bind:energy_source_mode
|
|
677
|
-
{has_precomputed_e_form}
|
|
678
|
-
{can_compute_e_form}
|
|
679
|
-
{has_precomputed_hull}
|
|
680
|
-
{can_compute_hull}
|
|
594
|
+
has_precomputed_e_form={hull_data.has_precomputed_e_form}
|
|
595
|
+
can_compute_e_form={hull_data.can_compute_e_form}
|
|
596
|
+
has_precomputed_hull={hull_data.has_precomputed_hull}
|
|
597
|
+
can_compute_hull={hull_data.can_compute_hull}
|
|
681
598
|
/>
|
|
682
599
|
{/if}
|
|
683
600
|
{/if}
|
|
@@ -720,6 +637,7 @@
|
|
|
720
637
|
series={scatter_series}
|
|
721
638
|
bind:display
|
|
722
639
|
controls={{ show: false }}
|
|
640
|
+
fullscreen_toggle={false}
|
|
723
641
|
x_axis={{
|
|
724
642
|
label: elements.length === 2 ? `x in ${elements[0]}₁₋ₓ ${elements[1]}ₓ` : `x`,
|
|
725
643
|
range: x_domain,
|
|
@@ -773,11 +691,11 @@
|
|
|
773
691
|
/>
|
|
774
692
|
<DragOverlay visible={drag_over} />
|
|
775
693
|
|
|
776
|
-
{#if has_temp_data && temperature !== undefined}
|
|
777
|
-
<TemperatureSlider {available_temperatures} bind:temperature />
|
|
694
|
+
{#if hull_data.has_temp_data && temperature !== undefined}
|
|
695
|
+
<TemperatureSlider available_temperatures={hull_data.available_temperatures} bind:temperature />
|
|
778
696
|
{/if}
|
|
779
697
|
|
|
780
|
-
{#if gas_analysis.has_gas_dependent_elements && merged_gas_config}
|
|
698
|
+
{#if hull_data.gas_analysis.has_gas_dependent_elements && merged_gas_config}
|
|
781
699
|
<GasPressureControls
|
|
782
700
|
config={merged_gas_config}
|
|
783
701
|
bind:pressures={gas_pressures}
|
|
@@ -809,8 +727,9 @@
|
|
|
809
727
|
:global(.convex-hull-2d.dragover) {
|
|
810
728
|
border: 2px dashed var(--accent-color, #1976d2) !important;
|
|
811
729
|
}
|
|
812
|
-
/* Styles for control buttons rendered via header_controls snippet
|
|
813
|
-
|
|
730
|
+
/* Styles for control buttons rendered via header_controls snippet
|
|
731
|
+
(.fullscreen-btn is FullscreenButton's built-in class) */
|
|
732
|
+
:global(.convex-hull-2d :is(.control-btn, .fullscreen-btn)) {
|
|
814
733
|
background: transparent;
|
|
815
734
|
border: none;
|
|
816
735
|
padding: 4px;
|
|
@@ -821,7 +740,7 @@
|
|
|
821
740
|
display: flex;
|
|
822
741
|
font-size: clamp(0.85em, 2cqmin, 1.3em);
|
|
823
742
|
}
|
|
824
|
-
:global(.convex-hull-2d .control-btn:hover) {
|
|
743
|
+
:global(.convex-hull-2d :is(.control-btn, .fullscreen-btn):hover) {
|
|
825
744
|
background-color: color-mix(in srgb, currentColor 8%, transparent);
|
|
826
745
|
}
|
|
827
746
|
</style>
|
|
@@ -6,6 +6,6 @@ type $$ComponentProps = BaseConvexHullProps<ConvexHullEntry> & {
|
|
|
6
6
|
x_axis?: AxisConfig;
|
|
7
7
|
y_axis?: AxisConfig;
|
|
8
8
|
};
|
|
9
|
-
declare const ConvexHull2D: import("svelte").Component<$$ComponentProps, {}, "
|
|
9
|
+
declare const ConvexHull2D: import("svelte").Component<$$ComponentProps, {}, "display" | "temperature" | "fullscreen" | "wrapper" | "controls_open" | "color_scale" | "info_pane_open" | "color_mode" | "show_stable" | "show_unstable" | "show_stable_labels" | "show_unstable_labels" | "max_hull_dist_show_phases" | "max_hull_dist_show_labels" | "hidden_categories" | "energy_source_mode" | "stable_entries" | "unstable_entries" | "phase_stats" | "highlighted_entries" | "selected_entry" | "gas_pressures">;
|
|
10
10
|
type ConvexHull2D = ReturnType<typeof ConvexHull2D>;
|
|
11
11
|
export default ConvexHull2D;
|