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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { CompositionType } from '../composition';
|
|
2
|
-
import type { ShowControlsProp } from '../controls';
|
|
3
2
|
import type { ElementSymbol } from '../element';
|
|
4
|
-
import type { Point2D, Point3D, Vec3 } from '../math';
|
|
3
|
+
import type { Point2D, Point3D, Vec2, Vec3 } from '../math';
|
|
5
4
|
import type { Rect, Sides } from '../plot/core/layout';
|
|
6
5
|
import type { AnyStructure } from '../structure';
|
|
7
6
|
export interface StructurePopupStats {
|
|
@@ -36,7 +35,17 @@ export interface PhaseData {
|
|
|
36
35
|
data?: Record<string, unknown>;
|
|
37
36
|
structure?: Record<string, unknown>;
|
|
38
37
|
attributes?: Record<string, unknown>;
|
|
38
|
+
magnetic_ordering?: MagneticOrdering | (string & {});
|
|
39
39
|
}
|
|
40
|
+
export interface EntryCategoryConfig {
|
|
41
|
+
label: string;
|
|
42
|
+
property: string | string[];
|
|
43
|
+
markers: Record<string, MarkerSymbol>;
|
|
44
|
+
labels?: Record<string, string>;
|
|
45
|
+
aliases?: Record<string, string>;
|
|
46
|
+
}
|
|
47
|
+
export type MagneticOrdering = `FM` | `FiM` | `AFM` | `NM`;
|
|
48
|
+
export declare const MAGNETIC_ORDERING_CATEGORY: EntryCategoryConfig;
|
|
40
49
|
export interface ProcessedPhaseData {
|
|
41
50
|
entries: PhaseData[];
|
|
42
51
|
stable_entries: PhaseData[];
|
|
@@ -77,7 +86,6 @@ export interface ConvexHullConfig {
|
|
|
77
86
|
}
|
|
78
87
|
export interface ConvexHullControlsType {
|
|
79
88
|
title?: string;
|
|
80
|
-
show?: ShowControlsProp;
|
|
81
89
|
position?: `top-left` | `top-right` | `bottom-left` | `bottom-right`;
|
|
82
90
|
width?: number;
|
|
83
91
|
show_counts?: boolean;
|
|
@@ -145,7 +153,7 @@ export declare const DEFAULT_GAS_PRESSURES: Readonly<Record<GasSpecies, number>>
|
|
|
145
153
|
export interface GasThermodynamicsProvider {
|
|
146
154
|
get_standard_chemical_potential(gas: GasSpecies, T: number): number;
|
|
147
155
|
get_supported_gases(): GasSpecies[];
|
|
148
|
-
get_temperature_range():
|
|
156
|
+
get_temperature_range(): Vec2;
|
|
149
157
|
}
|
|
150
158
|
export interface GasThermodynamicsConfig {
|
|
151
159
|
enabled_gases?: GasSpecies[];
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
// Built-in preset for magnetic orderings (MP/pymatgen conventions) and the default
|
|
2
|
+
// entry_category of all convex hull components: entries carrying magnetic_ordering
|
|
3
|
+
// (or an MP-style `ordering` field) auto-render as shape-coded points with filter toggles
|
|
4
|
+
export const MAGNETIC_ORDERING_CATEGORY = {
|
|
5
|
+
label: `Magnetic`,
|
|
6
|
+
property: [`magnetic_ordering`, `ordering`],
|
|
7
|
+
markers: { FM: `triangle`, FiM: `diamond`, AFM: `square`, NM: `circle` },
|
|
8
|
+
// oxfmt-ignore
|
|
9
|
+
labels: { FM: `Ferromagnetic`, FiM: `Ferrimagnetic`, AFM: `Antiferromagnetic`, NM: `Non-magnetic` },
|
|
10
|
+
// oxfmt-ignore
|
|
11
|
+
aliases: { ferromagnetic: `FM`, ferrimagnetic: `FiM`, antiferromagnetic: `AFM`, 'non-magnetic': `NM`, nonmagnetic: `NM`, diamagnetic: `NM` },
|
|
12
|
+
};
|
|
1
13
|
export const HULL_FACE_COLOR_MODES = [
|
|
2
14
|
`uniform`,
|
|
3
15
|
`formation_energy`,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { PLOT_COLORS } from '../colors'
|
|
3
3
|
import { StatusMessage } from '../feedback'
|
|
4
|
-
import { create_file_drop_handler } from '../io'
|
|
4
|
+
import { create_file_drop_handler, drag_over_handlers } from '../io'
|
|
5
5
|
import { format_value } from '../labels'
|
|
6
|
+
import type { Vec2 } from '../math'
|
|
6
7
|
import { BarPlot } from '../plot'
|
|
7
8
|
import type {
|
|
8
9
|
AxisConfig,
|
|
@@ -99,7 +100,7 @@
|
|
|
99
100
|
for (const entry of entries_with_data) {
|
|
100
101
|
for (const [cn] of entry.data.cn_histogram) max_cn = Math.max(max_cn, cn)
|
|
101
102
|
}
|
|
102
|
-
const cn_range:
|
|
103
|
+
const cn_range: Vec2 = [-0.5, max_cn + 0.5]
|
|
103
104
|
|
|
104
105
|
return { count: [0, null] as [number, null], cn: cn_range } // Count axis should always start at 0
|
|
105
106
|
})
|
|
@@ -297,15 +298,7 @@
|
|
|
297
298
|
bind:display
|
|
298
299
|
{tooltip}
|
|
299
300
|
ondrop={handle_file_drop}
|
|
300
|
-
|
|
301
|
-
event.preventDefault()
|
|
302
|
-
if (!allow_file_drop) return
|
|
303
|
-
dragover = true
|
|
304
|
-
}}
|
|
305
|
-
ondragleave={(event) => {
|
|
306
|
-
event.preventDefault()
|
|
307
|
-
dragover = false
|
|
308
|
-
}}
|
|
301
|
+
{...drag_over_handlers({ allow: () => allow_file_drop, set_dragover: (over) => dragover = over })}
|
|
309
302
|
class={(rest.class ?? ``) + (dragover ? ` dragover` : ``)}
|
|
310
303
|
/>
|
|
311
304
|
{/if}
|
|
@@ -115,7 +115,8 @@
|
|
|
115
115
|
{shell_idx + 1}.{elec_idx + 1}
|
|
116
116
|
<!-- {:else if [`sequential`, true].includes(number_electrons)} -->
|
|
117
117
|
{:else}
|
|
118
|
-
{@const nth_electron =
|
|
118
|
+
{@const nth_electron =
|
|
119
|
+
shells.slice(0, shell_idx).reduce((sum, count) => sum + count, 0) +
|
|
119
120
|
elec_idx + 1}
|
|
120
121
|
{nth_electron}
|
|
121
122
|
{/if}
|
|
@@ -24,6 +24,6 @@ type $$ComponentProps = Omit<HTMLAttributes<HTMLElement>, `onclick`> & {
|
|
|
24
24
|
event: MouseEvent;
|
|
25
25
|
}) => void;
|
|
26
26
|
};
|
|
27
|
-
declare const ElementTile: import("svelte").Component<$$ComponentProps, {}, "
|
|
27
|
+
declare const ElementTile: import("svelte").Component<$$ComponentProps, {}, "text_color" | "node">;
|
|
28
28
|
type ElementTile = ReturnType<typeof ElementTile>;
|
|
29
29
|
export default ElementTile;
|
package/dist/element/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ElementSymbol } from './types';
|
|
1
2
|
export type * from './types';
|
|
2
3
|
export { default as BohrAtom } from './BohrAtom.svelte';
|
|
3
4
|
export { default as element_data } from './data';
|
|
@@ -6,3 +7,6 @@ export { default as ElementPhoto } from './ElementPhoto.svelte';
|
|
|
6
7
|
export { default as ElementStats } from './ElementStats.svelte';
|
|
7
8
|
export { default as ElementTile } from './ElementTile.svelte';
|
|
8
9
|
export { default as Nucleus } from './Nucleus.svelte';
|
|
10
|
+
export declare const is_elem_symbol: (symbol: string) => symbol is ElementSymbol;
|
|
11
|
+
export declare const coerce_elem_symbol: (symbol: string) => ElementSymbol | undefined;
|
|
12
|
+
export declare const FALLBACK_ELEMENTS: readonly ["H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne"];
|
package/dist/element/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ELEM_SYMBOLS } from '../labels';
|
|
1
2
|
export { default as BohrAtom } from './BohrAtom.svelte';
|
|
2
3
|
export { default as element_data } from './data';
|
|
3
4
|
export { default as ElementHeading } from './ElementHeading.svelte';
|
|
@@ -5,3 +6,20 @@ export { default as ElementPhoto } from './ElementPhoto.svelte';
|
|
|
5
6
|
export { default as ElementStats } from './ElementStats.svelte';
|
|
6
7
|
export { default as ElementTile } from './ElementTile.svelte';
|
|
7
8
|
export { default as Nucleus } from './Nucleus.svelte';
|
|
9
|
+
// Set-backed O(1) element-symbol guard shared by all parsers
|
|
10
|
+
const ELEM_SYMBOL_SET = new Set(ELEM_SYMBOLS);
|
|
11
|
+
export const is_elem_symbol = (symbol) => ELEM_SYMBOL_SET.has(symbol);
|
|
12
|
+
export const coerce_elem_symbol = (symbol) => is_elem_symbol(symbol) ? symbol : undefined;
|
|
13
|
+
// Default element symbols used when a file omits or mangles element info
|
|
14
|
+
export const FALLBACK_ELEMENTS = [
|
|
15
|
+
`H`,
|
|
16
|
+
`He`,
|
|
17
|
+
`Li`,
|
|
18
|
+
`Be`,
|
|
19
|
+
`B`,
|
|
20
|
+
`C`,
|
|
21
|
+
`N`,
|
|
22
|
+
`O`,
|
|
23
|
+
`F`,
|
|
24
|
+
`Ne`,
|
|
25
|
+
];
|
|
@@ -4,14 +4,16 @@
|
|
|
4
4
|
let {
|
|
5
5
|
visible = false,
|
|
6
6
|
message = `Drop JSON file to load phase diagram data`,
|
|
7
|
+
style = undefined,
|
|
7
8
|
}: {
|
|
8
9
|
visible?: boolean
|
|
9
10
|
message?: string
|
|
11
|
+
style?: string
|
|
10
12
|
} = $props()
|
|
11
13
|
</script>
|
|
12
14
|
|
|
13
15
|
{#if visible}
|
|
14
|
-
<div class="drag-overlay">
|
|
16
|
+
<div class="drag-overlay" {style}>
|
|
15
17
|
<div class="drag-message">
|
|
16
18
|
<Icon icon="Info" />
|
|
17
19
|
<span>{message}</span>
|
|
@@ -26,7 +26,11 @@
|
|
|
26
26
|
|
|
27
27
|
<style>
|
|
28
28
|
.status-message {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 1em;
|
|
29
32
|
border-radius: var(--border-radius, 3pt);
|
|
33
|
+
backdrop-filter: blur(8px);
|
|
30
34
|
&.info {
|
|
31
35
|
border: 2px dashed var(--text-color-muted, #ccc);
|
|
32
36
|
background: transparent;
|
|
@@ -47,11 +51,17 @@
|
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
button {
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
flex: none;
|
|
55
|
+
display: grid;
|
|
56
|
+
place-items: center;
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
width: 1.6em;
|
|
60
|
+
height: 1.6em;
|
|
61
|
+
padding: 0;
|
|
52
62
|
background: var(--btn-bg, #ddd);
|
|
53
63
|
border: 1px solid var(--border-color, #bbb);
|
|
54
|
-
border-radius:
|
|
64
|
+
border-radius: 50%;
|
|
55
65
|
cursor: pointer;
|
|
56
66
|
&:hover {
|
|
57
67
|
background: var(--btn-bg-hover, #ccc);
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { BrillouinZoneData } from '../brillouin'
|
|
3
3
|
import { compute_brillouin_zone, reciprocal_lattice } from '../brillouin'
|
|
4
|
-
import type
|
|
5
|
-
import { normalize_show_controls } from '../controls'
|
|
4
|
+
import { normalize_show_controls, type ShowControlsProp } from '../controls'
|
|
6
5
|
import EmptyState from '../EmptyState.svelte'
|
|
7
6
|
import { StatusMessage } from '../feedback'
|
|
8
7
|
import Spinner from '../feedback/Spinner.svelte'
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { create_file_drop_handler, drag_over_handlers, load_from_url } from '../io'
|
|
9
|
+
import { type FullscreenToggleProp, toggle_fullscreen, ViewerChrome } from '../layout'
|
|
10
|
+
import { sync_fullscreen } from '../layout/fullscreen.svelte'
|
|
12
11
|
import { PlotTooltip } from '../plot'
|
|
13
12
|
import type { CameraProjection } from '../settings'
|
|
14
13
|
import { DEFAULTS } from '../settings'
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
import { Canvas } from '@threlte/core'
|
|
17
16
|
import type { ComponentProps, Snippet } from 'svelte'
|
|
18
17
|
import { untrack } from 'svelte'
|
|
19
|
-
import { tooltip } from 'svelte-multiselect/attachments'
|
|
20
18
|
import type { HTMLAttributes } from 'svelte/elements'
|
|
21
19
|
import type { Camera, Scene } from 'three'
|
|
22
20
|
import { detect_irreducible_bz, extract_fermi_surface } from './compute'
|
|
@@ -91,6 +89,7 @@
|
|
|
91
89
|
on_error,
|
|
92
90
|
on_fullscreen_change,
|
|
93
91
|
on_mu_change,
|
|
92
|
+
on_point_hover,
|
|
94
93
|
on_hover,
|
|
95
94
|
...rest
|
|
96
95
|
}: {
|
|
@@ -117,15 +116,13 @@
|
|
|
117
116
|
clip_flip?: boolean
|
|
118
117
|
interpolation_factor?: number
|
|
119
118
|
camera_projection?: CameraProjection
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
* Control names: 'filename', 'fullscreen', 'controls'
|
|
128
|
-
*/
|
|
119
|
+
// Controls visibility configuration.
|
|
120
|
+
// - 'always': controls always visible
|
|
121
|
+
// - 'hover': controls visible on component hover (default)
|
|
122
|
+
// - 'never': controls never visible
|
|
123
|
+
// - object: { mode, hidden, style } for fine-grained control
|
|
124
|
+
//
|
|
125
|
+
// Control names: 'filename', 'fullscreen', 'controls'
|
|
129
126
|
show_controls?: ShowControlsProp
|
|
130
127
|
fullscreen?: boolean
|
|
131
128
|
width?: number
|
|
@@ -134,7 +131,7 @@
|
|
|
134
131
|
hovered?: boolean
|
|
135
132
|
dragover?: boolean
|
|
136
133
|
allow_file_drop?: boolean
|
|
137
|
-
fullscreen_toggle?:
|
|
134
|
+
fullscreen_toggle?: FullscreenToggleProp
|
|
138
135
|
data_url?: string
|
|
139
136
|
spinner_props?: ComponentProps<typeof Spinner>
|
|
140
137
|
loading?: boolean
|
|
@@ -148,6 +145,8 @@
|
|
|
148
145
|
on_fullscreen_change?: (data: FermiHandlerData) => void
|
|
149
146
|
on_mu_change?: (mu: number) => void
|
|
150
147
|
tooltip_config?: Snippet<[{ hover_data: FermiHoverData }]> | FermiTooltipConfig
|
|
148
|
+
on_point_hover?: (data: FermiHoverData | null) => void
|
|
149
|
+
// Deprecated alias for on_point_hover (honored when on_point_hover is unset)
|
|
151
150
|
on_hover?: (data: FermiHoverData | null) => void
|
|
152
151
|
} & HTMLAttributes<HTMLDivElement> = $props()
|
|
153
152
|
|
|
@@ -157,9 +156,16 @@
|
|
|
157
156
|
let recompute_job_id = 0 // monotonic counter to track latest recompute call
|
|
158
157
|
let hover_data = $state<FermiHoverData | null>(null)
|
|
159
158
|
|
|
160
|
-
// Call
|
|
159
|
+
// Call on_point_hover callback when hover_data changes (on_hover is a deprecated alias)
|
|
160
|
+
let warned_deprecated_on_hover = false
|
|
161
161
|
$effect(() => {
|
|
162
|
-
on_hover
|
|
162
|
+
if (on_hover && !on_point_hover && !warned_deprecated_on_hover) {
|
|
163
|
+
warned_deprecated_on_hover = true
|
|
164
|
+
console.warn(
|
|
165
|
+
`FermiSurface: the on_hover prop was renamed to on_point_hover; the alias will be removed in a future release`,
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
;(on_point_hover ?? on_hover)?.(hover_data)
|
|
163
169
|
})
|
|
164
170
|
|
|
165
171
|
let controls_config = $derived(normalize_show_controls(show_controls))
|
|
@@ -179,8 +185,8 @@
|
|
|
179
185
|
? new TextDecoder().decode(content)
|
|
180
186
|
: content
|
|
181
187
|
|
|
188
|
+
// parse_fermi_file throws a descriptive error when parsing fails
|
|
182
189
|
const parsed = parse_fermi_file(text, filename)
|
|
183
|
-
if (!parsed) throw new Error(`Failed to parse Fermi surface from ${filename}`)
|
|
184
190
|
|
|
185
191
|
const file_size = new Blob([content]).size
|
|
186
192
|
current_filename = filename
|
|
@@ -349,28 +355,19 @@
|
|
|
349
355
|
else if (event.key === `Escape`) controls_open = false
|
|
350
356
|
}
|
|
351
357
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
})
|
|
360
|
-
} else if (!fullscreen && fs_el === wrapper) document.exitFullscreen()
|
|
361
|
-
set_fullscreen_bg(wrapper, fullscreen, `--fermi-bg-fullscreen`)
|
|
358
|
+
sync_fullscreen({
|
|
359
|
+
get_wrapper: () => wrapper,
|
|
360
|
+
get_fullscreen: () => fullscreen,
|
|
361
|
+
set_fullscreen: (val) => (fullscreen = val),
|
|
362
|
+
bg_css_var: `--fermi-bg-fullscreen`,
|
|
363
|
+
on_request_error: () => (fullscreen = false),
|
|
364
|
+
on_change: (val) =>
|
|
365
|
+
on_fullscreen_change?.({ fermi_data, bz_data, fullscreen: val }),
|
|
362
366
|
})
|
|
363
367
|
</script>
|
|
364
368
|
|
|
365
369
|
<svelte:window onkeydown={handle_keydown} />
|
|
366
370
|
|
|
367
|
-
<svelte:document
|
|
368
|
-
onfullscreenchange={() => {
|
|
369
|
-
fullscreen = Boolean(document.fullscreenElement)
|
|
370
|
-
on_fullscreen_change?.({ fermi_data, bz_data, fullscreen })
|
|
371
|
-
}}
|
|
372
|
-
/>
|
|
373
|
-
|
|
374
371
|
<div
|
|
375
372
|
class:dragover
|
|
376
373
|
class:active={controls_open}
|
|
@@ -382,15 +379,7 @@
|
|
|
382
379
|
onmouseenter={() => (hovered = true)}
|
|
383
380
|
onmouseleave={() => (hovered = false)}
|
|
384
381
|
ondrop={handle_file_drop}
|
|
385
|
-
|
|
386
|
-
event.preventDefault()
|
|
387
|
-
if (!allow_file_drop) return
|
|
388
|
-
dragover = true
|
|
389
|
-
}}
|
|
390
|
-
ondragleave={(event) => {
|
|
391
|
-
event.preventDefault()
|
|
392
|
-
dragover = false
|
|
393
|
-
}}
|
|
382
|
+
{...drag_over_handlers({ allow: () => allow_file_drop, set_dragover: (over) => dragover = over })}
|
|
394
383
|
{...rest}
|
|
395
384
|
class="fermi-surface {rest.class ?? ``}"
|
|
396
385
|
>
|
|
@@ -409,61 +398,41 @@
|
|
|
409
398
|
style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 90%; text-align: center"
|
|
410
399
|
/>
|
|
411
400
|
{:else if fermi_data || band_data}
|
|
412
|
-
<
|
|
413
|
-
|
|
414
|
-
|
|
401
|
+
<ViewerChrome
|
|
402
|
+
{controls_config}
|
|
403
|
+
filename={current_filename}
|
|
404
|
+
{fullscreen}
|
|
405
|
+
{fullscreen_toggle}
|
|
406
|
+
{wrapper}
|
|
415
407
|
>
|
|
416
|
-
{#if controls_config.
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
{band_data}
|
|
443
|
-
bind:mu
|
|
444
|
-
bind:color_property
|
|
445
|
-
bind:color_scale
|
|
446
|
-
{custom_property_label}
|
|
447
|
-
bind:representation
|
|
448
|
-
bind:surface_opacity
|
|
449
|
-
bind:selected_bands
|
|
450
|
-
bind:show_bz
|
|
451
|
-
bind:bz_opacity
|
|
452
|
-
bind:show_vectors
|
|
453
|
-
bind:tile_bz
|
|
454
|
-
bind:clip_enabled
|
|
455
|
-
bind:clip_axis
|
|
456
|
-
bind:clip_position
|
|
457
|
-
bind:clip_flip
|
|
458
|
-
bind:interpolation_factor
|
|
459
|
-
bind:camera_projection
|
|
460
|
-
on_mu_change={handle_mu_change}
|
|
461
|
-
on_interpolation_change={handle_interpolation_change}
|
|
462
|
-
on_export={handle_export}
|
|
463
|
-
/>
|
|
464
|
-
{/if}
|
|
408
|
+
{#if controls_config.visible(`controls`)}
|
|
409
|
+
<FermiSurfaceControls
|
|
410
|
+
bind:controls_open
|
|
411
|
+
{fermi_data}
|
|
412
|
+
{band_data}
|
|
413
|
+
bind:mu
|
|
414
|
+
bind:color_property
|
|
415
|
+
bind:color_scale
|
|
416
|
+
{custom_property_label}
|
|
417
|
+
bind:representation
|
|
418
|
+
bind:surface_opacity
|
|
419
|
+
bind:selected_bands
|
|
420
|
+
bind:show_bz
|
|
421
|
+
bind:bz_opacity
|
|
422
|
+
bind:show_vectors
|
|
423
|
+
bind:tile_bz
|
|
424
|
+
bind:clip_enabled
|
|
425
|
+
bind:clip_axis
|
|
426
|
+
bind:clip_position
|
|
427
|
+
bind:clip_flip
|
|
428
|
+
bind:interpolation_factor
|
|
429
|
+
bind:camera_projection
|
|
430
|
+
on_mu_change={handle_mu_change}
|
|
431
|
+
on_interpolation_change={handle_interpolation_change}
|
|
432
|
+
on_export={handle_export}
|
|
433
|
+
/>
|
|
465
434
|
{/if}
|
|
466
|
-
</
|
|
435
|
+
</ViewerChrome>
|
|
467
436
|
|
|
468
437
|
{#if typeof WebGLRenderingContext !== `undefined`}
|
|
469
438
|
<Canvas renderMode="on-demand" dpr={Math.min(2, window.devicePixelRatio)}>
|
|
@@ -555,52 +524,4 @@
|
|
|
555
524
|
.fermi-surface :global(canvas) {
|
|
556
525
|
user-select: none;
|
|
557
526
|
}
|
|
558
|
-
section.control-buttons {
|
|
559
|
-
position: absolute;
|
|
560
|
-
display: flex;
|
|
561
|
-
top: var(--fermi-buttons-top, var(--ctrl-btn-top, 1ex));
|
|
562
|
-
right: var(--fermi-buttons-right, var(--ctrl-btn-right, 1ex));
|
|
563
|
-
gap: clamp(6pt, 1cqmin, 9pt);
|
|
564
|
-
z-index: var(
|
|
565
|
-
--fermi-buttons-z-index,
|
|
566
|
-
var(--z-index-overlay-controls, 100000000)
|
|
567
|
-
);
|
|
568
|
-
opacity: 0;
|
|
569
|
-
pointer-events: none;
|
|
570
|
-
transition: opacity 0.2s ease;
|
|
571
|
-
align-items: center;
|
|
572
|
-
}
|
|
573
|
-
/* Mode: always - controls always visible */
|
|
574
|
-
section.control-buttons.always-visible {
|
|
575
|
-
opacity: 1;
|
|
576
|
-
pointer-events: auto;
|
|
577
|
-
}
|
|
578
|
-
/* Mode: hover - controls visible on component hover */
|
|
579
|
-
.fermi-surface:hover section.control-buttons.hover-visible,
|
|
580
|
-
.fermi-surface:focus-within section.control-buttons.hover-visible {
|
|
581
|
-
opacity: 1;
|
|
582
|
-
pointer-events: auto;
|
|
583
|
-
}
|
|
584
|
-
/* Mode: never - stays hidden (default state, no additional CSS needed) */
|
|
585
|
-
section.control-buttons > :global(button) {
|
|
586
|
-
background-color: transparent;
|
|
587
|
-
display: flex;
|
|
588
|
-
padding: 4px;
|
|
589
|
-
border-radius: var(--border-radius, 3pt);
|
|
590
|
-
font-size: clamp(0.85em, 2cqmin, 1.3em);
|
|
591
|
-
}
|
|
592
|
-
section.control-buttons :global(button:hover) {
|
|
593
|
-
background-color: color-mix(in srgb, currentColor 8%, transparent);
|
|
594
|
-
}
|
|
595
|
-
.filename {
|
|
596
|
-
font-family: monospace;
|
|
597
|
-
font-size: 0.9em;
|
|
598
|
-
background: var(--code-bg, rgba(0, 0, 0, 0.1));
|
|
599
|
-
padding: 3pt 6pt;
|
|
600
|
-
border-radius: 3pt;
|
|
601
|
-
max-width: 200px;
|
|
602
|
-
overflow: hidden;
|
|
603
|
-
text-overflow: ellipsis;
|
|
604
|
-
white-space: nowrap;
|
|
605
|
-
}
|
|
606
527
|
</style>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { BrillouinZoneData } from '../brillouin';
|
|
2
|
-
import type
|
|
2
|
+
import { type ShowControlsProp } from '../controls';
|
|
3
3
|
import Spinner from '../feedback/Spinner.svelte';
|
|
4
|
+
import { type FullscreenToggleProp } from '../layout';
|
|
4
5
|
import type { CameraProjection } from '../settings';
|
|
5
6
|
import type { Crystal } from '../structure';
|
|
6
7
|
import type { ComponentProps, Snippet } from 'svelte';
|
|
@@ -38,15 +39,6 @@ type $$ComponentProps = {
|
|
|
38
39
|
clip_flip?: boolean;
|
|
39
40
|
interpolation_factor?: number;
|
|
40
41
|
camera_projection?: CameraProjection;
|
|
41
|
-
/**
|
|
42
|
-
* Controls visibility configuration.
|
|
43
|
-
* - 'always': controls always visible
|
|
44
|
-
* - 'hover': controls visible on component hover (default)
|
|
45
|
-
* - 'never': controls never visible
|
|
46
|
-
* - object: { mode, hidden, style } for fine-grained control
|
|
47
|
-
*
|
|
48
|
-
* Control names: 'filename', 'fullscreen', 'controls'
|
|
49
|
-
*/
|
|
50
42
|
show_controls?: ShowControlsProp;
|
|
51
43
|
fullscreen?: boolean;
|
|
52
44
|
width?: number;
|
|
@@ -55,9 +47,7 @@ type $$ComponentProps = {
|
|
|
55
47
|
hovered?: boolean;
|
|
56
48
|
dragover?: boolean;
|
|
57
49
|
allow_file_drop?: boolean;
|
|
58
|
-
fullscreen_toggle?:
|
|
59
|
-
fullscreen: boolean;
|
|
60
|
-
}]> | boolean;
|
|
50
|
+
fullscreen_toggle?: FullscreenToggleProp;
|
|
61
51
|
data_url?: string;
|
|
62
52
|
spinner_props?: ComponentProps<typeof Spinner>;
|
|
63
53
|
loading?: boolean;
|
|
@@ -76,8 +66,9 @@ type $$ComponentProps = {
|
|
|
76
66
|
tooltip_config?: Snippet<[{
|
|
77
67
|
hover_data: FermiHoverData;
|
|
78
68
|
}]> | FermiTooltipConfig;
|
|
69
|
+
on_point_hover?: (data: FermiHoverData | null) => void;
|
|
79
70
|
on_hover?: (data: FermiHoverData | null) => void;
|
|
80
71
|
} & HTMLAttributes<HTMLDivElement>;
|
|
81
|
-
declare const FermiSurface: import("svelte").Component<$$ComponentProps, {}, "
|
|
72
|
+
declare const FermiSurface: import("svelte").Component<$$ComponentProps, {}, "height" | "width" | "dragover" | "fullscreen" | "wrapper" | "hovered" | "controls_open" | "color_scale" | "loading" | "camera_projection" | "error_msg" | "surface_opacity" | "show_vectors" | "bz_data" | "mu" | "selected_bands" | "interpolation_factor" | "fermi_data" | "band_data" | "color_property" | "representation" | "show_bz" | "bz_opacity" | "tile_bz" | "clip_enabled" | "clip_axis" | "clip_position" | "clip_flip">;
|
|
82
73
|
type FermiSurface = ReturnType<typeof FermiSurface>;
|
|
83
74
|
export default FermiSurface;
|
|
@@ -30,6 +30,6 @@ type $$ComponentProps = {
|
|
|
30
30
|
band_data?: BandGridData;
|
|
31
31
|
}]>;
|
|
32
32
|
};
|
|
33
|
-
declare const FermiSurfaceControls: import("svelte").Component<$$ComponentProps, {}, "controls_open" | "
|
|
33
|
+
declare const FermiSurfaceControls: import("svelte").Component<$$ComponentProps, {}, "controls_open" | "color_scale" | "camera_projection" | "surface_opacity" | "show_vectors" | "mu" | "selected_bands" | "interpolation_factor" | "color_property" | "representation" | "show_bz" | "bz_opacity" | "tile_bz" | "clip_enabled" | "clip_axis" | "clip_position" | "clip_flip">;
|
|
34
34
|
type FermiSurfaceControls = ReturnType<typeof FermiSurfaceControls>;
|
|
35
35
|
export default FermiSurfaceControls;
|