matterviz 0.3.0 → 0.3.2

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 (286) hide show
  1. package/dist/FilePicker.svelte +37 -20
  2. package/dist/Icon.svelte +2 -2
  3. package/dist/MillerIndexInput.svelte +60 -0
  4. package/dist/MillerIndexInput.svelte.d.ts +7 -0
  5. package/dist/app.css +38 -2
  6. package/dist/brillouin/BrillouinZone.svelte +20 -62
  7. package/dist/brillouin/BrillouinZone.svelte.d.ts +1 -1
  8. package/dist/brillouin/BrillouinZoneExportPane.svelte +12 -20
  9. package/dist/brillouin/BrillouinZoneScene.svelte +2 -2
  10. package/dist/brillouin/BrillouinZoneScene.svelte.d.ts +1 -1
  11. package/dist/chempot-diagram/ChemPotDiagram.svelte +192 -0
  12. package/dist/chempot-diagram/ChemPotDiagram.svelte.d.ts +13 -0
  13. package/dist/chempot-diagram/ChemPotDiagram2D.svelte +677 -0
  14. package/dist/chempot-diagram/ChemPotDiagram2D.svelte.d.ts +16 -0
  15. package/dist/chempot-diagram/ChemPotDiagram3D.svelte +2688 -0
  16. package/dist/chempot-diagram/ChemPotDiagram3D.svelte.d.ts +16 -0
  17. package/dist/chempot-diagram/ChemPotScene3D.svelte +8 -0
  18. package/dist/chempot-diagram/ChemPotScene3D.svelte.d.ts +7 -0
  19. package/dist/chempot-diagram/color.d.ts +10 -0
  20. package/dist/chempot-diagram/color.js +33 -0
  21. package/dist/chempot-diagram/compute.d.ts +38 -0
  22. package/dist/chempot-diagram/compute.js +650 -0
  23. package/dist/chempot-diagram/index.d.ts +5 -0
  24. package/dist/chempot-diagram/index.js +5 -0
  25. package/dist/chempot-diagram/pointer.d.ts +16 -0
  26. package/dist/chempot-diagram/pointer.js +40 -0
  27. package/dist/chempot-diagram/temperature.d.ts +15 -0
  28. package/dist/chempot-diagram/temperature.js +37 -0
  29. package/dist/chempot-diagram/types.d.ts +83 -0
  30. package/dist/chempot-diagram/types.js +27 -0
  31. package/dist/colors/index.d.ts +3 -1
  32. package/dist/colors/index.js +4 -0
  33. package/dist/composition/BarChart.svelte +13 -22
  34. package/dist/composition/BubbleChart.svelte +5 -3
  35. package/dist/composition/FormulaFilter.svelte +770 -90
  36. package/dist/composition/FormulaFilter.svelte.d.ts +37 -1
  37. package/dist/composition/PieChart.svelte +43 -18
  38. package/dist/composition/PieChart.svelte.d.ts +1 -1
  39. package/dist/constants.d.ts +1 -0
  40. package/dist/constants.js +2 -0
  41. package/dist/convex-hull/ConvexHull.svelte +14 -1
  42. package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -1
  43. package/dist/convex-hull/ConvexHull2D.svelte +14 -45
  44. package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
  45. package/dist/convex-hull/ConvexHull3D.svelte +396 -134
  46. package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
  47. package/dist/convex-hull/ConvexHull4D.svelte +93 -42
  48. package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
  49. package/dist/convex-hull/ConvexHullControls.svelte +94 -31
  50. package/dist/convex-hull/ConvexHullControls.svelte.d.ts +4 -2
  51. package/dist/convex-hull/ConvexHullStats.svelte +697 -128
  52. package/dist/convex-hull/ConvexHullStats.svelte.d.ts +6 -1
  53. package/dist/convex-hull/ConvexHullTooltip.svelte +1 -0
  54. package/dist/convex-hull/GasPressureControls.svelte +72 -38
  55. package/dist/convex-hull/GasPressureControls.svelte.d.ts +2 -1
  56. package/dist/convex-hull/TemperatureSlider.svelte +46 -19
  57. package/dist/convex-hull/TemperatureSlider.svelte.d.ts +2 -1
  58. package/dist/convex-hull/demo-temperature.d.ts +6 -0
  59. package/dist/convex-hull/demo-temperature.js +36 -0
  60. package/dist/convex-hull/gas-thermodynamics.js +16 -5
  61. package/dist/convex-hull/helpers.d.ts +7 -1
  62. package/dist/convex-hull/helpers.js +45 -15
  63. package/dist/convex-hull/index.d.ts +15 -1
  64. package/dist/convex-hull/index.js +1 -0
  65. package/dist/convex-hull/thermodynamics.d.ts +8 -21
  66. package/dist/convex-hull/thermodynamics.js +106 -17
  67. package/dist/convex-hull/types.d.ts +7 -0
  68. package/dist/convex-hull/types.js +11 -0
  69. package/dist/coordination/CoordinationBarPlot.svelte +29 -46
  70. package/dist/element/BohrAtom.svelte +1 -1
  71. package/dist/element/data.js +2 -14
  72. package/dist/element/data.json.gz +0 -0
  73. package/dist/element/index.d.ts +1 -1
  74. package/dist/element/index.js +1 -0
  75. package/dist/element/types.d.ts +1 -0
  76. package/dist/fermi-surface/FermiSurface.svelte +21 -65
  77. package/dist/fermi-surface/FermiSurface.svelte.d.ts +1 -1
  78. package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
  79. package/dist/fermi-surface/FermiSurfaceScene.svelte +1 -1
  80. package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
  81. package/dist/fermi-surface/compute.js +1 -21
  82. package/dist/fermi-surface/marching-cubes.d.ts +2 -13
  83. package/dist/fermi-surface/marching-cubes.js +2 -519
  84. package/dist/fermi-surface/parse.js +17 -23
  85. package/dist/heatmap-matrix/HeatmapMatrix.svelte +1273 -0
  86. package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +110 -0
  87. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +171 -0
  88. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +31 -0
  89. package/dist/heatmap-matrix/index.d.ts +53 -0
  90. package/dist/heatmap-matrix/index.js +100 -0
  91. package/dist/heatmap-matrix/shared.d.ts +2 -0
  92. package/dist/heatmap-matrix/shared.js +4 -0
  93. package/dist/icons.d.ts +119 -0
  94. package/dist/icons.js +119 -0
  95. package/dist/index.d.ts +6 -1
  96. package/dist/index.js +6 -1
  97. package/dist/io/export.js +15 -3
  98. package/dist/io/file-drop.d.ts +7 -0
  99. package/dist/io/file-drop.js +43 -0
  100. package/dist/io/index.d.ts +2 -2
  101. package/dist/io/index.js +2 -112
  102. package/dist/io/types.d.ts +1 -0
  103. package/dist/io/url-drop.d.ts +2 -0
  104. package/dist/io/url-drop.js +118 -0
  105. package/dist/isosurface/Isosurface.svelte +231 -0
  106. package/dist/isosurface/Isosurface.svelte.d.ts +8 -0
  107. package/dist/isosurface/IsosurfaceControls.svelte +273 -0
  108. package/dist/isosurface/IsosurfaceControls.svelte.d.ts +9 -0
  109. package/dist/isosurface/index.d.ts +5 -0
  110. package/dist/isosurface/index.js +6 -0
  111. package/dist/isosurface/parse.d.ts +6 -0
  112. package/dist/isosurface/parse.js +548 -0
  113. package/dist/isosurface/slice.d.ts +11 -0
  114. package/dist/isosurface/slice.js +145 -0
  115. package/dist/isosurface/types.d.ts +55 -0
  116. package/dist/isosurface/types.js +178 -0
  117. package/dist/labels.d.ts +2 -1
  118. package/dist/labels.js +1 -0
  119. package/dist/layout/InfoTag.svelte +62 -62
  120. package/dist/layout/SubpageGrid.svelte +74 -0
  121. package/dist/layout/SubpageGrid.svelte.d.ts +14 -0
  122. package/dist/layout/index.d.ts +1 -0
  123. package/dist/layout/index.js +1 -0
  124. package/dist/layout/json-tree/JsonNode.svelte +226 -53
  125. package/dist/layout/json-tree/JsonTree.svelte +425 -51
  126. package/dist/layout/json-tree/JsonTree.svelte.d.ts +1 -1
  127. package/dist/layout/json-tree/JsonValue.svelte +218 -97
  128. package/dist/layout/json-tree/types.d.ts +27 -2
  129. package/dist/layout/json-tree/utils.d.ts +14 -1
  130. package/dist/layout/json-tree/utils.js +254 -0
  131. package/dist/marching-cubes.d.ts +14 -0
  132. package/dist/marching-cubes.js +519 -0
  133. package/dist/math.d.ts +8 -0
  134. package/dist/math.js +374 -7
  135. package/dist/overlays/ContextMenu.svelte +3 -2
  136. package/dist/overlays/DraggablePane.svelte +163 -58
  137. package/dist/overlays/DraggablePane.svelte.d.ts +2 -0
  138. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +232 -77
  139. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +6 -2
  140. package/dist/phase-diagram/PhaseDiagramControls.svelte +32 -11
  141. package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +3 -2
  142. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +103 -0
  143. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte.d.ts +15 -0
  144. package/dist/phase-diagram/PhaseDiagramExportPane.svelte +102 -95
  145. package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +7 -0
  146. package/dist/phase-diagram/PhaseDiagramTooltip.svelte +100 -26
  147. package/dist/phase-diagram/PhaseDiagramTooltip.svelte.d.ts +6 -3
  148. package/dist/phase-diagram/index.d.ts +2 -0
  149. package/dist/phase-diagram/index.js +2 -0
  150. package/dist/phase-diagram/svg-to-diagram.d.ts +2 -0
  151. package/dist/phase-diagram/svg-to-diagram.js +865 -0
  152. package/dist/phase-diagram/types.d.ts +10 -0
  153. package/dist/phase-diagram/utils.d.ts +7 -4
  154. package/dist/phase-diagram/utils.js +149 -59
  155. package/dist/plot/AxisLabel.svelte +26 -0
  156. package/dist/plot/AxisLabel.svelte.d.ts +16 -0
  157. package/dist/plot/BarPlot.svelte +473 -228
  158. package/dist/plot/BarPlot.svelte.d.ts +3 -3
  159. package/dist/plot/BarPlotControls.svelte +3 -2
  160. package/dist/plot/BarPlotControls.svelte.d.ts +1 -1
  161. package/dist/plot/ColorBar.svelte +54 -54
  162. package/dist/plot/ColorBar.svelte.d.ts +1 -1
  163. package/dist/plot/ElementScatter.svelte +4 -3
  164. package/dist/plot/FillArea.svelte +4 -1
  165. package/dist/plot/Histogram.svelte +320 -230
  166. package/dist/plot/Histogram.svelte.d.ts +2 -2
  167. package/dist/plot/HistogramControls.svelte +29 -10
  168. package/dist/plot/HistogramControls.svelte.d.ts +6 -2
  169. package/dist/plot/InteractiveAxisLabel.svelte.d.ts +2 -2
  170. package/dist/plot/PlotControls.svelte +109 -27
  171. package/dist/plot/PlotControls.svelte.d.ts +1 -1
  172. package/dist/plot/PlotLegend.svelte +1 -1
  173. package/dist/plot/PortalSelect.svelte +2 -1
  174. package/dist/plot/ReferenceLine.svelte +2 -1
  175. package/dist/plot/ReferenceLine.svelte.d.ts +1 -0
  176. package/dist/plot/ReferencePlane.svelte +1 -3
  177. package/dist/plot/ScatterPlot.svelte +343 -209
  178. package/dist/plot/ScatterPlot.svelte.d.ts +3 -3
  179. package/dist/plot/ScatterPlot3D.svelte.d.ts +2 -2
  180. package/dist/plot/ScatterPlot3DControls.svelte +203 -250
  181. package/dist/plot/ScatterPlot3DScene.svelte +4 -7
  182. package/dist/plot/ScatterPlot3DScene.svelte.d.ts +2 -2
  183. package/dist/plot/ScatterPlotControls.svelte +95 -55
  184. package/dist/plot/ScatterPlotControls.svelte.d.ts +1 -1
  185. package/dist/plot/ZeroLines.svelte +44 -0
  186. package/dist/plot/ZeroLines.svelte.d.ts +32 -0
  187. package/dist/plot/ZoomRect.svelte +21 -0
  188. package/dist/plot/ZoomRect.svelte.d.ts +8 -0
  189. package/dist/plot/axis-utils.d.ts +1 -1
  190. package/dist/plot/data-cleaning.js +1 -5
  191. package/dist/plot/index.d.ts +6 -2
  192. package/dist/plot/index.js +6 -2
  193. package/dist/plot/interactions.d.ts +8 -10
  194. package/dist/plot/interactions.js +10 -19
  195. package/dist/plot/layout.d.ts +7 -1
  196. package/dist/plot/layout.js +12 -4
  197. package/dist/plot/reference-line.d.ts +4 -21
  198. package/dist/plot/reference-line.js +7 -81
  199. package/dist/plot/types.d.ts +42 -17
  200. package/dist/plot/types.js +10 -0
  201. package/dist/plot/utils/label-placement.js +14 -11
  202. package/dist/plot/utils.d.ts +1 -0
  203. package/dist/plot/utils.js +14 -0
  204. package/dist/rdf/RdfPlot.svelte +55 -66
  205. package/dist/rdf/RdfPlot.svelte.d.ts +1 -1
  206. package/dist/rdf/index.d.ts +1 -1
  207. package/dist/rdf/index.js +1 -1
  208. package/dist/settings.d.ts +5 -0
  209. package/dist/settings.js +37 -3
  210. package/dist/spectral/Bands.svelte +515 -143
  211. package/dist/spectral/Bands.svelte.d.ts +22 -2
  212. package/dist/spectral/helpers.d.ts +23 -1
  213. package/dist/spectral/helpers.js +65 -9
  214. package/dist/spectral/types.d.ts +2 -0
  215. package/dist/structure/AtomLegend.svelte +31 -10
  216. package/dist/structure/AtomLegend.svelte.d.ts +1 -1
  217. package/dist/structure/CellSelect.svelte +92 -22
  218. package/dist/structure/Lattice.svelte +2 -0
  219. package/dist/structure/Structure.svelte +716 -173
  220. package/dist/structure/Structure.svelte.d.ts +7 -2
  221. package/dist/structure/StructureControls.svelte +26 -14
  222. package/dist/structure/StructureControls.svelte.d.ts +5 -1
  223. package/dist/structure/StructureInfoPane.svelte +7 -1
  224. package/dist/structure/StructureScene.svelte +386 -95
  225. package/dist/structure/StructureScene.svelte.d.ts +15 -4
  226. package/dist/structure/atom-properties.d.ts +6 -2
  227. package/dist/structure/atom-properties.js +38 -25
  228. package/dist/structure/export.js +10 -7
  229. package/dist/structure/ferrox-wasm-types.d.ts +3 -2
  230. package/dist/structure/ferrox-wasm-types.js +0 -3
  231. package/dist/structure/ferrox-wasm.d.ts +3 -2
  232. package/dist/structure/ferrox-wasm.js +1 -2
  233. package/dist/structure/index.d.ts +7 -0
  234. package/dist/structure/index.js +22 -0
  235. package/dist/structure/parse.js +19 -16
  236. package/dist/structure/partial-occupancy.d.ts +25 -0
  237. package/dist/structure/partial-occupancy.js +102 -0
  238. package/dist/structure/validation.js +6 -3
  239. package/dist/symmetry/SymmetryStats.svelte +18 -4
  240. package/dist/symmetry/WyckoffTable.svelte +18 -10
  241. package/dist/symmetry/index.d.ts +7 -4
  242. package/dist/symmetry/index.js +83 -18
  243. package/dist/table/HeatmapTable.svelte +468 -69
  244. package/dist/table/HeatmapTable.svelte.d.ts +13 -1
  245. package/dist/table/ToggleMenu.svelte +291 -44
  246. package/dist/table/ToggleMenu.svelte.d.ts +4 -1
  247. package/dist/table/index.d.ts +3 -0
  248. package/dist/tooltip/index.d.ts +1 -1
  249. package/dist/tooltip/index.js +1 -0
  250. package/dist/trajectory/Trajectory.svelte +147 -145
  251. package/dist/trajectory/TrajectoryExportPane.svelte +13 -9
  252. package/dist/trajectory/TrajectoryExportPane.svelte.d.ts +1 -1
  253. package/dist/trajectory/constants.d.ts +6 -0
  254. package/dist/trajectory/constants.js +7 -0
  255. package/dist/trajectory/extract.js +3 -5
  256. package/dist/trajectory/format-detect.d.ts +9 -0
  257. package/dist/trajectory/format-detect.js +76 -0
  258. package/dist/trajectory/frame-reader.d.ts +17 -0
  259. package/dist/trajectory/frame-reader.js +339 -0
  260. package/dist/trajectory/helpers.d.ts +15 -0
  261. package/dist/trajectory/helpers.js +187 -0
  262. package/dist/trajectory/index.d.ts +1 -0
  263. package/dist/trajectory/index.js +11 -4
  264. package/dist/trajectory/parse/ase.d.ts +2 -0
  265. package/dist/trajectory/parse/ase.js +76 -0
  266. package/dist/trajectory/parse/hdf5.d.ts +2 -0
  267. package/dist/trajectory/parse/hdf5.js +121 -0
  268. package/dist/trajectory/parse/index.d.ts +12 -0
  269. package/dist/trajectory/parse/index.js +304 -0
  270. package/dist/trajectory/parse/lammps.d.ts +5 -0
  271. package/dist/trajectory/parse/lammps.js +169 -0
  272. package/dist/trajectory/parse/vasp.d.ts +2 -0
  273. package/dist/trajectory/parse/vasp.js +65 -0
  274. package/dist/trajectory/parse/xyz.d.ts +2 -0
  275. package/dist/trajectory/parse/xyz.js +109 -0
  276. package/dist/trajectory/types.d.ts +11 -0
  277. package/dist/trajectory/types.js +1 -0
  278. package/dist/utils.d.ts +2 -0
  279. package/dist/utils.js +4 -0
  280. package/dist/xrd/XrdPlot.svelte +6 -4
  281. package/dist/xrd/calc-xrd.js +0 -1
  282. package/package.json +33 -23
  283. package/readme.md +4 -4
  284. package/dist/trajectory/parse.d.ts +0 -42
  285. package/dist/trajectory/parse.js +0 -1267
  286. /package/dist/element/{data.json.d.ts → data.json.gz.d.ts} +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, {}, "color_scale" | "controls_open" | "active_cell" | "selected_cells" | "pinned_cell">;
