@macrostrat/map-interface 1.5.6 → 1.6.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 (158) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cjs/index.js +5 -5
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/{map-interface.603b61b2.js → map-interface.11056b04.js} +2 -2
  5. package/dist/cjs/{map-interface.603b61b2.js.map → map-interface.11056b04.js.map} +1 -1
  6. package/dist/cjs/{map-interface.f4227aaa.js → map-interface.12e5d744.js} +2 -2
  7. package/dist/cjs/{map-interface.f4227aaa.js.map → map-interface.12e5d744.js.map} +1 -1
  8. package/dist/cjs/map-interface.225c9340.js +71 -0
  9. package/dist/cjs/map-interface.225c9340.js.map +1 -0
  10. package/dist/cjs/map-interface.3ca778c5.js +57 -0
  11. package/dist/cjs/map-interface.3ca778c5.js.map +1 -0
  12. package/dist/cjs/map-interface.4267aa3a.js +68 -0
  13. package/dist/cjs/map-interface.4267aa3a.js.map +1 -0
  14. package/dist/cjs/{map-interface.b15c1893.js → map-interface.46d1c77b.js} +3 -9
  15. package/dist/cjs/map-interface.46d1c77b.js.map +1 -0
  16. package/dist/cjs/{map-interface.dcbd3874.js → map-interface.4a3d9662.js} +4 -4
  17. package/dist/cjs/map-interface.4a3d9662.js.map +1 -0
  18. package/dist/cjs/{map-interface.10d442f4.js → map-interface.67001b26.js} +2 -2
  19. package/dist/cjs/{map-interface.10d442f4.js.map → map-interface.67001b26.js.map} +1 -1
  20. package/dist/cjs/{map-interface.9277efa8.js → map-interface.69b2e2a9.js} +2 -2
  21. package/dist/cjs/{map-interface.9277efa8.js.map → map-interface.69b2e2a9.js.map} +1 -1
  22. package/dist/cjs/{map-interface.3bcda63a.js → map-interface.7170f35e.js} +3 -4
  23. package/dist/cjs/map-interface.7170f35e.js.map +1 -0
  24. package/dist/cjs/{map-interface.e109c93a.js → map-interface.8d67cc21.js} +2 -2
  25. package/dist/cjs/{map-interface.e109c93a.js.map → map-interface.8d67cc21.js.map} +1 -1
  26. package/dist/cjs/{map-interface.3bc4f731.js → map-interface.a3c2552f.js} +2 -2
  27. package/dist/cjs/{map-interface.3bc4f731.js.map → map-interface.a3c2552f.js.map} +1 -1
  28. package/dist/cjs/{map-interface.28d1a6b7.js → map-interface.a960d638.js} +2 -2
  29. package/dist/cjs/{map-interface.28d1a6b7.js.map → map-interface.a960d638.js.map} +1 -1
  30. package/dist/cjs/{map-interface.4e156c8b.js → map-interface.c5061c96.js} +5 -5
  31. package/dist/cjs/{map-interface.4e156c8b.js.map → map-interface.c5061c96.js.map} +1 -1
  32. package/dist/cjs/map-interface.cf6c9a68.js.map +1 -1
  33. package/dist/cjs/{map-interface.1fdaaaf6.js → map-interface.e74ded77.js} +2 -2
  34. package/dist/cjs/{map-interface.1fdaaaf6.js.map → map-interface.e74ded77.js.map} +1 -1
  35. package/dist/cjs/{map-interface.ce2c83fa.js → map-interface.e975d65c.js} +7 -1
  36. package/dist/cjs/map-interface.e975d65c.js.map +1 -0
  37. package/dist/esm/index.d.ts +10 -41
  38. package/dist/esm/index.d.ts.map +1 -1
  39. package/dist/esm/index.js +5 -5
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/{map-interface.0b030247.js → map-interface.1d38872e.js} +2 -2
  42. package/dist/esm/{map-interface.0b030247.js.map → map-interface.1d38872e.js.map} +1 -1
  43. package/dist/esm/map-interface.2350f590.js +48 -0
  44. package/dist/esm/map-interface.2350f590.js.map +1 -0
  45. package/dist/esm/{map-interface.ec2278ab.js → map-interface.2892a5fb.js} +2 -2
  46. package/dist/esm/{map-interface.ec2278ab.js.map → map-interface.2892a5fb.js.map} +1 -1
  47. package/dist/esm/{map-interface.90d9023c.js → map-interface.557de808.js} +2 -2
  48. package/dist/esm/{map-interface.90d9023c.js.map → map-interface.557de808.js.map} +1 -1
  49. package/dist/esm/map-interface.64c62ba1.js +62 -0
  50. package/dist/esm/map-interface.64c62ba1.js.map +1 -0
  51. package/dist/esm/{map-interface.316fd76a.js → map-interface.672c2e0b.js} +2 -8
  52. package/dist/esm/map-interface.672c2e0b.js.map +1 -0
  53. package/dist/esm/{map-interface.54ccd41f.js → map-interface.6e65dcaf.js} +2 -2
  54. package/dist/esm/{map-interface.54ccd41f.js.map → map-interface.6e65dcaf.js.map} +1 -1
  55. package/dist/esm/{map-interface.fb96fb7e.js → map-interface.72b1bfba.js} +2 -2
  56. package/dist/esm/{map-interface.fb96fb7e.js.map → map-interface.72b1bfba.js.map} +1 -1
  57. package/dist/esm/{map-interface.c1d19ef4.js → map-interface.9152234b.js} +6 -6
  58. package/dist/esm/{map-interface.c1d19ef4.js.map → map-interface.9152234b.js.map} +1 -1
  59. package/dist/esm/{map-interface.e7e34e41.js → map-interface.a03a7a23.js} +2 -2
  60. package/dist/esm/{map-interface.e7e34e41.js.map → map-interface.a03a7a23.js.map} +1 -1
  61. package/dist/esm/{map-interface.00ecf2ee.js → map-interface.a8c94450.js} +3 -4
  62. package/dist/esm/map-interface.a8c94450.js.map +1 -0
  63. package/dist/esm/map-interface.c2a61cbf.js +62 -0
  64. package/dist/esm/map-interface.c2a61cbf.js.map +1 -0
  65. package/dist/esm/{map-interface.13e6d768.js → map-interface.c52c2fec.js} +2 -2
  66. package/dist/esm/{map-interface.13e6d768.js.map → map-interface.c52c2fec.js.map} +1 -1
  67. package/dist/esm/{map-interface.e20a9bac.js → map-interface.e418553b.js} +4 -4
  68. package/dist/esm/map-interface.e418553b.js.map +1 -0
  69. package/dist/esm/{map-interface.da91ba86.js → map-interface.e63d862d.js} +5 -5
  70. package/dist/esm/{map-interface.da91ba86.js.map → map-interface.e63d862d.js.map} +1 -1
  71. package/dist/esm/map-interface.f7b8bdb7.js.map +1 -1
  72. package/dist/node/index.js +1 -1
  73. package/dist/node/index.js.map +1 -1
  74. package/dist/node/{map-interface.bde5650a.js → map-interface.0e71fd95.js} +2 -2
  75. package/dist/node/{map-interface.bde5650a.js.map → map-interface.0e71fd95.js.map} +1 -1
  76. package/dist/node/{map-interface.432dd2f9.js → map-interface.254e457a.js} +2 -2
  77. package/dist/node/{map-interface.432dd2f9.js.map → map-interface.254e457a.js.map} +1 -1
  78. package/dist/node/map-interface.33b7734a.js.map +1 -1
  79. package/dist/node/map-interface.41e916d1.js +2 -0
  80. package/dist/node/map-interface.41e916d1.js.map +1 -0
  81. package/dist/node/{map-interface.6184dc0f.js → map-interface.4b4f8fdf.js} +2 -2
  82. package/dist/node/{map-interface.6184dc0f.js.map → map-interface.4b4f8fdf.js.map} +1 -1
  83. package/dist/node/{map-interface.8881e38a.js → map-interface.4df6e2c7.js} +2 -2
  84. package/dist/node/{map-interface.8881e38a.js.map → map-interface.4df6e2c7.js.map} +1 -1
  85. package/dist/node/map-interface.5736d6f8.js +2 -0
  86. package/dist/node/map-interface.5736d6f8.js.map +1 -0
  87. package/dist/node/map-interface.593e09ed.js +2 -0
  88. package/dist/node/map-interface.593e09ed.js.map +1 -0
  89. package/dist/node/{map-interface.ce86a010.js → map-interface.6314eef1.js} +2 -2
  90. package/dist/node/{map-interface.ce86a010.js.map → map-interface.6314eef1.js.map} +1 -1
  91. package/dist/node/{map-interface.8ac14ae0.js → map-interface.78e05655.js} +2 -2
  92. package/dist/node/{map-interface.8ac14ae0.js.map → map-interface.78e05655.js.map} +1 -1
  93. package/dist/node/map-interface.9824c03a.js +2 -0
  94. package/dist/node/map-interface.9824c03a.js.map +1 -0
  95. package/dist/node/{map-interface.2542fda9.js → map-interface.b0e1ad1b.js} +2 -2
  96. package/dist/node/{map-interface.2542fda9.js.map → map-interface.b0e1ad1b.js.map} +1 -1
  97. package/dist/node/{map-interface.aa4d45ff.js → map-interface.b33fab5e.js} +2 -2
  98. package/dist/node/map-interface.b33fab5e.js.map +1 -0
  99. package/dist/node/{map-interface.7e13bea8.js → map-interface.bf86da7c.js} +2 -2
  100. package/dist/node/{map-interface.7e13bea8.js.map → map-interface.bf86da7c.js.map} +1 -1
  101. package/dist/node/{map-interface.82397845.js → map-interface.e7598785.js} +2 -2
  102. package/dist/node/{map-interface.82397845.js.map → map-interface.e7598785.js.map} +1 -1
  103. package/dist/node/map-interface.f13f7aeb.js +2 -0
  104. package/dist/node/map-interface.f13f7aeb.js.map +1 -0
  105. package/package.json +8 -8
  106. package/src/{location-info/hash-string.ts → hash-string.ts} +4 -1
  107. package/src/helpers.ts +0 -2
  108. package/src/index.ts +1 -1
  109. package/src/location-details/utils/index.ts +0 -7
  110. package/src/location-details/xdd-panel/article.ts +67 -0
  111. package/src/location-details/xdd-panel/index.ts +2 -17
  112. package/src/location-details/xdd-panel/{Journal.tsx → journal.ts} +15 -5
  113. package/src/location-panel/header.ts +1 -1
  114. package/dist/cjs/map-interface.2401af7a.js +0 -59
  115. package/dist/cjs/map-interface.2401af7a.js.map +0 -1
  116. package/dist/cjs/map-interface.3bcda63a.js.map +0 -1
  117. package/dist/cjs/map-interface.64823b7c.js +0 -129
  118. package/dist/cjs/map-interface.64823b7c.js.map +0 -1
  119. package/dist/cjs/map-interface.71e61c74.js +0 -73
  120. package/dist/cjs/map-interface.71e61c74.js.map +0 -1
  121. package/dist/cjs/map-interface.860fcb7e.js +0 -67
  122. package/dist/cjs/map-interface.860fcb7e.js.map +0 -1
  123. package/dist/cjs/map-interface.b15c1893.js.map +0 -1
  124. package/dist/cjs/map-interface.ce2c83fa.js.map +0 -1
  125. package/dist/cjs/map-interface.dcbd3874.js.map +0 -1
  126. package/dist/cjs/map-interface.dfaad4a1.js +0 -36
  127. package/dist/cjs/map-interface.dfaad4a1.js.map +0 -1
  128. package/dist/esm/map-interface.00ecf2ee.js.map +0 -1
  129. package/dist/esm/map-interface.316fd76a.js.map +0 -1
  130. package/dist/esm/map-interface.3ef9d0ae.js +0 -99
  131. package/dist/esm/map-interface.3ef9d0ae.js.map +0 -1
  132. package/dist/esm/map-interface.767fdc4a.js +0 -64
  133. package/dist/esm/map-interface.767fdc4a.js.map +0 -1
  134. package/dist/esm/map-interface.9fac5fa6.js +0 -50
  135. package/dist/esm/map-interface.9fac5fa6.js.map +0 -1
  136. package/dist/esm/map-interface.c4fa120d.js +0 -28
  137. package/dist/esm/map-interface.c4fa120d.js.map +0 -1
  138. package/dist/esm/map-interface.e20a9bac.js.map +0 -1
  139. package/dist/esm/map-interface.e50c290f.js +0 -61
  140. package/dist/esm/map-interface.e50c290f.js.map +0 -1
  141. package/dist/node/map-interface.42a4b05a.js +0 -2
  142. package/dist/node/map-interface.42a4b05a.js.map +0 -1
  143. package/dist/node/map-interface.48262cbb.js +0 -2
  144. package/dist/node/map-interface.48262cbb.js.map +0 -1
  145. package/dist/node/map-interface.56b5b2ee.js +0 -2
  146. package/dist/node/map-interface.56b5b2ee.js.map +0 -1
  147. package/dist/node/map-interface.9e6751ac.js +0 -2
  148. package/dist/node/map-interface.9e6751ac.js.map +0 -1
  149. package/dist/node/map-interface.a8be0cba.js +0 -2
  150. package/dist/node/map-interface.a8be0cba.js.map +0 -1
  151. package/dist/node/map-interface.aa4d45ff.js.map +0 -1
  152. package/dist/node/map-interface.d92b296e.js +0 -2
  153. package/dist/node/map-interface.d92b296e.js.map +0 -1
  154. package/dist/node/map-interface.e0032d67.js +0 -2
  155. package/dist/node/map-interface.e0032d67.js.map +0 -1
  156. package/src/location-details/xdd-panel/Article.tsx +0 -69
  157. package/src/location-info/index.ts +0 -100
  158. package/src/location-info/utils.ts +0 -24
