react-cheminfo 0.2.0 → 0.3.0

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 (131) hide show
  1. package/README.md +47 -6
  2. package/lib/core.d.ts +1 -0
  3. package/lib/core.d.ts.map +1 -1
  4. package/lib/core.js +1 -0
  5. package/lib/core.js.map +1 -1
  6. package/lib/ecosystem/core/sites.d.ts +1 -1
  7. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  8. package/lib/ecosystem/core/sites.js +18 -0
  9. package/lib/ecosystem/core/sites.js.map +1 -1
  10. package/lib/ecosystem/ui/glyphs.d.ts +16 -0
  11. package/lib/ecosystem/ui/glyphs.d.ts.map +1 -0
  12. package/lib/ecosystem/ui/glyphs.js +41 -0
  13. package/lib/ecosystem/ui/glyphs.js.map +1 -0
  14. package/lib/ecosystem/ui/marks.d.ts.map +1 -1
  15. package/lib/ecosystem/ui/marks.js +2 -33
  16. package/lib/ecosystem/ui/marks.js.map +1 -1
  17. package/lib/orbital/core/atomicGrid.d.ts +58 -0
  18. package/lib/orbital/core/atomicGrid.d.ts.map +1 -0
  19. package/lib/orbital/core/atomicGrid.js +69 -0
  20. package/lib/orbital/core/atomicGrid.js.map +1 -0
  21. package/lib/orbital/core/atomicOrbitals.d.ts +97 -0
  22. package/lib/orbital/core/atomicOrbitals.d.ts.map +1 -0
  23. package/lib/orbital/core/atomicOrbitals.js +135 -0
  24. package/lib/orbital/core/atomicOrbitals.js.map +1 -0
  25. package/lib/orbital/core/constants.d.ts +33 -0
  26. package/lib/orbital/core/constants.d.ts.map +1 -0
  27. package/lib/orbital/core/constants.js +21 -0
  28. package/lib/orbital/core/constants.js.map +1 -0
  29. package/lib/orbital/core/electronConfiguration.d.ts +106 -0
  30. package/lib/orbital/core/electronConfiguration.d.ts.map +1 -0
  31. package/lib/orbital/core/electronConfiguration.js +207 -0
  32. package/lib/orbital/core/electronConfiguration.js.map +1 -0
  33. package/lib/orbital/core/grid.d.ts +60 -0
  34. package/lib/orbital/core/grid.d.ts.map +1 -0
  35. package/lib/orbital/core/grid.js +81 -0
  36. package/lib/orbital/core/grid.js.map +1 -0
  37. package/lib/orbital/core/hydrogenic.d.ts +99 -0
  38. package/lib/orbital/core/hydrogenic.d.ts.map +1 -0
  39. package/lib/orbital/core/hydrogenic.js +181 -0
  40. package/lib/orbital/core/hydrogenic.js.map +1 -0
  41. package/lib/orbital/core/index.d.ts +22 -0
  42. package/lib/orbital/core/index.d.ts.map +1 -0
  43. package/lib/orbital/core/index.js +12 -0
  44. package/lib/orbital/core/index.js.map +1 -0
  45. package/lib/orbital/core/numerics.d.ts +39 -0
  46. package/lib/orbital/core/numerics.d.ts.map +1 -0
  47. package/lib/orbital/core/numerics.js +75 -0
  48. package/lib/orbital/core/numerics.js.map +1 -0
  49. package/lib/orbital/core/occupancy.d.ts +44 -0
  50. package/lib/orbital/core/occupancy.d.ts.map +1 -0
  51. package/lib/orbital/core/occupancy.js +85 -0
  52. package/lib/orbital/core/occupancy.js.map +1 -0
  53. package/lib/orbital/core/palette.d.ts +36 -0
  54. package/lib/orbital/core/palette.d.ts.map +1 -0
  55. package/lib/orbital/core/palette.js +37 -0
  56. package/lib/orbital/core/palette.js.map +1 -0
  57. package/lib/orbital/core/realHarmonics.d.ts +57 -0
  58. package/lib/orbital/core/realHarmonics.d.ts.map +1 -0
  59. package/lib/orbital/core/realHarmonics.js +144 -0
  60. package/lib/orbital/core/realHarmonics.js.map +1 -0
  61. package/lib/orbital/core/sample.d.ts +52 -0
  62. package/lib/orbital/core/sample.d.ts.map +1 -0
  63. package/lib/orbital/core/sample.js +54 -0
  64. package/lib/orbital/core/sample.js.map +1 -0
  65. package/lib/orbital/core/screening.d.ts +46 -0
  66. package/lib/orbital/core/screening.d.ts.map +1 -0
  67. package/lib/orbital/core/screening.js +72 -0
  68. package/lib/orbital/core/screening.js.map +1 -0
  69. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +57 -0
  70. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -0
  71. package/lib/orbital/ui/AtomicOrbitalCanvas.js +105 -0
  72. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -0
  73. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +73 -0
  74. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -0
  75. package/lib/orbital/ui/AtomicOrbitalViewer.js +49 -0
  76. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -0
  77. package/lib/orbital/ui/camera.d.ts +36 -0
  78. package/lib/orbital/ui/camera.d.ts.map +1 -0
  79. package/lib/orbital/ui/camera.js +98 -0
  80. package/lib/orbital/ui/camera.js.map +1 -0
  81. package/lib/orbital/ui/capability.d.ts +28 -0
  82. package/lib/orbital/ui/capability.d.ts.map +1 -0
  83. package/lib/orbital/ui/capability.js +77 -0
  84. package/lib/orbital/ui/capability.js.map +1 -0
  85. package/lib/orbital/ui/index.d.ts +17 -0
  86. package/lib/orbital/ui/index.d.ts.map +1 -0
  87. package/lib/orbital/ui/index.js +13 -0
  88. package/lib/orbital/ui/index.js.map +1 -0
  89. package/lib/orbital/ui/renderVolume.d.ts +57 -0
  90. package/lib/orbital/ui/renderVolume.d.ts.map +1 -0
  91. package/lib/orbital/ui/renderVolume.js +120 -0
  92. package/lib/orbital/ui/renderVolume.js.map +1 -0
  93. package/lib/orbital/ui/viewer.d.ts +86 -0
  94. package/lib/orbital/ui/viewer.d.ts.map +1 -0
  95. package/lib/orbital/ui/viewer.js +155 -0
  96. package/lib/orbital/ui/viewer.js.map +1 -0
  97. package/lib/orbital/ui/volumeField.d.ts +49 -0
  98. package/lib/orbital/ui/volumeField.d.ts.map +1 -0
  99. package/lib/orbital/ui/volumeField.js +108 -0
  100. package/lib/orbital/ui/volumeField.js.map +1 -0
  101. package/lib/orbital.d.ts +11 -0
  102. package/lib/orbital.d.ts.map +1 -0
  103. package/lib/orbital.js +11 -0
  104. package/lib/orbital.js.map +1 -0
  105. package/package.json +11 -3
  106. package/src/core.ts +1 -0
  107. package/src/ecosystem/core/sites.ts +21 -1
  108. package/src/ecosystem/ui/glyphs.tsx +246 -0
  109. package/src/ecosystem/ui/marks.tsx +4 -201
  110. package/src/orbital/core/atomicGrid.ts +115 -0
  111. package/src/orbital/core/atomicOrbitals.ts +212 -0
  112. package/src/orbital/core/constants.ts +36 -0
  113. package/src/orbital/core/electronConfiguration.ts +242 -0
  114. package/src/orbital/core/grid.ts +126 -0
  115. package/src/orbital/core/hydrogenic.ts +222 -0
  116. package/src/orbital/core/index.ts +72 -0
  117. package/src/orbital/core/numerics.ts +79 -0
  118. package/src/orbital/core/occupancy.ts +100 -0
  119. package/src/orbital/core/palette.ts +56 -0
  120. package/src/orbital/core/realHarmonics.ts +172 -0
  121. package/src/orbital/core/sample.ts +91 -0
  122. package/src/orbital/core/screening.ts +90 -0
  123. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +181 -0
  124. package/src/orbital/ui/AtomicOrbitalViewer.tsx +150 -0
  125. package/src/orbital/ui/camera.ts +125 -0
  126. package/src/orbital/ui/capability.ts +102 -0
  127. package/src/orbital/ui/index.ts +17 -0
  128. package/src/orbital/ui/renderVolume.ts +190 -0
  129. package/src/orbital/ui/viewer.ts +186 -0
  130. package/src/orbital/ui/volumeField.ts +128 -0
  131. package/src/orbital.ts +11 -0
