matterviz 0.3.1 → 0.3.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.
Files changed (358) hide show
  1. package/dist/EmptyState.svelte +10 -2
  2. package/dist/FilePicker.svelte +154 -96
  3. package/dist/Icon.svelte +20 -14
  4. package/dist/MillerIndexInput.svelte +27 -21
  5. package/dist/api/optimade.js +6 -6
  6. package/dist/app.css +216 -178
  7. package/dist/brillouin/BrillouinZone.svelte +299 -198
  8. package/dist/brillouin/BrillouinZone.svelte.d.ts +1 -1
  9. package/dist/brillouin/BrillouinZoneControls.svelte +32 -5
  10. package/dist/brillouin/BrillouinZoneExportPane.svelte +74 -55
  11. package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +1 -1
  12. package/dist/brillouin/BrillouinZoneInfoPane.svelte +99 -68
  13. package/dist/brillouin/BrillouinZoneScene.svelte +277 -165
  14. package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +1 -1
  15. package/dist/brillouin/BrillouinZoneTooltip.svelte +17 -7
  16. package/dist/brillouin/compute.js +11 -6
  17. package/dist/chempot-diagram/ChemPotDiagram.svelte +327 -0
  18. package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +13 -0
  19. package/dist/chempot-diagram/ChemPotDiagram2D.svelte +847 -0
  20. package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +16 -0
  21. package/dist/chempot-diagram/ChemPotDiagram3D.svelte +3194 -0
  22. package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +16 -0
  23. package/dist/chempot-diagram/ChemPotScene3D.svelte +11 -0
  24. package/dist/chempot-diagram/ChemPotScene3D.svelte.d.ts +7 -0
  25. package/dist/chempot-diagram/async-compute.svelte.d.ts +3 -0
  26. package/dist/chempot-diagram/async-compute.svelte.js +77 -0
  27. package/dist/chempot-diagram/chempot-worker.d.ts +1 -0
  28. package/dist/chempot-diagram/chempot-worker.js +11 -0
  29. package/dist/chempot-diagram/color.d.ts +10 -0
  30. package/dist/chempot-diagram/color.js +32 -0
  31. package/dist/chempot-diagram/compute.d.ts +48 -0
  32. package/dist/chempot-diagram/compute.js +812 -0
  33. package/dist/chempot-diagram/index.d.ts +6 -0
  34. package/dist/chempot-diagram/index.js +6 -0
  35. package/dist/chempot-diagram/pointer.d.ts +16 -0
  36. package/dist/chempot-diagram/pointer.js +40 -0
  37. package/dist/chempot-diagram/temperature.d.ts +15 -0
  38. package/dist/chempot-diagram/temperature.js +36 -0
  39. package/dist/chempot-diagram/types.d.ts +86 -0
  40. package/dist/chempot-diagram/types.js +28 -0
  41. package/dist/colors/index.d.ts +3 -1
  42. package/dist/colors/index.js +9 -3
  43. package/dist/composition/BarChart.svelte +141 -77
  44. package/dist/composition/BubbleChart.svelte +107 -52
  45. package/dist/composition/Composition.svelte +100 -79
  46. package/dist/composition/Formula.svelte +108 -62
  47. package/dist/composition/FormulaFilter.svelte +973 -353
  48. package/dist/composition/FormulaFilter.svelte.d.ts +35 -1
  49. package/dist/composition/PieChart.svelte +199 -99
  50. package/dist/composition/PieChart.svelte.d.ts +1 -1
  51. package/dist/composition/format.d.ts +5 -0
  52. package/dist/composition/format.js +20 -3
  53. package/dist/composition/parse.js +14 -9
  54. package/dist/convex-hull/ConvexHull.svelte +93 -38
  55. package/dist/convex-hull/ConvexHull2D.svelte +551 -393
  56. package/dist/convex-hull/ConvexHull3D.svelte +1303 -825
  57. package/dist/convex-hull/ConvexHull4D.svelte +1012 -686
  58. package/dist/convex-hull/ConvexHullControls.svelte +115 -28
  59. package/dist/convex-hull/ConvexHullInfoPane.svelte +29 -3
  60. package/dist/convex-hull/ConvexHullStats.svelte +821 -249
  61. package/dist/convex-hull/ConvexHullStats.svelte.d.ts +6 -1
  62. package/dist/convex-hull/ConvexHullTooltip.svelte +41 -16
  63. package/dist/convex-hull/GasPressureControls.svelte +104 -61
  64. package/dist/convex-hull/StructurePopup.svelte +25 -4
  65. package/dist/convex-hull/TemperatureSlider.svelte +45 -25
  66. package/dist/convex-hull/barycentric-coords.js +13 -7
  67. package/dist/convex-hull/demo-temperature.d.ts +6 -0
  68. package/dist/convex-hull/demo-temperature.js +40 -0
  69. package/dist/convex-hull/gas-thermodynamics.js +17 -12
  70. package/dist/convex-hull/helpers.d.ts +10 -1
  71. package/dist/convex-hull/helpers.js +79 -38
  72. package/dist/convex-hull/index.d.ts +1 -0
  73. package/dist/convex-hull/index.js +1 -0
  74. package/dist/convex-hull/thermodynamics.d.ts +8 -21
  75. package/dist/convex-hull/thermodynamics.js +163 -69
  76. package/dist/convex-hull/types.d.ts +12 -12
  77. package/dist/convex-hull/types.js +0 -12
  78. package/dist/coordination/CoordinationBarPlot.svelte +232 -176
  79. package/dist/element/BohrAtom.svelte +56 -13
  80. package/dist/element/ElementHeading.svelte +7 -2
  81. package/dist/element/ElementPhoto.svelte +15 -9
  82. package/dist/element/ElementStats.svelte +10 -4
  83. package/dist/element/ElementTile.svelte +137 -73
  84. package/dist/element/Nucleus.svelte +39 -11
  85. package/dist/element/data.js +2 -14
  86. package/dist/element/data.json.gz +0 -0
  87. package/dist/element/types.d.ts +1 -0
  88. package/dist/feedback/ClickFeedback.svelte +16 -5
  89. package/dist/feedback/DragOverlay.svelte +10 -2
  90. package/dist/feedback/Spinner.svelte +4 -2
  91. package/dist/feedback/StatusMessage.svelte +8 -2
  92. package/dist/fermi-surface/FermiSlice.svelte +118 -88
  93. package/dist/fermi-surface/FermiSurface.svelte +336 -239
  94. package/dist/fermi-surface/FermiSurface.svelte.d.ts +1 -1
  95. package/dist/fermi-surface/FermiSurfaceControls.svelte +113 -46
  96. package/dist/fermi-surface/FermiSurfaceScene.svelte +536 -343
  97. package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
  98. package/dist/fermi-surface/FermiSurfaceTooltip.svelte +14 -5
  99. package/dist/fermi-surface/compute.js +16 -20
  100. package/dist/fermi-surface/parse.js +37 -33
  101. package/dist/fermi-surface/symmetry.js +2 -7
  102. package/dist/fermi-surface/types.d.ts +3 -5
  103. package/dist/heatmap-matrix/HeatmapMatrix.svelte +1527 -0
  104. package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +110 -0
  105. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +225 -0
  106. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +30 -0
  107. package/dist/heatmap-matrix/index.d.ts +53 -0
  108. package/dist/heatmap-matrix/index.js +100 -0
  109. package/dist/heatmap-matrix/shared.d.ts +2 -0
  110. package/dist/heatmap-matrix/shared.js +4 -0
  111. package/dist/icons.d.ts +111 -0
  112. package/dist/icons.js +158 -0
  113. package/dist/index.d.ts +5 -2
  114. package/dist/index.js +5 -2
  115. package/dist/io/decompress.js +1 -1
  116. package/dist/io/export.d.ts +3 -0
  117. package/dist/io/export.js +138 -140
  118. package/dist/io/file-drop.d.ts +7 -0
  119. package/dist/io/file-drop.js +43 -0
  120. package/dist/io/index.d.ts +2 -2
  121. package/dist/io/index.js +2 -112
  122. package/dist/io/is-binary.js +2 -3
  123. package/dist/io/types.d.ts +1 -0
  124. package/dist/io/url-drop.d.ts +2 -0
  125. package/dist/io/url-drop.js +117 -0
  126. package/dist/isosurface/Isosurface.svelte +220 -110
  127. package/dist/isosurface/IsosurfaceControls.svelte +65 -28
  128. package/dist/isosurface/parse.js +104 -56
  129. package/dist/isosurface/slice.d.ts +2 -1
  130. package/dist/isosurface/slice.js +8 -13
  131. package/dist/isosurface/types.d.ts +14 -1
  132. package/dist/isosurface/types.js +152 -5
  133. package/dist/labels.d.ts +2 -1
  134. package/dist/labels.js +12 -8
  135. package/dist/layout/FullscreenToggle.svelte +11 -2
  136. package/dist/layout/InfoCard.svelte +38 -6
  137. package/dist/layout/InfoTag.svelte +125 -94
  138. package/dist/layout/PropertyFilter.svelte +82 -37
  139. package/dist/layout/SettingsSection.svelte +85 -55
  140. package/dist/layout/SubpageGrid.svelte +82 -0
  141. package/dist/layout/SubpageGrid.svelte.d.ts +14 -0
  142. package/dist/layout/index.d.ts +1 -0
  143. package/dist/layout/index.js +1 -0
  144. package/dist/layout/json-tree/JsonNode.svelte +266 -223
  145. package/dist/layout/json-tree/JsonTree.svelte +516 -429
  146. package/dist/layout/json-tree/JsonTree.svelte.d.ts +1 -1
  147. package/dist/layout/json-tree/JsonValue.svelte +281 -173
  148. package/dist/layout/json-tree/types.d.ts +10 -2
  149. package/dist/layout/json-tree/utils.d.ts +2 -0
  150. package/dist/layout/json-tree/utils.js +37 -2
  151. package/dist/marching-cubes.js +25 -2
  152. package/dist/math.d.ts +20 -17
  153. package/dist/math.js +474 -57
  154. package/dist/overlays/ContextMenu.svelte +66 -40
  155. package/dist/overlays/DraggablePane.svelte +331 -154
  156. package/dist/overlays/DraggablePane.svelte.d.ts +2 -0
  157. package/dist/periodic-table/PeriodicTable.svelte +278 -145
  158. package/dist/periodic-table/PeriodicTableControls.svelte +178 -128
  159. package/dist/periodic-table/PropertySelect.svelte +25 -7
  160. package/dist/periodic-table/TableInset.svelte +8 -3
  161. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +559 -267
  162. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +6 -2
  163. package/dist/phase-diagram/PhaseDiagramControls.svelte +131 -51
  164. package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +3 -2
  165. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +126 -0
  166. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +15 -0
  167. package/dist/phase-diagram/PhaseDiagramExportPane.svelte +160 -110
  168. package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +8 -1
  169. package/dist/phase-diagram/PhaseDiagramTooltip.svelte +217 -86
  170. package/dist/phase-diagram/PhaseDiagramTooltip.svelte.d.ts +6 -3
  171. package/dist/phase-diagram/TdbInfoPanel.svelte +28 -4
  172. package/dist/phase-diagram/build-diagram.js +9 -9
  173. package/dist/phase-diagram/colors.js +1 -3
  174. package/dist/phase-diagram/index.d.ts +2 -0
  175. package/dist/phase-diagram/index.js +2 -0
  176. package/dist/phase-diagram/parse.js +10 -9
  177. package/dist/phase-diagram/svg-to-diagram.d.ts +2 -0
  178. package/dist/phase-diagram/svg-to-diagram.js +869 -0
  179. package/dist/phase-diagram/types.d.ts +10 -0
  180. package/dist/phase-diagram/utils.d.ts +8 -4
  181. package/dist/phase-diagram/utils.js +219 -74
  182. package/dist/plot/AxisLabel.svelte +51 -0
  183. package/dist/plot/AxisLabel.svelte.d.ts +16 -0
  184. package/dist/plot/BarPlot.svelte +1461 -768
  185. package/dist/plot/BarPlot.svelte.d.ts +3 -3
  186. package/dist/plot/BarPlotControls.svelte +33 -6
  187. package/dist/plot/BarPlotControls.svelte.d.ts +1 -1
  188. package/dist/plot/ColorBar.svelte +533 -383
  189. package/dist/plot/ColorBar.svelte.d.ts +1 -1
  190. package/dist/plot/ColorScaleSelect.svelte +28 -7
  191. package/dist/plot/ElementScatter.svelte +38 -16
  192. package/dist/plot/FillArea.svelte +152 -92
  193. package/dist/plot/Histogram.svelte +1162 -709
  194. package/dist/plot/Histogram.svelte.d.ts +1 -1
  195. package/dist/plot/HistogramControls.svelte +81 -18
  196. package/dist/plot/HistogramControls.svelte.d.ts +6 -2
  197. package/dist/plot/InteractiveAxisLabel.svelte +34 -11
  198. package/dist/plot/InteractiveAxisLabel.svelte.d.ts +1 -1
  199. package/dist/plot/Line.svelte +63 -28
  200. package/dist/plot/PlotControls.svelte +221 -96
  201. package/dist/plot/PlotControls.svelte.d.ts +1 -1
  202. package/dist/plot/PlotLegend.svelte +174 -91
  203. package/dist/plot/PlotTooltip.svelte +45 -6
  204. package/dist/plot/PortalSelect.svelte +175 -146
  205. package/dist/plot/ReferenceLine.svelte +77 -22
  206. package/dist/plot/ReferenceLine.svelte.d.ts +1 -0
  207. package/dist/plot/ReferenceLine3D.svelte +132 -107
  208. package/dist/plot/ReferencePlane.svelte +146 -123
  209. package/dist/plot/ScatterPlot.svelte +1880 -1156
  210. package/dist/plot/ScatterPlot.svelte.d.ts +3 -3
  211. package/dist/plot/ScatterPlot3D.svelte +256 -131
  212. package/dist/plot/ScatterPlot3D.svelte.d.ts +2 -2
  213. package/dist/plot/ScatterPlot3DControls.svelte +300 -297
  214. package/dist/plot/ScatterPlot3DControls.svelte.d.ts +2 -1
  215. package/dist/plot/ScatterPlot3DScene.svelte +608 -406
  216. package/dist/plot/ScatterPlot3DScene.svelte.d.ts +2 -2
  217. package/dist/plot/ScatterPlotControls.svelte +150 -70
  218. package/dist/plot/ScatterPlotControls.svelte.d.ts +1 -1
  219. package/dist/plot/ScatterPoint.svelte +98 -26
  220. package/dist/plot/ScatterPoint.svelte.d.ts +1 -0
  221. package/dist/plot/SpacegroupBarPlot.svelte +142 -85
  222. package/dist/plot/Surface3D.svelte +159 -108
  223. package/dist/plot/ZeroLines.svelte +96 -0
  224. package/dist/plot/ZeroLines.svelte.d.ts +32 -0
  225. package/dist/plot/ZoomRect.svelte +23 -0
  226. package/dist/plot/ZoomRect.svelte.d.ts +8 -0
  227. package/dist/plot/axis-utils.d.ts +1 -1
  228. package/dist/plot/axis-utils.js +1 -3
  229. package/dist/plot/data-cleaning.js +12 -28
  230. package/dist/plot/data-transform.js +2 -1
  231. package/dist/plot/fill-utils.js +2 -0
  232. package/dist/plot/index.d.ts +6 -2
  233. package/dist/plot/index.js +6 -2
  234. package/dist/plot/interactions.d.ts +8 -10
  235. package/dist/plot/interactions.js +2 -3
  236. package/dist/plot/layout.d.ts +11 -2
  237. package/dist/plot/layout.js +44 -17
  238. package/dist/plot/reference-line.d.ts +5 -22
  239. package/dist/plot/reference-line.js +12 -84
  240. package/dist/plot/scales.js +24 -36
  241. package/dist/plot/types.d.ts +53 -40
  242. package/dist/plot/types.js +12 -7
  243. package/dist/plot/utils/label-placement.d.ts +32 -15
  244. package/dist/plot/utils/label-placement.js +227 -63
  245. package/dist/plot/utils/series-visibility.js +2 -3
  246. package/dist/plot/utils.d.ts +1 -0
  247. package/dist/plot/utils.js +14 -0
  248. package/dist/rdf/RdfPlot.svelte +173 -132
  249. package/dist/rdf/calc-rdf.js +4 -5
  250. package/dist/sanitize.d.ts +4 -0
  251. package/dist/sanitize.js +107 -0
  252. package/dist/settings.d.ts +21 -6
  253. package/dist/settings.js +63 -19
  254. package/dist/spectral/Bands.svelte +963 -412
  255. package/dist/spectral/Bands.svelte.d.ts +22 -2
  256. package/dist/spectral/BandsAndDos.svelte +90 -49
  257. package/dist/spectral/BrillouinBandsDos.svelte +151 -93
  258. package/dist/spectral/Dos.svelte +389 -258
  259. package/dist/spectral/helpers.d.ts +23 -1
  260. package/dist/spectral/helpers.js +119 -51
  261. package/dist/spectral/types.d.ts +2 -0
  262. package/dist/state.svelte.d.ts +1 -1
  263. package/dist/state.svelte.js +3 -2
  264. package/dist/structure/Arrow.svelte +59 -20
  265. package/dist/structure/AtomLegend.svelte +231 -129
  266. package/dist/structure/AtomLegend.svelte.d.ts +1 -1
  267. package/dist/structure/Bond.svelte +73 -47
  268. package/dist/structure/CanvasTooltip.svelte +10 -2
  269. package/dist/structure/CellSelect.svelte +148 -51
  270. package/dist/structure/Cylinder.svelte +33 -17
  271. package/dist/structure/Lattice.svelte +88 -33
  272. package/dist/structure/Structure.svelte +1077 -821
  273. package/dist/structure/Structure.svelte.d.ts +1 -1
  274. package/dist/structure/StructureControls.svelte +373 -139
  275. package/dist/structure/StructureControls.svelte.d.ts +1 -1
  276. package/dist/structure/StructureExportPane.svelte +124 -89
  277. package/dist/structure/StructureExportPane.svelte.d.ts +1 -1
  278. package/dist/structure/StructureInfoPane.svelte +304 -231
  279. package/dist/structure/StructureScene.svelte +919 -445
  280. package/dist/structure/StructureScene.svelte.d.ts +16 -7
  281. package/dist/structure/atom-properties.d.ts +6 -2
  282. package/dist/structure/atom-properties.js +42 -29
  283. package/dist/structure/bonding.js +6 -7
  284. package/dist/structure/export.js +22 -34
  285. package/dist/structure/ferrox-wasm-types.d.ts +3 -2
  286. package/dist/structure/ferrox-wasm-types.js +0 -3
  287. package/dist/structure/ferrox-wasm.d.ts +3 -2
  288. package/dist/structure/ferrox-wasm.js +2 -3
  289. package/dist/structure/index.d.ts +16 -0
  290. package/dist/structure/index.js +88 -6
  291. package/dist/structure/measure.d.ts +2 -2
  292. package/dist/structure/measure.js +4 -44
  293. package/dist/structure/parse.js +130 -155
  294. package/dist/structure/partial-occupancy.d.ts +25 -0
  295. package/dist/structure/partial-occupancy.js +99 -0
  296. package/dist/structure/pbc.d.ts +1 -0
  297. package/dist/structure/pbc.js +16 -6
  298. package/dist/structure/supercell.d.ts +2 -2
  299. package/dist/structure/supercell.js +12 -22
  300. package/dist/structure/validation.js +5 -3
  301. package/dist/symmetry/SymmetryStats.svelte +94 -37
  302. package/dist/symmetry/WyckoffTable.svelte +42 -14
  303. package/dist/symmetry/cell-transform.js +5 -3
  304. package/dist/symmetry/index.d.ts +7 -4
  305. package/dist/symmetry/index.js +87 -21
  306. package/dist/symmetry/spacegroups.js +148 -148
  307. package/dist/table/HeatmapTable.svelte +1112 -516
  308. package/dist/table/HeatmapTable.svelte.d.ts +12 -1
  309. package/dist/table/ToggleMenu.svelte +125 -90
  310. package/dist/table/index.d.ts +2 -0
  311. package/dist/table/index.js +2 -4
  312. package/dist/theme/ThemeControl.svelte +21 -12
  313. package/dist/time.js +4 -1
  314. package/dist/tooltip/TooltipContent.svelte +33 -8
  315. package/dist/trajectory/Trajectory.svelte +889 -687
  316. package/dist/trajectory/TrajectoryError.svelte +14 -3
  317. package/dist/trajectory/TrajectoryExportPane.svelte +148 -90
  318. package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +1 -1
  319. package/dist/trajectory/TrajectoryInfoPane.svelte +272 -143
  320. package/dist/trajectory/constants.d.ts +6 -0
  321. package/dist/trajectory/constants.js +7 -0
  322. package/dist/trajectory/extract.js +13 -31
  323. package/dist/trajectory/format-detect.d.ts +9 -0
  324. package/dist/trajectory/format-detect.js +76 -0
  325. package/dist/trajectory/frame-reader.d.ts +17 -0
  326. package/dist/trajectory/frame-reader.js +332 -0
  327. package/dist/trajectory/helpers.d.ts +14 -0
  328. package/dist/trajectory/helpers.js +172 -0
  329. package/dist/trajectory/index.d.ts +1 -0
  330. package/dist/trajectory/index.js +23 -14
  331. package/dist/trajectory/parse/ase.d.ts +2 -0
  332. package/dist/trajectory/parse/ase.js +77 -0
  333. package/dist/trajectory/parse/hdf5.d.ts +2 -0
  334. package/dist/trajectory/parse/hdf5.js +129 -0
  335. package/dist/trajectory/parse/index.d.ts +12 -0
  336. package/dist/trajectory/parse/index.js +299 -0
  337. package/dist/trajectory/parse/lammps.d.ts +5 -0
  338. package/dist/trajectory/parse/lammps.js +179 -0
  339. package/dist/trajectory/parse/vasp.d.ts +2 -0
  340. package/dist/trajectory/parse/vasp.js +68 -0
  341. package/dist/trajectory/parse/xyz.d.ts +2 -0
  342. package/dist/trajectory/parse/xyz.js +110 -0
  343. package/dist/trajectory/plotting.js +13 -8
  344. package/dist/trajectory/types.d.ts +11 -0
  345. package/dist/trajectory/types.js +1 -0
  346. package/dist/utils.d.ts +3 -0
  347. package/dist/utils.js +17 -0
  348. package/dist/xrd/XrdPlot.svelte +337 -245
  349. package/dist/xrd/broadening.js +14 -9
  350. package/dist/xrd/calc-xrd.js +12 -19
  351. package/dist/xrd/parse.d.ts +1 -1
  352. package/dist/xrd/parse.js +17 -17
  353. package/package.json +103 -101
  354. package/readme.md +4 -4
  355. package/dist/trajectory/parse.d.ts +0 -42
  356. package/dist/trajectory/parse.js +0 -1267
  357. /package/dist/element/{data.json.d.ts → data.json.gz.d.ts} +0 -0
  358. /package/dist/theme/{themes.js → themes.mjs} +0 -0