package/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. The format
4
4
  is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.6.0] - 2025-11-28
8
+
9
+ - Update XDD panel components to remove Typescript
10
+ - Remove circular dependencies
11
+ - Move `LngLatCoords` and `Elevation` components to
12
+ `@macrostrat/data-components`
13
+
14
+ ## [1.5.7] - 2025-08-19
15
+
16
+ - Remove a duplicate export
17
+
7
18
  ## [1.5.6] - 2025-08-01
8
19
 
9
20
  - Fossils component just show data, not panel
package/dist/cjs/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var $fce5fc950d1fe35b$exports = require("./map-interface.0e252a74.js");
2
- var $2bc7c1e4e7da7fdf$exports = require("./map-interface.10d442f4.js");
3
- var $9acbb47bf7cb7660$exports = require("./map-interface.3bc4f731.js");
2
+ var $2bc7c1e4e7da7fdf$exports = require("./map-interface.67001b26.js");
3
+ var $9acbb47bf7cb7660$exports = require("./map-interface.a3c2552f.js");
4
4
  var $c3311f59335df34d$exports = require("./map-interface.bda26b27.js");
5
5
  var $493deb9ab6b848e3$exports = require("./map-interface.7bdbe4b6.js");
6
6
  var $f333fe6f49373ca9$exports = require("./map-interface.99a048dc.js");
7
7
  var $2611a7b4364593e5$exports = require("./map-interface.cf6c9a68.js");
8
8
  var $3490fc4f4bda12f7$exports = require("./map-interface.ffb109ef.js");
9
- var $860d9939f7032c69$exports = require("./map-interface.64823b7c.js");
10
9
  var $750d69d73bfbdc9a$exports = require("./map-interface.354aaa39.js");
11
- var $4b8aa57c998025ac$exports = require("./map-interface.4e156c8b.js");
10
+ var $4b8aa57c998025ac$exports = require("./map-interface.c5061c96.js");
11
+ var $b96d5ba3a9868b40$exports = require("./map-interface.4267aa3a.js");
12
12
 
13
13
 
14
14
  function $parcel$exportWildcard(dest, source) {
@@ -46,9 +46,9 @@ $parcel$exportWildcard(module.exports, $493deb9ab6b848e3$exports);
46
46
  $parcel$exportWildcard(module.exports, $f333fe6f49373ca9$exports);
47
47
  $parcel$exportWildcard(module.exports, $2611a7b4364593e5$exports);
48
48
  $parcel$exportWildcard(module.exports, $3490fc4f4bda12f7$exports);
49
- $parcel$exportWildcard(module.exports, $860d9939f7032c69$exports);
50
49
  $parcel$exportWildcard(module.exports, $750d69d73bfbdc9a$exports);
51
50
  $parcel$exportWildcard(module.exports, $4b8aa57c998025ac$exports);
51
+ $parcel$exportWildcard(module.exports, $b96d5ba3a9868b40$exports);
52
52
 
53
53
 
54
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"mappings":"","sources":["packages/map-interface/src/index.ts"],"sourcesContent":["export * from \"./context-panel\";\nexport * from \"./location-panel\";\nexport * from \"./dev\";\nexport * from \"./container\";\nexport * from \"./map-view\";\nexport * from \"./controls\";\nexport * from \"./helpers\";\nexport * from \"./utils\";\nexport * from \"./location-info\";\nexport * from \"./expansion-panel\";\nexport * from \"./location-details\";\n"],"names":[],"version":3,"file":"index.js.map"}
1
+ {"mappings":"","sources":["packages/map-interface/src/index.ts"],"sourcesContent":["export * from \"./context-panel\";\nexport * from \"./location-panel\";\nexport * from \"./dev\";\nexport * from \"./container\";\nexport * from \"./map-view\";\nexport * from \"./controls\";\nexport * from \"./helpers\";\nexport * from \"./utils\";\nexport * from \"./expansion-panel\";\nexport * from \"./location-details\";\nexport * from \"./hash-string\";\n"],"names":[],"version":3,"file":"index.js.map"}
@@ -1,6 +1,6 @@
1
1
  require("./map-interface.441d3b83.css");
2
2
  var $85c1fa9dc06e73fb$exports = require("./map-interface.5a4f4529.js");
3
- var $4f556f7b511fe929$exports = require("./map-interface.e109c93a.js");
3
+ var $4f556f7b511fe929$exports = require("./map-interface.8d67cc21.js");
4
4
  var $dPEaX$macrostrathyper = require("@macrostrat/hyper");
5
5
  var $dPEaX$macrostratmapinterface = require("@macrostrat/map-interface");
6
6
  var $dPEaX$visxscale = require("@visx/scale");
@@ -387,4 +387,4 @@ function $e3f20811e81c400e$var$Economy(props) {
387
387
  }
388
388
 
389
389
 
