matterviz 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EmptyState.svelte +10 -2
- package/dist/FilePicker.svelte +123 -82
- package/dist/Icon.svelte +18 -12
- package/dist/MillerIndexInput.svelte +27 -21
- package/dist/api/optimade.js +6 -6
- package/dist/app.css +216 -207
- package/dist/brillouin/BrillouinZone.svelte +292 -149
- package/dist/brillouin/BrillouinZone.svelte.d.ts +1 -1
- package/dist/brillouin/BrillouinZoneControls.svelte +32 -5
- package/dist/brillouin/BrillouinZoneExportPane.svelte +69 -42
- package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +1 -1
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +99 -68
- package/dist/brillouin/BrillouinZoneScene.svelte +275 -163
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +1 -1
- package/dist/brillouin/BrillouinZoneTooltip.svelte +17 -7
- package/dist/brillouin/compute.js +11 -6
- package/dist/chempot-diagram/ChemPotDiagram.svelte +162 -27
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +451 -281
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +2148 -1642
- package/dist/chempot-diagram/ChemPotScene3D.svelte +8 -5
- package/dist/chempot-diagram/async-compute.svelte.d.ts +3 -0
- package/dist/chempot-diagram/async-compute.svelte.js +77 -0
- package/dist/chempot-diagram/chempot-worker.d.ts +1 -0
- package/dist/chempot-diagram/chempot-worker.js +11 -0
- package/dist/chempot-diagram/color.js +1 -2
- package/dist/chempot-diagram/compute.d.ts +10 -0
- package/dist/chempot-diagram/compute.js +250 -88
- package/dist/chempot-diagram/index.d.ts +2 -1
- package/dist/chempot-diagram/index.js +2 -1
- package/dist/chempot-diagram/temperature.js +8 -9
- package/dist/chempot-diagram/types.d.ts +3 -0
- package/dist/chempot-diagram/types.js +1 -0
- package/dist/colors/index.d.ts +1 -1
- package/dist/colors/index.js +5 -3
- package/dist/composition/BarChart.svelte +128 -55
- package/dist/composition/BubbleChart.svelte +102 -49
- package/dist/composition/Composition.svelte +100 -79
- package/dist/composition/Formula.svelte +108 -62
- package/dist/composition/FormulaFilter.svelte +665 -537
- package/dist/composition/PieChart.svelte +183 -108
- package/dist/composition/format.d.ts +5 -0
- package/dist/composition/format.js +20 -3
- package/dist/composition/parse.js +14 -9
- package/dist/convex-hull/ConvexHull.svelte +93 -40
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull2D.svelte +549 -360
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +1296 -827
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +1004 -688
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullControls.svelte +115 -28
- package/dist/convex-hull/ConvexHullControls.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullInfoPane.svelte +29 -3
- package/dist/convex-hull/ConvexHullStats.svelte +425 -328
- package/dist/convex-hull/ConvexHullTooltip.svelte +40 -16
- package/dist/convex-hull/GasPressureControls.svelte +104 -61
- package/dist/convex-hull/StructurePopup.svelte +25 -4
- package/dist/convex-hull/TemperatureSlider.svelte +45 -25
- package/dist/convex-hull/barycentric-coords.js +13 -7
- package/dist/convex-hull/demo-temperature.js +8 -4
- package/dist/convex-hull/gas-thermodynamics.js +17 -12
- package/dist/convex-hull/helpers.d.ts +9 -0
- package/dist/convex-hull/helpers.js +77 -34
- package/dist/convex-hull/thermodynamics.js +61 -56
- package/dist/convex-hull/types.d.ts +9 -14
- package/dist/convex-hull/types.js +0 -17
- package/dist/coordination/CoordinationBarPlot.svelte +227 -154
- package/dist/element/BohrAtom.svelte +55 -12
- package/dist/element/ElementHeading.svelte +7 -2
- package/dist/element/ElementPhoto.svelte +15 -9
- package/dist/element/ElementStats.svelte +10 -4
- package/dist/element/ElementTile.svelte +137 -73
- package/dist/element/Nucleus.svelte +39 -11
- package/dist/element/data.js +1 -1
- package/dist/feedback/ClickFeedback.svelte +16 -5
- package/dist/feedback/DragOverlay.svelte +10 -2
- package/dist/feedback/Spinner.svelte +4 -2
- package/dist/feedback/StatusMessage.svelte +8 -2
- package/dist/fermi-surface/FermiSlice.svelte +118 -88
- package/dist/fermi-surface/FermiSurface.svelte +328 -187
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceControls.svelte +113 -46
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceScene.svelte +535 -342
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +14 -5
- package/dist/fermi-surface/compute.js +16 -20
- package/dist/fermi-surface/parse.js +24 -14
- package/dist/fermi-surface/symmetry.js +2 -7
- package/dist/fermi-surface/types.d.ts +3 -5
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +1019 -765
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +1 -1
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +76 -22
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +2 -3
- package/dist/icons.js +47 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/io/decompress.js +1 -1
- package/dist/io/export.d.ts +3 -0
- package/dist/io/export.js +129 -143
- package/dist/io/is-binary.js +2 -3
- package/dist/io/url-drop.js +1 -2
- package/dist/isosurface/Isosurface.svelte +202 -148
- package/dist/isosurface/IsosurfaceControls.svelte +46 -28
- package/dist/isosurface/parse.js +34 -29
- package/dist/isosurface/slice.js +5 -10
- package/dist/isosurface/types.d.ts +2 -1
- package/dist/isosurface/types.js +61 -12
- package/dist/labels.js +11 -8
- package/dist/layout/FullscreenToggle.svelte +11 -2
- package/dist/layout/InfoCard.svelte +38 -6
- package/dist/layout/InfoTag.svelte +63 -32
- package/dist/layout/PropertyFilter.svelte +82 -37
- package/dist/layout/SettingsSection.svelte +85 -55
- package/dist/layout/SubpageGrid.svelte +10 -2
- package/dist/layout/json-tree/JsonNode.svelte +183 -138
- package/dist/layout/json-tree/JsonTree.svelte +499 -413
- package/dist/layout/json-tree/JsonValue.svelte +127 -99
- package/dist/layout/json-tree/utils.js +4 -2
- package/dist/marching-cubes.js +25 -2
- package/dist/math.d.ts +13 -17
- package/dist/math.js +133 -67
- package/dist/overlays/ContextMenu.svelte +65 -40
- package/dist/overlays/DraggablePane.svelte +211 -139
- package/dist/periodic-table/PeriodicTable.svelte +278 -145
- package/dist/periodic-table/PeriodicTableControls.svelte +178 -128
- package/dist/periodic-table/PropertySelect.svelte +25 -7
- package/dist/periodic-table/TableInset.svelte +8 -3
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +446 -309
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramControls.svelte +102 -43
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +63 -40
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +71 -28
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +158 -101
- package/dist/phase-diagram/TdbInfoPanel.svelte +28 -4
- package/dist/phase-diagram/build-diagram.js +9 -9
- package/dist/phase-diagram/colors.js +1 -3
- package/dist/phase-diagram/parse.js +10 -9
- package/dist/phase-diagram/svg-to-diagram.js +53 -49
- package/dist/phase-diagram/utils.d.ts +1 -0
- package/dist/phase-diagram/utils.js +80 -25
- package/dist/plot/AxisLabel.svelte +28 -3
- package/dist/plot/BarPlot.svelte +1182 -734
- package/dist/plot/BarPlot.svelte.d.ts +2 -2
- package/dist/plot/BarPlotControls.svelte +31 -5
- package/dist/plot/BarPlotControls.svelte.d.ts +1 -1
- package/dist/plot/ColorBar.svelte +479 -329
- package/dist/plot/ColorScaleSelect.svelte +27 -6
- package/dist/plot/ElementScatter.svelte +36 -15
- package/dist/plot/FillArea.svelte +152 -95
- package/dist/plot/Histogram.svelte +934 -571
- package/dist/plot/Histogram.svelte.d.ts +1 -1
- package/dist/plot/HistogramControls.svelte +53 -9
- package/dist/plot/HistogramControls.svelte.d.ts +1 -1
- package/dist/plot/InteractiveAxisLabel.svelte +34 -11
- package/dist/plot/InteractiveAxisLabel.svelte.d.ts +1 -1
- package/dist/plot/Line.svelte +63 -28
- package/dist/plot/PlotControls.svelte +157 -114
- package/dist/plot/PlotControls.svelte.d.ts +1 -1
- package/dist/plot/PlotLegend.svelte +174 -91
- package/dist/plot/PlotTooltip.svelte +45 -6
- package/dist/plot/PortalSelect.svelte +175 -147
- package/dist/plot/ReferenceLine.svelte +76 -22
- package/dist/plot/ReferenceLine3D.svelte +132 -107
- package/dist/plot/ReferencePlane.svelte +146 -121
- package/dist/plot/ScatterPlot.svelte +1681 -1091
- package/dist/plot/ScatterPlot.svelte.d.ts +2 -2
- package/dist/plot/ScatterPlot3D.svelte +256 -131
- package/dist/plot/ScatterPlot3D.svelte.d.ts +2 -2
- package/dist/plot/ScatterPlot3DControls.svelte +113 -63
- package/dist/plot/ScatterPlot3DControls.svelte.d.ts +2 -1
- package/dist/plot/ScatterPlot3DScene.svelte +608 -403
- package/dist/plot/ScatterPlot3DScene.svelte.d.ts +2 -2
- package/dist/plot/ScatterPlotControls.svelte +65 -25
- package/dist/plot/ScatterPlotControls.svelte.d.ts +1 -1
- package/dist/plot/ScatterPoint.svelte +98 -26
- package/dist/plot/ScatterPoint.svelte.d.ts +1 -0
- package/dist/plot/SpacegroupBarPlot.svelte +142 -85
- package/dist/plot/Surface3D.svelte +159 -108
- package/dist/plot/ZeroLines.svelte +55 -3
- package/dist/plot/ZoomRect.svelte +4 -2
- package/dist/plot/axis-utils.js +1 -3
- package/dist/plot/data-cleaning.js +12 -28
- package/dist/plot/data-transform.js +2 -1
- package/dist/plot/fill-utils.js +2 -0
- package/dist/plot/layout.d.ts +4 -1
- package/dist/plot/layout.js +33 -14
- package/dist/plot/reference-line.d.ts +2 -2
- package/dist/plot/reference-line.js +7 -5
- package/dist/plot/scales.js +24 -36
- package/dist/plot/types.d.ts +11 -23
- package/dist/plot/types.js +6 -11
- package/dist/plot/utils/label-placement.d.ts +32 -15
- package/dist/plot/utils/label-placement.js +227 -66
- package/dist/plot/utils/series-visibility.js +2 -3
- package/dist/rdf/RdfPlot.svelte +143 -91
- package/dist/rdf/calc-rdf.js +4 -5
- package/dist/sanitize.d.ts +4 -0
- package/dist/sanitize.js +107 -0
- package/dist/settings.d.ts +18 -6
- package/dist/settings.js +46 -16
- package/dist/spectral/Bands.svelte +632 -453
- package/dist/spectral/BandsAndDos.svelte +90 -49
- package/dist/spectral/BrillouinBandsDos.svelte +151 -93
- package/dist/spectral/Dos.svelte +389 -258
- package/dist/spectral/helpers.js +55 -43
- package/dist/state.svelte.d.ts +1 -1
- package/dist/state.svelte.js +3 -2
- package/dist/structure/Arrow.svelte +59 -20
- package/dist/structure/AtomLegend.svelte +215 -134
- package/dist/structure/Bond.svelte +73 -47
- package/dist/structure/CanvasTooltip.svelte +10 -2
- package/dist/structure/CellSelect.svelte +72 -45
- package/dist/structure/Cylinder.svelte +33 -17
- package/dist/structure/Lattice.svelte +88 -33
- package/dist/structure/Structure.svelte +1063 -797
- package/dist/structure/Structure.svelte.d.ts +1 -1
- package/dist/structure/StructureControls.svelte +349 -118
- package/dist/structure/StructureExportPane.svelte +124 -89
- package/dist/structure/StructureExportPane.svelte.d.ts +1 -1
- package/dist/structure/StructureInfoPane.svelte +304 -237
- package/dist/structure/StructureScene.svelte +879 -443
- package/dist/structure/StructureScene.svelte.d.ts +15 -7
- package/dist/structure/atom-properties.js +8 -8
- package/dist/structure/bonding.js +6 -7
- package/dist/structure/export.js +14 -29
- package/dist/structure/ferrox-wasm.js +1 -1
- package/dist/structure/index.d.ts +13 -3
- package/dist/structure/index.js +83 -23
- package/dist/structure/measure.d.ts +2 -2
- package/dist/structure/measure.js +4 -44
- package/dist/structure/parse.js +113 -141
- package/dist/structure/partial-occupancy.js +7 -10
- package/dist/structure/pbc.d.ts +1 -0
- package/dist/structure/pbc.js +16 -6
- package/dist/structure/supercell.d.ts +2 -2
- package/dist/structure/supercell.js +12 -22
- package/dist/structure/validation.js +1 -2
- package/dist/symmetry/SymmetryStats.svelte +84 -41
- package/dist/symmetry/WyckoffTable.svelte +26 -6
- package/dist/symmetry/cell-transform.js +5 -3
- package/dist/symmetry/index.js +8 -7
- package/dist/symmetry/spacegroups.js +148 -148
- package/dist/table/HeatmapTable.svelte +790 -554
- package/dist/table/HeatmapTable.svelte.d.ts +1 -1
- package/dist/table/ToggleMenu.svelte +125 -92
- package/dist/table/index.js +2 -4
- package/dist/theme/ThemeControl.svelte +21 -12
- package/dist/time.js +4 -1
- package/dist/tooltip/TooltipContent.svelte +33 -8
- package/dist/trajectory/Trajectory.svelte +758 -558
- package/dist/trajectory/TrajectoryError.svelte +14 -3
- package/dist/trajectory/TrajectoryExportPane.svelte +137 -83
- package/dist/trajectory/TrajectoryInfoPane.svelte +272 -143
- package/dist/trajectory/extract.js +10 -26
- package/dist/trajectory/format-detect.js +5 -5
- package/dist/trajectory/frame-reader.d.ts +1 -1
- package/dist/trajectory/frame-reader.js +5 -12
- package/dist/trajectory/helpers.d.ts +0 -1
- package/dist/trajectory/helpers.js +2 -17
- package/dist/trajectory/index.js +14 -12
- package/dist/trajectory/parse/ase.js +5 -4
- package/dist/trajectory/parse/hdf5.js +26 -18
- package/dist/trajectory/parse/index.js +13 -18
- package/dist/trajectory/parse/lammps.js +17 -7
- package/dist/trajectory/parse/vasp.js +5 -2
- package/dist/trajectory/parse/xyz.js +8 -7
- package/dist/trajectory/plotting.js +13 -8
- package/dist/utils.d.ts +1 -0
- package/dist/utils.js +13 -0
- package/dist/xrd/XrdPlot.svelte +337 -247
- package/dist/xrd/broadening.js +14 -9
- package/dist/xrd/calc-xrd.js +12 -18
- package/dist/xrd/parse.d.ts +1 -1
- package/dist/xrd/parse.js +17 -17
- package/package.json +99 -103
- package/readme.md +1 -1
- /package/dist/theme/{themes.js → themes.mjs} +0 -0
|
@@ -1,128 +1,203 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ColorSchemeName } from '../colors'
|
|
3
|
+
import { ELEMENT_COLOR_SCHEMES, pick_contrast_color } from '../colors'
|
|
4
|
+
import type { CompositionType } from './'
|
|
5
|
+
import type { ElementSymbol } from '../element'
|
|
6
|
+
import { format_num } from '../labels'
|
|
7
|
+
import type { Snippet } from 'svelte'
|
|
8
|
+
import type { SVGAttributes } from 'svelte/elements'
|
|
9
|
+
import { type ChartSegmentData, get_chart_font_scale } from './index'
|
|
10
|
+
import { count_atoms_in_composition, fractional_composition } from './parse'
|
|
11
|
+
|
|
12
|
+
// Constants for pie chart calculations
|
|
13
|
+
const VERY_THIN_SLICE_THRESHOLD = 20 // degrees
|
|
14
|
+
const MEDIUM_SLICE_THRESHOLD = 90 // degrees - increased to move more slices toward outer edge
|
|
15
|
+
const MAX_ANGLE_FOR_FULL_SCALE = 120 // degrees
|
|
16
|
+
|
|
17
|
+
type PieSegmentData = ChartSegmentData & {
|
|
18
|
+
start_angle: number
|
|
19
|
+
end_angle: number
|
|
20
|
+
path: string
|
|
21
|
+
label_x: number
|
|
22
|
+
label_y: number
|
|
23
|
+
is_outside_slice: boolean
|
|
24
|
+
}
|
|
25
|
+
let {
|
|
26
|
+
composition,
|
|
27
|
+
size = 200,
|
|
28
|
+
stroke_width = 0.5,
|
|
29
|
+
inner_radius = 0,
|
|
30
|
+
show_labels = true,
|
|
31
|
+
show_percentages = false,
|
|
32
|
+
show_amounts = true,
|
|
33
|
+
color_scheme = `Vesta`,
|
|
34
|
+
center_content,
|
|
35
|
+
segment_content,
|
|
36
|
+
interactive = true,
|
|
37
|
+
svg_node = $bindable(null),
|
|
38
|
+
children,
|
|
39
|
+
...rest
|
|
40
|
+
}: SVGAttributes<SVGSVGElement> & {
|
|
41
|
+
composition: CompositionType
|
|
42
|
+
size?: number
|
|
43
|
+
stroke_width?: number
|
|
44
|
+
inner_radius?: number
|
|
45
|
+
show_labels?: boolean
|
|
46
|
+
show_percentages?: boolean
|
|
47
|
+
show_amounts?: boolean
|
|
48
|
+
color_scheme?: ColorSchemeName
|
|
49
|
+
center_content?: Snippet<[{ composition: CompositionType; total_atoms: number }]>
|
|
50
|
+
segment_content?: Snippet<[PieSegmentData]>
|
|
51
|
+
interactive?: boolean
|
|
52
|
+
svg_node?: SVGSVGElement | null
|
|
53
|
+
children?: Snippet<[{ hovered_element: ElementSymbol | null }]>
|
|
54
|
+
} = $props()
|
|
55
|
+
|
|
56
|
+
let element_colors = $derived(
|
|
57
|
+
ELEMENT_COLOR_SCHEMES[color_scheme] || ELEMENT_COLOR_SCHEMES.Vesta,
|
|
58
|
+
)
|
|
59
|
+
let fractions = $derived(fractional_composition(composition))
|
|
60
|
+
let total_atoms = $derived(count_atoms_in_composition(composition))
|
|
61
|
+
let outer_radius = $derived(size / 2 - stroke_width)
|
|
62
|
+
let inner_radius_adjusted = $derived(Math.min(inner_radius, outer_radius - 10))
|
|
63
|
+
let center = $derived(size / 2)
|
|
64
|
+
|
|
65
|
+
// Calculate pie segments
|
|
66
|
+
let segments = $derived.by(() => {
|
|
67
|
+
let current_angle = -90 // Start from top
|
|
68
|
+
|
|
19
69
|
return Object.entries(composition)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const element = element_key
|
|
23
|
-
const fraction = fractions[element] || 0
|
|
24
|
-
const color = element_colors[element] || `#cccccc
|
|
70
|
+
.filter(([_, amount]) => amount && amount > 0)
|
|
71
|
+
.map(([element_key, amount]) => {
|
|
72
|
+
const element = element_key as ElementSymbol
|
|
73
|
+
const fraction = fractions[element] || 0
|
|
74
|
+
const color = element_colors[element] || `#cccccc`
|
|
75
|
+
|
|
25
76
|
// Single element: full circle with no radial stroke line, label at center
|
|
26
77
|
if (fraction === 1) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
78
|
+
const r = outer_radius
|
|
79
|
+
const ir = inner_radius_adjusted
|
|
80
|
+
// Two semicircular arcs to form a full circle (avoids SVG 360° arc bug)
|
|
81
|
+
const outer_arc = `M ${center} ${center - r} A ${r} ${r} 0 1 1 ${center} ${
|
|
82
|
+
center + r
|
|
83
|
+
} A ${r} ${r} 0 1 1 ${center} ${center - r} Z`
|
|
84
|
+
const path = ir > 0
|
|
85
|
+
? `${outer_arc} M ${center} ${
|
|
86
|
+
center - ir
|
|
87
|
+
} A ${ir} ${ir} 0 1 0 ${center} ${
|
|
88
|
+
center + ir
|
|
89
|
+
} A ${ir} ${ir} 0 1 0 ${center} ${center - ir} Z`
|
|
90
|
+
: outer_arc
|
|
91
|
+
const label_text = element + (show_amounts ? String(amount) : ``) +
|
|
92
|
+
(show_percentages ? `${format_num(fraction, `.1~%`)}` : ``)
|
|
93
|
+
return {
|
|
94
|
+
element,
|
|
95
|
+
amount,
|
|
96
|
+
fraction,
|
|
97
|
+
color,
|
|
98
|
+
start_angle: -90,
|
|
99
|
+
end_angle: 270,
|
|
100
|
+
path,
|
|
101
|
+
label_x: center,
|
|
102
|
+
label_y: center,
|
|
103
|
+
is_outside_slice: false,
|
|
104
|
+
font_scale: get_chart_font_scale(2.6, label_text, r * 2),
|
|
105
|
+
text_color: pick_contrast_color({ bg_color: color }),
|
|
106
|
+
}
|
|
50
107
|
}
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const
|
|
54
|
-
|
|
108
|
+
|
|
109
|
+
const angle_span = fraction * 360
|
|
110
|
+
const start_angle = current_angle
|
|
111
|
+
const end_angle = current_angle + angle_span
|
|
112
|
+
|
|
113
|
+
current_angle = end_angle
|
|
114
|
+
|
|
55
115
|
// Convert to radians for calculations
|
|
56
|
-
const start_rad = (start_angle * Math.PI) / 180
|
|
57
|
-
const end_rad = (end_angle * Math.PI) / 180
|
|
58
|
-
const mid_rad = (((start_angle + end_angle) / 2) * Math.PI) / 180
|
|
116
|
+
const start_rad = (start_angle * Math.PI) / 180
|
|
117
|
+
const end_rad = (end_angle * Math.PI) / 180
|
|
118
|
+
const mid_rad = (((start_angle + end_angle) / 2) * Math.PI) / 180
|
|
119
|
+
|
|
59
120
|
// Arc coordinates for outer radius
|
|
60
|
-
const x1_outer = center + outer_radius * Math.cos(start_rad)
|
|
61
|
-
const y1_outer = center + outer_radius * Math.sin(start_rad)
|
|
62
|
-
const x2_outer = center + outer_radius * Math.cos(end_rad)
|
|
63
|
-
const y2_outer = center + outer_radius * Math.sin(end_rad)
|
|
121
|
+
const x1_outer = center + outer_radius * Math.cos(start_rad)
|
|
122
|
+
const y1_outer = center + outer_radius * Math.sin(start_rad)
|
|
123
|
+
const x2_outer = center + outer_radius * Math.cos(end_rad)
|
|
124
|
+
const y2_outer = center + outer_radius * Math.sin(end_rad)
|
|
125
|
+
|
|
64
126
|
// Arc coordinates for inner radius
|
|
65
|
-
const x1_inner = center + inner_radius_adjusted * Math.cos(start_rad)
|
|
66
|
-
const y1_inner = center + inner_radius_adjusted * Math.sin(start_rad)
|
|
67
|
-
const x2_inner = center + inner_radius_adjusted * Math.cos(end_rad)
|
|
68
|
-
const y2_inner = center + inner_radius_adjusted * Math.sin(end_rad)
|
|
69
|
-
|
|
127
|
+
const x1_inner = center + inner_radius_adjusted * Math.cos(start_rad)
|
|
128
|
+
const y1_inner = center + inner_radius_adjusted * Math.sin(start_rad)
|
|
129
|
+
const x2_inner = center + inner_radius_adjusted * Math.cos(end_rad)
|
|
130
|
+
const y2_inner = center + inner_radius_adjusted * Math.sin(end_rad)
|
|
131
|
+
|
|
132
|
+
const large_arc = angle_span > 180 ? 1 : 0
|
|
133
|
+
|
|
70
134
|
// Create donut path if inner radius > 0, otherwise regular pie slice
|
|
71
135
|
const path = inner_radius_adjusted > 0
|
|
72
|
-
|
|
73
|
-
|
|
136
|
+
? `M ${x1_outer} ${y1_outer} A ${outer_radius} ${outer_radius} 0 ${large_arc} 1 ${x2_outer} ${y2_outer} L ${x2_inner} ${y2_inner} A ${inner_radius_adjusted} ${inner_radius_adjusted} 0 ${large_arc} 0 ${x1_inner} ${y1_inner} Z`
|
|
137
|
+
: `M ${center} ${center} L ${x1_outer} ${y1_outer} A ${outer_radius} ${outer_radius} 0 ${large_arc} 1 ${x2_outer} ${y2_outer} Z`
|
|
138
|
+
|
|
74
139
|
// Position labels with three-tier strategy
|
|
75
|
-
const is_very_thin_slice = angle_span < VERY_THIN_SLICE_THRESHOLD
|
|
140
|
+
const is_very_thin_slice = angle_span < VERY_THIN_SLICE_THRESHOLD // Place outside
|
|
76
141
|
const is_medium_slice = angle_span >= VERY_THIN_SLICE_THRESHOLD &&
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
let
|
|
142
|
+
angle_span < MEDIUM_SLICE_THRESHOLD // Near outer edge
|
|
143
|
+
|
|
144
|
+
let label_radius: number
|
|
145
|
+
let is_outside_slice = false
|
|
146
|
+
|
|
80
147
|
if (is_very_thin_slice) {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
label_radius = (outer_radius + inner_radius_adjusted) / 2;
|
|
93
|
-
is_outside_slice = false;
|
|
148
|
+
// Very thin slices: place outside with distance proportional to chart size
|
|
149
|
+
label_radius = outer_radius + outer_radius * 0.2
|
|
150
|
+
is_outside_slice = true
|
|
151
|
+
} else if (is_medium_slice) {
|
|
152
|
+
// Medium slices: place closer to outer edge, proportional to chart size
|
|
153
|
+
label_radius = outer_radius - outer_radius * 0.3
|
|
154
|
+
is_outside_slice = false
|
|
155
|
+
} else {
|
|
156
|
+
// Large slices: place in middle of ring
|
|
157
|
+
label_radius = (outer_radius + inner_radius_adjusted) / 2
|
|
158
|
+
is_outside_slice = false
|
|
94
159
|
}
|
|
160
|
+
|
|
95
161
|
// Calculate font scale based on slice size and smart text fitting
|
|
96
|
-
const [min_font_scale, max_font_scale] = [1.4, 2]
|
|
97
|
-
const scale_factor = angle_span / MAX_ANGLE_FOR_FULL_SCALE
|
|
162
|
+
const [min_font_scale, max_font_scale] = [1.4, 2] as const
|
|
163
|
+
const scale_factor = angle_span / MAX_ANGLE_FOR_FULL_SCALE
|
|
98
164
|
const base_scale = min_font_scale +
|
|
99
|
-
|
|
100
|
-
const label_text = element + (show_amounts ? amount
|
|
101
|
-
|
|
165
|
+
scale_factor * (max_font_scale - min_font_scale)
|
|
166
|
+
const label_text = element + (show_amounts ? amount?.toString() ?? `` : ``) +
|
|
167
|
+
(show_percentages ? `${format_num(fraction, `.1~%`)}` : ``)
|
|
102
168
|
const available_space = is_very_thin_slice
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
169
|
+
? outer_radius * 0.8 // More space outside the slice
|
|
170
|
+
: Math.min(
|
|
171
|
+
outer_radius - inner_radius_adjusted, // Radial space
|
|
172
|
+
(angle_span * Math.PI / 180) * label_radius * 0.8, // Arc space at label radius
|
|
173
|
+
)
|
|
174
|
+
|
|
175
|
+
const font_scale = get_chart_font_scale(
|
|
176
|
+
base_scale,
|
|
177
|
+
label_text,
|
|
178
|
+
available_space,
|
|
179
|
+
)
|
|
180
|
+
|
|
107
181
|
return {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
})
|
|
125
|
-
|
|
182
|
+
element,
|
|
183
|
+
amount,
|
|
184
|
+
fraction,
|
|
185
|
+
color,
|
|
186
|
+
start_angle,
|
|
187
|
+
end_angle,
|
|
188
|
+
path,
|
|
189
|
+
label_x: center + label_radius * Math.cos(mid_rad),
|
|
190
|
+
label_y: center + label_radius * Math.sin(mid_rad),
|
|
191
|
+
is_outside_slice,
|
|
192
|
+
font_scale,
|
|
193
|
+
text_color: is_outside_slice
|
|
194
|
+
? `var(--text-color, #333)`
|
|
195
|
+
: pick_contrast_color({ bg_color: color }),
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
})
|
|
199
|
+
|
|
200
|
+
let hovered_element: ElementSymbol | null = $state(null)
|
|
126
201
|
</script>
|
|
127
202
|
|
|
128
203
|
<svg
|
|
@@ -6,5 +6,10 @@ export declare const get_alphabetical_formula: (input: string | CompositionType
|
|
|
6
6
|
export declare const sort_by_electronegativity: (symbols: ElementSymbol[]) => ElementSymbol[];
|
|
7
7
|
export declare const sort_by_hill_notation: (symbols: ElementSymbol[]) => ElementSymbol[];
|
|
8
8
|
export declare const get_electro_neg_formula: (input: string | CompositionType | AnyStructure, plain_text?: boolean, delim?: string, amount_format?: string) => string;
|
|
9
|
+
export interface FormulaLabelSegment {
|
|
10
|
+
text: string;
|
|
11
|
+
subscript: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function get_formula_label_segments(formula: string): FormulaLabelSegment[];
|
|
9
14
|
export declare const get_hill_formula: (input: string | CompositionType | AnyStructure, plain_text?: boolean, delim?: string, amount_format?: string) => string;
|
|
10
15
|
export declare function format_oxi_state(oxidation?: number): string;
|
|
@@ -27,9 +27,7 @@ export const format_composition_formula = (composition, sort_fn, plain_text = fa
|
|
|
27
27
|
if (amount === 1)
|
|
28
28
|
return el;
|
|
29
29
|
const formatted_amount = format_num(Number(amount), amount_format);
|
|
30
|
-
return plain_text
|
|
31
|
-
? `${el}${formatted_amount}`
|
|
32
|
-
: `${el}<sub>${formatted_amount}</sub>`;
|
|
30
|
+
return plain_text ? `${el}${formatted_amount}` : `${el}<sub>${formatted_amount}</sub>`;
|
|
33
31
|
})
|
|
34
32
|
.join(delim);
|
|
35
33
|
};
|
|
@@ -82,6 +80,25 @@ export const sort_by_hill_notation = (symbols) => {
|
|
|
82
80
|
};
|
|
83
81
|
// Create electronegativity-sorted formula
|
|
84
82
|
export const get_electro_neg_formula = (input, plain_text = false, delim = ` `, amount_format = `.3~f`) => format_formula_generic(input, sort_by_electronegativity, plain_text, delim, amount_format);
|
|
83
|
+
export function get_formula_label_segments(formula) {
|
|
84
|
+
const segments = [];
|
|
85
|
+
let cursor = 0;
|
|
86
|
+
for (const match of formula.matchAll(/([A-Za-z])(\d+(?:\.\d+)?)/g)) {
|
|
87
|
+
const match_idx = match.index ?? 0;
|
|
88
|
+
const prefix = match[1];
|
|
89
|
+
const amount = match[2];
|
|
90
|
+
const amount_idx = match_idx + prefix.length;
|
|
91
|
+
if (amount_idx > cursor) {
|
|
92
|
+
segments.push({ text: formula.slice(cursor, amount_idx), subscript: false });
|
|
93
|
+
}
|
|
94
|
+
segments.push({ text: amount, subscript: true });
|
|
95
|
+
cursor = amount_idx + amount.length;
|
|
96
|
+
}
|
|
97
|
+
if (cursor < formula.length) {
|
|
98
|
+
segments.push({ text: formula.slice(cursor), subscript: false });
|
|
99
|
+
}
|
|
100
|
+
return segments.length > 0 ? segments : [{ text: formula, subscript: false }];
|
|
101
|
+
}
|
|
85
102
|
// Create Hill notation formula (C first, H second, then alphabetical)
|
|
86
103
|
export const get_hill_formula = (input, plain_text = false, delim = ` `, amount_format = `.3~s`) => format_formula_generic(input, sort_by_hill_notation, plain_text, delim, amount_format);
|
|
87
104
|
export function format_oxi_state(oxidation) {
|
|
@@ -21,8 +21,8 @@ export const is_valid_element = (sym) => ELEM_SYMBOLS.includes(sym);
|
|
|
21
21
|
// Check if object has atomic numbers as keys (1-118)
|
|
22
22
|
const is_atomic_number_composition = (obj) => {
|
|
23
23
|
const keys = Object.keys(obj);
|
|
24
|
-
return keys.length > 0 &&
|
|
25
|
-
keys.map(Number).every((num) => Number.isInteger(num) && num >= 1 && num <= 118);
|
|
24
|
+
return (keys.length > 0 &&
|
|
25
|
+
keys.map(Number).every((num) => Number.isInteger(num) && num >= 1 && num <= 118));
|
|
26
26
|
};
|
|
27
27
|
// Convert atomic numbers to element symbols
|
|
28
28
|
export const atomic_num_to_symbols = (atomic_composition) => {
|
|
@@ -148,7 +148,7 @@ export const parse_composition = (input) => {
|
|
|
148
148
|
return normalize_composition(input);
|
|
149
149
|
};
|
|
150
150
|
// Calculate GCD of two numbers
|
|
151
|
-
const gcd = (num_a, num_b) =>
|
|
151
|
+
const gcd = (num_a, num_b) => num_b === 0 ? num_a : gcd(num_b, num_a % num_b);
|
|
152
152
|
// Get reduced formula by dividing all amounts by their GCD
|
|
153
153
|
// Example: Fe2O4 -> FeO2, H4O2 -> H2O
|
|
154
154
|
export const get_reduced_formula = (composition) => {
|
|
@@ -176,7 +176,7 @@ const parse_oxidation_state = (oxidation_str) => {
|
|
|
176
176
|
return oxidation_str === `+` ? 1 : -1;
|
|
177
177
|
}
|
|
178
178
|
// Handle formats like "2+", "+2", "2-", "-2"
|
|
179
|
-
const ox_match =
|
|
179
|
+
const ox_match = /([+-]?)(\d+)([+-]?)/.exec(oxidation_str);
|
|
180
180
|
if (!ox_match)
|
|
181
181
|
return 0;
|
|
182
182
|
const [, sign_before, number, sign_after] = ox_match;
|
|
@@ -211,9 +211,7 @@ export const parse_formula_with_oxidation = (formula, strict = false) => {
|
|
|
211
211
|
const count = count_str ? parseInt(count_str, 10) : 1;
|
|
212
212
|
if (!is_valid_element(element))
|
|
213
213
|
throw new Error(`Invalid element symbol: ${element}`);
|
|
214
|
-
const oxidation_state = oxidation_str
|
|
215
|
-
? parse_oxidation_state(oxidation_str)
|
|
216
|
-
: undefined;
|
|
214
|
+
const oxidation_state = oxidation_str ? parse_oxidation_state(oxidation_str) : undefined;
|
|
217
215
|
// Find or add element entry
|
|
218
216
|
const existing = elements.find((el) => el.element === element);
|
|
219
217
|
if (existing) {
|
|
@@ -304,7 +302,10 @@ export function generate_chem_sys_subspaces(input) {
|
|
|
304
302
|
// Example: "Zr, Nb, InvalidElement, H" -> ["H", "Nb", "Zr"]
|
|
305
303
|
// Note: Matching is case-sensitive. Use all_symbols to filter against a subset.
|
|
306
304
|
export const normalize_element_symbols = (csv, all_symbols) => {
|
|
307
|
-
const input_set = new Set(csv
|
|
305
|
+
const input_set = new Set(csv
|
|
306
|
+
.split(`,`)
|
|
307
|
+
.map((sym) => sym.trim())
|
|
308
|
+
.filter(Boolean));
|
|
308
309
|
// Cast needed: ELEM_SYMBOLS is readonly const tuple, T is generic string subtype
|
|
309
310
|
return (all_symbols ?? ELEM_SYMBOLS).filter((sym) => input_set.has(sym));
|
|
310
311
|
};
|
|
@@ -315,7 +316,11 @@ export const has_wildcards = (input) => input.includes(`*`);
|
|
|
315
316
|
// Accepts both hyphen and comma separators.
|
|
316
317
|
// Throws if any non-wildcard token is not a valid element symbol.
|
|
317
318
|
export function parse_chemsys_with_wildcards(input) {
|
|
318
|
-
const tokens = input
|
|
319
|
+
const tokens = input
|
|
320
|
+
.replace(/-/g, `,`)
|
|
321
|
+
.split(`,`)
|
|
322
|
+
.map((tok) => tok.trim())
|
|
323
|
+
.filter(Boolean);
|
|
319
324
|
const elements = [];
|
|
320
325
|
let wildcard_count = 0;
|
|
321
326
|
for (const token of tokens) {
|
|
@@ -1,46 +1,99 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { extract_formula_elements } from '../composition/parse'
|
|
3
|
+
import type { AxisConfig } from '../plot'
|
|
4
|
+
import { DEFAULTS } from '../settings'
|
|
5
|
+
import type { Component } from 'svelte'
|
|
6
|
+
import { SvelteSet } from 'svelte/reactivity'
|
|
7
|
+
import ConvexHull2D from './ConvexHull2D.svelte'
|
|
8
|
+
import ConvexHull3D from './ConvexHull3D.svelte'
|
|
9
|
+
import ConvexHull4D from './ConvexHull4D.svelte'
|
|
10
|
+
import type { BaseConvexHullProps, Hull3DProps } from './index'
|
|
11
|
+
import type { GasSpecies, GasThermodynamicsConfig } from './types'
|
|
12
|
+
|
|
13
|
+
// Union type combining all possible props from 2D, 3D, and 4D components
|
|
14
|
+
// each specific component will only use its relevant props from this super set
|
|
15
|
+
type ConvexHullProps = BaseConvexHullProps & Hull3DProps & {
|
|
16
|
+
x_axis?: AxisConfig
|
|
17
|
+
y_axis?: AxisConfig
|
|
18
|
+
// Gas thermodynamics config - enables atmosphere-controlled phase diagrams
|
|
19
|
+
gas_config?: GasThermodynamicsConfig
|
|
20
|
+
// Gas pressure binding - enables two-way binding for atmosphere control
|
|
21
|
+
gas_pressures?: Partial<Record<GasSpecies, number>>
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
entries = [],
|
|
26
|
+
// bindable props not part of rest because Svelte 5 doesn't support spreading bindable props.
|
|
27
|
+
fullscreen = $bindable(false),
|
|
28
|
+
wrapper = $bindable(),
|
|
29
|
+
show_stable = $bindable(true),
|
|
30
|
+
show_unstable = $bindable(true),
|
|
31
|
+
show_hull_faces = $bindable(true),
|
|
32
|
+
hull_face_opacity: hull_face_opacity_prop = $bindable(
|
|
33
|
+
undefined as number | undefined,
|
|
34
|
+
),
|
|
35
|
+
color_mode = $bindable(`energy`),
|
|
36
|
+
color_scale = $bindable(`interpolateViridis`),
|
|
37
|
+
info_pane_open = $bindable(false),
|
|
38
|
+
legend_pane_open = $bindable(false),
|
|
39
|
+
max_hull_dist_show_phases = $bindable(0.1),
|
|
40
|
+
max_hull_dist_show_labels = $bindable(0.1),
|
|
41
|
+
show_stable_labels = $bindable(true),
|
|
42
|
+
show_unstable_labels = $bindable(false),
|
|
43
|
+
energy_source_mode = $bindable(`precomputed`),
|
|
44
|
+
phase_stats = $bindable(null),
|
|
45
|
+
display = $bindable({ x_grid: false, y_grid: false }),
|
|
46
|
+
stable_entries = $bindable([]),
|
|
47
|
+
unstable_entries = $bindable([]),
|
|
48
|
+
highlighted_entries = $bindable([]),
|
|
49
|
+
selected_entry = $bindable(null),
|
|
50
|
+
temperature = $bindable(),
|
|
51
|
+
gas_pressures = $bindable({}),
|
|
52
|
+
...rest
|
|
53
|
+
}: ConvexHullProps = $props()
|
|
54
|
+
|
|
55
|
+
// Lightweight element extraction - count unique elements, stripping oxidation states
|
|
56
|
+
// (e.g. "V4+" -> "V") to avoid counting the same element multiple times
|
|
57
|
+
function extract_unique_elements(
|
|
58
|
+
entries: { composition: Record<string, number> }[],
|
|
59
|
+
): string[] {
|
|
60
|
+
const elements = new SvelteSet<string>()
|
|
14
61
|
for (const entry of entries) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
62
|
+
for (const key of Object.keys(entry.composition)) {
|
|
63
|
+
// Extract valid element symbols, stripping oxidation states
|
|
64
|
+
for (const elem of extract_formula_elements(key, { unique: false })) {
|
|
65
|
+
elements.add(elem)
|
|
20
66
|
}
|
|
67
|
+
}
|
|
21
68
|
}
|
|
22
|
-
return Array.from(elements).
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
return Array.from(elements).toSorted()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Detect dimensionality by counting unique elements (lightweight operation)
|
|
73
|
+
const elements = $derived(extract_unique_elements(entries))
|
|
74
|
+
const element_count = $derived(elements.length)
|
|
75
|
+
|
|
76
|
+
// Resolve hull face opacity: use caller's value if provided,
|
|
77
|
+
// otherwise pick the right default for the dimensionality (ternary=30%, quaternary=3%).
|
|
78
|
+
// Use writable derived so child bind updates can sync back to parent.
|
|
79
|
+
const default_opacity = $derived(
|
|
80
|
+
element_count === 4
|
|
81
|
+
? DEFAULTS.convex_hull.quaternary.hull_face_opacity
|
|
82
|
+
: DEFAULTS.convex_hull.ternary.hull_face_opacity,
|
|
83
|
+
)
|
|
84
|
+
let hull_face_opacity = $derived(hull_face_opacity_prop ?? default_opacity)
|
|
85
|
+
$effect(() => {
|
|
86
|
+
if (hull_face_opacity_prop === hull_face_opacity) return
|
|
87
|
+
hull_face_opacity_prop = hull_face_opacity
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
// Map element count to corresponding component
|
|
91
|
+
// Note: Type assertion needed because TypeScript can't infer that all components
|
|
92
|
+
// accept a compatible superset of props (BaseConvexHullProps + dimension-specific)
|
|
93
|
+
const ConvexHullComponent = $derived(
|
|
94
|
+
{ 2: ConvexHull2D, 3: ConvexHull3D, 4: ConvexHull4D }[element_count] ??
|
|
95
|
+
null,
|
|
96
|
+
) as Component<ConvexHullProps> | null
|
|
44
97
|
</script>
|
|
45
98
|
|
|
46
99
|
{#if ConvexHullComponent}
|
|
@@ -8,6 +8,6 @@ type ConvexHullProps = BaseConvexHullProps & Hull3DProps & {
|
|
|
8
8
|
gas_config?: GasThermodynamicsConfig;
|
|
9
9
|
gas_pressures?: Partial<Record<GasSpecies, number>>;
|
|
10
10
|
};
|
|
11
|
-
declare const ConvexHull: Component<ConvexHullProps, {}, "temperature" | "display" | "
|
|
11
|
+
declare const ConvexHull: Component<ConvexHullProps, {}, "temperature" | "display" | "fullscreen" | "show_hull_faces" | "hull_face_opacity" | "color_mode" | "color_scale" | "show_stable" | "show_unstable" | "show_stable_labels" | "show_unstable_labels" | "max_hull_dist_show_phases" | "max_hull_dist_show_labels" | "info_pane_open" | "legend_pane_open" | "wrapper" | "energy_source_mode" | "stable_entries" | "unstable_entries" | "phase_stats" | "highlighted_entries" | "selected_entry" | "gas_pressures">;
|
|
12
12
|
type ConvexHull = ReturnType<typeof ConvexHull>;
|
|
13
13
|
export default ConvexHull;
|