matterviz 0.3.2 → 0.3.4

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 (281) hide show
  1. package/dist/EmptyState.svelte +10 -2
  2. package/dist/FilePicker.svelte +123 -82
  3. package/dist/Icon.svelte +18 -12
  4. package/dist/MillerIndexInput.svelte +27 -21
  5. package/dist/api/optimade.js +6 -6
  6. package/dist/app.css +216 -207
  7. package/dist/brillouin/BrillouinZone.svelte +292 -149
  8. package/dist/brillouin/BrillouinZone.svelte.d.ts +1 -1
  9. package/dist/brillouin/BrillouinZoneControls.svelte +32 -5
  10. package/dist/brillouin/BrillouinZoneExportPane.svelte +69 -42
  11. package/dist/brillouin/BrillouinZoneExportPane.svelte.d.ts +1 -1
  12. package/dist/brillouin/BrillouinZoneInfoPane.svelte +99 -68
  13. package/dist/brillouin/BrillouinZoneScene.svelte +275 -163
  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 +162 -27
  18. package/dist/chempot-diagram/ChemPotDiagram2D.svelte +451 -281
  19. package/dist/chempot-diagram/ChemPotDiagram3D.svelte +2148 -1642
  20. package/dist/chempot-diagram/ChemPotScene3D.svelte +8 -5
  21. package/dist/chempot-diagram/async-compute.svelte.d.ts +3 -0
  22. package/dist/chempot-diagram/async-compute.svelte.js +77 -0
  23. package/dist/chempot-diagram/chempot-worker.d.ts +1 -0
  24. package/dist/chempot-diagram/chempot-worker.js +11 -0
  25. package/dist/chempot-diagram/color.js +1 -2
  26. package/dist/chempot-diagram/compute.d.ts +10 -0
  27. package/dist/chempot-diagram/compute.js +250 -88
  28. package/dist/chempot-diagram/index.d.ts +2 -1
  29. package/dist/chempot-diagram/index.js +2 -1
  30. package/dist/chempot-diagram/temperature.js +8 -9
  31. package/dist/chempot-diagram/types.d.ts +3 -0
  32. package/dist/chempot-diagram/types.js +1 -0
  33. package/dist/colors/index.d.ts +1 -1
  34. package/dist/colors/index.js +5 -3
  35. package/dist/composition/BarChart.svelte +128 -55
  36. package/dist/composition/BubbleChart.svelte +102 -49
  37. package/dist/composition/Composition.svelte +100 -79
  38. package/dist/composition/Formula.svelte +108 -62
  39. package/dist/composition/FormulaFilter.svelte +665 -537
  40. package/dist/composition/PieChart.svelte +183 -108
  41. package/dist/composition/format.d.ts +5 -0
  42. package/dist/composition/format.js +20 -3
  43. package/dist/composition/parse.js +14 -9
  44. package/dist/convex-hull/ConvexHull.svelte +93 -40
  45. package/dist/convex-hull/ConvexHull.svelte.d.ts +1 -1
  46. package/dist/convex-hull/ConvexHull2D.svelte +549 -360
  47. package/dist/convex-hull/ConvexHull2D.svelte.d.ts +1 -1
  48. package/dist/convex-hull/ConvexHull3D.svelte +1296 -827
  49. package/dist/convex-hull/ConvexHull3D.svelte.d.ts +1 -1
  50. package/dist/convex-hull/ConvexHull4D.svelte +1004 -688
  51. package/dist/convex-hull/ConvexHull4D.svelte.d.ts +1 -1
  52. package/dist/convex-hull/ConvexHullControls.svelte +115 -28
  53. package/dist/convex-hull/ConvexHullControls.svelte.d.ts +1 -1
  54. package/dist/convex-hull/ConvexHullInfoPane.svelte +29 -3
  55. package/dist/convex-hull/ConvexHullStats.svelte +425 -328
  56. package/dist/convex-hull/ConvexHullTooltip.svelte +40 -16
  57. package/dist/convex-hull/GasPressureControls.svelte +104 -61
  58. package/dist/convex-hull/StructurePopup.svelte +25 -4
  59. package/dist/convex-hull/TemperatureSlider.svelte +45 -25
  60. package/dist/convex-hull/barycentric-coords.js +13 -7
  61. package/dist/convex-hull/demo-temperature.js +8 -4
  62. package/dist/convex-hull/gas-thermodynamics.js +17 -12
  63. package/dist/convex-hull/helpers.d.ts +9 -0
  64. package/dist/convex-hull/helpers.js +77 -34
  65. package/dist/convex-hull/thermodynamics.js +61 -56
  66. package/dist/convex-hull/types.d.ts +9 -14
  67. package/dist/convex-hull/types.js +0 -17
  68. package/dist/coordination/CoordinationBarPlot.svelte +227 -154
  69. package/dist/element/BohrAtom.svelte +55 -12
  70. package/dist/element/ElementHeading.svelte +7 -2
  71. package/dist/element/ElementPhoto.svelte +15 -9
  72. package/dist/element/ElementStats.svelte +10 -4
  73. package/dist/element/ElementTile.svelte +137 -73
  74. package/dist/element/Nucleus.svelte +39 -11
  75. package/dist/element/data.js +1 -1
  76. package/dist/feedback/ClickFeedback.svelte +16 -5
  77. package/dist/feedback/DragOverlay.svelte +10 -2
  78. package/dist/feedback/Spinner.svelte +4 -2
  79. package/dist/feedback/StatusMessage.svelte +8 -2
  80. package/dist/fermi-surface/FermiSlice.svelte +118 -88
  81. package/dist/fermi-surface/FermiSurface.svelte +328 -187
  82. package/dist/fermi-surface/FermiSurface.svelte.d.ts +1 -1
  83. package/dist/fermi-surface/FermiSurfaceControls.svelte +113 -46
  84. package/dist/fermi-surface/FermiSurfaceControls.svelte.d.ts +1 -1
  85. package/dist/fermi-surface/FermiSurfaceScene.svelte +535 -342
  86. package/dist/fermi-surface/FermiSurfaceScene.svelte.d.ts +1 -1
  87. package/dist/fermi-surface/FermiSurfaceTooltip.svelte +14 -5
  88. package/dist/fermi-surface/compute.js +16 -20
  89. package/dist/fermi-surface/parse.js +24 -14
  90. package/dist/fermi-surface/symmetry.js +2 -7
  91. package/dist/fermi-surface/types.d.ts +3 -5
  92. package/dist/heatmap-matrix/HeatmapMatrix.svelte +1019 -765
  93. package/dist/heatmap-matrix/HeatmapMatrix.svelte.d.ts +1 -1
  94. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte +76 -22
  95. package/dist/heatmap-matrix/HeatmapMatrixControls.svelte.d.ts +2 -3
  96. package/dist/icons.js +47 -0
  97. package/dist/index.d.ts +2 -1
  98. package/dist/index.js +2 -1
  99. package/dist/io/decompress.js +1 -1
  100. package/dist/io/export.d.ts +3 -0
  101. package/dist/io/export.js +129 -143
  102. package/dist/io/is-binary.js +2 -3
  103. package/dist/io/url-drop.js +1 -2
  104. package/dist/isosurface/Isosurface.svelte +202 -148
  105. package/dist/isosurface/IsosurfaceControls.svelte +46 -28
  106. package/dist/isosurface/parse.js +34 -29
  107. package/dist/isosurface/slice.js +5 -10
  108. package/dist/isosurface/types.d.ts +2 -1
  109. package/dist/isosurface/types.js +61 -12
  110. package/dist/labels.js +11 -8
  111. package/dist/layout/FullscreenToggle.svelte +11 -2
  112. package/dist/layout/InfoCard.svelte +38 -6
  113. package/dist/layout/InfoTag.svelte +63 -32
  114. package/dist/layout/PropertyFilter.svelte +82 -37
  115. package/dist/layout/SettingsSection.svelte +85 -55
  116. package/dist/layout/SubpageGrid.svelte +10 -2
  117. package/dist/layout/json-tree/JsonNode.svelte +183 -138
  118. package/dist/layout/json-tree/JsonTree.svelte +499 -413
  119. package/dist/layout/json-tree/JsonValue.svelte +127 -99
  120. package/dist/layout/json-tree/utils.js +4 -2
  121. package/dist/marching-cubes.js +25 -2
  122. package/dist/math.d.ts +13 -17
  123. package/dist/math.js +133 -67
  124. package/dist/overlays/ContextMenu.svelte +65 -40
  125. package/dist/overlays/DraggablePane.svelte +211 -139
  126. package/dist/periodic-table/PeriodicTable.svelte +278 -145
  127. package/dist/periodic-table/PeriodicTableControls.svelte +178 -128
  128. package/dist/periodic-table/PropertySelect.svelte +25 -7
  129. package/dist/periodic-table/TableInset.svelte +8 -3
  130. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte +446 -309
  131. package/dist/phase-diagram/IsobaricBinaryPhaseDiagram.svelte.d.ts +1 -1
  132. package/dist/phase-diagram/PhaseDiagramControls.svelte +102 -43
  133. package/dist/phase-diagram/PhaseDiagramControls.svelte.d.ts +1 -1
  134. package/dist/phase-diagram/PhaseDiagramEditorPane.svelte +63 -40
  135. package/dist/phase-diagram/PhaseDiagramExportPane.svelte +71 -28
  136. package/dist/phase-diagram/PhaseDiagramExportPane.svelte.d.ts +1 -1
  137. package/dist/phase-diagram/PhaseDiagramTooltip.svelte +158 -101
  138. package/dist/phase-diagram/TdbInfoPanel.svelte +28 -4
  139. package/dist/phase-diagram/build-diagram.js +9 -9
  140. package/dist/phase-diagram/colors.js +1 -3
  141. package/dist/phase-diagram/parse.js +10 -9
  142. package/dist/phase-diagram/svg-to-diagram.js +53 -49
  143. package/dist/phase-diagram/utils.d.ts +1 -0
  144. package/dist/phase-diagram/utils.js +80 -25
  145. package/dist/plot/AxisLabel.svelte +28 -3
  146. package/dist/plot/BarPlot.svelte +1182 -734
  147. package/dist/plot/BarPlot.svelte.d.ts +2 -2
  148. package/dist/plot/BarPlotControls.svelte +31 -5
  149. package/dist/plot/BarPlotControls.svelte.d.ts +1 -1
  150. package/dist/plot/ColorBar.svelte +479 -329
  151. package/dist/plot/ColorScaleSelect.svelte +27 -6
  152. package/dist/plot/ElementScatter.svelte +36 -15
  153. package/dist/plot/FillArea.svelte +152 -95
  154. package/dist/plot/Histogram.svelte +934 -571
  155. package/dist/plot/Histogram.svelte.d.ts +1 -1
  156. package/dist/plot/HistogramControls.svelte +53 -9
  157. package/dist/plot/HistogramControls.svelte.d.ts +1 -1
  158. package/dist/plot/InteractiveAxisLabel.svelte +34 -11
  159. package/dist/plot/InteractiveAxisLabel.svelte.d.ts +1 -1
  160. package/dist/plot/Line.svelte +63 -28
  161. package/dist/plot/PlotControls.svelte +157 -114
  162. package/dist/plot/PlotControls.svelte.d.ts +1 -1
  163. package/dist/plot/PlotLegend.svelte +174 -91
  164. package/dist/plot/PlotTooltip.svelte +45 -6
  165. package/dist/plot/PortalSelect.svelte +175 -147
  166. package/dist/plot/ReferenceLine.svelte +76 -22
  167. package/dist/plot/ReferenceLine3D.svelte +132 -107
  168. package/dist/plot/ReferencePlane.svelte +146 -121
  169. package/dist/plot/ScatterPlot.svelte +1681 -1091
  170. package/dist/plot/ScatterPlot.svelte.d.ts +2 -2
  171. package/dist/plot/ScatterPlot3D.svelte +256 -131
  172. package/dist/plot/ScatterPlot3D.svelte.d.ts +2 -2
  173. package/dist/plot/ScatterPlot3DControls.svelte +113 -63
  174. package/dist/plot/ScatterPlot3DControls.svelte.d.ts +2 -1
  175. package/dist/plot/ScatterPlot3DScene.svelte +608 -403
  176. package/dist/plot/ScatterPlot3DScene.svelte.d.ts +2 -2
  177. package/dist/plot/ScatterPlotControls.svelte +65 -25
  178. package/dist/plot/ScatterPlotControls.svelte.d.ts +1 -1
  179. package/dist/plot/ScatterPoint.svelte +98 -26
  180. package/dist/plot/ScatterPoint.svelte.d.ts +1 -0
  181. package/dist/plot/SpacegroupBarPlot.svelte +142 -85
  182. package/dist/plot/Surface3D.svelte +159 -108
  183. package/dist/plot/ZeroLines.svelte +55 -3
  184. package/dist/plot/ZoomRect.svelte +4 -2
  185. package/dist/plot/axis-utils.js +1 -3
  186. package/dist/plot/data-cleaning.js +12 -28
  187. package/dist/plot/data-transform.js +2 -1
  188. package/dist/plot/fill-utils.js +2 -0
  189. package/dist/plot/layout.d.ts +4 -1
  190. package/dist/plot/layout.js +33 -14
  191. package/dist/plot/reference-line.d.ts +2 -2
  192. package/dist/plot/reference-line.js +7 -5
  193. package/dist/plot/scales.js +24 -36
  194. package/dist/plot/types.d.ts +11 -23
  195. package/dist/plot/types.js +6 -11
  196. package/dist/plot/utils/label-placement.d.ts +32 -15
  197. package/dist/plot/utils/label-placement.js +227 -66
  198. package/dist/plot/utils/series-visibility.js +2 -3
  199. package/dist/rdf/RdfPlot.svelte +143 -91
  200. package/dist/rdf/calc-rdf.js +4 -5
  201. package/dist/sanitize.d.ts +4 -0
  202. package/dist/sanitize.js +107 -0
  203. package/dist/settings.d.ts +18 -6
  204. package/dist/settings.js +46 -16
  205. package/dist/spectral/Bands.svelte +632 -453
  206. package/dist/spectral/BandsAndDos.svelte +90 -49
  207. package/dist/spectral/BrillouinBandsDos.svelte +151 -93
  208. package/dist/spectral/Dos.svelte +389 -258
  209. package/dist/spectral/helpers.js +55 -43
  210. package/dist/state.svelte.d.ts +1 -1
  211. package/dist/state.svelte.js +3 -2
  212. package/dist/structure/Arrow.svelte +59 -20
  213. package/dist/structure/AtomLegend.svelte +215 -134
  214. package/dist/structure/Bond.svelte +73 -47
  215. package/dist/structure/CanvasTooltip.svelte +10 -2
  216. package/dist/structure/CellSelect.svelte +72 -45
  217. package/dist/structure/Cylinder.svelte +33 -17
  218. package/dist/structure/Lattice.svelte +88 -33
  219. package/dist/structure/Structure.svelte +1063 -797
  220. package/dist/structure/Structure.svelte.d.ts +1 -1
  221. package/dist/structure/StructureControls.svelte +349 -118
  222. package/dist/structure/StructureExportPane.svelte +124 -89
  223. package/dist/structure/StructureExportPane.svelte.d.ts +1 -1
  224. package/dist/structure/StructureInfoPane.svelte +304 -237
  225. package/dist/structure/StructureScene.svelte +879 -443
  226. package/dist/structure/StructureScene.svelte.d.ts +15 -7
  227. package/dist/structure/atom-properties.js +8 -8
  228. package/dist/structure/bonding.js +6 -7
  229. package/dist/structure/export.js +14 -29
  230. package/dist/structure/ferrox-wasm.js +1 -1
  231. package/dist/structure/index.d.ts +13 -3
  232. package/dist/structure/index.js +83 -23
  233. package/dist/structure/measure.d.ts +2 -2
  234. package/dist/structure/measure.js +4 -44
  235. package/dist/structure/parse.js +113 -141
  236. package/dist/structure/partial-occupancy.js +7 -10
  237. package/dist/structure/pbc.d.ts +1 -0
  238. package/dist/structure/pbc.js +16 -6
  239. package/dist/structure/supercell.d.ts +2 -2
  240. package/dist/structure/supercell.js +12 -22
  241. package/dist/structure/validation.js +1 -2
  242. package/dist/symmetry/SymmetryStats.svelte +84 -41
  243. package/dist/symmetry/WyckoffTable.svelte +26 -6
  244. package/dist/symmetry/cell-transform.js +5 -3
  245. package/dist/symmetry/index.js +8 -7
  246. package/dist/symmetry/spacegroups.js +148 -148
  247. package/dist/table/HeatmapTable.svelte +790 -554
  248. package/dist/table/HeatmapTable.svelte.d.ts +1 -1
  249. package/dist/table/ToggleMenu.svelte +125 -92
  250. package/dist/table/index.js +2 -4
  251. package/dist/theme/ThemeControl.svelte +21 -12
  252. package/dist/time.js +4 -1
  253. package/dist/tooltip/TooltipContent.svelte +33 -8
  254. package/dist/trajectory/Trajectory.svelte +758 -558
  255. package/dist/trajectory/TrajectoryError.svelte +14 -3
  256. package/dist/trajectory/TrajectoryExportPane.svelte +137 -83
  257. package/dist/trajectory/TrajectoryInfoPane.svelte +272 -143
  258. package/dist/trajectory/extract.js +10 -26
  259. package/dist/trajectory/format-detect.js +5 -5
  260. package/dist/trajectory/frame-reader.d.ts +1 -1
  261. package/dist/trajectory/frame-reader.js +5 -12
  262. package/dist/trajectory/helpers.d.ts +0 -1
  263. package/dist/trajectory/helpers.js +2 -17
  264. package/dist/trajectory/index.js +14 -12
  265. package/dist/trajectory/parse/ase.js +5 -4
  266. package/dist/trajectory/parse/hdf5.js +26 -18
  267. package/dist/trajectory/parse/index.js +13 -18
  268. package/dist/trajectory/parse/lammps.js +17 -7
  269. package/dist/trajectory/parse/vasp.js +5 -2
  270. package/dist/trajectory/parse/xyz.js +8 -7
  271. package/dist/trajectory/plotting.js +13 -8
  272. package/dist/utils.d.ts +1 -0
  273. package/dist/utils.js +13 -0
  274. package/dist/xrd/XrdPlot.svelte +337 -247
  275. package/dist/xrd/broadening.js +14 -9
  276. package/dist/xrd/calc-xrd.js +12 -18
  277. package/dist/xrd/parse.d.ts +1 -1
  278. package/dist/xrd/parse.js +17 -17
  279. package/package.json +99 -103
  280. package/readme.md +1 -1
  281. /package/dist/theme/{themes.js → themes.mjs} +0 -0