390
- //# sourceMappingURL=map-interface.603b61b2.js.map
390
+ //# sourceMappingURL=map-interface.11056b04.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAM,0BAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAErB,SAAS,0CAAqB,KAAK;IACxC,MAAM,WACJ,OAAO,UACP,MAAM,gBACN,YAAY,kBACZ,cAAc,e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AAQ,KAAK;IACpB,MAAM,UAAE,MAAM,EAAE,GAAG;IACnB,MAAM,cAAE,UAAU,EAAE,GAAG;IACvB,MAAM,SAAE,QAAQ,kBAAM,aAAa,MAAM,GAAG;IAC5C,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,OAAO,IAAI,CAAC,MAAM;YAChB,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/location-details/macrostrat-linked.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\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\";\nimport { AttrChip, AgeChip } from \"./info-blocks\";\n\nconst h = hyper.styled(styles);\n\nexport function MacrostratLinkedData(props) {\n const {\n mapInfo,\n source,\n stratNameURL,\n environmentURL,\n intervalURL,\n lithologyURL,\n expanded = true,\n } = props;\n\n if (!mapInfo.mapData[0]) return null;\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Macrostrat-linked data\",\n helpText: \"via Macrostrat\",\n expanded,\n },\n [\n h(\"div\", { classes: expansionPanelDetailClasses }, [\n h(MatchBasis, { source, stratNameURL }),\n h(AgeInformation, { mapInfo, source, intervalURL }),\n h(Thickness, { source }),\n h(MinorFossilCollections, { source }),\n h(FossilOccs, { source }),\n h(LithsAndClasses, { source, lithologyURL }),\n h(Environments, { source, environmentURL }),\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, intervalURL } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.b_age) return h(MapAgeRenderer, { mapInfo, intervalURL });\n\n return h(MacrostratAgeInfo, { macrostrat, mapInfo, intervalURL });\n}\n\nfunction MapAgeRenderer(props) {\n const { mapInfo, intervalURL, ...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 intervalURL,\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, intervalURL }) {\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, intervalURL }) {\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 intervalURL,\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, stratNameURL } = 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: stratNameURL + \"/\" + 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, lithologyURL } = 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(lithologyURL + \"/\" + 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, environmentURL } = 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 console.log(\"environ\", environmentURL);\n window.open(environmentURL + \"/\" + 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"],"names":[],"version":3,"file":"map-interface.603b61b2.js.map"}
1
+ {"mappings":";;;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M,GAAG,GAAG,OAAO;QACtD,YAAY,IAAI,CAAC,WAAW;YAC1B,OAAO,wBAAE,CAAA,GAAA,kCAAO,GAAG;gBACjB,KAAK;gBACL,MAAM,UAAU,IAAI;gBACpB,OAAO,UAAU,KAAK;YACxB;QACF;KACD;AACH;AAEA,SAAS,8BAAQ,KAAK;IACpB,MAAM,UAAE,MAAM,EAAE,GAAG;IACnB,MAAM,cAAE,UAAU,EAAE,GAAG;IACvB,MAAM,SAAE,QAAQ,kBAAM,aAAa,MAAM,GAAG;IAC5C,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,OAAO,IAAI,CAAC,MAAM;YAChB,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/location-details/macrostrat-linked.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\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\";\nimport { AttrChip, AgeChip } from \"./info-blocks\";\n\nconst h = hyper.styled(styles);\n\nexport function MacrostratLinkedData(props) {\n const {\n mapInfo,\n source,\n stratNameURL,\n environmentURL,\n intervalURL,\n lithologyURL,\n expanded = true,\n } = props;\n\n if (!mapInfo.mapData[0]) return null;\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Macrostrat-linked data\",\n helpText: \"via Macrostrat\",\n expanded,\n },\n [\n h(\"div\", { classes: expansionPanelDetailClasses }, [\n h(MatchBasis, { source, stratNameURL }),\n h(AgeInformation, { mapInfo, source, intervalURL }),\n h(Thickness, { source }),\n h(MinorFossilCollections, { source }),\n h(FossilOccs, { source }),\n h(LithsAndClasses, { source, lithologyURL }),\n h(Environments, { source, environmentURL }),\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, intervalURL } = props;\n const { macrostrat } = source;\n\n if (!macrostrat?.b_age) return h(MapAgeRenderer, { mapInfo, intervalURL });\n\n return h(MacrostratAgeInfo, { macrostrat, mapInfo, intervalURL });\n}\n\nfunction MapAgeRenderer(props) {\n const { mapInfo, intervalURL, ...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 intervalURL,\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, intervalURL }) {\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, intervalURL }) {\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 intervalURL,\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, stratNameURL } = 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: stratNameURL + \"/\" + 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, lithologyURL } = 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(lithologyURL + \"/\" + 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, environmentURL } = 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 console.log(\"environ\", environmentURL);\n window.open(environmentURL + \"/\" + 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"],"names":[],"version":3,"file":"map-interface.11056b04.js.map"}
@@ -1,4 +1,4 @@
1
- var $73aabf7647b274a0$exports = require("./map-interface.b15c1893.js");
1
+ var $73aabf7647b274a0$exports = require("./map-interface.46d1c77b.js");
2
2
  var $7ZpXG$macrostrathyper = require("@macrostrat/hyper");
3
3
  var $7ZpXG$macrostratmapinterface = require("@macrostrat/map-interface");
4
4
 
@@ -120,4 +120,4 @@ function $22d777cd2a9d570f$var$MapAttribute(props) {
120
120
  }
121
121
 
122
122
 
