matterviz 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (855) hide show
  1. package/.vscode/launch.json +13 -0
  2. package/.vscodeignore +7 -0
  3. package/dist/assets/STLExporter-BpTH3YHE.js +8 -0
  4. package/dist/assets/browser-DdDecX_W.js +1 -0
  5. package/dist/assets/export-qgn-H9y6.js +2 -0
  6. package/dist/assets/main-DiKYzti2.css +1 -0
  7. package/dist/assets/moyo_wasm_bg-0ocwg7xY.wasm +0 -0
  8. package/dist/extension.js +31293 -0
  9. package/dist/src/lib/FilePicker.svelte +360 -0
  10. package/dist/src/lib/MillerIndexInput.svelte +66 -0
  11. package/dist/src/lib/api/mp.ts +26 -0
  12. package/dist/src/lib/api/optimade.ts +204 -0
  13. package/dist/src/lib/brillouin/BrillouinZone.svelte +549 -0
  14. package/dist/src/lib/brillouin/BrillouinZoneControls.svelte +144 -0
  15. package/dist/src/lib/brillouin/BrillouinZoneExportPane.svelte +146 -0
  16. package/dist/src/lib/brillouin/BrillouinZoneInfoPane.svelte +146 -0
  17. package/dist/src/lib/brillouin/BrillouinZoneScene.svelte +476 -0
  18. package/dist/src/lib/brillouin/BrillouinZoneTooltip.svelte +92 -0
  19. package/dist/src/lib/brillouin/compute.ts +529 -0
  20. package/dist/src/lib/brillouin/index.ts +8 -0
  21. package/dist/src/lib/brillouin/types.ts +51 -0
  22. package/dist/src/lib/chempot-diagram/ChemPotDiagram.svelte +327 -0
  23. package/dist/src/lib/chempot-diagram/ChemPotDiagram2D.svelte +846 -0
  24. package/dist/src/lib/chempot-diagram/ChemPotDiagram3D.svelte +3193 -0
  25. package/dist/src/lib/chempot-diagram/async-compute.svelte.ts +94 -0
  26. package/dist/src/lib/chempot-diagram/chempot-worker.ts +11 -0
  27. package/dist/src/lib/chempot-diagram/color.ts +42 -0
  28. package/dist/src/lib/chempot-diagram/compute.ts +1014 -0
  29. package/dist/src/lib/chempot-diagram/index.ts +6 -0
  30. package/dist/src/lib/chempot-diagram/pointer.ts +56 -0
  31. package/dist/src/lib/chempot-diagram/temperature.ts +77 -0
  32. package/dist/src/lib/chempot-diagram/types.ts +130 -0
  33. package/dist/src/lib/colors/index.ts +249 -0
  34. package/dist/src/lib/composition/BarChart.svelte +297 -0
  35. package/dist/src/lib/composition/BubbleChart.svelte +218 -0
  36. package/dist/src/lib/composition/Composition.svelte +165 -0
  37. package/dist/src/lib/composition/Formula.svelte +268 -0
  38. package/dist/src/lib/composition/FormulaFilter.svelte +1257 -0
  39. package/dist/src/lib/composition/PieChart.svelte +323 -0
  40. package/dist/src/lib/composition/format.ts +155 -0
  41. package/dist/src/lib/composition/index.ts +37 -0
  42. package/dist/src/lib/composition/parse.ts +605 -0
  43. package/dist/src/lib/constants.ts +134 -0
  44. package/dist/src/lib/controls.ts +42 -0
  45. package/dist/src/lib/convex-hull/ConvexHull.svelte +157 -0
  46. package/dist/src/lib/convex-hull/ConvexHull2D.svelte +825 -0
  47. package/dist/src/lib/convex-hull/ConvexHull3D.svelte +1801 -0
  48. package/dist/src/lib/convex-hull/ConvexHull4D.svelte +1398 -0
  49. package/dist/src/lib/convex-hull/ConvexHullControls.svelte +535 -0
  50. package/dist/src/lib/convex-hull/ConvexHullInfoPane.svelte +125 -0
  51. package/dist/src/lib/convex-hull/ConvexHullStats.svelte +929 -0
  52. package/dist/src/lib/convex-hull/ConvexHullTooltip.svelte +131 -0
  53. package/dist/src/lib/convex-hull/GasPressureControls.svelte +247 -0
  54. package/dist/src/lib/convex-hull/StructurePopup.svelte +151 -0
  55. package/dist/src/lib/convex-hull/TemperatureSlider.svelte +140 -0
  56. package/dist/src/lib/convex-hull/barycentric-coords.ts +246 -0
  57. package/dist/src/lib/convex-hull/demo-temperature.ts +63 -0
  58. package/dist/src/lib/convex-hull/gas-thermodynamics.ts +405 -0
  59. package/dist/src/lib/convex-hull/helpers.ts +932 -0
  60. package/dist/src/lib/convex-hull/index.ts +202 -0
  61. package/dist/src/lib/convex-hull/thermodynamics.ts +2192 -0
  62. package/dist/src/lib/convex-hull/types.ts +267 -0
  63. package/dist/src/lib/coordination/CoordinationBarPlot.svelte +311 -0
  64. package/dist/src/lib/coordination/calc-coordination.ts +93 -0
  65. package/dist/src/lib/coordination/index.ts +9 -0
  66. package/dist/src/lib/effects.svelte.ts +48 -0
  67. package/dist/src/lib/element/BohrAtom.svelte +147 -0
  68. package/dist/src/lib/element/ElementHeading.svelte +26 -0
  69. package/dist/src/lib/element/ElementPhoto.svelte +57 -0
  70. package/dist/src/lib/element/ElementStats.svelte +80 -0
  71. package/dist/src/lib/element/ElementTile.svelte +484 -0
  72. package/dist/src/lib/element/data.json.gz.d.ts +4 -0
  73. package/dist/src/lib/element/data.ts +14 -0
  74. package/dist/src/lib/element/index.ts +8 -0
  75. package/dist/src/lib/element/types.ts +62 -0
  76. package/dist/src/lib/feedback/ClickFeedback.svelte +58 -0
  77. package/dist/src/lib/feedback/DragOverlay.svelte +42 -0
  78. package/dist/src/lib/feedback/index.ts +4 -0
  79. package/dist/src/lib/fermi-surface/FermiSlice.svelte +189 -0
  80. package/dist/src/lib/fermi-surface/FermiSurface.svelte +600 -0
  81. package/dist/src/lib/fermi-surface/FermiSurfaceControls.svelte +448 -0
  82. package/dist/src/lib/fermi-surface/FermiSurfaceScene.svelte +794 -0
  83. package/dist/src/lib/fermi-surface/FermiSurfaceTooltip.svelte +111 -0
  84. package/dist/src/lib/fermi-surface/compute.ts +728 -0
  85. package/dist/src/lib/fermi-surface/constants.ts +32 -0
  86. package/dist/src/lib/fermi-surface/export.ts +64 -0
  87. package/dist/src/lib/fermi-surface/index.ts +14 -0
  88. package/dist/src/lib/fermi-surface/marching-cubes.ts +3 -0
  89. package/dist/src/lib/fermi-surface/parse.ts +574 -0
  90. package/dist/src/lib/fermi-surface/symmetry.ts +56 -0
  91. package/dist/src/lib/fermi-surface/types.ts +159 -0
  92. package/dist/src/lib/heatmap-matrix/HeatmapMatrix.svelte +1545 -0
  93. package/dist/src/lib/heatmap-matrix/HeatmapMatrixControls.svelte +225 -0
  94. package/dist/src/lib/heatmap-matrix/index.ts +167 -0
  95. package/dist/src/lib/heatmap-matrix/shared.ts +7 -0
  96. package/dist/src/lib/icons.ts +650 -0
  97. package/dist/src/lib/index.ts +61 -0
  98. package/dist/src/lib/io/decompress.ts +92 -0
  99. package/dist/src/lib/io/export.ts +385 -0
  100. package/dist/src/lib/io/fetch.ts +46 -0
  101. package/dist/src/lib/io/file-drop.ts +51 -0
  102. package/dist/src/lib/io/index.ts +7 -0
  103. package/dist/src/lib/io/is-binary.ts +24 -0
  104. package/dist/src/lib/io/types.ts +8 -0
  105. package/dist/src/lib/io/url-drop.ts +141 -0
  106. package/dist/src/lib/isosurface/Isosurface.svelte +285 -0
  107. package/dist/src/lib/isosurface/IsosurfaceControls.svelte +277 -0
  108. package/dist/src/lib/isosurface/index.ts +7 -0
  109. package/dist/src/lib/isosurface/parse.ts +656 -0
  110. package/dist/src/lib/isosurface/slice.ts +175 -0
  111. package/dist/src/lib/isosurface/types.ts +309 -0
  112. package/dist/src/lib/labels.ts +320 -0
  113. package/dist/src/lib/layout/FullscreenToggle.svelte +50 -0
  114. package/dist/src/lib/layout/InfoCard.svelte +120 -0
  115. package/dist/src/lib/layout/InfoTag.svelte +185 -0
  116. package/dist/src/lib/layout/PropertyFilter.svelte +246 -0
  117. package/dist/src/lib/layout/SettingsSection.svelte +148 -0
  118. package/dist/src/lib/layout/SubpageGrid.svelte +82 -0
  119. package/dist/src/lib/layout/fullscreen.ts +65 -0
  120. package/dist/src/lib/layout/index.ts +11 -0
  121. package/dist/src/lib/layout/json-tree/JsonNode.svelte +548 -0
  122. package/dist/src/lib/layout/json-tree/JsonTree.svelte +1230 -0
  123. package/dist/src/lib/layout/json-tree/JsonValue.svelte +334 -0
  124. package/dist/src/lib/layout/json-tree/index.ts +3 -0
  125. package/dist/src/lib/layout/json-tree/types.ts +126 -0
  126. package/dist/src/lib/layout/json-tree/utils.ts +682 -0
  127. package/dist/src/lib/marching-cubes.ts +614 -0
  128. package/dist/src/lib/math.ts +1081 -0
  129. package/dist/src/lib/overlays/ContextMenu.svelte +162 -0
  130. package/dist/src/lib/overlays/CopyButton.svelte +45 -0
  131. package/dist/src/lib/overlays/DragControlTab.svelte +98 -0
  132. package/dist/src/lib/overlays/DraggablePane.svelte +487 -0
  133. package/dist/src/lib/overlays/InfoPaneCards.svelte +149 -0
  134. package/dist/src/lib/overlays/index.ts +3 -0
  135. package/dist/src/lib/periodic-table/PeriodicTable.svelte +469 -0
  136. package/dist/src/lib/periodic-table/PeriodicTableControls.svelte +557 -0
  137. package/dist/src/lib/periodic-table/PropertySelect.svelte +37 -0
  138. package/dist/src/lib/periodic-table/index.ts +12 -0
  139. package/dist/src/lib/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +1086 -0
  140. package/dist/src/lib/phase-diagram/PhaseDiagramControls.svelte +444 -0
  141. package/dist/src/lib/phase-diagram/PhaseDiagramEditorPane.svelte +126 -0
  142. package/dist/src/lib/phase-diagram/PhaseDiagramExportPane.svelte +184 -0
  143. package/dist/src/lib/phase-diagram/PhaseDiagramTooltip.svelte +391 -0
  144. package/dist/src/lib/phase-diagram/TdbInfoPanel.svelte +203 -0
  145. package/dist/src/lib/phase-diagram/build-diagram.ts +186 -0
  146. package/dist/src/lib/phase-diagram/colors.ts +58 -0
  147. package/dist/src/lib/phase-diagram/diagram-input.ts +40 -0
  148. package/dist/src/lib/phase-diagram/index.ts +13 -0
  149. package/dist/src/lib/phase-diagram/parse.ts +348 -0
  150. package/dist/src/lib/phase-diagram/svg-to-diagram.ts +1023 -0
  151. package/dist/src/lib/phase-diagram/types.ts +144 -0
  152. package/dist/src/lib/phase-diagram/utils.ts +775 -0
  153. package/dist/src/lib/plot/AxisLabel.svelte +51 -0
  154. package/dist/src/lib/plot/BarPlot.svelte +2113 -0
  155. package/dist/src/lib/plot/BarPlotControls.svelte +66 -0
  156. package/dist/src/lib/plot/BinnedScatterPlot.svelte +1114 -0
  157. package/dist/src/lib/plot/ColorBar.svelte +721 -0
  158. package/dist/src/lib/plot/ColorScaleSelect.svelte +54 -0
  159. package/dist/src/lib/plot/ElementScatter.svelte +63 -0
  160. package/dist/src/lib/plot/FillArea.svelte +223 -0
  161. package/dist/src/lib/plot/Histogram.svelte +1558 -0
  162. package/dist/src/lib/plot/HistogramControls.svelte +212 -0
  163. package/dist/src/lib/plot/InteractiveAxisLabel.svelte +96 -0
  164. package/dist/src/lib/plot/Line.svelte +84 -0
  165. package/dist/src/lib/plot/PlotAxis.svelte +169 -0
  166. package/dist/src/lib/plot/PlotControls.svelte +537 -0
  167. package/dist/src/lib/plot/PlotLegend.svelte +569 -0
  168. package/dist/src/lib/plot/PlotTooltip.svelte +67 -0
  169. package/dist/src/lib/plot/PortalSelect.svelte +253 -0
  170. package/dist/src/lib/plot/ReferenceLine3D.svelte +156 -0
  171. package/dist/src/lib/plot/ReferencePlane.svelte +175 -0
  172. package/dist/src/lib/plot/ScatterPlot.svelte +2778 -0
  173. package/dist/src/lib/plot/ScatterPlot3D.svelte +529 -0
  174. package/dist/src/lib/plot/ScatterPlot3DControls.svelte +437 -0
  175. package/dist/src/lib/plot/ScatterPlot3DScene.svelte +912 -0
  176. package/dist/src/lib/plot/ScatterPlotControls.svelte +306 -0
  177. package/dist/src/lib/plot/ScatterPoint.svelte +182 -0
  178. package/dist/src/lib/plot/SpacegroupBarPlot.svelte +293 -0
  179. package/dist/src/lib/plot/Surface3D.svelte +197 -0
  180. package/dist/src/lib/plot/ZeroLines.svelte +97 -0
  181. package/dist/src/lib/plot/ZoomRect.svelte +23 -0
  182. package/dist/src/lib/plot/adaptive-density.ts +316 -0
  183. package/dist/src/lib/plot/auto-place.ts +184 -0
  184. package/dist/src/lib/plot/axis-utils.ts +122 -0
  185. package/dist/src/lib/plot/binned-scatter-types.ts +83 -0
  186. package/dist/src/lib/plot/data-cleaning.ts +1069 -0
  187. package/dist/src/lib/plot/data-transform.ts +69 -0
  188. package/dist/src/lib/plot/defaults.ts +9 -0
  189. package/dist/src/lib/plot/fill-utils.ts +494 -0
  190. package/dist/src/lib/plot/hover-lock.svelte.ts +60 -0
  191. package/dist/src/lib/plot/index.ts +53 -0
  192. package/dist/src/lib/plot/interactions.ts +119 -0
  193. package/dist/src/lib/plot/layout.ts +425 -0
  194. package/dist/src/lib/plot/reference-line.ts +426 -0
  195. package/dist/src/lib/plot/scales.ts +654 -0
  196. package/dist/src/lib/plot/svg.ts +23 -0
  197. package/dist/src/lib/plot/types.ts +1144 -0
  198. package/dist/src/lib/plot/utils/label-placement.ts +541 -0
  199. package/dist/src/lib/plot/utils/series-visibility.ts +140 -0
  200. package/dist/src/lib/plot/utils.ts +11 -0
  201. package/dist/src/lib/rdf/RdfPlot.svelte +247 -0
  202. package/dist/src/lib/rdf/calc-rdf.ts +167 -0
  203. package/dist/src/lib/rdf/index.ts +27 -0
  204. package/dist/src/lib/sanitize.ts +126 -0
  205. package/dist/src/lib/settings.ts +1479 -0
  206. package/dist/src/lib/spectral/Bands.svelte +1040 -0
  207. package/dist/src/lib/spectral/BandsAndDos.svelte +134 -0
  208. package/dist/src/lib/spectral/BrillouinBandsDos.svelte +252 -0
  209. package/dist/src/lib/spectral/Dos.svelte +697 -0
  210. package/dist/src/lib/spectral/helpers.ts +1381 -0
  211. package/dist/src/lib/spectral/index.ts +8 -0
  212. package/dist/src/lib/spectral/types.ts +112 -0
  213. package/dist/src/lib/state.svelte.ts +64 -0
  214. package/dist/src/lib/structure/Arrow.svelte +72 -0
  215. package/dist/src/lib/structure/AtomLegend.svelte +815 -0
  216. package/dist/src/lib/structure/Bond.svelte +140 -0
  217. package/dist/src/lib/structure/CanvasTooltip.svelte +33 -0
  218. package/dist/src/lib/structure/CellSelect.svelte +349 -0
  219. package/dist/src/lib/structure/Cylinder.svelte +45 -0
  220. package/dist/src/lib/structure/Lattice.svelte +196 -0
  221. package/dist/src/lib/structure/Structure.svelte +2248 -0
  222. package/dist/src/lib/structure/StructureControls.svelte +1273 -0
  223. package/dist/src/lib/structure/StructureExportPane.svelte +252 -0
  224. package/dist/src/lib/structure/StructureInfoPane.svelte +737 -0
  225. package/dist/src/lib/structure/StructureScene.svelte +2255 -0
  226. package/dist/src/lib/structure/atom-properties.ts +316 -0
  227. package/dist/src/lib/structure/bond-order-perception.ts +447 -0
  228. package/dist/src/lib/structure/bonding.ts +944 -0
  229. package/dist/src/lib/structure/export.ts +861 -0
  230. package/dist/src/lib/structure/index.ts +291 -0
  231. package/dist/src/lib/structure/label-placement.ts +130 -0
  232. package/dist/src/lib/structure/measure.ts +45 -0
  233. package/dist/src/lib/structure/parse.ts +1705 -0
  234. package/dist/src/lib/structure/partial-occupancy.ts +183 -0
  235. package/dist/src/lib/structure/pbc.ts +164 -0
  236. package/dist/src/lib/structure/supercell.ts +226 -0
  237. package/dist/src/lib/structure/validation.ts +11 -0
  238. package/dist/src/lib/symmetry/SymmetryStats.svelte +226 -0
  239. package/dist/src/lib/symmetry/WyckoffTable.svelte +120 -0
  240. package/dist/src/lib/symmetry/cell-transform.ts +118 -0
  241. package/dist/src/lib/symmetry/index.ts +348 -0
  242. package/dist/src/lib/symmetry/spacegroups.ts +404 -0
  243. package/dist/src/lib/table/HeatmapTable.svelte +1833 -0
  244. package/dist/src/lib/table/ToggleMenu.svelte +385 -0
  245. package/dist/src/lib/table/index.ts +139 -0
  246. package/dist/src/lib/theme/ThemeControl.svelte +53 -0
  247. package/dist/src/lib/theme/index.ts +107 -0
  248. package/dist/src/lib/theme/themes.mjs +297 -0
  249. package/dist/src/lib/time.ts +71 -0
  250. package/dist/src/lib/tooltip/TooltipContent.svelte +58 -0
  251. package/dist/src/lib/tooltip/index.ts +2 -0
  252. package/dist/src/lib/tooltip/types.ts +13 -0
  253. package/dist/src/lib/trajectory/Trajectory.svelte +1545 -0
  254. package/dist/src/lib/trajectory/TrajectoryError.svelte +128 -0
  255. package/dist/src/lib/trajectory/TrajectoryExportPane.svelte +357 -0
  256. package/dist/src/lib/trajectory/TrajectoryInfoPane.svelte +313 -0
  257. package/dist/src/lib/trajectory/constants.ts +7 -0
  258. package/dist/src/lib/trajectory/extract.ts +196 -0
  259. package/dist/src/lib/trajectory/format-detect.ts +96 -0
  260. package/dist/src/lib/trajectory/frame-reader.ts +456 -0
  261. package/dist/src/lib/trajectory/helpers.ts +217 -0
  262. package/dist/src/lib/trajectory/index.ts +218 -0
  263. package/dist/src/lib/trajectory/parse/ase.ts +109 -0
  264. package/dist/src/lib/trajectory/parse/hdf5.ts +173 -0
  265. package/dist/src/lib/trajectory/parse/index.ts +411 -0
  266. package/dist/src/lib/trajectory/parse/lammps.ts +215 -0
  267. package/dist/src/lib/trajectory/parse/vasp.ts +102 -0
  268. package/dist/src/lib/trajectory/parse/xyz.ts +143 -0
  269. package/dist/src/lib/trajectory/plotting.ts +599 -0
  270. package/dist/src/lib/trajectory/types.ts +13 -0
  271. package/dist/src/lib/utils.ts +56 -0
  272. package/dist/src/lib/xrd/XrdPlot.svelte +615 -0
  273. package/dist/src/lib/xrd/broadening.ts +130 -0
  274. package/dist/src/lib/xrd/calc-xrd.ts +397 -0
  275. package/dist/src/lib/xrd/index.ts +38 -0
  276. package/dist/src/lib/xrd/parse.ts +858 -0
  277. package/dist/webview.js +29421 -0
  278. package/icon.png +0 -0
  279. package/license +1 -1
  280. package/matterviz-0.3.2.vsix +0 -0
  281. package/matterviz-0.3.4.vsix +0 -0
  282. package/matterviz-0.3.5.vsix +0 -0
  283. package/package.json +1460 -215
  284. package/readme.md +171 -98
  285. package/scripts/sync-config.ts +101 -0
  286. package/src/declarations.d.ts +2 -0
  287. package/src/extension.ts +972 -0
  288. package/src/node-io.ts +65 -0
  289. package/src/types.ts +17 -0
  290. package/src/webview/JsonBrowser.svelte +1079 -0
  291. package/src/webview/PlotPanel.svelte +346 -0
  292. package/src/webview/detect.ts +444 -0
  293. package/src/webview/main.ts +764 -0
  294. package/src/webview/plot-utils.ts +250 -0
  295. package/test-fixtures/all-viz-types.json.gz +0 -0
  296. package/test-fixtures/plot-demo-data.json.gz +0 -0
  297. package/tests/detect.test.ts +604 -0
  298. package/tests/extension.test.ts +2041 -0
  299. package/tests/node-io.test.ts +39 -0
  300. package/tests/plot-utils.test.ts +302 -0
  301. package/tests/vite-plugin-json-gz.test.ts +114 -0
  302. package/tests/vscode-mock.ts +18 -0
  303. package/tests/webview.test.ts +231 -0
  304. package/tsconfig.json +20 -0
  305. package/vite-plugin-json-gz.ts +29 -0
  306. package/vite.config.ts +34 -0
  307. package/vite.extension.config.ts +34 -0
  308. package/dist/EmptyState.svelte.d.ts +0 -9
  309. package/dist/FilePicker.svelte +0 -360
  310. package/dist/FilePicker.svelte.d.ts +0 -17
  311. package/dist/Icon.svelte.d.ts +0 -13
  312. package/dist/MillerIndexInput.svelte +0 -66
  313. package/dist/MillerIndexInput.svelte.d.ts +0 -7
  314. package/dist/api/mp.d.ts +0 -6
  315. package/dist/api/mp.js +0 -22
  316. package/dist/api/optimade.d.ts +0 -45
  317. package/dist/api/optimade.js +0 -135
  318. package/dist/brillouin/BrillouinZone.svelte +0 -546
  319. package/dist/brillouin/BrillouinZone.svelte.d.ts +0 -83
  320. package/dist/brillouin/BrillouinZoneControls.svelte +0 -144
  321. package/dist/brillouin/BrillouinZoneControls.svelte.d.ts +0 -17
  322. package/dist/brillouin/BrillouinZoneExportPane.svelte +0 -148
  323. package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +0 -15
  324. package/dist/brillouin/BrillouinZoneInfoPane.svelte +0 -146
  325. package/dist/brillouin/BrillouinZoneInfoPane.svelte.d.ts +0 -13
  326. package/dist/brillouin/BrillouinZoneScene.svelte +0 -476
  327. package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +0 -48
  328. package/dist/brillouin/BrillouinZoneTooltip.svelte +0 -92
  329. package/dist/brillouin/BrillouinZoneTooltip.svelte.d.ts +0 -8
  330. package/dist/brillouin/compute.d.ts +0 -17
  331. package/dist/brillouin/compute.js +0 -426
  332. package/dist/brillouin/index.d.ts +0 -8
  333. package/dist/brillouin/index.js +0 -8
  334. package/dist/brillouin/types.d.ts +0 -48
  335. package/dist/brillouin/types.js +0 -1
  336. package/dist/chempot-diagram/ChemPotDiagram.svelte +0 -327
  337. package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +0 -13
  338. package/dist/chempot-diagram/ChemPotDiagram2D.svelte +0 -847
  339. package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +0 -16
  340. package/dist/chempot-diagram/ChemPotDiagram3D.svelte +0 -3194
  341. package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +0 -16
  342. package/dist/chempot-diagram/ChemPotScene3D.svelte.d.ts +0 -7
  343. package/dist/chempot-diagram/async-compute.svelte.d.ts +0 -3
  344. package/dist/chempot-diagram/async-compute.svelte.js +0 -78
  345. package/dist/chempot-diagram/chempot-worker.d.ts +0 -1
  346. package/dist/chempot-diagram/chempot-worker.js +0 -11
  347. package/dist/chempot-diagram/color.d.ts +0 -10
  348. package/dist/chempot-diagram/color.js +0 -32
  349. package/dist/chempot-diagram/compute.d.ts +0 -48
  350. package/dist/chempot-diagram/compute.js +0 -812
  351. package/dist/chempot-diagram/index.d.ts +0 -6
  352. package/dist/chempot-diagram/index.js +0 -6
  353. package/dist/chempot-diagram/pointer.d.ts +0 -16
  354. package/dist/chempot-diagram/pointer.js +0 -40
  355. package/dist/chempot-diagram/temperature.d.ts +0 -15
  356. package/dist/chempot-diagram/temperature.js +0 -36
  357. package/dist/chempot-diagram/types.d.ts +0 -86
  358. package/dist/chempot-diagram/types.js +0 -28
  359. package/dist/colors/index.d.ts +0 -47
  360. package/dist/colors/index.js +0 -203
  361. package/dist/composition/BarChart.svelte +0 -297
  362. package/dist/composition/BarChart.svelte.d.ts +0 -39
  363. package/dist/composition/BubbleChart.svelte +0 -218
  364. package/dist/composition/BubbleChart.svelte.d.ts +0 -28
  365. package/dist/composition/Composition.svelte +0 -164
  366. package/dist/composition/Composition.svelte.d.ts +0 -15
  367. package/dist/composition/Formula.svelte +0 -265
  368. package/dist/composition/Formula.svelte.d.ts +0 -19
  369. package/dist/composition/FormulaFilter.svelte +0 -1259
  370. package/dist/composition/FormulaFilter.svelte.d.ts +0 -51
  371. package/dist/composition/PieChart.svelte +0 -323
  372. package/dist/composition/PieChart.svelte.d.ts +0 -37
  373. package/dist/composition/format.d.ts +0 -15
  374. package/dist/composition/format.js +0 -109
  375. package/dist/composition/index.d.ts +0 -20
  376. package/dist/composition/index.js +0 -14
  377. package/dist/composition/parse.d.ts +0 -55
  378. package/dist/composition/parse.js +0 -459
  379. package/dist/constants.d.ts +0 -29
  380. package/dist/constants.js +0 -99
  381. package/dist/controls.d.ts +0 -14
  382. package/dist/controls.js +0 -30
  383. package/dist/convex-hull/ConvexHull.svelte +0 -157
  384. package/dist/convex-hull/ConvexHull.svelte.d.ts +0 -13
  385. package/dist/convex-hull/ConvexHull2D.svelte +0 -814
  386. package/dist/convex-hull/ConvexHull2D.svelte.d.ts +0 -11
  387. package/dist/convex-hull/ConvexHull3D.svelte +0 -1790
  388. package/dist/convex-hull/ConvexHull3D.svelte.d.ts +0 -8
  389. package/dist/convex-hull/ConvexHull4D.svelte +0 -1386
  390. package/dist/convex-hull/ConvexHull4D.svelte.d.ts +0 -8
  391. package/dist/convex-hull/ConvexHullControls.svelte +0 -546
  392. package/dist/convex-hull/ConvexHullControls.svelte.d.ts +0 -48
  393. package/dist/convex-hull/ConvexHullInfoPane.svelte +0 -122
  394. package/dist/convex-hull/ConvexHullInfoPane.svelte.d.ts +0 -18
  395. package/dist/convex-hull/ConvexHullStats.svelte +0 -922
  396. package/dist/convex-hull/ConvexHullStats.svelte.d.ts +0 -15
  397. package/dist/convex-hull/ConvexHullTooltip.svelte +0 -131
  398. package/dist/convex-hull/ConvexHullTooltip.svelte.d.ts +0 -33
  399. package/dist/convex-hull/GasPressureControls.svelte +0 -247
  400. package/dist/convex-hull/GasPressureControls.svelte.d.ts +0 -11
  401. package/dist/convex-hull/StructurePopup.svelte +0 -116
  402. package/dist/convex-hull/StructurePopup.svelte.d.ts +0 -18
  403. package/dist/convex-hull/TemperatureSlider.svelte +0 -137
  404. package/dist/convex-hull/TemperatureSlider.svelte.d.ts +0 -8
  405. package/dist/convex-hull/barycentric-coords.d.ts +0 -18
  406. package/dist/convex-hull/barycentric-coords.js +0 -182
  407. package/dist/convex-hull/demo-temperature.d.ts +0 -6
  408. package/dist/convex-hull/demo-temperature.js +0 -40
  409. package/dist/convex-hull/gas-thermodynamics.d.ts +0 -16
  410. package/dist/convex-hull/gas-thermodynamics.js +0 -316
  411. package/dist/convex-hull/helpers.d.ts +0 -103
  412. package/dist/convex-hull/helpers.js +0 -689
  413. package/dist/convex-hull/index.d.ts +0 -118
  414. package/dist/convex-hull/index.js +0 -57
  415. package/dist/convex-hull/thermodynamics.d.ts +0 -66
  416. package/dist/convex-hull/thermodynamics.js +0 -1752
  417. package/dist/convex-hull/types.d.ts +0 -162
  418. package/dist/convex-hull/types.js +0 -36
  419. package/dist/coordination/CoordinationBarPlot.svelte +0 -311
  420. package/dist/coordination/CoordinationBarPlot.svelte.d.ts +0 -30
  421. package/dist/coordination/calc-coordination.d.ts +0 -15
  422. package/dist/coordination/calc-coordination.js +0 -63
  423. package/dist/coordination/index.d.ts +0 -8
  424. package/dist/coordination/index.js +0 -7
  425. package/dist/element/BohrAtom.svelte +0 -147
  426. package/dist/element/BohrAtom.svelte.d.ts +0 -20
  427. package/dist/element/ElementHeading.svelte +0 -26
  428. package/dist/element/ElementHeading.svelte.d.ts +0 -8
  429. package/dist/element/ElementPhoto.svelte +0 -57
  430. package/dist/element/ElementPhoto.svelte.d.ts +0 -9
  431. package/dist/element/ElementStats.svelte +0 -80
  432. package/dist/element/ElementStats.svelte.d.ts +0 -8
  433. package/dist/element/ElementTile.svelte +0 -484
  434. package/dist/element/ElementTile.svelte.d.ts +0 -29
  435. package/dist/element/Nucleus.svelte.d.ts +0 -17
  436. package/dist/element/data.d.ts +0 -2
  437. package/dist/element/data.js +0 -2
  438. package/dist/element/data.json.gz.d.ts +0 -2
  439. package/dist/element/index.d.ts +0 -8
  440. package/dist/element/index.js +0 -8
  441. package/dist/element/types.d.ts +0 -57
  442. package/dist/element/types.js +0 -1
  443. package/dist/feedback/ClickFeedback.svelte +0 -58
  444. package/dist/feedback/ClickFeedback.svelte.d.ts +0 -12
  445. package/dist/feedback/DragOverlay.svelte +0 -42
  446. package/dist/feedback/DragOverlay.svelte.d.ts +0 -7
  447. package/dist/feedback/Spinner.svelte.d.ts +0 -7
  448. package/dist/feedback/StatusMessage.svelte.d.ts +0 -9
  449. package/dist/feedback/index.d.ts +0 -4
  450. package/dist/feedback/index.js +0 -4
  451. package/dist/fermi-surface/FermiSlice.svelte +0 -189
  452. package/dist/fermi-surface/FermiSlice.svelte.d.ts +0 -24
  453. package/dist/fermi-surface/FermiSurface.svelte +0 -600
  454. package/dist/fermi-surface/FermiSurface.svelte.d.ts +0 -83
  455. package/dist/fermi-surface/FermiSurfaceControls.svelte +0 -452
  456. package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +0 -35
  457. package/dist/fermi-surface/FermiSurfaceScene.svelte +0 -792
  458. package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +0 -50
  459. package/dist/fermi-surface/FermiSurfaceTooltip.svelte +0 -111
  460. package/dist/fermi-surface/FermiSurfaceTooltip.svelte.d.ts +0 -8
  461. package/dist/fermi-surface/compute.d.ts +0 -5
  462. package/dist/fermi-surface/compute.js +0 -538
  463. package/dist/fermi-surface/constants.d.ts +0 -9
  464. package/dist/fermi-surface/constants.js +0 -27
  465. package/dist/fermi-surface/export.d.ts +0 -5
  466. package/dist/fermi-surface/export.js +0 -63
  467. package/dist/fermi-surface/index.d.ts +0 -12
  468. package/dist/fermi-surface/index.js +0 -13
  469. package/dist/fermi-surface/marching-cubes.d.ts +0 -2
  470. package/dist/fermi-surface/marching-cubes.js +0 -2
  471. package/dist/fermi-surface/parse.d.ts +0 -2
  472. package/dist/fermi-surface/parse.js +0 -495
  473. package/dist/fermi-surface/symmetry.d.ts +0 -3
  474. package/dist/fermi-surface/symmetry.js +0 -46
  475. package/dist/fermi-surface/types.d.ts +0 -113
  476. package/dist/fermi-surface/types.js +0 -4
  477. package/dist/heatmap-matrix/HeatmapMatrix.svelte +0 -1527
  478. package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +0 -110
  479. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +0 -225
  480. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +0 -30
  481. package/dist/heatmap-matrix/index.d.ts +0 -53
  482. package/dist/heatmap-matrix/index.js +0 -100
  483. package/dist/heatmap-matrix/shared.d.ts +0 -2
  484. package/dist/heatmap-matrix/shared.js +0 -4
  485. package/dist/icons.d.ts +0 -569
  486. package/dist/icons.js +0 -648
  487. package/dist/index.d.ts +0 -39
  488. package/dist/index.js +0 -39
  489. package/dist/io/decompress.d.ts +0 -10
  490. package/dist/io/decompress.js +0 -74
  491. package/dist/io/export.d.ts +0 -16
  492. package/dist/io/export.js +0 -316
  493. package/dist/io/fetch.d.ts +0 -5
  494. package/dist/io/fetch.js +0 -39
  495. package/dist/io/file-drop.d.ts +0 -7
  496. package/dist/io/file-drop.js +0 -43
  497. package/dist/io/index.d.ts +0 -7
  498. package/dist/io/index.js +0 -7
  499. package/dist/io/is-binary.d.ts +0 -1
  500. package/dist/io/is-binary.js +0 -20
  501. package/dist/io/types.d.ts +0 -8
  502. package/dist/io/types.js +0 -1
  503. package/dist/io/url-drop.d.ts +0 -2
  504. package/dist/io/url-drop.js +0 -117
  505. package/dist/isosurface/Isosurface.svelte +0 -285
  506. package/dist/isosurface/Isosurface.svelte.d.ts +0 -8
  507. package/dist/isosurface/IsosurfaceControls.svelte +0 -291
  508. package/dist/isosurface/IsosurfaceControls.svelte.d.ts +0 -9
  509. package/dist/isosurface/index.d.ts +0 -5
  510. package/dist/isosurface/index.js +0 -6
  511. package/dist/isosurface/parse.d.ts +0 -6
  512. package/dist/isosurface/parse.js +0 -553
  513. package/dist/isosurface/slice.d.ts +0 -11
  514. package/dist/isosurface/slice.js +0 -140
  515. package/dist/isosurface/types.d.ts +0 -56
  516. package/dist/isosurface/types.js +0 -227
  517. package/dist/labels.d.ts +0 -53
  518. package/dist/labels.js +0 -274
  519. package/dist/layout/FullscreenToggle.svelte +0 -50
  520. package/dist/layout/FullscreenToggle.svelte.d.ts +0 -7
  521. package/dist/layout/InfoCard.svelte +0 -120
  522. package/dist/layout/InfoCard.svelte.d.ts +0 -21
  523. package/dist/layout/InfoTag.svelte +0 -183
  524. package/dist/layout/InfoTag.svelte.d.ts +0 -19
  525. package/dist/layout/PropertyFilter.svelte +0 -244
  526. package/dist/layout/PropertyFilter.svelte.d.ts +0 -24
  527. package/dist/layout/SettingsSection.svelte +0 -148
  528. package/dist/layout/SettingsSection.svelte.d.ts +0 -17
  529. package/dist/layout/SubpageGrid.svelte +0 -82
  530. package/dist/layout/SubpageGrid.svelte.d.ts +0 -14
  531. package/dist/layout/fullscreen.d.ts +0 -9
  532. package/dist/layout/fullscreen.js +0 -53
  533. package/dist/layout/index.d.ts +0 -10
  534. package/dist/layout/index.js +0 -8
  535. package/dist/layout/json-tree/JsonNode.svelte +0 -548
  536. package/dist/layout/json-tree/JsonNode.svelte.d.ts +0 -11
  537. package/dist/layout/json-tree/JsonTree.svelte +0 -1222
  538. package/dist/layout/json-tree/JsonTree.svelte.d.ts +0 -6
  539. package/dist/layout/json-tree/JsonValue.svelte +0 -334
  540. package/dist/layout/json-tree/JsonValue.svelte.d.ts +0 -9
  541. package/dist/layout/json-tree/index.d.ts +0 -3
  542. package/dist/layout/json-tree/index.js +0 -3
  543. package/dist/layout/json-tree/types.d.ts +0 -73
  544. package/dist/layout/json-tree/types.js +0 -3
  545. package/dist/layout/json-tree/utils.d.ts +0 -29
  546. package/dist/layout/json-tree/utils.js +0 -649
  547. package/dist/marching-cubes.d.ts +0 -14
  548. package/dist/marching-cubes.js +0 -542
  549. package/dist/math.d.ts +0 -91
  550. package/dist/math.js +0 -896
  551. package/dist/overlays/ContextMenu.svelte +0 -162
  552. package/dist/overlays/ContextMenu.svelte.d.ts +0 -25
  553. package/dist/overlays/CopyButton.svelte +0 -45
  554. package/dist/overlays/CopyButton.svelte.d.ts +0 -8
  555. package/dist/overlays/DraggablePane.svelte +0 -564
  556. package/dist/overlays/DraggablePane.svelte.d.ts +0 -36
  557. package/dist/overlays/InfoPaneCards.svelte +0 -149
  558. package/dist/overlays/InfoPaneCards.svelte.d.ts +0 -22
  559. package/dist/overlays/index.d.ts +0 -2
  560. package/dist/overlays/index.js +0 -2
  561. package/dist/periodic-table/PeriodicTable.svelte +0 -469
  562. package/dist/periodic-table/PeriodicTable.svelte.d.ts +0 -55
  563. package/dist/periodic-table/PeriodicTableControls.svelte +0 -557
  564. package/dist/periodic-table/PeriodicTableControls.svelte.d.ts +0 -24
  565. package/dist/periodic-table/PropertySelect.svelte +0 -37
  566. package/dist/periodic-table/PropertySelect.svelte.d.ts +0 -13
  567. package/dist/periodic-table/TableInset.svelte.d.ts +0 -9
  568. package/dist/periodic-table/index.d.ts +0 -10
  569. package/dist/periodic-table/index.js +0 -4
  570. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +0 -1084
  571. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +0 -44
  572. package/dist/phase-diagram/PhaseDiagramControls.svelte +0 -449
  573. package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +0 -30
  574. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +0 -126
  575. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +0 -15
  576. package/dist/phase-diagram/PhaseDiagramExportPane.svelte +0 -192
  577. package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +0 -19
  578. package/dist/phase-diagram/PhaseDiagramTooltip.svelte +0 -392
  579. package/dist/phase-diagram/PhaseDiagramTooltip.svelte.d.ts +0 -16
  580. package/dist/phase-diagram/TdbInfoPanel.svelte +0 -203
  581. package/dist/phase-diagram/TdbInfoPanel.svelte.d.ts +0 -12
  582. package/dist/phase-diagram/build-diagram.d.ts +0 -11
  583. package/dist/phase-diagram/build-diagram.js +0 -167
  584. package/dist/phase-diagram/colors.d.ts +0 -35
  585. package/dist/phase-diagram/colors.js +0 -51
  586. package/dist/phase-diagram/diagram-input.d.ts +0 -33
  587. package/dist/phase-diagram/diagram-input.js +0 -3
  588. package/dist/phase-diagram/index.d.ts +0 -13
  589. package/dist/phase-diagram/index.js +0 -13
  590. package/dist/phase-diagram/parse.d.ts +0 -55
  591. package/dist/phase-diagram/parse.js +0 -276
  592. package/dist/phase-diagram/svg-to-diagram.d.ts +0 -2
  593. package/dist/phase-diagram/svg-to-diagram.js +0 -867
  594. package/dist/phase-diagram/types.d.ts +0 -99
  595. package/dist/phase-diagram/types.js +0 -1
  596. package/dist/phase-diagram/utils.d.ts +0 -118
  597. package/dist/phase-diagram/utils.js +0 -606
  598. package/dist/plot/AxisLabel.svelte +0 -51
  599. package/dist/plot/AxisLabel.svelte.d.ts +0 -16
  600. package/dist/plot/BarPlot.svelte +0 -2265
  601. package/dist/plot/BarPlot.svelte.d.ts +0 -83
  602. package/dist/plot/BarPlotControls.svelte +0 -66
  603. package/dist/plot/BarPlotControls.svelte.d.ts +0 -18
  604. package/dist/plot/ColorBar.svelte +0 -719
  605. package/dist/plot/ColorBar.svelte.d.ts +0 -31
  606. package/dist/plot/ColorScaleSelect.svelte +0 -54
  607. package/dist/plot/ColorScaleSelect.svelte.d.ts +0 -15
  608. package/dist/plot/ElementScatter.svelte +0 -63
  609. package/dist/plot/ElementScatter.svelte.d.ts +0 -14
  610. package/dist/plot/FillArea.svelte +0 -225
  611. package/dist/plot/FillArea.svelte.d.ts +0 -21
  612. package/dist/plot/Histogram.svelte +0 -1672
  613. package/dist/plot/Histogram.svelte.d.ts +0 -50
  614. package/dist/plot/HistogramControls.svelte +0 -212
  615. package/dist/plot/HistogramControls.svelte.d.ts +0 -22
  616. package/dist/plot/InteractiveAxisLabel.svelte +0 -94
  617. package/dist/plot/InteractiveAxisLabel.svelte.d.ts +0 -14
  618. package/dist/plot/Line.svelte +0 -84
  619. package/dist/plot/Line.svelte.d.ts +0 -15
  620. package/dist/plot/PlotControls.svelte +0 -537
  621. package/dist/plot/PlotControls.svelte.d.ts +0 -4
  622. package/dist/plot/PlotLegend.svelte +0 -569
  623. package/dist/plot/PlotLegend.svelte.d.ts +0 -29
  624. package/dist/plot/PlotTooltip.svelte +0 -67
  625. package/dist/plot/PlotTooltip.svelte.d.ts +0 -17
  626. package/dist/plot/PortalSelect.svelte +0 -253
  627. package/dist/plot/PortalSelect.svelte.d.ts +0 -16
  628. package/dist/plot/ReferenceLine.svelte.d.ts +0 -20
  629. package/dist/plot/ReferenceLine3D.svelte +0 -154
  630. package/dist/plot/ReferenceLine3D.svelte.d.ts +0 -14
  631. package/dist/plot/ReferencePlane.svelte +0 -178
  632. package/dist/plot/ReferencePlane.svelte.d.ts +0 -14
  633. package/dist/plot/ScatterPlot.svelte +0 -2845
  634. package/dist/plot/ScatterPlot.svelte.d.ts +0 -93
  635. package/dist/plot/ScatterPlot3D.svelte +0 -502
  636. package/dist/plot/ScatterPlot3D.svelte.d.ts +0 -94
  637. package/dist/plot/ScatterPlot3DControls.svelte +0 -437
  638. package/dist/plot/ScatterPlot3DControls.svelte.d.ts +0 -20
  639. package/dist/plot/ScatterPlot3DScene.svelte +0 -912
  640. package/dist/plot/ScatterPlot3DScene.svelte.d.ts +0 -74
  641. package/dist/plot/ScatterPlotControls.svelte +0 -307
  642. package/dist/plot/ScatterPlotControls.svelte.d.ts +0 -17
  643. package/dist/plot/ScatterPoint.svelte +0 -191
  644. package/dist/plot/ScatterPoint.svelte.d.ts +0 -21
  645. package/dist/plot/SpacegroupBarPlot.svelte +0 -293
  646. package/dist/plot/SpacegroupBarPlot.svelte.d.ts +0 -9
  647. package/dist/plot/Surface3D.svelte +0 -200
  648. package/dist/plot/Surface3D.svelte.d.ts +0 -13
  649. package/dist/plot/ZeroLines.svelte +0 -96
  650. package/dist/plot/ZeroLines.svelte.d.ts +0 -32
  651. package/dist/plot/ZoomRect.svelte +0 -23
  652. package/dist/plot/ZoomRect.svelte.d.ts +0 -8
  653. package/dist/plot/axis-utils.d.ts +0 -19
  654. package/dist/plot/axis-utils.js +0 -80
  655. package/dist/plot/data-cleaning.d.ts +0 -37
  656. package/dist/plot/data-cleaning.js +0 -855
  657. package/dist/plot/data-transform.d.ts +0 -16
  658. package/dist/plot/data-transform.js +0 -45
  659. package/dist/plot/defaults.d.ts +0 -19
  660. package/dist/plot/defaults.js +0 -9
  661. package/dist/plot/fill-utils.d.ts +0 -51
  662. package/dist/plot/fill-utils.js +0 -337
  663. package/dist/plot/hover-lock.svelte.d.ts +0 -14
  664. package/dist/plot/hover-lock.svelte.js +0 -46
  665. package/dist/plot/index.d.ts +0 -37
  666. package/dist/plot/index.js +0 -37
  667. package/dist/plot/interactions.d.ts +0 -12
  668. package/dist/plot/interactions.js +0 -100
  669. package/dist/plot/layout.d.ts +0 -60
  670. package/dist/plot/layout.js +0 -230
  671. package/dist/plot/reference-line.d.ts +0 -60
  672. package/dist/plot/reference-line.js +0 -316
  673. package/dist/plot/scales.d.ts +0 -48
  674. package/dist/plot/scales.js +0 -484
  675. package/dist/plot/svg.d.ts +0 -1
  676. package/dist/plot/svg.js +0 -11
  677. package/dist/plot/types.d.ts +0 -859
  678. package/dist/plot/types.js +0 -103
  679. package/dist/plot/utils/label-placement.d.ts +0 -47
  680. package/dist/plot/utils/label-placement.js +0 -256
  681. package/dist/plot/utils/series-visibility.d.ts +0 -9
  682. package/dist/plot/utils/series-visibility.js +0 -67
  683. package/dist/plot/utils.d.ts +0 -1
  684. package/dist/plot/utils.js +0 -14
  685. package/dist/rdf/RdfPlot.svelte +0 -247
  686. package/dist/rdf/RdfPlot.svelte.d.ts +0 -27
  687. package/dist/rdf/calc-rdf.d.ts +0 -4
  688. package/dist/rdf/calc-rdf.js +0 -111
  689. package/dist/rdf/index.d.ts +0 -23
  690. package/dist/rdf/index.js +0 -2
  691. package/dist/sanitize.d.ts +0 -4
  692. package/dist/sanitize.js +0 -114
  693. package/dist/settings.d.ts +0 -255
  694. package/dist/settings.js +0 -1132
  695. package/dist/spectral/Bands.svelte +0 -1040
  696. package/dist/spectral/Bands.svelte.d.ts +0 -40
  697. package/dist/spectral/BandsAndDos.svelte +0 -128
  698. package/dist/spectral/BandsAndDos.svelte.d.ts +0 -18
  699. package/dist/spectral/BrillouinBandsDos.svelte +0 -248
  700. package/dist/spectral/BrillouinBandsDos.svelte.d.ts +0 -20
  701. package/dist/spectral/Dos.svelte +0 -697
  702. package/dist/spectral/Dos.svelte.d.ts +0 -29
  703. package/dist/spectral/helpers.d.ts +0 -117
  704. package/dist/spectral/helpers.js +0 -1023
  705. package/dist/spectral/index.d.ts +0 -6
  706. package/dist/spectral/index.js +0 -7
  707. package/dist/spectral/types.d.ts +0 -84
  708. package/dist/spectral/types.js +0 -2
  709. package/dist/state.svelte.d.ts +0 -25
  710. package/dist/state.svelte.js +0 -45
  711. package/dist/structure/Arrow.svelte +0 -72
  712. package/dist/structure/Arrow.svelte.d.ts +0 -15
  713. package/dist/structure/AtomLegend.svelte +0 -798
  714. package/dist/structure/AtomLegend.svelte.d.ts +0 -34
  715. package/dist/structure/Bond.svelte +0 -140
  716. package/dist/structure/Bond.svelte.d.ts +0 -9
  717. package/dist/structure/CanvasTooltip.svelte +0 -33
  718. package/dist/structure/CanvasTooltip.svelte.d.ts +0 -12
  719. package/dist/structure/CellSelect.svelte +0 -351
  720. package/dist/structure/CellSelect.svelte.d.ts +0 -13
  721. package/dist/structure/Cylinder.svelte +0 -45
  722. package/dist/structure/Cylinder.svelte.d.ts +0 -10
  723. package/dist/structure/Lattice.svelte +0 -196
  724. package/dist/structure/Lattice.svelte.d.ts +0 -17
  725. package/dist/structure/Structure.svelte +0 -1999
  726. package/dist/structure/Structure.svelte.d.ts +0 -87
  727. package/dist/structure/StructureControls.svelte +0 -1298
  728. package/dist/structure/StructureControls.svelte.d.ts +0 -31
  729. package/dist/structure/StructureExportPane.svelte +0 -251
  730. package/dist/structure/StructureExportPane.svelte.d.ts +0 -17
  731. package/dist/structure/StructureInfoPane.svelte +0 -735
  732. package/dist/structure/StructureInfoPane.svelte.d.ts +0 -19
  733. package/dist/structure/StructureScene.svelte +0 -1905
  734. package/dist/structure/StructureScene.svelte.d.ts +0 -108
  735. package/dist/structure/atom-properties.d.ts +0 -37
  736. package/dist/structure/atom-properties.js +0 -200
  737. package/dist/structure/bond-order-perception.d.ts +0 -13
  738. package/dist/structure/bond-order-perception.js +0 -367
  739. package/dist/structure/bonding.d.ts +0 -42
  740. package/dist/structure/bonding.js +0 -525
  741. package/dist/structure/export.d.ts +0 -20
  742. package/dist/structure/export.js +0 -727
  743. package/dist/structure/index.d.ts +0 -125
  744. package/dist/structure/index.js +0 -171
  745. package/dist/structure/label-placement.d.ts +0 -14
  746. package/dist/structure/label-placement.js +0 -72
  747. package/dist/structure/measure.d.ts +0 -6
  748. package/dist/structure/measure.js +0 -29
  749. package/dist/structure/parse.d.ts +0 -66
  750. package/dist/structure/parse.js +0 -1363
  751. package/dist/structure/partial-occupancy.d.ts +0 -25
  752. package/dist/structure/partial-occupancy.js +0 -99
  753. package/dist/structure/pbc.d.ts +0 -9
  754. package/dist/structure/pbc.js +0 -123
  755. package/dist/structure/supercell.d.ts +0 -8
  756. package/dist/structure/supercell.js +0 -170
  757. package/dist/structure/validation.d.ts +0 -2
  758. package/dist/structure/validation.js +0 -10
  759. package/dist/symmetry/SymmetryStats.svelte +0 -226
  760. package/dist/symmetry/SymmetryStats.svelte.d.ts +0 -21
  761. package/dist/symmetry/WyckoffTable.svelte +0 -113
  762. package/dist/symmetry/WyckoffTable.svelte.d.ts +0 -11
  763. package/dist/symmetry/cell-transform.d.ts +0 -12
  764. package/dist/symmetry/cell-transform.js +0 -91
  765. package/dist/symmetry/index.d.ts +0 -43
  766. package/dist/symmetry/index.js +0 -229
  767. package/dist/symmetry/spacegroups.d.ts +0 -9
  768. package/dist/symmetry/spacegroups.js +0 -394
  769. package/dist/table/HeatmapTable.svelte +0 -1854
  770. package/dist/table/HeatmapTable.svelte.d.ts +0 -49
  771. package/dist/table/ToggleMenu.svelte +0 -376
  772. package/dist/table/ToggleMenu.svelte.d.ts +0 -11
  773. package/dist/table/index.d.ts +0 -74
  774. package/dist/table/index.js +0 -38
  775. package/dist/theme/ThemeControl.svelte +0 -53
  776. package/dist/theme/ThemeControl.svelte.d.ts +0 -9
  777. package/dist/theme/index.d.ts +0 -29
  778. package/dist/theme/index.js +0 -79
  779. package/dist/theme/themes.mjs +0 -285
  780. package/dist/time.d.ts +0 -4
  781. package/dist/time.js +0 -70
  782. package/dist/tooltip/TooltipContent.svelte +0 -58
  783. package/dist/tooltip/TooltipContent.svelte.d.ts +0 -31
  784. package/dist/tooltip/index.d.ts +0 -2
  785. package/dist/tooltip/index.js +0 -2
  786. package/dist/tooltip/types.d.ts +0 -8
  787. package/dist/tooltip/types.js +0 -1
  788. package/dist/trajectory/Trajectory.svelte +0 -1517
  789. package/dist/trajectory/Trajectory.svelte.d.ts +0 -77
  790. package/dist/trajectory/TrajectoryError.svelte +0 -128
  791. package/dist/trajectory/TrajectoryError.svelte.d.ts +0 -13
  792. package/dist/trajectory/TrajectoryExportPane.svelte +0 -357
  793. package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +0 -17
  794. package/dist/trajectory/TrajectoryInfoPane.svelte +0 -313
  795. package/dist/trajectory/TrajectoryInfoPane.svelte.d.ts +0 -17
  796. package/dist/trajectory/constants.d.ts +0 -6
  797. package/dist/trajectory/constants.js +0 -7
  798. package/dist/trajectory/extract.d.ts +0 -5
  799. package/dist/trajectory/extract.js +0 -162
  800. package/dist/trajectory/format-detect.d.ts +0 -9
  801. package/dist/trajectory/format-detect.js +0 -76
  802. package/dist/trajectory/frame-reader.d.ts +0 -17
  803. package/dist/trajectory/frame-reader.js +0 -332
  804. package/dist/trajectory/helpers.d.ts +0 -14
  805. package/dist/trajectory/helpers.js +0 -172
  806. package/dist/trajectory/index.d.ts +0 -63
  807. package/dist/trajectory/index.js +0 -126
  808. package/dist/trajectory/parse/ase.d.ts +0 -2
  809. package/dist/trajectory/parse/ase.js +0 -73
  810. package/dist/trajectory/parse/hdf5.d.ts +0 -2
  811. package/dist/trajectory/parse/hdf5.js +0 -127
  812. package/dist/trajectory/parse/index.d.ts +0 -12
  813. package/dist/trajectory/parse/index.js +0 -299
  814. package/dist/trajectory/parse/lammps.d.ts +0 -5
  815. package/dist/trajectory/parse/lammps.js +0 -179
  816. package/dist/trajectory/parse/vasp.d.ts +0 -2
  817. package/dist/trajectory/parse/vasp.js +0 -68
  818. package/dist/trajectory/parse/xyz.d.ts +0 -2
  819. package/dist/trajectory/parse/xyz.js +0 -110
  820. package/dist/trajectory/plotting.d.ts +0 -28
  821. package/dist/trajectory/plotting.js +0 -423
  822. package/dist/trajectory/types.d.ts +0 -11
  823. package/dist/trajectory/types.js +0 -1
  824. package/dist/utils.d.ts +0 -5
  825. package/dist/utils.js +0 -36
  826. package/dist/xrd/XrdPlot.svelte +0 -615
  827. package/dist/xrd/XrdPlot.svelte.d.ts +0 -28
  828. package/dist/xrd/broadening.d.ts +0 -20
  829. package/dist/xrd/broadening.js +0 -97
  830. package/dist/xrd/calc-xrd.d.ts +0 -37
  831. package/dist/xrd/calc-xrd.js +0 -337
  832. package/dist/xrd/index.d.ts +0 -37
  833. package/dist/xrd/index.js +0 -4
  834. package/dist/xrd/parse.d.ts +0 -13
  835. package/dist/xrd/parse.js +0 -749
  836. /package/dist/{EmptyState.svelte → src/lib/EmptyState.svelte} +0 -0
  837. /package/dist/{Icon.svelte → src/lib/Icon.svelte} +0 -0
  838. /package/dist/{app.css → src/lib/app.css} +0 -0
  839. /package/dist/{chempot-diagram → src/lib/chempot-diagram}/ChemPotScene3D.svelte +0 -0
  840. /package/dist/{colors → src/lib/colors}/alloy-colors.json +0 -0
  841. /package/dist/{colors → src/lib/colors}/dark-mode-colors.json +0 -0
  842. /package/dist/{colors → src/lib/colors}/jmol-colors.json +0 -0
  843. /package/dist/{colors → src/lib/colors}/muted-colors.json +0 -0
  844. /package/dist/{colors → src/lib/colors}/pastel-colors.json +0 -0
  845. /package/dist/{colors → src/lib/colors}/vesta-colors.json +0 -0
  846. /package/dist/{element → src/lib/element}/Nucleus.svelte +0 -0
  847. /package/dist/{element → src/lib/element}/data.json +0 -0
  848. /package/dist/{element → src/lib/element}/data.json.gz +0 -0
  849. /package/dist/{element → src/lib/element}/data.schema.json +0 -0
  850. /package/dist/{element-image-urls.json → src/lib/element-image-urls.json} +0 -0
  851. /package/dist/{feedback → src/lib/feedback}/Spinner.svelte +0 -0
  852. /package/dist/{feedback → src/lib/feedback}/StatusMessage.svelte +0 -0
  853. /package/dist/{periodic-table → src/lib/periodic-table}/TableInset.svelte +0 -0
  854. /package/dist/{plot → src/lib/plot}/ReferenceLine.svelte +0 -0
  855. /package/dist/{xrd → src/lib/xrd}/atomic_scattering_params.json +0 -0