@@ -105,6 +105,6 @@ type $$ComponentProps = Omit<HTMLAttributes<HTMLDivElement>, `onclick` | `ondblc
105
105
  }]>;
106
106
  children?: Snippet;
107
107
  };
108
- declare const HeatmapMatrix: import("svelte").Component<$$ComponentProps, {}, "color_scale" | "controls_open" | "active_cell" | "selected_cells" | "pinned_cell">;
108
+ declare const HeatmapMatrix: import("svelte").Component<$$ComponentProps, {}, "controls_open" | "color_scale" | "active_cell" | "selected_cells" | "pinned_cell">;
109
109
  type HeatmapMatrix = ReturnType<typeof HeatmapMatrix>;
110
110
  export default HeatmapMatrix;
@@ -1,28 +1,82 @@
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) {
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 {
5
55
  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 = [
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 = [
23
77
  `z-index: var(--heatmap-matrix-controls-pane-z-index, 25)`,
24
78
  `min-width: var(--heatmap-matrix-controls-pane-min-width, 220px)`,
25
- ].join(`; `);
79
+ ].join(`; `)
26
80
  </script>
27
81
 
28
82
  <DraggablePane
@@ -1,7 +1,6 @@
1
1
  import DraggablePane from '../overlays/DraggablePane.svelte';
2
2
  import type { ComponentProps, Snippet } from 'svelte';
3
- import type { DomainMode, HeatmapExportFormat, LegendPosition, NormalizeMode, SymmetricMode } from './index';
4
- import { type ElementAxisOrderingKey } from './index';
3
+ import type { ElementAxisOrderingKey, DomainMode, HeatmapExportFormat, LegendPosition, NormalizeMode, SymmetricMode } from './index';
5
4
  type $$ComponentProps = {
6
5
  ordering?: ElementAxisOrderingKey;
7
6
  orderings?: ElementAxisOrderingKey[];
@@ -26,6 +25,6 @@ type $$ComponentProps = {
26
25
  controls_open: boolean;
27
26
  }]>;
28
27
  };
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">;
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">;
30
29
  type HeatmapMatrixControls = ReturnType<typeof HeatmapMatrixControls>;
31
30
  export default HeatmapMatrixControls;
package/dist/icons.js CHANGED
@@ -69,6 +69,7 @@ export const ICON_DATA = {
69
69
  path: `M14 21v-1.65q0-.2.075-.387t.225-.338l5.225-5.2q.225-.225.5-.325t.55-.1q.3 0 .575.113t.5.337l.925.925q.2.225.313.5t.112.55t-.1.563t-.325.512l-5.2 5.2q-.15.15-.337.225T16.65 22H15q-.425 0-.712-.287T14 21m7.5-5.575l-.925-.925zm-6 5.075h.95l3.025-3.05l-.925-.925l-3.05 3.025zM6 22q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h7.175q.4 0 .763.15t.637.425l4.85 4.85q.275.275.425.638t.15.762v1.425q0 .425-.288.713T19 11.25t-.712-.288T18 10.25V9h-4q-.425 0-.712-.288T13 8V4H6v16h5q.425 0 .713.288T12 21t-.288.713T11 22zm0-2V4zm13.025-3.025l-.475-.45l.925.925z`,
70
70
  },
71
71
  Globe: {
72
+ // Tabler Icons by Paweł Kuna
72
73
  viewBox: `0 0 24 24`,
73
74
  path: `<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m.6-3h16.8M3.6 15h16.8"/><path d="M11.5 3a17 17 0 0 0 0 18m1-18a17 17 0 0 1 0 18"/></g>`,
