matterviz 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/EmptyState.svelte +10 -4
- package/dist/FilePicker.svelte +48 -60
- package/dist/Icon.svelte +7 -4
- package/dist/MillerIndexInput.svelte +2 -2
- package/dist/api/optimade.js +10 -7
- package/dist/app.css +68 -0
- package/dist/brillouin/BrillouinZone.svelte +90 -91
- package/dist/brillouin/BrillouinZone.svelte.d.ts +5 -7
- package/dist/brillouin/BrillouinZoneControls.svelte +3 -6
- package/dist/brillouin/BrillouinZoneExportPane.svelte +18 -14
- package/dist/brillouin/BrillouinZoneInfoPane.svelte +6 -10
- package/dist/brillouin/BrillouinZoneScene.svelte +46 -68
- package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +1 -1
- package/dist/brillouin/compute.js +10 -16
- package/dist/brillouin/geometry.js +2 -2
- package/dist/chempot-diagram/ChemPotDiagram.svelte +48 -50
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte +61 -169
- package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +1 -1
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte +559 -755
- package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +1 -1
- package/dist/chempot-diagram/async-compute.svelte.js +13 -14
- package/dist/chempot-diagram/color.d.ts +21 -1
- package/dist/chempot-diagram/color.js +70 -1
- package/dist/chempot-diagram/compute.d.ts +7 -0
- package/dist/chempot-diagram/compute.js +85 -26
- package/dist/chempot-diagram/controls-state.svelte.js +1 -1
- package/dist/chempot-diagram/export.js +1 -6
- package/dist/chempot-diagram/temperature.js +9 -10
- package/dist/colors/index.d.ts +0 -4
- package/dist/colors/index.js +19 -20
- package/dist/composition/BarChart.svelte +30 -26
- package/dist/composition/BubbleChart.svelte +17 -17
- package/dist/composition/Composition.svelte +10 -19
- package/dist/composition/Formula.svelte +20 -27
- package/dist/composition/FormulaFilter.svelte +115 -184
- package/dist/composition/PieChart.svelte +55 -41
- package/dist/composition/format.js +7 -9
- package/dist/composition/index.d.ts +2 -0
- package/dist/composition/index.js +14 -0
- package/dist/composition/parse.d.ts +2 -2
- package/dist/composition/parse.js +61 -115
- package/dist/constants.d.ts +0 -1
- package/dist/constants.js +17 -26
- package/dist/convex-hull/ConvexHull.svelte +12 -15
- package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull2D.svelte +93 -94
- package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull3D.svelte +127 -186
- package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHull4D.svelte +131 -180
- package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
- package/dist/convex-hull/ConvexHullChrome.svelte +36 -40
- package/dist/convex-hull/ConvexHullControls.svelte +46 -48
- package/dist/convex-hull/ConvexHullStats.svelte +193 -195
- package/dist/convex-hull/ConvexHullTooltip.svelte +5 -12
- package/dist/convex-hull/GasPressureControls.svelte +5 -12
- package/dist/convex-hull/StructurePopup.svelte +18 -22
- package/dist/convex-hull/StructurePopup.svelte.d.ts +2 -0
- package/dist/convex-hull/TemperatureSlider.svelte +4 -10
- package/dist/convex-hull/canvas-interactions.svelte.js +2 -1
- package/dist/convex-hull/gas-thermodynamics.js +21 -53
- package/dist/convex-hull/helpers.d.ts +8 -10
- package/dist/convex-hull/helpers.js +37 -43
- package/dist/convex-hull/hull-state.svelte.d.ts +1 -1
- package/dist/convex-hull/thermodynamics.js +37 -44
- package/dist/coordination/CoordinationBarPlot.svelte +49 -53
- package/dist/coordination/CoordinationBarPlot.svelte.d.ts +1 -1
- package/dist/coordination/calc-coordination.d.ts +1 -1
- package/dist/coordination/calc-coordination.js +28 -25
- package/dist/element/BohrAtom.svelte +5 -9
- package/dist/element/ElementHeading.svelte +4 -1
- package/dist/element/ElementPhoto.svelte +11 -9
- package/dist/element/ElementStats.svelte +12 -10
- package/dist/element/ElementTile.svelte +44 -67
- package/dist/element/Nucleus.svelte +4 -2
- package/dist/element/data.d.ts +3 -2
- package/dist/element/data.js +5 -1
- package/dist/element/helpers.d.ts +4 -0
- package/dist/element/helpers.js +18 -0
- package/dist/element/index.d.ts +2 -5
- package/dist/element/index.js +4 -19
- package/dist/feedback/DragOverlay.svelte +5 -5
- package/dist/feedback/DragOverlay.svelte.d.ts +2 -2
- package/dist/feedback/StatusMessage.svelte +7 -4
- package/dist/fermi-surface/FermiSlice.svelte +21 -18
- package/dist/fermi-surface/FermiSurface.svelte +35 -44
- package/dist/fermi-surface/FermiSurface.svelte.d.ts +7 -13
- package/dist/fermi-surface/FermiSurfaceControls.svelte +6 -20
- package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceScene.svelte +64 -136
- package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
- package/dist/fermi-surface/FermiSurfaceTooltip.svelte +9 -6
- package/dist/fermi-surface/compute.js +25 -58
- package/dist/fermi-surface/parse.js +54 -88
- package/dist/file-viewer/JsonBrowser.svelte +1043 -0
- package/dist/file-viewer/JsonBrowser.svelte.d.ts +9 -0
- package/dist/file-viewer/PlotPanel.svelte +350 -0
- package/dist/file-viewer/PlotPanel.svelte.d.ts +9 -0
- package/dist/file-viewer/TrajectoryWithDos.svelte +30 -0
- package/dist/file-viewer/TrajectoryWithDos.svelte.d.ts +10 -0
- package/dist/file-viewer/detect.d.ts +11 -0
- package/dist/file-viewer/detect.js +381 -0
- package/dist/file-viewer/eligibility.d.ts +4 -0
- package/dist/file-viewer/eligibility.js +53 -0
- package/dist/file-viewer/host-protocol.d.ts +50 -0
- package/dist/file-viewer/host-transfer.d.ts +25 -0
- package/dist/file-viewer/host-transfer.js +42 -0
- package/dist/file-viewer/index.d.ts +5 -0
- package/dist/file-viewer/index.js +5 -0
- package/dist/file-viewer/main.d.ts +44 -0
- package/dist/file-viewer/main.js +535 -0
- package/dist/file-viewer/parse.d.ts +9 -0
- package/dist/file-viewer/parse.js +170 -0
- package/dist/file-viewer/plot-utils.d.ts +24 -0
- package/dist/file-viewer/plot-utils.js +191 -0
- package/dist/file-viewer/types.d.ts +4 -0
- package/dist/file-viewer/types.js +5 -0
- package/dist/heatmap-matrix/HeatmapMatrix.svelte +153 -219
- package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +2 -2
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +9 -7
- package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +1 -1
- package/dist/heatmap-matrix/index.d.ts +5 -0
- package/dist/icons.d.ts +4 -0
- package/dist/icons.js +4 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/io/ExportPane.svelte +11 -7
- package/dist/io/decompress.d.ts +4 -1
- package/dist/io/decompress.js +24 -36
- package/dist/io/export.d.ts +11 -4
- package/dist/io/export.js +75 -19
- package/dist/io/fetch.d.ts +0 -3
- package/dist/io/fetch.js +0 -11
- package/dist/io/file-drop.js +60 -35
- package/dist/io/index.d.ts +0 -1
- package/dist/io/index.js +2 -9
- package/dist/io/is-binary.d.ts +9 -0
- package/dist/io/is-binary.js +45 -1
- package/dist/io/url-drop.d.ts +2 -0
- package/dist/io/url-drop.js +40 -40
- package/dist/isosurface/Isosurface.svelte +700 -215
- package/dist/isosurface/Isosurface.svelte.d.ts +7 -1
- package/dist/isosurface/IsosurfaceControls.svelte +590 -116
- package/dist/isosurface/IsosurfaceControls.svelte.d.ts +1 -1
- package/dist/isosurface/VolumeSlice.svelte +224 -0
- package/dist/isosurface/VolumeSlice.svelte.d.ts +28 -0
- package/dist/isosurface/coloring.d.ts +20 -0
- package/dist/isosurface/coloring.js +118 -0
- package/dist/isosurface/geometry-worker-types.d.ts +38 -0
- package/dist/isosurface/geometry.worker.d.ts +1 -0
- package/dist/isosurface/geometry.worker.js +59 -0
- package/dist/isosurface/grid.d.ts +10 -0
- package/dist/isosurface/grid.js +31 -0
- package/dist/isosurface/index.d.ts +4 -0
- package/dist/isosurface/index.js +4 -0
- package/dist/isosurface/parse-vaspwave.d.ts +3 -0
- package/dist/isosurface/parse-vaspwave.js +138 -0
- package/dist/isosurface/parse.js +6 -6
- package/dist/isosurface/profile.d.ts +12 -0
- package/dist/isosurface/profile.js +19 -0
- package/dist/isosurface/sampling.d.ts +34 -0
- package/dist/isosurface/sampling.js +408 -0
- package/dist/isosurface/slice-rendering.d.ts +13 -0
- package/dist/isosurface/slice-rendering.js +79 -0
- package/dist/isosurface/slice.d.ts +22 -2
- package/dist/isosurface/slice.js +200 -116
- package/dist/isosurface/types.d.ts +24 -1
- package/dist/isosurface/types.js +120 -8
- package/dist/json-path.d.ts +4 -0
- package/dist/json-path.js +89 -0
- package/dist/labels.d.ts +6 -2
- package/dist/labels.js +44 -14
- package/dist/layout/FullscreenButton.svelte +2 -1
- package/dist/layout/FullscreenToggle.svelte +10 -4
- package/dist/layout/InfoCard.svelte +8 -21
- package/dist/layout/InfoTag.svelte +1 -3
- package/dist/layout/NumberRangeInput.svelte +46 -0
- package/dist/layout/NumberRangeInput.svelte.d.ts +12 -0
- package/dist/layout/PropertyFilter.svelte +2 -6
- package/dist/layout/SettingsSection.svelte +57 -62
- package/dist/layout/SettingsSection.svelte.d.ts +6 -7
- package/dist/layout/SubpageGrid.svelte +3 -1
- package/dist/layout/ViewerChrome.svelte +16 -11
- package/dist/layout/ViewerChrome.svelte.d.ts +2 -1
- package/dist/layout/fullscreen.js +3 -5
- package/dist/layout/fullscreen.svelte.js +1 -2
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +1 -0
- package/dist/layout/json-tree/JsonNode.svelte +22 -59
- package/dist/layout/json-tree/JsonTree.svelte +101 -172
- package/dist/layout/json-tree/JsonValue.svelte +9 -32
- package/dist/layout/json-tree/utils.d.ts +0 -3
- package/dist/layout/json-tree/utils.js +50 -188
- package/dist/marching-cubes.d.ts +8 -1
- package/dist/marching-cubes.js +115 -48
- package/dist/math.d.ts +5 -2
- package/dist/math.js +48 -38
- package/dist/overlays/ContextMenu.svelte +19 -34
- package/dist/overlays/CopyButton.svelte +11 -5
- package/dist/overlays/DragControlTab.svelte +6 -1
- package/dist/overlays/DraggablePane.svelte +110 -74
- package/dist/overlays/DraggablePane.svelte.d.ts +2 -1
- package/dist/overlays/GlassChip.svelte +32 -0
- package/dist/overlays/GlassChip.svelte.d.ts +8 -0
- package/dist/overlays/InfoPaneCards.svelte +11 -23
- package/dist/overlays/index.d.ts +7 -0
- package/dist/overlays/index.js +26 -0
- package/dist/overlays/portal.d.ts +2 -0
- package/dist/overlays/portal.js +14 -0
- package/dist/periodic-table/PeriodicTable.svelte +113 -145
- package/dist/periodic-table/PeriodicTable.svelte.d.ts +5 -3
- package/dist/periodic-table/PeriodicTableControls.svelte +37 -115
- package/dist/periodic-table/TableInset.svelte +9 -4
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +68 -105
- package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +6 -8
- package/dist/phase-diagram/PhaseDiagramControls.svelte +70 -94
- package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +1 -1
- package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +2 -1
- package/dist/phase-diagram/PhaseDiagramExportPane.svelte +12 -12
- package/dist/phase-diagram/PhaseDiagramTooltip.svelte +54 -58
- package/dist/phase-diagram/TdbInfoPanel.svelte +21 -15
- package/dist/phase-diagram/build-diagram.js +4 -9
- package/dist/phase-diagram/diagram-input.d.ts +1 -2
- package/dist/phase-diagram/parse.js +15 -15
- package/dist/phase-diagram/svg-to-diagram.js +28 -27
- package/dist/phase-diagram/utils.js +2 -3
- package/dist/plot/bar/BarPlot.svelte +461 -426
- package/dist/plot/bar/BarPlot.svelte.d.ts +2 -0
- package/dist/plot/bar/BarPlotControls.svelte +1 -3
- package/dist/plot/bar/BarPlotControls.svelte.d.ts +4 -6
- package/dist/plot/bar/SpacegroupBarPlot.svelte +46 -77
- package/dist/plot/bar/data.d.ts +5 -4
- package/dist/plot/bar/data.js +2 -1
- package/dist/plot/box/BoxPlot.svelte +322 -226
- package/dist/plot/box/BoxPlot.svelte.d.ts +2 -0
- package/dist/plot/box/Violin.svelte.d.ts +1 -0
- package/dist/plot/box/box-plot.js +1 -1
- package/dist/plot/core/auto-place.d.ts +1 -1
- package/dist/plot/core/auto-place.js +2 -2
- package/dist/plot/core/axis-utils.d.ts +12 -7
- package/dist/plot/core/axis-utils.js +48 -48
- package/dist/plot/core/components/AxisLabel.svelte +82 -20
- package/dist/plot/core/components/AxisLabel.svelte.d.ts +1 -0
- package/dist/plot/core/components/ColorBar.svelte +101 -106
- package/dist/plot/core/components/ColorScaleSelect.svelte +1 -1
- package/dist/plot/core/components/FillArea.svelte +10 -17
- package/dist/plot/core/components/HierarchyControls.svelte +249 -0
- package/dist/plot/{sunburst/SunburstControls.svelte.d.ts → core/components/HierarchyControls.svelte.d.ts} +12 -8
- package/dist/plot/core/components/InteractiveAxisLabel.svelte +1 -1
- package/dist/plot/core/components/InteractiveAxisLabel.svelte.d.ts +1 -1
- package/dist/plot/core/components/Line.svelte +18 -9
- package/dist/plot/core/components/Line.svelte.d.ts +2 -0
- package/dist/plot/core/components/PlotAxis.svelte +40 -17
- package/dist/plot/core/components/PlotControls.svelte +65 -41
- package/dist/plot/core/components/PlotLegend.svelte +31 -35
- package/dist/plot/core/components/PlotMarginals.svelte +616 -0
- package/dist/plot/core/components/PlotMarginals.svelte.d.ts +15 -0
- package/dist/plot/core/components/PlotTooltip.svelte +1 -1
- package/dist/plot/core/components/PortalSelect.svelte +4 -8
- package/dist/plot/core/components/ReferenceLine.svelte +27 -24
- package/dist/plot/core/components/ReferenceLine3D.svelte +54 -57
- package/dist/plot/core/components/ReferencePlane.svelte +7 -8
- package/dist/plot/core/components/ZeroLines.svelte +4 -8
- package/dist/plot/core/components/ZoomRect.svelte +1 -2
- package/dist/plot/core/components/index.d.ts +1 -0
- package/dist/plot/core/components/index.js +1 -0
- package/dist/plot/core/data-cleaning-signal.d.ts +46 -0
- package/dist/plot/core/data-cleaning-signal.js +467 -0
- package/dist/plot/core/data-cleaning.d.ts +2 -42
- package/dist/plot/core/data-cleaning.js +27 -474
- package/dist/plot/core/data-transform.d.ts +1 -2
- package/dist/plot/core/data-transform.js +9 -15
- package/dist/plot/core/fill-utils.d.ts +3 -1
- package/dist/plot/core/fill-utils.js +28 -6
- package/dist/plot/core/index.d.ts +1 -0
- package/dist/plot/core/index.js +1 -0
- package/dist/plot/core/interactions.js +0 -2
- package/dist/plot/core/layout.d.ts +15 -6
- package/dist/plot/core/layout.js +57 -38
- package/dist/plot/core/marginals.d.ts +170 -0
- package/dist/plot/core/marginals.js +436 -0
- package/dist/plot/core/pan-zoom.svelte.d.ts +2 -4
- package/dist/plot/core/pan-zoom.svelte.js +34 -17
- package/dist/plot/core/placed-tween.svelte.d.ts +3 -0
- package/dist/plot/core/placed-tween.svelte.js +68 -21
- package/dist/plot/core/reference-line.js +1 -1
- package/dist/plot/core/scales.d.ts +23 -0
- package/dist/plot/core/scales.js +39 -13
- package/dist/plot/core/svg.js +0 -1
- package/dist/plot/core/types/fills.d.ts +101 -0
- package/dist/plot/core/types/fills.js +15 -0
- package/dist/plot/core/types/plot-3d.d.ts +87 -0
- package/dist/plot/core/types/plot-3d.js +4 -0
- package/dist/plot/core/types/reference-lines.d.ts +140 -0
- package/dist/plot/core/types/reference-lines.js +9 -0
- package/dist/plot/core/types.d.ts +29 -324
- package/dist/plot/core/types.js +23 -20
- package/dist/plot/core/utils/hierarchy-chart.d.ts +52 -0
- package/dist/plot/core/utils/hierarchy-chart.js +191 -0
- package/dist/plot/core/utils/hierarchy-labels.d.ts +20 -0
- package/dist/plot/core/utils/hierarchy-labels.js +100 -0
- package/dist/plot/core/utils/label-placement.js +2 -2
- package/dist/plot/histogram/Histogram.svelte +314 -340
- package/dist/plot/histogram/Histogram.svelte.d.ts +7 -7
- package/dist/plot/histogram/HistogramControls.svelte +30 -28
- package/dist/plot/histogram/histogram.d.ts +31 -0
- package/dist/plot/histogram/histogram.js +70 -0
- package/dist/plot/histogram/index.d.ts +1 -0
- package/dist/plot/histogram/index.js +1 -0
- package/dist/plot/index.d.ts +1 -0
- package/dist/plot/index.js +1 -0
- package/dist/plot/sankey/Sankey.svelte +78 -69
- package/dist/plot/sankey/Sankey.svelte.d.ts +2 -2
- package/dist/plot/sankey/SankeyControls.svelte +22 -16
- package/dist/plot/sankey/sankey.js +13 -9
- package/dist/plot/scatter/BinnedScatterPlot.svelte +311 -141
- package/dist/plot/scatter/BinnedScatterPlot.svelte.d.ts +7 -0
- package/dist/plot/scatter/ElementScatter.svelte +4 -1
- package/dist/plot/scatter/ScatterPlot.svelte +517 -410
- package/dist/plot/scatter/ScatterPlot.svelte.d.ts +2 -0
- package/dist/plot/scatter/ScatterPlotControls.svelte +18 -19
- package/dist/plot/scatter/ScatterPlotControls.svelte.d.ts +1 -1
- package/dist/plot/scatter/ScatterPoint.svelte +16 -9
- package/dist/plot/scatter/adaptive-density.d.ts +1 -1
- package/dist/plot/scatter/adaptive-density.js +36 -20
- package/dist/plot/scatter/binned-scatter-types.d.ts +3 -2
- package/dist/plot/scatter/binned-scatter-types.js +6 -1
- package/dist/plot/scatter/scatter-data.d.ts +1 -1
- package/dist/plot/scatter/scatter-data.js +8 -7
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte +25 -34
- package/dist/plot/scatter-3d/ScatterPlot3D.svelte.d.ts +2 -2
- package/dist/plot/scatter-3d/ScatterPlot3DControls.svelte +8 -5
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte +113 -116
- package/dist/plot/scatter-3d/ScatterPlot3DScene.svelte.d.ts +2 -2
- package/dist/plot/scatter-3d/Surface3D.svelte +4 -13
- package/dist/plot/sunburst/Sunburst.svelte +269 -347
- package/dist/plot/sunburst/Sunburst.svelte.d.ts +2 -2
- package/dist/plot/sunburst/index.d.ts +1 -1
- package/dist/plot/sunburst/index.js +2 -1
- package/dist/plot/sunburst/render.d.ts +2 -2
- package/dist/plot/sunburst/render.js +47 -22
- package/dist/plot/sunburst/sunburst.d.ts +5 -1
- package/dist/plot/sunburst/sunburst.js +10 -3
- package/dist/plot/treemap/Treemap.svelte +1022 -0
- package/dist/plot/treemap/Treemap.svelte.d.ts +90 -0
- package/dist/plot/treemap/index.d.ts +4 -0
- package/dist/plot/treemap/index.js +4 -0
- package/dist/plot/treemap/labels.d.ts +38 -0
- package/dist/plot/treemap/labels.js +80 -0
- package/dist/plot/treemap/treemap.d.ts +28 -0
- package/dist/plot/treemap/treemap.js +102 -0
- package/dist/rdf/RdfPlot.svelte +37 -59
- package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
- package/dist/rdf/calc-rdf.js +63 -52
- package/dist/rdf/index.d.ts +0 -1
- package/dist/sanitize.js +85 -27
- package/dist/scene/SceneCamera.svelte +1 -1
- package/dist/scene/SceneCamera.svelte.d.ts +1 -1
- package/dist/scene/bind-renderer.svelte.js +14 -6
- package/dist/scene/index.d.ts +1 -2
- package/dist/scene/index.js +1 -1
- package/dist/scene/{props.js → props.svelte.js} +15 -1
- package/dist/settings.d.ts +19 -9
- package/dist/settings.js +229 -525
- package/dist/spectral/Bands.svelte +207 -221
- package/dist/spectral/BandsAndDos.svelte +11 -9
- package/dist/spectral/BrillouinBandsDos.svelte +19 -42
- package/dist/spectral/Dos.svelte +92 -93
- package/dist/spectral/helpers.d.ts +3 -3
- package/dist/spectral/helpers.js +65 -140
- package/dist/state.svelte.js +5 -18
- package/dist/structure/Arrow.svelte +5 -18
- package/dist/structure/ArrowInstances.svelte +160 -0
- package/dist/structure/ArrowInstances.svelte.d.ts +16 -0
- package/dist/structure/AtomLegend.svelte +120 -85
- package/dist/structure/AtomLegend.svelte.d.ts +2 -3
- package/dist/structure/Bond.svelte +31 -23
- package/dist/structure/CanvasTooltip.svelte +15 -3
- package/dist/structure/CellSelect.svelte +45 -35
- package/dist/structure/Cylinder.svelte +24 -40
- package/dist/structure/InstancedAtoms.svelte +114 -0
- package/dist/structure/InstancedAtoms.svelte.d.ts +15 -0
- package/dist/structure/Lattice.svelte +85 -149
- package/dist/structure/SiteLabels.svelte +122 -0
- package/dist/structure/SiteLabels.svelte.d.ts +18 -0
- package/dist/structure/Structure.svelte +636 -504
- package/dist/structure/Structure.svelte.d.ts +4 -2
- package/dist/structure/StructureCarousel.svelte +637 -0
- package/dist/structure/StructureCarousel.svelte.d.ts +19 -0
- package/dist/structure/StructureControls.svelte +165 -425
- package/dist/structure/StructureControls.svelte.d.ts +1 -1
- package/dist/structure/StructureExportPane.svelte +17 -21
- package/dist/structure/StructureInfoPane.svelte +128 -133
- package/dist/structure/StructureInfoPane.svelte.d.ts +1 -1
- package/dist/structure/StructureScene.svelte +535 -578
- package/dist/structure/StructureScene.svelte.d.ts +6 -2
- package/dist/structure/StructureViewport.svelte +451 -0
- package/dist/structure/StructureViewport.svelte.d.ts +65 -0
- package/dist/structure/atom-label-placement.d.ts +16 -12
- package/dist/structure/atom-label-placement.js +70 -37
- package/dist/structure/atom-properties.d.ts +2 -0
- package/dist/structure/atom-properties.js +105 -38
- package/dist/structure/bond-order-perception.js +3 -8
- package/dist/structure/bonding.d.ts +9 -3
- package/dist/structure/bonding.js +95 -46
- package/dist/structure/edit-history.d.ts +6 -0
- package/dist/structure/edit-history.js +27 -0
- package/dist/structure/export.d.ts +1 -0
- package/dist/structure/export.js +89 -105
- package/dist/structure/format-detect.d.ts +1 -0
- package/dist/structure/format-detect.js +20 -0
- package/dist/structure/geometry.d.ts +9 -0
- package/dist/structure/geometry.js +27 -0
- package/dist/structure/index.d.ts +16 -1
- package/dist/structure/index.js +15 -10
- package/dist/structure/measure.d.ts +1 -1
- package/dist/structure/measure.js +6 -12
- package/dist/structure/parse.d.ts +2 -1
- package/dist/structure/parse.js +272 -313
- package/dist/structure/partial-occupancy.js +10 -5
- package/dist/structure/pbc.js +85 -107
- package/dist/structure/polyhedra.d.ts +0 -1
- package/dist/structure/polyhedra.js +7 -21
- package/dist/structure/prop-groups.d.ts +85 -0
- package/dist/structure/prop-groups.js +18 -0
- package/dist/structure/supercell.d.ts +1 -2
- package/dist/structure/supercell.js +7 -13
- package/dist/symmetry/SymmetryElements.svelte +11 -15
- package/dist/symmetry/SymmetryStats.svelte +55 -71
- package/dist/symmetry/WyckoffTable.svelte +10 -28
- package/dist/symmetry/cell-transform.js +6 -14
- package/dist/symmetry/index.d.ts +1 -0
- package/dist/symmetry/index.js +13 -10
- package/dist/symmetry/spacegroups.js +3 -2
- package/dist/table/HeatmapTable.svelte +1142 -447
- package/dist/table/HeatmapTable.svelte.d.ts +12 -2
- package/dist/table/ToggleMenu.svelte +168 -53
- package/dist/table/ToggleMenu.svelte.d.ts +1 -1
- package/dist/table/index.d.ts +21 -6
- package/dist/table/index.js +34 -21
- package/dist/theme/ThemeControl.svelte +16 -8
- package/dist/theme/embedded.d.ts +18 -0
- package/dist/theme/embedded.js +206 -0
- package/dist/theme/index.d.ts +5 -5
- package/dist/theme/index.js +5 -12
- package/dist/theme/themes.mjs +44 -66
- package/dist/tooltip/KCoords.svelte +4 -1
- package/dist/tooltip/TooltipContent.svelte +3 -6
- package/dist/tooltip/TooltipContent.svelte.d.ts +1 -1
- package/dist/tooltip/index.d.ts +8 -1
- package/dist/trajectory/Trajectory.svelte +613 -386
- package/dist/trajectory/Trajectory.svelte.d.ts +1 -1
- package/dist/trajectory/TrajectoryError.svelte +12 -74
- package/dist/trajectory/TrajectoryExportPane.svelte +14 -32
- package/dist/trajectory/TrajectoryInfoPane.svelte +127 -164
- package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +2 -1
- package/dist/trajectory/extract.js +61 -49
- package/dist/trajectory/format-detect.d.ts +2 -0
- package/dist/trajectory/format-detect.js +17 -13
- package/dist/trajectory/frame-reader.d.ts +2 -0
- package/dist/trajectory/frame-reader.js +35 -32
- package/dist/trajectory/helpers.d.ts +2 -0
- package/dist/trajectory/helpers.js +34 -56
- package/dist/trajectory/index.d.ts +1 -0
- package/dist/trajectory/index.js +5 -8
- package/dist/trajectory/parse/ase.js +1 -1
- package/dist/trajectory/parse/h5-utils.d.ts +13 -0
- package/dist/trajectory/parse/h5-utils.js +109 -0
- package/dist/trajectory/parse/hdf5.d.ts +1 -1
- package/dist/trajectory/parse/hdf5.js +116 -106
- package/dist/trajectory/parse/index.d.ts +6 -6
- package/dist/trajectory/parse/index.js +25 -33
- package/dist/trajectory/parse/lammps.js +8 -12
- package/dist/trajectory/parse/vasp.js +10 -7
- package/dist/trajectory/parse/vaspout-electronic.d.ts +13 -0
- package/dist/trajectory/parse/vaspout-electronic.js +207 -0
- package/dist/trajectory/parse/vaspout-h5.d.ts +4 -0
- package/dist/trajectory/parse/vaspout-h5.js +281 -0
- package/dist/trajectory/parse/xyz.js +59 -9
- package/dist/trajectory/plotting.d.ts +8 -9
- package/dist/trajectory/plotting.js +113 -64
- package/dist/utils.d.ts +3 -0
- package/dist/utils.js +7 -0
- package/dist/xrd/XrdPlot.svelte +79 -118
- package/dist/xrd/broadening.js +2 -1
- package/dist/xrd/calc-xrd.js +24 -62
- package/dist/xrd/parse.d.ts +0 -1
- package/dist/xrd/parse.js +69 -95
- package/package.json +94 -34
- package/readme.md +6 -5
- package/dist/api/mp.d.ts +0 -6
- package/dist/api/mp.js +0 -22
- package/dist/plot/sunburst/SunburstControls.svelte +0 -200
- package/dist/scene/types.d.ts +0 -26
- package/dist/tooltip/types.d.ts +0 -8
- package/dist/trajectory/constants.d.ts +0 -6
- package/dist/trajectory/constants.js +0 -11
- /package/dist/{scene/types.js → file-viewer/host-protocol.js} +0 -0
- /package/dist/{tooltip/types.js → isosurface/geometry-worker-types.js} +0 -0
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import type { PaneProps, PaneToggleProps } from '../overlays'
|
|
3
3
|
import type { ColorSchemeName, D3InterpolateName } from '../colors'
|
|
4
4
|
import { AXIS_COLORS, ELEMENT_COLOR_SCHEMES } from '../colors'
|
|
5
|
+
import Spinner from '../feedback/Spinner.svelte'
|
|
5
6
|
import IsosurfaceControls from '../isosurface/IsosurfaceControls.svelte'
|
|
6
7
|
import type { IsosurfaceSettings, VolumetricData } from '../isosurface/types'
|
|
7
8
|
import { format_num } from '../labels'
|
|
8
|
-
import { SettingsSection } from '../layout'
|
|
9
|
+
import { NumberRangeInput, SettingsSection } from '../layout'
|
|
9
10
|
import { to_degrees, to_radians } from '../math'
|
|
10
11
|
import DraggablePane from '../overlays/DraggablePane.svelte'
|
|
11
12
|
import { ColorScaleSelect } from '../plot'
|
|
@@ -97,15 +98,13 @@
|
|
|
97
98
|
|
|
98
99
|
// Sync local selection to config
|
|
99
100
|
$effect(() => {
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
) atom_color_config.scale = color_scale_selected[0]
|
|
101
|
+
if (color_scale_selected[0] && color_scale_selected[0] !== atom_color_config.scale)
|
|
102
|
+
atom_color_config.scale = color_scale_selected[0]
|
|
103
103
|
})
|
|
104
104
|
// Sync config to local selection (for external updates)
|
|
105
105
|
$effect(() => {
|
|
106
|
-
if (
|
|
107
|
-
|
|
108
|
-
) color_scale_selected = [atom_color_config.scale]
|
|
106
|
+
if (atom_color_config.scale && atom_color_config.scale !== color_scale_selected[0])
|
|
107
|
+
color_scale_selected = [atom_color_config.scale]
|
|
109
108
|
})
|
|
110
109
|
// Auto-set scale_type based on mode
|
|
111
110
|
$effect(() => {
|
|
@@ -121,9 +120,7 @@
|
|
|
121
120
|
// actually use as centers - minority occupancies of disordered sites never are.
|
|
122
121
|
let structure_elements = $derived(
|
|
123
122
|
[
|
|
124
|
-
...new Set(
|
|
125
|
-
(structure?.sites ?? []).flatMap((site) => get_majority_element(site) ?? []),
|
|
126
|
-
),
|
|
123
|
+
...new Set((structure?.sites ?? []).flatMap((site) => get_majority_element(site) ?? [])),
|
|
127
124
|
].sort(),
|
|
128
125
|
)
|
|
129
126
|
|
|
@@ -135,8 +132,10 @@
|
|
|
135
132
|
const is_polyhedra_center_enabled = (element: string): boolean => {
|
|
136
133
|
const excluded = scene_props.polyhedra_excluded_elements ?? []
|
|
137
134
|
const included = scene_props.polyhedra_included_elements ?? []
|
|
138
|
-
return
|
|
135
|
+
return (
|
|
136
|
+
!excluded.includes(element) &&
|
|
139
137
|
(included.includes(element) || polyhedra_rendered_elements.includes(element))
|
|
138
|
+
)
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
// Toggle an element as polyhedra center. Enabled elements get excluded; disabled
|
|
@@ -154,9 +153,9 @@
|
|
|
154
153
|
}
|
|
155
154
|
}
|
|
156
155
|
|
|
157
|
-
const hex_color_pattern = /^#[0-9a-f]{3}([0-9a-f]{3})?$/i
|
|
156
|
+
const hex_color_pattern = /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i
|
|
158
157
|
const color_mix_pattern =
|
|
159
|
-
/^color-mix\(in srgb,\s*(
|
|
158
|
+
/^color-mix\(in srgb,\s*(?<hex>#[0-9a-f]{3}(?:[0-9a-f]{3})?)\s+(?<pct>\d+(?:\.\d+)?)%,\s*transparent\)$/i
|
|
160
159
|
|
|
161
160
|
const as_hex_color = (color: string | undefined, fallback: string): string =>
|
|
162
161
|
color?.match(hex_color_pattern)?.[0] ?? fallback
|
|
@@ -183,10 +182,7 @@
|
|
|
183
182
|
: { hex_color, opacity: 1 }
|
|
184
183
|
}
|
|
185
184
|
|
|
186
|
-
const default_site_label_color = as_hex_color(
|
|
187
|
-
DEFAULTS.structure.site_label_color,
|
|
188
|
-
`#111111`,
|
|
189
|
-
)
|
|
185
|
+
const default_site_label_color = as_hex_color(DEFAULTS.structure.site_label_color, `#111111`)
|
|
190
186
|
const default_site_label_bg = parse_label_bg_color(
|
|
191
187
|
DEFAULTS.structure.site_label_bg_color,
|
|
192
188
|
`#000000`,
|
|
@@ -231,10 +227,10 @@
|
|
|
231
227
|
|
|
232
228
|
if (!external_color_changed) scene_props.site_label_color = site_label_hex_color
|
|
233
229
|
if (!external_bg_changed) {
|
|
234
|
-
scene_props.site_label_bg_color =
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
230
|
+
scene_props.site_label_bg_color = `color-mix(in srgb, ${site_label_bg_hex_color} ${format_num(
|
|
231
|
+
site_label_background_opacity,
|
|
232
|
+
`.1~%`,
|
|
233
|
+
)}, transparent)`
|
|
238
234
|
}
|
|
239
235
|
|
|
240
236
|
last_synced_site_label_color = scene_props.site_label_color
|
|
@@ -245,9 +241,7 @@
|
|
|
245
241
|
scene_props.site_label_offset ??= [...DEFAULTS.structure.site_label_offset]
|
|
246
242
|
|
|
247
243
|
// Collect available vector property keys from the structure
|
|
248
|
-
let available_vector_keys = $derived(
|
|
249
|
-
structure ? get_structure_vector_keys(structure) : [],
|
|
250
|
-
)
|
|
244
|
+
let available_vector_keys = $derived(structure ? get_structure_vector_keys(structure) : [])
|
|
251
245
|
const is_key_visible = (key: string): boolean =>
|
|
252
246
|
scene_props.vector_configs?.[key]?.visible !== false
|
|
253
247
|
|
|
@@ -293,17 +287,11 @@
|
|
|
293
287
|
scene_props.rotation = [...scene_props.rotation]
|
|
294
288
|
}
|
|
295
289
|
|
|
296
|
-
//
|
|
290
|
+
// Sample colors for common elements, used to preview an element color scheme
|
|
297
291
|
function get_representative_colors(scheme_name: string): string[] {
|
|
298
292
|
const scheme = ELEMENT_COLOR_SCHEMES[scheme_name as ColorSchemeName]
|
|
299
293
|
if (!scheme) return []
|
|
300
|
-
|
|
301
|
-
// Get colors for common elements: H, C, N, O, Fe, Ca, Si, Al
|
|
302
|
-
const sample_elements = [`H`, `C`, `N`, `O`, `Fe`, `Ca`, `Si`, `Al`]
|
|
303
|
-
return sample_elements
|
|
304
|
-
.slice(0, 4) // Take first 4
|
|
305
|
-
.map((el) => scheme[el] || scheme.H || `#cccccc`)
|
|
306
|
-
.filter(Boolean)
|
|
294
|
+
return [`H`, `C`, `N`, `O`].map((elem) => scheme[elem] || scheme.H || `#cccccc`)
|
|
307
295
|
}
|
|
308
296
|
</script>
|
|
309
297
|
|
|
@@ -325,7 +313,7 @@
|
|
|
325
313
|
{#if volumetric_data?.length && isosurface_settings}
|
|
326
314
|
<IsosurfaceControls
|
|
327
315
|
bind:settings={isosurface_settings}
|
|
328
|
-
volumes={volumetric_data}
|
|
316
|
+
bind:volumes={volumetric_data}
|
|
329
317
|
bind:active_volume_idx
|
|
330
318
|
/>
|
|
331
319
|
{/if}
|
|
@@ -384,6 +372,7 @@
|
|
|
384
372
|
</label>
|
|
385
373
|
{#if available_vector_keys.length > 0}
|
|
386
374
|
{#each available_vector_keys as key, idx (key)}
|
|
375
|
+
{@const key_visible = is_key_visible(key)}
|
|
387
376
|
<label
|
|
388
377
|
{@attach tooltip({
|
|
389
378
|
content: `Toggle ${key} vectors`,
|
|
@@ -392,18 +381,18 @@
|
|
|
392
381
|
>
|
|
393
382
|
<input
|
|
394
383
|
type="checkbox"
|
|
395
|
-
checked={
|
|
396
|
-
onchange={() => update_vector_config(key, { visible: !
|
|
384
|
+
checked={key_visible}
|
|
385
|
+
onchange={() => update_vector_config(key, { visible: !key_visible })}
|
|
397
386
|
/>
|
|
398
387
|
<input
|
|
399
388
|
type="color"
|
|
400
389
|
aria-label={`${key} vector color`}
|
|
401
390
|
value={scene_props.vector_configs?.[key]?.color ??
|
|
402
|
-
|
|
391
|
+
VECTOR_PALETTE[idx % VECTOR_PALETTE.length]}
|
|
403
392
|
onchange={(evt) =>
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
393
|
+
update_vector_config(key, {
|
|
394
|
+
color: evt.currentTarget.value,
|
|
395
|
+
})}
|
|
407
396
|
style="width: 22px; height: 22px; padding: 0; border: none; cursor: pointer"
|
|
408
397
|
/>
|
|
409
398
|
{key}
|
|
@@ -430,10 +419,7 @@
|
|
|
430
419
|
>
|
|
431
420
|
Bonds:
|
|
432
421
|
<select bind:value={scene_props.show_bonds}>
|
|
433
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as
|
|
434
|
-
[value, label]
|
|
435
|
-
(value)
|
|
436
|
-
}
|
|
422
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as [value, label] (value)}
|
|
437
423
|
<option {value}>{label}</option>
|
|
438
424
|
{/each}
|
|
439
425
|
</select>
|
|
@@ -444,10 +430,7 @@
|
|
|
444
430
|
>
|
|
445
431
|
Polyhedra:
|
|
446
432
|
<select bind:value={scene_props.show_polyhedra}>
|
|
447
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.show_polyhedra.enum ?? {}) as
|
|
448
|
-
[value, label]
|
|
449
|
-
(value)
|
|
450
|
-
}
|
|
433
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.show_polyhedra.enum ?? {}) as [value, label] (value)}
|
|
451
434
|
<option {value}>{label}</option>
|
|
452
435
|
{/each}
|
|
453
436
|
</select>
|
|
@@ -484,127 +467,60 @@
|
|
|
484
467
|
Projection
|
|
485
468
|
</span>
|
|
486
469
|
<select bind:value={scene_props.camera_projection}>
|
|
487
|
-
{#each Object.entries(
|
|
488
|
-
SETTINGS_CONFIG.structure.camera_projection.enum ?? {},
|
|
489
|
-
) as
|
|
490
|
-
[value, label]
|
|
491
|
-
(value)
|
|
492
|
-
}
|
|
470
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.camera_projection.enum ?? {}) as [value, label] (value)}
|
|
493
471
|
<option {value}>{label}</option>
|
|
494
472
|
{/each}
|
|
495
473
|
</select>
|
|
496
474
|
</label>
|
|
497
|
-
<
|
|
498
|
-
{
|
|
475
|
+
<NumberRangeInput
|
|
476
|
+
min={0}
|
|
477
|
+
max={2}
|
|
478
|
+
step={0.01}
|
|
479
|
+
bind:value={scene_props.auto_rotate}
|
|
480
|
+
title={SETTINGS_CONFIG.structure.auto_rotate.description}
|
|
481
|
+
>Auto-rotate speed</NumberRangeInput
|
|
499
482
|
>
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
bind:value={scene_props.auto_rotate}
|
|
507
|
-
/>
|
|
508
|
-
<input
|
|
509
|
-
type="range"
|
|
510
|
-
min={0}
|
|
511
|
-
max={2}
|
|
512
|
-
step={0.01}
|
|
513
|
-
bind:value={scene_props.auto_rotate}
|
|
514
|
-
/>
|
|
515
|
-
</label>
|
|
516
|
-
<label
|
|
517
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.rotate_speed.description })}
|
|
483
|
+
<NumberRangeInput
|
|
484
|
+
min={0}
|
|
485
|
+
max={2}
|
|
486
|
+
step={0.05}
|
|
487
|
+
bind:value={scene_props.rotate_speed}
|
|
488
|
+
title={SETTINGS_CONFIG.structure.rotate_speed.description}>Rotate speed</NumberRangeInput
|
|
518
489
|
>
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
bind:value={scene_props.rotate_speed}
|
|
526
|
-
/>
|
|
527
|
-
<input
|
|
528
|
-
type="range"
|
|
529
|
-
min={0}
|
|
530
|
-
max={2}
|
|
531
|
-
step={0.05}
|
|
532
|
-
bind:value={scene_props.rotate_speed}
|
|
533
|
-
/>
|
|
534
|
-
</label>
|
|
535
|
-
<label
|
|
536
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_speed.description })}
|
|
490
|
+
<NumberRangeInput
|
|
491
|
+
min={0.1}
|
|
492
|
+
max={0.8}
|
|
493
|
+
step={0.02}
|
|
494
|
+
bind:value={scene_props.zoom_speed}
|
|
495
|
+
title={SETTINGS_CONFIG.structure.zoom_speed.description}>Zoom speed</NumberRangeInput
|
|
537
496
|
>
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
bind:value={scene_props.zoom_speed}
|
|
545
|
-
/>
|
|
546
|
-
<input
|
|
547
|
-
type="range"
|
|
548
|
-
min={0.1}
|
|
549
|
-
max={0.8}
|
|
550
|
-
step={0.02}
|
|
551
|
-
bind:value={scene_props.zoom_speed}
|
|
552
|
-
/>
|
|
553
|
-
</label>
|
|
554
|
-
<label
|
|
555
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.structure.pan_speed.description })}
|
|
497
|
+
<NumberRangeInput
|
|
498
|
+
min={0}
|
|
499
|
+
max={2}
|
|
500
|
+
step={0.01}
|
|
501
|
+
bind:value={scene_props.pan_speed}
|
|
502
|
+
title={SETTINGS_CONFIG.structure.pan_speed.description}>Pan speed</NumberRangeInput
|
|
556
503
|
>
|
|
557
|
-
Pan speed
|
|
558
|
-
<input
|
|
559
|
-
type="number"
|
|
560
|
-
min={0}
|
|
561
|
-
max={2}
|
|
562
|
-
step={0.01}
|
|
563
|
-
bind:value={scene_props.pan_speed}
|
|
564
|
-
/>
|
|
565
|
-
<input
|
|
566
|
-
type="range"
|
|
567
|
-
min={0}
|
|
568
|
-
max={2}
|
|
569
|
-
step={0.01}
|
|
570
|
-
bind:value={scene_props.pan_speed}
|
|
571
|
-
/>
|
|
572
|
-
</label>
|
|
573
504
|
<label
|
|
574
505
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_to_cursor.description })}
|
|
575
506
|
>
|
|
576
507
|
<input type="checkbox" bind:checked={scene_props.zoom_to_cursor} />
|
|
577
508
|
<span>Zoom to cursor</span>
|
|
578
509
|
</label>
|
|
579
|
-
<
|
|
580
|
-
{
|
|
510
|
+
<NumberRangeInput
|
|
511
|
+
min={0.01}
|
|
512
|
+
max={0.3}
|
|
513
|
+
step={0.01}
|
|
514
|
+
bind:value={scene_props.rotation_damping}
|
|
515
|
+
title={SETTINGS_CONFIG.structure.rotation_damping.description}
|
|
516
|
+
>Rotation damping</NumberRangeInput
|
|
581
517
|
>
|
|
582
|
-
Rotation damping
|
|
583
|
-
<input
|
|
584
|
-
type="number"
|
|
585
|
-
min={0.01}
|
|
586
|
-
max={0.3}
|
|
587
|
-
step={0.01}
|
|
588
|
-
bind:value={scene_props.rotation_damping}
|
|
589
|
-
/>
|
|
590
|
-
<input
|
|
591
|
-
type="range"
|
|
592
|
-
min={0.01}
|
|
593
|
-
max={0.3}
|
|
594
|
-
step={0.01}
|
|
595
|
-
bind:value={scene_props.rotation_damping}
|
|
596
|
-
/>
|
|
597
|
-
</label>
|
|
598
518
|
|
|
599
519
|
Axis Rotation
|
|
600
520
|
<div class="rotation-axes">
|
|
601
521
|
{#each AXIS_COLORS as [axis, color], idx (axis)}
|
|
602
522
|
<div>
|
|
603
|
-
<div
|
|
604
|
-
{@attach tooltip()}
|
|
605
|
-
title="{axis}-axis rotation in degrees"
|
|
606
|
-
style:color
|
|
607
|
-
>
|
|
523
|
+
<div {@attach tooltip()} title="{axis}-axis rotation in degrees" style:color>
|
|
608
524
|
<span>{axis.toUpperCase()} = </span>
|
|
609
525
|
<input
|
|
610
526
|
type="number"
|
|
@@ -612,8 +528,7 @@
|
|
|
612
528
|
max={360}
|
|
613
529
|
step={1}
|
|
614
530
|
value={rotation_degrees[idx].toFixed(0)}
|
|
615
|
-
oninput={(event) =>
|
|
616
|
-
update_rotation(axis, Number(event.currentTarget.value))}
|
|
531
|
+
oninput={(event) => update_rotation(axis, Number(event.currentTarget.value))}
|
|
617
532
|
style:color
|
|
618
533
|
style="margin: 0"
|
|
619
534
|
/>
|
|
@@ -653,34 +568,21 @@
|
|
|
653
568
|
color_scale_selected = [DEFAULTS.structure.atom_color_scale]
|
|
654
569
|
}}
|
|
655
570
|
>
|
|
656
|
-
<
|
|
657
|
-
{
|
|
571
|
+
<NumberRangeInput
|
|
572
|
+
min={0.2}
|
|
573
|
+
max={2}
|
|
574
|
+
step={0.05}
|
|
575
|
+
bind:value={scene_props.atom_radius}
|
|
576
|
+
title={SETTINGS_CONFIG.structure.atom_radius.description}
|
|
577
|
+
>Radius <small>(Å)</small></NumberRangeInput
|
|
658
578
|
>
|
|
659
|
-
Radius <small>(Å)</small>
|
|
660
|
-
<input
|
|
661
|
-
type="number"
|
|
662
|
-
min={0.2}
|
|
663
|
-
max={2}
|
|
664
|
-
step={0.05}
|
|
665
|
-
bind:value={scene_props.atom_radius}
|
|
666
|
-
/>
|
|
667
|
-
<input
|
|
668
|
-
type="range"
|
|
669
|
-
min={0.2}
|
|
670
|
-
max={2}
|
|
671
|
-
step={0.05}
|
|
672
|
-
bind:value={scene_props.atom_radius}
|
|
673
|
-
/>
|
|
674
|
-
</label>
|
|
675
579
|
<label
|
|
676
580
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.same_size_atoms.description })}
|
|
677
581
|
>
|
|
678
582
|
Same size atoms
|
|
679
583
|
<input type="checkbox" bind:checked={scene_props.same_size_atoms} />
|
|
680
584
|
</label>
|
|
681
|
-
<label
|
|
682
|
-
{@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}
|
|
683
|
-
>
|
|
585
|
+
<label {@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}>
|
|
684
586
|
Color scheme
|
|
685
587
|
<Select
|
|
686
588
|
options={Object.keys(ELEMENT_COLOR_SCHEMES)}
|
|
@@ -695,14 +597,12 @@
|
|
|
695
597
|
aria-label="Color scheme"
|
|
696
598
|
>
|
|
697
599
|
{#snippet children({ option })}
|
|
698
|
-
{@const option_style =
|
|
699
|
-
`display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
|
|
600
|
+
{@const option_style = `display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
|
|
700
601
|
<div style={option_style}>
|
|
701
602
|
{option}
|
|
702
603
|
<div style="display: flex; gap: 3pt">
|
|
703
604
|
{#each get_representative_colors(String(option)) as color (color)}
|
|
704
|
-
{@const color_style =
|
|
705
|
-
`width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
|
|
605
|
+
{@const color_style = `width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
|
|
706
606
|
<div style={color_style}></div>
|
|
707
607
|
{/each}
|
|
708
608
|
</div>
|
|
@@ -715,10 +615,7 @@
|
|
|
715
615
|
>
|
|
716
616
|
Atom coloring
|
|
717
617
|
<select bind:value={atom_color_config.mode}>
|
|
718
|
-
{#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as
|
|
719
|
-
[value, label]
|
|
720
|
-
(value)
|
|
721
|
-
}
|
|
618
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as [value, label] (value)}
|
|
722
619
|
<option {value} disabled={!sym_data && value === `wyckoff`}>{label}</option>
|
|
723
620
|
{/each}
|
|
724
621
|
</select>
|
|
@@ -866,31 +763,16 @@
|
|
|
866
763
|
scene_props.vector_color_mode = DEFAULTS.structure.vector_color_mode
|
|
867
764
|
scene_props.vector_color_scale = DEFAULTS.structure.vector_color_scale
|
|
868
765
|
scene_props.vector_normalize = DEFAULTS.structure.vector_normalize
|
|
869
|
-
scene_props.vector_uniform_thickness =
|
|
870
|
-
DEFAULTS.structure.vector_uniform_thickness
|
|
766
|
+
scene_props.vector_uniform_thickness = DEFAULTS.structure.vector_uniform_thickness
|
|
871
767
|
scene_props.vector_origin_gap = DEFAULTS.structure.vector_origin_gap
|
|
872
768
|
for (const key of available_vector_keys) {
|
|
873
769
|
update_vector_config(key, { scale: null })
|
|
874
770
|
}
|
|
875
771
|
}}
|
|
876
772
|
>
|
|
877
|
-
<
|
|
878
|
-
Global Scale
|
|
879
|
-
|
|
880
|
-
type="number"
|
|
881
|
-
min={0.001}
|
|
882
|
-
max={5}
|
|
883
|
-
step={0.001}
|
|
884
|
-
bind:value={scene_props.vector_scale}
|
|
885
|
-
/>
|
|
886
|
-
<input
|
|
887
|
-
type="range"
|
|
888
|
-
min={0.001}
|
|
889
|
-
max={5}
|
|
890
|
-
step={0.001}
|
|
891
|
-
bind:value={scene_props.vector_scale}
|
|
892
|
-
/>
|
|
893
|
-
</label>
|
|
773
|
+
<NumberRangeInput min={0.001} max={5} step={0.001} bind:value={scene_props.vector_scale}
|
|
774
|
+
>Global Scale</NumberRangeInput
|
|
775
|
+
>
|
|
894
776
|
<label
|
|
895
777
|
{@attach tooltip({ content: SETTINGS_CONFIG.structure.vector_normalize.description })}
|
|
896
778
|
style="gap: 6pt"
|
|
@@ -899,7 +781,9 @@
|
|
|
899
781
|
Normalize
|
|
900
782
|
</label>
|
|
901
783
|
<label
|
|
902
|
-
{@attach tooltip({
|
|
784
|
+
{@attach tooltip({
|
|
785
|
+
content: SETTINGS_CONFIG.structure.vector_uniform_thickness.description,
|
|
786
|
+
})}
|
|
903
787
|
style="gap: 6pt"
|
|
904
788
|
>
|
|
905
789
|
<input type="checkbox" bind:checked={scene_props.vector_uniform_thickness} />
|
|
@@ -931,35 +815,24 @@
|
|
|
931
815
|
</label>
|
|
932
816
|
{/if}
|
|
933
817
|
{#if available_vector_keys.length > 1}
|
|
934
|
-
<
|
|
935
|
-
{
|
|
818
|
+
<NumberRangeInput
|
|
819
|
+
min={0}
|
|
820
|
+
max={0.5}
|
|
821
|
+
step={0.02}
|
|
822
|
+
bind:value={scene_props.vector_origin_gap}
|
|
823
|
+
title={SETTINGS_CONFIG.structure.vector_origin_gap.description}
|
|
824
|
+
>Origin Gap</NumberRangeInput
|
|
936
825
|
>
|
|
937
|
-
Origin Gap
|
|
938
|
-
<input
|
|
939
|
-
type="number"
|
|
940
|
-
min={0}
|
|
941
|
-
max={0.5}
|
|
942
|
-
step={0.02}
|
|
943
|
-
bind:value={scene_props.vector_origin_gap}
|
|
944
|
-
/>
|
|
945
|
-
<input
|
|
946
|
-
type="range"
|
|
947
|
-
min={0}
|
|
948
|
-
max={0.5}
|
|
949
|
-
step={0.02}
|
|
950
|
-
bind:value={scene_props.vector_origin_gap}
|
|
951
|
-
/>
|
|
952
|
-
</label>
|
|
953
826
|
{#each available_vector_keys as key (key)}
|
|
954
827
|
{#if is_key_visible(key)}
|
|
955
|
-
{@const on_scale = (
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
|
|
960
|
-
}}
|
|
828
|
+
{@const on_scale = (evt: Event & { currentTarget: HTMLInputElement }) => {
|
|
829
|
+
const parsed = parseFloat(evt.currentTarget.value)
|
|
830
|
+
update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
|
|
831
|
+
}}
|
|
961
832
|
<label
|
|
962
|
-
{@attach tooltip({
|
|
833
|
+
{@attach tooltip({
|
|
834
|
+
content: `Scale multiplier for ${key} arrows (applied on top of global scale)`,
|
|
835
|
+
})}
|
|
963
836
|
>
|
|
964
837
|
{key} scale
|
|
965
838
|
<input
|
|
@@ -1021,7 +894,9 @@
|
|
|
1021
894
|
</label>
|
|
1022
895
|
<label>
|
|
1023
896
|
<span
|
|
1024
|
-
{@attach tooltip({
|
|
897
|
+
{@attach tooltip({
|
|
898
|
+
content: `Create supercells by repeating the unit cell. Examples: "2x2x2", "3x1x2", or "2"`,
|
|
899
|
+
})}
|
|
1025
900
|
>
|
|
1026
901
|
Supercell Scaling
|
|
1027
902
|
</span>
|
|
@@ -1038,20 +913,15 @@
|
|
|
1038
913
|
pattern="^(\d+|\d+x\d+x\d+)$"
|
|
1039
914
|
aria-invalid={!supercell_input_valid}
|
|
1040
915
|
title={supercell_input_valid
|
|
1041
|
-
|
|
1042
|
-
|
|
916
|
+
? `Valid supercell scaling: ${supercell_scaling}`
|
|
917
|
+
: `Invalid format. Use "2x2x2", "3x1x2", or "2"`}
|
|
1043
918
|
/>
|
|
1044
919
|
</label>
|
|
1045
920
|
{#if supercell_loading}
|
|
1046
|
-
<
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
class="spinner-icon"
|
|
1051
|
-
style="display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite"
|
|
1052
|
-
></span>
|
|
1053
|
-
<span>Generating supercell...</span>
|
|
1054
|
-
</div>
|
|
921
|
+
<Spinner
|
|
922
|
+
text="Generating supercell..."
|
|
923
|
+
style="--spinner-size: 12px; --spinner-border-width: 2px; --spinner-margin: 4pt 0 0; font-size: 0.85em; color: var(--accent-color)"
|
|
924
|
+
/>
|
|
1055
925
|
{/if}
|
|
1056
926
|
|
|
1057
927
|
{#if !supercell_input_valid}
|
|
@@ -1063,48 +933,15 @@
|
|
|
1063
933
|
</div>
|
|
1064
934
|
{/if}
|
|
1065
935
|
|
|
1066
|
-
{#each [
|
|
1067
|
-
{
|
|
1068
|
-
label: `Edge color`,
|
|
1069
|
-
color_prop: `cell_edge_color`,
|
|
1070
|
-
opacity_prop: `cell_edge_opacity`,
|
|
1071
|
-
step: 0.05,
|
|
1072
|
-
},
|
|
1073
|
-
{
|
|
1074
|
-
label: `Surface color`,
|
|
1075
|
-
color_prop: `cell_surface_color`,
|
|
1076
|
-
opacity_prop: `cell_surface_opacity`,
|
|
1077
|
-
step: 0.01,
|
|
1078
|
-
},
|
|
1079
|
-
] as const as
|
|
1080
|
-
{ label, color_prop, opacity_prop, step }
|
|
1081
|
-
(label)
|
|
1082
|
-
}
|
|
936
|
+
{#each [{ label: `Edge color`, color_prop: `cell_edge_color`, opacity_prop: `cell_edge_opacity`, step: 0.05 }, { label: `Surface color`, color_prop: `cell_surface_color`, opacity_prop: `cell_surface_opacity`, step: 0.01 }] as const as { label, color_prop, opacity_prop, step } (label)}
|
|
1083
937
|
<div class="pane-row">
|
|
1084
938
|
<label>
|
|
1085
939
|
{label}
|
|
1086
|
-
<input
|
|
1087
|
-
type="color"
|
|
1088
|
-
bind:value={lattice_props[color_prop]}
|
|
1089
|
-
/>
|
|
940
|
+
<input type="color" bind:value={lattice_props[color_prop]} />
|
|
1090
941
|
</label>
|
|
1091
|
-
<
|
|
942
|
+
<NumberRangeInput min={0} max={1} {step} bind:value={lattice_props[opacity_prop]}>
|
|
1092
943
|
opacity
|
|
1093
|
-
|
|
1094
|
-
type="number"
|
|
1095
|
-
min={0}
|
|
1096
|
-
max={1}
|
|
1097
|
-
{step}
|
|
1098
|
-
bind:value={lattice_props[opacity_prop]}
|
|
1099
|
-
/>
|
|
1100
|
-
<input
|
|
1101
|
-
type="range"
|
|
1102
|
-
min={0}
|
|
1103
|
-
max={1}
|
|
1104
|
-
{step}
|
|
1105
|
-
bind:value={lattice_props[opacity_prop]}
|
|
1106
|
-
/>
|
|
1107
|
-
</label>
|
|
944
|
+
</NumberRangeInput>
|
|
1108
945
|
</div>
|
|
1109
946
|
{/each}
|
|
1110
947
|
</SettingsSection>
|
|
@@ -1133,17 +970,9 @@
|
|
|
1133
970
|
}}
|
|
1134
971
|
/>
|
|
1135
972
|
</label>
|
|
1136
|
-
<
|
|
973
|
+
<NumberRangeInput min={0} max={1} step={0.02} bind:value={background_opacity}>
|
|
1137
974
|
Opacity
|
|
1138
|
-
|
|
1139
|
-
type="number"
|
|
1140
|
-
min={0}
|
|
1141
|
-
max={1}
|
|
1142
|
-
step={0.02}
|
|
1143
|
-
bind:value={background_opacity}
|
|
1144
|
-
/>
|
|
1145
|
-
<input type="range" min={0} max={1} step={0.02} bind:value={background_opacity} />
|
|
1146
|
-
</label>
|
|
975
|
+
</NumberRangeInput>
|
|
1147
976
|
</div>
|
|
1148
977
|
</SettingsSection>
|
|
1149
978
|
|
|
@@ -1158,44 +987,22 @@
|
|
|
1158
987
|
scene_props.ambient_light = DEFAULTS.structure.ambient_light
|
|
1159
988
|
}}
|
|
1160
989
|
>
|
|
1161
|
-
<
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
bind:value={scene_props.directional_light}
|
|
1178
|
-
/>
|
|
1179
|
-
</label>
|
|
1180
|
-
<label>
|
|
1181
|
-
<span title="Intensity of the ambient light" {@attach tooltip()}>
|
|
1182
|
-
Ambient light
|
|
1183
|
-
</span>
|
|
1184
|
-
<input
|
|
1185
|
-
type="number"
|
|
1186
|
-
min={0.5}
|
|
1187
|
-
max={3}
|
|
1188
|
-
step={0.05}
|
|
1189
|
-
bind:value={scene_props.ambient_light}
|
|
1190
|
-
/>
|
|
1191
|
-
<input
|
|
1192
|
-
type="range"
|
|
1193
|
-
min={0.5}
|
|
1194
|
-
max={3}
|
|
1195
|
-
step={0.05}
|
|
1196
|
-
bind:value={scene_props.ambient_light}
|
|
1197
|
-
/>
|
|
1198
|
-
</label>
|
|
990
|
+
<NumberRangeInput
|
|
991
|
+
min={0}
|
|
992
|
+
max={4}
|
|
993
|
+
step={0.01}
|
|
994
|
+
bind:value={scene_props.directional_light}
|
|
995
|
+
title={SETTINGS_CONFIG.structure.directional_light.description}
|
|
996
|
+
>Directional light</NumberRangeInput
|
|
997
|
+
>
|
|
998
|
+
<NumberRangeInput
|
|
999
|
+
min={0.5}
|
|
1000
|
+
max={3}
|
|
1001
|
+
step={0.05}
|
|
1002
|
+
bind:value={scene_props.ambient_light}
|
|
1003
|
+
title={SETTINGS_CONFIG.structure.ambient_light.description}
|
|
1004
|
+
>Ambient light</NumberRangeInput
|
|
1005
|
+
>
|
|
1199
1006
|
</SettingsSection>
|
|
1200
1007
|
|
|
1201
1008
|
{#if scene_props.show_bonds && scene_props.show_bonds !== `never`}
|
|
@@ -1218,12 +1025,7 @@
|
|
|
1218
1025
|
>
|
|
1219
1026
|
<label>
|
|
1220
1027
|
Strategy <select bind:value={scene_props.bonding_strategy}>
|
|
1221
|
-
{#each Object.entries(
|
|
1222
|
-
SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {},
|
|
1223
|
-
) as
|
|
1224
|
-
[value, label]
|
|
1225
|
-
(value)
|
|
1226
|
-
}
|
|
1028
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {}) as [value, label] (value)}
|
|
1227
1029
|
<option {value}>{label}</option>
|
|
1228
1030
|
{/each}
|
|
1229
1031
|
</select>
|
|
@@ -1237,15 +1039,12 @@
|
|
|
1237
1039
|
</label>
|
|
1238
1040
|
{#if scene_props.auto_bond_order}
|
|
1239
1041
|
<label
|
|
1240
|
-
{@attach tooltip({
|
|
1042
|
+
{@attach tooltip({
|
|
1043
|
+
content: SETTINGS_CONFIG.structure.aromatic_display.description,
|
|
1044
|
+
})}
|
|
1241
1045
|
>
|
|
1242
1046
|
Aromatic display <select bind:value={scene_props.aromatic_display}>
|
|
1243
|
-
{#each Object.entries(
|
|
1244
|
-
SETTINGS_CONFIG.structure.aromatic_display.enum ?? {},
|
|
1245
|
-
) as
|
|
1246
|
-
[value, label]
|
|
1247
|
-
(value)
|
|
1248
|
-
}
|
|
1047
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.aromatic_display.enum ?? {}) as [value, label] (value)}
|
|
1249
1048
|
<option {value}>{label}</option>
|
|
1250
1049
|
{/each}
|
|
1251
1050
|
</select>
|
|
@@ -1254,23 +1053,14 @@
|
|
|
1254
1053
|
<label>
|
|
1255
1054
|
Color <input type="color" bind:value={scene_props.bond_color} />
|
|
1256
1055
|
</label>
|
|
1257
|
-
<
|
|
1056
|
+
<NumberRangeInput
|
|
1057
|
+
min={0.05}
|
|
1058
|
+
max={0.5}
|
|
1059
|
+
step={0.05}
|
|
1060
|
+
bind:value={scene_props.bond_thickness}
|
|
1061
|
+
>
|
|
1258
1062
|
Thickness
|
|
1259
|
-
|
|
1260
|
-
type="number"
|
|
1261
|
-
min={0.05}
|
|
1262
|
-
max={0.5}
|
|
1263
|
-
step={0.05}
|
|
1264
|
-
bind:value={scene_props.bond_thickness}
|
|
1265
|
-
/>
|
|
1266
|
-
<input
|
|
1267
|
-
type="range"
|
|
1268
|
-
min={0.05}
|
|
1269
|
-
max={0.5}
|
|
1270
|
-
step={0.05}
|
|
1271
|
-
bind:value={scene_props.bond_thickness}
|
|
1272
|
-
/>
|
|
1273
|
-
</label>
|
|
1063
|
+
</NumberRangeInput>
|
|
1274
1064
|
</SettingsSection>
|
|
1275
1065
|
{/if}
|
|
1276
1066
|
|
|
@@ -1305,39 +1095,21 @@
|
|
|
1305
1095
|
DEFAULTS.structure.polyhedra_included_elements
|
|
1306
1096
|
}}
|
|
1307
1097
|
>
|
|
1308
|
-
<
|
|
1309
|
-
{
|
|
1310
|
-
|
|
1311
|
-
}
|
|
1098
|
+
<NumberRangeInput
|
|
1099
|
+
min={0}
|
|
1100
|
+
max={1}
|
|
1101
|
+
step={0.05}
|
|
1102
|
+
bind:value={scene_props.polyhedra_opacity}
|
|
1103
|
+
title={SETTINGS_CONFIG.structure.polyhedra_opacity.description}
|
|
1104
|
+
>Opacity</NumberRangeInput
|
|
1312
1105
|
>
|
|
1313
|
-
Opacity
|
|
1314
|
-
<input
|
|
1315
|
-
type="number"
|
|
1316
|
-
min={0}
|
|
1317
|
-
max={1}
|
|
1318
|
-
step={0.05}
|
|
1319
|
-
bind:value={scene_props.polyhedra_opacity}
|
|
1320
|
-
/>
|
|
1321
|
-
<input
|
|
1322
|
-
type="range"
|
|
1323
|
-
min={0}
|
|
1324
|
-
max={1}
|
|
1325
|
-
step={0.05}
|
|
1326
|
-
bind:value={scene_props.polyhedra_opacity}
|
|
1327
|
-
/>
|
|
1328
|
-
</label>
|
|
1329
1106
|
<label
|
|
1330
1107
|
{@attach tooltip({
|
|
1331
1108
|
content: SETTINGS_CONFIG.structure.polyhedra_color_mode.description,
|
|
1332
1109
|
})}
|
|
1333
1110
|
>
|
|
1334
1111
|
Color <select bind:value={scene_props.polyhedra_color_mode}>
|
|
1335
|
-
{#each Object.entries(
|
|
1336
|
-
SETTINGS_CONFIG.structure.polyhedra_color_mode.enum ?? {},
|
|
1337
|
-
) as
|
|
1338
|
-
[value, label]
|
|
1339
|
-
(value)
|
|
1340
|
-
}
|
|
1112
|
+
{#each Object.entries(SETTINGS_CONFIG.structure.polyhedra_color_mode.enum ?? {}) as [value, label] (value)}
|
|
1341
1113
|
<option {value}>{label}</option>
|
|
1342
1114
|
{/each}
|
|
1343
1115
|
</select>
|
|
@@ -1366,53 +1138,29 @@
|
|
|
1366
1138
|
<input type="checkbox" bind:checked={scene_props.polyhedra_hide_center_atoms} />
|
|
1367
1139
|
Hide center atoms
|
|
1368
1140
|
</label>
|
|
1369
|
-
<
|
|
1370
|
-
{
|
|
1371
|
-
|
|
1372
|
-
}
|
|
1141
|
+
<NumberRangeInput
|
|
1142
|
+
min={4}
|
|
1143
|
+
max={12}
|
|
1144
|
+
step={1}
|
|
1145
|
+
bind:value={scene_props.polyhedra_min_neighbors}
|
|
1146
|
+
title={SETTINGS_CONFIG.structure.polyhedra_min_neighbors.description}
|
|
1147
|
+
>Min neighbors</NumberRangeInput
|
|
1373
1148
|
>
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
/>
|
|
1382
|
-
<input
|
|
1383
|
-
type="range"
|
|
1384
|
-
min={4}
|
|
1385
|
-
max={12}
|
|
1386
|
-
step={1}
|
|
1387
|
-
bind:value={scene_props.polyhedra_min_neighbors}
|
|
1388
|
-
/>
|
|
1389
|
-
</label>
|
|
1390
|
-
<label
|
|
1391
|
-
{@attach tooltip({
|
|
1392
|
-
content: SETTINGS_CONFIG.structure.polyhedra_max_neighbors.description,
|
|
1393
|
-
})}
|
|
1149
|
+
<NumberRangeInput
|
|
1150
|
+
min={4}
|
|
1151
|
+
max={16}
|
|
1152
|
+
step={1}
|
|
1153
|
+
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1154
|
+
title={SETTINGS_CONFIG.structure.polyhedra_max_neighbors.description}
|
|
1155
|
+
>Max neighbors</NumberRangeInput
|
|
1394
1156
|
>
|
|
1395
|
-
Max neighbors
|
|
1396
|
-
<input
|
|
1397
|
-
type="number"
|
|
1398
|
-
min={4}
|
|
1399
|
-
max={16}
|
|
1400
|
-
step={1}
|
|
1401
|
-
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1402
|
-
/>
|
|
1403
|
-
<input
|
|
1404
|
-
type="range"
|
|
1405
|
-
min={4}
|
|
1406
|
-
max={16}
|
|
1407
|
-
step={1}
|
|
1408
|
-
bind:value={scene_props.polyhedra_max_neighbors}
|
|
1409
|
-
/>
|
|
1410
|
-
</label>
|
|
1411
1157
|
{#if structure_elements.length > 0}
|
|
1412
1158
|
<div
|
|
1413
1159
|
style="display: flex; flex-wrap: wrap; gap: 8pt; align-items: center"
|
|
1414
1160
|
{@attach tooltip({
|
|
1415
|
-
content:
|
|
1161
|
+
content: `${
|
|
1162
|
+
SETTINGS_CONFIG.structure.polyhedra_excluded_elements.description
|
|
1163
|
+
}. Force-including a spectator center (alkali or heavy alkaline-earth, e.g. Li, Na, Ba) may render its polyhedra truncated at cell boundaries.`,
|
|
1416
1164
|
})}
|
|
1417
1165
|
>
|
|
1418
1166
|
Centers:
|
|
@@ -1477,12 +1225,4 @@
|
|
|
1477
1225
|
flex: 1;
|
|
1478
1226
|
min-width: 40px;
|
|
1479
1227
|
}
|
|
1480
|
-
@keyframes spin {
|
|
1481
|
-
from {
|
|
1482
|
-
transform: rotate(0deg);
|
|
1483
|
-
}
|
|
1484
|
-
to {
|
|
1485
|
-
transform: rotate(360deg);
|
|
1486
|
-
}
|
|
1487
|
-
}
|
|
1488
1228
|
</style>
|