@@ -0,0 +1,110 @@
1
+ import type { D3InterpolateName } from '../colors';
2
+ import type { AxisConfig } from '../plot';
3
+ import { type ComponentProps, type Snippet } from 'svelte';
4
+ import type { HTMLAttributes } from 'svelte/elements';
5
+ import HeatmapMatrixControls from './HeatmapMatrixControls.svelte';
6
+ import type { AxisItem, CellContext, DomainMode, HeatmapExportFormat, HeatmapTooltipProp, LegendPosition, NormalizeMode, SymmetricMode } from './index';
7
+ type CellValue = number | string | null;
8
+ type SelectionMode = `single` | `multi` | `range`;
9
+ type AxisOrderKey = `label` | `key` | `sort_value`;
10
+ type AxisOrder = AxisOrderKey | ((a: AxisItem, b: AxisItem) => number);
11
+ type CellPos = {
12
+ x_idx: number;
13
+ y_idx: number;
14
+ };
15
+ type $$ComponentProps = Omit<HTMLAttributes<HTMLDivElement>, `onclick` | `ondblclick`> & {
16
+ x_items: AxisItem[];
17
+ y_items: AxisItem[];
18
+ values?: CellValue[][] | Record<string, Record<string, CellValue>>;
19
+ color_scale?: D3InterpolateName | ((val: number) => string);
20
+ color_scale_range?: [number | null, number | null];
21
+ color_overrides?: Record<string, string>;
22
+ missing_color?: string;
23
+ log?: boolean;
24
+ value_transform?: (value: number, ctx: {
25
+ x_item: AxisItem;
26
+ y_item: AxisItem;
27
+ x_idx: number;
28
+ y_idx: number;
29
+ }) => number | null;
30
+ normalize?: NormalizeMode;
31
+ domain_mode?: DomainMode;
32
+ quantile_clip?: [number, number];
33
+ show_legend?: boolean;
34
+ legend_position?: LegendPosition;
35
+ legend_label?: string;
36
+ legend_ticks?: number;
37
+ legend_format?: string;
38
+ active_cell?: {
39
+ x_idx: number;
40
+ y_idx: number;
41
+ } | null;
42
+ selected_cells?: CellPos[];
43
+ selection_mode?: SelectionMode;
44
+ pinned_cell?: CellPos | null;
45
+ tooltip_mode?: `hover` | `pinned` | `both`;
46
+ disabled?: boolean;
47
+ onclick?: (cell: CellContext) => void;
48
+ ondblclick?: (cell: CellContext) => void;
49
+ onselect?: (cells: CellPos[]) => void;
50
+ onpin?: (cell: CellPos | null) => void;
51
+ oncontextmenu?: (cell: CellContext, event: MouseEvent) => void;
52
+ enable_brush?: boolean;
53
+ onbrush?: (payload: {
54
+ x_range: [number, number];
55
+ y_range: [number, number];
56
+ cells: CellContext[];
57
+ }) => void;
58
+ tile_size?: string;
59
+ gap?: string;
60
+ hide_empty?: false | `compact` | `gaps`;
61
+ show_x_labels?: boolean;
62
+ show_y_labels?: boolean;
63
+ stagger_axis_labels?: boolean | `auto`;
64
+ symmetric?: SymmetricMode;
65
+ symmetric_label_position?: `diagonal` | `edge`;
66
+ label_style?: string;
67
+ x_order?: AxisOrder;
68
+ y_order?: AxisOrder;
69
+ highlight_x_keys?: string[];
70
+ highlight_y_keys?: string[];
71
+ search_query?: string;
72
+ sticky_x_labels?: boolean;
73
+ sticky_y_labels?: boolean;
74
+ virtualize?: boolean;
75
+ overscan?: number;
76
+ export_formats?: HeatmapExportFormat[];
77
+ onexport?: (format: HeatmapExportFormat, payload: unknown) => void;
78
+ show_gridlines?: boolean;
79
+ gridline_color?: string;
80
+ gridline_width?: string;
81
+ animate_updates?: boolean;
82
+ animation_duration?: string;
83
+ show_row_summaries?: boolean;
84
+ show_col_summaries?: boolean;
85
+ summary_fn?: (values: number[]) => number | null;
86
+ theme?: `default` | `light` | `dark` | `publication`;
87
+ show_controls?: boolean;
88
+ controls_open?: boolean;
89
+ controls_props?: Partial<ComponentProps<typeof HeatmapMatrixControls>>;
90
+ controls_children?: Snippet<[{
91
+ controls_open: boolean;
92
+ }]>;
93
+ show_values?: boolean | string;
94
+ x_axis?: AxisConfig;
95
+ y_axis?: AxisConfig;
96
+ tooltip?: HeatmapTooltipProp;
97
+ cell?: Snippet<[CellContext]>;
98
+ x_label_cell?: Snippet<[{
99
+ item: AxisItem;
100
+ idx: number;
101
+ }]>;
102
+ y_label_cell?: Snippet<[{
103
+ item: AxisItem;
104
+ idx: number;
105
+ }]>;
106
+ children?: Snippet;
107
+ };
108
+ declare const HeatmapMatrix: import("svelte").Component<$$ComponentProps, {}, "controls_open" | "color_scale" | "active_cell" | "selected_cells" | "pinned_cell">;
109
+ type HeatmapMatrix = ReturnType<typeof HeatmapMatrix>;
110
+ export default HeatmapMatrix;
@@ -0,0 +1,225 @@
1
+ <script lang="ts">
2
+ import DraggablePane from '../overlays/DraggablePane.svelte'
3
+ import type { ComponentProps, Snippet } from 'svelte'
4
+ import {
5
+ ELEMENT_ORDERINGS,
6
+ ORDERING_LABELS,
7
+ } from './index'
8
+ import type { ElementAxisOrderingKey, DomainMode, HeatmapExportFormat, LegendPosition, NormalizeMode, SymmetricMode } from './index'
9
+
10
+ let {
11
+ ordering = $bindable(`atomic_number`),
12
+ orderings = ELEMENT_ORDERINGS,
13
+ controls_open = $bindable(false),
14
+ toggle_visible = $bindable(false),
15
+ normalize = $bindable(`linear`),
16
+ domain_mode = $bindable(`auto`),
17
+ show_legend = $bindable(false),
18
+ legend_position = $bindable(`bottom`),
19
+ search_query = $bindable(``),
20
+ symmetric = $bindable<SymmetricMode>(false),
21
+ show_values = $bindable<boolean | string>(false),
22
+ show_row_summaries = $bindable(false),
23
+ show_col_summaries = $bindable(false),
24
+ theme = $bindable<`default` | `light` | `dark` | `publication`>(`default`),
25
+ export_formats = [`csv`, `json`],
26
+ onexport,
27
+ show_pane = true,
28
+ pane_props = {},
29
+ toggle_props = {},
30
+ children,
31
+ }: {
32
+ ordering?: ElementAxisOrderingKey
33
+ orderings?: ElementAxisOrderingKey[]
34
+ controls_open?: boolean
35
+ toggle_visible?: boolean
36
+ normalize?: NormalizeMode
37
+ domain_mode?: DomainMode
38
+ show_legend?: boolean
39
+ legend_position?: LegendPosition
40
+ search_query?: string
41
+ symmetric?: SymmetricMode
42
+ show_values?: boolean | string
43
+ show_row_summaries?: boolean
44
+ show_col_summaries?: boolean
45
+ theme?: `default` | `light` | `dark` | `publication`
46
+ export_formats?: HeatmapExportFormat[]
47
+ onexport?: (format: HeatmapExportFormat) => void
48
+ show_pane?: boolean
49
+ pane_props?: ComponentProps<typeof DraggablePane>[`pane_props`]
50
+ toggle_props?: ComponentProps<typeof DraggablePane>[`toggle_props`]
51
+ children?: Snippet<[{ controls_open: boolean }]>
52
+ } = $props()
53
+
54
+ function merge_styles(base_style: string, override_style: unknown): string {
55
+ const override_style_str = typeof override_style === `string`
56
+ ? override_style
57
+ : ``
58
+ return override_style_str ? `${base_style}; ${override_style_str}` : base_style
59
+ }
60
+
61
+ // Stash custom format string so toggling the checkbox preserves it
62
+ let stashed_format = $state<string | null>(null)
63
+
64
+ let show_toggle = $derived(controls_open || toggle_visible)
65
+ let default_toggle_style = $derived(
66
+ [
67
+ `position: absolute`,
68
+ `top: var(--heatmap-matrix-controls-toggle-top, 6px)`,
69
+ `right: var(--heatmap-matrix-controls-toggle-right, 6px)`,
70
+ `z-index: var(--heatmap-matrix-controls-toggle-z-index, 20)`,
71
+ `opacity: ${show_toggle ? `1` : `0`}`,
72
+ `pointer-events: ${show_toggle ? `auto` : `none`}`,
73
+ `transition: var(--heatmap-matrix-controls-toggle-transition, opacity 0.2s ease)`,
74
+ ].join(`; `),
75
+ )
76
+ const default_pane_style = [
77
+ `z-index: var(--heatmap-matrix-controls-pane-z-index, 25)`,
78
+ `min-width: var(--heatmap-matrix-controls-pane-min-width, 220px)`,
79
+ ].join(`; `)
80
+ </script>
81
+
82
+ <DraggablePane
83
+ bind:show={controls_open}
84
+ {show_pane}
85
+ pane_props={{
86
+ ...pane_props,
87
+ class: `heatmap-controls ${pane_props?.class ?? ``}`.trim(),
88
+ style: merge_styles(default_pane_style, pane_props?.style),
89
+ }}
90
+ toggle_props={{
91
+ ...toggle_props,
92
+ title: toggle_props.title ?? (controls_open ? `` : `Heatmap controls`),
93
+ class: `heatmap-matrix-controls-toggle ${toggle_props?.class ?? ``}`.trim(),
94
+ style: merge_styles(default_toggle_style, toggle_props?.style),
95
+ }}
96
+ closed_icon="Settings"
97
+ open_icon="Cross"
98
+ >
99
+ <label>
100
+ Ordering
101
+ <select bind:value={ordering}>
102
+ {#each orderings as ord (ord)}
103
+ <option value={ord}>{ORDERING_LABELS[ord]}</option>
104
+ {/each}
105
+ </select>
106
+ </label>
107
+ <label>
108
+ Search
109
+ <input bind:value={search_query} placeholder="Filter labels/keys" />
110
+ </label>
111
+ <div class="pane-row">
112
+ <label>
113
+ Normalize
114
+ <select bind:value={normalize}>
115
+ <option value="linear">linear</option>
116
+ <option value="log">log</option>
117
+ </select>
118
+ </label>
119
+ <label>
120
+ Domain
121
+ <select bind:value={domain_mode}>
122
+ <option value="auto">auto</option>
123
+ <option value="robust">robust</option>
124
+ <option value="fixed">fixed</option>
125
+ </select>
126
+ </label>
127
+ </div>
128
+ <div class="pane-row">
129
+ <label>
130
+ <input type="checkbox" bind:checked={show_legend} />
131
+ Legend
132
+ </label>
133
+ {#if show_legend}
134
+ <label>
135
+ Position
136
+ <select bind:value={legend_position}>
137
+ <option value="right">right</option>
138
+ <option value="bottom">bottom</option>
139
+ </select>
140
+ </label>
141
+ {/if}
142
+ </div>
143
+ <div class="pane-row">
144
+ <label>
145
+ Symmetric
146
+ <select bind:value={symmetric}>
147
+ <option value={false}>off</option>
148
+ <option value="lower">lower</option>
149
+ <option value="upper">upper</option>
150
+ </select>
151
+ </label>
152
+ <label>
153
+ Theme
154
+ <select bind:value={theme}>
155
+ <option value="default">default</option>
156
+ <option value="light">light</option>
157
+ <option value="dark">dark</option>
158
+ <option value="publication">publication</option>
159
+ </select>
160
+ </label>
161
+ </div>
162
+ <div class="pane-row">
163
+ <label>
164
+ <input
165
+ type="checkbox"
166
+ checked={!!show_values}
167
+ onchange={(evt) => {
168
+ if (evt.currentTarget.checked) {
169
+ show_values = stashed_format || true
170
+ } else {
171
+ stashed_format = typeof show_values === `string` ? show_values : null
172
+ show_values = false
173
+ }
174
+ }}
175
+ />
176
+ Values
177
+ </label>
178
+ <label>
179
+ <input type="checkbox" bind:checked={show_row_summaries} />
180
+ Row sums
181
+ </label>
182
+ <label>
183
+ <input type="checkbox" bind:checked={show_col_summaries} />
184
+ Col sums
185
+ </label>
186
+ </div>
187
+ <div class="pane-row">
188
+ {#each export_formats as export_format (export_format)}
189
+ <button type="button" onclick={() => onexport?.(export_format)}>
190
+ Export {export_format.toUpperCase()}
191
+ </button>
192
+ {/each}
193
+ </div>
194
+ {@render children?.({ controls_open })}
195
+ </DraggablePane>
196
+
197
+ <style>
198
+ :global(.heatmap-controls) {
199
+ font-size: 0.85em;
200
+ max-width: 320px;
201
+ }
202
+ .pane-row {
203
+ display: flex;
204
+ gap: 10pt;
205
+ flex-wrap: wrap;
206
+ }
207
+ label {
208
+ display: flex;
209
+ align-items: center;
210
+ gap: 6pt;
211
+ }
212
+ select,
213
+ input:not([type]) {
214
+ height: 1.8em;
215
+ padding: 0 0.5em;
216
+ border-radius: var(--border-radius, 3pt);
217
+ border: 1px solid light-dark(#ccc, #555);
218
+ background: light-dark(white, #333);
219
+ color: inherit;
220
+ font: inherit;
221
+ box-sizing: border-box;
222
+ flex: 1;
223
+ min-width: 0;
224
+ }
225
+ </style>
@@ -0,0 +1,30 @@
1
+ import DraggablePane from '../overlays/DraggablePane.svelte';
2
+ import type { ComponentProps, Snippet } from 'svelte';
3
+ import type { ElementAxisOrderingKey, DomainMode, HeatmapExportFormat, LegendPosition, NormalizeMode, SymmetricMode } from './index';
4
+ type $$ComponentProps = {
5
+ ordering?: ElementAxisOrderingKey;
6
+ orderings?: ElementAxisOrderingKey[];
7
+ controls_open?: boolean;
8
+ toggle_visible?: boolean;
9
+ normalize?: NormalizeMode;
10
+ domain_mode?: DomainMode;
11
+ show_legend?: boolean;
12
+ legend_position?: LegendPosition;
13
+ search_query?: string;
14
+ symmetric?: SymmetricMode;
15
+ show_values?: boolean | string;
16
+ show_row_summaries?: boolean;
17
+ show_col_summaries?: boolean;
18
+ theme?: `default` | `light` | `dark` | `publication`;
19
+ export_formats?: HeatmapExportFormat[];
20
+ onexport?: (format: HeatmapExportFormat) => void;
21
+ show_pane?: boolean;
22
+ pane_props?: ComponentProps<typeof DraggablePane>[`pane_props`];
23
+ toggle_props?: ComponentProps<typeof DraggablePane>[`toggle_props`];
24
+ children?: Snippet<[{
25
+ controls_open: boolean;
26
+ }]>;
27
+ };
28
+ declare const HeatmapMatrixControls: import("svelte").Component<$$ComponentProps, {}, "normalize" | "theme" | "show_legend" | "controls_open" | "show_values" | "ordering" | "toggle_visible" | "domain_mode" | "legend_position" | "search_query" | "symmetric" | "show_row_summaries" | "show_col_summaries">;
29
+ type HeatmapMatrixControls = ReturnType<typeof HeatmapMatrixControls>;
30
+ export default HeatmapMatrixControls;
@@ -0,0 +1,53 @@
1
+ import type { ChemicalElement, ElementSymbol } from '../element';
2
+ import type { Snippet } from 'svelte';
3
+ export { COLOR_OVERRIDE_KEY_SEPARATOR, make_color_override_key } from './shared';
4
+ export type AxisItem<T = Record<string, unknown>> = {
5
+ label: string;
6
+ key?: string;
7
+ sort_value?: number;
8
+ category?: string;
9
+ data?: T;
10
+ };
11
+ export type CellContext = {
12
+ x_item: AxisItem;
13
+ y_item: AxisItem;
14
+ x_idx: number;
15
+ y_idx: number;
16
+ value: number | string | null;
17
+ bg_color: string | null;
18
+ };
19
+ export declare const ORDERING_LABELS: {
20
+ readonly atomic_number: "Atomic Number";
21
+ readonly mendeleev_number: "Pettifor Chemical Similarity";
22
+ readonly alphabetical: "Alphabetical";
23
+ readonly atomic_mass: "Atomic Mass";
24
+ readonly electronegativity: "Pauling Electronegativity";
25
+ readonly first_ionization: "Ionization Energy";
26
+ readonly melting_point: "Melting Point";
27
+ readonly atomic_radius: "Atomic Radius";
28
+ readonly density: "Density";
29
+ readonly n_valence: "Valence Electrons";
30
+ };
31
+ export type ElementAxisOrderingKey = keyof typeof ORDERING_LABELS;
32
+ export type ElementAxisOrdering = ElementAxisOrderingKey | ((a: ChemicalElement, b: ChemicalElement) => number);
33
+ export type NormalizeMode = `linear` | `log` | ((value: number, min: number, max: number) => number);
34
+ export type DomainMode = `auto` | `robust` | `fixed`;
35
+ export type LegendPosition = `right` | `bottom`;
36
+ export type SymmetricMode = boolean | `lower` | `upper`;
37
+ export type HeatmapTooltipProp = Snippet<[CellContext]> | boolean;
38
+ export type HeatmapSelection = {
39
+ x_idx: number;
40
+ y_idx: number;
41
+ };
42
+ export type HeatmapExportFormat = `csv` | `json`;
43
+ export type HeatmapBrushPayload = {
44
+ x_range: [number, number];
45
+ y_range: [number, number];
46
+ cells: CellContext[];
47
+ };
48
+ export declare const ELEMENT_ORDERINGS: ElementAxisOrderingKey[];
49
+ export declare function matrix_to_rows(x_items: AxisItem[], y_items: AxisItem[], values: (number | string | null)[][] | Record<string, Record<string, number | string | null>>): Record<string, number | string | null>[];
50
+ export declare function rows_to_csv(rows: Record<string, number | string | null>[]): string;
51
+ export declare function elements_to_axis(symbols?: ElementSymbol[], ordering?: ElementAxisOrdering): AxisItem<ChemicalElement>[];
52
+ export { default as HeatmapMatrix } from './HeatmapMatrix.svelte';
53
+ export { default as HeatmapMatrixControls } from './HeatmapMatrixControls.svelte';
@@ -0,0 +1,100 @@
1
+ import { element_data } from '../element';
2
+ export { COLOR_OVERRIDE_KEY_SEPARATOR, make_color_override_key } from './shared';
3
+ // Human-readable labels for built-in orderings
4
+ export const ORDERING_LABELS = {
5
+ atomic_number: `Atomic Number`,
6
+ mendeleev_number: `Pettifor Chemical Similarity`,
7
+ alphabetical: `Alphabetical`,
8
+ atomic_mass: `Atomic Mass`,
9
+ electronegativity: `Pauling Electronegativity`,
10
+ first_ionization: `Ionization Energy`,
11
+ melting_point: `Melting Point`,
12
+ atomic_radius: `Atomic Radius`,
13
+ density: `Density`,
14
+ n_valence: `Valence Electrons`,
15
+ };
16
+ // All built-in string ordering keys
17
+ export const ELEMENT_ORDERINGS = Object.keys(ORDERING_LABELS);
18
+ export function matrix_to_rows(x_items, y_items, values) {
19
+ const get_value = Array.isArray(values)
20
+ ? (x_idx, y_idx) => values[y_idx]?.[x_idx] ?? null
21
+ : (x_idx, y_idx) => {
22
+ const y_key = y_items[y_idx].key ?? y_items[y_idx].label;
23
+ const x_key = x_items[x_idx].key ?? x_items[x_idx].label;
24
+ return values[y_key]?.[x_key] ?? null;
25
+ };
26
+ return y_items.map((y_item, y_idx) => {
27
+ const row = {
28
+ y_key: y_item.key ?? y_item.label,
29
+ };
30
+ for (const [x_idx, x_item] of x_items.entries()) {
31
+ row[x_item.key ?? x_item.label] = get_value(x_idx, y_idx);
32
+ }
33
+ return row;
34
+ });
35
+ }
36
+ export function rows_to_csv(rows) {
37
+ if (!rows.length)
38
+ return ``;
39
+ const escape_csv_field = (value) => {
40
+ const field = String(value ?? ``);
41
+ if (!/[",\n\r]/.test(field))
42
+ return field;
43
+ return `"${field.replaceAll(`"`, `""`)}"`;
44
+ };
45
+ const headers = Object.keys(rows[0]);
46
+ const lines = [
47
+ headers.map((header) => escape_csv_field(header)).join(`,`),
48
+ ...rows.map((row) => headers.map((header) => escape_csv_field(row[header])).join(`,`)),
49
+ ];
50
+ return lines.join(`\n`);
51
+ }
52
+ // === Helpers ===
53
+ // Map ordering keys to ChemicalElement property names where they differ
54
+ const PROPERTY_MAP = {
55
+ atomic_number: `number`,
56
+ electronegativity: `electronegativity_pauling`,
57
+ };
58
+ // Convert element data to axis items with a given ordering.
59
+ // Optionally filter to a subset of element symbols.
60
+ export function elements_to_axis(symbols, ordering = `atomic_number`) {
61
+ let elements = [...element_data];
62
+ // Filter to subset if specified
63
+ if (symbols) {
64
+ const symbol_set = new Set(symbols);
65
+ elements = elements.filter((el) => symbol_set.has(el.symbol));
66
+ }
67
+ // Sort elements
68
+ if (typeof ordering === `function`) {
69
+ elements.sort(ordering);
70
+ }
71
+ else if (ordering === `alphabetical`) {
72
+ elements.sort((a, b) => a.symbol.localeCompare(b.symbol));
73
+ }
74
+ else {
75
+ // Sort by the named property, nulls/undefined last
76
+ const key = PROPERTY_MAP[ordering] ?? ordering;
77
+ elements.sort((a, b) => {
78
+ const val_a = (a[key] ?? null);
79
+ const val_b = (b[key] ?? null);
80
+ if (val_a === null && val_b === null)
81
+ return 0;
82
+ if (val_a === null)
83
+ return 1;
84
+ if (val_b === null)
85
+ return -1;
86
+ return val_a - val_b;
87
+ });
88
+ }
89
+ // Convert to AxisItem[]
90
+ return elements.map((el, idx) => ({
91
+ label: el.symbol,
92
+ key: el.symbol,
93
+ sort_value: idx,
94
+ category: el.category,
95
+ data: el,
96
+ }));
97
+ }
98
+ // === Component Exports ===
99
+ export { default as HeatmapMatrix } from './HeatmapMatrix.svelte';
100
+ export { default as HeatmapMatrixControls } from './HeatmapMatrixControls.svelte';
@@ -0,0 +1,2 @@
1
+ export declare const COLOR_OVERRIDE_KEY_SEPARATOR = "\0";
2
+ export declare const make_color_override_key: (x_key: string, y_key: string) => string;
@@ -0,0 +1,4 @@
1
+ // Shared helpers/constants used by HeatmapMatrix module pieces.
2
+ // Key format for color_overrides lookups: `${x_key}\0${y_key}`.
3
+ export const COLOR_OVERRIDE_KEY_SEPARATOR = `\0`;
4
+ export const make_color_override_key = (x_key, y_key) => `${x_key}${COLOR_OVERRIDE_KEY_SEPARATOR}${y_key}`;
package/dist/icons.d.ts CHANGED
@@ -454,5 +454,116 @@ export declare const ICON_DATA: {
454
454
  readonly viewBox: "0 0 24 24";
455
455
  readonly path: "M4 18q-1.25 0-2.125-.875T1 15V9q0-1.25.875-2.125T4 6h13.5q1.25 0 2.125.875T20.5 9v6q0 1.25-.875 2.125T17.5 18zm0-2h13.5q.425 0 .713-.288T18.5 15V9q0-.425-.288-.712T17.5 8H4q-.425 0-.712.288T3 9v6q0 .425.288.713T4 16m17.5-1.5v-5h.5q.425 0 .713.288T23 10.5v3q0 .425-.288.713T22 14.5zM4 14v-4q0-.425.288-.712T5 9h10q.425 0 .713.288T16 10v4q0 .425-.288.713T15 15H5q-.425 0-.712-.288T4 14";
456
456
  };
457
+ readonly Filter: {
458
+ readonly viewBox: "0 0 24 24";
459
+ readonly path: "M22 3H2l8 9.46V19l4 2v-8.54z";
460
+ };
461
+ readonly Eye: {
462
+ readonly viewBox: "0 0 24 24";
463
+ readonly path: "M12 9a3 3 0 1 0 0 6a3 3 0 0 0 0-6m0 8a5 5 0 1 1 0-10a5 5 0 0 1 0 10m0-12.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5";
464
+ };
465
+ readonly EyeOff: {
466
+ readonly viewBox: "0 0 24 24";
467
+ readonly path: "M11.83 9L15 12.16V12a3 3 0 0 0-3-3zm-4.3.8l1.55 1.55c-.05.21-.08.42-.08.65a3 3 0 0 0 3 3c.22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53a5 5 0 0 1-5-5c0-.79.2-1.53.53-2.2M2 4.27l2.28 2.28l.45.45C3.08 8.3 1.78 10 1 12c1.73 4.39 6 7.5 11 7.5c1.55 0 3.03-.3 4.38-.84l.43.42L19.73 22L21 20.73L3.27 3M12 7a5 5 0 0 1 5 5c0 .64-.13 1.26-.36 1.82l2.93 2.93c1.5-1.25 2.7-2.89 3.43-4.75c-1.73-4.39-6-7.5-11-7.5c-1.4 0-2.74.25-4 .7l2.17 2.15C10.74 7.13 11.35 7 12 7";
468
+ };
469
+ readonly Pin: {
470
+ readonly viewBox: "0 0 24 24";
471
+ readonly path: "M16 12V4h1V2H7v2h1v8l-2 2v2h5.2v6h1.6v-6H18v-2z";
472
+ };
473
+ readonly Unpin: {
474
+ readonly viewBox: "0 0 24 24";
475
+ readonly path: "M2 5.27L3.28 4L20 20.72L18.73 22l-5.93-5.93V22h-1.6v-6H6v-2l2-2v-.73zM16 12l2 2v2h-.18L8 6.18V4H7V2h10v2h-1z";
476
+ };
477
+ readonly ArrowLeft: {
478
+ readonly viewBox: "0 0 24 24";
479
+ readonly path: "M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z";
480
+ };
481
+ readonly ArrowRight: {
482
+ readonly viewBox: "0 0 24 24";
483
+ readonly path: "M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z";
484
+ };
485
+ readonly ZoomIn: {
486
+ readonly viewBox: "0 0 24 24";
487
+ readonly stroke: "currentColor";
488
+ readonly path: "<g fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"11\" cy=\"11\" r=\"8\"/><line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"/><line x1=\"11\" y1=\"8\" x2=\"11\" y2=\"14\"/><line x1=\"8\" y1=\"11\" x2=\"14\" y2=\"11\"/></g>";
489
+ };
490
+ readonly ZoomOut: {
491
+ readonly viewBox: "0 0 24 24";
492
+ readonly stroke: "currentColor";
493
+ readonly path: "<g fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><circle cx=\"11\" cy=\"11\" r=\"8\"/><line x1=\"21\" y1=\"21\" x2=\"16.65\" y2=\"16.65\"/><line x1=\"8\" y1=\"11\" x2=\"14\" y2=\"11\"/></g>";
494
+ };
495
+ readonly Play: {
496
+ readonly viewBox: "0 0 24 24";
497
+ readonly path: "M8 5v14l11-7z";
498
+ };
499
+ readonly Pause: {
500
+ readonly viewBox: "0 0 24 24";
501
+ readonly path: "M6 19h4V5H6zm8-14v14h4V5z";
502
+ };
503
+ readonly ExternalLink: {
504
+ readonly viewBox: "0 0 24 24";
505
+ readonly stroke: "currentColor";
506
+ readonly path: "<g fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/><polyline points=\"15 3 21 3 21 9\"/><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"/></g>";
507
+ };
508
+ readonly Sort: {
509
+ readonly viewBox: "0 0 24 24";
510
+ readonly path: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z";
511
+ };
512
+ readonly SortAsc: {
513
+ readonly viewBox: "0 0 24 24";
514
+ readonly path: "M3 18v-2h6v2zM3 13v-2h12v2zM3 8V6h13v2zM19 18V10h-2l3-5l3 5h-2v8z";
515
+ };
516
+ readonly SortDesc: {
517
+ readonly viewBox: "0 0 24 24";
518
+ readonly path: "M3 18v-2h6v2zM3 13v-2h12v2zM3 8V6h13v2zM19 6v8h-2l3 5l3-5h-2V6z";
519
+ };
520
+ readonly BrillouinZone: {
521
+ readonly viewBox: "0 0 24 24";
522
+ readonly stroke: "currentColor";
523
+ readonly path: "<g stroke-width=\"1.3\" fill=\"none\"><polygon points=\"12,1 22,7 22,17 12,23 2,17 2,7\"/><line x1=\"2\" y1=\"7\" x2=\"22\" y2=\"17\"/><line x1=\"12\" y1=\"1\" x2=\"12\" y2=\"23\"/><line x1=\"22\" y1=\"7\" x2=\"2\" y2=\"17\"/></g>";
524
+ };
525
+ readonly BandStructure: {
526
+ readonly viewBox: "0 0 28 24";
527
+ readonly stroke: "currentColor";
528
+ readonly path: "<g stroke-width=\"1.3\" fill=\"none\" stroke-linecap=\"round\"><path d=\"M1 20c3-4 5-6 7-6s5 5 7 5 5-4 7-4\"/><path d=\"M1 17c2-3 5-5 7-3s5 4 7 3 5-5 7-3\"/><line x1=\"1\" y1=\"12\" x2=\"27\" y2=\"12\" stroke-dasharray=\"2 1.5\" opacity=\"0.2\"/><path d=\"M1 9c3 3 5 5 7 5s5-5 7-5 5 3 7 3\"/><path d=\"M1 6c2 2 5 4 7 2s5-3 7-2 5 4 7 2\"/><path d=\"M1 4c3 1 5 1 7 0s5-1 7 0 5 1 7 0\" opacity=\"0.5\"/><line x1=\"8\" y1=\"1\" x2=\"8\" y2=\"23\" stroke-dasharray=\"1.5 1.5\" opacity=\"0.2\"/><line x1=\"15\" y1=\"1\" x2=\"15\" y2=\"23\" stroke-dasharray=\"1.5 1.5\" opacity=\"0.2\"/><line x1=\"22\" y1=\"1\" x2=\"22\" y2=\"23\" stroke-dasharray=\"1.5 1.5\" opacity=\"0.2\"/></g>";
529
+ };
530
+ readonly DensityOfStates: {
531
+ readonly viewBox: "0 0 24 24";
532
+ readonly stroke: "currentColor";
533
+ readonly path: "<line x1=\"3\" y1=\"21\" x2=\"21\" y2=\"21\" stroke-width=\"0.7\" opacity=\"0.3\"/><path d=\"M3 21C3 21 4 21 5 11C6 21 7 21 9 21C9 21 10 21 11 15C12 21 13 21 14 21C14 21 15 21 16.5 6C18 21 19 21 21 21\" stroke-width=\"1.2\" fill=\"none\" stroke-linecap=\"round\"/><path d=\"M3 21C3 21 4 21 5 11C6 21 7 21 9 21C9 21 10 21 11 15C12 21 13 21 14 21C14 21 15 21 16.5 6C18 21 19 21 21 21Z\" fill=\"currentColor\" stroke=\"none\" opacity=\"0.12\"/>";
534
+ };
535
+ readonly BandsDOS: {
536
+ readonly viewBox: "0 0 24 24";
537
+ readonly path: "<path fill=\"currentColor\" d=\"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M4 4h10v16H4zm12 0h4v16h-4z\"/>";
538
+ };
539
+ readonly ThreePanels: {
540
+ readonly viewBox: "0 0 24 24";
541
+ readonly path: "<path fill=\"currentColor\" d=\"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M4 4h5v16H4zm7 0h9v8h-9zm0 10h9v6h-9z\"/>";
542
+ };
543
+ readonly FermiSurface: {
544
+ readonly viewBox: "0 0 24 24";
545
+ readonly stroke: "currentColor";
546
+ readonly path: "<g stroke-width=\"1.3\" fill=\"none\"><circle cx=\"12\" cy=\"12\" r=\"9\" opacity=\"0.3\"/><ellipse cx=\"12\" cy=\"12\" rx=\"9\" ry=\"4\"/><ellipse cx=\"12\" cy=\"12\" rx=\"4\" ry=\"9\"/><ellipse cx=\"12\" cy=\"12\" rx=\"6\" ry=\"7\" transform=\"rotate(45 12 12)\" opacity=\"0.5\"/></g>";
547
+ };
548
+ readonly ScatterPlot3D: {
549
+ readonly viewBox: "0 0 24 24";
550
+ readonly path: "<g stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" stroke-linecap=\"round\"><line x1=\"3\" y1=\"21\" x2=\"3\" y2=\"5\"/><line x1=\"3\" y1=\"21\" x2=\"21\" y2=\"21\"/><line x1=\"3\" y1=\"21\" x2=\"9\" y2=\"15\"/></g><circle cx=\"11\" cy=\"11\" r=\"1.5\" fill=\"currentColor\"/><circle cx=\"16\" cy=\"15\" r=\"1.5\" fill=\"currentColor\"/><circle cx=\"8\" cy=\"16\" r=\"1.5\" fill=\"currentColor\"/><circle cx=\"15\" cy=\"8\" r=\"1.5\" fill=\"currentColor\"/>";
551
+ };
552
+ readonly SpacegroupBarPlot: {
553
+ readonly viewBox: "0 0 24 24";
554
+ readonly path: "<rect x=\"2\" y=\"13\" width=\"3.5\" height=\"8\" fill=\"currentColor\"/><rect x=\"7\" y=\"7\" width=\"3.5\" height=\"14\" fill=\"currentColor\"/><rect x=\"12\" y=\"10\" width=\"3.5\" height=\"11\" fill=\"currentColor\"/><rect x=\"17\" y=\"5\" width=\"3.5\" height=\"16\" fill=\"currentColor\"/><path d=\"M21 2l1.5 2.5h-3z\" fill=\"currentColor\" opacity=\"0.5\"/>";
555
+ };
556
+ readonly HeatmapMatrix: {
557
+ readonly viewBox: "0 0 24 24";
558
+ readonly path: "<rect x=\"2\" y=\"2\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.9\"/><rect x=\"9.2\" y=\"2\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.4\"/><rect x=\"16.5\" y=\"2\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.15\"/><rect x=\"2\" y=\"9.2\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.5\"/><rect x=\"9.2\" y=\"9.2\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.8\"/><rect x=\"16.5\" y=\"9.2\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.35\"/><rect x=\"2\" y=\"16.5\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.2\"/><rect x=\"9.2\" y=\"16.5\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\" opacity=\"0.65\"/><rect x=\"16.5\" y=\"16.5\" width=\"5.5\" height=\"5.5\" rx=\"0.8\" fill=\"currentColor\"/>";
559
+ };
560
+ readonly HeatmapTable: {
561
+ readonly viewBox: "0 0 24 24";
562
+ readonly path: "<rect x=\"2\" y=\"2\" width=\"20\" height=\"4\" rx=\"1\" fill=\"currentColor\" opacity=\"0.25\"/><rect x=\"2\" y=\"8\" width=\"9\" height=\"3.5\" rx=\"0.5\" fill=\"currentColor\" opacity=\"0.6\"/><rect x=\"13\" y=\"8\" width=\"9\" height=\"3.5\" rx=\"0.5\" fill=\"currentColor\" opacity=\"0.35\"/><rect x=\"2\" y=\"13.5\" width=\"9\" height=\"3.5\" rx=\"0.5\" fill=\"currentColor\" opacity=\"0.85\"/><rect x=\"13\" y=\"13.5\" width=\"9\" height=\"3.5\" rx=\"0.5\" fill=\"currentColor\" opacity=\"0.5\"/><rect x=\"2\" y=\"19\" width=\"9\" height=\"3.5\" rx=\"0.5\" fill=\"currentColor\" opacity=\"0.3\"/><rect x=\"13\" y=\"19\" width=\"9\" height=\"3.5\" rx=\"0.5\" fill=\"currentColor\" opacity=\"0.9\"/>";
563
+ };
564
+ readonly ColorBar: {
565
+ readonly viewBox: "0 0 24 24";
566
+ readonly path: "<rect x=\"6\" y=\"2\" width=\"5\" height=\"20\" rx=\"2.5\" fill=\"currentColor\" opacity=\"0.15\"/><rect x=\"6\" y=\"2\" width=\"5\" height=\"15\" rx=\"2.5\" fill=\"currentColor\" opacity=\"0.4\"/><rect x=\"6\" y=\"2\" width=\"5\" height=\"10\" rx=\"2.5\" fill=\"currentColor\" opacity=\"0.7\"/><rect x=\"6\" y=\"2\" width=\"5\" height=\"5\" rx=\"2.5\" fill=\"currentColor\"/><g stroke=\"currentColor\" stroke-width=\"1.2\" opacity=\"0.5\"><line x1=\"13\" y1=\"4\" x2=\"16\" y2=\"4\"/><line x1=\"13\" y1=\"12\" x2=\"16\" y2=\"12\"/><line x1=\"13\" y1=\"20\" x2=\"16\" y2=\"20\"/></g>";
567
+ };
457
568
  };
458
569
  export type IconName = keyof typeof ICON_DATA;