74
75
  },
@@ -81,10 +82,12 @@ export const ICON_DATA = {
81
82
  path: `M7.5 1C3.36 1 0 4.36 0 8.5S3.36 16 7.5 16S15 12.64 15 8.5S11.64 1 7.5 1m3.44 10.06c.24.24.24.64 0 .88c-.12.12-.28.18-.44.18s-.32-.06-.44-.18L7.5 9.38l-2.56 2.56c-.12.12-.28.18-.44.18s-.32-.06-.44-.18a.63.63 0 0 1 0-.88L6.62 8.5L4.06 5.94c-.24-.24-.24-.64 0-.88s.64-.24.88 0L7.5 7.62l2.56-2.56c.24-.24.64-.24.88 0s.24.64 0 .88L8.38 8.5z`,
82
83
  },
83
84
  Calendar: {
85
+ // mdi:calendar
84
86
  viewBox: `0 0 24 24`,
85
87
  path: `M19 19H5V8h14m-3-7v2H8V1H6v2H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-1V1m-1 11h-5v5h5z`,
86
88
  },
87
89
  CalendarBlank: {
90
+ // mdi:calendar-blank
88
91
  viewBox: `0 0 24 24`,
89
92
  path: `M19 19H5V8h14m-3-7v2H8V1H6v2H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2h-1V1`,
90
93
  },