109
+ type HeatmapMatrix = ReturnType<typeof HeatmapMatrix>;
110
+ export default HeatmapMatrix;
@@ -0,0 +1,171 @@
1
+ <script lang="ts">import DraggablePane from '../overlays/DraggablePane.svelte';
2
+ import { ELEMENT_ORDERINGS, ORDERING_LABELS, } from './index';
3
+ let { ordering = $bindable(`atomic_number`), orderings = ELEMENT_ORDERINGS, controls_open = $bindable(false), toggle_visible = $bindable(false), normalize = $bindable(`linear`), domain_mode = $bindable(`auto`), show_legend = $bindable(false), legend_position = $bindable(`bottom`), search_query = $bindable(``), symmetric = $bindable(false), show_values = $bindable(false), show_row_summaries = $bindable(false), show_col_summaries = $bindable(false), theme = $bindable(`default`), export_formats = [`csv`, `json`], onexport, show_pane = true, pane_props = {}, toggle_props = {}, children, } = $props();
4
+ function merge_styles(base_style, override_style) {
5
+ const override_style_str = typeof override_style === `string`
6
+ ? override_style
7
+ : ``;
8
+ return override_style_str ? `${base_style}; ${override_style_str}` : base_style;
9
+ }
10
+ // Stash custom format string so toggling the checkbox preserves it
11
+ let stashed_format = $state(null);
12
+ let show_toggle = $derived(controls_open || toggle_visible);
13
+ let default_toggle_style = $derived([
14
+ `position: absolute`,
15
+ `top: var(--heatmap-matrix-controls-toggle-top, 6px)`,
16
+ `right: var(--heatmap-matrix-controls-toggle-right, 6px)`,
17
+ `z-index: var(--heatmap-matrix-controls-toggle-z-index, 20)`,
18
+ `opacity: ${show_toggle ? `1` : `0`}`,
19
+ `pointer-events: ${show_toggle ? `auto` : `none`}`,
20
+ `transition: var(--heatmap-matrix-controls-toggle-transition, opacity 0.2s ease)`,
21
+ ].join(`; `));
22
+ const default_pane_style = [
23
+ `z-index: var(--heatmap-matrix-controls-pane-z-index, 25)`,
24
+ `min-width: var(--heatmap-matrix-controls-pane-min-width, 220px)`,
25
+ ].join(`; `);
26
+ </script>
27
+
28
+ <DraggablePane
29
+ bind:show={controls_open}
30
+ {show_pane}
31
+ pane_props={{
32
+ ...pane_props,
33
+ class: `heatmap-controls ${pane_props?.class ?? ``}`.trim(),
34
+ style: merge_styles(default_pane_style, pane_props?.style),
35
+ }}
36
+ toggle_props={{
37
+ ...toggle_props,
38
+ title: toggle_props.title ?? (controls_open ? `` : `Heatmap controls`),
39
+ class: `heatmap-matrix-controls-toggle ${toggle_props?.class ?? ``}`.trim(),
40
+ style: merge_styles(default_toggle_style, toggle_props?.style),
41
+ }}
42
+ closed_icon="Settings"
43
+ open_icon="Cross"
44
+ >
45
+ <label>
46
+ Ordering
47
+ <select bind:value={ordering}>
48
+ {#each orderings as ord (ord)}
49
+ <option value={ord}>{ORDERING_LABELS[ord]}</option>
50
+ {/each}
51
+ </select>
52
+ </label>
53
+ <label>
54
+ Search
55
+ <input bind:value={search_query} placeholder="Filter labels/keys" />
56
+ </label>
57
+ <div class="pane-row">
58
+ <label>
59
+ Normalize
60
+ <select bind:value={normalize}>
61
+ <option value="linear">linear</option>
62
+ <option value="log">log</option>
63
+ </select>
64
+ </label>
65
+ <label>
66
+ Domain
67
+ <select bind:value={domain_mode}>
68
+ <option value="auto">auto</option>
69
+ <option value="robust">robust</option>
70
+ <option value="fixed">fixed</option>
71
+ </select>
72
+ </label>
73
+ </div>
74
+ <div class="pane-row">
75
+ <label>
76
+ <input type="checkbox" bind:checked={show_legend} />
77
+ Legend
78
+ </label>
79
+ {#if show_legend}
80
+ <label>
81
+ Position
82
+ <select bind:value={legend_position}>
83
+ <option value="right">right</option>
84
+ <option value="bottom">bottom</option>
85
+ </select>
86
+ </label>
87
+ {/if}
88
+ </div>
89
+ <div class="pane-row">
90
+ <label>
91
+ Symmetric
92
+ <select bind:value={symmetric}>
93
+ <option value={false}>off</option>
94
+ <option value="lower">lower</option>
95
+ <option value="upper">upper</option>
96
+ </select>
97
+ </label>
98
+ <label>
99
+ Theme
100
+ <select bind:value={theme}>
101
+ <option value="default">default</option>
102
+ <option value="light">light</option>
103
+ <option value="dark">dark</option>
104
+ <option value="publication">publication</option>
105
+ </select>
106
+ </label>
107
+ </div>
108
+ <div class="pane-row">
109
+ <label>
110
+ <input
111
+ type="checkbox"
112
+ checked={!!show_values}
113
+ onchange={(evt) => {
114
+ if (evt.currentTarget.checked) {
115
+ show_values = stashed_format || true
116
+ } else {
117
+ stashed_format = typeof show_values === `string` ? show_values : null
118
+ show_values = false
119
+ }
120
+ }}
121
+ />
122
+ Values
123
+ </label>
124
+ <label>
125
+ <input type="checkbox" bind:checked={show_row_summaries} />
126
+ Row sums
127
+ </label>
128
+ <label>
129
+ <input type="checkbox" bind:checked={show_col_summaries} />
130
+ Col sums
131
+ </label>
132
+ </div>
133
+ <div class="pane-row">
134
+ {#each export_formats as export_format (export_format)}
135
+ <button type="button" onclick={() => onexport?.(export_format)}>
136
+ Export {export_format.toUpperCase()}
137
+ </button>
138
+ {/each}
139
+ </div>
140
+ {@render children?.({ controls_open })}
141
+ </DraggablePane>
142
+
143
+ <style>
144
+ :global(.heatmap-controls) {
145
+ font-size: 0.85em;
146
+ max-width: 320px;
147
+ }
148
+ .pane-row {
149
+ display: flex;
150
+ gap: 10pt;
151
+ flex-wrap: wrap;
152
+ }
153
+ label {
154
+ display: flex;
155
+ align-items: center;
156
+ gap: 6pt;
157
+ }
158
+ select,
159
+ input:not([type]) {
160
+ height: 1.8em;
161
+ padding: 0 0.5em;
162
+ border-radius: var(--border-radius, 3pt);
163
+ border: 1px solid light-dark(#ccc, #555);
164
+ background: light-dark(white, #333);
165
+ color: inherit;
166
+ font: inherit;
167
+ box-sizing: border-box;
168
+ flex: 1;
169
+ min-width: 0;
170
+ }
171
+ </style>
@@ -0,0 +1,31 @@
1
+ import DraggablePane from '../overlays/DraggablePane.svelte';
2
+ import type { ComponentProps, Snippet } from 'svelte';
3
+ import type { DomainMode, HeatmapExportFormat, LegendPosition, NormalizeMode, SymmetricMode } from './index';
4
+ import { type ElementAxisOrderingKey } from './index';
5
+ type $$ComponentProps = {
6
+ ordering?: ElementAxisOrderingKey;
7
+ orderings?: ElementAxisOrderingKey[];
8
+ controls_open?: boolean;
9
+ toggle_visible?: boolean;
10
+ normalize?: NormalizeMode;
11
+ domain_mode?: DomainMode;
12
+ show_legend?: boolean;
13
+ legend_position?: LegendPosition;
14
+ search_query?: string;
15
+ symmetric?: SymmetricMode;
16
+ show_values?: boolean | string;
17
+ show_row_summaries?: boolean;
18
+ show_col_summaries?: boolean;
19
+ theme?: `default` | `light` | `dark` | `publication`;
20
+ export_formats?: HeatmapExportFormat[];
21
+ onexport?: (format: HeatmapExportFormat) => void;
22
+ show_pane?: boolean;
23
+ pane_props?: ComponentProps<typeof DraggablePane>[`pane_props`];
24
+ toggle_props?: ComponentProps<typeof DraggablePane>[`toggle_props`];
25
+ children?: Snippet<[{
26
+ controls_open: boolean;
27
+ }]>;
28
+ };
29
+ declare const HeatmapMatrixControls: import("svelte").Component<$$ComponentProps, {}, "normalize" | "theme" | "controls_open" | "show_legend" | "show_values" | "ordering" | "toggle_visible" | "domain_mode" | "legend_position" | "search_query" | "symmetric" | "show_row_summaries" | "show_col_summaries">;
30
+ type HeatmapMatrixControls = ReturnType<typeof HeatmapMatrixControls>;
31
+ 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
@@ -299,6 +299,14 @@ export declare const ICON_DATA: {
299
299
  readonly viewBox: "0 0 15 15";
300
300
  readonly path: "M4.854 2.146a.5.5 0 0 1 0 .708L3.707 4H9a4.5 4.5 0 1 1 0 9H5a.5.5 0 0 1 0-1h4a3.5 3.5 0 1 0 0-7H3.707l1.147 1.146a.5.5 0 1 1-.708.708l-2-2a.5.5 0 0 1 0-.708l2-2a.5.5 0 0 1 .708 0";
301
301
  };
302
+ readonly Undo: {
303
+ readonly viewBox: "0 0 24 24";
304
+ readonly path: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z";
305
+ };
306
+ readonly Redo: {
307
+ readonly viewBox: "0 0 24 24";
308
+ readonly path: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z";
309
+ };
302
310
  readonly TwoColumns: {
303
311
  readonly viewBox: "0 0 24 24";
304
312
  readonly path: "M3 5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm6 0H5v14h4zm4 0a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2zm6 0h-4v14h4z";
@@ -446,5 +454,116 @@ export declare const ICON_DATA: {
446
454
  readonly viewBox: "0 0 24 24";
447
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";
448
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
+ };
449
568
  };
450
569
  export type IconName = keyof typeof ICON_DATA;