123
- //# sourceMappingURL=map-interface.f4227aaa.js.map
123
+ //# sourceMappingURL=map-interface.12e5d744.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAIO,SAAS,0CAAqB,WACnC,OAAO,cACP,UAAU,aACV,SAAS,YACT,WAAW,MACZ;IACC,IAAI,CAAC,WAAW,CAAC,QAAQ,OAAO,EAC9B,OAAO;IAGT,OAAO,gDAA0B;iBAC/B;oBACA;mBACA;kBACA;IACF;AACF;AAEA,SAAS,gDAA0B,KAAK;IACtC,MAAM,WAAE,OAAO,cAAE,UAAU,aAAE,SAAS,YAAE,QAAQ,EAAE,GAAG;IAErD,IAAI,SAAS,WAAW,QAAQ,CAAC,YAAY,OAAO;IAEpD,OAAO,CAAA,GAAA,gDAAA,EACL,CAAA,GAAA,4CAAa,GACb;QACE,SAAS;YAAE,MAAM;QAAiB;QAClC,OAAO;kBACP;IACF,GACA;QAAC,CAAA,GAAA,gDAAA,EAAE,EAAE,CAAC,cAAc,MAAM,kCAAY;wBAAE;uBAAY;QAAU;KAAG;AAErE;AAEA,SAAS,iCAAW,cAAE,UAAU,aAAE,SAAS,EAAE;IAC3C,OAAO,CAAA,GAAA,gDAAA,EAAE,mBAAmB;QAC1B,CAAA,G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AO,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/location-details/reg-strat.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport { addCommas } from \"./utils\";\n\nexport function RegionalStratigraphy({\n mapInfo,\n columnInfo,\n columnURL,\n expanded = true,\n}) {\n if (!mapInfo || !mapInfo.mapData) {\n return null;\n }\n\n return RegionalStratigraphyInner({\n mapInfo,\n columnInfo,\n columnURL,\n expanded,\n });\n}\n\nfunction RegionalStratigraphyInner(props) {\n const { mapInfo, columnInfo, columnURL, expanded } = props;\n\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,\n },\n [h.if(columnInfo != null)(ColumnData, { columnInfo, columnURL })],\n );\n}\n\nfunction ColumnData({ columnInfo, columnURL }) {\n return h(\"div.column-data\", [\n h(\"a\", { href: columnURL + \"/\" + 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.f4227aaa.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAIO,SAAS,0CAAqB,WACnC,OAAO,cACP,UAAU,aACV,SAAS,YACT,WAAW,MACZ;IACC,IAAI,CAAC,WAAW,CAAC,QAAQ,OAAO,EAC9B,OAAO;IAGT,OAAO,gDAA0B;iBAC/B;oBACA;mBACA;kBACA;IACF;AACF;AAEA,SAAS,gDAA0B,KAAK;IACtC,MAAM,WAAE,OAAO,cAAE,UAAU,aAAE,SAAS,YAAE,QAAQ,EAAE,GAAG;IAErD,IAAI,SAAS,WAAW,QAAQ,CAAC,YAAY,OAAO;IAEpD,OAAO,CAAA,GAAA,gDAAA,EACL,CAAA,GAAA,4CAAa,GACb;QACE,SAAS;YAAE,MAAM;QAAiB;QAClC,OAAO;kBACP;IACF,GACA;QAAC,CAAA,GAAA,gDAAA,EAAE,EAAE,CAAC,cAAc,MAAM,kCAAY;wBAAE;uBAAY;QAAU;KAAG;AAErE;AAEA,SAAS,iCAAW,cAAE,UAAU,aAAE,SAAS,EAAE;IAC3C,OAAO,CAAA,GAAA,gDAAA,EAAE,mBAAmB;QAC1B,CAAA,GAAA,gDAAA,EAAE,KAAK;YAAE,MAAM,YAAY,MAAM,WAAW,MAAM;QAAC,GAAG;QACtD,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,QAAQ;aAAC;QAChC;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,MAAM;aAAC;QAC9B;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,SAAS;aAAC;QACjC;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,WAAW,YAAY;aAAC;QACpC;QACA,CAAA,GAAA,gDAAA,EAAE,EAAE,CAAC,WAAW,aAAa,IAAI,WAAW,SAAS,EAAE,oCAAc;YACnE,OAAO;YACP,SAAS;gBACP,CAAA,GAAA,mCAAQ,EAAE,SAAS,WAAW,aAAa;gBAC3C;gBACA,CAAA,GAAA,mCAAQ,EAAE,SAAS,WAAW,SAAS;gBACvC,CAAA,GAAA,gDAAA,EAAE,eAAe;oBAAC;iBAAI;aACvB;QACH;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBACP,WAAW,KAAK;gBAChB;gBACA,WAAW,KAAK;gBAChB;gBACA,CAAA,GAAA,gDAAA,EAAE,eAAe;oBAAC;iBAAK;aACxB;QACH;QACA,CAAA,GAAA,gDAAA,EAAE,oCAAc;YACd,OAAO;YACP,SAAS;gBAAC,CAAA,GAAA,mCAAQ,EAAE,WAAW,QAAQ;gBAAG;gBAAK,CAAA,GAAA,gDAAA,EAAE,eAAe;oBAAC;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/location-details/reg-strat.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\nimport { addCommas } from \"./utils\";\n\nexport function RegionalStratigraphy({\n mapInfo,\n columnInfo,\n columnURL,\n expanded = true,\n}) {\n if (!mapInfo || !mapInfo.mapData) {\n return null;\n }\n\n return RegionalStratigraphyInner({\n mapInfo,\n columnInfo,\n columnURL,\n expanded,\n });\n}\n\nfunction RegionalStratigraphyInner(props) {\n const { mapInfo, columnInfo, columnURL, expanded } = props;\n\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,\n },\n [h.if(columnInfo != null)(ColumnData, { columnInfo, columnURL })],\n );\n}\n\nfunction ColumnData({ columnInfo, columnURL }) {\n return h(\"div.column-data\", [\n h(\"a\", { href: columnURL + \"/\" + 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.12e5d744.js.map"}
@@ -0,0 +1,71 @@
1
+ var $8I3pR$react = require("react");
2
+ var $8I3pR$blueprintjscore = require("@blueprintjs/core");
3
+ var $8I3pR$macrostratuicomponents = require("@macrostrat/ui-components");
4
+ var $8I3pR$macrostrathyper = require("@macrostrat/hyper");
5
+
6
+
7
+ function $parcel$interopDefault(a) {
8
+ return a && a.__esModule ? a.default : a;
9
+ }
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+
15
+ $parcel$export(module.exports, "Article", () => $db1853dba5bbb3cb$export$89693000420c0acd);
16
+
17
+
18
+
19
+
20
+ function $db1853dba5bbb3cb$export$89693000420c0acd(props) {
21
+ const [expanded, setExpanded] = (0, $8I3pR$react.useState)(false);
22
+ const { data: data } = props;
23
+ const toggleExpand = ()=>{
24
+ setExpanded(!expanded);
25
+ };
26
+ // Attempt to pull out only the year and not the whole date
27
+ let year;
28
+ try {
29
+ year = data.coverDate ? data.coverDate.match(/\d{4}/)[0] : "";
30
+ } catch (e) {
31
+ year = "";
32
+ }
33
+ const authors = data?.authors?.split("; ") ?? [];
34
+ const authorList = authors.length > 0 ? (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))((0, $8I3pR$macrostratuicomponents.AuthorList), {
35
+ names: authors
36
+ }) : "Unknown";
37
+ const iconName = expanded ? "chevron-up" : "chevron-down";
38
+ return (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("div.article", [
39
+ (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("div.article-title", [
40
+ (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("p.article-author", [
41
+ authorList,
42
+ year.length ? ` ${year}. ` : ""
43
+ ]),
44
+ (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("a.title-link", {
45
+ href: data.URL,
46
+ target: "_blank"
47
+ }, (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("strong", [
48
+ data.title + "."
49
+ ])),
50
+ (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("span", {}, (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))((0, $8I3pR$blueprintjscore.Button), {
51
+ onClick: toggleExpand,
52
+ minimal: true,
53
+ rightIcon: iconName,
54
+ className: "flat-btn"
55
+ }))
56
+ ]),
57
+ (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))((0, $8I3pR$blueprintjscore.Collapse), {
58
+ isOpen: expanded
59
+ }, (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("span", {
60
+ className: expanded ? "" : "hidden"
61
+ }, (0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("div.quotes", {}, data.highlight.map((snippet, si)=>(0, ($parcel$interopDefault($8I3pR$macrostrathyper)))("p.gdd-snippet", {
62
+ key: si,
63
+ dangerouslySetInnerHTML: {
64
+ __html: `...${snippet}...`
65
+ }
66
+ })))))
67
+ ]);
68
+ }
69
+
70
+
71
+ //# sourceMappingURL=map-interface.225c9340.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAKO,SAAS,0CAAQ,KAAK;IAC3B,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,OAAO,CAAA,GAAA,gDAAA,EAAE,eAAe;QACtB,CAAA,GAAA,gDAAA,EAAE,qBAAqB;YACrB,CAAA,GAAA,gDAAA,EAAE,oBAAoB;gBAAC;gBAAY,KAAK,MAAM,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG;aAAG;YACnE,CAAA,GAAA,gDAAA,EACE,gBACA;gBAAE,MAAM,KAAK,GAAG;gBAAE,QAAQ;YAAS,GACnC,CAAA,GAAA,gDAAA,EAAE,UAAU;gBAAC,KAAK,KAAK,GAAG;aAAI;YAEhC,CAAA,GAAA,gDAAA,EACE,QACA,CAAC,GACD,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,6BAAK,GAAG;gBACR,SAAS;gBACT,SAAS;gBACT,WAAW;gBACX,WAAW;YACb;SAEH;QACD,CAAA,GAAA,gDAAA,EACE,CAAA,GAAA,+BAAO,GACP;YAAE,QAAQ;QAAS,GACnB,CAAA,GAAA,gDAAA,EACE,QACA;YAAE,WAAW,WAAW,KAAK;QAAS,GACtC,CAAA,GAAA,gDAAA,EACE,cACA,CAAC,GACD,KAAK,SAAS,CAAC,GAAG,CAAC,CAAC,SAAS,KAC3B,CAAA,GAAA,gDAAA,EAAE,iBAAiB;gBACjB,KAAK;gBACL,yBAAyB;oBAAE,QAAQ,CAAC,GAAG,EAAE,QAAQ,GAAG,CAAC;gBAAC;YACxD;KAKT;AACH","sources":["packages/map-interface/src/location-details/xdd-panel/article.ts"],"sourcesContent":["import React, { useState } from \"react\";\nimport { Collapse, Button } from \"@blueprintjs/core\";\nimport { AuthorList } from \"@macrostrat/ui-components\";\nimport h from \"@macrostrat/hyper\";\n\nexport function 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 h(\"div.article\", [\n h(\"div.article-title\", [\n h(\"p.article-author\", [authorList, year.length ? ` ${year}. ` : \"\"]),\n h(\n \"a.title-link\",\n { href: data.URL, target: \"_blank\" },\n h(\"strong\", [data.title + \".\"]),\n ),\n h(\n \"span\",\n {},\n h(Button, {\n onClick: toggleExpand,\n minimal: true,\n rightIcon: iconName,\n className: \"flat-btn\",\n }),\n ),\n ]),\n h(\n Collapse,\n { isOpen: expanded },\n h(\n \"span\",\n { className: expanded ? \"\" : \"hidden\" },\n h(\n \"div.quotes\",\n {},\n data.highlight.map((snippet, si) =>\n h(\"p.gdd-snippet\", {\n key: si,\n dangerouslySetInnerHTML: { __html: `...${snippet}...` },\n }),\n ),\n ),\n ),\n ),\n ]);\n}\n"],"names":[],"version":3,"file":"map-interface.225c9340.js.map"}
@@ -0,0 +1,57 @@
1
+ var $db1853dba5bbb3cb$exports = require("./map-interface.225c9340.js");
2
+ var $1A6pA$blueprintjscore = require("@blueprintjs/core");
3
+ var $1A6pA$macrostrathyper = require("@macrostrat/hyper");
4
+ var $1A6pA$macrostratmapinterface = require("@macrostrat/map-interface");
5
+
6
+
7
+ function $parcel$interopDefault(a) {
8
+ return a && a.__esModule ? a.default : a;
9
+ }
10
+
11
+ function $parcel$export(e, n, v, s) {
12
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
13
+ }
14
+
15
+ $parcel$export(module.exports, "JournalLegacy", () => $1bbba8ce35f6df80$export$3adf728445826508);
16
+
17
+
18
+
19
+
20
+ function $1bbba8ce35f6df80$var$Journal(props) {
21
+ return (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))("div.journal", [
22
+ (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))("div.journal-title", [
23
+ (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))("h2.journal-title-text", [
24
+ props.data.name,
25
+ (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))("small.journal-source", [
26
+ props.data
27
+ ])
28
+ ])
29
+ ]),
30
+ (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))((0, $1A6pA$blueprintjscore.Divider)),
31
+ props.data.articles.map((article, i)=>{
32
+ return (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))((0, $db1853dba5bbb3cb$exports.Article), {
33
+ key: i,
34
+ data: article
35
+ });
36
+ })
37
+ ]);
38
+ }
39
+ function $1bbba8ce35f6df80$export$3adf728445826508(props) {
40
+ const { articles: articles, name: name, publisher: publisher, nestedExpanded: nestedExpanded } = props;
41
+ const helpText = articles[0].pubname;
42
+ return (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))((0, $1A6pA$macrostratmapinterface.SubExpansionPanel), {
43
+ title: name,
44
+ helpText: publisher,
45
+ expanded: nestedExpanded
46
+ }, [
47
+ articles.map((article, i)=>{
48
+ return (0, ($parcel$interopDefault($1A6pA$macrostrathyper)))((0, $db1853dba5bbb3cb$exports.Article), {
49
+ key: i,
50
+ data: article
51
+ });
52
+ })
53
+ ]);
54
+ }
55
+
56
+
57
+ //# sourceMappingURL=map-interface.3ca778c5.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,SAAS,8BAAQ,KAAK;IACpB,OAAO,CAAA,GAAA,gDAAA,EAAE,eAAe;QACtB,CAAA,GAAA,gDAAA,EAAE,qBAAqB;YACrB,CAAA,GAAA,gDAAA,EAAE,yBAAyB;gBACzB,MAAM,IAAI,CAAC,IAAI;gBACf,CAAA,GAAA,gDAAA,EAAE,wBAAwB;oBAAC,MAAM,IAAI;iBAAC;aACvC;SACF;QACD,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,8BAAM;QACR,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS;YAChC,OAAO,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,iCAAM,GAAG;gBAAE,KAAK;gBAAG,MAAM;YAAQ;QAC5C;KACD;AACH;AAUO,SAAS,0CAAc,KAAmB;IAC/C,MAAM,YAAE,QAAQ,QAAE,IAAI,aAAE,SAAS,kBAAE,cAAc,EAAE,GAAG;IAEtD,MAAM,WAAW,QAAQ,CAAC,EAAE,CAAC,OAAO;IAEpC,OAAO,CAAA,GAAA,gDAAA,EACL,CAAA,GAAA,+CAAgB,GAChB;QACE,OAAO;QACP,UAAU;QACV,UAAU;IACZ,GACA;QACE,SAAS,GAAG,CAAC,CAAC,SAAS;YACrB,OAAO,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,iCAAM,GAAG;gBAAE,KAAK;gBAAG,MAAM;YAAQ;QAC5C;KACD;AAEL","sources":["packages/map-interface/src/location-details/xdd-panel/journal.ts"],"sourcesContent":["import { Article } from \"./article\";\nimport { Divider } from \"@blueprintjs/core\";\nimport h from \"@macrostrat/hyper\";\nimport { SubExpansionPanel } from \"@macrostrat/map-interface\";\n\nexport interface XDDSnippet {\n pubname: string;\n publisher: string;\n _gddid: string;\n title: string;\n doi: string;\n coverDate: string;\n URL: string;\n authors: string;\n hits: number;\n highlight: string[];\n}\n\nfunction Journal(props) {\n return h(\"div.journal\", [\n h(\"div.journal-title\", [\n h(\"h2.journal-title-text\", [\n props.data.name,\n h(\"small.journal-source\", [props.data]),\n ]),\n ]),\n h(Divider),\n props.data.articles.map((article, i) => {\n return h(Article, { key: i, data: article });\n }),\n ]);\n}\n\ntype JournalProps = {\n articles: XDDSnippet[];\n name: string;\n publisher: string;\n nestedExpanded?: boolean;\n};\n\n// Still up for review\nexport function JournalLegacy(props: JournalProps) {\n const { articles, name, publisher, nestedExpanded } = props;\n\n const helpText = articles[0].pubname;\n\n return h(\n SubExpansionPanel,\n {\n title: name,\n helpText: publisher,\n expanded: nestedExpanded,\n },\n [\n articles.map((article, i) => {\n return h(Article, { key: i, data: article });\n }),\n ],\n );\n}\n"],"names":[],"version":3,"file":"map-interface.3ca778c5.js.map"}
@@ -0,0 +1,68 @@
1
+ var $bj4Ts$macrostratmapboxutils = require("@macrostrat/mapbox-utils");
2
+
3
+
4
+ function $parcel$export(e, n, v, s) {
5
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
+ }
7
+
8
+ $parcel$export(module.exports, "applyMapPositionToHash", () => $b96d5ba3a9868b40$export$8391d1abb505ffb3);
9
+ $parcel$export(module.exports, "getMapPositionForHash", () => $b96d5ba3a9868b40$export$80abf1cbcc3918e4);
10
+
11
+ const $b96d5ba3a9868b40$var$fmt1 = (x)=>x.toFixed(1);
12
+ const $b96d5ba3a9868b40$var$fmt2 = (x)=>x.toFixed(2);
13
+ const $b96d5ba3a9868b40$var$fmtInt = (x)=>Math.round(x).toString();
14
+ function $b96d5ba3a9868b40$export$8391d1abb505ffb3(args, mapPosition) {
15
+ const pos = mapPosition?.camera;
16
+ if (pos == null) return;
17
+ const zoom = mapPosition.target?.zoom;
18
+ args.x = (0, $bj4Ts$macrostratmapboxutils.formatCoordForZoomLevel)(pos.lng, zoom);
19
+ args.y = (0, $bj4Ts$macrostratmapboxutils.formatCoordForZoomLevel)(pos.lat, zoom);
20
+ if (pos.bearing == 0 && pos.pitch == 0 && zoom != null) args.z = $b96d5ba3a9868b40$var$fmt1(zoom);
21
+ else if (pos.altitude != null) {
22
+ if (pos.altitude > 5000) args.z = $b96d5ba3a9868b40$var$fmt2(pos.altitude / 1000) + "km";
23
+ else args.z = $b96d5ba3a9868b40$var$fmtInt(pos.altitude) + "m";
24
+ }
25
+ if (pos.bearing != 0) {
26
+ let az = pos.bearing;
27
+ if (az < 0) az += 360;
28
+ args.a = $b96d5ba3a9868b40$var$fmtInt(az);
29
+ }
30
+ if (pos.pitch != 0) args.e = $b96d5ba3a9868b40$var$fmtInt(pos.pitch);
31
+ }
32
+ function $b96d5ba3a9868b40$var$_fmt(x) {
33
+ if (Array.isArray(x)) x = x[0];
34
+ return parseFloat(x.toString());
35
+ }
36
+ function $b96d5ba3a9868b40$export$80abf1cbcc3918e4(hashData, centerPosition) {
37
+ const { x: x = centerPosition?.lng ?? 0, y: y = centerPosition?.lat ?? 0, z: // Different default for zoom depending on whether we have a marker
38
+ z = centerPosition != null ? 7 : 2, a: a = 0, e: e = 0 } = hashData;
39
+ const lng = $b96d5ba3a9868b40$var$_fmt(x);
40
+ const lat = $b96d5ba3a9868b40$var$_fmt(y);
41
+ let altitude = null;
42
+ let zoom = null;
43
+ const _z = z.toString();
44
+ if (_z.endsWith("km")) altitude = $b96d5ba3a9868b40$var$_fmt(_z.substring(0, _z.length - 2)) * 1000;
45
+ else if (_z.endsWith("m")) altitude = $b96d5ba3a9868b40$var$_fmt(_z.substring(0, _z.length - 1));
46
+ else zoom = $b96d5ba3a9868b40$var$_fmt(z);
47
+ const bearing = $b96d5ba3a9868b40$var$_fmt(a);
48
+ const pitch = $b96d5ba3a9868b40$var$_fmt(e);
49
+ let target = undefined;
50
+ if (bearing == 0 && pitch == 0 && zoom != null) target = {
51
+ lat: lat,
52
+ lng: lng,
53
+ zoom: zoom
54
+ };
55
+ return {
56
+ camera: {
57
+ lng: $b96d5ba3a9868b40$var$_fmt(x),
58
+ lat: $b96d5ba3a9868b40$var$_fmt(y),
59
+ altitude: altitude,
60
+ bearing: $b96d5ba3a9868b40$var$_fmt(a),
61
+ pitch: $b96d5ba3a9868b40$var$_fmt(e)
62
+ },
63
+ target: target
64
+ };
65
+ }
66
+
67
+
68
+ //# sourceMappingURL=map-interface.4267aa3a.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;AAeA,MAAM,6BAAO,CAAC,IAAc,EAAE,OAAO,CAAC;AACtC,MAAM,6BAAO,CAAC,IAAc,EAAE,OAAO,CAAC;AACtC,MAAM,+BAAS,CAAC,IAAc,KAAK,KAAK,CAAC,GAAG,QAAQ;AAE7C,SAAS,0CACd,IAAwB,EACxB,WAA+B;IAE/B,MAAM,M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IAAI,GAAG,QAAQ,CAAC,MACrB,WAAW,2BAAK,GAAG,SAAS,CAAC,GAAG,GAAG,MAAM,GAAG;SAE5C,OAAO,2BAAK;IAEd,MAAM,UAAU,2BAAK;IACrB,MAAM,QAAQ,2BAAK;IAEnB,IAAI,SAAS;IACb,IAAI,WAAW,KAAK,SAAS,KAAK,QAAQ,MACxC,SAAS;aACP;aACA;cACA;IACF;IAGF,OAAO;QACL,QAAQ;YACN,KAAK,2BAAK;YACV,KAAK,2BAAK;sBACV;YACA,SAAS,2BAAK;YACd,OAAO,2BAAK;QACd;gBACA;IACF;AACF","sources":["packages/map-interface/src/hash-string.ts"],"sourcesContent":["import {\n LatLng,\n MapPosition,\n formatCoordForZoomLevel,\n} from \"@macrostrat/mapbox-utils\";\nimport { ParsedQuery } from \"query-string\";\n\ninterface LocationHashParams {\n x?: string;\n y?: string;\n z?: string;\n a?: string;\n e?: string;\n}\n\nconst fmt1 = (x: number) => x.toFixed(1);\nconst fmt2 = (x: number) => x.toFixed(2);\nconst fmtInt = (x: number) => Math.round(x).toString();\n\nexport function applyMapPositionToHash(\n args: LocationHashParams,\n mapPosition: MapPosition | null,\n) {\n const pos = mapPosition?.camera;\n if (pos == null) return;\n const zoom = mapPosition.target?.zoom;\n\n args.x = formatCoordForZoomLevel(pos.lng, zoom);\n args.y = formatCoordForZoomLevel(pos.lat, zoom);\n\n if (pos.bearing == 0 && pos.pitch == 0 && zoom != null) {\n args.z = fmt1(zoom);\n } else if (pos.altitude != null) {\n if (pos.altitude > 5000) {\n args.z = fmt2(pos.altitude / 1000) + \"km\";\n } else {\n args.z = fmtInt(pos.altitude) + \"m\";\n }\n }\n if (pos.bearing != 0) {\n let az = pos.bearing;\n if (az < 0) az += 360;\n args.a = fmtInt(az);\n }\n if (pos.pitch != 0) {\n args.e = fmtInt(pos.pitch);\n }\n}\n\nfunction _fmt(x: string | number | string[]) {\n if (Array.isArray(x)) {\n x = x[0];\n }\n return parseFloat(x.toString());\n}\n\nexport function getMapPositionForHash(\n hashData: ParsedQuery<string>,\n centerPosition: LatLng | null,\n): MapPosition {\n const {\n x = centerPosition?.lng ?? 0,\n y = centerPosition?.lat ?? 0,\n // Different default for zoom depending on whether we have a marker\n z = centerPosition != null ? 7 : 2,\n a = 0,\n e = 0,\n } = hashData;\n\n const lng = _fmt(x);\n const lat = _fmt(y);\n\n let altitude = null;\n let zoom = null;\n const _z = z.toString();\n if (_z.endsWith(\"km\")) {\n altitude = _fmt(_z.substring(0, _z.length - 2)) * 1000;\n } else if (_z.endsWith(\"m\")) {\n altitude = _fmt(_z.substring(0, _z.length - 1));\n } else {\n zoom = _fmt(z);\n }\n const bearing = _fmt(a);\n const pitch = _fmt(e);\n\n let target = undefined;\n if (bearing == 0 && pitch == 0 && zoom != null) {\n target = {\n lat,\n lng,\n zoom,\n };\n }\n\n return {\n camera: {\n lng: _fmt(x),\n lat: _fmt(y),\n altitude,\n bearing: _fmt(a),\n pitch: _fmt(e),\n },\n target,\n };\n}\n"],"names":[],"version":3,"file":"map-interface.4267aa3a.js.map"}
@@ -1,22 +1,16 @@
1
1
  var $6dbbe77eb28df143$exports = require("./map-interface.23d5c62c.js");