@@ -106,11 +109,13 @@ export const ICON_DATA = {
106
109
  path: `M16.42 7.58A6.25 6.25 0 0 0 6.246 9.556l1.412-.723a.75.75 0 1 1 .684 1.336l-2.705 1.384a.972.972 0 0 1-1.358-.539l-.985-2.761a.75.75 0 1 1 1.413-.504l.313.88a7.75 7.75 0 1 1 6.427 11.103a.75.75 0 1 1 .107-1.497A6.25 6.25 0 0 0 16.42 7.58M12 7.362a.75.75 0 0 1 .75.75v3.808c0 .25-.1.491-.276.668L10.03 15.03a.75.75 0 1 1-1.061-1.06l2.28-2.28V8.11a.75.75 0 0 1 .75-.75M6.52 16.42a.75.75 0 0 1 1.06 0q.402.4.85.712a.75.75 0 1 1-.859 1.23a8 8 0 0 1-1.05-.88a.75.75 0 0 1 0-1.062`,
107
110
  },
108
111
  Versions: {
112
+ //Tabler Icons by Paweł Kuna
109
113
  viewBox: `0 0 24 24`,
110
114
  stroke: `currentColor`,
111
115
  path: `M10 7a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2zM7 7v10M4 8v8`,
112
116
  },
113
117
  Forest: {
118
+ // material-symbols:forest
114
119
  viewBox: `0 0 24 24`,
115
120
  path: `M13 22v-3h4v3zm-6 0v-4H0l3.85-6H2L9 2l7 10h-1.85l3.875 6H11v4zm12.25-4L16 13h1.925l-5.3-7.575L15 2l7 10h-1.85L24 18z`,
116
121
  },
@@ -271,11 +276,13 @@ export const ICON_DATA = {
271
276
  path: `M160.22 24V8a8 8 0 0 1 16 0v16a8 8 0 0 1-16 0m35.88 17a7.9 7.9 0 0 0 4.17 1.17a8 8 0 0 0 6.84-3.83l8-13.11a8 8 0 0 0-13.68-8.33l-8 13.1a8 8 0 0 0 2.67 11m47.51 12.59a8 8 0 0 0-10.08-5.16l-15.06 4.85a8 8 0 0 0 2.46 15.62a8.2 8.2 0 0 0 2.46-.39l15.05-4.85a8 8 0 0 0 5.17-10.11ZM217 97.58a80.22 80.22 0 0 1-10.22 94c-.34 1.73-.72 3.46-1.19 5.18A80.17 80.17 0 0 1 58.77 216L23.5 155a26 26 0 0 1 19.24-38.79l-3-5.2a26 26 0 0 1 19.2-38.78l-.7-1.23a26 26 0 0 1 37.23-34.47a26.06 26.06 0 0 1 44.83.47l12.26 21.2a26.07 26.07 0 0 1 43.25 2.8ZM109.07 55l25 43.17a26 26 0 0 1 17.33-10L126.42 45a10 10 0 1 0-17.35 10m-36.95 8l6.46 11.17a26.05 26.05 0 0 1 17.32-10L89.45 53a10 10 0 1 0-17.33 10m111.54 81l-20.22-35a10 10 0 0 0-17.74 9.25L158.3 140a8 8 0 0 1-13.87 8l-36.5-63a10 10 0 1 0-17.35 10l26.05 45a8 8 0 0 1-13.87 8L71 93a10 10 0 0 0-17.33 10l35.22 61A8 8 0 0 1 75 172l-20.28-35a10 10 0 0 0-17.34 10l35.27 61a64.12 64.12 0 0 0 117.42-15.44a63.52 63.52 0 0 0-6.41-48.56m19.41-38.42L181.93 69a10 10 0 0 0-17.38 10l33 57.05a80.2 80.2 0 0 1 9.45 25.46a64.23 64.23 0 0 0-3.93-55.93`,
272
277
  },
273
278
  RepoFork: {
279
+ // Lucide
274
280
  viewBox: `0 0 24 24`,
275
281
  stroke: `currentColor`,
276
282
  path: `<g fill="none" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="20" r="3"/><circle cx="6" cy="6" r="3"/><circle cx="18" cy="6" r="3"/><path d="M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9"/><path d="M12 12v5"/></g>`,
277
283
  },
278
284
  Fullscreen: {
285
+ // from BoxIcons by Atisa
279
286
  viewBox: `0 0 24 24`,
280
287
  path: `M5 5h5V3H3v7h2zm5 14H5v-5H3v7h7zm11-5h-2v5h-5v2h7zm-2-4h2V3h-7v2h5z`,
281
288
  },