package/README.md CHANGED
@@ -25,15 +25,22 @@ npm i react-cheminfo
25
25
  dependencies: a site already has them, and a second copy of `react-science`
26
26
  would mean two Blueprint style trees in one page.
27
27
 
28
- ## Two entry points
28
+ ## Three entry points
29
29
 
30
- | Import | Holds |
31
- | --------------------- | ----------------------------------------------------------------------------- |
32
- | `react-cheminfo/ui` | the React components |
33
- | `react-cheminfo/core` | the framework-free logic — citation formats, the site list — with no React in |
30
+ | Import | Holds | Costs |
31
+ | ------------------------ | ----------------------------------------------------------------------------- | -------------- |
32
+ | `react-cheminfo/core` | the framework-free logic — citation formats, the site list, the orbital maths | nothing |
33
+ | `react-cheminfo/ui` | the React components of a site header | React |
34
+ | `react-cheminfo/orbital` | the 3D atomic-orbital viewer | React, molstar |
34
35
 
35
36
  A backend serving an RIS endpoint, and every unit test of that logic, therefore
36
- load no React at all.
37
+ load no React at all — and a worker sampling an orbital loads neither React nor
38
+ molstar.
39
+
40
+ The orbital viewer has its own door because **molstar is several megabytes**: a
41
+ site that only wants the Tools menu must never be made to carry it. `molstar` is
42
+ an optional peer dependency, so `npm i react-cheminfo` installs nothing extra
43
+ until a site actually imports `react-cheminfo/orbital`.
37
44
 
38
45
  The sources are organised the other way round — one folder per component
39
46
  (`src/citation`, `src/ecosystem`), each holding a `core/` and a `ui/` half — and
@@ -91,6 +98,40 @@ import { EcosystemButton } from 'react-cheminfo/ui';
91
98
  - A tile **lights up in the colour of the site it opens**, so running the
92
99
  pointer down the grid is what makes the pairs of colours read.
93
100
 
101
+ ### `AtomicOrbitalViewer`
102
+
103
+ One hydrogen-like atomic orbital, screened by Slater's rules, sampled in the
104
+ browser and drawn as a signed isosurface with molstar.
105
+
106
+ ```tsx
107
+ import { AtomicOrbitalViewer } from 'react-cheminfo/orbital';
108
+
109
+ <AtomicOrbitalViewer atomicNumber={26} orbitalId="3dz2" />;
110
+ ```
111
+
112
+ - The **maths is exact**, not a cartoon: a hydrogen-like radial function with its
113
+ `n − ℓ − 1` nodes, times a real spherical harmonic with its ℓ angular ones.
114
+ The Slater orbital a hybridisation model uses is nodeless and would draw a 3s
115
+ exactly like a 1s, only fatter.
116
+ - The canvas is behind a `React.lazy` boundary and **nothing this entry point
117
+ exports pulls molstar in statically**, so a page that never draws an orbital
118
+ never downloads it.
119
+ - A **WebGL probe runs before molstar is touched** (`probeViewerCapability`), so
120
+ a locked-down school machine gets a sentence rather than a blank rectangle.
121
+ - Every orbital is drawn at one canonical size. Molstar's camera clamps its near
122
+ plane, so uranium's 4f — which reaches 0.35 Å — would otherwise stay a dot in
123
+ the corner; the true extent is reported as ⟨r⟩ instead.
124
+ - `sample` accepts a worker-backed sampler when a site would rather not spend
125
+ ~25 ms of its main thread per orbital. `runAtomicSample` from
126
+ `react-cheminfo/core` is the function that worker calls, and it imports
127
+ neither React nor molstar.
128
+
129
+ The maths is exported on its own from `react-cheminfo/core` —
130
+ `atomicOrbitalsOf`, `configurationOf`, `slaterScreening`, `radialProfile`,
131
+ `radialNodeRadii`, `sampleAtomicOrbital` — so a site can draw its own radial
132
+ plot, list an element's orbitals, or print a screened charge without mounting
133
+ anything.
134
+
94
135
  Each mark keeps the geometry of that site's own logo where it has one, redrawn
