@macrostrat/map-interface 1.5.1 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/index.js +2 -2
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/map-interface.1faa2839.js +14 -0
  5. package/dist/cjs/map-interface.1faa2839.js.map +1 -0
  6. package/dist/cjs/map-interface.1fdaaaf6.js +135 -0
  7. package/dist/cjs/map-interface.1fdaaaf6.js.map +1 -0
  8. package/dist/cjs/{map-interface.134ad930.js → map-interface.23d5c62c.js} +8 -2
  9. package/dist/cjs/map-interface.23d5c62c.js.map +1 -0
  10. package/dist/cjs/map-interface.24a1c14e.js +46 -0
  11. package/dist/cjs/map-interface.24a1c14e.js.map +1 -0
  12. package/dist/cjs/map-interface.2a4a5470.js +34 -0
  13. package/dist/cjs/map-interface.2a4a5470.js.map +1 -0
  14. package/dist/cjs/{map-interface.71259cf9.css → map-interface.368b346c.css} +10 -10
  15. package/dist/{esm/map-interface.409f6268.js.map → cjs/map-interface.368b346c.css.map} +1 -1
  16. package/dist/cjs/map-interface.3c606eea.js +36 -0
  17. package/dist/cjs/map-interface.3c606eea.js.map +1 -0
  18. package/dist/cjs/map-interface.441d3b83.css +69 -0
  19. package/dist/cjs/map-interface.441d3b83.css.map +1 -0
  20. package/dist/cjs/map-interface.49704804.js +388 -0
  21. package/dist/cjs/map-interface.49704804.js.map +1 -0
  22. package/dist/cjs/map-interface.4c2f5ced.js +58 -0
  23. package/dist/cjs/map-interface.4c2f5ced.js.map +1 -0
  24. package/dist/cjs/map-interface.5a4f4529.js +38 -0
  25. package/dist/cjs/map-interface.5a4f4529.js.map +1 -0
  26. package/dist/cjs/map-interface.633d24e6.css +22 -0
  27. package/dist/cjs/map-interface.633d24e6.css.map +1 -0
  28. package/dist/cjs/{map-interface.4264e7e1.js → map-interface.71e61c74.js} +19 -19
  29. package/dist/cjs/map-interface.71e61c74.js.map +1 -0
  30. package/dist/cjs/map-interface.ad03b0c2.js +64 -0
  31. package/dist/cjs/map-interface.ad03b0c2.js.map +1 -0
  32. package/dist/cjs/{map-interface.cc9ad5c6.js → map-interface.b15c1893.js} +10 -9
  33. package/dist/cjs/map-interface.b15c1893.js.map +1 -0
  34. package/dist/cjs/map-interface.ce2c83fa.js +17 -0
  35. package/dist/cjs/map-interface.ce2c83fa.js.map +1 -0
  36. package/dist/cjs/map-interface.e109c93a.js +100 -0
  37. package/dist/cjs/map-interface.e109c93a.js.map +1 -0
  38. package/dist/cjs/map-interface.f4227aaa.js +123 -0
  39. package/dist/cjs/map-interface.f4227aaa.js.map +1 -0
  40. package/dist/cjs/map-interface.f9611285.js +32 -0
  41. package/dist/cjs/map-interface.f9611285.js.map +1 -0
  42. package/dist/esm/index.d.ts +36 -1
  43. package/dist/esm/index.d.ts.map +1 -1
  44. package/dist/esm/index.js +2 -2
  45. package/dist/esm/index.js.map +1 -1
  46. package/dist/esm/map-interface.021cf79b.js +18 -0
  47. package/dist/esm/map-interface.021cf79b.js.map +1 -0
  48. package/dist/esm/map-interface.13e6d768.js +130 -0
  49. package/dist/esm/map-interface.13e6d768.js.map +1 -0
  50. package/dist/esm/map-interface.1f2a6325.js +54 -0
  51. package/dist/esm/map-interface.1f2a6325.js.map +1 -0
  52. package/dist/esm/map-interface.243c85c6.js +49 -0
  53. package/dist/esm/map-interface.243c85c6.js.map +1 -0
  54. package/dist/esm/{map-interface.c257cac1.js → map-interface.316fd76a.js} +8 -8
  55. package/dist/{cjs/map-interface.cc9ad5c6.js.map → esm/map-interface.316fd76a.js.map} +1 -1
  56. package/dist/esm/map-interface.47191f77.js +15 -0
  57. package/dist/esm/map-interface.47191f77.js.map +1 -0
  58. package/dist/esm/{map-interface.2b94a8ad.js → map-interface.578a7505.js} +3 -3
  59. package/dist/esm/map-interface.578a7505.js.map +1 -0
  60. package/dist/esm/map-interface.59896194.js +37 -0
  61. package/dist/esm/map-interface.59896194.js.map +1 -0
  62. package/dist/esm/map-interface.70768c2c.js +383 -0
  63. package/dist/esm/map-interface.70768c2c.js.map +1 -0
  64. package/dist/esm/map-interface.70d6a7ff.js +16 -0
  65. package/dist/esm/map-interface.70d6a7ff.js.map +1 -0
  66. package/dist/esm/map-interface.767fdc4a.js +64 -0
  67. package/dist/esm/map-interface.767fdc4a.js.map +1 -0
  68. package/dist/esm/map-interface.7ea8a1e0.js +40 -0
  69. package/dist/esm/map-interface.7ea8a1e0.js.map +1 -0
  70. package/dist/esm/map-interface.b97aca89.js +25 -0
  71. package/dist/esm/map-interface.b97aca89.js.map +1 -0
  72. package/dist/esm/map-interface.bdef07d2.js +34 -0
  73. package/dist/esm/map-interface.bdef07d2.js.map +1 -0
  74. package/dist/esm/map-interface.c1d19ef4.js +114 -0
  75. package/dist/esm/map-interface.c1d19ef4.js.map +1 -0
  76. package/dist/esm/map-interface.fb96fb7e.js +94 -0
  77. package/dist/esm/map-interface.fb96fb7e.js.map +1 -0
  78. package/dist/node/index.js +1 -1
  79. package/dist/node/index.js.map +1 -1
  80. package/dist/node/map-interface.206d8dd9.js +2 -0
  81. package/dist/node/map-interface.206d8dd9.js.map +1 -0
  82. package/dist/node/map-interface.3dbeec12.js +2 -0
  83. package/dist/node/map-interface.3dbeec12.js.map +1 -0
  84. package/dist/node/map-interface.432dd2f9.js +2 -0
  85. package/dist/node/map-interface.432dd2f9.js.map +1 -0
  86. package/dist/node/map-interface.73dfe675.js +2 -0
  87. package/dist/node/map-interface.73dfe675.js.map +1 -0
  88. package/dist/node/map-interface.82397845.js +2 -0
  89. package/dist/node/map-interface.82397845.js.map +1 -0
  90. package/dist/node/map-interface.8881e38a.js +2 -0
  91. package/dist/node/map-interface.8881e38a.js.map +1 -0
  92. package/dist/node/map-interface.9317d050.js +2 -0
  93. package/dist/node/map-interface.9317d050.js.map +1 -0
  94. package/dist/node/map-interface.97b93dd1.js +2 -0
  95. package/dist/node/map-interface.97b93dd1.js.map +1 -0
  96. package/dist/node/map-interface.9e6751ac.js +2 -0
  97. package/dist/node/map-interface.9e6751ac.js.map +1 -0
  98. package/dist/node/map-interface.a1252092.css +2 -0
  99. package/dist/node/map-interface.a1252092.css.map +1 -0
  100. package/dist/node/map-interface.a50eb4e3.js +2 -0
  101. package/dist/node/map-interface.a50eb4e3.js.map +1 -0
  102. package/dist/node/map-interface.a8a16138.js +2 -0
  103. package/dist/node/map-interface.a8a16138.js.map +1 -0
  104. package/dist/node/{map-interface.efc5dd17.js → map-interface.a8be0cba.js} +2 -2
  105. package/dist/node/map-interface.a8be0cba.js.map +1 -0
  106. package/dist/node/map-interface.ae3d2d83.js +2 -0
  107. package/dist/node/map-interface.ae3d2d83.js.map +1 -0
  108. package/dist/node/map-interface.c5c0ad06.js +2 -0
  109. package/dist/node/map-interface.c5c0ad06.js.map +1 -0
  110. package/dist/node/map-interface.d22d91e9.css +2 -0
  111. package/dist/node/map-interface.d22d91e9.css.map +1 -0
  112. package/dist/node/map-interface.d5eba479.css +2 -0
  113. package/dist/node/map-interface.d5eba479.css.map +1 -0
  114. package/dist/node/map-interface.f413c362.js +2 -0
  115. package/dist/node/map-interface.f413c362.js.map +1 -0
  116. package/dist/node/{map-interface.43014209.js → map-interface.fdd35e74.js} +2 -2
  117. package/dist/node/map-interface.fdd35e74.js.map +1 -0
  118. package/package.json +3 -3
  119. package/src/index.ts +1 -1
  120. package/src/location-details/fetch.ts +57 -0
  121. package/src/{map-panel/components/info-drawer → location-details}/fossil-collections/collections.tsx +1 -1
  122. package/src/{map-panel/components/info-drawer → location-details}/fossil-collections/index.ts +1 -1
  123. package/src/location-details/index.ts +5 -0
  124. package/src/{map-panel/components → location-details}/info-blocks.ts +7 -5
  125. package/src/location-details/location-details.stories.ts +104 -0
  126. package/src/{map-panel/components/info-drawer → location-details}/macrostrat-linked.ts +28 -20
  127. package/src/{map-panel/components/info-drawer → location-details}/physiography.ts +8 -7
  128. package/src/{map-panel/components/info-drawer → location-details}/reg-strat.ts +26 -7
  129. package/src/{map-panel/components/info-drawer → location-details}/xdd-panel/index.ts +6 -2
  130. package/dist/cjs/map-interface.0108e742.js +0 -24
  131. package/dist/cjs/map-interface.0108e742.js.map +0 -1
  132. package/dist/cjs/map-interface.02835ba5.js +0 -46
  133. package/dist/cjs/map-interface.02835ba5.js.map +0 -1
  134. package/dist/cjs/map-interface.0f2392a0.css +0 -64
  135. package/dist/cjs/map-interface.0f2392a0.css.map +0 -1
  136. package/dist/cjs/map-interface.134ad930.js.map +0 -1
  137. package/dist/cjs/map-interface.141c7329.js +0 -58
  138. package/dist/cjs/map-interface.141c7329.js.map +0 -1
  139. package/dist/cjs/map-interface.1be58b40.css +0 -69
  140. package/dist/cjs/map-interface.1be58b40.css.map +0 -1
  141. package/dist/cjs/map-interface.2a32a290.js +0 -98
  142. package/dist/cjs/map-interface.2a32a290.js.map +0 -1
  143. package/dist/cjs/map-interface.3f968b46.js +0 -381
  144. package/dist/cjs/map-interface.3f968b46.js.map +0 -1
  145. package/dist/cjs/map-interface.4264e7e1.js.map +0 -1
  146. package/dist/cjs/map-interface.5737346f.js +0 -113
  147. package/dist/cjs/map-interface.5737346f.js.map +0 -1
  148. package/dist/cjs/map-interface.58c87b08.js +0 -29
  149. package/dist/cjs/map-interface.58c87b08.js.map +0 -1
  150. package/dist/cjs/map-interface.71259cf9.css.map +0 -1
  151. package/dist/cjs/map-interface.937c0b90.js +0 -60
  152. package/dist/cjs/map-interface.937c0b90.js.map +0 -1
  153. package/dist/cjs/map-interface.9893b047.js +0 -38
  154. package/dist/cjs/map-interface.9893b047.js.map +0 -1
  155. package/dist/cjs/map-interface.aeb112a6.js +0 -115
  156. package/dist/cjs/map-interface.aeb112a6.js.map +0 -1
  157. package/dist/cjs/map-interface.d8e62b02.js +0 -17
  158. package/dist/cjs/map-interface.d8e62b02.js.map +0 -1
  159. package/dist/cjs/map-interface.ee59fc6e.js +0 -32
  160. package/dist/cjs/map-interface.ee59fc6e.js.map +0 -1
  161. package/dist/cjs/map-interface.ff2231f5.js +0 -37
  162. package/dist/cjs/map-interface.ff2231f5.js.map +0 -1
  163. package/dist/esm/map-interface.0258302d.js +0 -7
  164. package/dist/esm/map-interface.0258302d.js.map +0 -1
  165. package/dist/esm/map-interface.17a0e9a0.js +0 -51
  166. package/dist/esm/map-interface.17a0e9a0.js.map +0 -1
  167. package/dist/esm/map-interface.2b94a8ad.js.map +0 -1
  168. package/dist/esm/map-interface.36bab86c.js +0 -31
  169. package/dist/esm/map-interface.36bab86c.js.map +0 -1
  170. package/dist/esm/map-interface.409f6268.js +0 -34
  171. package/dist/esm/map-interface.5d011c2d.js +0 -110
  172. package/dist/esm/map-interface.5d011c2d.js.map +0 -1
  173. package/dist/esm/map-interface.6c44beb8.js +0 -49
  174. package/dist/esm/map-interface.6c44beb8.js.map +0 -1
  175. package/dist/esm/map-interface.6d7e89e5.js +0 -104
  176. package/dist/esm/map-interface.6d7e89e5.js.map +0 -1
  177. package/dist/esm/map-interface.70fdf48a.js +0 -64
  178. package/dist/esm/map-interface.70fdf48a.js.map +0 -1
  179. package/dist/esm/map-interface.a0ea0c86.js +0 -18
  180. package/dist/esm/map-interface.a0ea0c86.js.map +0 -1
  181. package/dist/esm/map-interface.b965dc94.js +0 -40
  182. package/dist/esm/map-interface.b965dc94.js.map +0 -1
  183. package/dist/esm/map-interface.ba171178.js +0 -376
  184. package/dist/esm/map-interface.ba171178.js.map +0 -1
  185. package/dist/esm/map-interface.c257cac1.js.map +0 -1
  186. package/dist/esm/map-interface.ce6edbfa.js +0 -37
  187. package/dist/esm/map-interface.ce6edbfa.js.map +0 -1
  188. package/dist/esm/map-interface.d86c2fc5.js +0 -32
  189. package/dist/esm/map-interface.d86c2fc5.js.map +0 -1
  190. package/dist/esm/map-interface.f5dccd21.js +0 -92
  191. package/dist/esm/map-interface.f5dccd21.js.map +0 -1
  192. package/dist/node/map-interface.01fee32b.js +0 -2
  193. package/dist/node/map-interface.01fee32b.js.map +0 -1
  194. package/dist/node/map-interface.0755d245.css +0 -2
  195. package/dist/node/map-interface.0755d245.css.map +0 -1
  196. package/dist/node/map-interface.2c94d421.js +0 -2
  197. package/dist/node/map-interface.2c94d421.js.map +0 -1
  198. package/dist/node/map-interface.42e8f2ba.js +0 -2
  199. package/dist/node/map-interface.42e8f2ba.js.map +0 -1
  200. package/dist/node/map-interface.43014209.js.map +0 -1
  201. package/dist/node/map-interface.4e422f5e.js +0 -2
  202. package/dist/node/map-interface.4e422f5e.js.map +0 -1
  203. package/dist/node/map-interface.55c953be.js +0 -2
  204. package/dist/node/map-interface.55c953be.js.map +0 -1
  205. package/dist/node/map-interface.791d22a7.css +0 -2
  206. package/dist/node/map-interface.791d22a7.css.map +0 -1
  207. package/dist/node/map-interface.792ebe85.js +0 -2
  208. package/dist/node/map-interface.792ebe85.js.map +0 -1
  209. package/dist/node/map-interface.7963263e.js +0 -2
  210. package/dist/node/map-interface.7963263e.js.map +0 -1
  211. package/dist/node/map-interface.9072849e.js +0 -2
  212. package/dist/node/map-interface.9072849e.js.map +0 -1
  213. package/dist/node/map-interface.bf061b97.js +0 -2
  214. package/dist/node/map-interface.bf061b97.js.map +0 -1
  215. package/dist/node/map-interface.c3275c05.js +0 -2
  216. package/dist/node/map-interface.c3275c05.js.map +0 -1
  217. package/dist/node/map-interface.ca6e8916.js +0 -2
  218. package/dist/node/map-interface.ca6e8916.js.map +0 -1
  219. package/dist/node/map-interface.d430c066.css +0 -2
  220. package/dist/node/map-interface.d430c066.css.map +0 -1
  221. package/dist/node/map-interface.dd613f56.js +0 -2
  222. package/dist/node/map-interface.dd613f56.js.map +0 -1
  223. package/dist/node/map-interface.ecfe462b.js +0 -2
  224. package/dist/node/map-interface.ecfe462b.js.map +0 -1
  225. package/dist/node/map-interface.efc5dd17.js.map +0 -1
  226. package/dist/node/map-interface.f42969c3.js +0 -2
  227. package/dist/node/map-interface.f42969c3.js.map +0 -1
  228. package/src/map-panel/components/buttons.module.styl +0 -5
  229. package/src/map-panel/components/buttons.ts +0 -56
  230. package/src/map-panel/components/card.module.styl +0 -43
  231. package/src/map-panel/components/closeable-card.ts +0 -64
  232. package/src/map-panel/components/docs.module.styl +0 -93
  233. package/src/map-panel/components/docs.ts +0 -92
  234. package/src/map-panel/components/info-drawer/index.ts +0 -115
  235. package/src/map-panel/components/transitions/index.ts +0 -24
  236. package/src/map-panel/components/transitions/main.module.styl +0 -55
  237. package/src/map-panel/index.ts +0 -1
  238. /package/src/{map-panel/components/info-drawer → location-details}/fossil-collections/main.module.sass +0 -0
  239. /package/src/{map-panel/components → location-details}/info-blocks.module.styl +0 -0
  240. /package/src/{map-panel/components/info-drawer → location-details}/main.module.styl +0 -0
  241. /package/src/{map-panel → location-details}/utils/formatting.ts +0 -0
  242. /package/src/{map-panel → location-details}/utils/fossils.ts +0 -0
  243. /package/src/{map-panel → location-details}/utils/index.ts +0 -0
  244. /package/src/{map-panel/components/info-drawer → location-details}/xdd-panel/Article.tsx +0 -0
  245. /package/src/{map-panel/components/info-drawer → location-details}/xdd-panel/Journal.tsx +0 -0