@@ -344,10 +351,12 @@ export const ICON_DATA = {
344
351
  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`,
345
352
  },
346
353
  ScatterPlot: {
354
+ // mdi:chart-scatter-plot
347
355
  viewBox: `0 0 24 24`,
348
356
  path: `M2 2h2v18h18v2H2zm7 8a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m4-8a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3m5 10a3 3 0 0 1 3 3a3 3 0 0 1-3 3a3 3 0 0 1-3-3a3 3 0 0 1 3-3`,
349
357
  },
350
358
  Histogram: {
359
+ // IconPark Solid by ByteDance
351
360
  viewBox: `0 0 48 48`,
352
361
  stroke: `currentColor`,
353
362
  fill: `currentColor`,
@@ -366,14 +375,17 @@ export const ICON_DATA = {
366
375
  path: `m12 17l-1.55-3.45L7 12l3.45-1.575L12 7l1.575 3.425L17 12l-3.425 1.55L12 17Zm0 6q-2.7 0-5.063-1.238T3 18.3V21H1v-6h6v2H4.55q1.275 1.875 3.238 2.938T12 21q2.875 0 5.213-1.65t3.287-4.375l1.95.45q-1.125 3.4-4 5.488T12 23ZM1.05 11q.175-1.675.8-3.213T3.575 4.95L5 6.375Q4.2 7.4 3.7 8.563T3.075 11H1.05ZM6.4 4.975L4.975 3.55q1.325-1.1 2.85-1.738T11 1.05v2q-1.275.125-2.425.625T6.4 4.975Zm11.225 0q-1.025-.8-2.187-1.3T13 3.05v-2q1.675.15 3.213.775T19.05 3.55l-1.425 1.425ZM20.95 11q-.125-1.275-.625-2.438t-1.3-2.187L20.45 4.95q1.1 1.3 1.725 2.838T22.95 11h-2Z`,
367
376
  },
368
377
  Ruler: {
378
+ // mdi:ruler https://icones.js.org/collection/all?icon=mdi:ruler
369
379
  viewBox: `0 0 24 24`,
370
380
  path: `m1.39 18.36l1.77-1.76L4.58 18l1.06-1.05l-1.42-1.41l1.42-1.42l2.47 2.48l1.06-1.06l-2.47-2.48l1.41-1.41l1.42 1.41L10.59 12l-1.42-1.41l1.42-1.42l2.47 2.48l1.06-1.06l-2.47-2.48l1.41-1.41l1.41 1.41l1.07-1.06l-1.42-1.41l1.42-1.42L18 6.7l1.07-1.06l-2.47-2.48l1.76-1.77l4.25 4.25L5.64 22.61z`,
371
381
  },
372
382
  Angle: {
383
+ // mdi:angle-acute https://icones.js.org/collection/all?icon=mdi:angle-acute
373
384
  viewBox: `0 0 24 24`,
374
385
  path: `M20 19H4.09L14.18 4.43l1.64 1.14l-4.54 6.56c1.61.83 2.72 2.49 2.72 4.41c0 .16 0 .31-.03.46H20zM7.91 17h4.05c.04-.15.04-.3.04-.46c0-1.26-.76-2.32-1.86-2.76z`,
375
386
  },
376
387
  RulerSquareCompass: {
388
+ // mdi:ruler-square-compass https://icones.js.org/collection/all?icon=mdi:ruler-square-compass
377
389
  viewBox: `0 0 24 24`,
378
390
  path: `M20 19.88V22l-1.8-1.17l-4.79-9a4.9 4.9 0 0 0 1.78-1M15 7a3 3 0 0 1-3 3a3 3 0 0 1-.44 0L5.8 20.83L4 22v-2.12L9.79 9A3 3 0 0 1 12 4V2a1 1 0 0 1 1 1v1.18A3 3 0 0 1 15 7m-2 0a1 1 0 1 0-1 1a1 1 0 0 0 1-1m-8.78 3L6 11.8l-1.44 2.76L2.1 12.1m9.9 5.66l-1.5-1.51L9 19l3 3l3-3l-1.47-2.77M19.78 10L18 11.8l1.5 2.76l2.4-2.46Z`,
379
391
  },
@@ -402,151 +414,186 @@ export const ICON_DATA = {
402
414
  path: `M12 14L1 8l11-6l11 6zm0 4L1.575 12.325l2.1-1.15L12 15.725l8.325-4.55l2.1 1.15zm0 4L1.575 16.325l2.1-1.15L12 19.725l8.325-4.55l2.1 1.15z`,
403
415
  },
404
416
  Checkbox: {
417
+ // fluent:checkbox-checked-16-filled
405
418
  viewBox: `0 0 14 14`,
406
419
  path: `M4.5 2A2.5 2.5 0 0 0 2 4.5v7A2.5 2.5 0 0 0 4.5 14h7a2.5 2.5 0 0 0 2.5-2.5v-7A2.5 2.5 0 0 0 11.5 2zm6.354 4.854l-3.5 3.5a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7 9.293l3.146-3.147a.5.5 0 0 1 .708.708`,
407
420
  },
408
421
  Comment: {
422
+ // lucide:message-square
409
423
  viewBox: `0 0 24 24`,
410
424
  path: `M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,
411
425
  },
412
426
  Phonons: {
427
+ // Icon from Web3 Icons by 0xa3k5 - https://github.com/0xa3k5/web3icons/blob/main/LICENCE
413
428
  viewBox: `0 0 24 24`,
414
429
  path: `<path d="M16.67 9.295l.83 3.625l1.285-2.625L18 7.07zM5.245 13.615l.755 3.8L7.265 14.5L6.5 11.07zM9 18.43l.88-.075l.62-2.71V8.07L9 11.395zM13.5 16.43l.88-.65l.62-2.7V5.57l-1.5 3.25z"/><path d="M9 18.43c1.15.285 2.34-.34 2.65-1.4L15 5.57c-1.15-.285-2.34.34-2.65 1.4zM8.385 16.04A1.95 1.95 0 0 1 6 17.43l2.115-7.97A1.95 1.95 0 0 1 10.5 8.07zM15.885 15.04a1.947 1.947 0 0 1-2.385 1.39l2.115-7.97A1.95 1.95 0 0 1 18 7.07zM19.985 11.59c-.285 1.015-1.4 1.615-2.485 1.345l1.01-3.525c.29-1.015 1.405-1.615 2.49-1.345zM3 15.935c1.085.27 2.2-.33 2.49-1.345l1.01-3.525c-1.085-.27-2.2.33-2.49 1.345z"/>`,
415
430
  },
416
431
  Materials: {
432
+ // lets-icons:materials
417
433
  viewBox: `0 0 24 24`,
418
434
  stroke: `currentColor`,
419
435
  // Icon from Lets Icons by Leonid Tsvetkov - https://creativecommons.org/licenses/by/4.0/
420
436
  path: `M3 7l7-4l11 4M3 7v5l11 4l7-4V7M3 7l11 4l7-4M3 12v5l11 4l7-4v-5`,
421
437
  },
422
438
  Flask: {
439
+ // Material Symbols by Google
423
440
  viewBox: `0 0 24 24`,
424
441
  path: `M5 21q-1.275 0-1.812-1.137t.262-2.113L9 11V5H8q-.425 0-.712-.288T7 4t.288-.712T8 3h8q.425 0 .713.288T17 4t-.288.713T16 5h-1v6l5.55 6.75q.8.975.263 2.113T19 21z`,
425
442
  },