@@ -1,1298 +0,0 @@
1
- <script lang="ts">
2
- import type { ColorSchemeName, D3InterpolateName } from '../colors'
3
- import { AXIS_COLORS, ELEMENT_COLOR_SCHEMES } from '../colors'
4
- import IsosurfaceControls from '../isosurface/IsosurfaceControls.svelte'
5
- import type { IsosurfaceSettings, VolumetricData } from '../isosurface/types'
6
- import { format_num } from '../labels'
7
- import { SettingsSection } from '../layout'
8
- import { to_degrees, to_radians } from '../math'
9
- import DraggablePane from '../overlays/DraggablePane.svelte'
10
- import { ColorScaleSelect } from '../plot'
11
- import type { VectorLayerConfig } from '../settings'
12
- import { DEFAULTS, SETTINGS_CONFIG, VECTOR_COLOR_MODES } from '../settings'
13
- import type { AnyStructure } from './'
14
- import {
15
- default_vector_configs,
16
- get_structure_vector_keys,
17
- Lattice,
18
- StructureScene,
19
- VECTOR_PALETTE,
20
- } from './'
21
- import type { AtomColorConfig } from './atom-properties'
22
- import { is_valid_supercell_input } from './supercell'
23
- import type { CellType } from '../symmetry'
24
- import type { MoyoDataset } from '@spglib/moyo-wasm'
25
- import type { ComponentProps } from 'svelte'
26
- import Select from 'svelte-multiselect'
27
- import { tooltip } from 'svelte-multiselect/attachments'
28
-
29
- let {
30
- controls_open = $bindable(false),
31
- scene_props = $bindable({}),
32
- lattice_props = $bindable({
33
- show_cell_vectors: DEFAULTS.structure.show_cell_vectors,
34
- cell_edge_color: DEFAULTS.structure.cell_edge_color,
35
- cell_edge_opacity: DEFAULTS.structure.cell_edge_opacity,
36
- cell_surface_color: DEFAULTS.structure.cell_surface_color,
37
- cell_surface_opacity: DEFAULTS.structure.cell_surface_opacity,
38
- cell_edge_width: DEFAULTS.structure.cell_edge_width,
39
- }),
40
- show_image_atoms = $bindable(DEFAULTS.structure.show_image_atoms),
41
- supercell_scaling = $bindable(`1x1x1`),
42
- background_color = $bindable(),
43
- background_opacity = $bindable(DEFAULTS.background_opacity),
44
- color_scheme = $bindable(DEFAULTS.color_scheme),
45
- atom_color_config = $bindable({
46
- mode: DEFAULTS.structure.atom_color_mode,
47
- scale: DEFAULTS.structure.atom_color_scale,
48
- scale_type: DEFAULTS.structure.atom_color_scale_type,
49
- }),
50
- structure = undefined,
51
- supercell_loading = $bindable(false),
52
- sym_data = null,
53
- cell_type = $bindable(`original`),
54
- volumetric_data = $bindable<VolumetricData[]>(),
55
- isosurface_settings = $bindable<IsosurfaceSettings>(),
56
- active_volume_idx = $bindable(0),
57
- pane_props = {},
58
- toggle_props = {},
59
- ...rest
60
- }: Omit<ComponentProps<typeof DraggablePane>, `children`> & {
61
- controls_open?: boolean // Control pane state
62
- scene_props?: ComponentProps<typeof StructureScene>
63
- lattice_props?: ComponentProps<typeof Lattice>
64
- show_image_atoms?: boolean
65
- supercell_scaling?: string
66
- background_color?: string
67
- background_opacity?: number
68
- color_scheme?: string
69
- atom_color_config?: Partial<AtomColorConfig>
70
- structure?: AnyStructure
71
- supercell_loading?: boolean
72
- sym_data?: MoyoDataset | null
73
- cell_type?: CellType // Cell type: original, conventional, or primitive
74
- volumetric_data?: VolumetricData[] // Volumetric data volumes for isosurface controls
75
- isosurface_settings?: IsosurfaceSettings // Isosurface rendering settings
76
- active_volume_idx?: number // Active volume index
77
- pane_props?: ComponentProps<typeof DraggablePane>[`pane_props`]
78
- toggle_props?: ComponentProps<typeof DraggablePane>[`toggle_props`]
79
- } = $props()
80
-
81
- // Color scheme selection state
82
- let color_scheme_selected = $state([color_scheme])
83
- $effect(() => {
84
- if (color_scheme_selected.length > 0) {
85
- color_scheme = color_scheme_selected[0] as string
86
- }
87
- })
88
-
89
- // Atom color config selection state
90
- let color_scale_selected = $state<D3InterpolateName[]>([
91
- atom_color_config.scale || DEFAULTS.structure.atom_color_scale,
92
- ])
93
-
94
- // Sync local selection to config
95
- $effect(() => {
96
- if (
97
- color_scale_selected[0] && color_scale_selected[0] !== atom_color_config.scale
98
- ) atom_color_config.scale = color_scale_selected[0]
99
- })
100
- // Sync config to local selection (for external updates)
101
- $effect(() => {
102
- if (
103
- atom_color_config.scale && atom_color_config.scale !== color_scale_selected[0]
104
- ) color_scale_selected = [atom_color_config.scale]
105
- })
106
- // Auto-set scale_type based on mode
107
- $effect(() => {
108
- if (atom_color_config.mode === `wyckoff`) {
109
- atom_color_config.scale_type = `categorical`
110
- } else if (atom_color_config.mode === `coordination`) {
111
- atom_color_config.scale_type = `continuous`
112
- }
113
- })
114
-
115
- const hex_color_pattern = /^#[0-9a-f]{3}([0-9a-f]{3})?$/i
116
- const color_mix_pattern =
117
- /^color-mix\(in srgb,\s*(#[0-9a-f]{3}(?:[0-9a-f]{3})?)\s+(\d+(?:\.\d+)?)%,\s*transparent\)$/i
118
-
119
- const as_hex_color = (color: string | undefined, fallback: string): string =>
120
- color?.match(hex_color_pattern)?.[0] ?? fallback
121
-
122
- const parse_label_bg_color = (
123
- color: string | undefined,
124
- fallback_hex_color: string,
125
- fallback_opacity: number,
126
- ): { hex_color: string; opacity: number } => {
127
- if (color === `transparent`) {
128
- return { hex_color: fallback_hex_color, opacity: 0 }
129
- }
130
- const color_mix = color?.match(color_mix_pattern)
131
- if (color_mix) {
132
- const percentage = Math.max(0, Math.min(100, Number(color_mix[2])))
133
- return {
134
- hex_color: color_mix[1],
135
- opacity: percentage / 100,
136
- }
137
- }
138
- const hex_color = color?.match(hex_color_pattern)?.[0]
139
- return hex_color === undefined
140
- ? { hex_color: fallback_hex_color, opacity: fallback_opacity }
141
- : { hex_color, opacity: 1 }
142
- }
143
-
144
- const default_site_label_color = as_hex_color(
145
- DEFAULTS.structure.site_label_color,
146
- `#111111`,
147
- )
148
- const default_site_label_bg = parse_label_bg_color(
149
- DEFAULTS.structure.site_label_bg_color,
150
- `#000000`,
151
- 0,
152
- )
153
- const initial_site_label_bg = parse_label_bg_color(
154
- scene_props.site_label_bg_color,
155
- default_site_label_bg.hex_color,
156
- default_site_label_bg.opacity,
157
- )
158
-
159
- // Atom label color management
160
- let site_label_hex_color = $state(
161
- as_hex_color(scene_props.site_label_color, default_site_label_color),
162
- )
163
- let site_label_bg_hex_color = $state(initial_site_label_bg.hex_color)
164
- let site_label_background_opacity = $state(initial_site_label_bg.opacity)
165
- let last_synced_site_label_color = scene_props.site_label_color
166
- let last_synced_site_label_bg_color = scene_props.site_label_bg_color
167
-
168
- $effect(() => {
169
- const external_color_changed =
170
- scene_props.site_label_color !== last_synced_site_label_color
171
- const external_bg_changed =
172
- scene_props.site_label_bg_color !== last_synced_site_label_bg_color
173
-
174
- if (external_color_changed) {
175
- site_label_hex_color = as_hex_color(
176
- scene_props.site_label_color,
177
- default_site_label_color,
178
- )
179
- }
180
- if (external_bg_changed) {
181
- const next_bg = parse_label_bg_color(
182
- scene_props.site_label_bg_color,
183
- default_site_label_bg.hex_color,
184
- default_site_label_bg.opacity,
185
- )
186
- site_label_bg_hex_color = next_bg.hex_color
187
- site_label_background_opacity = next_bg.opacity
188
- }
189
-
190
- if (!external_color_changed) scene_props.site_label_color = site_label_hex_color
191
- if (!external_bg_changed) {
192
- scene_props.site_label_bg_color =
193
- `color-mix(in srgb, ${site_label_bg_hex_color} ${
194
- format_num(site_label_background_opacity, `.1~%`)
195
- }, transparent)`
196
- }
197
-
198
- last_synced_site_label_color = scene_props.site_label_color
199
- last_synced_site_label_bg_color = scene_props.site_label_bg_color
200
- })
201
-
202
- // Ensure site_label_offset is always available
203
- scene_props.site_label_offset ??= [...DEFAULTS.structure.site_label_offset]
204
-
205
- // Collect available vector property keys from the structure
206
- let available_vector_keys = $derived(
207
- structure ? get_structure_vector_keys(structure) : [],
208
- )
209
- function is_key_visible(key: string): boolean {
210
- return scene_props.vector_configs?.[key]?.visible !== false
211
- }
212
-
213
- let any_vectors_visible = $derived(available_vector_keys.some(is_key_visible))
214
-
215
- function update_vector_config(key: string, patch: Partial<VectorLayerConfig>) {
216
- const configs = { ...scene_props.vector_configs }
217
- configs[key] = {
218
- ...(configs[key] ?? { visible: true, color: null, scale: null }),
219
- ...patch,
220
- }
221
- scene_props.vector_configs = configs
222
- }
223
-
224
- // Detect if structure has lattice (can create supercells)
225
- let has_lattice = $derived(
226
- structure && `lattice` in structure && structure.lattice !== undefined,
227
- )
228
-
229
- // Validate supercell input
230
- let supercell_input_valid = $derived(is_valid_supercell_input(supercell_scaling))
231
-
232
- // Ensure rotation is always an array
233
- $effect(() => {
234
- scene_props.rotation ??= [...DEFAULTS.structure.rotation]
235
- })
236
-
237
- let rotation_degrees = $derived(
238
- scene_props.rotation?.map((rad) => {
239
- const deg = to_degrees(rad)
240
- // Convert to [0, 360] range for UI display
241
- return ((deg % 360) + 360) % 360
242
- }) ?? [0, 0, 0],
243
- )
244
-
245
- function update_rotation(axis: `x` | `y` | `z`, degrees: number) {
246
- scene_props.rotation ??= [0, 0, 0]
247
- const axis_index = { x: 0, y: 1, z: 2 }[axis]
248
- const clamped = Math.max(0, Math.min(360, degrees))
249
- const norm = ((clamped % 360) + 360) % 360
250
- scene_props.rotation[axis_index] = to_radians(norm)
251
- // Trigger reactivity by creating new array
252
- scene_props.rotation = [...scene_props.rotation]
253
- }
254
-
255
- // Helper function to get example set of colors from an element color scheme
256
- function get_representative_colors(scheme_name: string): string[] {
257
- const scheme = ELEMENT_COLOR_SCHEMES[scheme_name as ColorSchemeName]
258
- if (!scheme) return []
259
-
260
- // Get colors for common elements: H, C, N, O, Fe, Ca, Si, Al
261
- const sample_elements = [`H`, `C`, `N`, `O`, `Fe`, `Ca`, `Si`, `Al`]
262
- return sample_elements
263
- .slice(0, 4) // Take first 4
264
- .map((el) => scheme[el] || scheme.H || `#cccccc`)
265
- .filter(Boolean)
266
- }
267
- </script>
268
-
269
- <DraggablePane
270
- bind:show={controls_open}
271
- resizable="both"
272
- pane_props={{
273
- ...pane_props,
274
- class: `controls-pane ${pane_props?.class ?? ``}`,
275
- style: `--pane-max-height: 70vh; ${pane_props?.style ?? ``}`,
276
- }}
277
- toggle_props={{
278
- title: controls_open ? `` : `Structure controls`,
279
- ...toggle_props,
280
- class: `structure-controls-toggle ${toggle_props?.class ?? ``}`,
281
- }}
282
- {...rest}
283
- >
284
- {#if volumetric_data?.length && isosurface_settings}
285
- <IsosurfaceControls
286
- bind:settings={isosurface_settings}
287
- volumes={volumetric_data}
288
- bind:active_volume_idx
289
- />
290
- {/if}
291
-
292
- <SettingsSection
293
- title="Visibility"
294
- current_values={{
295
- show_atoms: scene_props.show_atoms,
296
- show_bonds: scene_props.show_bonds,
297
- show_image_atoms,
298
- show_site_labels: scene_props.show_site_labels,
299
- show_site_indices: scene_props.show_site_indices,
300
- vector_configs: scene_props.vector_configs,
301
- show_cell_vectors: lattice_props.show_cell_vectors,
302
- }}
303
- on_reset={() => {
304
- scene_props.show_atoms = DEFAULTS.structure.show_atoms
305
- scene_props.show_bonds = DEFAULTS.structure.show_bonds
306
- scene_props.show_site_labels = DEFAULTS.structure.show_site_labels
307
- scene_props.show_site_indices = DEFAULTS.structure.show_site_indices
308
- scene_props.vector_configs = default_vector_configs(available_vector_keys)
309
- show_image_atoms = DEFAULTS.structure.show_image_atoms
310
- lattice_props.show_cell_vectors = DEFAULTS.structure.show_cell_vectors
311
- }}
312
- style="display: flex; flex-direction: row; flex-wrap: wrap; gap: 12pt"
313
- >
314
- Show <label
315
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.show_atoms.description })}
316
- style="gap: 6pt"
317
- >
318
- <input type="checkbox" bind:checked={scene_props.show_atoms} />
319
- Atoms
320
- </label>
321
- <label
322
- {@attach tooltip({
323
- content: SETTINGS_CONFIG.structure.show_image_atoms.description,
324
- })}
325
- style="gap: 6pt"
326
- >
327
- <input type="checkbox" bind:checked={show_image_atoms} />
328
- Image Atoms
329
- </label>
330
- <label
331
- {@attach tooltip({
332
- content: SETTINGS_CONFIG.structure.show_site_labels.description,
333
- })}
334
- style="gap: 6pt"
335
- >
336
- <input type="checkbox" bind:checked={scene_props.show_site_labels} />
337
- Site Labels
338
- </label>
339
- <label
340
- {@attach tooltip({
341
- content: SETTINGS_CONFIG.structure.show_site_indices.description,
342
- })}
343
- style="gap: 6pt"
344
- >
345
- <input type="checkbox" bind:checked={scene_props.show_site_indices} />
346
- Site Indices
347
- </label>
348
- {#if available_vector_keys.length > 0}
349
- {#each available_vector_keys as key, idx (key)}
350
- <label
351
- {@attach tooltip({
352
- content: `Toggle ${key} vectors`,
353
- })}
354
- style="gap: 4pt"
355
- >
356
- <input
357
- type="checkbox"
358
- checked={is_key_visible(key)}
359
- onchange={() => update_vector_config(key, { visible: !is_key_visible(key) })}
360
- />
361
- <input
362
- type="color"
363
- aria-label={`${key} vector color`}
364
- value={scene_props.vector_configs?.[key]?.color ??
365
- VECTOR_PALETTE[idx % VECTOR_PALETTE.length]}
366
- onchange={(evt) =>
367
- update_vector_config(key, {
368
- color: (evt.target as HTMLInputElement).value,
369
- })}
370
- style="width: 22px; height: 22px; padding: 0; border: none; cursor: pointer"
371
- />
372
- {key}
373
- {#if scene_props.vector_configs?.[key]?.color != null}
374
- <button
375
- type="button"
376
- aria-label={`Reset ${key} color to default`}
377
- onclick={() => update_vector_config(key, { color: null })}
378
- style="padding: 0 3pt; font-size: 0.8em; line-height: 1; cursor: pointer"
379
- >
380
- ×
381
- </button>
382
- {/if}
383
- </label>
384
- {/each}
385
- {/if}
386
- <label style="gap: 6pt">
387
- <input type="checkbox" bind:checked={lattice_props.show_cell_vectors} />
388
- Lattice Vectors
389
- </label>
390
- <label
391
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.show_bonds.description })}
392
- style="gap: 6pt"
393
- >
394
- Bonds:
395
- <select bind:value={scene_props.show_bonds}>
396
- {#each Object.entries(SETTINGS_CONFIG.structure.show_bonds.enum ?? {}) as
397
- [value, label]
398
- (value)
399
- }
400
- <option {value}>{label}</option>
401
- {/each}
402
- </select>
403
- </label>
404
- </SettingsSection>
405
-
406
- <SettingsSection
407
- title="Camera"
408
- current_values={{
409
- camera_projection: scene_props.camera_projection,
410
- auto_rotate: scene_props.auto_rotate,
411
- rotate_speed: scene_props.rotate_speed,
412
- zoom_speed: scene_props.zoom_speed,
413
- pan_speed: scene_props.pan_speed,
414
- zoom_to_cursor: scene_props.zoom_to_cursor,
415
- rotation_damping: scene_props.rotation_damping,
416
- rotation: scene_props.rotation,
417
- }}
418
- on_reset={() => {
419
- scene_props.camera_projection = DEFAULTS.structure.camera_projection
420
- scene_props.auto_rotate = DEFAULTS.structure.auto_rotate
421
- scene_props.rotate_speed = DEFAULTS.structure.rotate_speed
422
- scene_props.zoom_speed = DEFAULTS.structure.zoom_speed
423
- scene_props.pan_speed = DEFAULTS.structure.pan_speed
424
- scene_props.zoom_to_cursor = DEFAULTS.structure.zoom_to_cursor
425
- scene_props.rotation_damping = DEFAULTS.structure.rotation_damping
426
- scene_props.rotation = [...DEFAULTS.structure.rotation]
427
- }}
428
- >
429
- <label>
430
- <span
431
- {@attach tooltip({
432
- content: SETTINGS_CONFIG.structure.camera_projection.description,
433
- })}
434
- >
435
- Projection
436
- </span>
437
- <select bind:value={scene_props.camera_projection}>
438
- {#each Object.entries(
439
- SETTINGS_CONFIG.structure.camera_projection.enum ?? {},
440
- ) as
441
- [value, label]
442
- (value)
443
- }
444
- <option {value}>{label}</option>
445
- {/each}
446
- </select>
447
- </label>
448
- <label
449
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.auto_rotate.description })}
450
- >
451
- Auto-rotate speed
452
- <input
453
- type="number"
454
- min={0}
455
- max={2}
456
- step={0.01}
457
- bind:value={scene_props.auto_rotate}
458
- />
459
- <input
460
- type="range"
461
- min={0}
462
- max={2}
463
- step={0.01}
464
- bind:value={scene_props.auto_rotate}
465
- />
466
- </label>
467
- <label
468
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.rotate_speed.description })}
469
- >
470
- Rotate speed
471
- <input
472
- type="number"
473
- min={0}
474
- max={2}
475
- step={0.05}
476
- bind:value={scene_props.rotate_speed}
477
- />
478
- <input
479
- type="range"
480
- min={0}
481
- max={2}
482
- step={0.05}
483
- bind:value={scene_props.rotate_speed}
484
- />
485
- </label>
486
- <label
487
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_speed.description })}
488
- >
489
- Zoom speed
490
- <input
491
- type="number"
492
- min={0.1}
493
- max={0.8}
494
- step={0.02}
495
- bind:value={scene_props.zoom_speed}
496
- />
497
- <input
498
- type="range"
499
- min={0.1}
500
- max={0.8}
501
- step={0.02}
502
- bind:value={scene_props.zoom_speed}
503
- />
504
- </label>
505
- <label
506
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.pan_speed.description })}
507
- >
508
- Pan speed
509
- <input
510
- type="number"
511
- min={0}
512
- max={2}
513
- step={0.01}
514
- bind:value={scene_props.pan_speed}
515
- />
516
- <input
517
- type="range"
518
- min={0}
519
- max={2}
520
- step={0.01}
521
- bind:value={scene_props.pan_speed}
522
- />
523
- </label>
524
- <label
525
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.zoom_to_cursor.description })}
526
- >
527
- <input type="checkbox" bind:checked={scene_props.zoom_to_cursor} />
528
- <span>Zoom to cursor</span>
529
- </label>
530
- <label
531
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.rotation_damping.description })}
532
- >
533
- Rotation damping
534
- <input
535
- type="number"
536
- min={0.01}
537
- max={0.3}
538
- step={0.01}
539
- bind:value={scene_props.rotation_damping}
540
- />
541
- <input
542
- type="range"
543
- min={0.01}
544
- max={0.3}
545
- step={0.01}
546
- bind:value={scene_props.rotation_damping}
547
- />
548
- </label>
549
-
550
- Axis Rotation
551
- <div class="rotation-axes">
552
- {#each AXIS_COLORS as [axis, color], idx (axis)}
553
- <div>
554
- <div
555
- {@attach tooltip()}
556
- title="{axis}-axis rotation in degrees"
557
- style:color
558
- >
559
- <span>{axis.toUpperCase()} = </span>
560
- <input
561
- type="number"
562
- min={0}
563
- max={360}
564
- step={1}
565
- value={rotation_degrees[idx].toFixed(0)}
566
- oninput={(event) =>
567
- update_rotation(axis, Number(event.currentTarget.value))}
568
- style:color
569
- style="margin: 0"
570
- />
571
- °
572
- </div>
573
- <input
574
- type="range"
575
- min={0}
576
- max={360}
577
- step={1}
578
- value={rotation_degrees[idx].toFixed(0)}
579
- oninput={(event) => update_rotation(axis, Number(event.currentTarget.value))}
580
- style:--thumb-color={color}
581
- style="width: 100%"
582
- />
583
- </div>
584
- {/each}
585
- </div>
586
- </SettingsSection>
587
-
588
- <SettingsSection
589
- title="Atoms"
590
- current_values={{
591
- atom_radius: scene_props.atom_radius,
592
- same_size_atoms: scene_props.same_size_atoms,
593
- color_scheme,
594
- ...atom_color_config,
595
- }}
596
- on_reset={() => {
597
- scene_props.atom_radius = DEFAULTS.structure.atom_radius
598
- scene_props.same_size_atoms = DEFAULTS.structure.same_size_atoms
599
- color_scheme = DEFAULTS.color_scheme
600
- color_scheme_selected = [DEFAULTS.color_scheme]
601
- atom_color_config.mode = DEFAULTS.structure.atom_color_mode
602
- atom_color_config.scale = DEFAULTS.structure.atom_color_scale
603
- atom_color_config.scale_type = DEFAULTS.structure.atom_color_scale_type
604
- color_scale_selected = [DEFAULTS.structure.atom_color_scale]
605
- }}
606
- >
607
- <label
608
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.atom_radius.description })}
609
- >
610
- Radius <small>(Å)</small>
611
- <input
612
- type="number"
613
- min={0.2}
614
- max={2}
615
- step={0.05}
616
- bind:value={scene_props.atom_radius}
617
- />
618
- <input
619
- type="range"
620
- min={0.2}
621
- max={2}
622
- step={0.05}
623
- bind:value={scene_props.atom_radius}
624
- />
625
- </label>
626
- <label
627
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.same_size_atoms.description })}
628
- >
629
- Same size atoms
630
- <input type="checkbox" bind:checked={scene_props.same_size_atoms} />
631
- </label>
632
- <label
633
- {@attach tooltip({ content: SETTINGS_CONFIG.color_scheme.description })}
634
- >
635
- Color scheme
636
- <Select
637
- options={Object.keys(ELEMENT_COLOR_SCHEMES)}
638
- maxSelect={1}
639
- minSelect={1}
640
- bind:selected={color_scheme_selected}
641
- liOptionStyle="padding: 3pt 6pt;"
642
- liSelectedStyle="background-color: transparent;"
643
- ulSelectedStyle="display: contents;"
644
- inputStyle="flex: none; min-width: 0; width: 0; opacity: 0;"
645
- style="flex: 1; min-width: 0; border: none; margin-left: 4pt"
646
- aria-label="Color scheme"
647
- >
648
- {#snippet children({ option })}
649
- {@const option_style =
650
- `display: flex; align-items: center; gap: 6pt; justify-content: space-between;`}
651
- <div style={option_style}>
652
- {option}
653
- <div style="display: flex; gap: 3pt">
654
- {#each get_representative_colors(String(option)) as color (color)}
655
- {@const color_style =
656
- `width: 15px; height: 15px; border-radius: 2px; background: ${color};`}
657
- <div style={color_style}></div>
658
- {/each}
659
- </div>
660
- </div>
661
- {/snippet}
662
- </Select>
663
- </label>
664
- <label
665
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.atom_color_mode.description })}
666
- >
667
- Atom coloring
668
- <select bind:value={atom_color_config.mode}>
669
- {#each Object.entries(SETTINGS_CONFIG.structure.atom_color_mode.enum || {}) as
670
- [value, label]
671
- (value)
672
- }
673
- <option {value} disabled={!sym_data && value === `wyckoff`}>{label}</option>
674
- {/each}
675
- </select>
676
- </label>
677
- {#if atom_color_config.mode !== `element`}
678
- <label
679
- {@attach tooltip({ content: SETTINGS_CONFIG.structure.atom_color_scale.description })}
680
- >
681
- Color scale
682
- <ColorScaleSelect
683
- bind:value={atom_color_config.scale}
684
- bind:selected={color_scale_selected}
685
- colorbar={{
686
- tick_labels: 0,
687
- wrapper_style: `width: 100%;`,
688
- }}
689
- style="flex: 1; min-width: 0; border: none"
690
- aria-label="Color scale"
691
- />
692
- </label>
693
- {/if}
694
- </SettingsSection>
695
-
696
- {#if scene_props.show_site_labels || scene_props.show_site_indices}
697
- <SettingsSection
698
- title="Labels"
699
- current_values={{
700
- site_label_size: scene_props.site_label_size,
701
- site_label_hex_color,
702
- site_label_bg_hex_color,
703
- site_label_background_opacity,
704
- site_label_padding: scene_props.site_label_padding,
705
- site_label_offset: scene_props.site_label_offset,
706
- }}
707
- on_reset={() => {
708
- scene_props.site_label_size = DEFAULTS.structure.site_label_size
709
- scene_props.site_label_padding = DEFAULTS.structure.site_label_padding
710
- scene_props.site_label_offset = [...DEFAULTS.structure.site_label_offset]
711
- site_label_hex_color = default_site_label_color
712
- site_label_bg_hex_color = default_site_label_bg.hex_color
713
- site_label_background_opacity = default_site_label_bg.opacity
714
- }}
715
- >
716
- <div class="pane-row">
717
- <label>
718
- Color
719
- <input
720
- type="color"
721
- aria-label="Site label color"
722
- bind:value={site_label_hex_color}
723
- />
724
- </label>
725
- <label>
726
- Size
727
- <input
728
- type="range"
729
- min="0.5"
730
- max="2"
731
- step="0.1"
732
- bind:value={scene_props.site_label_size}
733
- />
734
- </label>
735
- </div>
736
- <div class="pane-row">
737
- <label>
738
- Background
739
- <input
740
- type="color"
741
- aria-label="Site label background color"
742
- bind:value={site_label_bg_hex_color}
743
- />
744
- </label>
745
- <label>
746
- Opacity
747
- <input
748
- type="number"
749
- min="0"
750
- max="1"
751
- step="0.01"
752
- aria-label="Site label background opacity"
753
- bind:value={site_label_background_opacity}
754
- />
755
- <input
756
- type="range"
757
- min="0"
758
- max="1"
759
- step="0.01"
760
- aria-label="Site label background opacity slider"
761
- bind:value={site_label_background_opacity}
762
- />
763
- </label>
764
- </div>
765
- <div class="pane-row">
766
- <label>
767
- Padding
768
- <input
769
- type="number"
770
- min="0"
771
- max="10"
772
- step="1"
773
- bind:value={scene_props.site_label_padding}
774
- />
775
- <input
776
- type="range"
777
- min="0"
778
- max="10"
779
- step="1"
780
- bind:value={scene_props.site_label_padding}
781
- />
782
- </label>
783
- </div>
784
- <div class="pane-row">
785
- Offset
786
- {#each [`X`, `Y`, `Z`] as axis, idx (axis)}
787
- <label>
788
- {axis}
789
- <input
790
- type="number"
791
- min="-1"
792
- max="1"
793
- step="0.1"
794
- bind:value={scene_props.site_label_offset![idx]}
795
- />
796
- </label>
797
- {/each}
798
- </div>
799
- </SettingsSection>
800
- {/if}
801
-
802
- {#if available_vector_keys.length > 0 && any_vectors_visible}
803
- <SettingsSection
804
- title="Site Vectors"
805
- current_values={{
806
- vector_scale: scene_props.vector_scale,
807
- vector_color: scene_props.vector_color,
808
- vector_normalize: scene_props.vector_normalize,
809
- vector_uniform_thickness: scene_props.vector_uniform_thickness,
810
- vector_color_mode: scene_props.vector_color_mode,
811
- vector_color_scale: scene_props.vector_color_scale,
812
- vector_origin_gap: scene_props.vector_origin_gap,
813
- }}
814
- on_reset={() => {
815
- scene_props.vector_scale = DEFAULTS.structure.vector_scale
816
- scene_props.vector_color = DEFAULTS.structure.vector_color
817
- scene_props.vector_color_mode = DEFAULTS.structure.vector_color_mode
818
- scene_props.vector_color_scale = DEFAULTS.structure.vector_color_scale
819
- scene_props.vector_normalize = DEFAULTS.structure.vector_normalize
820
- scene_props.vector_uniform_thickness =
821
- DEFAULTS.structure.vector_uniform_thickness
822
- scene_props.vector_origin_gap = DEFAULTS.structure.vector_origin_gap
823
- for (const key of available_vector_keys) {
824
- update_vector_config(key, { scale: null })
825
- }
826
- }}
827
- >
828
- <label>
829
- Global Scale
830
- <input
831
- type="number"
832
- min={0.001}
833
- max={5}
834
- step={0.001}
835
- bind:value={scene_props.vector_scale}
836
- />
837
- <input
838
- type="range"
839
- min={0.001}
840
- max={5}
841
- step={0.001}
842
- bind:value={scene_props.vector_scale}
843
- />
844
- </label>
845
- <label
846
- {@attach tooltip({
847
- content: SETTINGS_CONFIG.structure.vector_normalize.description,
848
- })}
849
- style="gap: 6pt"
850
- >
851
- <input type="checkbox" bind:checked={scene_props.vector_normalize} />
852
- Normalize
853
- </label>
854
- <label
855
- {@attach tooltip({
856
- content: SETTINGS_CONFIG.structure.vector_uniform_thickness.description,
857
- })}
858
- style="gap: 6pt"
859
- >
860
- <input type="checkbox" bind:checked={scene_props.vector_uniform_thickness} />
861
- Uniform Thickness
862
- </label>
863
- <label
864
- {@attach tooltip({
865
- content: SETTINGS_CONFIG.structure.vector_color_mode.description,
866
- })}
867
- >
868
- Color Mode
869
- <select bind:value={scene_props.vector_color_mode}>
870
- {#each VECTOR_COLOR_MODES as mode (mode)}
871
- <option value={mode}>{mode.replaceAll(`_`, ` `)}</option>
872
- {/each}
873
- </select>
874
- </label>
875
- {#if scene_props.vector_color_mode === `magnitude`}
876
- <label>
877
- Scale
878
- <ColorScaleSelect
879
- bind:value={scene_props.vector_color_scale}
880
- style="max-width: 180px"
881
- />
882
- </label>
883
- {/if}
884
- {#if scene_props.vector_color_mode === `uniform`}
885
- <label>
886
- Color
887
- <input type="color" bind:value={scene_props.vector_color} />
888
- </label>
889
- {/if}
890
- {#if available_vector_keys.length > 1}
891
- <label
892
- {@attach tooltip({
893
- content: SETTINGS_CONFIG.structure.vector_origin_gap.description,
894
- })}
895
- >
896
- Origin Gap
897
- <input
898
- type="number"
899
- min={0}
900
- max={0.5}
901
- step={0.02}
902
- bind:value={scene_props.vector_origin_gap}
903
- />
904
- <input
905
- type="range"
906
- min={0}
907
- max={0.5}
908
- step={0.02}
909
- bind:value={scene_props.vector_origin_gap}
910
- />
911
- </label>
912
- {#each available_vector_keys as key (key)}
913
- {#if is_key_visible(key)}
914
- {@const on_scale = (evt: Event) => {
915
- const parsed = parseFloat((evt.target as HTMLInputElement).value)
916
- update_vector_config(key, { scale: Number.isNaN(parsed) ? 1.0 : parsed })
917
- }}
918
- <label
919
- {@attach tooltip({
920
- content:
921
- `Scale multiplier for ${key} arrows (applied on top of global scale)`,
922
- })}
923
- >
924
- {key} scale
925
- <input
926
- type="number"
927
- min={0.1}
928
- max={5}
929
- step={0.1}
930
- value={scene_props.vector_configs?.[key]?.scale ?? 1.0}
931
- onchange={on_scale}
932
- />
933
- <input
934
- type="range"
935
- min={0.1}
936
- max={5}
937
- step={0.1}
938
- value={scene_props.vector_configs?.[key]?.scale ?? 1.0}
939
- oninput={on_scale}
940
- />
941
- </label>
942
- {/if}
943
- {/each}
944
- {/if}
945
- </SettingsSection>
946
- {/if}
947
-
948
- {#if has_lattice}
949
- <SettingsSection
950
- title="Cell"
951
- current_values={{
952
- cell_edge_color: lattice_props.cell_edge_color,
953
- cell_edge_opacity: lattice_props.cell_edge_opacity,
954
- cell_surface_color: lattice_props.cell_surface_color,
955
- cell_surface_opacity: lattice_props.cell_surface_opacity,
956
- supercell_scaling,
957
- cell_type,
958
- }}
959
- on_reset={() => {
960
- lattice_props.cell_edge_color = DEFAULTS.structure.cell_edge_color
961
- lattice_props.cell_edge_opacity = DEFAULTS.structure.cell_edge_opacity
962
- lattice_props.cell_surface_color = DEFAULTS.structure.cell_surface_color
963
- lattice_props.cell_surface_opacity = DEFAULTS.structure.cell_surface_opacity
964
- supercell_scaling = `1x1x1`
965
- cell_type = `original`
966
- }}
967
- >
968
- <label
969
- {@attach tooltip({
970
- content: sym_data
971
- ? `Transform to conventional or primitive cell using crystallographic symmetry`
972
- : `Symmetry analysis required. Wait for analysis to complete.`,
973
- })}
974
- >
975
- <span>Cell Type</span>
976
- <select bind:value={cell_type} disabled={!sym_data}>
977
- <option value="original">Original</option>
978
- <option value="conventional">Conventional</option>
979
- <option value="primitive">Primitive</option>
980
- </select>
981
- </label>
982
- <label>
983
- <span
984
- {@attach tooltip({
985
- content:
986
- `Create supercells by repeating the unit cell. Examples: "2x2x2", "3x1x2", or "2"`,
987
- })}
988
- >
989
- Supercell Scaling
990
- </span>
991
- <input
992
- type="text"
993
- bind:value={supercell_scaling}
994
- placeholder="1x1x1"
995
- style:border={supercell_input_valid ? undefined : `1px dashed red`}
996
- style:opacity={supercell_loading ? 0.5 : 1}
997
- disabled={supercell_loading}
998
- inputmode="text"
999
- autocomplete="off"
1000
- spellcheck="false"
1001
- pattern="^(\d+|\d+x\d+x\d+)$"
1002
- aria-invalid={!supercell_input_valid}
1003
- title={supercell_input_valid
1004
- ? `Valid supercell scaling: ${supercell_scaling}`
1005
- : `Invalid format. Use "2x2x2", "3x1x2", or "2"`}
1006
- />
1007
- </label>
1008
- {#if supercell_loading}
1009
- <div
1010
- style="display: flex; align-items: center; gap: 8px; font-size: 0.85em; color: var(--accent-color); margin-top: 4pt"
1011
- >
1012
- <span
1013
- class="spinner-icon"
1014
- 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"
1015
- ></span>
1016
- <span>Generating supercell...</span>
1017
- </div>
1018
- {/if}
1019
-
1020
- {#if !supercell_input_valid}
1021
- <div
1022
- data-testid="supercell-input-error"
1023
- style="color: red; font-size: 0.8em; margin-top: 4pt"
1024
- >
1025
- Invalid format. Use patterns like "2x2x2", "3x1x2", or "2".
1026
- </div>
1027
- {/if}
1028
-
1029
- {#each [
1030
- {
1031
- label: `Edge color`,
1032
- color_prop: `cell_edge_color`,
1033
- opacity_prop: `cell_edge_opacity`,
1034
- step: 0.05,
1035
- },
1036
- {
1037
- label: `Surface color`,
1038
- color_prop: `cell_surface_color`,
1039
- opacity_prop: `cell_surface_opacity`,
1040
- step: 0.01,
1041
- },
1042
- ] as const as
1043
- { label, color_prop, opacity_prop, step }
1044
- (label)
1045
- }
1046
- <div class="pane-row">
1047
- <label>
1048
- {label}
1049
- <input
1050
- type="color"
1051
- bind:value={lattice_props[color_prop]}
1052
- />
1053
- </label>
1054
- <label>
1055
- opacity
1056
- <input
1057
- type="number"
1058
- min={0}
1059
- max={1}
1060
- {step}
1061
- bind:value={lattice_props[opacity_prop]}
1062
- />
1063
- <input
1064
- type="range"
1065
- min={0}
1066
- max={1}
1067
- {step}
1068
- bind:value={lattice_props[opacity_prop]}
1069
- />
1070
- </label>
1071
- </div>
1072
- {/each}
1073
- </SettingsSection>
1074
- {/if}
1075
-
1076
- <SettingsSection
1077
- title="Background"
1078
- current_values={{
1079
- background_color,
1080
- background_opacity,
1081
- }}
1082
- on_reset={() => {
1083
- background_color = undefined
1084
- background_opacity = DEFAULTS.background_opacity
1085
- }}
1086
- >
1087
- <div class="pane-row">
1088
- <label>
1089
- Color
1090
- <!-- not using bind:value to not give a default value of #000000 to background_color, needs to stay undefined to not override --struct-bg theme color -->
1091
- <input
1092
- type="color"
1093
- value={background_color}
1094
- oninput={(event) => {
1095
- background_color = (event.target as HTMLInputElement).value
1096
- }}
1097
- />
1098
- </label>
1099
- <label>
1100
- Opacity
1101
- <input
1102
- type="number"
1103
- min={0}
1104
- max={1}
1105
- step={0.02}
1106
- bind:value={background_opacity}
1107
- />
1108
- <input type="range" min={0} max={1} step={0.02} bind:value={background_opacity} />
1109
- </label>
1110
- </div>
1111
- </SettingsSection>
1112
-
1113
- <SettingsSection
1114
- title="Lighting"
1115
- current_values={{
1116
- directional_light: scene_props.directional_light,
1117
- ambient_light: scene_props.ambient_light,
1118
- }}
1119
- on_reset={() => {
1120
- scene_props.directional_light = DEFAULTS.structure.directional_light
1121
- scene_props.ambient_light = DEFAULTS.structure.ambient_light
1122
- }}
1123
- >
1124
- <label>
1125
- <span title="Intensity of the directional light" {@attach tooltip()}>
1126
- Directional light
1127
- </span>
1128
- <input
1129
- type="number"
1130
- min={0}
1131
- max={4}
1132
- step={0.01}
1133
- bind:value={scene_props.directional_light}
1134
- />
1135
- <input
1136
- type="range"
1137
- min={0}
1138
- max={4}
1139
- step={0.01}
1140
- bind:value={scene_props.directional_light}
1141
- />
1142
- </label>
1143
- <label>
1144
- <span title="Intensity of the ambient light" {@attach tooltip()}>
1145
- Ambient light
1146
- </span>
1147
- <input
1148
- type="number"
1149
- min={0.5}
1150
- max={3}
1151
- step={0.05}
1152
- bind:value={scene_props.ambient_light}
1153
- />
1154
- <input
1155
- type="range"
1156
- min={0.5}
1157
- max={3}
1158
- step={0.05}
1159
- bind:value={scene_props.ambient_light}
1160
- />
1161
- </label>
1162
- </SettingsSection>
1163
-
1164
- {#if scene_props.show_bonds && scene_props.show_bonds !== `never`}
1165
- <SettingsSection
1166
- title="Bonds"
1167
- current_values={{
1168
- bonding_strategy: scene_props.bonding_strategy,
1169
- auto_bond_order: scene_props.auto_bond_order,
1170
- aromatic_display: scene_props.aromatic_display,
1171
- bond_color: scene_props.bond_color,
1172
- bond_thickness: scene_props.bond_thickness,
1173
- }}
1174
- on_reset={() => {
1175
- scene_props.bonding_strategy = DEFAULTS.structure.bonding_strategy
1176
- scene_props.auto_bond_order = DEFAULTS.structure.auto_bond_order
1177
- scene_props.aromatic_display = DEFAULTS.structure.aromatic_display
1178
- scene_props.bond_color = DEFAULTS.structure.bond_color
1179
- scene_props.bond_thickness = DEFAULTS.structure.bond_thickness
1180
- }}
1181
- >
1182
- <label>
1183
- Strategy <select bind:value={scene_props.bonding_strategy}>
1184
- {#each Object.entries(
1185
- SETTINGS_CONFIG.structure.bonding_strategy.enum ?? {},
1186
- ) as
1187
- [value, label]
1188
- (value)
1189
- }
1190
- <option {value}>{label}</option>
1191
- {/each}
1192
- </select>
1193
- </label>
1194
- <label
1195
- style="gap: 6pt"
1196
- {@attach tooltip({
1197
- content: SETTINGS_CONFIG.structure.auto_bond_order.description,
1198
- })}
1199
- >
1200
- <input type="checkbox" bind:checked={scene_props.auto_bond_order} />
1201
- Auto bond order (perceive double/triple/aromatic)
1202
- </label>
1203
- {#if scene_props.auto_bond_order}
1204
- <label
1205
- {@attach tooltip({
1206
- content: SETTINGS_CONFIG.structure.aromatic_display.description,
1207
- })}
1208
- >
1209
- Aromatic display <select bind:value={scene_props.aromatic_display}>
1210
- {#each Object.entries(
1211
- SETTINGS_CONFIG.structure.aromatic_display.enum ?? {},
1212
- ) as
1213
- [value, label]
1214
- (value)
1215
- }
1216
- <option {value}>{label}</option>
1217
- {/each}
1218
- </select>
1219
- </label>
1220
- {/if}
1221
- <label>
1222
- Color <input type="color" bind:value={scene_props.bond_color} />
1223
- </label>
1224
- <label>
1225
- Thickness
1226
- <input
1227
- type="number"
1228
- min={0.05}
1229
- max={0.5}
1230
- step={0.05}
1231
- bind:value={scene_props.bond_thickness}
1232
- />
1233
- <input
1234
- type="range"
1235
- min={0.05}
1236
- max={0.5}
1237
- step={0.05}
1238
- bind:value={scene_props.bond_thickness}
1239
- />
1240
- </label>
1241
- </SettingsSection>
1242
- {/if}
1243
- </DraggablePane>
1244
-
1245
- <style>
1246
- .rotation-axes {
1247
- display: flex;
1248
- gap: 10pt;
1249
- }
1250
- .rotation-axes > div {
1251
- display: grid;
1252
- gap: 0.4em;
1253
- place-items: center;
1254
- }
1255
- :global(.controls-pane) {
1256
- font-size: 0.85em;
1257
- }
1258
-
1259
- :global(.controls-pane section) {
1260
- display: flex;
1261
- flex-direction: column;
1262
- gap: 6pt;
1263
- }
1264
- :global(.controls-pane h4) {
1265
- margin: 10pt 0 4pt !important;
1266
- }
1267
- :global(.controls-pane h4:first-of-type) {
1268
- margin-top: 0 !important;
1269
- }
1270
- .pane-row {
1271
- display: flex;
1272
- gap: 12pt;
1273
- justify-content: space-between;
1274
- width: 100%;
1275
- }
1276
- label {
1277
- display: flex;
1278
- align-items: center;
1279
- gap: 10pt;
1280
- }
1281
- input,
1282
- select {
1283
- font-size: inherit;
1284
- font-family: inherit;
1285
- }
1286
- input[type='range'] {
1287
- flex: 1;
1288
- min-width: 40px;
1289
- }
1290
- @keyframes spin {
1291
- from {
1292
- transform: rotate(0deg);
1293
- }
1294
- to {
1295
- transform: rotate(360deg);
1296
- }
1297
- }
1298
- </style>