@@ -1,98 +0,0 @@
1
- var $3ffaa4c6fbcbe662$exports = require("./map-interface.cc9ad5c6.js");
2
- require("./map-interface.71259cf9.css");
3
- var $e08ed0d012ff7117$exports = require("./map-interface.ee59fc6e.js");
4
- var $2SCgO$macrostrathyper = require("@macrostrat/hyper");
5
- var $2SCgO$macrostratuicomponents = require("@macrostrat/ui-components");
6
- var $2SCgO$chromajs = require("chroma-js");
7
-
8
-
9
- function $parcel$interopDefault(a) {
10
- return a && a.__esModule ? a.default : a;
11
- }
12
-
13
- function $parcel$export(e, n, v, s) {
14
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
- }
16
-
17
- $parcel$export(module.exports, "AgeChip", () => $dd32e7ae54443412$export$f5b61c7108f98cd5);
18
- $parcel$export(module.exports, "AttrChip", () => $dd32e7ae54443412$export$bde077e6dcba34d5);
19
-
20
-
21
-
22
-
23
-
24
- const $dd32e7ae54443412$var$h = (0, ($parcel$interopDefault($2SCgO$macrostrathyper))).styled((0, ($parcel$interopDefault($e08ed0d012ff7117$exports))));
25
- function $dd32e7ae54443412$var$getColor(color, darkenAmount) {
26
- try {
27
- return (0, ($parcel$interopDefault($2SCgO$chromajs)))(color).darken(darkenAmount).hex();
28
- } catch (err) {
29
- return color;
30
- }
31
- }
32
- function $dd32e7ae54443412$export$3e199285d30e2209(props) {
33
- const { interval: interval, className: className } = props;
34
- const darkMode = (0, $2SCgO$macrostratuicomponents.useDarkMode)();
35
- const darkenAmount = darkMode.isEnabled ? 2 : 0;
36
- return $dd32e7ae54443412$var$h("a.chip-link", {
37
- href: `/lex/intervals/${interval.int_id}`
38
- }, $dd32e7ae54443412$var$h("div.chip.age-chip", {
39
- className: className,
40
- style: {
41
- backgroundColor: $dd32e7ae54443412$var$getColor(interval.color, darkenAmount)
42
- }
43
- }, [
44
- $dd32e7ae54443412$var$h("div.age-chip-interval", interval.int_name),
45
- $dd32e7ae54443412$var$h("div.age-chip-age", [
46
- $dd32e7ae54443412$var$h($dd32e7ae54443412$var$Age, {
47
- age: interval.b_age
48
- }),
49
- " - ",
50
- $dd32e7ae54443412$var$h($dd32e7ae54443412$var$Age, {
51
- age: interval.t_age
52
- })
53
- ])
54
- ]));
55
- }
56
- function $dd32e7ae54443412$var$Age({ age: age }) {
57
- return $dd32e7ae54443412$var$h("span.age", [
58
- age,
59
- $dd32e7ae54443412$var$h("span.age-chip-ma", [
60
- "Ma"
61
- ])
62
- ]);
63
- }
64
- function $dd32e7ae54443412$export$f5b61c7108f98cd5(props) {
65
- const { t_int: t_int, b_int: b_int } = props;
66
- return $dd32e7ae54443412$var$h("div.age-chip-container", [
67
- $dd32e7ae54443412$var$h($dd32e7ae54443412$export$3e199285d30e2209, {
68
- interval: b_int
69
- }),
70
- $dd32e7ae54443412$var$h.if(b_int.int_id != props.t_int.int_id)($dd32e7ae54443412$export$3e199285d30e2209, {
71
- interval: t_int,
72
- className: "age-chip-t-int"
73
- })
74
- ]);
75
- }
76
- function $dd32e7ae54443412$export$bde077e6dcba34d5(props) {
77
- const { fill: fill = null, color: color, name: name, className: className, emphasized: emphasized = true, style: style } = props;
78
- // Deactivated for now
79
- // if (fill) {
80
- // styles["backgroundImage"] = `url('dist/img/geologic-patterns/${fill}.png')`;
81
- // }
82
- return $dd32e7ae54443412$var$h("div.lith-chip", {
83
- style: style,
84
- className: className
85
- }, [
86
- $dd32e7ae54443412$var$h("div.lith-chip-inner.chip", {
87
- style: {
88
- backgroundColor: (0, $3ffaa4c6fbcbe662$exports.hexToRgb)(color, 0.6)
89
- },
90
- className: emphasized ? "emphasized" : null
91
- }, [
92
- name
93
- ])
94
- ]);
95
- }
96
-
97
-
98
- //# sourceMappingURL=map-interface.2a32a290.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,0BAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAE5B,SAAS,+BAAS,KAAK,EAAE,YAAY;IACnC,IAAI;QACF,OAAO,CAAA,GAAA,yCAAK,EAAE,OAAO,MAAM,CAAC,cAAc,GAAG;IAC/C,EAAE,OAAO,KAAK;QACZ,OAAO;IACT;AACF;AAEA,SAAS,0CAAa,KAAK;IACzB,MAAM,YAAE,QAAQ,aAAE,SAAS,EAAE,GAAG;IAChC,MAAM,WAAW,CAAA,GAAA,yCAAU;IAC3B,MAAM,eAAe,SAAS,SAAS,GAAG,IAAI;IAE9C,OAAO,wBACL,eACA;QACE,MAAM,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE;IAC3C,GACA,wBACE,qBACA;mBACE;QACA,OAAO;YACL,iBAAiB,+BAAS,SAAS,KAAK,EAAE;QAC5C;IACF,GACA;QACE,wBAAE,yBAAyB,SAAS,QAAQ;QAC5C,wBAAE,oBAAoB;YACpB,wBAAE,2BAAK;gBAAE,KAAK,SAAS,KAAK;YAAC;YAC7B;YACA,wBAAE,2BAAK;gBAAE,KAAK,SAAS,KAAK;YAAC;SAC9B;KACF;AAGP;AAEA,SAAS,0BAAI,OAAE,GAAG,EAAE;IAClB,OAAO,wBAAE,YAAY;QAAC;QAAK,wBAAE,oBAAoB;YAAC;SAAK;KAAE;AAC3D;AAEA,SAAS,0CAAQ,KAAK;IACpB,MAAM,SAAE,KAAK,SAAE,KAAK,EAAE,GAAG;IACzB,OAAO,wBAAE,0BAA0B;QACjC,wBAAE,2CAAc;YAAE,UAAU;QAAM;QAClC,wBAAE,EAAE,CAAC,MAAM,MAAM,IAAI,MAAM,KAAK,CAAC,MAAM,EAAE,2CAAc;YACrD,UAAU;YACV,WAAW;QACb;KACD;AACH;AAEA,SAAS,0CAAS,KAAK;IACrB,MAAM,QACJ,OAAO,aACP,KAAK,QACL,IAAI,aACJ,SAAS,cACT,aAAa,aACb,KAAK,EACN,GAAG;IAEJ,sBAAsB;IACtB,cAAc;IACd,iFAAiF;IACjF,IAAI;IACJ,OAAO,wBAAE,iBAAiB;eAAE;mBAAO;IAAU,GAAG;QAC9C,wBACE,4BACA;YACE,OAAO;gBAAE,iBAAiB,CAAA,GAAA,kCAAO,EAAE,OAAO;YAAK;YAC/C,WAAW,aAAa,eAAe;QACzC,GACA;YAAC;SAAK;KAET;AACH","sources":["packages/map-interface/src/map-panel/components/info-blocks.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { hexToRgb } from \"../utils\";\nimport styles from \"./info-blocks.module.styl\";\nimport { useDarkMode } from \"@macrostrat/ui-components\";\nimport chroma from \"chroma-js\";\n\nconst h = hyper.styled(styles);\n\nfunction getColor(color, darkenAmount) {\n try {\n return chroma(color).darken(darkenAmount).hex();\n } catch (err) {\n return color;\n }\n}\n\nfunction IntervalChip(props) {\n const { interval, className } = props;\n const darkMode = useDarkMode();\n const darkenAmount = darkMode.isEnabled ? 2 : 0;\n\n return h(\n \"a.chip-link\",\n {\n href: `/lex/intervals/${interval.int_id}`,\n },\n h(\n \"div.chip.age-chip\",\n {\n className,\n style: {\n backgroundColor: getColor(interval.color, darkenAmount),\n },\n },\n [\n h(\"div.age-chip-interval\", interval.int_name),\n h(\"div.age-chip-age\", [\n h(Age, { age: interval.b_age }),\n \" - \",\n h(Age, { age: interval.t_age }),\n ]),\n ],\n ),\n );\n}\n\nfunction Age({ age }) {\n return h(\"span.age\", [age, h(\"span.age-chip-ma\", [\"Ma\"])]);\n}\n\nfunction AgeChip(props) {\n const { t_int, b_int } = props;\n return h(\"div.age-chip-container\", [\n h(IntervalChip, { interval: b_int }),\n h.if(b_int.int_id != props.t_int.int_id)(IntervalChip, {\n interval: t_int,\n className: \"age-chip-t-int\",\n }),\n ]);\n}\n\nfunction AttrChip(props) {\n const {\n fill = null,\n color,\n name,\n className,\n emphasized = true,\n style,\n } = props;\n\n // Deactivated for now\n // if (fill) {\n // styles[\"backgroundImage\"] = `url('dist/img/geologic-patterns/${fill}.png')`;\n // }\n return h(\"div.lith-chip\", { style, className }, [\n h(\n \"div.lith-chip-inner.chip\",\n {\n style: { backgroundColor: hexToRgb(color, 0.6) },\n className: emphasized ? \"emphasized\" : null,\n },\n [name],\n ),\n ]);\n}\n\nexport { AgeChip, AttrChip, IntervalChip };\n"],"names":[],"version":3,"file":"map-interface.2a32a290.js.map"}
@@ -1,381 +0,0 @@
1
- var $dd32e7ae54443412$exports = require("./map-interface.2a32a290.js");
2
- require("./map-interface.1be58b40.css");
3
- var $f2e0b9e87d965c31$exports = require("./map-interface.9893b047.js");
4
- var $7j411$macrostrathyper = require("@macrostrat/hyper");
5
- var $7j411$macrostratmapinterface = require("@macrostrat/map-interface");
6
- var $7j411$visxscale = require("@visx/scale");
7
- var $7j411$visxaxis = require("@visx/axis");
8
- var $7j411$chromajs = require("chroma-js");
9
- var $7j411$macrostratdatacomponents = require("@macrostrat/data-components");
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
-
16
- function $parcel$export(e, n, v, s) {
17
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
18
- }
19
-
20
- $parcel$export(module.exports, "MacrostratLinkedData", () => $8569970142f4fcfc$export$fa9d8c2f420ac2bd);
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
- const $8569970142f4fcfc$var$h = (0, ($parcel$interopDefault($7j411$macrostrathyper))).styled((0, ($parcel$interopDefault($f2e0b9e87d965c31$exports))));
30
- function $8569970142f4fcfc$export$fa9d8c2f420ac2bd(props) {
31
- const { mapInfo: mapInfo, bedrockMatchExpanded: bedrockMatchExpanded, source: source } = props;
32
- if (!mapInfo.mapData[0]) return $8569970142f4fcfc$var$h("div");
33
- return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionPanel), {
34
- className: "regional-panel",
35
- title: "Macrostrat-linked data",
36
- helpText: "via Macrostrat",
37
- expanded: bedrockMatchExpanded
38
- }, [
39
- $8569970142f4fcfc$var$h("div", {
40
- classes: $8569970142f4fcfc$var$expansionPanelDetailClasses
41
- }, [
42
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MatchBasis, {
43
- source: source
44
- }),
45
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeInformation, {
46
- mapInfo: mapInfo,
47
- source: source
48
- }),
49
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$Thickness, {
50
- source: source
51
- }),
52
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MinorFossilCollections, {
53
- source: source
54
- }),
55
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$FossilOccs, {
56
- source: source
57
- }),
58
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$LithsAndClasses, {
59
- source: source
60
- }),
61
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$Environments, {
62
- source: source
63
- }),
64
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$Economy, {
65
- source: source
66
- })
67
- ])
68
- ]);
69
- }
70
- const $8569970142f4fcfc$var$expansionPanelDetailClasses = {
71
- root: "expansion-panel-detail"
72
- };
73
- function $8569970142f4fcfc$var$AgeInformation(props) {
74
- const { source: source, mapInfo: mapInfo } = props;
75
- const { macrostrat: macrostrat } = source;
76
- if (!macrostrat?.b_age) return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MapAgeRenderer, {
77
- mapInfo: mapInfo
78
- });
79
- return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MacrostratAgeInfo, {
80
- macrostrat: macrostrat,
81
- mapInfo: mapInfo
82
- });
83
- }
84
- function $8569970142f4fcfc$var$MapAgeRenderer(props) {
85
- const { mapInfo: mapInfo, ...rest } = props;
86
- return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$DescribedAgeInfo, {
87
- ageElement: $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AgeChip), {
88
- b_int: mapInfo.mapData[0].b_int,
89
- t_int: mapInfo.mapData[0].t_int
90
- })
91
- }, "Based on geologic map description.");
92
- }
93
- function $8569970142f4fcfc$var$DescribedAgeInfo(props) {
94
- const { ageElement: ageElement, children: children, className: className } = props;
95
- return $8569970142f4fcfc$var$h("div.described-age.macrostrast-detail", [
96
- $8569970142f4fcfc$var$h("div.expansion-summary-title", "Age"),
97
- $8569970142f4fcfc$var$h("div.age-chips", null, ageElement),
98
- $8569970142f4fcfc$var$h("div.description", children)
99
- ]);
100
- }
101
- function $8569970142f4fcfc$var$AgeRefinementBar({ scale: scale, data: data, color: color, label: label = null }) {
102
- const { b_int: b_int, t_int: t_int } = data;
103
- const b_age = data.b_age ?? b_int.b_age;
104
- const t_age = data.t_age ?? t_int.t_age;
105
- const backgroundColor = color ?? b_int.color;
106
- const accentColor = (0, ($parcel$interopDefault($7j411$chromajs)))(backgroundColor).darken(0.5).hex();
107
- const labelColor = (0, ($parcel$interopDefault($7j411$chromajs)))(backgroundColor).darken(2).hex();
108
- const left = scale(b_age);
109
- const width = scale(t_age) - scale(b_age);
110
- let labelTranslate = 5;
111
- let textAlign = "start";
112
- // Adjust label placement
113
- if (width < 100) {
114
- if (left < 100) labelTranslate = width + 5;
115
- else {
116
- labelTranslate = -305;
117
- textAlign = "end";
118
- }
119
- }
120
- return $8569970142f4fcfc$var$h("div.age-refinement-bar", {
121
- style: {
122
- marginLeft: `${left}px`,
123
- width: `${width}px`,
124
- height: "18px",
125
- backgroundColor: backgroundColor,
126
- border: `2px solid ${accentColor}`,
127
- position: "relative"
128
- }
129
- }, $8569970142f4fcfc$var$h("div.age-refinement-bar-label", {
130
- style: {
131
- transform: `translateX(${labelTranslate}px)`,
132
- color: labelColor,
133
- fontSize: "10px",
134
- width: 300,
135
- textAlign: textAlign
136
- }
137
- }, label));
138
- }
139
- function $8569970142f4fcfc$var$AgeRefinementPlot({ macrostrat: macrostrat, mapInfo: mapInfo }) {
140
- // Plot the amount by which the age was refined
141
- const mapData = mapInfo.mapData[0];
142
- const b_age = Math.max(mapData.b_int.b_age, macrostrat.b_age);
143
- const t_age = Math.min(mapData.t_int.t_age, macrostrat.t_age);
144
- const scale = (0, $7j411$visxscale.scaleLinear)({
145
- domain: [
146
- 1.02 * b_age,
147
- t_age * 0.98
148
- ],
149
- range: [
150
- 20,
151
- 360
152
- ]
153
- });
154
- // use visx to plot the age refinement
155
- return $8569970142f4fcfc$var$h("div.age-refinement-plot", [
156
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeRefinementBar, {
157
- scale: scale,
158
- data: macrostrat,
159
- label: "Macrostrat age model"
160
- }),
161
- $8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeRefinementBar, {
162
- scale: scale,
163
- data: mapData,
164
- label: "Map legend"
165
- }),
166
- // Age axis
167
- $8569970142f4fcfc$var$h("svg", {
168
- width: "100%",
169
- height: "40px"
170
- }, [
171
- $8569970142f4fcfc$var$h((0, $7j411$visxaxis.AxisBottom), {
172
- scale: scale,
173
- numTicks: 5,
174
- top: 1,
175
- left: 0,
176
- label: "Age (Ma)"
177
- })
178
- ])
179
- ]);
180
- }
181
- function $8569970142f4fcfc$var$MacrostratAgeInfoCore({ macrostrat: macrostrat }) {
182
- const { b_age: b_age, t_age: t_age, b_int: b_int, t_int: t_int } = macrostrat;
183
- if (!b_age) return null;
184
- let age = b_int.int_name;
185
- if (b_int.int_id !== t_int.int_id) age += ` - ${t_int.int_name}`;
186
- return $8569970142f4fcfc$var$h($8569970142f4fcfc$var$DescribedAgeInfo, {
187
- ageElement: $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AgeChip), {
188
- b_int: {
189
- ...b_int,
190
- int_name: age,
191
- b_age: b_age,
192
- t_age: t_age
193
- },
194
- t_int: {
195
- ...b_int,
196
- int_name: age,
197
- b_age: b_age,
198
- t_age: t_age
199
- }
200
- })
201
- }, "Refined using the Macrostrat age model.");
202
- }
203
- function $8569970142f4fcfc$var$MacrostratAgeInfo(props) {
204
- return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
205
- headerElement: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$MacrostratAgeInfoCore, props)
206
- }, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
207
- title: "Age refinement"
208
- }, $8569970142f4fcfc$var$h($8569970142f4fcfc$var$AgeRefinementPlot, props)));
209
- }
210
- function $8569970142f4fcfc$var$MatchBasis(props) {
211
- const { source: source } = props;
212
- if (!source.macrostrat?.strat_names) return null;
213
- return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
214
- className: "macrostrat-unit",
215
- headerElement: $8569970142f4fcfc$var$h([
216
- $8569970142f4fcfc$var$h("h3", source.macrostrat.strat_names[0].rank_name),
217
- $8569970142f4fcfc$var$h("div.description", "Matched stratigraphic unit")
218
- ])
219
- }, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
220
- title: "All matched names"
221
- }, [
222
- source.macrostrat.strat_names.map((name, i)=>{
223
- let lastElement = i == source.macrostrat.strat_names.length - 1;
224
- return $8569970142f4fcfc$var$h("span", {
225
- key: i
226
- }, [
227
- $8569970142f4fcfc$var$h("a.externalLink", {
228
- href: "/lex/strat-names/" + name.strat_name_id,
229
- key: i
230
- }, [
231
- name.rank_name
232
- ]),
233
- $8569970142f4fcfc$var$h.if(!lastElement)([
234
- ", "
235
- ])
236
- ]);
237
- })
238
- ]));
239
- }
240
- function $8569970142f4fcfc$var$Thickness(props) {
241
- const { source: source } = props;
242
- if (!source.macrostrat.max_thick) return $8569970142f4fcfc$var$h("div");
243
- return $8569970142f4fcfc$var$h.if(source.macrostrat && source.macrostrat.max_thick)("div.macrostrat-detail", [
244
- $8569970142f4fcfc$var$h("div.expansion-summary-title", "Thickness"),
245
- $8569970142f4fcfc$var$h("div", [
246
- source.macrostrat.min_min_thick,
247
- " - ",
248
- source.macrostrat.max_thick,
249
- "m"
250
- ])
251
- ]);
252
- }
253
- function $8569970142f4fcfc$var$MinorFossilCollections(props) {
254
- const { source: source } = props;
255
- const { macrostrat: macrostrat } = source;
256
- if (!macrostrat.pbdb_collections) return $8569970142f4fcfc$var$h("div");
257
- return $8569970142f4fcfc$var$h.if(macrostrat && macrostrat.pbdb_collections)("div.macrostrat-detail", [
258
- $8569970142f4fcfc$var$h("div.expansion-summary-title", "Fossil collections"),
259
- $8569970142f4fcfc$var$h("div", [
260
- macrostrat.pbdb_collections
261
- ])
262
- ]);
263
- }
264
- function $8569970142f4fcfc$var$FossilOccs(props) {
265
- const { source: source } = props;
266
- const { macrostrat: macrostrat } = source;
267
- if (!macrostrat?.pbdb_occs) return null;
268
- return $8569970142f4fcfc$var$h("div.macrostrat-detail", [
269
- $8569970142f4fcfc$var$h("div.expansion-summary-title", "Fossil occurrences"),
270
- $8569970142f4fcfc$var$h("div", [
271
- macrostrat.pbdb_occs
272
- ])
273
- ]);
274
- }
275
- function $8569970142f4fcfc$var$LithTypes(props) {
276
- const { lith_types: lith_types } = props;
277
- return $8569970142f4fcfc$var$h.if(lith_types && lith_types.length > 0)("div.lithologies.lithology-types", [
278
- $8569970142f4fcfc$var$h((0, $7j411$macrostratdatacomponents.LithologyList), {
279
- lithologies: lith_types
280
- })
281
- ]);
282
- }
283
- function $8569970142f4fcfc$var$LithsAndClasses(props) {
284
- const { source: source } = props;
285
- const { macrostrat: macrostrat } = source;
286
- const { liths: liths = null, lith_types: lith_types = null } = macrostrat;
287
- if (!liths || liths.length == 0) return null;
288
- const lithologies = liths.map((lith)=>{
289
- return {
290
- ...lith,
291
- name: lith.lith,
292
- color: lith.color || "#000000"
293
- };
294
- });
295
- return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
296
- title: "Lithology",
297
- value: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$LithTypes, {
298
- lith_types: lith_types
299
- })
300
- }, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
301
- title: "Matched lithologies"
302
- }, [
303
- $8569970142f4fcfc$var$h((0, $7j411$macrostratdatacomponents.LithologyList), {
304
- lithologies: lithologies,
305
- onClickItem: (e, lith)=>{
306
- window.open("/lex/lithology/" + lith.lith_id, "_self");
307
- }
308
- })
309
- ]));
310
- }
311
- function $8569970142f4fcfc$var$EnvironTypes(props) {
312
- const { environ_types: environ_types } = props;
313
- return $8569970142f4fcfc$var$h.if(environ_types && environ_types.length > 0)((0, $7j411$macrostratdatacomponents.LithologyList), {
314
- lithologies: environ_types?.filter((e)=>e.name != "")
315
- });
316
- }
317
- function $8569970142f4fcfc$var$Environments(props) {
318
- const { source: source } = props;
319
- const { macrostrat: macrostrat } = source;
320
- const { environs: environs = null, environ_types: environ_types = null } = macrostrat;
321
- if (!environs || environs.length == 0) return null;
322
- const lithologies = environs.map((environ)=>{
323
- return {
324
- ...environ,
325
- name: environ.environ,
326
- color: environ.color || "#000000"
327
- };
328
- });
329
- return $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
330
- title: "Environment",
331
- value: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$EnvironTypes, {
332
- environ_types: environ_types
333
- })
334
- }, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
335
- title: "Matched environments"
336
- }, [
337
- $8569970142f4fcfc$var$h((0, $7j411$macrostratdatacomponents.LithologyList), {
338
- lithologies: lithologies,
339
- onClickItem: (e, environ)=>{
340
- window.open("/lex/environments/" + environ.environ_id, "_self");
341
- }
342
- })
343
- ]));
344
- }
345
- function $8569970142f4fcfc$var$EconType(props) {
346
- const { econ_types: econ_types } = props;
347
- return $8569970142f4fcfc$var$h.if(econ_types && econ_types.length > 0)("div", [
348
- econ_types.map((econClass, i)=>{
349
- return $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AttrChip), {
350
- key: i,
351
- name: econClass.name,
352
- color: econClass.color
353
- });
354
- })
355
- ]);
356
- }
357
- function $8569970142f4fcfc$var$Economy(props) {
358
- const { source: source } = props;
359
- const { macrostrat: macrostrat } = source;
360
- const { econs: econs = null, econ_types: econ_types = null } = macrostrat;
361
- if (!econs) return $8569970142f4fcfc$var$h("div");
362
- return $8569970142f4fcfc$var$h.if(econs && econs.length > 0)((0, $7j411$macrostratmapinterface.ExpandableDetailsPanel), {
363
- title: "Economy ",
364
- value: $8569970142f4fcfc$var$h($8569970142f4fcfc$var$EconType, {
365
- econ_types: econ_types
366
- })
367
- }, $8569970142f4fcfc$var$h((0, $7j411$macrostratmapinterface.ExpansionBody), {
368
- title: "Matched economic attributes"
369
- }, [
370
- econs.map((econ, i)=>{
371
- return $8569970142f4fcfc$var$h((0, $dd32e7ae54443412$exports.AttrChip), {
372
- key: i,
373
- name: econ.econ,
374
- color: econ.color
375
- });
376
- })
377
- ]));
378
- }
379
-
380
-
381
- //# sourceMappingURL=map-interface.3f968b46.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAE5B,SAAS,0CAAqB,KAA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C5C,IAAI,CAAC,OAAO,OAAO,wBAAE;IAErB,OAAO,wBAAE,EAAE,CAAC,SAAS,MAAM,MAAM,GAAG,GAClC,CAAA,GAAA,oDAAqB,GACrB;QACE,OAAO;QACP,OAAO,wBAAE,gCAAU;wBAAE;QAAW;IAClC,GACA,wBAAE,CAAA,GAAA,2CAAY,GAAG;QAAE,OAAO;IAA8B,GAAG;QACzD,MAAM,GAAG,CAAC,CAAC,MAAM;YACf,OAAO,wBAAE,CAAA,GAAA,kCAAO,GAAG;gBACjB,KAAK;gBACL,MAAM,KAAK,IAAI;gBACf,OAAO,KAAK,KAAK;YACnB;QACF;KACD;AAEL","sources":["packages/map-interface/src/map-panel/components/info-drawer/macrostrat-linked.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { AgeChip, AttrChip } from \"../info-blocks\";\nimport {\n ExpansionPanel,\n ExpandableDetailsPanel,\n ExpansionBody,\n} from \"@macrostrat/map-interface\";\nimport styles from \"./main.module.styl\";\nimport { scaleLinear } from \"@visx/scale\";\nimport { AxisBottom } from \"@visx/axis\";\nimport chroma from \"chroma-js\";\nimport { LithologyList } from \"@macrostrat/data-components\";\n\nconst h = hyper.styled(styles);\n\nfunction MacrostratLinkedData(props) {\n const { mapInfo, bedrockMatchExpanded, source } = props;\n\n if (!mapInfo.mapData[0]) return h(\"div\");\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Macrostrat-linked data\",\n helpText: \"via Macrostrat\",\n expanded: bedrockMatchExpanded,\n },\n [\n h(\"div\", { classes: expansionPanelDetailClasses }, [\n h(MatchBasis, { source }),\n h(AgeInformation, { mapInfo, source }),\n h(Thickness, { source }),\n h(MinorFossilCollections, { source }),\n h(FossilOccs, { source }),\n h(LithsAndClasses, { source }),\n h(Environments, { source }),\n h(Economy, { source }),\n ]),\n ],\n );\n}\n\nconst expansionPanelDetailClasses = {\n root: \"expansion-panel-detail\",\n};\n\nfunction AgeInformation(props) {\n const { source, mapInfo } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.b_age) return h(MapAgeRenderer, { mapInfo });\n\n return h(MacrostratAgeInfo, { macrostrat, mapInfo });\n}\n\nfunction MapAgeRenderer(props) {\n const { mapInfo, ...rest } = props;\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: mapInfo.mapData[0].b_int,\n t_int: mapInfo.mapData[0].t_int,\n }),\n },\n \"Based on geologic map description.\",\n );\n}\n\nfunction DescribedAgeInfo(props) {\n const { ageElement, children, className } = props;\n\n return h(\"div.described-age.macrostrast-detail\", [\n h(\"div.expansion-summary-title\", \"Age\"),\n h(\"div.age-chips\", null, ageElement),\n h(\"div.description\", children),\n ]);\n}\n\nfunction AgeRefinementBar({ scale, data, color, label = null }) {\n const { b_int, t_int } = data;\n const b_age = data.b_age ?? b_int.b_age;\n const t_age = data.t_age ?? t_int.t_age;\n const backgroundColor = color ?? b_int.color;\n const accentColor = chroma(backgroundColor).darken(0.5).hex();\n const labelColor = chroma(backgroundColor).darken(2).hex();\n\n const left = scale(b_age);\n const width = scale(t_age) - scale(b_age);\n\n let labelTranslate = 5;\n let textAlign = \"start\";\n\n // Adjust label placement\n\n if (width < 100) {\n if (left < 100) {\n labelTranslate = width + 5;\n } else {\n labelTranslate = -305;\n textAlign = \"end\";\n }\n }\n\n return h(\n \"div.age-refinement-bar\",\n {\n style: {\n marginLeft: `${left}px`,\n width: `${width}px`,\n height: \"18px\",\n backgroundColor,\n border: `2px solid ${accentColor}`,\n position: \"relative\",\n },\n },\n h(\n \"div.age-refinement-bar-label\",\n {\n style: {\n transform: `translateX(${labelTranslate}px)`,\n color: labelColor,\n fontSize: \"10px\",\n width: 300,\n textAlign,\n },\n },\n label,\n ),\n );\n}\n\nfunction AgeRefinementPlot({ macrostrat, mapInfo }) {\n // Plot the amount by which the age was refined\n\n const mapData = mapInfo.mapData[0];\n const b_age = Math.max(mapData.b_int.b_age, macrostrat.b_age);\n const t_age = Math.min(mapData.t_int.t_age, macrostrat.t_age);\n\n const scale = scaleLinear({\n domain: [1.02 * b_age, t_age * 0.98],\n range: [20, 360],\n });\n\n // use visx to plot the age refinement\n return h(\"div.age-refinement-plot\", [\n h(AgeRefinementBar, {\n scale,\n data: macrostrat,\n label: \"Macrostrat age model\",\n }),\n h(AgeRefinementBar, {\n scale,\n data: mapData,\n label: \"Map legend\",\n }),\n // Age axis\n h(\"svg\", { width: \"100%\", height: \"40px\" }, [\n h(AxisBottom, {\n scale,\n numTicks: 5,\n top: 1,\n left: 0,\n label: \"Age (Ma)\",\n }),\n ]),\n ]);\n}\n\nfunction MacrostratAgeInfoCore({ macrostrat }) {\n const { b_age, t_age, b_int, t_int } = macrostrat;\n\n if (!b_age) return null;\n\n let age = b_int.int_name;\n if (b_int.int_id !== t_int.int_id) {\n age += ` - ${t_int.int_name}`;\n }\n return h(\n DescribedAgeInfo,\n {\n ageElement: h(AgeChip, {\n b_int: { ...b_int, int_name: age, b_age, t_age },\n t_int: { ...b_int, int_name: age, b_age, t_age },\n }),\n },\n \"Refined using the Macrostrat age model.\",\n );\n}\n\nfunction MacrostratAgeInfo(props) {\n return h(\n ExpandableDetailsPanel,\n { headerElement: h(MacrostratAgeInfoCore, props) },\n h(ExpansionBody, { title: \"Age refinement\" }, h(AgeRefinementPlot, props)),\n );\n}\n\nfunction MatchBasis(props) {\n const { source } = props;\n if (!source.macrostrat?.strat_names) return null;\n\n return h(\n ExpandableDetailsPanel,\n {\n className: \"macrostrat-unit\",\n headerElement: h([\n h(\"h3\", source.macrostrat.strat_names[0].rank_name),\n h(\"div.description\", \"Matched stratigraphic unit\"),\n ]),\n },\n h(ExpansionBody, { title: \"All matched names\" }, [\n source.macrostrat.strat_names.map((name, i) => {\n let lastElement: boolean =\n i == source.macrostrat.strat_names.length - 1;\n return h(\"span\", { key: i }, [\n h(\n \"a.externalLink\",\n {\n href: \"/lex/strat-names/\" + name.strat_name_id,\n key: i,\n },\n [name.rank_name],\n ),\n h.if(!lastElement)([\", \"]),\n ]);\n }),\n ]),\n );\n}\n\nfunction Thickness(props) {\n const { source } = props;\n if (!source.macrostrat.max_thick) return h(\"div\");\n\n return h.if(source.macrostrat && source.macrostrat.max_thick)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Thickness\"),\n h(\"div\", [\n source.macrostrat.min_min_thick,\n \" - \",\n source.macrostrat.max_thick,\n \"m\",\n ]),\n ],\n );\n}\n\nfunction MinorFossilCollections(props) {\n const { source } = props;\n const { macrostrat } = source;\n if (!macrostrat.pbdb_collections) return h(\"div\");\n\n return h.if(macrostrat && macrostrat.pbdb_collections)(\n \"div.macrostrat-detail\",\n [\n h(\"div.expansion-summary-title\", \"Fossil collections\"),\n h(\"div\", [macrostrat.pbdb_collections]),\n ],\n );\n}\n\nfunction FossilOccs(props) {\n const { source } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.pbdb_occs) return null;\n\n return h(\"div.macrostrat-detail\", [\n h(\"div.expansion-summary-title\", \"Fossil occurrences\"),\n h(\"div\", [macrostrat.pbdb_occs]),\n ]);\n}\n\nfunction LithTypes(props) {\n const { lith_types } = props;\n\n return h.if(lith_types && lith_types.length > 0)(\n \"div.lithologies.lithology-types\",\n [\n h(LithologyList, {\n lithologies: lith_types,\n }),\n ],\n );\n}\n\nfunction LithsAndClasses(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { liths = null, lith_types = null } = macrostrat;\n\n if (!liths || liths.length == 0) return null;\n\n const lithologies = liths.map((lith) => {\n return {\n ...lith,\n name: lith.lith,\n color: lith.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Lithology\",\n value: h(LithTypes, { lith_types }),\n },\n h(ExpansionBody, { title: \"Matched lithologies\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, lith) => {\n window.open(\"/lex/lithology/\" + lith.lith_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EnvironTypes(props) {\n const { environ_types } = props;\n return h.if(environ_types && environ_types.length > 0)(LithologyList, {\n lithologies: environ_types?.filter((e) => e.name != \"\"),\n });\n}\n\nfunction Environments(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { environs = null, environ_types = null } = macrostrat;\n\n if (!environs || environs.length == 0) return null;\n\n const lithologies = environs.map((environ) => {\n return {\n ...environ,\n name: environ.environ,\n color: environ.color || \"#000000\",\n };\n });\n\n return h(\n ExpandableDetailsPanel,\n {\n title: \"Environment\",\n value: h(EnvironTypes, { environ_types }),\n },\n h(ExpansionBody, { title: \"Matched environments\" }, [\n h(LithologyList, {\n lithologies,\n onClickItem: (e, environ) => {\n window.open(\"/lex/environments/\" + environ.environ_id, \"_self\");\n },\n }),\n ]),\n );\n}\n\nfunction EconType(props) {\n const { econ_types } = props;\n\n return h.if(econ_types && econ_types.length > 0)(\"div\", [\n econ_types.map((econClass, i) => {\n return h(AttrChip, {\n key: i,\n name: econClass.name,\n color: econClass.color,\n });\n }),\n ]);\n}\n\nfunction Economy(props) {\n const { source } = props;\n const { macrostrat } = source;\n const { econs = null, econ_types = null } = macrostrat;\n if (!econs) return h(\"div\");\n\n return h.if(econs && econs.length > 0)(\n ExpandableDetailsPanel,\n {\n title: \"Economy \",\n value: h(EconType, { econ_types }),\n },\n h(ExpansionBody, { title: \"Matched economic attributes\" }, [\n econs.map((econ, i) => {\n return h(AttrChip, {\n key: i,\n name: econ.econ,\n color: econ.color,\n });\n }),\n ]),\n );\n}\n\nexport { MacrostratLinkedData };\n"],"names":[],"version":3,"file":"map-interface.3f968b46.js.map"}
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;AAKA,SAAS,8BAAQ,KAAK;IACpB,MAAM,CAAC,UAAU,YAAY,GAAG,CAAA,GAAA,qBAAO,EAAE;IACzC,MAAM,QAAE,IAAI,EAAE,GAAG;IAEjB,MAAM,eAAe;QACnB,YAAY,CAAC;IACf;IAEA,2DAA2D;IAC3D,IAAI;IACJ,IAAI;QACF,OAAO,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,GAAG;IAC7D,EAAE,OAAO,GAAG;QACV,OAAO;IACT;IAEA,MAAM,UAAU,MAAM,SAAS,MAAM,SAAS,EAAE;IAEhD,MAAM,aACJ,QAAQ,MAAM,GAAG,IAAI,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,wCAAS,GAAG;QAAE,OAAO;IAAQ,KAAK;IAE3D,MAAM,WAAW,WAAW,eAAe;IAE3C,qBACE,0DAAC;QAAI,WAAU;qBACb,0DAAC;QAAI,WAAU;qBACb,0DAAC;QAAE,WAAU;OACV,YAAW,MAAG,KAAK,MAAM,GAAG,MAAM,OAAO,OAAO,mBAEnD,0DAAC;QAAE,MAAM,KAAK,GAAG;QAAE,QAAO;QAAS,WAAU;qBAC3C,0DAAC,gBAAQ,KAAK,KAAK,EAAC,qBAGtB,0DAAC,4BACC,0DAAC,CAAA,GAAA,6BAAK;QACJ,SAAS;QACT,SAAS;QACT,WAAW;QACX,WAAU;wBAIhB,0DAAC,CAAA,GAAA,+BAAO;QAAE,QAAQ;qBAChB,0DAAC;QAAK,WAAW,WAAW,KAAK;qBAC/B,0DAAC;QAAI,WAAU;OACZ,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS;QAC5B,IAAI,OAAO;QAEX,qBACE,0DAAC;YACC,WAAU;YACV,KAAK;YACL,yBAAyB;gBAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC;YAAC;;IAG5D;AAMZ;IAEA,2CAAe","sources":["packages/map-interface/src/map-panel/components/info-drawer/xdd-panel/Article.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport { Collapse, Button } from \"@blueprintjs/core\";\nimport { AuthorList } from \"@macrostrat/ui-components\";\nimport h from \"@macrostrat/hyper\";\n\nfunction Article(props) {\n const [expanded, setExpanded] = useState(false);\n const { data } = props;\n\n const toggleExpand = () => {\n setExpanded(!expanded);\n };\n\n // Attempt to pull out only the year and not the whole date\n let year;\n try {\n year = data.coverDate ? data.coverDate.match(/\\d{4}/)[0] : \"\";\n } catch (e) {\n year = \"\";\n }\n\n const authors = data?.authors?.split(\"; \") ?? [];\n\n const authorList =\n authors.length > 0 ? h(AuthorList, { names: authors }) : \"Unknown\";\n\n const iconName = expanded ? \"chevron-up\" : \"chevron-down\";\n\n return (\n <div className=\"article\">\n <div className=\"article-title\">\n <p className=\"article-author\">\n {authorList}, {year.length ? \" \" + year + \". \" : \"\"}\n </p>\n <a href={data.URL} target=\"_blank\" className=\"title-link\">\n <strong>{data.title}.</strong>\n </a>\n\n <span>\n <Button\n onClick={toggleExpand}\n minimal={true}\n rightIcon={iconName}\n className=\"flat-btn\"\n ></Button>\n </span>\n </div>\n <Collapse isOpen={expanded}>\n <span className={expanded ? \"\" : \"hidden\"}>\n <div className=\"quotes\">\n {data.highlight.map((snippet, si) => {\n let text = snippet;\n\n return (\n <p\n className=\"gdd-snippet\"\n key={si}\n dangerouslySetInnerHTML={{ __html: `...${snippet}...` }}\n ></p>\n );\n })}\n </div>\n </span>\n </Collapse>\n </div>\n );\n}\n\nexport default Article;\n"],"names":[],"version":3,"file":"map-interface.4264e7e1.js.map"}
@@ -1,113 +0,0 @@
1
- var $3ffaa4c6fbcbe662$exports = require("./map-interface.cc9ad5c6.js");
2
- var $LZ8LT$macrostrathyper = require("@macrostrat/hyper");
3
- var $LZ8LT$macrostratmapinterface = require("@macrostrat/map-interface");
4
-
5
-
6
- function $parcel$interopDefault(a) {
7
- return a && a.__esModule ? a.default : a;
8
- }
9
-
10
- function $parcel$export(e, n, v, s) {
11
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
- }
13
-
14
- $parcel$export(module.exports, "RegionalStratigraphy", () => $b951c9e8f692a209$export$2b7bf9249a3d9866);
15
-
16
-
17
-
18
- function $b951c9e8f692a209$export$2b7bf9249a3d9866(props) {
19
- const { mapInfo: mapInfo, columnInfo: columnInfo } = props;
20
- if (mapInfo?.mapData == null || !columnInfo) return null;
21
- return (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))((0, $LZ8LT$macrostratmapinterface.ExpansionPanel), {
22
- classes: {
23
- root: "regional-panel"
24
- },
25
- title: "Regional stratigraphy",
26
- expanded: true
27
- }, [
28
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper))).if(columnInfo != null)($b951c9e8f692a209$var$ColumnData, {
29
- columnInfo: columnInfo
30
- })
31
- ]);
32
- }
33
- function $b951c9e8f692a209$var$ColumnData({ columnInfo: columnInfo }) {
34
- return (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("div.column-data", [
35
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("a", {
36
- href: "/columns/" + columnInfo.col_id
37
- }, "View column page"),
38
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
39
- label: "Name: ",
40
- content: [
41
- columnInfo.col_name
42
- ]
43
- }),
44
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
45
- label: "Column ID: ",
46
- content: [
47
- columnInfo.col_id
48
- ]
49
- }),
50
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
51
- label: "Group: ",
52
- content: [
53
- columnInfo.col_group
54
- ]
55
- }),
56
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
57
- label: "Group ID: ",
58
- content: [
59
- columnInfo.col_group_id
60
- ]
61
- }),
62
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper))).if(columnInfo.min_min_thick || columnInfo.max_thick)($b951c9e8f692a209$var$MapAttribute, {
63
- label: "Thickness: ",
64
- content: [
65
- (0, $3ffaa4c6fbcbe662$exports.addCommas)(parseInt(columnInfo.min_min_thick)),
66
- " - ",
67
- (0, $3ffaa4c6fbcbe662$exports.addCommas)(parseInt(columnInfo.max_thick)),
68
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.age-ma", [
69
- "m"
70
- ])
71
- ]
72
- }),
73
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
74
- label: "Age: ",
75
- content: [
76
- columnInfo.b_age,
77
- " - ",
78
- columnInfo.t_age,
79
- " ",
80
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.age-ma", [
81
- "Ma"
82
- ])
83
- ]
84
- }),
85
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
86
- label: "Area: ",
87
- content: [
88
- (0, $3ffaa4c6fbcbe662$exports.addCommas)(columnInfo.col_area),
89
- " ",
90
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.age-ma", [
91
- "km2"
92
- ])
93
- ]
94
- }),
95
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))($b951c9e8f692a209$var$MapAttribute, {
96
- label: "Fossil collections: ",
97
- content: [
98
- (0, $3ffaa4c6fbcbe662$exports.addCommas)(columnInfo.pbdb_collections)
99
- ]
100
- })
101
- ]);
102
- }
103
- function $b951c9e8f692a209$var$MapAttribute(props) {
104
- return (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("div.map-source-attr", [
105
- (0, ($parcel$interopDefault($LZ8LT$macrostrathyper)))("span.attr", [
106
- props.label
107
- ]),
108
- ...props.content
109
- ]);
110
- }
111
-
112
-
113
- //# sourceMappingURL=map-interface.5737346f.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAIO,SAAS,0CAAqB,KAAK;IACxC,MAAM,WAAE,OAAO,cAAE,UAAU,EAAE,GAAG;IAChC,IAAI,SAAS,WAAW,QAAQ,CAAC,YAAY,OAAO;IAEpD,OAAO,CAAA,GAAA,gDAAA,EACL,CAAA,GAAA,4CAAa,GACb;QACE,SAAS;YAAE,MAAM;QAAiB;QAClC,OAAO;QACP,UAAU;IACZ,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C;iBAAM;aAAE;QAC3E;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,mCAAQ,EAAE,WAAW,gBAAgB;aAAE;QACnD;KACD;AACH;AAEA,SAAS,mCAAa,KAAK;IACzB,OAAO,CAAA,GAAA,gDAAA,EAAE,uBAAuB;QAC9B,CAAA,GAAA,gDAAA,EAAE,aAAa;YAAC,MAAM,KAAK;SAAC;WACzB,MAAM,OAAO;KACjB;AACH","sources":["packages/map-interface/src/map-panel/components/info-drawer/reg-strat.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport { addCommas } from \"../../utils\";\n\nexport function RegionalStratigraphy(props) {\n const { mapInfo, columnInfo } = props;\n if (mapInfo?.mapData == null || !columnInfo) return null;\n\n return h(\n ExpansionPanel,\n {\n classes: { root: \"regional-panel\" },\n title: \"Regional stratigraphy\",\n expanded: true,\n },\n [h.if(columnInfo != null)(ColumnData, { columnInfo })],\n );\n}\n\nfunction ColumnData({ columnInfo }) {\n return h(\"div.column-data\", [\n h(\"a\", { href: \"/columns/\" + columnInfo.col_id }, \"View column page\"),\n h(MapAttribute, {\n label: \"Name: \",\n content: [columnInfo.col_name],\n }),\n h(MapAttribute, {\n label: \"Column ID: \",\n content: [columnInfo.col_id],\n }),\n h(MapAttribute, {\n label: \"Group: \",\n content: [columnInfo.col_group],\n }),\n h(MapAttribute, {\n label: \"Group ID: \",\n content: [columnInfo.col_group_id],\n }),\n h.if(columnInfo.min_min_thick || columnInfo.max_thick)(MapAttribute, {\n label: \"Thickness: \",\n content: [\n addCommas(parseInt(columnInfo.min_min_thick)),\n \" - \",\n addCommas(parseInt(columnInfo.max_thick)),\n h(\"span.age-ma\", [\"m\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Age: \",\n content: [\n columnInfo.b_age,\n \" - \",\n columnInfo.t_age,\n \" \",\n h(\"span.age-ma\", [\"Ma\"]),\n ],\n }),\n h(MapAttribute, {\n label: \"Area: \",\n content: [addCommas(columnInfo.col_area), \" \", h(\"span.age-ma\", [\"km2\"])],\n }),\n h(MapAttribute, {\n label: \"Fossil collections: \",\n content: [addCommas(columnInfo.pbdb_collections)],\n }),\n ]);\n}\n\nfunction MapAttribute(props) {\n return h(\"div.map-source-attr\", [\n h(\"span.attr\", [props.label]),\n ...props.content,\n ]);\n}\n"],"names":[],"version":3,"file":"map-interface.5737346f.js.map"}