426
443
  FlaskOff: {
444
+ // Material Symbols by Google
427
445
  viewBox: `0 0 24 24`,
428
446
  path: `m15 12.175l-6-6V5H8q-.425 0-.712-.287T7 4t.288-.712T8 3h8q.425 0 .713.288T17 4t-.288.713T16 5h-1zM19.8 22.6L18.2 21H5q-1.275 0-1.812-1.137t.262-2.113l5.2-6.3L1.4 4.2l1.4-1.4l18.4 18.4z`,
429
447
  },
430
448
  Molecule: {
449
+ // Streamline Ultimate - https://creativecommons.org/licenses/by/4.0/
431
450
  viewBox: `0 0 24 24`,
432
451
  stroke: `currentColor`,
433
452
  path: `<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M.75 17.25a6 6 0 1 0 12 0a6 6 0 0 0-12 0"/><path d="M3.75 17.25a3 3 0 0 1 3-3m7.5-6a4.5 4.5 0 1 0 9.002 0a4.5 4.5 0 0 0-9.002 0"/><path d="M17.25 8.25a1.5 1.5 0 0 1 1.5-1.5M3.75 3a2.25 2.25 0 1 0 4.5 0a2.25 2.25 0 0 0-4.5 0m8.211 11.274l3.436-3.024m-.759-4.83L8.149 3.664"/></g>`,
434
453
  },
435
454
  MoleculeNetwork: {
455
+ // Streamline Ultimate - https://creativecommons.org/licenses/by/4.0/
436
456
  viewBox: `0 0 24 24`,
437
457
  path: `m21.24 5.46l-3-1.72a1.5 1.5 0 0 0-1.49 0l-2.6 1.49a.47.47 0 0 1-.43 0l-3.41-1.31a.5.5 0 0 1-.31-.47V2.12A1.23 1.23 0 0 0 9.31 1L7.56.13a1.29 1.29 0 0 0-1.12 0L4.69 1A1.23 1.23 0 0 0 4 2.12v2.17a1.24 1.24 0 0 0 .68 1.11l1.75.9a1.23 1.23 0 0 0 1.14 0l1.25-.64a.5.5 0 0 1 .41 0L12.69 7a.5.5 0 0 1 .31.47v2.21a1.48 1.48 0 0 0 .76 1.3l1.61.93a.24.24 0 0 1 .13.2a.25.25 0 0 1-.1.21l-3.21 2.38a.5.5 0 0 1-.54 0l-3.42-1.9a1.51 1.51 0 0 0-1.46 0l-4 2.22A1.53 1.53 0 0 0 2 16.37v3.91a1.5 1.5 0 0 0 .77 1.31l4 2.22a1.5 1.5 0 0 0 1.46 0l4-2.22a1.5 1.5 0 0 0 .77-1.31v-3.44a.51.51 0 0 1 .2-.4a71 71 0 0 1 8-5.46a1.48 1.48 0 0 0 .8-1.3V6.76a1.48 1.48 0 0 0-.76-1.3m-14-1.23a.53.53 0 0 1-.46 0L6.27 4A.49.49 0 0 1 6 3.53V2.9a.5.5 0 0 1 .28-.45l.5-.25a.49.49 0 0 1 .44 0l.5.25A.5.5 0 0 1 8 2.9v.63a.49.49 0 0 1-.27.47ZM11 19.69a.51.51 0 0 1-.26.44l-3 1.66a.46.46 0 0 1-.48 0l-3-1.66a.51.51 0 0 1-.26-.44V17a.48.48 0 0 1 .26-.43l3-1.67a.51.51 0 0 1 .48 0l3 1.67A.48.48 0 0 1 11 17ZM20 9.1a.5.5 0 0 1-.25.43l-2 1.15a.55.55 0 0 1-.5 0l-2-1.15A.5.5 0 0 1 15 9.1V7.34a.52.52 0 0 1 .25-.44l2-1.14a.52.52 0 0 1 .5 0l2 1.15a.5.5 0 0 1 .25.43Z`,
438
458
  },
439
459
  CrystalGrowth: {
460
+ // Game Icons by GameIcons
440
461
  viewBox: `0 0 512 512`,
441
462
  path: `m253.8 15.56l-79.9 84.11l2.3 58.83l50.6 36.2l31.9 182l10.8-26.9l11.8-235.4l18.7 1l-9.1 181l28.3-70.8l8.2-108l.9-17.93zm139 50.57l-46.6 50.77l-3.9 51.1l10.6-26.2l30.4-13.7c3.2-20.6 6.3-41.3 9.5-61.97m60.3 51.17l-85.7 38.4l-102.6 255.9l14.6 83.3h7.8l147.6-293.1l16.7 8.4l-143.4 284.7h24.4l146.6-291.8zm-340.2 18.9l-54.11 99.1l69.11 259.6h93.6l-51.1-274.8l18.3-3.4l51.8 278.2h19.9l-50.7-289.4zm358.3 260.4l-65.8-5.2l-49.8 99.2l69.8-36.7zm-435.96-28l42.47 126.7h30.99L80.6 389.9z`,
442
463
  },
443
464
  CrystalShrine: {
465
+ // Game Icons by GameIcons
444
466
  viewBox: `0 0 512 512`,
445
467
  path: `M116.215 17.404c0 16-16 32-32 32c16 0 32 16 32 32c0-16 16-32 32-32c-16 0-32-16-32-32m64.326 12.87l-23.488 92.062h63.965l27.49-27.49zm228.147 25.958c0 20.214-20.216 40.428-40.43 40.428c20.214 0 40.43 20.214 40.43 40.428c0-20.214 20.213-40.428 40.427-40.428c-20.214 0-40.428-20.214-40.428-40.428zm-150.022 53.913l-23.18 23.18L283.043 311h29.066zm75.232 2.365l16.123 32.281l45.188 33.148l-4.393-53.533zm-18.033 4.181l-26.685 38.121l10 37.586l33.38-42.283zm-160.672 23.645L172.42 206.4l21.988 12.623L239.043 311h25.365l-45.68-170.664zm189.797 23.088l-40.03 50.703L330.737 311h.026l64.08-111.004l-49.852-36.572zm122.352 5.834c0 16-16 32-32 32c16 0 32 16 32 32c0-16 16-32 32-32c-16 0-32-16-32-32m-374.22 12.375l11.308 76.129l48.834-6.356l19.322-24.154l-79.465-45.62zm346.995 53.793l-52.547 13.172L351.547 311h25.77l19.16-19.48zm-255.21 5.244l-17.403 21.75l25.77 48.58h25.761l-34.129-70.33zm-33.84 29.174l-39.005 5.074L148.145 311h24.751zm-91.37 11.396c0 16-16 32-32 32c16 0 32 16 32 32c0-16 16-32 32-32c-16 0-32-16-32-32M137 329v30h238v-30zm32 48v78h16v-78zm34 0v78h106v-78zm124 0v78h16v-78zm-164.758 96l-30.119 16h247.754l-30.12-16H162.243z`,
446
468
  },