2
- var $63b10b76eb2d903b$exports = require("./map-interface.ce2c83fa.js");
2
+ var $63b10b76eb2d903b$exports = require("./map-interface.e975d65c.js");
3
3
 
4
4
 
5
5
  function $parcel$export(e, n, v, s) {
6
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
7
  }
8
8
  $parcel$export(module.exports, "makeOccurrenceTree", () => $6dbbe77eb28df143$exports.makeOccurrenceTree);
9
+ $parcel$export(module.exports, "addCommas", () => $63b10b76eb2d903b$exports.addCommas);
9
10
 
10
- $parcel$export(module.exports, "addCommas", () => $73aabf7647b274a0$export$b6fe44657ce35c42);
11
11
  $parcel$export(module.exports, "hexToRgb", () => $73aabf7647b274a0$export$5a544e13ad4e1fa5);
12
12
 
13
13
 
14
- const $73aabf7647b274a0$export$b6fe44657ce35c42 = (x)=>{
15
- x = parseInt(x);
16
- var parts = x.toString().split(".");
17
- parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
18
- return parts.join(".");
19
- };
20
14
  const $73aabf7647b274a0$export$8a63f25cc62965f1 = (data, prop)=>{
21
15
  if (!data || !data.length) return [];
22
16
  return data.map((d)=>{
@@ -192,4 +186,4 @@ const $73aabf7647b274a0$export$a5a22643c02a030c = [
192
186
  ];
193
187
 
194
188
 
195
- //# sourceMappingURL=map-interface.b15c1893.js.map
189
+ //# sourceMappingURL=map-interface.46d1c77b.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;AAAO,MAAM,4CAAM,CAAC,MAAM;IACxB,IAAI,CAAC,QAAQ,CAAC,KAAK,MAAM,EACvB,OAAO,EAAE;IAEX,OAAO,KACJ,GAAG,CAAC,CAAC;QACJ,OAAO,CAAC,CAAC,KAAK;IAChB,GACC,MAAM,CAAC,CAAC,GAAG;QACV,OAAO,IAAI;IACb,GAAG;AACP;AAEO,MAAM,4CAAW,CAAC,KAAK;IAC5B,IAAI,CAAC,KACH,OAAO;IAET,MAAM,IAAI,OAAO,CAAC,KAAK;IACvB,IAAI,SAAS,SAAS,KAAK;IAC3B,IAAI,IAAI,AAAC,UAAU,KAAM;IACzB,IAAI,IAAI,AAAC,UAAU,IAAK;IACxB,IAAI,IAAI,SAAS;IACjB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,WAAW,IAAI,CAAC,CAAC;AACjD;AAUO,MAAM,4CAAiC;IAC5C;QAAE,MAAM;QAAc,QAAQ;QAAK,OAAO;QAAG,OAAO;QAAO,OAAO;IAAU;IAC5E;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QACE,MAAM;QACN,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;IACT;IACA;QAAE,MAAM;QAAc,QAAQ;QAAK,OAAO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O;QACP,OAAO;IACT;CACD","sources":["packages/map-interface/src/location-details/utils/index.ts"],"sourcesContent":["export const sum = (data, prop) => {\n if (!data || !data.length) {\n return [];\n }\n return data\n .map((d) => {\n return d[prop];\n })\n .reduce((a, b) => {\n return a + b;\n }, 0);\n};\n\nexport const hexToRgb = (hex, opacity) => {\n if (!hex) {\n return \"rgba(0,0,0,0.3)\";\n }\n hex = hex.replace(\"#\", \"\");\n let bigint = parseInt(hex, 16);\n let r = (bigint >> 16) & 255;\n let g = (bigint >> 8) & 255;\n let b = bigint & 255;\n return `rgba(${r},${g},${b},${opacity || 0.8})`;\n};\n\nexport type TimescaleDivision = {\n name: string;\n abbrev: string;\n t_age: number;\n b_age: number;\n color: string;\n};\n\nexport const timescale: TimescaleDivision[] = [\n { name: \"Quaternary\", abbrev: \"Q\", t_age: 0, b_age: 2.588, color: \"#F9F97F\" },\n {\n name: \"Neogene\",\n abbrev: \"Ng\",\n t_age: 2.588,\n b_age: 23.03,\n color: \"#FFE619\",\n },\n {\n name: \"Paleogene\",\n abbrev: \"Pg\",\n t_age: 23.03,\n b_age: 66,\n color: \"#FD9A52\",\n },\n { name: \"Cretaceous\", abbrev: \"K\", t_age: 66, b_age: 145, color: \"#7FC64E\" },\n { name: \"Jurassic\", abbrev: \"J\", t_age: 145, b_age: 201.3, color: \"#34B2C9\" },\n {\n name: \"Triassic\",\n abbrev: \"Tr\",\n t_age: 201.3,\n b_age: 252.17,\n color: \"#812B92\",\n },\n {\n name: \"Permian\",\n abbrev: \"P\",\n t_age: 252.17,\n b_age: 298.9,\n color: \"#F04028\",\n },\n {\n name: \"Carboniferous\",\n abbrev: \"C\",\n t_age: 298.9,\n b_age: 358.9,\n color: \"#67A599\",\n },\n {\n name: \"Devonian\",\n abbrev: \"D\",\n t_age: 358.9,\n b_age: 419.2,\n color: \"#CB8C37\",\n },\n {\n name: \"Silurian\",\n abbrev: \"S\",\n t_age: 419.2,\n b_age: 443.8,\n color: \"#B3E1B6\",\n },\n {\n name: \"Ordovician\",\n abbrev: \"O\",\n t_age: 443.8,\n b_age: 485.4,\n color: \"#009270\",\n },\n {\n name: \"Cambrian\",\n abbrev: \"Cm\",\n t_age: 485.4,\n b_age: 541,\n color: \"#7FA056\",\n },\n { name: \"Ediacaran\", abbrev: \"E\", t_age: 541, b_age: 635, color: \"#FFC3E1\" },\n {\n name: \"Cryogenian\",\n abbrev: \"Cr\",\n t_age: 635,\n b_age: 720,\n color: \"#FFAFD7\",\n },\n { name: \"Tonian\", abbrev: \"T\", t_age: 720, b_age: 1000, color: \"#FFA5D2\" },\n { name: \"Stenian\", abbrev: \"St\", t_age: 1000, b_age: 1200, color: \"#FFA5D2\" },\n {\n name: \"Ectasian\",\n abbrev: \"Ec\",\n t_age: 1200,\n b_age: 1400,\n color: \"#FF98CC\",\n },\n {\n name: \"Calymmian\",\n abbrev: \"Ca\",\n t_age: 1400,\n b_age: 1600,\n color: \"#FF8BC5\",\n },\n {\n name: \"Statherian\",\n abbrev: \"St\",\n t_age: 1600,\n b_age: 1800,\n color: \"#EE93C1\",\n },\n {\n name: \"Orosirian\",\n abbrev: \"Or\",\n t_age: 1800,\n b_age: 2050,\n color: \"#E874AF\",\n },\n { name: \"Rhyacian\", abbrev: \"R\", t_age: 2050, b_age: 2300, color: \"#EB84B8\" },\n {\n name: \"Siderian\",\n abbrev: \"Sd\",\n t_age: 2300,\n b_age: 2500,\n color: \"#E874AF\",\n },\n];\n\nexport * from \"./fossils\";\nexport * from \"./formatting\";\n"],"names":[],"version":3,"file":"map-interface.46d1c77b.js.map"}
@@ -1,9 +1,9 @@
1
1
  require("./map-interface.1b386e07.css");
2
2
  var $a8d7c4c397e52cf6$exports = require("./map-interface.cd485bb4.js");
3
- var $860d9939f7032c69$exports = require("./map-interface.64823b7c.js");
4
3
  var $hshpw$blueprintjscore = require("@blueprintjs/core");
5
4
  var $hshpw$macrostrathyper = require("@macrostrat/hyper");
6
5
  var $hshpw$macrostratuicomponents = require("@macrostrat/ui-components");
6
+ var $hshpw$macrostratdatacomponents = require("@macrostrat/data-components");
7
7
  var $hshpw$macrostratmapboxreact = require("@macrostrat/mapbox-react");
8
8
  var $hshpw$classnames = require("classnames");
9
9
  var $hshpw$macrostratmapboxutils = require("@macrostrat/mapbox-utils");
@@ -91,12 +91,12 @@ function $548387e5996cdbbd$export$e9ff14c4822c2e8c(props) {
91
91
  leftButton,
92
92
  children,
93
93
  $548387e5996cdbbd$var$h("div.spacer"),
94
- $548387e5996cdbbd$var$h.if(position != null)((0, $860d9939f7032c69$exports.LngLatCoords), {
94
+ $548387e5996cdbbd$var$h.if(position != null)((0, $hshpw$macrostratdatacomponents.LngLatCoords), {
95
95
  position: position,
96
96
  zoom: zoom,
97
97
  className: "infodrawer-header-item"
98
98
  }),
99
- $548387e5996cdbbd$var$h.if(elevation != null)((0, $860d9939f7032c69$exports.Elevation), {
99
+ $548387e5996cdbbd$var$h.if(elevation != null)((0, $hshpw$macrostratdatacomponents.Elevation), {
100
100
  elevation: elevation,
101
101
  className: "infodrawer-header-item"
102
102
  }),
@@ -109,4 +109,4 @@ function $548387e5996cdbbd$export$e9ff14c4822c2e8c(props) {
109
109
  }
110
110
 
111
111
 
112
- //# sourceMappingURL=map-interface.dcbd3874.js.map
112
+ //# sourceMappingURL=map-interface.4a3d9662.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,MAAM,0BAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAE5B,SAAS,qCAAe,YAAE,QAAQ,UAAE,MAAM,gBAAE,eAAe,OAAO;IAChE,MAAM,aAAa,CAAA,GAAA,0CAAY,EAAE;IAEjC,MAAM,oBAAoB,CAAA,GAAA,uCAAS,EAAE,eAAe;IAEpD,OAAO,wBAAE,yBAAyB;QAChC,wBAAE,CAAA,GAAA,gDAAkB,GAAG;YAAE,UAAU;oBAAU;wBAAQ;QAAW,GAAG,EAAE;QACrE,wBAAE,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AC,aAAa,MAAM,CAAA,GAAA,yCAAQ,GAAG;uBACjC;YACA,WAAW;QACb;QACA,wBAAE,EAAE,CAAC,WAAW,MAAM,CAAA,GAAA,6BAAK,GAAG;YAC5B,SAAS;YACT,MAAM;YACN,SAAS;QACX;KACD;AAEL","sources":["packages/map-interface/src/location-panel/header.ts"],"sourcesContent":["import { Icon, Button } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useToaster } from \"@macrostrat/ui-components\";\nimport { LngLatCoords, Elevation } from \"@macrostrat/data-components\";\nimport { LocationFocusButton, useFocusState } from \"@macrostrat/mapbox-react\";\nimport classNames from \"classnames\";\nimport type { ReactNode } from \"react\";\nimport type { LngLatBounds, LngLatLike } from \"mapbox-gl\";\nimport { isCentered } from \"@macrostrat/mapbox-utils\";\n\nconst h = hyper.styled(styles);\n\nfunction PositionButton({ position, bounds, showCopyLink = false }) {\n const focusState = useFocusState(position);\n\n const copyLinkIsVisible = isCentered(focusState) && showCopyLink;\n\n return h(\"div.position-controls\", [\n h(LocationFocusButton, { location: position, bounds, focusState }, []),\n h.if(copyLinkIsVisible && position != null)(CopyLinkButton, {\n itemName: \"position\",\n }),\n ]);\n}\n\nfunction CopyLinkButton({ itemName, children, onClick, ...rest }) {\n const toaster = useToaster();\n\n let message = `Copied link`;\n if (itemName != null) {\n message += ` to ${itemName}`;\n }\n message += \"!\";\n\n return h(\n Button,\n {\n className: \"copy-link-button\",\n rightIcon: h(Icon, { icon: \"link\", size: 12 }),\n minimal: true,\n small: true,\n onClick() {\n navigator.clipboard.writeText(window.location.href).then(\n () => {\n toaster?.show({\n message,\n intent: \"success\",\n icon: \"clipboard\",\n timeout: 1000,\n });\n onClick?.();\n },\n () => {\n toaster?.show({\n message: \"Failed to copy link\",\n intent: \"danger\",\n icon: \"error\",\n timeout: 1000,\n });\n },\n );\n },\n ...rest,\n },\n children ?? \"Copy link\",\n );\n}\n\nexport interface InfoDrawerHeaderProps {\n onClose?: () => void;\n position?: LngLatLike;\n zoom?: number;\n elevation?: number;\n showCopyPositionButton?: boolean;\n bounds?: LngLatBounds;\n fixedHeight?: boolean;\n children?: ReactNode;\n className?: string;\n}\n\nexport function InfoDrawerHeader(props: InfoDrawerHeaderProps) {\n const {\n onClose,\n position,\n bounds,\n zoom = 7,\n elevation,\n showCopyPositionButton,\n fixedHeight = false,\n children,\n className,\n } = props;\n\n let leftButton = null;\n if (bounds != null || position != null) {\n leftButton = h(PositionButton, {\n position,\n bounds,\n showCopyLink: showCopyPositionButton,\n });\n }\n\n return h(\n \"header.location-panel-header\",\n {\n className: classNames(className, { \"fixed-height\": fixedHeight }),\n },\n [\n leftButton,\n children,\n h(\"div.spacer\"),\n h.if(position != null)(LngLatCoords, {\n position,\n zoom,\n className: \"infodrawer-header-item\",\n }),\n h.if(elevation != null)(Elevation, {\n elevation,\n className: \"infodrawer-header-item\",\n }),\n h.if(onClose != null)(Button, {\n minimal: true,\n icon: \"cross\",\n onClick: onClose,\n }),\n ],\n );\n}\n"],"names":[],"version":3,"file":"map-interface.4a3d9662.js.map"}
@@ -1,4 +1,4 @@
1
- var $548387e5996cdbbd$exports = require("./map-interface.dcbd3874.js");
1
+ var $548387e5996cdbbd$exports = require("./map-interface.4a3d9662.js");
2
2
  require("./map-interface.1b386e07.css");
3
3
  var $a8d7c4c397e52cf6$exports = require("./map-interface.cd485bb4.js");
4
4
  var $c3311f59335df34d$exports = require("./map-interface.bda26b27.js");
@@ -63,4 +63,4 @@ function $2bc7c1e4e7da7fdf$export$aa4baff5242ea6e1(props) {
63
63
  }
64
64
 
65
65
 
66
- //# sourceMappingURL=map-interface.10d442f4.js.map
66
+ //# sourceMappingURL=map-interface.67001b26.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,0BAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAErB,SAAS,0CAAoB,KAAK;IACvC,MAAM,YAAY,CAAA,GAAA,2CAAS,EAAE,cAAc,MAAM,SAAS;IAC1D,OAAO,wBAAE,CAAA,GAAA,mCAAQ,GAAG;QAAE,GAAG,KAAK;mBAAE;IAAU;AAC5C;AAYO,SAAS,0CAAe,KAA0B;IACvD,MAAM,aACJ,SAAS,iBACT,gBAAgB,aAChB,KAAK,WACL,OAAO,YACP,QAAQ,oBACR,mBAAmB,2BACnB,GAAG,MACJ,GAAG;IACJ,MAAM,SACJ,iBACA,wBAAE,CAAA,GAAA,0CAAe,GAAG;iBAAE;QAAS,GAAG,IAAI;IAAC,GAAG;QACxC,SAAS,OAAO,OAAO,wBAAE,MAAM;YAAC;SAAM;KACvC;IACH,OAAO,wBAAE,2CAAqB;mBAAE;IAAU,GAAG;QAC3C;QACA,wBAAE,uBAAuB,wBAAE,CAAA,GAAA,2CAAY,GAAG,wBAAE,kBAAkB;KAC/D;AACH;AAEO,MAAM,4CAAe;AAErB,SAAS,0CAAc,KAAK;IACjC,MAAM,YAAE,QAAQ,aAAE,SAAS,WAAE,UAAU,OAAO,GAAG,MAAM,GAAG;IAC1D,MAAM,MAAM,CAAA,GAAA,2CAAS,EAAE,kBAAkB,WAAW;iBAAE;IAAQ;IAC9D,OAAO,wBAAE,2CAAgB;QAAE,WAAW;QAAK,GAAG,IAAI;IAAC,GAAG;AACxD","sources":["packages/map-interface/src/location-panel/index.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { InfoDrawerHeader, InfoDrawerHeaderProps } from \"./header\";\nimport classNames from \"classnames\";\nimport styles from \"./main.module.sass\";\nimport { ErrorBoundary } from \"@macrostrat/ui-components\";\nimport { PanelCard } from \"../container\";\nimport { ComponentType } from \"react\";\n\nconst h = hyper.styled(styles);\n\nexport function InfoDrawerContainer(props) {\n const className = classNames(\"infodrawer\", props.className);\n return h(PanelCard, { ...props, className });\n}\n\ntype Component = string | ComponentType<any>;\n\ninterface BaseInfoDrawerProps extends InfoDrawerHeaderProps {\n className?: string;\n title?: string;\n headerElement?: JSX.Element;\n children?: React.ReactNode;\n contentContainer?: Component;\n}\n\nexport function BaseInfoDrawer(props: BaseInfoDrawerProps) {\n const {\n className,\n headerElement = null,\n title,\n onClose,\n children,\n contentContainer = \"div.infodrawer-contents\",\n ...rest\n } = props;\n const header =\n headerElement ??\n h(InfoDrawerHeader, { onClose, ...rest }, [\n title == null ? null : h(\"h3\", [title]),\n ]);\n return h(InfoDrawerContainer, { className }, [\n header,\n h(\"div.infodrawer-body\", h(ErrorBoundary, h(contentContainer, children))),\n ]);\n}\n\nexport const DetailsPanel = BaseInfoDrawer;\n\nexport function LocationPanel(props) {\n const { children, className, loading = false, ...rest } = props;\n const cls = classNames(\"location-panel\", className, { loading });\n return h(BaseInfoDrawer, { className: cls, ...rest }, children);\n}\n"],"names":[],"version":3,"file":"map-interface.10d442f4.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,0BAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAErB,SAAS,0CAAoB,KAAK;IACvC,MAAM,YAAY,CAAA,GAAA,2CAAS,EAAE,cAAc,MAAM,SAAS;IAC1D,OAAO,wBAAE,CAAA,GAAA,mCAAQ,GAAG;QAAE,GAAG,KAAK;mBAAE;IAAU;AAC5C;AAYO,SAAS,0CAAe,KAA0B;IACvD,MAAM,aACJ,SAAS,iBACT,gBAAgB,aAChB,KAAK,WACL,OAAO,YACP,QAAQ,oBACR,mBAAmB,2BACnB,GAAG,MACJ,GAAG;IACJ,MAAM,SACJ,iBACA,wBAAE,CAAA,GAAA,0CAAe,GAAG;iBAAE;QAAS,GAAG,IAAI;IAAC,GAAG;QACxC,SAAS,OAAO,OAAO,wBAAE,MAAM;YAAC;SAAM;KACvC;IACH,OAAO,wBAAE,2CAAqB;mBAAE;IAAU,GAAG;QAC3C;QACA,wBAAE,uBAAuB,wBAAE,CAAA,GAAA,2CAAY,GAAG,wBAAE,kBAAkB;KAC/D;AACH;AAEO,MAAM,4CAAe;AAErB,SAAS,0CAAc,KAAK;IACjC,MAAM,YAAE,QAAQ,aAAE,SAAS,WAAE,UAAU,OAAO,GAAG,MAAM,GAAG;IAC1D,MAAM,MAAM,CAAA,GAAA,2CAAS,EAAE,kBAAkB,WAAW;iBAAE;IAAQ;IAC9D,OAAO,wBAAE,2CAAgB;QAAE,WAAW;QAAK,GAAG,IAAI;IAAC,GAAG;AACxD","sources":["packages/map-interface/src/location-panel/index.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { InfoDrawerHeader, InfoDrawerHeaderProps } from \"./header\";\nimport classNames from \"classnames\";\nimport styles from \"./main.module.sass\";\nimport { ErrorBoundary } from \"@macrostrat/ui-components\";\nimport { PanelCard } from \"../container\";\nimport { ComponentType } from \"react\";\n\nconst h = hyper.styled(styles);\n\nexport function InfoDrawerContainer(props) {\n const className = classNames(\"infodrawer\", props.className);\n return h(PanelCard, { ...props, className });\n}\n\ntype Component = string | ComponentType<any>;\n\ninterface BaseInfoDrawerProps extends InfoDrawerHeaderProps {\n className?: string;\n title?: string;\n headerElement?: JSX.Element;\n children?: React.ReactNode;\n contentContainer?: Component;\n}\n\nexport function BaseInfoDrawer(props: BaseInfoDrawerProps) {\n const {\n className,\n headerElement = null,\n title,\n onClose,\n children,\n contentContainer = \"div.infodrawer-contents\",\n ...rest\n } = props;\n const header =\n headerElement ??\n h(InfoDrawerHeader, { onClose, ...rest }, [\n title == null ? null : h(\"h3\", [title]),\n ]);\n return h(InfoDrawerContainer, { className }, [\n header,\n h(\"div.infodrawer-body\", h(ErrorBoundary, h(contentContainer, children))),\n ]);\n}\n\nexport const DetailsPanel = BaseInfoDrawer;\n\nexport function LocationPanel(props) {\n const { children, className, loading = false, ...rest } = props;\n const cls = classNames(\"location-panel\", className, { loading });\n return h(BaseInfoDrawer, { className: cls, ...rest }, children);\n}\n"],"names":[],"version":3,"file":"map-interface.67001b26.js.map"}
@@ -1,4 +1,4 @@
1
- var $b1ec19a5a7a9fdca$exports = require("./map-interface.1fdaaaf6.js");
1
+ var $b1ec19a5a7a9fdca$exports = require("./map-interface.e74ded77.js");
2
2
  var $86URu$macrostrathyper = require("@macrostrat/hyper");
3
3
 
4
4
 
@@ -22,4 +22,4 @@ function $f82372cb049f3f6e$export$12fa808128cf62aa(props) {
22
22
  }
23
23
 
24
24
 
25
- //# sourceMappingURL=map-interface.9277efa8.js.map
25
+ //# sourceMappingURL=map-interface.69b2e2a9.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAGO,SAAS,0CAAkB,KAAK;IACrC,MAAM,QAAE,IAAI,YAAE,WAAW,OAAO,GAAG;IAEnC,IAAI,CAAC,QAAQ,KAAK,MAAM,IAAI,GAC1B,OAAO;IAET,OAAO,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,iCAAc,GAAG;cAAE;IAAK;AACnC","sources":["packages/map-interface/src/location-details/fossil-collections/index.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport PBDBCollections from \"./collections\";\n\nexport function FossilCollections(props) {\n const { data, expanded = false } = props;\n\n if (!data || data.length <= 0) {\n return null;\n }\n return h(PBDBCollections, { data });\n}\n"],"names":[],"version":3,"file":"map-interface.9277efa8.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAGO,SAAS,0CAAkB,KAAK;IACrC,MAAM,QAAE,IAAI,YAAE,WAAW,OAAO,GAAG;IAEnC,IAAI,CAAC,QAAQ,KAAK,MAAM,IAAI,GAC1B,OAAO;IAET,OAAO,CAAA,GAAA,gDAAA,EAAE,CAAA,GAAA,iCAAc,GAAG;cAAE;IAAK;AACnC","sources":["packages/map-interface/src/location-details/fossil-collections/index.ts"],"sourcesContent":["import h from \"@macrostrat/hyper\";\nimport PBDBCollections from \"./collections\";\n\nexport function FossilCollections(props) {\n const { data, expanded = false } = props;\n\n if (!data || data.length <= 0) {\n return null;\n }\n return h(PBDBCollections, { data });\n}\n"],"names":[],"version":3,"file":"map-interface.69b2e2a9.js.map"}
@@ -1,4 +1,4 @@
1
- var $696ab853d6291637$exports = require("./map-interface.2401af7a.js");
1
+ var $1bbba8ce35f6df80$exports = require("./map-interface.3ca778c5.js");
2
2
  var $a3M2p$blueprintjscore = require("@blueprintjs/core");
3
3
  var $a3M2p$macrostrathyper = require("@macrostrat/hyper");
4
4
  var $a3M2p$macrostratmapinterface = require("@macrostrat/map-interface");
@@ -29,7 +29,6 @@ function $f1ee93b3850b066e$export$7bbcc612b1169c6f({ xddInfo: xddInfo, expanded:
29
29
  }
30
30
  function $f1ee93b3850b066e$export$223bda478756d1d9({ isFetching: isFetching, data: xddInfo, expanded: expanded, nestedExpanded: nestedExpanded, ...rest }) {
31
31
  const groupedData = $f1ee93b3850b066e$var$groupSnippetsByJournal(xddInfo);
32
- console.log("expanded", expanded);
33
32
  return (0, ($parcel$interopDefault($a3M2p$macrostrathyper)))((0, $a3M2p$macrostratmapinterface.ExpansionPanel), {
34
33
  className: "regional-panel",
35
34
  title: "Primary literature",
@@ -40,7 +39,7 @@ function $f1ee93b3850b066e$export$223bda478756d1d9({ isFetching: isFetching, dat
40
39
  (0, ($parcel$interopDefault($a3M2p$macrostrathyper))).if(isFetching)((0, $a3M2p$blueprintjscore.Spinner)),
41
40
  (0, ($parcel$interopDefault($a3M2p$macrostrathyper))).if(!isFetching && xddInfo.length > 0)([
42
41
  Array.from(groupedData.entries())?.map(([journal, snippets])=>{
43
- return (0, ($parcel$interopDefault($a3M2p$macrostrathyper)))((0, $696ab853d6291637$exports.default), {
42
+ return (0, ($parcel$interopDefault($a3M2p$macrostrathyper)))((0, $1bbba8ce35f6df80$exports.JournalLegacy), {
44
43
  nestedExpanded: nestedExpanded,
45
44
  name: journal,
46
45
  articles: snippets,
@@ -63,4 +62,4 @@ function $f1ee93b3850b066e$var$groupSnippetsByJournal(snippets) {
63
62
  }
64
63
 
65
64
 
66
- //# sourceMappingURL=map-interface.3bcda63a.js.map
65
+ //# source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":["packages/map-interface/src/location-details/xdd-panel/index.ts"],"sourcesContent":["import { Spinner } from \"@blueprintjs/core\";\nimport h from \"@macrostrat/hyper\";\nimport { XDDSnippet, JournalLegacy } from \"./journal\";\nimport { ExpansionPanel } from \"@macrostrat/map-interface\";\n\nexport function XddExpansion({\n xddInfo,\n expanded = false,\n nestedExpanded = true,\n}) {\n return h(xDDPanelCore, {\n className: \"regional-panel\",\n data: xddInfo,\n isFetching: xddInfo == undefined || xddInfo.length === 0,\n expanded,\n nestedExpanded,\n });\n}\n\nexport function xDDPanelCore({\n isFetching,\n data: xddInfo,\n expanded,\n nestedExpanded,\n ...rest\n}) {\n const groupedData = groupSnippetsByJournal(xddInfo);\n\n return h(\n ExpansionPanel,\n {\n className: \"regional-panel\",\n title: \"Primary literature\",\n helpText: \"via xDD\",\n ...rest,\n expanded,\n },\n [\n h.if(isFetching)(Spinner),\n h.if(!isFetching && xddInfo.length > 0)([\n Array.from(groupedData.entries())?.map(([journal, snippets]) => {\n return h(JournalLegacy, {\n nestedExpanded,\n name: journal,\n articles: snippets,\n publisher: snippets[0].publisher,\n key: journal,\n });\n }),\n ]),\n ],\n );\n}\n\nfunction groupSnippetsByJournal(\n snippets: XDDSnippet[],\n): Map<string, XDDSnippet[]> {\n const journals = new Map<string, XDDSnippet[]>();\n if (!snippets || snippets.length === 0) {\n return journals;\n }\n for (let snippet of snippets) {\n const { pubname: journal } = snippet;\n if (!journals.has(journal)) {\n journals.set(journal, []);\n }\n journals.get(journal).push(snippet);\n }\n return journals;\n}\n"],"names":[],"version":3,"file":"map-interface.7170f35e.js.map"}
@@ -1,4 +1,4 @@
1
- var $73aabf7647b274a0$exports = require("./map-interface.b15c1893.js");
1
+ var $73aabf7647b274a0$exports = require("./map-interface.46d1c77b.js");
2
2
  require("./map-interface.368b346c.css");
3
3
  var $ae0016a490fce4b5$exports = require("./map-interface.f9611285.js");
4
4
  var $5sLQy$macrostrathyper = require("@macrostrat/hyper");
@@ -97,4 +97,4 @@ function $4f556f7b511fe929$export$bde077e6dcba34d5(props) {
97
97
  }
98
98
 
99
99
 
100
- //# sourceMappingURL=map-interface.e109c93a.js.map
100
+ //# sourceMappingURL=map-interface.8d67cc21.js.map