95
136
  on a plate of the site's own colour so every mark of the family still reads as
96
137
  one row, and carrying the site's answering colour on exactly one element —
package/lib/core.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './citation/core/index.ts';
2
2
  export * from './ecosystem/core/index.ts';
3
+ export * from './orbital/core/index.ts';
3
4
  //# sourceMappingURL=core.d.ts.map
package/lib/core.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
package/lib/core.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./citation/core/index.js";
2
2
  export * from "./ecosystem/core/index.js";
3
+ export * from "./orbital/core/index.js";
3
4
  //# sourceMappingURL=core.js.map
package/lib/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** The sites the menu links to, in the order they are listed. */
2
- export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp';
2
+ export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp' | '3d' | 'pt';
3
3
  export interface SiteName {
4
4
  /** First half of the name, set in the site's leading colour. */
5
5
  lead: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,CAAC;AAEf,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAsHnD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEnD"}
1
+ {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,IAAI,CAAC;AAET,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAwInD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEnD"}
@@ -120,6 +120,24 @@ export const ECOSYSTEM_SITES = [
120
120
  brandAlt: '#0c9ba3',
121
121
  mark: { plate: '#0d1d37', accent: '#0c9ba3' },
122
122
  },
123
+ {
124
+ id: '3d',
125
+ name: { lead: '3d', alt: 'cheminfo', dot: true },
126
+ host: '3d.cheminfo.org',
127
+ tagline: 'Conformers in 3D from a structure you draw.',
128
+ brand: '#155e75',
129
+ brandAlt: '#b45309',
130
+ mark: { plate: '#155e75', accent: '#f97316' },
131
+ },
132
+ {
133
+ id: 'pt',
134
+ name: { lead: 'pt', alt: 'cheminfo', dot: true },
135
+ host: 'pt.cheminfo.org',
136
+ tagline: 'The periodic table, coloured, plotted and taken apart.',
137
+ brand: '#15803d',
138
+ brandAlt: '#a16207',
139
+ mark: { plate: '#15803d', accent: '#fbbf24' },
140
+ },
123
141
  ];
124
142
  /**
125
143
  * The address of a site, which is its host over https.
@@ -1 +1 @@
1
- {"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AA8DA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,sDAAsD;QAC/D,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE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AAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE;QACnC,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,2DAA2D;QACpE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QAChD,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,6CAA6C;QACtD,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QAChD,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,wDAAwD;QACjE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAmB;IACzC,OAAO,WAAW,IAAI,CAAC,IAAI,GAAG,CAAC;AACjC,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The drawing on each site's plate.
3
+ *
4
+ * One file of pure artwork, so `marks.tsx` stays the eight lines that put a
5
+ * glyph on a plate and every new site is one entry here rather than a longer
6
+ * component.
7
+ *
8
+ * Each keeps the geometry of that site's own logo where it has one, and carries
9
+ * the site's answering colour on exactly one element — which is what stops it
10
+ * collapsing into a flat shape at 16 px.
11
+ */
12
+ import type { ReactNode } from 'react';
13
+ import type { SiteId } from '../core/sites.ts';
14
+ /** Every mark, keyed by site, drawn on top of its plate. */
15
+ export declare const GLYPHS: Record<SiteId, (alt: string) => ReactNode>;
16
+ //# sourceMappingURL=glyphs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glyphs.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/glyphs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,4DAA4D;AAC5D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAoO7D,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /** Every mark, keyed by site, drawn on top of its plate. */
3
+ export const GLYPHS = {
4
+ // A hexagon with a tail: the structure, and the string it hashes into.
5
+ inchi: (alt) => (_jsxs("g", { fill: "none", stroke: alt, strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("polygon", { points: "13,6.5 7.7,9.6 7.7,15.7 13,18.8 18.3,15.7 18.3,9.6" }), _jsx("path", { d: "M16.4 16.2 25.2 25" })] })),
6
+ // The core carrying three R groups, which is what this tool combines.
7
+ vcl: (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M16 9.5 10.8 12.5 10.8 18.5 16 21.5 21.2 18.5 21.2 12.5Z" }), _jsx("path", { d: "M16 9.5 16 5.5M21.2 18.5 24.8 20.6M10.8 18.5 7.2 20.6" })] }), _jsx("circle", { cx: "16", cy: "4.6", r: "2.6", fill: alt }), _jsx("circle", { cx: "25.6", cy: "21.2", r: "2.6", fill: alt }), _jsx("circle", { cx: "6.4", cy: "21.2", r: "2.6", fill: alt })] })),
8
+ // A ring over the line of characters that writes it down.
9
+ smiles: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 7.5 22.1 11.1 22.1 18.3 16 21.9 9.9 18.3 9.9 11.1Z", fill: "none", stroke: "#ffffff", strokeWidth: "2.2", strokeLinejoin: "round" }), _jsx("path", { d: "M5.5 25.5h21", fill: "none", stroke: alt, strokeWidth: "3", strokeLinecap: "round" })] })),
10
+ // An isotopic pattern: the answer this one is asked for most.
11
+ chemcalc: (alt) => (_jsxs("g", { strokeLinecap: "round", strokeWidth: "3.4", fill: "none", children: [_jsx("path", { d: "M9 24V15", stroke: "#ffffff" }), _jsx("path", { d: "M16 24V7", stroke: alt }), _jsx("path", { d: "M23 24V18", stroke: "#ffffff" })] })),
12
+ // The official NMRium symbol, from `Logo.tsx` of the NMRium sources: the
13
+ // orange half is theirs, and the half their logo sets in plum is set in white
14
+ // here because the plate already is that plum.
15
+ nmrium: (accent) => (_jsxs("g", { fillRule: "evenodd", transform: "translate(5.25 6.25) scale(0.088)", children: [_jsx("path", { fill: accent, d: "M.64,31.7A31.67,31.67,0,0,1,54.72,9.29l0,0A31.66,31.66,0,0,1,64,31.7V190a13.39,13.39,0,0,0,26.77,0V54a31.7,31.7,0,0,1,31.7-31.7V40.58A13.38,13.38,0,0,0,109.13,54V190a31.71,31.71,0,0,1-63.41,0V31.7a13.29,13.29,0,0,0-3.88-9.46l0,0A13.41,13.41,0,0,0,19,31.7V164.82H.64Z" }), _jsx("path", { fill: "#ffffff", d: "M154.21,54v68.17a13.34,13.34,0,0,0,3.89,9.47h0A13.39,13.39,0,0,0,181,122.14V99.32h-.06a31.63,31.63,0,0,1,9.29-22.38l0,0a31.65,31.65,0,0,1,44.8,0l0,0a31.58,31.58,0,0,1,9.3,22.39V118H226V99.32a13.3,13.3,0,0,0-3.89-9.46h0a13.44,13.44,0,0,0-18.93,0l0,0a13.3,13.3,0,0,0-3.83,8.19v24.09a31.7,31.7,0,0,1-54.11,22.42v0a31.66,31.66,0,0,1-9.3-22.4V54Z" })] })),
16
+ // One formula branching into every structure it can be.
17
+ surge: (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M7 16h6" }), _jsx("path", { d: "M13 16 25 8.5M13 16h12M13 16 25 23.5" })] }), _jsx("circle", { cx: "25", cy: "8.5", r: "3", fill: alt }), _jsx("circle", { cx: "25", cy: "16", r: "3", fill: alt }), _jsx("circle", { cx: "25", cy: "23.5", r: "3", fill: alt })] })),
18
+ // A radical over its radicand: a formula being set.
19
+ tex: (alt) => (_jsxs(_Fragment, { children: [_jsx("rect", { x: "18.5", y: "12", width: "8.5", height: "8.5", rx: "1.6", fill: alt }), _jsx("path", { d: "M4.5 15.5h3l3.6 8.2L16.8 7.5h10.4", fill: "none", stroke: "#ffffff", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round" })] })),
20
+ // The site's own favicon: two lobes of opposite phase overlapping end-on,
21
+ // the simplest sigma bond, in the phase palette its viewer renders with.
22
+ lcao: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 16C16 10.2 13.3 5 9 5S2 10.2 2 16s2.7 11 7 11 7-5.2 7-11z", fill: "#1565c0" }), _jsx("path", { d: "M16 16c0 5.8 2.7 11 7 11s7-5.2 7-11-2.7-11-7-11-7 5.2-7 11z", fill: alt }), _jsx("circle", { cx: "16", cy: "16", r: "2.25", fill: "#37474f" })] })),
23
+ // The pattern that matches anything, which is where everyone starts.
24
+ regexp: (alt) => (_jsx("text", { x: "50%", y: "53%", dominantBaseline: "central", textAnchor: "middle", fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace", fontSize: "18", fontWeight: "700", fill: alt, children: ".*" })),
25
+ // Three residues of a chain, one of them the ligand you came for.
26
+ pdb: (alt) => (_jsxs(_Fragment, { children: [_jsx("g", { stroke: "#ffffff", strokeWidth: "1.9", strokeLinecap: "round", fill: "none", opacity: "0.85", children: _jsx("path", { d: "M9.2 12.4 22 15.4 15.6 23Z" }) }), _jsx("circle", { cx: "9.2", cy: "12.4", r: "3.1", fill: "#ffffff" }), _jsx("circle", { cx: "22", cy: "15.4", r: "3.1", fill: "#ffffff" }), _jsx("circle", { cx: "15.6", cy: "23", r: "3.1", fill: alt })] })),
27
+ // The site's own favicon: a spectrum, and the one signal being assigned.
28
+ elucidation: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M5 24h4l2-11 2 11h4l2-15 2 15h3l1.5-7 1.5 7", fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "19", cy: "9", r: "3", fill: alt })] })),
29
+ // The site's own favicon: the double harpoon, one direction per colour.
30
+ equilibrium: (alt) => (_jsxs("g", { fill: "none", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M6.5 12.5h17l-4-4", stroke: "#ffffff" }), _jsx("path", { d: "M25.5 19.5h-17l4 4", stroke: alt })] })),
31
+ // A chain of monomers, one of them the comonomer written into it.
32
+ polycarp: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M6.5 20 12.5 12 19.5 20 25.5 12", fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "6.5", cy: "20", r: "3", fill: "#ffffff" }), _jsx("circle", { cx: "12.5", cy: "12", r: "3", fill: "#ffffff" }), _jsx("circle", { cx: "19.5", cy: "20", r: "3", fill: alt }), _jsx("circle", { cx: "25.5", cy: "12", r: "3", fill: "#ffffff" })] })),
33
+ // The stepped corner of the table, with the one cell a visitor has picked
34
+ // carrying the accent — which is what every tool of that site is: the table,
35
+ // and one element read off it.
36
+ pt: (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "#ffffff", opacity: "0.55", children: [_jsx("rect", { x: "5", y: "6", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "22", y: "6", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "5", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "11.75", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "18.5", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "5", y: "19", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "11.75", y: "19", width: "5", height: "5", rx: "1" })] }), _jsx("rect", { x: "18.5", y: "19", width: "8.5", height: "5", rx: "1", fill: alt })] })),
37
+ // A stereocentre: two bonds in the plane of the drawing and one wedged out
38
+ // of it, which is the whole of what this site does to a flat structure.
39
+ '3d': (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 16 16 5.6M16 16 7.2 21.2", fill: "none", stroke: "#ffffff", strokeWidth: "2.4", strokeLinecap: "round" }), _jsx("path", { d: "M16 16 24.2 24 26.9 19.6Z", fill: alt }), _jsx("circle", { cx: "16", cy: "16", r: "2.9", fill: "#ffffff" })] })),
40
+ };
41
+ //# sourceMappingURL=glyphs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"glyphs.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/glyphs.tsx"],"names":[],"mappings":";AAgBA,4DAA4D;AAC5D,MAAM,CAAC,MAAM,MAAM,GAA+C;IAChE,uEAAuE;IACvE,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACd,aACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAE,GAAG,EACX,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,aAEtB,kBAAS,MAAM,EAAC,oDAAoD,GAAG,EACvE,eAAM,CAAC,EAAC,oBAAoB,GAAG,IAC7B,C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AAC,GAAG,GAAG,IACnD,EACJ,eAAM,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,GAAG,GAAI,IAChE,CACJ;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACb,8BACE,eACE,CAAC,EAAC,8BAA8B,EAChC,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,GACrB,EACF,eAAM,CAAC,EAAC,2BAA2B,EAAC,IAAI,EAAE,GAAG,GAAI,EACjD,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,GAAG,IAChD,CACJ;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/marks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAa,MAAM,OAAO,CAAC;AAEpE,OAAO,KAAK,EAAE,aAAa,EAAU,MAAM,kBAAkB,CAAC;AAS9D,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,IAAI,EAAE,aAAa,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAwB3D"}
1
+ {"version":3,"file":"marks.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/marks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAWtD,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,IAAI,EAAE,aAAa,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAwB3D"}
@@ -1,4 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { GLYPHS } from "./glyphs.js";
2
3
  // Every mark is drawn in the same 32×32 box, on a plate of the site's own
3
4
  // colour, so every mark of the family still reads as one row. Each keeps the
4
5
  // geometry of that site's own logo where it has one, and carries the site's
@@ -14,36 +15,4 @@ export function SiteMark(props) {
14
15
  const { site, size = 28 } = props;
15
16
  return (_jsxs("svg", { style: MARK_STYLE, width: size, height: size, viewBox: "0 0 32 32", "aria-hidden": "true", focusable: "false", children: [_jsx("rect", { x: site.mark.edge ? 0.5 : 0, y: site.mark.edge ? 0.5 : 0, width: site.mark.edge ? 31 : 32, height: site.mark.edge ? 31 : 32, rx: site.mark.edge ? 6.5 : 7, fill: site.mark.plate, stroke: site.mark.edge }), GLYPHS[site.id](site.mark.accent)] }));
16
17
  }
17
- /** Every mark, keyed by site, drawn on top of its plate. */
18
- const GLYPHS = {
19
- // A hexagon with a tail: the structure, and the string it hashes into.
20
- inchi: (alt) => (_jsxs("g", { fill: "none", stroke: alt, strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("polygon", { points: "13,6.5 7.7,9.6 7.7,15.7 13,18.8 18.3,15.7 18.3,9.6" }), _jsx("path", { d: "M16.4 16.2 25.2 25" })] })),
21
- // The core carrying three R groups, which is what this tool combines.
22
- vcl: (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M16 9.5 10.8 12.5 10.8 18.5 16 21.5 21.2 18.5 21.2 12.5Z" }), _jsx("path", { d: "M16 9.5 16 5.5M21.2 18.5 24.8 20.6M10.8 18.5 7.2 20.6" })] }), _jsx("circle", { cx: "16", cy: "4.6", r: "2.6", fill: alt }), _jsx("circle", { cx: "25.6", cy: "21.2", r: "2.6", fill: alt }), _jsx("circle", { cx: "6.4", cy: "21.2", r: "2.6", fill: alt })] })),
23
- // A ring over the line of characters that writes it down.
24
- smiles: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 7.5 22.1 11.1 22.1 18.3 16 21.9 9.9 18.3 9.9 11.1Z", fill: "none", stroke: "#ffffff", strokeWidth: "2.2", strokeLinejoin: "round" }), _jsx("path", { d: "M5.5 25.5h21", fill: "none", stroke: alt, strokeWidth: "3", strokeLinecap: "round" })] })),
25
- // An isotopic pattern: the answer this one is asked for most.
26
- chemcalc: (alt) => (_jsxs("g", { strokeLinecap: "round", strokeWidth: "3.4", fill: "none", children: [_jsx("path", { d: "M9 24V15", stroke: "#ffffff" }), _jsx("path", { d: "M16 24V7", stroke: alt }), _jsx("path", { d: "M23 24V18", stroke: "#ffffff" })] })),
27
- // The official NMRium symbol, from `Logo.tsx` of the NMRium sources: the
28
- // orange half is theirs, and the half their logo sets in plum is set in white
29
- // here because the plate already is that plum.
30
- nmrium: (accent) => (_jsxs("g", { fillRule: "evenodd", transform: "translate(5.25 6.25) scale(0.088)", children: [_jsx("path", { fill: accent, d: "M.64,31.7A31.67,31.67,0,0,1,54.72,9.29l0,0A31.66,31.66,0,0,1,64,31.7V190a13.39,13.39,0,0,0,26.77,0V54a31.7,31.7,0,0,1,31.7-31.7V40.58A13.38,13.38,0,0,0,109.13,54V190a31.71,31.71,0,0,1-63.41,0V31.7a13.29,13.29,0,0,0-3.88-9.46l0,0A13.41,13.41,0,0,0,19,31.7V164.82H.64Z" }), _jsx("path", { fill: "#ffffff", d: "M154.21,54v68.17a13.34,13.34,0,0,0,3.89,9.47h0A13.39,13.39,0,0,0,181,122.14V99.32h-.06a31.63,31.63,0,0,1,9.29-22.38l0,0a31.65,31.65,0,0,1,44.8,0l0,0a31.58,31.58,0,0,1,9.3,22.39V118H226V99.32a13.3,13.3,0,0,0-3.89-9.46h0a13.44,13.44,0,0,0-18.93,0l0,0a13.3,13.3,0,0,0-3.83,8.19v24.09a31.7,31.7,0,0,1-54.11,22.42v0a31.66,31.66,0,0,1-9.3-22.4V54Z" })] })),
31
- // One formula branching into every structure it can be.
32
- surge: (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M7 16h6" }), _jsx("path", { d: "M13 16 25 8.5M13 16h12M13 16 25 23.5" })] }), _jsx("circle", { cx: "25", cy: "8.5", r: "3", fill: alt }), _jsx("circle", { cx: "25", cy: "16", r: "3", fill: alt }), _jsx("circle", { cx: "25", cy: "23.5", r: "3", fill: alt })] })),
33
- // A radical over its radicand: a formula being set.
34
- tex: (alt) => (_jsxs(_Fragment, { children: [_jsx("rect", { x: "18.5", y: "12", width: "8.5", height: "8.5", rx: "1.6", fill: alt }), _jsx("path", { d: "M4.5 15.5h3l3.6 8.2L16.8 7.5h10.4", fill: "none", stroke: "#ffffff", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round" })] })),
35
- // The site's own favicon: two lobes of opposite phase overlapping end-on,
36
- // the simplest sigma bond, in the phase palette its viewer renders with.
37
- lcao: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 16C16 10.2 13.3 5 9 5S2 10.2 2 16s2.7 11 7 11 7-5.2 7-11z", fill: "#1565c0" }), _jsx("path", { d: "M16 16c0 5.8 2.7 11 7 11s7-5.2 7-11-2.7-11-7-11-7 5.2-7 11z", fill: alt }), _jsx("circle", { cx: "16", cy: "16", r: "2.25", fill: "#37474f" })] })),
38
- // The pattern that matches anything, which is where everyone starts.
39
- regexp: (alt) => (_jsx("text", { x: "50%", y: "53%", dominantBaseline: "central", textAnchor: "middle", fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace", fontSize: "18", fontWeight: "700", fill: alt, children: ".*" })),
40
- // Three residues of a chain, one of them the ligand you came for.
41
- pdb: (alt) => (_jsxs(_Fragment, { children: [_jsx("g", { stroke: "#ffffff", strokeWidth: "1.9", strokeLinecap: "round", fill: "none", opacity: "0.85", children: _jsx("path", { d: "M9.2 12.4 22 15.4 15.6 23Z" }) }), _jsx("circle", { cx: "9.2", cy: "12.4", r: "3.1", fill: "#ffffff" }), _jsx("circle", { cx: "22", cy: "15.4", r: "3.1", fill: "#ffffff" }), _jsx("circle", { cx: "15.6", cy: "23", r: "3.1", fill: alt })] })),
42
- // The site's own favicon: a spectrum, and the one signal being assigned.
43
- elucidation: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M5 24h4l2-11 2 11h4l2-15 2 15h3l1.5-7 1.5 7", fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "19", cy: "9", r: "3", fill: alt })] })),
44
- // The site's own favicon: the double harpoon, one direction per colour.
45
- equilibrium: (alt) => (_jsxs("g", { fill: "none", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M6.5 12.5h17l-4-4", stroke: "#ffffff" }), _jsx("path", { d: "M25.5 19.5h-17l4 4", stroke: alt })] })),
46
- // A chain of monomers, one of them the comonomer written into it.
47
- polycarp: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M6.5 20 12.5 12 19.5 20 25.5 12", fill: "none", stroke: "#ffffff", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }), _jsx("circle", { cx: "6.5", cy: "20", r: "3", fill: "#ffffff" }), _jsx("circle", { cx: "12.5", cy: "12", r: "3", fill: "#ffffff" }), _jsx("circle", { cx: "19.5", cy: "20", r: "3", fill: alt }), _jsx("circle", { cx: "25.5", cy: "12", r: "3", fill: "#ffffff" })] })),
48
- };
49
18
  //# sourceMappingURL=marks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"marks.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/marks.tsx"],"names":[],"mappings":";AAIA,0EAA0E;AAC1E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,8BAA8B;AAC9B,MAAM,UAAU,GAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAYrE;;;;GAIG;AACH,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,KAAK,CAAC;IAElC,OAAO,CACL,eACE,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,IAAI,EACZ,OAAO,EAAC,WAAW,iBACP,MAAM,EAClB,SAAS,EAAC,OAAO,aAEjB,eACE,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC3B,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC3B,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAC/B,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAChC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EACrB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GACtB,EACD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IA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CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC3B,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAC/B,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAChC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAC5B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EACrB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,GACtB,EACD,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAC9B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Sampling one atomic orbital onto the scalar field the isosurface renderer
3
+ * consumes.
4
+ *
5
+ * The box is sized from the orbital itself rather than fixed: a 1s on fluorine
6
+ * and a 4f on caesium differ by more than an order of magnitude in extent, and a
7
+ * box that suits one either buries the other in empty space or slices its lobes
8
+ * off at a face. {@link enclosingRadius} gives the sphere holding almost all of
9
+ * the electron, and the cube is drawn around that.
10
+ *
11
+ * Pure: no React, no molstar. `src/viewer` turns the returned field into a
12
+ * surface, and the worker calls this off the main thread.
13
+ */
14
+ import type { AtomicOrbital } from './atomicOrbitals.ts';
15
+ import type { GridBox, OrbitalEvaluator, OrbitalGrid } from './grid.ts';
16
+ /** How finely, and how far out, an orbital is sampled. */
17
+ export interface AtomicGridOptions {
18
+ /**
19
+ * Samples along each edge of the cube. The cost is the cube of this, and 56
20
+ * resolves the radial node of a 3s while staying near 30 ms.
21
+ * @default 56
22
+ */
23
+ resolution?: number;
24
+ /**
25
+ * Share of `∫ r²R² dr` the box must contain before padding.
26
+ * @default 0.985
27
+ */
28
+ enclosedFraction?: number;
29
+ /**
30
+ * Multiplier applied to the enclosing radius, so the surface closes inside
31
+ * the box instead of touching a face.
32
+ * @default 1.15
33
+ */
34
+ padding?: number;
35
+ }
36
+ /**
37
+ * Sample an atomic orbital onto a cubic grid centred on its nucleus.
38
+ * @param orbital - The orbital to draw.
39
+ * @param options - See {@link AtomicGridOptions}.
40
+ * @returns The signed field, its layout and its statistics.
41
+ * @throws {Error} When the resolution is below 2.
42
+ */
43
+ export declare function sampleAtomicOrbital(orbital: AtomicOrbital, options?: AtomicGridOptions): OrbitalGrid;
44
+ /**
45
+ * Build `ψ(x, y, z) = R(r) Y(x, y, z)` for one orbital, centred on the origin.
46
+ * @param orbital - The orbital to evaluate.
47
+ * @returns An allocation-free evaluator in ångström, returning Å^(-3/2).
48
+ */
49
+ export declare function createAtomicOrbitalEvaluator(orbital: AtomicOrbital): OrbitalEvaluator;
50
+ /**
51
+ * The cube one orbital is sampled over.
52
+ * @param orbital - The orbital to fit.
53
+ * @param enclosedFraction - Share of the electron to contain.
54
+ * @param padding - Multiplier applied to the enclosing radius.
55
+ * @returns A cube centred on the nucleus.
56
+ */
57
+ export declare function atomicGridBox(orbital: AtomicOrbital, enclosedFraction?: number, padding?: number): GridBox;
58
+ //# sourceMappingURL=atomicGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicGrid.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/atomicGrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAIxE,0DAA0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,EACtB,OAAO,GAAE,iBAAsB,GAC9B,WAAW,CAWb;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,GACrB,gBAAgB,CAalB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,OAAO,EAAE,aAAa,EACtB,gBAAgB,SAA4B,EAC5C,OAAO,SAAkB,GACxB,OAAO,CAQT"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * Sampling one atomic orbital onto the scalar field the isosurface renderer
3
+ * consumes.
4
+ *
5
+ * The box is sized from the orbital itself rather than fixed: a 1s on fluorine
6
+ * and a 4f on caesium differ by more than an order of magnitude in extent, and a
7
+ * box that suits one either buries the other in empty space or slices its lobes
8
+ * off at a face. {@link enclosingRadius} gives the sphere holding almost all of
9
+ * the electron, and the cube is drawn around that.
10
+ *
11
+ * Pure: no React, no molstar. `src/viewer` turns the returned field into a
12
+ * surface, and the worker calls this off the main thread.
13
+ */
14
+ import { hydrogenicParametersOf } from "./atomicOrbitals.js";
15
+ import { evaluateGrid } from "./grid.js";
16
+ import { createRadialFunction, enclosingRadius } from "./hydrogenic.js";
17
+ /**
18
+ * Sample an atomic orbital onto a cubic grid centred on its nucleus.
19
+ * @param orbital - The orbital to draw.
20
+ * @param options - See {@link AtomicGridOptions}.
21
+ * @returns The signed field, its layout and its statistics.
22
+ * @throws {Error} When the resolution is below 2.
23
+ */
24
+ export function sampleAtomicOrbital(orbital, options = {}) {
25
+ const { resolution = DEFAULT_RESOLUTION, enclosedFraction = DEFAULT_ENCLOSED_FRACTION, padding = DEFAULT_PADDING, } = options;
26
+ return evaluateGrid(createAtomicOrbitalEvaluator(orbital), atomicGridBox(orbital, enclosedFraction, padding), resolution);
27
+ }
28
+ /**
29
+ * Build `ψ(x, y, z) = R(r) Y(x, y, z)` for one orbital, centred on the origin.
30
+ * @param orbital - The orbital to evaluate.
31
+ * @returns An allocation-free evaluator in ångström, returning Å^(-3/2).
32
+ */
33
+ export function createAtomicOrbitalEvaluator(orbital) {
34
+ const radial = createRadialFunction(hydrogenicParametersOf(orbital));
35
+ const angular = orbital.harmonic.evaluate;
36
+ // Every ℓ > 0 harmonic divides by the radius, and the nucleus is a grid point
37
+ // whenever the resolution is odd, so the singularity is real and is answered
38
+ // here: only an s orbital has amplitude at r = 0.
39
+ const atNucleus = orbital.l === 0 ? radial(0) * angular(0, 0, 0, 1) : 0;
40
+ return (x, y, z) => {
41
+ const squared = x * x + y * y + z * z;
42
+ if (squared === 0)
43
+ return atNucleus;
44
+ const radius = Math.sqrt(squared);
45
+ return radial(radius) * angular(x, y, z, radius);
46
+ };
47
+ }
48
+ /**
49
+ * The cube one orbital is sampled over.
50
+ * @param orbital - The orbital to fit.
51
+ * @param enclosedFraction - Share of the electron to contain.
52
+ * @param padding - Multiplier applied to the enclosing radius.
53
+ * @returns A cube centred on the nucleus.
54
+ */
55
+ export function atomicGridBox(orbital, enclosedFraction = DEFAULT_ENCLOSED_FRACTION, padding = DEFAULT_PADDING) {
56
+ const half = enclosingRadius(hydrogenicParametersOf(orbital), enclosedFraction) *
57
+ padding;
58
+ return {
59
+ origin: { x: -half, y: -half, z: -half },
60
+ size: { x: 2 * half, y: 2 * half, z: 2 * half },
61
+ };
62
+ }
63
+ /** Samples per edge; the cost is the cube of it. */
64
+ const DEFAULT_RESOLUTION = 56;
65
+ /** A tail past this holds too little density to change the surface. */
66
+ const DEFAULT_ENCLOSED_FRACTION = 0.985;
67
+ /** Room for the surface to close before the box ends. */
68
+ const DEFAULT_PADDING = 1.15;
69
+ //# sourceMappingURL=atomicGrid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicGrid.js","sourceRoot":"","sources":["../../../src/orbital/core/atomicGrid.ts"],"names":[],"mappings":"AAAA;;;;;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;QAClC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAsB,EACtB,gBAAgB,GAAG,yBAAyB,EAC5C,OAAO,GAAG,eAAe;IAEzB,MAAM,IAAI,GACR,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;QAClE,OAAO,CAAC;IACV,OAAO;QACL,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE;QACxC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE;KAChD,CAAC;AACJ,CAAC;AAED,oDAAoD;AACpD,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,uEAAuE;AACvE,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAExC,yDAAyD;AACzD,MAAM,eAAe,GAAG,IAAI,CAAC"}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * Every orbital of one element, assembled from the four parts that describe it.
3
+ *
4
+ * The configuration says which subshells hold electrons, Slater's rules say how
5
+ * strongly each is bound, the hydrogen-like radial function gives it a size and
6
+ * its radial nodes, and a real spherical harmonic gives it a shape. This module
7
+ * is only the join — it computes nothing itself, which is what keeps each of
8
+ * those four testable on its own.
9
+ *
10
+ * Electrons inside a subshell are spread by Hund's rule: every orbital of the
11
+ * subshell takes one before any takes a second. That is why nitrogen shows
12
+ * three singly-occupied 2p orbitals and oxygen one pair and two singles.
13
+ */
14
+ import type { HydrogenicParameters } from './hydrogenic.ts';
15
+ import type { RealHarmonic } from './realHarmonics.ts';
16
+ /** One atomic orbital of one element: a shape, a size and an occupancy. */
17
+ export interface AtomicOrbital {
18
+ /** Url-safe and unique within the element, e.g. `3dx2-y2`. */
19
+ id: string;
20
+ n: number;
21
+ /** Angular momentum quantum number: 0 = s, 1 = p, 2 = d, 3 = f. */
22
+ l: number;
23
+ /** Which of the `2ℓ + 1` real harmonics of the subshell. */
24
+ harmonic: RealHarmonic;
25
+ /** Subshell name without the subscript, e.g. `3d`. */
26
+ shell: string;
27
+ /** Electrons in this one orbital: 0, 1 or 2, after Hund's rule. */
28
+ electrons: number;
29
+ /** Electrons in the whole subshell. */
30
+ subshellElectrons: number;
31
+ /** Effective nuclear charge from Slater's rules. */
32
+ effectiveCharge: number;
33
+ /** Shielding `S` those rules produced. */
34
+ shielding: number;
35
+ /** `−13.6 Z_eff²/n²`, electronvolts. */
36
+ energy: number;
37
+ /** `n − ℓ − 1` spheres on which the wavefunction changes sign. */
38
+ radialNodes: number;
39
+ /** ℓ planes or cones on which it changes sign. */
40
+ angularNodes: number;
41
+ /** `⟨r⟩`, ångström. */
42
+ meanRadius: number;
43
+ /** True when the subshell is empty in the ground state. */
44
+ isVirtual: boolean;
45
+ /** True when this is the outermost occupied shell. */
46
+ isValence: boolean;
47
+ }
48
+ /** Options for {@link atomicOrbitalsOf}. */
49
+ export interface AtomicOrbitalOptions {
50
+ /**
51
+ * Highest principal quantum number to include. Defaults to one shell past
52
+ * the outermost occupied one, and never below 4 — a hydrogen atom whose list
53
+ * stopped at 2p would be missing exactly the 3d and 4f pictures it is famous
54
+ * for.
55
+ * @default max(4, outermost occupied n + 1), capped at 7
56
+ */
57
+ maximumShell?: number;
58
+ }
59
+ /**
60
+ * Every orbital of an element, in Madelung (roughly energetic) order.
61
+ * @param atomicNumber - Proton count, 1 to 118.
62
+ * @param options - See {@link AtomicOrbitalOptions}.
63
+ * @returns The orbitals, occupied ones first in filling order and the empty
64
+ * ones after them in the same order.
65
+ * @throws {Error} When the atomic number is outside the periodic table.
66
+ */
67
+ export declare function atomicOrbitalsOf(atomicNumber: number, options?: AtomicOrbitalOptions): AtomicOrbital[];
68
+ /**
69
+ * Find one orbital of an element by its id.
70
+ * @param orbitals - What {@link atomicOrbitalsOf} returned.
71
+ * @param id - Orbital id, e.g. `2px`.
72
+ * @returns The orbital, or `null` when the id names none.
73
+ */
74
+ export declare function findAtomicOrbital(orbitals: readonly AtomicOrbital[], id: string): AtomicOrbital | null;
75
+ /**
76
+ * The hydrogen-like parameters an orbital is drawn from.
77
+ * @param orbital - The orbital.
78
+ * @returns Its principal quantum number, ℓ and effective charge.
79
+ */
80
+ export declare function hydrogenicParametersOf(orbital: AtomicOrbital): HydrogenicParameters;
81
+ /**
82
+ * The id of one orbital, as it appears in a URL.
83
+ * @param n - Principal quantum number.
84
+ * @param l - Angular momentum quantum number.
85
+ * @param harmonic - Which real harmonic of the subshell.
86
+ * @returns The id, e.g. `4fxyz`.
87
+ */
88
+ export declare function orbitalId(n: number, l: number, harmonic: RealHarmonic): string;
89
+ /**
90
+ * The orbital a student should land on when they pick an element: the first
91
+ * one of the outermost occupied subshell, which is what the element's chemistry
92
+ * is about.
93
+ * @param orbitals - What {@link atomicOrbitalsOf} returned.
94
+ * @returns Its id, or `null` when the list is empty.
95
+ */
96
+ export declare function defaultOrbitalId(orbitals: readonly AtomicOrbital[]): string | null;
97
+ //# sourceMappingURL=atomicOrbitals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atomicOrbitals.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/atomicOrbitals.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAS5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIvD,2EAA2E;AAC3E,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,mEAAmE;IACnE,CAA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