447
469
  Celsius: {
470
+ // Fluent UI System Icons by Microsoft
448
471
  viewBox: `0 0 16 16`,
449
472
  path: `M2.5 5.5a1 1 0 1 1 2 0a1 1 0 0 1-2 0m1-2.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 0 0 0-5M11 4.5C9.401 4.5 8 5.76 8 8s1.401 3.5 3 3.5c.882 0 1.703-.382 2.263-1.101c.181-.233.446-.399.741-.399c.564 0 .954.565.644 1.036A4.3 4.3 0 0 1 11 13c-2.544 0-4.5-2.053-4.5-5S8.456 3 11 3c1.525 0 2.84.738 3.648 1.964c.31.471-.08 1.036-.644 1.036c-.295 0-.56-.166-.741-.399A2.83 2.83 0 0 0 11 4.5`,
450
473
  },
451
474
  Thermometer: {
475
+ // Streamline Ultimate
452
476
  viewBox: `0 0 24 24`,
453
477
  stroke: `currentColor`,
454
478
  path: `<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M13.5 15.404V3.747a2.996 2.996 0 0 0-3-2.997a3 3 0 0 0-3 2.997v11.657a4.495 4.495 0 0 0 3 7.846a4.5 4.5 0 0 0 4.204-2.891a4.49 4.49 0 0 0-1.204-4.955"/><path d="M9 18.732a1.5 1.5 0 0 0 1.5 1.499a1.5 1.5 0 0 0 1.5-1.499a1.5 1.5 0 0 0-1.5-1.498A1.5 1.5 0 0 0 9 18.732m1.5-14.985v13.487m6-13.487H18m-1.5 4.496H18m-1.5 4.495H18"/></g>`,
455
479
  },
456
480
  Kelvin: {
481
+ // Material Design Icons by Pictogrammers
457
482
  viewBox: `0 0 24 24`,
458
483
  path: `M7 5h3v6l5-6h4l-5.12 5.78L19 20h-3.62l-3.62-6.83L10 15.15V20H7z`,
459
484
  },
460
485
  Energy: {
486
+ // Siemens Industrial Experience Icons
461
487
  viewBox: `0 0 512 512`,
462
488
  path: `M362.667 42.667L325.51 192h106.667L171.17 469.334l58.389-234.667h-85.333l47.773-192z`,
463
489
  },
464
490
  SolarPanel: {
491
+ // IconPark Outline by ByteDance
465
492
  viewBox: `0 0 48 48`,
466
493
  stroke: `currentColor`,
467
494
  path: `<g fill="none" stroke-width="4"><rect width="40" height="24" x="4" y="8" rx="2"/><path stroke-linecap="round" stroke-linejoin="round" d="M30 32V8M18 32V8m24 12H6m18 21v-9m7 9H17"/></g>`,
468
495
  },
469
496
  Microscope: {
497
+ // Material Design Icons by Pictogrammers
470
498
  viewBox: `0 0 24 24`,
471
499
  path: `M9.46 6.28L11.05 9c-2.58.26-4.55 2.41-4.55 5a5 5 0 0 0 5 5c2.05 0 3.81-1.23 4.58-3H13.5v-2h8v2h-2.25a8.05 8.05 0 0 1-2.46 4h2.71v2h-16v-2h2.71a8 8 0 0 1-2.71-6c0-3.63 2.46-6.8 5.96-7.72m3.28-4.21l.76 1.3l.86-.5l3.5 6.06l-3.47 2l-3.5-6.06l.87-.5l-.76-1.3z`,
472
500
  },
473
501
  Spectrum: {
502
+ // CoreUI Free by creativeLabs
474
503
  viewBox: `0 0 512 512`,
475
504
  path: `M16 160h32v192H16zm360 0h32v192h-32zM104 88h32v328h-32zm184 8h32v320h-32zm176 0h32v320h-32zM192 16h32v480h-32z`,
476
505
  },
477
506
  Magnetic: {
507
+ // Tabler Icons by Paweł Kuna
478
508
  viewBox: `0 0 24 24`,
479
509
  stroke: `currentColor`,
480
510
  path: `<g fill="none" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M12 3v18m6-14c-.633-1.255-1.538-2-2.5-2c-1.933 0-3.5 3.134-3.5 7s1.567 7 3.5 7s3.5-3.134 3.5-7v-1M6 7c.633-1.255 1.538-2 2.5-2c1.933 0 3.5 3.134 3.5 7s-1.567 7-3.5 7S5 15.866 5 12v-1"/><path d="m3 13l2-2l2 2m10 0l2-2l2 2"/></g>`,
481
511
  },
482
512
  Heart: {
513
+ // Octicons by GitHub
483
514
  viewBox: `0 0 16 16`,
484
515
  path: `M8.048 2.241c.964-.709 2.079-1.238 3.325-1.241a4.62 4.62 0 0 1 3.282 1.355c.41.408.757.86.996 1.428c.238.568.348 1.206.347 1.968c0 2.193-1.505 4.254-3.081 5.862c-1.496 1.526-3.213 2.796-4.249 3.563l-.22.163a.75.75 0 0 1-.895 0l-.221-.163c-1.036-.767-2.753-2.037-4.249-3.563C1.51 10.008.007 7.952.002 5.762a4.6 4.6 0 0 1 1.353-3.407C3.123.585 6.223.537 8.048 2.24Zm-1.153.983c-1.25-1.033-3.321-.967-4.48.191a3.12 3.12 0 0 0-.913 2.335c0 1.556 1.109 3.24 2.652 4.813C5.463 11.898 6.96 13.032 8 13.805c.353-.262.758-.565 1.191-.905l-1.326-1.223a.75.75 0 0 1 1.018-1.102l1.48 1.366c.328-.281.659-.577.984-.887L9.99 9.802a.75.75 0 1 1 1.019-1.103l1.384 1.28q.443-.494.81-.995L12.92 8.7l-1.167-1.168c-.674-.671-1.78-.664-2.474.03q-.404.405-.802.797c-.893.882-2.319.843-3.185-.032q-.518-.524-1.043-1.047a.75.75 0 0 1-.04-1.016q.244-.288.52-.623c.62-.748 1.356-1.637 2.166-2.417m7.112 4.442c.313-.65.491-1.293.491-1.916v-.001c0-.614-.088-1.045-.23-1.385c-.143-.339-.357-.633-.673-.949a3.1 3.1 0 0 0-2.218-.915c-1.092.003-2.165.627-3.226 1.602c-.823.755-1.554 1.637-2.228 2.45l-.127.154l.562.566a.755.755 0 0 0 1.066.02l.794-.79c1.258-1.258 3.312-1.31 4.594-.032c.396.394.792.791 1.173 1.173Z`,
485
516
  },
486
517
  Battery: {
518
+ // Material Symbols by Google
487
519
  viewBox: `0 0 24 24`,
488
520
  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`,
489
521
  },
490
522
  Filter: {
523
+ // Lucide by Lucide Contributors
491
524
  viewBox: `0 0 24 24`,
492
525
  path: `M22 3H2l8 9.46V19l4 2v-8.54z`,
493
526
  },
494
527
  Eye: {
528
+ // Material Symbols by Google
495
529
  viewBox: `0 0 24 24`,
496
530
  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`,
497
531
  },
498
532
  EyeOff: {
533
+ // Material Design Icons by Pictogrammers
499
534
  viewBox: `0 0 24 24`,
500
535
  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`,
501
536
  },
502
537
  Pin: {
538
+ // Material Design Icons by Pictogrammers
503
539
  viewBox: `0 0 24 24`,
504
540
  path: `M16 12V4h1V2H7v2h1v8l-2 2v2h5.2v6h1.6v-6H18v-2z`,
505
541
  },
506
542
  Unpin: {
543
+ // Material Design Icons by Pictogrammers
507
544
  viewBox: `0 0 24 24`,
508
545
  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`,
509
546
  },
510
547
  ArrowLeft: {
548
+ // Material Symbols by Google
511
549
  viewBox: `0 0 24 24`,
512
550
  path: `M20 11H7.83l5.59-5.59L12 4l-8 8l8 8l1.41-1.41L7.83 13H20z`,
513
551
  },
514
552
  ArrowRight: {
553
+ // Material Symbols by Google
515
554
  viewBox: `0 0 24 24`,
516
555
  path: `M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z`,
517
556
  },
518
557
  ZoomIn: {
558
+ // Lucide by Lucide Contributors
519
559
  viewBox: `0 0 24 24`,
520
560
  stroke: `currentColor`,
521
561
  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>`,
522
562
  },
523
563
  ZoomOut: {
564
+ // Lucide by Lucide Contributors
524
565
  viewBox: `0 0 24 24`,
525
566
  stroke: `currentColor`,
526
567
  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>`,
527
568
  },
528
569
  Play: {
570
+ // Material Symbols by Google
529
571
  viewBox: `0 0 24 24`,
530
572
  path: `M8 5v14l11-7z`,
531
573
  },
532
574
  Pause: {
575
+ // Material Symbols by Google
533
576
  viewBox: `0 0 24 24`,
534
577
  path: `M6 19h4V5H6zm8-14v14h4V5z`,
535
578
  },
536
579
  ExternalLink: {
580
+ // Lucide by Lucide Contributors
537
581
  viewBox: `0 0 24 24`,
538
582
  stroke: `currentColor`,
539
583
  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>`,
540
584
  },
541
585
  Sort: {
586
+ // Material Symbols by Google
542
587
  viewBox: `0 0 24 24`,
543
588
  path: `M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z`,
544
589
  },
545
590
  SortAsc: {
591
+ // Sort base + up arrow (composed from Material Symbols Sort)
546
592
  viewBox: `0 0 24 24`,
547
593
  path: `M3 18v-2h6v2zM3 13v-2h12v2zM3 8V6h13v2zM19 18V10h-2l3-5l3 5h-2v8z`,
548
594
  },
549
595
  SortDesc: {
596
+ // Sort base + down arrow (composed from Material Symbols Sort)
550
597
  viewBox: `0 0 24 24`,
551
598
  path: `M3 18v-2h6v2zM3 13v-2h12v2zM3 8V6h13v2zM19 6v8h-2l3 5l3-5h-2V6z`,
552
599
  },
package/dist/index.d.ts CHANGED
@@ -16,7 +16,7 @@ export { default as Icon } from './Icon.svelte';
16
16
  export * from './icons';
17
17
  export * from './io';
18
18
  export { default as MillerIndexInput } from './MillerIndexInput.svelte';
19
- export { auto_isosurface_settings, DEFAULT_ISOSURFACE_SETTINGS, generate_layers, grid_data_range, Isosurface as VolumetricIsosurface, IsosurfaceControls, LAYER_COLORS, parse_chgcar, parse_cube, parse_volumetric_file, sample_hkl_slice, trilinear_interpolate, } from './isosurface';
19
+ export { auto_isosurface_settings, DEFAULT_ISOSURFACE_SETTINGS, generate_layers, grid_data_range, Isosurface as VolumetricIsosurface, IsosurfaceControls, LAYER_COLORS, parse_chgcar, parse_cube, parse_volumetric_file, sample_hkl_slice, tile_volumetric_data, trilinear_interpolate, } from './isosurface';
20
20
  export type { DataRange, IsosurfaceLayer, IsosurfaceSettings, SliceResult, VolumetricData, VolumetricFileData, } from './isosurface';
21
21
  export * from './labels';
22
22
  export * from './layout';
@@ -26,6 +26,7 @@ export * from './periodic-table';
26
26
  export * from './phase-diagram';
27
27
  export * from './plot';
28
28
  export * from './rdf';
29
+ export * from './sanitize';
29
30
  export * from './settings';
30
31
  export * from './spectral';
31
32
  export * from './structure';
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ export * from './icons';
17
17
  export * from './io';
18
18
  export { default as MillerIndexInput } from './MillerIndexInput.svelte';
19
19
  // Explicit exports to avoid name clash with fermi-surface's Isosurface type
20
- export { auto_isosurface_settings, DEFAULT_ISOSURFACE_SETTINGS, generate_layers, grid_data_range, Isosurface as VolumetricIsosurface, IsosurfaceControls, LAYER_COLORS, parse_chgcar, parse_cube, parse_volumetric_file, sample_hkl_slice, trilinear_interpolate, } from './isosurface';
20
+ export { auto_isosurface_settings, DEFAULT_ISOSURFACE_SETTINGS, generate_layers, grid_data_range, Isosurface as VolumetricIsosurface, IsosurfaceControls, LAYER_COLORS, parse_chgcar, parse_cube, parse_volumetric_file, sample_hkl_slice, tile_volumetric_data, trilinear_interpolate, } from './isosurface';
21
21
  export * from './labels';
22
22
  export * from './layout';
23
23
  export * from './math';
@@ -26,6 +26,7 @@ export * from './periodic-table';
26
26
  export * from './phase-diagram';
27
27
  export * from './plot';
28
28
  export * from './rdf';
29
+ export * from './sanitize';
29
30
  export * from './settings';
30
31
  export * from './spectral';
31
32
  export * from './structure';
@@ -34,7 +34,7 @@ export async function decompress_data_binary(data, format) {
34
34
  return await new Response(stream.pipeThrough(unzip)).arrayBuffer();
35
35
  }
36
36
  catch (error) {
37
- throw new Error(`Failed to decompress ${format} file: ${error}`);
37
+ throw new Error(`Failed to decompress ${format} file: ${error}`, { cause: error });
38
38
  }
39
39
  }
40
40
  export function decompress_file(file) {
@@ -1,7 +1,10 @@
1
1
  import type { AnyStructure } from '../structure';
2
2
  import { type Camera, type Scene } from 'three';
3
+ export declare function canvas_to_png_blob(canvas: HTMLCanvasElement, png_dpi?: number, scene?: Scene | null, camera?: Camera | null): Promise<Blob>;
3
4
  export declare function export_canvas_as_png(canvas: HTMLCanvasElement | null, structure_or_filename: AnyStructure | string | undefined, png_dpi?: number, scene?: Scene | null, camera?: Camera | null): void;
5
+ export declare function svg_to_svg_string(svg_element: SVGElement): string;
4
6
  export declare function export_svg_as_svg(svg_element: SVGElement | null, filename: string): void;
7
+ export declare function svg_to_png_blob(svg_element: SVGElement, png_dpi?: number): Promise<Blob>;
5
8
  export declare function export_svg_as_png(svg_element: SVGElement | null, filename: string, png_dpi?: number): void;
6
9
  export declare function get_ffmpeg_conversion_command(input_filename: string): string;
7
10
  export declare function export_trajectory_video(canvas: HTMLCanvasElement | null, filename: string, options?: {