@macrostrat/map-interface 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/{dev.7499151f.js → dev.10ac2fb3.js} +3 -3
  3. package/dist/{esm/dev.ccb6e774.js.map → cjs/dev.10ac2fb3.js.map} +1 -1
  4. package/dist/cjs/{expansion-panel.08532cee.js → expansion-panel.ef757efe.js} +6 -5
  5. package/dist/cjs/expansion-panel.ef757efe.js.map +1 -0
  6. package/dist/cjs/{header.58c5c012.js → header.b86c0710.js} +11 -5
  7. package/dist/cjs/header.b86c0710.js.map +1 -0
  8. package/dist/cjs/{headers.20eae5f7.js → headers.d9f3e324.js} +3 -3
  9. package/dist/cjs/{headers.20eae5f7.js.map → headers.d9f3e324.js.map} +1 -1
  10. package/dist/cjs/index.js +3 -3
  11. package/dist/cjs/{location-panel.c95f5e96.js → location-panel.42ca3200.js} +6 -6
  12. package/dist/cjs/location-panel.42ca3200.js.map +1 -0
  13. package/dist/cjs/{main.module.3f2b7c9f.js → main.module.0bbfa859.js} +4 -1
  14. package/dist/cjs/main.module.0bbfa859.js.map +1 -0
  15. package/dist/cjs/{main.module.ff1b1aca.css → main.module.338867af.css} +23 -11
  16. package/dist/cjs/main.module.338867af.css.map +1 -0
  17. package/dist/cjs/{main.module.02c4de16.css → main.module.3dbc089f.css} +22 -6
  18. package/dist/cjs/main.module.3dbc089f.css.map +1 -0
  19. package/dist/cjs/{main.module.4ecbaaa5.js → main.module.a3a78b0d.js} +4 -1
  20. package/dist/cjs/main.module.a3a78b0d.js.map +1 -0
  21. package/dist/cjs/{map-page.190b6723.js → map-page.9c19b2a9.js} +3 -3
  22. package/dist/cjs/{map-page.190b6723.js.map → map-page.9c19b2a9.js.map} +1 -1
  23. package/dist/cjs/{vector-tile-features.456f887b.js → vector-tile-features.77121785.js} +2 -2
  24. package/dist/cjs/{vector-tile-features.456f887b.js.map → vector-tile-features.77121785.js.map} +1 -1
  25. package/dist/esm/{dev.ccb6e774.js → dev.30b435dc.js} +3 -3
  26. package/dist/{cjs/dev.7499151f.js.map → esm/dev.30b435dc.js.map} +1 -1
  27. package/dist/esm/{expansion-panel.feff0e62.js → expansion-panel.465b822f.js} +7 -6
  28. package/dist/esm/expansion-panel.465b822f.js.map +1 -0
  29. package/dist/esm/{header.0f535ab1.js → header.b4aa864a.js} +12 -6
  30. package/dist/esm/header.b4aa864a.js.map +1 -0
  31. package/dist/esm/{headers.b25ff414.js → headers.32db7784.js} +4 -4
  32. package/dist/esm/{headers.b25ff414.js.map → headers.32db7784.js.map} +1 -1
  33. package/dist/esm/index.d.ts +6 -1
  34. package/dist/esm/index.d.ts.map +1 -1
  35. package/dist/esm/index.js +3 -3
  36. package/dist/esm/{location-panel.0b1f4ed2.js → location-panel.b56899ab.js} +7 -7
  37. package/dist/esm/location-panel.b56899ab.js.map +1 -0
  38. package/dist/esm/{main.module.67a908da.js → main.module.303f6d99.js} +4 -1
  39. package/dist/esm/main.module.303f6d99.js.map +1 -0
  40. package/dist/esm/{main.module.89579666.js → main.module.58922c04.js} +4 -1
  41. package/dist/esm/main.module.58922c04.js.map +1 -0
  42. package/dist/esm/{map-page.b953c404.js → map-page.93c11cef.js} +3 -3
  43. package/dist/esm/{map-page.b953c404.js.map → map-page.93c11cef.js.map} +1 -1
  44. package/dist/esm/{vector-tile-features.e1a24df0.js → vector-tile-features.53b48d66.js} +2 -2
  45. package/dist/esm/{vector-tile-features.e1a24df0.js.map → vector-tile-features.53b48d66.js.map} +1 -1
  46. package/dist/node/container.abd6f0d2.js +2 -0
  47. package/dist/node/container.abd6f0d2.js.map +1 -0
  48. package/dist/node/context-panel.7c2f42c9.js +2 -0
  49. package/dist/node/context-panel.7c2f42c9.js.map +1 -0
  50. package/dist/node/controls.ffb44307.js +2 -0
  51. package/dist/node/controls.ffb44307.js.map +1 -0
  52. package/dist/node/dev.ee1e89e9.js +2 -0
  53. package/dist/node/dev.ee1e89e9.js.map +1 -0
  54. package/dist/node/expansion-panel.62240ee3.js +2 -0
  55. package/dist/node/expansion-panel.62240ee3.js.map +1 -0
  56. package/dist/node/hash-string.3fc8ceb0.js +2 -0
  57. package/dist/node/hash-string.3fc8ceb0.js.map +1 -0
  58. package/dist/node/header.4b58753a.js +2 -0
  59. package/dist/node/header.4b58753a.js.map +1 -0
  60. package/dist/node/headers.2581f6d9.js +2 -0
  61. package/dist/node/headers.2581f6d9.js.map +1 -0
  62. package/dist/node/helpers.6bda171f.js +2 -0
  63. package/dist/node/helpers.6bda171f.js.map +1 -0
  64. package/dist/node/index.js +2 -0
  65. package/dist/node/index.js.map +1 -0
  66. package/dist/node/location-info.9f59aad3.js +2 -0
  67. package/dist/node/location-info.9f59aad3.js.map +1 -0
  68. package/dist/node/location-panel.c39983e3.js +2 -0
  69. package/dist/node/location-panel.c39983e3.js.map +1 -0
  70. package/dist/node/main.module.24615279.js +2 -0
  71. package/dist/node/main.module.24615279.js.map +1 -0
  72. package/dist/node/main.module.29a15f3d.css +2 -0
  73. package/dist/node/main.module.29a15f3d.css.map +1 -0
  74. package/dist/node/main.module.2d51c752.css +2 -0
  75. package/dist/node/main.module.2d51c752.css.map +1 -0
  76. package/dist/node/main.module.3a8fef67.js +2 -0
  77. package/dist/node/main.module.3a8fef67.js.map +1 -0
  78. package/dist/node/main.module.434acaf9.js +2 -0
  79. package/dist/node/main.module.434acaf9.js.map +1 -0
  80. package/dist/node/main.module.5d5ab665.js +2 -0
  81. package/dist/node/main.module.5d5ab665.js.map +1 -0
  82. package/dist/node/main.module.61b261c8.css +2 -0
  83. package/dist/node/main.module.61b261c8.css.map +1 -0
  84. package/dist/node/main.module.89f269c7.css +2 -0
  85. package/dist/node/main.module.89f269c7.css.map +1 -0
  86. package/dist/node/main.module.ba3f4a78.css +2 -0
  87. package/dist/node/main.module.ba3f4a78.css.map +1 -0
  88. package/dist/node/main.module.e200d631.js +2 -0
  89. package/dist/node/main.module.e200d631.js.map +1 -0
  90. package/dist/node/map-page.cb4c713e.js +2 -0
  91. package/dist/node/map-page.cb4c713e.js.map +1 -0
  92. package/dist/node/map-view.c6746dca.js +2 -0
  93. package/dist/node/map-view.c6746dca.js.map +1 -0
  94. package/dist/node/terrain.96ae432a.js +2 -0
  95. package/dist/node/terrain.96ae432a.js.map +1 -0
  96. package/dist/node/tile-extent.28db5d2c.js +2 -0
  97. package/dist/node/tile-extent.28db5d2c.js.map +1 -0
  98. package/dist/node/utils.274d0452.js +2 -0
  99. package/dist/node/utils.274d0452.js.map +1 -0
  100. package/dist/node/utils.dd92f725.js +2 -0
  101. package/dist/node/utils.dd92f725.js.map +1 -0
  102. package/dist/node/vector-tile-features.b5a23b71.js +2 -0
  103. package/dist/node/vector-tile-features.b5a23b71.js.map +1 -0
  104. package/dist/node/xray.bce11e7b.js +2 -0
  105. package/dist/node/xray.bce11e7b.js.map +1 -0
  106. package/package.json +12 -3
  107. package/src/expansion-panel/index.ts +1 -1
  108. package/src/expansion-panel/main.module.sass +20 -10
  109. package/src/location-panel/header.ts +31 -19
  110. package/src/location-panel/index.ts +6 -4
  111. package/src/location-panel/main.module.sass +16 -4
  112. package/dist/cjs/expansion-panel.08532cee.js.map +0 -1
  113. package/dist/cjs/header.58c5c012.js.map +0 -1
  114. package/dist/cjs/location-panel.c95f5e96.js.map +0 -1
  115. package/dist/cjs/main.module.02c4de16.css.map +0 -1
  116. package/dist/cjs/main.module.3f2b7c9f.js.map +0 -1
  117. package/dist/cjs/main.module.4ecbaaa5.js.map +0 -1
  118. package/dist/cjs/main.module.ff1b1aca.css.map +0 -1
  119. package/dist/esm/expansion-panel.feff0e62.js.map +0 -1
  120. package/dist/esm/header.0f535ab1.js.map +0 -1
  121. package/dist/esm/location-panel.0b1f4ed2.js.map +0 -1
  122. package/dist/esm/main.module.67a908da.js.map +0 -1
  123. package/dist/esm/main.module.89579666.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"mappings":"ACAA,gJAUI,uGAGF,qGAOA,2DAIE,kFAGF,0DAGA,mFAGA,oJAME,6EAGF,+EAIE,2FAME,kG,4E,qC,8GAgBJ,uGAOA,wJAYF,6CAME,kDAGA,mGAKE,4I,+CAQF,4EAGA,wCAGE,+CAEJ,sEAKI,2D,+CAKJ,mC,+CAOE,yE,4C,+BASA,mEAKA,iF,2D,oLAYA,yHAGF,iGAGE,6I,uH,sD,iF,2EAsBA,gE,mCAKA,gE,oDAKA,8EAEF,kDAIA,yGAGE,8DAGE,uEAGA,kEAIA,iFAGF,iEAGA,2D,8EAME,8CAGA,0FAGA,sEAGA,4EAGA,gEAGA,sEAGA,uCAGA,iEAIE,kG,oGAcJ,gH,4P,8NAqBA,8F,0MAaF,sCAAA,mIAME,wEAGF,wCAIE,kDAGA,yC,4D,sC,iCA4BE,+EAMA,+N,6J,wH,iDAoBJ,4DAME,iDAIA,iG,0EASE,yFAIA,yFAIA,mGAGE,oIAQF,2CAKA,8E,iGAQA,2FAGA,4FAGA,oM,mH,mH,yHAeF,gKAQE,8JAGA,qH,+J,sCAQF,4FAGA,0FAOI,kFAGA,4F,2G,8FAaF,sCACE,8FAGA,mHAGA","sources":["main.module.89f269c7.css","packages/map-interface/src/main.module.sass"],"sourcesContent":[".map-container_4c0a66 {\n --map-panel-border-radius: 4px;\n flex-direction: column;\n width: 100%;\n height: 100%;\n display: flex;\n position: relative;\n overflow: hidden;\n}\n\n.map-container_4c0a66.show-panel-outlines_4c0a66 .map-view-container_4c0a66 {\n outline: 2px dotted #1e90ff;\n}\n\n.map-container_4c0a66.fit-viewport_4c0a66 {\n width: 100vw;\n height: 100vh;\n max-height: -webkit-fill-available;\n}\n\n.map-container_4c0a66 .compass-control_4c0a66 {\n display: none;\n}\n\n.map-container_4c0a66.map-is-rotated_4c0a66 .compass-control_4c0a66 {\n display: block;\n}\n\n.map-container_4c0a66 .map-3d-control_4c0a66 {\n display: none;\n}\n\n.map-container_4c0a66.map-3d-available_4c0a66 .map-3d-control_4c0a66 {\n display: block;\n}\n\n.map-container_4c0a66.map-is-rotated_4c0a66.map-3d-available_4c0a66 .map-3d-control_4c0a66, .map-container_4c0a66 .globe-control_4c0a66 {\n display: none;\n}\n\n.map-container_4c0a66 .globe-control_4c0a66 svg {\n color: var(--secondary-color);\n}\n\n.map-container_4c0a66.map-is-global_4c0a66 .globe-control_4c0a66 {\n display: block;\n}\n\n.map-container_4c0a66.detail-panel-open_4c0a66 .zoom-control_4c0a66 {\n opacity: 0;\n display: none;\n}\n\n.map-container_4c0a66.detail-panel-fixed_4c0a66 .detail-panel-holder_4c0a66 > * {\n border-radius: unset;\n}\n\n.detail-panel-holder_4c0a66 {\n flex-direction: column;\n min-height: 0;\n display: flex;\n}\n\n.detail-panel-holder_4c0a66 > * {\n flex: 1;\n}\n\n.map-control-stack_4c0a66 {\n pointer-events: none;\n flex-direction: column;\n width: 30em;\n margin-left: -30em;\n display: flex;\n}\n\n.main-row_4c0a66 {\n flex-direction: row;\n flex: 1;\n min-height: 0;\n max-height: 100%;\n display: flex;\n position: relative;\n}\n\n.map-ui_4c0a66 {\n height: 100%;\n max-height: 100%;\n box-shadow: 0 0 10px 4px var(--card-shadow-color);\n flex-direction: column;\n flex: 1;\n display: flex;\n position: relative;\n}\n\n.mapbox-map_4c0a66 {\n position: absolute;\n inset: 0;\n}\n\n.mapbox-map_4c0a66.mapboxgl-map {\n position: absolute;\n}\n\n.context-panel-holder_4c0a66 > .bp5-card {\n background-color: var(--panel-background-color);\n padding: 10px;\n}\n\n.panel-card_4c0a66 {\n background-color: var(--panel-background-color);\n border-radius: var(--map-panel-border-radius);\n padding: 10px;\n overflow: hidden;\n}\n\n.panel-card_4c0a66 > :last-child {\n margin-bottom: 0;\n}\n\n.bp5-dark .panel-card_4c0a66 {\n background-color: var(--panel-background-color);\n}\n\n.context-stack_4c0a66 > div {\n flex-shrink: 1;\n}\n\n.context-stack_4c0a66 > .searchbar_4c0a66 {\n flex: 0;\n}\n\n.context-stack_4c0a66, .detail-stack_4c0a66 {\n z-index: 10;\n max-height: 100%;\n}\n\n.panel-container_4c0a66 {\n flex-direction: column;\n display: flex;\n}\n\n.panel-container_4c0a66 > div {\n pointer-events: all;\n}\n\n.panel-title_4c0a66 {\n font-size: 16px;\n}\n\n.spacer_4c0a66 {\n pointer-events: none;\n flex-grow: 1;\n}\n\n.map-view-container_4c0a66 {\n flex-grow: 1;\n position: relative;\n overflow: hidden;\n}\n\n.searchbar-holder_4c0a66 {\n margin-bottom: .5em;\n}\n\n.right-panel_4c0a66 {\n width: 24em;\n}\n\n.buttons_4c0a66 {\n flex-direction: row;\n flex: 1;\n min-width: 0;\n display: flex;\n}\n\n.tab-button_4c0a66 {\n text-align: right;\n flex-shrink: 1;\n min-width: 40px;\n overflow: hidden;\n}\n\n.tab-button_4c0a66 .bp5-button-text {\n transition: all .2s .1s;\n}\n\n.menu-card_4c0a66.narrow-card_4c0a66 .panel-header_4c0a66:not(.minimal_4c0a66) .tab-button_4c0a66.bp5-active ~ .tab-button_4c0a66 .bp5-button-text {\n opacity: 0;\n width: 0;\n margin-left: -7px;\n}\n\n.context-panel-leave_4c0a66 .menu-card_4c0a66 .panel-header_4c0a66 .tab-button_4c0a66 .bp5-button-text {\n opacity: 0;\n width: 0;\n}\n\n.narrow-card_4c0a66.narrow-enter_4c0a66 .panel-header_4c0a66 .buttons_4c0a66 {\n margin-right: -500px;\n}\n\n.panel-header_4c0a66.minimal_4c0a66 .tab-button_4c0a66:not(:hover):not(.bp5-active) {\n width: 30px;\n min-width: 30px;\n padding-left: 0;\n padding-right: 0;\n}\n\n.panel-header_4c0a66.minimal_4c0a66 .tab-button_4c0a66:not(:hover) .bp5-button-text {\n opacity: 0;\n width: 0;\n margin-left: -7px;\n}\n\n.menu-group_4c0a66 {\n margin-top: .2em;\n margin-bottom: .5em;\n}\n\n.menu-card_4c0a66 .bp5-text ul, .menu-card_4c0a66 .text-panel ul {\n padding-left: 1em;\n}\n\n.menu-content_4c0a66 {\n flex-direction: column;\n margin-bottom: -8px;\n display: flex;\n}\n\n.menu-content_4c0a66 .bp5-button-group_4c0a66 {\n margin-bottom: 4px;\n}\n\n.menu-content_4c0a66 hr {\n width: 100%;\n}\n\n.mapbox-map .mapbox-compass, .mapbox-map .mapbox-3d {\n display: none;\n}\n\n.mapboxgl-ctrl.mapbox-3d.mapbox-control {\n width: unset;\n}\n\n.mapboxgl-ctrl.mapbox-3d.mapbox-control button {\n width: unset;\n padding-inline: 4px;\n}\n\n.mapboxgl-canvas-container {\n width: 100%;\n height: 100%;\n}\n\n.mapboxgl-ctrl.mapboxgl-ctrl-attrib {\n background-color: var(--translucent-panel-background-color) !important;\n}\n\n.mapboxgl-ctrl.mapboxgl-ctrl-attrib a {\n color: var(--text-color);\n}\n\n.mapboxgl-marker svg path {\n fill: var(--panel-background-color) !important;\n}\n\n.mapboxgl-marker svg circle {\n fill: var(--secondary-color) !important;\n}\n\n.mapbox-control.mapbox-zoom {\n background: var(--translucent-panel-background-inner);\n}\n\n.mapbox-control.mapbox-zoom svg {\n fill: var(--text-color) !important;\n}\n\n.mapboxgl-ctrl-logo {\n transform: scale(.9)translate(-8px, 2px);\n}\n\n.bp5-dark .mapboxgl-ctrl-group {\n background-color: var(--panel-background-color);\n}\n\n.bp5-dark .mapboxgl-ctrl-logo {\n filter: invert();\n}\n\n.mapboxgl-ctrl-group button + button {\n border-top: 1px solid var(--panel-rule-color) !important;\n}\n\n.bp5-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon {\n filter: invert(40%);\n}\n\n.bp5-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon:hover {\n filter: invert(50%);\n}\n\n.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon {\n filter: invert(40%);\n}\n\n.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon:hover {\n filter: invert(50%);\n}\n\n.detail-stack_4c0a66 {\n position: relative;\n}\n\n.detail-panel-container_4c0a66, .map-right-controls_4c0a66 {\n flex: 1;\n}\n\n.zoom-control_4c0a66 {\n width: 30px;\n transition: opacity 1s ease-in-out;\n position: absolute;\n top: 0;\n right: 0;\n}\n\n.map-controls_4c0a66 {\n flex-direction: row;\n justify-content: right;\n gap: .5em;\n margin-bottom: 0;\n display: flex;\n}\n\n.map-controls_4c0a66 .map-control > .bp5-button {\n padding: 0;\n transform: translate(-3.5px, -3.5px);\n width: 22px !important;\n}\n\n.map-controls_4c0a66 .mapbox-control, .map-controls_4c0a66 .map-control-wrapper, .map-controls_4c0a66 .map-control {\n background-color: var(--panel-background-color);\n height: 22px;\n max-height: 22px;\n box-shadow: 0 0 0 1px var(--card-shadow-color);\n border-radius: 4px;\n}\n\n.map-controls_4c0a66 .mapbox-control button, .map-controls_4c0a66 .map-control-wrapper button, .map-controls_4c0a66 .map-control button {\n background-position: center;\n width: 22px;\n max-width: 22px;\n height: 22px;\n max-height: 22px;\n padding: 0;\n}\n\n.map-controls_4c0a66 .map-scale-control_4c0a66 {\n box-shadow: none;\n background: none;\n padding-top: 8px;\n}\n\n.map-controls_4c0a66 .map-scale-control_4c0a66 .mapboxgl-ctrl-scale {\n background-color: var(--translucent-panel-background-color);\n border-color: var(--secondary-text-color);\n color: var(--secondary-text-color);\n}\n\n@media only screen and (width <= 768px) {\n .map-container_4c0a66.detail-panel-enter_4c0a66 .context-stack_4c0a66 {\n visibility: hidden;\n height: 0;\n transition: height .5s ease-in-out;\n }\n\n .detail-stack_4c0a66 {\n height: fit-content;\n position: inherit;\n max-height: 70%;\n }\n\n .infodrawer-stack_4c0a66 {\n max-height: 70%;\n }\n\n .infodrawer-stack_4c0a66.exit-active {\n max-height: 0;\n }\n\n .mapbox-control.mapbox-zoom {\n display: none;\n }\n\n .map-controls_4c0a66 {\n position: absolute;\n top: -60px;\n right: 10px;\n }\n\n .detail-panel_4c0a66 {\n border-radius: 0;\n }\n}\n\n@media screen and (width >= 768px) {\n .map-ui_4c0a66 {\n flex-direction: row;\n gap: .5em;\n min-height: 80px;\n padding: 1em 1em 2em;\n }\n\n .context-stack_4c0a66 {\n max-width: var(--map-context-stack-max-width, 34em);\n min-width: 14em;\n width: var(--map-context-stack-width, 16em);\n flex-direction: column;\n margin-right: .5em;\n padding-bottom: .5em;\n transition: width .3s;\n display: flex;\n }\n\n .context-stack_4c0a66.adaptive-width_4c0a66 {\n width: var(--map-context-stack-width, none);\n max-width: var(--map-context-stack-max-width, none);\n transition: width .3s;\n }\n\n .context-stack_4c0a66 .bp5-navbar h1, .context-stack_4c0a66 .bp5-navbar h2, .context-stack_4c0a66 .bp5-navbar h3 {\n margin: 0;\n }\n\n .context-stack_4c0a66 > .spacer_4c0a66 {\n flex-grow: 0;\n }\n\n .context-panel-holder_4c0a66 {\n min-height: 0;\n position: relative;\n }\n\n .context-panel-holder_4c0a66 > div {\n max-height: 100%;\n }\n\n .detail-stack_4c0a66 {\n width: var(--map-detail-stack-width, 30em);\n flex-direction: column;\n display: flex;\n }\n\n .context-stack_4c0a66, .detail-stack_4c0a66 {\n pointer-events: none;\n z-index: 10;\n }\n\n .context-stack_4c0a66 > div, .detail-stack_4c0a66 > div {\n pointer-events: all;\n margin-bottom: .5em;\n }\n\n .context-stack_4c0a66 > div:last-child, .detail-stack_4c0a66 > div:last-child {\n margin-bottom: 0;\n }\n\n .context-stack_4c0a66 > div.spacer_4c0a66, .detail-stack_4c0a66 > div.spacer_4c0a66 {\n pointer-events: none;\n }\n\n .context-stack_4c0a66 .context-stack_4c0a66 .spacer_4c0a66, .detail-stack_4c0a66 .context-stack_4c0a66 .spacer_4c0a66 {\n min-height: 1em;\n }\n\n .map-view-container_4c0a66 {\n position: unset;\n }\n}\n\n.map-container_4c0a66 .context-panel-holder_4c0a66 {\n pointer-events: none;\n flex: 1;\n}\n\n.map-container_4c0a66 .context-panel-holder_4c0a66 > div {\n pointer-events: all;\n transition: opacity .8s;\n}\n\n.map-container_4c0a66.context-panel-from_4c0a66 .context-panel-holder_4c0a66 > div {\n opacity: 0;\n}\n\n.map-container_4c0a66.context-panel-enter_4c0a66 .context-panel-holder_4c0a66 > div {\n opacity: 1;\n}\n\n.map-container_4c0a66.context-panel-leave_4c0a66 .context-panel-holder_4c0a66 > div, .map-container_4c0a66.detail-panel-floating_4c0a66.detail-panel-from_4c0a66 .detail-panel-holder_4c0a66 {\n opacity: 0;\n}\n\n.map-container_4c0a66.detail-panel-floating_4c0a66.detail-panel-enter_4c0a66 .detail-panel-holder_4c0a66 {\n opacity: 1;\n}\n\n.map-container_4c0a66.detail-panel-floating_4c0a66.detail-panel-leave_4c0a66 .detail-panel-holder_4c0a66 {\n opacity: 0;\n}\n\n.map-container_4c0a66.detail-panel-floating_4c0a66 .detail-panel_4c0a66 {\n transition: opacity .8s, height .8s, max-height .8s;\n}\n\n.map-container_4c0a66.detail-panel-fixed_4c0a66 .map-ui_4c0a66, .map-container_4c0a66.detail-panel-fixed_4c0a66 .detail-stack_4c0a66 {\n transition: margin-right .8s;\n}\n\n.map-container_4c0a66.detail-panel-fixed_4c0a66.detail-panel-from_4c0a66 .detail-panel-holder_4c0a66 {\n margin-right: calc(-1 * var(--map-detail-stack-width, 30em));\n}\n\n.map-container_4c0a66.detail-panel-fixed_4c0a66.detail-panel-enter_4c0a66 .detail-panel-holder_4c0a66 {\n margin-right: 0;\n}\n\n.map-container_4c0a66.detail-panel-fixed_4c0a66.detail-panel-leave_4c0a66 .detail-panel-holder_4c0a66 {\n margin-right: calc(-1 * var(--map-detail-stack-width, 30em));\n}\n\n@media only screen and (width <= 768px) {\n .map-container_4c0a66 .detail-stack_4c0a66 {\n transition: opacity .8s, height .8s, max-height .8s;\n }\n\n .map-container_4c0a66.detail-panel-from_4c0a66 .detail-stack_4c0a66 {\n height: 0;\n max-height: 0;\n }\n\n .map-container_4c0a66.detail-panel-leave_4c0a66 .detail-stack_4c0a66 {\n max-height: 0;\n }\n\n .map-container_4c0a66.context-panel-from_4c0a66 .context-panel_4c0a66 {\n height: 0;\n max-height: 0;\n }\n\n .map-container_4c0a66.context-panel-leave_4c0a66 .context-stack_4c0a66 .context-panel-holder_4c0a66 {\n flex: 0;\n }\n\n .map-container_4c0a66.context-panel-leave_4c0a66 .context-stack_4c0a66 .spacer_4c0a66 {\n flex: 1;\n }\n}\n\n@media only screen and (width >= 768px) {\n .map-container_4c0a66.detail-panel-leave_4c0a66 .map-view-container_4c0a66 {\n margin-right: -14em;\n }\n\n .map-container_4c0a66.map-is-global_4c0a66.detail-panel-leave_4c0a66 .map-view-container_4c0a66 {\n margin-right: -30em;\n }\n\n .map-container_4c0a66.map-is-global_4c0a66.context-panel-leave_4c0a66 .map-view-container_4c0a66 {\n margin-left: -16em;\n }\n}\n/*# sourceMappingURL=main.module.89f269c7.css.map */\n",".map-container\n display: flex\n flex-direction: column\n position: relative\n width: 100%\n height: 100%\n overflow: hidden\n --map-panel-border-radius: 4px\n\n &.show-panel-outlines\n .map-view-container\n outline: 2px dotted dodgerblue\n\n &.fit-viewport\n height: 100vh\n width: 100vw\n /* mobile viewport bug fix */\n max-height: -webkit-fill-available\n\n // Compass display\n .compass-control\n display: none\n\n &.map-is-rotated\n .compass-control\n display: block\n\n .map-3d-control\n display: none\n\n &.map-3d-available .map-3d-control\n display: block\n\n &.map-is-rotated.map-3d-available .map-3d-control\n display: none\n\n .globe-control\n display: none\n\n svg\n color: var(--secondary-color)\n\n &.map-is-global .globe-control\n display: block\n\n &.detail-panel-open\n .zoom-control\n opacity: 0\n display: none\n\n &.detail-panel-fixed\n .detail-panel-holder\n & > *\n border-radius: unset\n\n.detail-panel-holder\n display: flex\n flex-direction: column\n min-height: 0\n\n & > *\n flex: 1\n\n.map-control-stack\n display: flex\n flex-direction: column\n width: 30em\n margin-left: -30em\n pointer-events: none\n\n.main-row\n flex: 1\n display: flex\n flex-direction: row\n position: relative\n max-height: 100%\n min-height: 0\n\n.map-ui\n flex: 1\n position: relative\n display: flex\n flex-direction: column\n max-height: 100%\n height: 100%\n box-shadow: 0 0 10px 4px var(--card-shadow-color)\n\n.map-view-container\n flex-grow: 1\n position: relative\n overflow: hidden\n\n.mapbox-map\n position: absolute\n top: 0\n bottom: 0\n left: 0\n right: 0\n\n &:global(.mapboxgl-map)\n // override the default mapbox position: relative in all cases\n position: absolute\n\n\n.context-panel-holder > :global(.bp5-card)\n padding: 10px\n background-color: var(--panel-background-color)\n\n.panel-card\n padding: 10px\n background-color: var(--panel-background-color)\n overflow: hidden\n border-radius: var(--map-panel-border-radius)\n\n & > :last-child\n margin-bottom: 0\n\n:global(.bp5-dark) .panel-card\n background-color: var(--panel-background-color)\n\n.context-stack\n & > div\n flex-shrink: 1\n\n & > .searchbar\n flex: 0\n\n.context-stack,\n.detail-stack\n z-index: 10\n max-height: 100%\n\n.panel-container\n display: flex\n flex-direction: column\n\n & > div\n pointer-events: all\n\n.panel-title\n font-size: 16px\n\n.spacer\n flex-grow: 1\n pointer-events: none\n\n.map-view-container\n flex-grow: 1\n position: relative\n overflow: hidden\n\n.searchbar-holder\n margin-bottom: 0.5em\n\n.right-panel\n width: 24em\n\n.buttons\n display: flex\n flex-direction: row\n flex: 1\n min-width: 0\n\n.tab-button\n flex-shrink: 1\n min-width: 40px\n overflow: hidden\n text-align: right\n\n & :global(.bp5-button-text)\n transition: all 0.2s\n transition-delay: 0.1s\n\n .menu-card.narrow-card .panel-header:not(.minimal) &:global(.bp5-active) ~ & :global(.bp5-button-text)\n width: 0\n opacity: 0\n margin-left: -7px\n\n .context-panel-leave .menu-card .panel-header & :global(.bp5-button-text)\n opacity: 0\n width: 0\n\n.narrow-card.narrow-enter .panel-header .buttons\n margin-right: -500px\n\n.panel-header.minimal .tab-button:not(:hover):not(:global(.bp5-active))\n padding-left: 0\n padding-right: 0\n min-width: 30px\n width: 30px\n\n.panel-header.minimal .tab-button:not(:hover) :global(.bp5-button-text)\n width: 0\n opacity: 0\n margin-left: -7px\n\n.menu-group\n margin-bottom: 0.5em\n margin-top: 0.2em\n\n.menu-card :global .bp5-text ul,\n.menu-card :global .text-panel ul\n padding-left: 1em\n\n.menu-content\n display: flex\n flex-direction: column\n margin-bottom: -8px\n\n & .bp5-button-group\n margin-bottom: 4px\n\n & hr\n width: 100%\n\n:global\n .mapbox-map\n .mapbox-compass, .mapbox-3d\n display: none\n\n .mapboxgl-ctrl.mapbox-3d.mapbox-control\n width: unset\n\n .mapboxgl-ctrl.mapbox-3d.mapbox-control button\n width: unset\n padding-inline: 4px\n\n .mapboxgl-canvas-container\n width: 100%\n height: 100%\n\n .mapboxgl-ctrl.mapboxgl-ctrl-attrib\n background-color: var(--translucent-panel-background-color) !important\n\n .mapboxgl-ctrl.mapboxgl-ctrl-attrib a\n color: var(--text-color)\n\n .mapboxgl-marker svg path\n fill: var(--panel-background-color) !important\n\n .mapboxgl-marker svg circle\n fill: var(--secondary-color) !important\n\n .mapbox-control.mapbox-zoom\n background: var(--translucent-panel-background-inner)\n\n .mapbox-control.mapbox-zoom svg\n fill: var(--text-color) !important\n\n .mapboxgl-ctrl-logo\n transform: scale(0.9) translate(-8px, 2px)\n\n .bp5-dark\n .mapboxgl-ctrl-group\n background-color: var(--panel-background-color)\n\n .mapboxgl-ctrl-logo\n filter: invert(100%)\n\n .mapboxgl-ctrl-group button + button\n border-top: 1px solid var(--panel-rule-color) !important\n\n .bp5-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon\n filter: invert(40%)\n\n .bp5-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon:hover\n filter: invert(50%)\n\n .mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon\n filter: invert(40%)\n\n .mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon:hover\n filter: invert(50%)\n\n.detail-stack\n position: relative\n\n.detail-panel-container, .map-right-controls\n flex: 1\n\n\n.zoom-control\n transition: opacity 1s ease-in-out\n width: 30px\n position: absolute\n top: 0\n right: 0\n\n.map-controls\n display: flex\n flex-direction: row\n justify-content: right\n margin-bottom: 0\n gap: 0.5em\n\n :global(.map-control)\n & > :global(.bp5-button)\n padding: 0\n transform: translate(-3.5px, -3.5px)\n width: 22px !important\n\n\n.map-controls :global(.mapbox-control),\n.map-controls :global(.map-control-wrapper),\n.map-controls :global(.map-control)\n max-height: 22px\n height: 22px\n border-radius: 4px\n background-color: var(--panel-background-color)\n box-shadow: 0 0 0 1px var(--card-shadow-color)\n\n.map-controls :global(.mapbox-control) button,\n.map-controls :global(.map-control-wrapper) button,\n.map-controls :global(.map-control) button\n max-height: 22px\n height: 22px\n width: 22px\n max-width: 22px\n background-position: center center\n padding: 0\n//background-color: var(--panel-background-color)\n//color: var(--text-color)\n\n//.map-controls :global(.mapbox-control) button:hover,\n//.map-controls :global(.map-control-wrapper) button:hover,\n//.map-controls .map-control button:hover\n// background-color: var(--panel-background-color) !important\n\n.map-controls .map-scale-control\n background: none\n box-shadow: none\n padding-top: 8px\n\n :global(.mapboxgl-ctrl-scale)\n background-color: var(--translucent-panel-background-color)\n border-color: var(--secondary-text-color)\n color: var(--secondary-text-color)\n\n// .map-container.detail-panel-fixed\n// right: 30em\n\n/* For mobile phones, we want to make the most of screen space,\n which in some cases means adding complications to the basic page. */\n@media only screen and (max-width: 768px)\n .map-container.detail-panel-enter .context-stack\n height: 0\n visibility: hidden\n transition: height 0.5s ease-in-out\n\n .detail-stack\n height: fit-content\n position: inherit\n max-height: 70%\n\n .infodrawer-stack\n max-height: 70%\n\n &:global(.exit-active)\n max-height: 0\n\n :global(.mapbox-control.mapbox-zoom)\n display: none\n\n .map-controls\n position: absolute\n top: -60px\n right: 10px\n\n .detail-panel\n border-radius: 0px\n\n\n/* Desktop styling is necessarily much more complicated than mobile\n to handle a two-column layout. */\n@media screen and (min-width: 768px)\n /* Make map fill page rather than containing div,\n by unsetting map position */\n // We should move this to another file.\n .map-view-container\n position: unset\n\n\n .map-ui\n flex-direction: row\n padding: 1em 1em 2em\n min-height: 80px\n gap: 0.5em\n\n .context-stack\n max-width: var(--map-context-stack-max-width, 34em)\n min-width: 14em\n transition: width 300ms ease\n padding-bottom: 0.5em\n width: var(--map-context-stack-width, 16em)\n margin-right: 0.5em\n display: flex\n flex-direction: column\n\n\n &.adaptive-width\n width: var(--map-context-stack-width, none)\n max-width: var(--map-context-stack-max-width, none)\n transition: width 300ms ease\n\n :global(.bp5-navbar)\n //height: unset\n //padding: 5px\n h1, h2, h3\n margin: 0\n\n & > .spacer\n flex-grow: 0\n\n .context-panel-holder\n min-height: 0\n position: relative\n\n & > div\n max-height: 100%\n\n .detail-stack\n width: var(--map-detail-stack-width, 30em)\n display: flex\n flex-direction: column\n\n .context-stack, .detail-stack\n pointer-events: none\n z-index: 10\n\n & > div\n pointer-events: all\n margin-bottom: 0.5em\n\n &:last-child\n margin-bottom: 0\n\n &.spacer\n pointer-events: none\n\n .context-stack .spacer\n min-height: 1em\n\n /* Make map fill page rather than containing div,\n by unsetting map position */\n .map-view-container\n position: unset\n\n/** CSS Transitions **/\n\n.map-container\n // Context panel\n .context-panel-holder\n pointer-events: none\n flex: 1\n\n & > div\n pointer-events: all\n transition: opacity 0.8s ease\n //, height 0.8s ease, max-height 0.8s ease, padding 0.8s ease\n\n &.context-panel-from .context-panel-holder > div\n opacity: 0\n\n &.context-panel-enter .context-panel-holder > div\n opacity: 1\n\n &.context-panel-leave .context-panel-holder > div\n opacity: 0\n\n // Detail panel (floating)\n &.detail-panel-floating\n // We assume that the relevant panel is the first child of the stack.\n &.detail-panel-from .detail-panel-holder\n opacity: 0\n\n &.detail-panel-enter .detail-panel-holder\n opacity: 1\n\n &.detail-panel-leave .detail-panel-holder\n opacity: 0\n\n .detail-panel\n transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease\n\n // TODO: these styles have not been evaluated for mobile\n &.detail-panel-fixed\n .map-ui\n transition: margin-right 0.8s ease\n\n .detail-stack\n transition: margin-right 0.8s ease\n\n &.detail-panel-from .detail-panel-holder\n margin-right: calc(-1 * var(--map-detail-stack-width, 30em))\n\n &.detail-panel-enter .detail-panel-holder\n margin-right: 0\n\n &.detail-panel-leave .detail-panel-holder\n margin-right: calc(-1 * var(--map-detail-stack-width, 30em))\n\n\n// The max-height transition is a bit jerky because of panel padding.\n// We could probably fix this by pulling the panel container itself into\n// the class.\n//max-height: 0\n//padding: 0i\n\n@media only screen and (max-width: 768px)\n .map-container .detail-stack\n transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease\n\n .map-container.detail-panel-from .detail-stack\n max-height: 0\n height: 0\n\n .map-container.detail-panel-leave .detail-stack\n max-height: 0\n\n .map-container.context-panel-from .context-panel\n max-height: 0\n height: 0\n\n .map-container.context-panel-leave\n .context-stack\n .context-panel-holder\n flex: 0\n\n .spacer\n flex: 1\n\n\n// Shift UI around to center elements if we're in the global view\n@media only screen and (min-width: 768px)\n .map-container.detail-panel-leave .map-view-container\n margin-right: -14em\n\n .map-container.map-is-global.detail-panel-leave .map-view-container\n margin-right: -30em\n\n .map-container.map-is-global.context-panel-leave .map-view-container\n margin-left: -16em\n"],"names":[],"version":3,"file":"main.module.89f269c7.css.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ .VPa3-W_copy-link-button.bp5-minimal.bp5-button{color:var(--text-subtle-color)}.VPa3-W_copy-link-button.bp5-minimal.bp5-button svg{fill:var(--text-subtle-color)}.VPa3-W_location-panel-header{align-items:center;gap:var(--panel-header-gap,.5rem);min-height:var(--panel-header-height,40px);border-bottom:1px solid var(--panel-rule-color);flex-direction:row;padding:5px;display:flex}.VPa3-W_location-panel-header.VPa3-W_fixed-height{height:var(--panel-header-height,40px)}.VPa3-W_location-panel-header .VPa3-W_spacer{margin-right:calc(-1*var(--panel-header-gap,.5rem));flex-grow:1}.VPa3-W_location-panel-header .VPa3-W_left-icon{padding:7px}.VPa3-W_location-panel-header .VPa3-W_position-controls .bp5-button{font-size:12px!important}.VPa3-W_location-panel-header h1,.VPa3-W_location-panel-header h2,.VPa3-W_location-panel-header h3,.VPa3-W_location-panel-header h4,.VPa3-W_location-panel-header h5,.VPa3-W_location-panel-header h6,.VPa3-W_location-panel-header p{text-overflow:ellipsis;margin:0;font-size:16px;overflow:hidden}.VPa3-W_location-panel-header h1:first-child,.VPa3-W_location-panel-header h2:first-child,.VPa3-W_location-panel-header h3:first-child,.VPa3-W_location-panel-header h4:first-child,.VPa3-W_location-panel-header h5:first-child,.VPa3-W_location-panel-header h6:first-child,.VPa3-W_location-panel-header p:first-child{margin-left:10px}.VPa3-W_infodrawer-header-item{font-size:12px}.VPa3-W_infodrawer-header-item .secondary{color:var(--text-subtle-color);font-size:.9em}.VPa3-W_infodrawer{pointer-events:all;background-color:var(--panel-background-color);flex-direction:column;max-width:100%;height:fit-content;max-height:100%;display:flex;overflow-y:hidden}.VPa3-W_infodrawer.bp5-card{background-color:var(--panel-background-color);padding:0}.VPa3-W_infodrawer.VPa3-W_loading .VPa3-W_infodrawer-body{min-height:70px;overflow-y:hidden}.VPa3-W_infodrawer-contents{padding:0 1em}.VPa3-W_infodrawer-contents>:first-child{margin-top:1rem}.VPa3-W_infodrawer-contents>:last-child{margin-bottom:1rem}.VPa3-W_infodrawer-body{flex-shrink:1;min-height:0;transition:min-height .5s;position:relative;overflow-y:scroll}@media screen and (width<=768px){.VPa3-W_infodrawer{border-radius:var(--panel-border-radius,0px)}}
2
+ /*# sourceMappingURL=main.module.ba3f4a78.css.map */
@@ -0,0 +1 @@
1
+ {"mappings":"ACAA,+EAGE,kFAGF,0NAQE,yFAGA,6GAKA,4DAGA,6FAIA,qSAKE,2UAGJ,8CAGE,wFAIF,4LAUE,qFAME,4FAKJ,0CAEE,yDAEA,2DAIF,iHAQA,iCACE","sources":["main.module.ba3f4a78.css","packages/map-interface/src/location-panel/main.module.sass"],"sourcesContent":[".VPa3-W_copy-link-button.bp5-minimal.bp5-button {\n color: var(--text-subtle-color);\n}\n\n.VPa3-W_copy-link-button.bp5-minimal.bp5-button svg {\n fill: var(--text-subtle-color);\n}\n\n.VPa3-W_location-panel-header {\n align-items: center;\n gap: var(--panel-header-gap, .5rem);\n min-height: var(--panel-header-height, 40px);\n border-bottom: 1px solid var(--panel-rule-color);\n flex-direction: row;\n padding: 5px;\n display: flex;\n}\n\n.VPa3-W_location-panel-header.VPa3-W_fixed-height {\n height: var(--panel-header-height, 40px);\n}\n\n.VPa3-W_location-panel-header .VPa3-W_spacer {\n margin-right: calc(-1 * var(--panel-header-gap, .5rem));\n flex-grow: 1;\n}\n\n.VPa3-W_location-panel-header .VPa3-W_left-icon {\n padding: 7px;\n}\n\n.VPa3-W_location-panel-header .VPa3-W_position-controls .bp5-button {\n font-size: 12px !important;\n}\n\n.VPa3-W_location-panel-header h1, .VPa3-W_location-panel-header h2, .VPa3-W_location-panel-header h3, .VPa3-W_location-panel-header h4, .VPa3-W_location-panel-header h5, .VPa3-W_location-panel-header h6, .VPa3-W_location-panel-header p {\n text-overflow: ellipsis;\n margin: 0;\n font-size: 16px;\n overflow: hidden;\n}\n\n.VPa3-W_location-panel-header h1:first-child, .VPa3-W_location-panel-header h2:first-child, .VPa3-W_location-panel-header h3:first-child, .VPa3-W_location-panel-header h4:first-child, .VPa3-W_location-panel-header h5:first-child, .VPa3-W_location-panel-header h6:first-child, .VPa3-W_location-panel-header p:first-child {\n margin-left: 10px;\n}\n\n.VPa3-W_infodrawer-header-item {\n font-size: 12px;\n}\n\n.VPa3-W_infodrawer-header-item .secondary {\n color: var(--text-subtle-color);\n font-size: .9em;\n}\n\n.VPa3-W_infodrawer {\n pointer-events: all;\n background-color: var(--panel-background-color);\n flex-direction: column;\n max-width: 100%;\n height: fit-content;\n max-height: 100%;\n display: flex;\n overflow-y: hidden;\n}\n\n.VPa3-W_infodrawer.bp5-card {\n background-color: var(--panel-background-color);\n padding: 0;\n}\n\n.VPa3-W_infodrawer.VPa3-W_loading .VPa3-W_infodrawer-body {\n min-height: 70px;\n overflow-y: hidden;\n}\n\n.VPa3-W_infodrawer-contents {\n padding: 0 1em;\n}\n\n.VPa3-W_infodrawer-contents > :first-child {\n margin-top: 1rem;\n}\n\n.VPa3-W_infodrawer-contents > :last-child {\n margin-bottom: 1rem;\n}\n\n.VPa3-W_infodrawer-body {\n flex-shrink: 1;\n min-height: 0;\n transition: min-height .5s;\n position: relative;\n overflow-y: scroll;\n}\n\n@media screen and (width <= 768px) {\n .VPa3-W_infodrawer {\n border-radius: var(--panel-border-radius, 0px);\n }\n}\n/*# sourceMappingURL=main.module.ba3f4a78.css.map */\n",".copy-link-button:global(.bp5-minimal.bp5-button)\n color: var(--text-subtle-color)\n\n svg\n fill: var(--text-subtle-color)\n\n.location-panel-header\n padding: 5px\n display: flex\n flex-direction: row\n align-items: center\n gap: var(--panel-header-gap, 0.5rem)\n min-height: var(--panel-header-height, 40px)\n border-bottom: 1px solid var(--panel-rule-color)\n &.fixed-height\n height: var(--panel-header-height, 40px)\n\n .spacer\n flex-grow: 1\n // Ensure the spacer is not extra wide\n margin-right: calc(-1 * var(--panel-header-gap, 0.5rem))\n\n .left-icon\n padding: 7px\n\n .position-controls :global(.bp5-button)\n font-size: 12px !important\n\n // Text elements should\n h1, h2, h3, h4, h5, h6, p\n margin: 0\n font-size: 16px\n overflow: hidden\n text-overflow: ellipsis\n &:first-child\n margin-left: 10px\n\n.infodrawer-header-item\n font-size: 12px\n\n :global(.secondary)\n font-size: 0.9em\n color: var(--text-subtle-color)\n\n.infodrawer\n pointer-events: all\n max-height: 100%\n max-width: 100%\n height: fit-content\n display: flex\n flex-direction: column\n overflow-y: hidden\n background-color: var(--panel-background-color)\n\n &:global(.bp5-card)\n padding: 0\n background-color: var(--panel-background-color)\n\n\n &.loading\n .infodrawer-body\n overflow-y: hidden\n min-height: 70px\n\n\n.infodrawer-contents\n padding: 0 1em\n &>:first-child\n margin-top: 1rem\n &>:last-child\n margin-bottom: 1rem\n\n// The scrollable body of the infodrawer\n.infodrawer-body\n flex-shrink: 1\n min-height: 0\n transition: min-height 0.5s ease\n overflow-y: scroll\n position: relative\n\n// TODO: remove this when we have a better way to handle card media queries\n@media screen and (max-width: 768px)\n .infodrawer\n border-radius: var(--panel-border-radius, 0px)\n"],"names":[],"version":3,"file":"main.module.ba3f4a78.css.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ var e,r,o,a,s,t;function n(e,r,o,a){Object.defineProperty(e,r,{get:o,set:a,enumerable:!0,configurable:!0})}n(module.exports,"loading-button",()=>e,r=>e=r),n(module.exports,"navbar",()=>r,e=>r=e),n(module.exports,"navbar-holder",()=>o,e=>o=e),n(module.exports,"searchbar",()=>a,e=>a=e),n(module.exports,"searchbar-holder",()=>s,e=>s=e),n(module.exports,"status-tongue",()=>t,e=>t=e),e="_8hZKsW_loading-button",r="_8hZKsW_navbar",o="_8hZKsW_navbar-holder",a="_8hZKsW_searchbar",s="_8hZKsW_searchbar-holder",t="_8hZKsW_status-tongue";
2
+ //# sourceMappingURL=main.module.e200d631.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"ICAA,EACA,EACA,EACA,EACA,EACA,E,S,E,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,E,O,O,C,iB,I,E,A,G,E,G,E,O,O,C,S,I,E,A,G,E,G,E,O,O,C,gB,I,E,A,G,E,G,E,O,O,C,Y,I,E,A,G,E,G,E,O,O,C,mB,I,E,A,G,E,G,E,O,O,C,gB,I,E,A,G,E,GALA,EAAmC,yBACnC,EAA2B,iBAC3B,EAAkC,wBAClC,EAA8B,oBAC9B,EAAqC,2BACrC,EAAkC","sources":["<anon>","packages/map-interface/src/context-panel/main.module.sass"],"sourcesContent":["\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n$parcel$export(module.exports, \"loading-button\", () => $4152e38d80d28cfa$export$fcaa8d3bc8e9cf1e, (v) => $4152e38d80d28cfa$export$fcaa8d3bc8e9cf1e = v);\n$parcel$export(module.exports, \"navbar\", () => $4152e38d80d28cfa$export$58733aaf927c3bbe, (v) => $4152e38d80d28cfa$export$58733aaf927c3bbe = v);\n$parcel$export(module.exports, \"navbar-holder\", () => $4152e38d80d28cfa$export$d8779dd86528d602, (v) => $4152e38d80d28cfa$export$d8779dd86528d602 = v);\n$parcel$export(module.exports, \"searchbar\", () => $4152e38d80d28cfa$export$2ac23befe9d406ee, (v) => $4152e38d80d28cfa$export$2ac23befe9d406ee = v);\n$parcel$export(module.exports, \"searchbar-holder\", () => $4152e38d80d28cfa$export$3a39e67bbbcbd4ae, (v) => $4152e38d80d28cfa$export$3a39e67bbbcbd4ae = v);\n$parcel$export(module.exports, \"status-tongue\", () => $4152e38d80d28cfa$export$764ade2d69041360, (v) => $4152e38d80d28cfa$export$764ade2d69041360 = v);\nvar $4152e38d80d28cfa$export$fcaa8d3bc8e9cf1e;\nvar $4152e38d80d28cfa$export$58733aaf927c3bbe;\nvar $4152e38d80d28cfa$export$d8779dd86528d602;\nvar $4152e38d80d28cfa$export$2ac23befe9d406ee;\nvar $4152e38d80d28cfa$export$3a39e67bbbcbd4ae;\nvar $4152e38d80d28cfa$export$764ade2d69041360;\n$4152e38d80d28cfa$export$fcaa8d3bc8e9cf1e = `_8hZKsW_loading-button`;\n$4152e38d80d28cfa$export$58733aaf927c3bbe = `_8hZKsW_navbar`;\n$4152e38d80d28cfa$export$d8779dd86528d602 = `_8hZKsW_navbar-holder`;\n$4152e38d80d28cfa$export$2ac23befe9d406ee = `_8hZKsW_searchbar`;\n$4152e38d80d28cfa$export$3a39e67bbbcbd4ae = `_8hZKsW_searchbar-holder`;\n$4152e38d80d28cfa$export$764ade2d69041360 = `_8hZKsW_status-tongue`;\n\n\n//# sourceMappingURL=main.module.e200d631.js.map\n",null],"names":["$4152e38d80d28cfa$export$fcaa8d3bc8e9cf1e","$4152e38d80d28cfa$export$58733aaf927c3bbe","$4152e38d80d28cfa$export$d8779dd86528d602","$4152e38d80d28cfa$export$2ac23befe9d406ee","$4152e38d80d28cfa$export$3a39e67bbbcbd4ae","$4152e38d80d28cfa$export$764ade2d69041360","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","module","exports"],"version":3,"file":"main.module.e200d631.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("./xray.bce11e7b.js"),require("./container.abd6f0d2.js"),require("./context-panel.7c2f42c9.js"),require("./helpers.6bda171f.js"),require("./location-panel.c39983e3.js"),require("./map-view.c6746dca.js"),require("./main.module.434acaf9.js"),require("./main.module.29a15f3d.css"),require("./tile-extent.28db5d2c.js"),require("./vector-tile-features.b5a23b71.js"),require("@blueprintjs/core");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("@macrostrat/ui-components"),require("mapbox-gl"),require("react");var i=globalThis,t={},a={},_=i.parcelRequire94c2;null==_&&((_=function(e){if(e in t)return t[e].exports;if(e in a){var r=a[e];delete a[e];var i={id:e,exports:{}};return t[e]=i,r.call(i.exports,i,i.exports),i.exports}var _=Error("Cannot find module '"+e+"'");throw _.code="MODULE_NOT_FOUND",_}).register=function(e,r){a[e]=r},i.parcelRequire94c2=_),_.register,new URL("xray.bce11e7b.js","file:"+__filename).toString(),_("lw3Ik"),_("d7LVS"),new URL("helpers.6bda171f.js","file:"+__filename).toString(),_("6t6Bb"),new URL("map-view.c6746dca.js","file:"+__filename).toString();var n={};n=new URL("main.module.434acaf9.js","file:"+__filename).toString(),new URL("tile-extent.28db5d2c.js","file:"+__filename).toString(),new URL("vector-tile-features.b5a23b71.js","file:"+__filename).toString(),r(e).styled(r(n));
2
+ //# sourceMappingURL=map-page.cb4c713e.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,uC,Q,4C,Q,gD,Q,0C,Q,iD,Q,2C,Q,8C,Q,+C,Q,8C,Q,uD,Q,qB,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,6B,Q,a,Q,S,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,CEAiB,IAAA,IAAoB,oCAAA,QAAA,YAAqC,QAAQ,G,E,S,E,SCAjE,IAAA,IAAoB,uCAAA,QAAA,YAAwC,QAAQ,G,E,SCApE,IAAA,IAAoB,wCAAA,QAAA,YAAyC,QAAQ,G,I,E,C,ECAtF,EAAiB,IAAA,IAAoB,2CAAA,QAAA,YAA4C,QAAQ,GCAxE,IAAA,IAAoB,2CAAA,QAAA,YAA4C,QAAQ,GCAxE,IAAA,IAAoB,oDAAA,QAAA,YAAqD,QAAQ,GNqBjF,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/dev/map-page.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-a961be11262bcae8.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-41182315a502ff81.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-cc631282222aa35e.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-9c60d954890f9a97.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-335ad8f486a76563.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-06c74e0074b0dd5f.js"],"sourcesContent":["require(\"./xray.bce11e7b.js\");\nrequire(\"./container.abd6f0d2.js\");\nrequire(\"./context-panel.7c2f42c9.js\");\nrequire(\"./helpers.6bda171f.js\");\nrequire(\"./location-panel.c39983e3.js\");\nrequire(\"./map-view.c6746dca.js\");\nrequire(\"./main.module.434acaf9.js\");\nrequire(\"./main.module.29a15f3d.css\");\nrequire(\"./tile-extent.28db5d2c.js\");\nrequire(\"./vector-tile-features.b5a23b71.js\");\nvar $8RvAA$blueprintjscore = require(\"@blueprintjs/core\");\nvar $8RvAA$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $8RvAA$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $8RvAA$mapboxgl = require(\"mapbox-gl\");\nvar $8RvAA$react = require(\"react\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n// Import other components\n\n\n\n\n\nvar $5d4b13314cc5f40a$exports = {};\n$5d4b13314cc5f40a$exports = new URL(\"xray.bce11e7b.js\", \"file:\" + __filename).toString();\n\n\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\nvar $bc8852ff0f65ac49$exports = {};\n$bc8852ff0f65ac49$exports = new URL(\"helpers.6bda171f.js\", \"file:\" + __filename).toString();\n\n\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\nvar $ae364d0ef73620ae$exports = {};\n$ae364d0ef73620ae$exports = new URL(\"map-view.c6746dca.js\", \"file:\" + __filename).toString();\n\n\nvar $406e8a286e0e74e0$exports = {};\n$406e8a286e0e74e0$exports = new URL(\"main.module.434acaf9.js\", \"file:\" + __filename).toString();\n\n\nvar $245830e409df02af$exports = {};\n$245830e409df02af$exports = new URL(\"tile-extent.28db5d2c.js\", \"file:\" + __filename).toString();\n\n\nvar $7bbdc1ecf93d3670$exports = {};\n$7bbdc1ecf93d3670$exports = new URL(\"vector-tile-features.b5a23b71.js\", \"file:\" + __filename).toString();\n\n\nconst $0bad82db04876d25$export$dda1d9f60106f0e9 = (0, ($parcel$interopDefault($8RvAA$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($406e8a286e0e74e0$exports))));\nfunction $0bad82db04876d25$export$eab3034e57b46e26({ title: title = \"Map inspector\", headerElement: headerElement = null, transformRequest: transformRequest = null, mapPosition: mapPosition = null, mapboxToken: mapboxToken = null, overlayStyle: overlayStyle = null, controls: controls = null, children: children = null, style: style, bounds: bounds = null, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null, fitViewport: fitViewport = true, styleType: styleType = \"macrostrat\" }) {\n /* We apply a custom style to the panel container when we are interacting\n with the search bar, so that we can block map interactions until search\n bar focus is lost.\n We also apply a custom style when the infodrawer is open so we can hide\n the search bar on mobile platforms\n */ const dark = (0, $8RvAA$macrostratuicomponents.useDarkMode)();\n const isEnabled = dark?.isEnabled;\n if (mapboxToken != null) (0, ($parcel$interopDefault($8RvAA$mapboxgl))).accessToken = mapboxToken;\n if (styleType == \"macrostrat\") style ?? (style = isEnabled ? \"mapbox://styles/jczaplewski/cl5uoqzzq003614o6url9ou9z?optimize=true\" : \"mapbox://styles/jczaplewski/clatdbkw4002q14lov8zx0bm0?optimize=true\");\n else style ?? (style = isEnabled ? \"mapbox://styles/mapbox/dark-v10\" : \"mapbox://styles/mapbox/light-v10\");\n const [isOpen, setOpen] = (0, $8RvAA$react.useState)(false);\n const [state, setState] = (0, $8RvAA$macrostratuicomponents.useStoredState)(\"macrostrat:dev-map-page\", {\n showTileExtent: false,\n xRay: false\n });\n const { showTileExtent: showTileExtent, xRay: xRay } = state;\n const [actualStyle, setActualStyle] = (0, $8RvAA$react.useState)(null);\n (0, $8RvAA$react.useEffect)(()=>{\n (0, $5d4b13314cc5f40a$exports.buildInspectorStyle)(style, overlayStyle, {\n mapboxToken: mapboxToken,\n inDarkMode: isEnabled,\n xRay: xRay\n }).then(setActualStyle);\n }, [\n style,\n xRay,\n mapboxToken,\n isEnabled,\n overlayStyle\n ]);\n const [inspectPosition, setInspectPosition] = (0, $8RvAA$react.useState)(null);\n const [data, setData] = (0, $8RvAA$react.useState)(null);\n const onSelectPosition = (0, $8RvAA$react.useCallback)((position)=>{\n setInspectPosition(position);\n }, []);\n let detailElement = null;\n if (inspectPosition != null) detailElement = $0bad82db04876d25$export$dda1d9f60106f0e9((0, $6t6Bb.LocationPanel), {\n onClose () {\n setInspectPosition(null);\n },\n position: inspectPosition\n }, [\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $7bbdc1ecf93d3670$exports.TileInfo), {\n feature: data?.[0] ?? null,\n showExtent: showTileExtent,\n setShowExtent () {\n setState({\n ...state,\n showTileExtent: !showTileExtent\n });\n }\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $7bbdc1ecf93d3670$exports.FeaturePanel), {\n features: data,\n focusedSource: focusedSource,\n focusedSourceTitle: focusedSourceTitle\n })\n ]);\n let tile = null;\n if (showTileExtent && data?.[0] != null) {\n let f = data[0];\n tile = {\n x: f._x,\n y: f._y,\n z: f._z\n };\n }\n return $0bad82db04876d25$export$dda1d9f60106f0e9((0, $lw3Ik.MapAreaContainer), {\n navbar: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $d7LVS.FloatingNavbar), {\n rightElement: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $d7LVS.MapLoadingButton), {\n large: true,\n active: isOpen,\n onClick: ()=>setOpen(!isOpen),\n style: {\n marginRight: \"-5px\"\n }\n }),\n headerElement: headerElement,\n title: title\n }),\n contextPanel: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $lw3Ik.PanelCard), [\n controls,\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $8RvAA$blueprintjscore.Switch), {\n checked: xRay,\n label: \"X-ray mode\",\n onChange () {\n setState({\n ...state,\n xRay: !xRay\n });\n }\n })\n ]),\n detailPanel: detailElement,\n contextPanelOpen: isOpen,\n fitViewport: fitViewport\n }, $0bad82db04876d25$export$dda1d9f60106f0e9((0, $ae364d0ef73620ae$exports.MapView), {\n style: actualStyle,\n transformRequest: transformRequest,\n mapPosition: mapPosition,\n projection: {\n name: \"globe\"\n },\n mapboxToken: mapboxToken,\n bounds: bounds\n }, [\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $7bbdc1ecf93d3670$exports.FeatureSelectionHandler), {\n selectedLocation: inspectPosition,\n setFeatures: setData\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $bc8852ff0f65ac49$exports.MapMarker), {\n position: inspectPosition,\n setPosition: onSelectPosition\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $245830e409df02af$exports.TileExtentLayer), {\n tile: tile,\n color: isEnabled ? \"white\" : \"black\"\n }),\n children\n ]));\n}\nfunction $0bad82db04876d25$var$MapInspector(props) {\n const { children: children, controls: controls, ...rest } = props;\n /** Compatibility wrapper for MapInspectorV2 */ // React warning about this legacy usage\n console.warn(\"MapInspector is deprecated. Use MapInspectorV2 instead\");\n return $0bad82db04876d25$export$dda1d9f60106f0e9($0bad82db04876d25$export$eab3034e57b46e26, {\n ...rest,\n controls: [\n children,\n controls\n ]\n });\n}\nconst $0bad82db04876d25$export$2391061fbdfb71ef = $0bad82db04876d25$var$MapInspector;\n\n\n//# sourceMappingURL=map-page.cb4c713e.js.map\n","// Import other components\nimport { Switch } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport { Spacer, useDarkMode, useStoredState } from \"@macrostrat/ui-components\";\nimport mapboxgl from \"mapbox-gl\";\nimport { useCallback, useState, useEffect } from \"react\";\nimport { buildInspectorStyle } from \"./xray\";\nimport { MapAreaContainer, PanelCard } from \"../container\";\nimport { FloatingNavbar, MapLoadingButton } from \"../context-panel\";\nimport { MapMarker } from \"../helpers\";\nimport { LocationPanel } from \"../location-panel\";\nimport { MapView } from \"../map-view\";\nimport styles from \"./main.module.sass\";\nimport { TileExtentLayer } from \"./tile-extent\";\nimport {\n FeaturePanel,\n FeatureSelectionHandler,\n TileInfo,\n} from \"./vector-tile-features\";\nimport { MapPosition } from \"@macrostrat/mapbox-utils\";\n\nexport const h = hyper.styled(styles);\n\nexport function MapInspectorV2({\n title = \"Map inspector\",\n headerElement = null,\n transformRequest = null,\n mapPosition = null,\n mapboxToken = null,\n overlayStyle = null,\n controls = null,\n children = null,\n style,\n bounds = null,\n focusedSource = null,\n focusedSourceTitle = null,\n fitViewport = true,\n styleType = \"macrostrat\",\n}: {\n headerElement?: React.ReactNode;\n transformRequest?: mapboxgl.TransformRequestFunction;\n title?: string;\n style?: mapboxgl.Style | string;\n controls?: React.ReactNode;\n children?: React.ReactNode;\n mapboxToken?: string;\n overlayStyle?: mapboxgl.Style | string;\n focusedSource?: string;\n focusedSourceTitle?: string;\n projection?: string;\n mapPosition?: MapPosition;\n bounds?: [number, number, number, number];\n fitViewport?: boolean;\n styleType?: \"standard\" | \"macrostrat\";\n}) {\n /* We apply a custom style to the panel container when we are interacting\n with the search bar, so that we can block map interactions until search\n bar focus is lost.\n We also apply a custom style when the infodrawer is open so we can hide\n the search bar on mobile platforms\n */\n\n const dark = useDarkMode();\n const isEnabled = dark?.isEnabled;\n\n if (mapboxToken != null) {\n mapboxgl.accessToken = mapboxToken;\n }\n\n if (styleType == \"macrostrat\") {\n style ??= isEnabled\n ? \"mapbox://styles/jczaplewski/cl5uoqzzq003614o6url9ou9z?optimize=true\"\n : \"mapbox://styles/jczaplewski/clatdbkw4002q14lov8zx0bm0?optimize=true\";\n } else {\n style ??= isEnabled\n ? \"mapbox://styles/mapbox/dark-v10\"\n : \"mapbox://styles/mapbox/light-v10\";\n }\n\n const [isOpen, setOpen] = useState(false);\n\n const [state, setState] = useStoredState(\"macrostrat:dev-map-page\", {\n showTileExtent: false,\n xRay: false,\n });\n const { showTileExtent, xRay } = state;\n\n const [actualStyle, setActualStyle] = useState(null);\n\n useEffect(() => {\n buildInspectorStyle(style, overlayStyle, {\n mapboxToken,\n inDarkMode: isEnabled,\n xRay,\n }).then(setActualStyle);\n }, [style, xRay, mapboxToken, isEnabled, overlayStyle]);\n\n const [inspectPosition, setInspectPosition] =\n useState<mapboxgl.LngLat | null>(null);\n\n const [data, setData] = useState(null);\n\n const onSelectPosition = useCallback((position: mapboxgl.LngLat) => {\n setInspectPosition(position);\n }, []);\n\n let detailElement = null;\n if (inspectPosition != null) {\n detailElement = h(\n LocationPanel,\n {\n onClose() {\n setInspectPosition(null);\n },\n position: inspectPosition,\n },\n [\n h(TileInfo, {\n feature: data?.[0] ?? null,\n showExtent: showTileExtent,\n setShowExtent() {\n setState({ ...state, showTileExtent: !showTileExtent });\n },\n }),\n h(FeaturePanel, { features: data, focusedSource, focusedSourceTitle }),\n ]\n );\n }\n\n let tile = null;\n if (showTileExtent && data?.[0] != null) {\n let f = data[0];\n tile = { x: f._x, y: f._y, z: f._z };\n }\n\n return h(\n MapAreaContainer,\n {\n navbar: h(FloatingNavbar, {\n rightElement: h(MapLoadingButton, {\n large: true,\n active: isOpen,\n onClick: () => setOpen(!isOpen),\n style: {\n marginRight: \"-5px\",\n },\n }),\n headerElement,\n title,\n }),\n contextPanel: h(PanelCard, [\n controls,\n h(Switch, {\n checked: xRay,\n label: \"X-ray mode\",\n onChange() {\n setState({ ...state, xRay: !xRay });\n },\n }),\n ]),\n detailPanel: detailElement,\n contextPanelOpen: isOpen,\n fitViewport,\n },\n h(\n MapView,\n {\n style: actualStyle,\n transformRequest,\n mapPosition,\n projection: { name: \"globe\" },\n mapboxToken,\n bounds,\n },\n [\n h(FeatureSelectionHandler, {\n selectedLocation: inspectPosition,\n setFeatures: setData,\n }),\n h(MapMarker, {\n position: inspectPosition,\n setPosition: onSelectPosition,\n }),\n h(TileExtentLayer, { tile, color: isEnabled ? \"white\" : \"black\" }),\n children,\n ]\n )\n );\n}\n\nfunction MapInspector(props) {\n const { children, controls, ...rest } = props;\n /** Compatibility wrapper for MapInspectorV2 */\n // React warning about this legacy usage\n console.warn(\"MapInspector is deprecated. Use MapInspectorV2 instead\");\n\n return h(MapInspectorV2, {\n ...rest,\n controls: [children, controls],\n });\n}\n\n// Legacy export\nexport const DevMapPage = MapInspector;\n","module.exports = new __parcel__URL__(\"xray.bce11e7b.js\").toString();","module.exports = new __parcel__URL__(\"helpers.6bda171f.js\").toString();","module.exports = new __parcel__URL__(\"map-view.c6746dca.js\").toString();","module.exports = new __parcel__URL__(\"main.module.434acaf9.js\").toString();","module.exports = new __parcel__URL__(\"tile-extent.28db5d2c.js\").toString();","module.exports = new __parcel__URL__(\"vector-tile-features.b5a23b71.js\").toString();"],"names":["require","$8RvAA$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","URL","__filename","toString","$406e8a286e0e74e0$exports","styled"],"version":3,"file":"map-page.cb4c713e.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("./main.module.24615279.js"),require("./main.module.89f269c7.css"),require("./terrain.96ae432a.js"),require("./helpers.6bda171f.js"),require("./utils.dd92f725.js");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("@macrostrat/mapbox-react"),require("@macrostrat/mapbox-utils"),require("classnames"),require("mapbox-gl"),require("react"),require("mapbox-gl/dist/mapbox-gl.css");var i=globalThis,a={},t={},s=i.parcelRequire94c2;null==s&&((s=function(e){if(e in a)return a[e].exports;if(e in t){var r=t[e];delete t[e];var i={id:e,exports:{}};return a[e]=i,r.call(i.exports,i,i.exports),i.exports}var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(e,r){t[e]=r},i.parcelRequire94c2=s),s.register;var u=s("6ULxP");new URL("terrain.96ae432a.js","file:"+__filename).toString(),s("7CmOU"),s("R3my3"),r(e).styled(r(u));
2
+ //# sourceMappingURL=map-view.c6746dca.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,8C,Q,+C,Q,0C,Q,0C,Q,wC,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,4B,Q,4B,Q,c,Q,a,Q,S,Q,gC,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,SEAiB,IAAA,IAAoB,uCAAA,QAAA,YAAwC,QAAQ,G,E,S,E,SDyB3E,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/map-view/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-3d308760769ffbb1.js"],"sourcesContent":["require(\"./main.module.24615279.js\");\nrequire(\"./main.module.89f269c7.css\");\nrequire(\"./terrain.96ae432a.js\");\nrequire(\"./helpers.6bda171f.js\");\nrequire(\"./utils.dd92f725.js\");\nvar $guNmz$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $guNmz$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $guNmz$macrostratmapboxutils = require(\"@macrostrat/mapbox-utils\");\nvar $guNmz$classnames = require(\"classnames\");\nvar $guNmz$mapboxgl = require(\"mapbox-gl\");\nvar $guNmz$react = require(\"react\");\nrequire(\"mapbox-gl/dist/mapbox-gl.css\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\n\n\n\nvar $6ULxP = parcelRequire(\"6ULxP\");\nvar $70b40c0708e62eb4$exports = {};\n$70b40c0708e62eb4$exports = new URL(\"terrain.96ae432a.js\", \"file:\" + __filename).toString();\n\n\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\n\nvar $R3my3 = parcelRequire(\"R3my3\");\nconst $e7dd196c7fa8f651$var$h = (0, ($parcel$interopDefault($guNmz$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($6ULxP))));\nfunction $e7dd196c7fa8f651$var$defaultInitializeMap(container, args = {}) {\n const { mapPosition: mapPosition, ...rest } = args;\n console.log(\"Initializing map (default)\", args);\n const map = new (0, ($parcel$interopDefault($guNmz$mapboxgl))).Map({\n container: container,\n maxZoom: 18,\n //maxTileCacheSize: 0,\n logoPosition: \"bottom-left\",\n trackResize: true,\n antialias: true,\n optimizeForTerrain: true,\n ...rest\n });\n // set initial map position\n if (mapPosition != null) (0, $guNmz$macrostratmapboxutils.setMapPosition)(map, mapPosition);\n //setMapPosition(map, mapPosition);\n return map;\n}\nconst $e7dd196c7fa8f651$var$defaultMapPosition = {\n camera: {\n lat: 34,\n lng: -120,\n altitude: 300000\n }\n};\nfunction $e7dd196c7fa8f651$export$ab1e7a67d6ec5ad8(props) {\n let { terrainSourceID: terrainSourceID } = props;\n const { enableTerrain: enableTerrain = true, style: style, mapPosition: mapPosition = $e7dd196c7fa8f651$var$defaultMapPosition, initializeMap: initializeMap = $e7dd196c7fa8f651$var$defaultInitializeMap, children: children, mapboxToken: mapboxToken, accessToken: // Deprecated\n accessToken, infoMarkerPosition: infoMarkerPosition, transformRequest: transformRequest, projection: projection, onMapLoaded: onMapLoaded = null, onStyleLoaded: onStyleLoaded = null, onMapMoved: onMapMoved = null, ...rest } = props;\n if (enableTerrain) terrainSourceID ?? (terrainSourceID = \"mapbox-3d-dem\");\n const _mapboxToken = mapboxToken ?? accessToken;\n if (_mapboxToken != null) (0, ($parcel$interopDefault($guNmz$mapboxgl))).accessToken = _mapboxToken;\n const dispatch = (0, $guNmz$macrostratmapboxreact.useMapDispatch)();\n let mapRef = (0, $guNmz$macrostratmapboxreact.useMapRef)();\n const ref = (0, $guNmz$react.useRef)();\n const parentRef = (0, $guNmz$react.useRef)();\n (0, $guNmz$react.useEffect)(()=>{\n if (style == null) return;\n let map = mapRef.current;\n if (map != null) {\n console.log(\"Setting style\", style);\n map.setStyle(style);\n } else {\n console.log(\"Initializing map\", style);\n const map = initializeMap(ref.current, {\n style: style,\n projection: projection,\n mapPosition: mapPosition,\n transformRequest: transformRequest,\n ...rest\n });\n dispatch({\n type: \"set-map\",\n payload: map\n });\n map.setPadding((0, $R3my3.getMapPadding)(ref, parentRef), {\n animate: false\n });\n onMapLoaded?.(map);\n }\n const loadCallback = ()=>{\n onStyleLoaded?.(map);\n dispatch({\n type: \"set-style-loaded\",\n payload: true\n });\n };\n map = mapRef.current;\n if (map.isStyleLoaded()) // Catch a race condition where the style is loaded before the callback is set\n loadCallback();\n map.on(\"style.load\", loadCallback);\n return ()=>{\n map.off(\"style.load\", loadCallback);\n };\n }, [\n style\n ]);\n const _computedMapPosition = (0, $guNmz$macrostratmapboxreact.useMapPosition)();\n const { mapUse3D: mapUse3D, mapIsRotated: mapIsRotated } = (0, $guNmz$macrostratmapboxutils.mapViewInfo)(_computedMapPosition);\n // Get map projection\n const _projection = mapRef.current?.getProjection()?.name ?? \"mercator\";\n const className = (0, ($parcel$interopDefault($guNmz$classnames)))({\n \"is-rotated\": mapIsRotated ?? false,\n \"is-3d-available\": mapUse3D ?? false\n }, `${_projection}-projection`);\n return $e7dd196c7fa8f651$var$h(\"div.map-view-container.main-view\", {\n ref: parentRef\n }, [\n $e7dd196c7fa8f651$var$h(\"div.mapbox-map#map\", {\n ref: ref,\n className: className\n }),\n $e7dd196c7fa8f651$var$h((0, $7CmOU.MapLoadingReporter), {\n ignoredSources: [\n \"elevationMarker\",\n \"crossSectionEndpoints\"\n ]\n }),\n $e7dd196c7fa8f651$var$h((0, $7CmOU.MapMovedReporter), {\n onMapMoved: onMapMoved\n }),\n $e7dd196c7fa8f651$var$h((0, $7CmOU.MapResizeManager), {\n containerRef: ref\n }),\n $e7dd196c7fa8f651$var$h((0, $7CmOU.MapPaddingManager), {\n containerRef: ref,\n parentRef: parentRef,\n infoMarkerPosition: infoMarkerPosition\n }),\n $e7dd196c7fa8f651$var$h($e7dd196c7fa8f651$export$cee395a8a2a00b29, {\n mapUse3D: mapUse3D,\n terrainSourceID: terrainSourceID\n }),\n children\n ]);\n}\nfunction $e7dd196c7fa8f651$export$cee395a8a2a00b29({ mapUse3D: mapUse3D, terrainSourceID: terrainSourceID }) {\n const mapRef = (0, $guNmz$macrostratmapboxreact.useMapRef)();\n (0, $guNmz$react.useEffect)(()=>{\n const map = mapRef.current;\n if (map == null) return;\n (0, $70b40c0708e62eb4$exports.enable3DTerrain)(map, mapUse3D, terrainSourceID);\n }, [\n mapRef.current,\n mapUse3D\n ]);\n return null;\n}\n\n\n//# sourceMappingURL=map-view.c6746dca.js.map\n","import hyper from \"@macrostrat/hyper\";\nimport {\n useMapRef,\n useMapDispatch,\n useMapPosition,\n} from \"@macrostrat/mapbox-react\";\nimport {\n mapViewInfo,\n MapPosition,\n setMapPosition,\n} from \"@macrostrat/mapbox-utils\";\nimport classNames from \"classnames\";\nimport mapboxgl from \"mapbox-gl\";\nimport { useEffect, useRef, useCallback } from \"react\";\nimport styles from \"../main.module.sass\";\nimport { enable3DTerrain } from \"./terrain\";\nimport {\n MapLoadingReporter,\n MapMovedReporter,\n MapPaddingManager,\n MapResizeManager,\n} from \"../helpers\";\nimport \"mapbox-gl/dist/mapbox-gl.css\";\nimport { getMapPadding } from \"../utils\";\n\nconst h = hyper.styled(styles);\n\ntype MapboxCoreOptions = Omit<mapboxgl.MapboxOptions, \"container\">;\n\nexport interface MapViewProps extends MapboxCoreOptions {\n showLineSymbols?: boolean;\n children?: React.ReactNode;\n mapboxToken?: string;\n // Deprecated\n accessToken?: string;\n terrainSourceID?: string;\n enableTerrain?: boolean;\n infoMarkerPosition?: mapboxgl.LngLatLike;\n mapPosition?: MapPosition;\n initializeMap?: (\n container: HTMLElement,\n args: MapboxOptionsExt\n ) => mapboxgl.Map;\n onMapLoaded?: (map: mapboxgl.Map) => void;\n onStyleLoaded?: (map: mapboxgl.Map) => void;\n onMapMoved?: (mapPosition: MapPosition, map: mapboxgl.Map) => void;\n}\n\nexport interface MapboxOptionsExt extends MapboxCoreOptions {\n mapPosition?: MapPosition;\n}\n\nfunction defaultInitializeMap(container, args: MapboxOptionsExt = {}) {\n const { mapPosition, ...rest } = args;\n console.log(\"Initializing map (default)\", args);\n\n const map = new mapboxgl.Map({\n container,\n maxZoom: 18,\n //maxTileCacheSize: 0,\n logoPosition: \"bottom-left\",\n trackResize: true,\n antialias: true,\n optimizeForTerrain: true,\n ...rest,\n });\n\n // set initial map position\n if (mapPosition != null) {\n setMapPosition(map, mapPosition);\n }\n\n //setMapPosition(map, mapPosition);\n return map;\n}\n\nconst defaultMapPosition: MapPosition = {\n camera: {\n lat: 34,\n lng: -120,\n altitude: 300000,\n },\n};\n\nexport function MapView(props: MapViewProps) {\n let { terrainSourceID } = props;\n const {\n enableTerrain = true,\n style,\n mapPosition = defaultMapPosition,\n initializeMap = defaultInitializeMap,\n children,\n mapboxToken,\n // Deprecated\n accessToken,\n infoMarkerPosition,\n transformRequest,\n projection,\n onMapLoaded = null,\n onStyleLoaded = null,\n onMapMoved = null,\n ...rest\n } = props;\n if (enableTerrain) {\n terrainSourceID ??= \"mapbox-3d-dem\";\n }\n\n const _mapboxToken = mapboxToken ?? accessToken;\n\n if (_mapboxToken != null) {\n mapboxgl.accessToken = _mapboxToken;\n }\n\n const dispatch = useMapDispatch();\n let mapRef = useMapRef();\n const ref = useRef<HTMLDivElement>();\n const parentRef = useRef<HTMLDivElement>();\n\n useEffect(() => {\n if (style == null) return;\n let map = mapRef.current;\n if (map != null) {\n console.log(\"Setting style\", style);\n map.setStyle(style);\n } else {\n console.log(\"Initializing map\", style);\n const map = initializeMap(ref.current, {\n style,\n projection,\n mapPosition,\n transformRequest,\n ...rest,\n });\n dispatch({ type: \"set-map\", payload: map });\n map.setPadding(getMapPadding(ref, parentRef), { animate: false });\n onMapLoaded?.(map);\n }\n\n const loadCallback = () => {\n onStyleLoaded?.(map);\n dispatch({ type: \"set-style-loaded\", payload: true });\n };\n\n map = mapRef.current;\n if (map.isStyleLoaded()) {\n // Catch a race condition where the style is loaded before the callback is set\n loadCallback();\n }\n map.on(\"style.load\", loadCallback);\n return () => {\n map.off(\"style.load\", loadCallback);\n };\n }, [style]);\n\n const _computedMapPosition = useMapPosition();\n const { mapUse3D, mapIsRotated } = mapViewInfo(_computedMapPosition);\n\n // Get map projection\n const _projection = mapRef.current?.getProjection()?.name ?? \"mercator\";\n\n const className = classNames(\n {\n \"is-rotated\": mapIsRotated ?? false,\n \"is-3d-available\": mapUse3D ?? false,\n },\n `${_projection}-projection`\n );\n\n return h(\"div.map-view-container.main-view\", { ref: parentRef }, [\n h(\"div.mapbox-map#map\", { ref, className }),\n h(MapLoadingReporter, {\n ignoredSources: [\"elevationMarker\", \"crossSectionEndpoints\"],\n }),\n h(MapMovedReporter, { onMapMoved }),\n h(MapResizeManager, { containerRef: ref }),\n h(MapPaddingManager, { containerRef: ref, parentRef, infoMarkerPosition }),\n h(MapTerrainManager, { mapUse3D, terrainSourceID }),\n children,\n ]);\n}\n\nexport function MapTerrainManager({\n mapUse3D,\n terrainSourceID,\n}: {\n mapUse3D?: boolean;\n terrainSourceID?: string;\n}) {\n const mapRef = useMapRef();\n\n useEffect(() => {\n const map = mapRef.current;\n if (map == null) return;\n enable3DTerrain(map, mapUse3D, terrainSourceID);\n }, [mapRef.current, mapUse3D]);\n return null;\n}\n","module.exports = new __parcel__URL__(\"terrain.96ae432a.js\").toString();"],"names":["require","$guNmz$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$6ULxP","URL","__filename","toString","styled"],"version":3,"file":"map-view.c6746dca.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=terrain.96ae432a.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"","sources":["packages/map-interface/src/map-view/terrain.ts"],"sourcesContent":["// We should merge this with code in @macrostrat/mapbox-react/src/terrain.ts:\n\nexport function enable3DTerrain(\n map,\n shouldEnable: boolean,\n sourceID: string | null = null\n) {\n if (!map.style?._loaded) {\n map.once(\"style.load\", () => {\n enable3DTerrain(map, shouldEnable, sourceID);\n });\n return;\n }\n\n const currentTerrainSource = getTerrainSourceID(map);\n let demSourceID = sourceID ?? currentTerrainSource ?? \"mapbox-dem\";\n\n console.log(\"Enabling 3D terrain with source\", demSourceID);\n\n // Enable or disable terrain depending on our current desires...\n const currentTerrain = map.getTerrain();\n\n if (!shouldEnable) {\n if (currentTerrain != null) map.setTerrain(null);\n return;\n }\n if (currentTerrain != null) return;\n\n // Add a DEM source if one is not found already.\n if (map.getSource(demSourceID) == null) {\n map.addSource(demSourceID, {\n type: \"raster-dem\",\n url: \"mapbox://mapbox.mapbox-terrain-dem-v1\",\n tileSize: 512,\n maxzoom: 14,\n });\n }\n\n // add a sky layer that will show when the map is highly pitched\n if (map.getLayer(\"sky\") == null) {\n map.addLayer({\n id: \"sky\",\n type: \"sky\",\n paint: {\n \"sky-type\": \"atmosphere\",\n \"sky-atmosphere-sun\": [0.0, 0.0],\n \"sky-atmosphere-sun-intensity\": 15,\n },\n });\n }\n\n map.setTerrain({ source: demSourceID, exaggeration: 1 });\n console.log(map.getTerrain());\n}\n\nfunction getTerrainSourceID(map) {\n for (const [key, source] of Object.entries(map.getStyle().sources)) {\n if (source.type == \"raster-dem\") {\n return key;\n }\n }\n return null;\n}\n"],"names":[],"version":3,"file":"terrain.96ae432a.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("@macrostrat/mapbox-react"),require("@mapbox/tilebelt"),require("react");
2
+ //# sourceMappingURL=tile-extent.28db5d2c.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,4B,Q,oB,Q","sources":["<anon>","packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["var $8kl9w$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $8kl9w$mapboxtilebelt = require(\"@mapbox/tilebelt\");\nvar $8kl9w$react = require(\"react\");\n\n\n\n\nfunction $d89f06dba650370d$export$86c09739b12f23cd({ tile: tile, color: color = \"red\" }) {\n const styleCallback = (0, $8kl9w$react.useCallback)((map, val)=>{\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l)=>l.id != \"tile-extent\");\n if (val == null) return map.setStyle(style);\n const { x: x, y: y, z: z } = val;\n const extent = (0, $8kl9w$mapboxtilebelt.tileToGeoJSON)([\n x,\n y,\n z\n ]);\n const source = {\n type: \"geojson\",\n data: extent\n };\n const layer = {\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2\n }\n };\n style.sources[\"tile-extent\"] = source;\n style.layers.push(layer);\n map.setStyle(style);\n }, [\n color\n ]);\n const map = (0, $8kl9w$macrostratmapboxreact.useMapRef)();\n (0, $8kl9w$macrostratmapboxreact.useMapConditionalStyle)(map, tile, styleCallback);\n return null;\n}\n\n\n//# sourceMappingURL=tile-extent.28db5d2c.js.map\n","import { useMapConditionalStyle, useMapRef } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { useCallback } from \"react\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n const styleCallback = useCallback(\n (map, val: TileIndex) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (val == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = val;\n const extent = tileToGeoJSON([x, y, z]);\n const source = {\n type: \"geojson\",\n data: extent,\n };\n const layer = {\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n };\n style.sources[\"tile-extent\"] = source;\n style.layers.push(layer);\n map.setStyle(style);\n },\n [color]\n );\n const map = useMapRef();\n useMapConditionalStyle(map, tile, styleCallback);\n return null;\n}\n"],"names":["require"],"version":3,"file":"tile-extent.28db5d2c.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ var f=require("d3-format");(0,f.format)(".4~f"),(0,f.format)(".3~f"),(0,f.format)(".2~f"),(0,f.format)(".1~f"),(0,f.format)(".0f");
2
+ //# sourceMappingURL=utils.274d0452.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,I,E,Q,aCEoB,AAAA,CAAA,EAAA,EAAA,MAAK,AAAL,EAAO,QACP,AAAA,CAAA,EAAA,EAAA,MAAK,AAAL,EAAO,QACP,AAAA,CAAA,EAAA,EAAA,MAAK,AAAL,EAAO,QACP,AAAA,CAAA,EAAA,EAAA,MAAK,AAAL,EAAO,QACL,AAAA,CAAA,EAAA,EAAA,MAAK,AAAL,EAAO","sources":["<anon>","packages/map-interface/src/location-info/utils.ts"],"sourcesContent":["var $aQqjl$d3format = require(\"d3-format\");\n\n\nconst $eb373b7136880894$export$97c1b10e131a836d = (0, $aQqjl$d3format.format)(\".4~f\");\nconst $eb373b7136880894$export$b1cb0f7fb990b3ea = (0, $aQqjl$d3format.format)(\".3~f\");\nconst $eb373b7136880894$export$4c173b1b2f78faf7 = (0, $aQqjl$d3format.format)(\".2~f\");\nconst $eb373b7136880894$export$e54bbd2c33d17485 = (0, $aQqjl$d3format.format)(\".1~f\");\nconst $eb373b7136880894$export$bc135f63e2f56fd4 = (0, $aQqjl$d3format.format)(\".0f\");\nfunction $eb373b7136880894$export$7c4d25c0c3217d8c(val, precision = 0) {\n switch(precision){\n case 4:\n return $eb373b7136880894$export$97c1b10e131a836d(val);\n case 3:\n return $eb373b7136880894$export$b1cb0f7fb990b3ea(val);\n case 2:\n return $eb373b7136880894$export$4c173b1b2f78faf7(val);\n case 1:\n return $eb373b7136880894$export$e54bbd2c33d17485(val);\n case 0:\n return $eb373b7136880894$export$bc135f63e2f56fd4(val);\n default:\n return $eb373b7136880894$export$97c1b10e131a836d(val);\n }\n}\n\n\n//# sourceMappingURL=utils.274d0452.js.map\n","import { format } from \"d3-format\";\n\nexport const fmt4 = format(\".4~f\");\nexport const fmt3 = format(\".3~f\");\nexport const fmt2 = format(\".2~f\");\nexport const fmt1 = format(\".1~f\");\nexport const fmtInt = format(\".0f\");\n\nexport function formatValue(val: number, precision: number = 0): string {\n switch (precision) {\n case 4:\n return fmt4(val);\n case 3:\n return fmt3(val);\n case 2:\n return fmt2(val);\n case 1:\n return fmt1(val);\n case 0:\n return fmtInt(val);\n default:\n return fmt4(val);\n }\n}\n"],"names":["$aQqjl$d3format","require","format"],"version":3,"file":"utils.274d0452.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("react"),require("mapbox-gl");
2
+ //# sourceMappingURL=utils.dd92f725.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,S,Q","sources":["<anon>","packages/map-interface/src/utils.ts"],"sourcesContent":["var $hs6oS$react = require(\"react\");\nvar $hs6oS$mapboxgl = require(\"mapbox-gl\");\n\n\n\nfunction $70af8c34138feecc$var$calcMapPadding(rect, childRect) {\n return {\n left: Math.max(rect.left - childRect.left, 0),\n top: Math.max(rect.top - childRect.top, 0),\n right: Math.max(childRect.right - rect.right, 0),\n bottom: Math.max(childRect.bottom - rect.bottom, 0)\n };\n}\nfunction $70af8c34138feecc$export$bb78f9f01775eef1(ref, parentRef) {\n const rect = parentRef.current?.getBoundingClientRect();\n const childRect = ref.current?.getBoundingClientRect();\n if (rect == null || childRect == null) return;\n return $70af8c34138feecc$var$calcMapPadding(rect, childRect);\n}\nfunction $70af8c34138feecc$export$278090850f6b3a9f(mapRef, markerRef, markerPosition) {\n (0, $hs6oS$react.useEffect)(()=>{\n const map = mapRef.current;\n if (map == null) return;\n if (markerPosition == null) {\n markerRef.current?.remove();\n return;\n }\n const marker = markerRef.current ?? new (0, $hs6oS$mapboxgl.Marker)();\n marker.setLngLat(markerPosition).addTo(map);\n markerRef.current = marker;\n return ()=>marker.remove();\n }, [\n mapRef.current,\n markerPosition\n ]);\n}\n\n\n//# sourceMappingURL=utils.dd92f725.js.map\n","import { useEffect } from \"react\";\nimport { Marker } from \"mapbox-gl\";\n\nfunction calcMapPadding(rect, childRect) {\n return {\n left: Math.max(rect.left - childRect.left, 0),\n top: Math.max(rect.top - childRect.top, 0),\n right: Math.max(childRect.right - rect.right, 0),\n bottom: Math.max(childRect.bottom - rect.bottom, 0),\n };\n}\n\nexport function getMapPadding(ref, parentRef) {\n const rect = parentRef.current?.getBoundingClientRect();\n const childRect = ref.current?.getBoundingClientRect();\n if (rect == null || childRect == null) return;\n return calcMapPadding(rect, childRect);\n}\n\nexport function useMapMarker(mapRef, markerRef, markerPosition) {\n useEffect(() => {\n const map = mapRef.current;\n if (map == null) return;\n if (markerPosition == null) {\n markerRef.current?.remove();\n return;\n }\n const marker = markerRef.current ?? new Marker();\n marker.setLngLat(markerPosition).addTo(map);\n markerRef.current = marker;\n return () => marker.remove();\n }, [mapRef.current, markerPosition]);\n}\n"],"names":["require"],"version":3,"file":"utils.dd92f725.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("./main.module.434acaf9.js"),require("./main.module.29a15f3d.css"),require("./expansion-panel.62240ee3.js"),require("@blueprintjs/core"),require("@macrostrat/mapbox-react");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("react"),require("@macrostrat/ui-components"),require("d3-array");var i=globalThis,a={},t={},n=i.parcelRequire94c2;null==n&&((n=function(e){if(e in a)return a[e].exports;if(e in t){var r=t[e];delete t[e];var i={id:e,exports:{}};return a[e]=i,r.call(i.exports,i,i.exports),i.exports}var n=Error("Cannot find module '"+e+"'");throw n.code="MODULE_NOT_FOUND",n}).register=function(e,r){t[e]=r},i.parcelRequire94c2=n),n.register;var o=n("7gWgo");new URL("expansion-panel.62240ee3.js","file:"+__filename).toString(),r(e).styled(r(o));
2
+ //# sourceMappingURL=vector-tile-features.b5a23b71.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,8C,Q,+C,Q,kD,Q,qB,Q,4B,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,S,Q,6B,Q,Y,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,SEAiB,IAAA,IAAoB,+CAAA,QAAA,YAAgD,QAAQ,GDUnF,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/dev/vector-tile-features.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-1865b63dee819005.js"],"sourcesContent":["require(\"./main.module.434acaf9.js\");\nrequire(\"./main.module.29a15f3d.css\");\nrequire(\"./expansion-panel.62240ee3.js\");\nvar $aOXfC$blueprintjscore = require(\"@blueprintjs/core\");\nvar $aOXfC$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $aOXfC$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $aOXfC$react = require(\"react\");\nvar $aOXfC$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $aOXfC$d3array = require(\"d3-array\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\nvar $7gWgo = parcelRequire(\"7gWgo\");\n\n\n\nvar $1b9f6bceeea1f7c0$exports = {};\n$1b9f6bceeea1f7c0$exports = new URL(\"expansion-panel.62240ee3.js\", \"file:\" + __filename).toString();\n\n\nconst $24508fe2b4ce0838$var$h = (0, ($parcel$interopDefault($aOXfC$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($7gWgo))));\nfunction $24508fe2b4ce0838$export$2906e7f4b228efe9({ data: data, ...rest }) {\n // Instead of managing hover state with CSS, we use a state variable,\n // so that the button re-renders when the state changes\n const [showControls, setShowControls] = (0, $aOXfC$react.useState)(false);\n const onMouseEnter = (0, $aOXfC$react.useCallback)(()=>setShowControls(true), []);\n const onMouseLeave = (0, $aOXfC$react.useCallback)(()=>setShowControls(false), []);\n return $24508fe2b4ce0838$var$h(\"div.feature-properties\", {\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave\n }, [\n $24508fe2b4ce0838$var$h.if(showControls)(\"div.controls\", $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$CopyJSONButton, {\n data: data\n })),\n $24508fe2b4ce0838$var$h((0, $aOXfC$macrostratuicomponents.JSONView), {\n data: data,\n hideRoot: true,\n ...rest\n })\n ]);\n}\nfunction $24508fe2b4ce0838$export$dc87b4d46cea200d({ feature: feature }) {\n const props = feature.properties;\n return $24508fe2b4ce0838$var$h(\"div.feature-record\", [\n $24508fe2b4ce0838$var$h.if(Object.keys(props).length > 0)($24508fe2b4ce0838$export$2906e7f4b228efe9, {\n data: props\n })\n ]);\n}\nfunction $24508fe2b4ce0838$var$CopyJSONButton({ data: data }) {\n const [copied, setCopied] = (0, $aOXfC$react.useState)(false);\n return $24508fe2b4ce0838$var$h((0, $aOXfC$blueprintjscore.Button), {\n icon: copied ? \"tick\" : \"clipboard\",\n intent: copied ? (0, $aOXfC$blueprintjscore.Intent).SUCCESS : (0, $aOXfC$blueprintjscore.Intent).NONE,\n minimal: true,\n small: true,\n onClick () {\n navigator.clipboard.writeText(JSON.stringify(data, null, 2));\n setCopied(true);\n }\n });\n}\nfunction $24508fe2b4ce0838$export$214daccdda0f4ac6({ selectedLocation: selectedLocation, setFeatures: setFeatures, radius: radius = 2 }) {\n const mapRef = (0, $aOXfC$macrostratmapboxreact.useMapRef)();\n const isLoading = (0, $aOXfC$macrostratmapboxreact.useMapStatus)((s)=>s.isLoading);\n const isInitialized = (0, $aOXfC$macrostratmapboxreact.useMapStatus)((s)=>s.isInitialized);\n const prevLocation = (0, $aOXfC$react.useRef)(null);\n const prevFeatures = (0, $aOXfC$react.useRef)([]);\n (0, $aOXfC$react.useEffect)(()=>{\n const map = mapRef?.current;\n if (map == null) return;\n if (selectedLocation == null) {\n setFeatures(null);\n return;\n }\n if (!isInitialized) return;\n const hasPreviouslyLoadedFeatures = prevFeatures.current.length > 0;\n const locationMemo = JSON.stringify(selectedLocation);\n if (locationMemo == prevLocation.current && hasPreviouslyLoadedFeatures) return;\n prevLocation.current = locationMemo;\n // Don't update if the location hasn't changed\n //if (selectedLocation == prevLocation) return;\n const r = radius;\n const pt = map.project(selectedLocation);\n const bbox = [\n [\n pt.x - r,\n pt.y - r\n ],\n [\n pt.x + r,\n pt.y + r\n ]\n ];\n const features = map.queryRenderedFeatures(bbox);\n prevFeatures.current = features ?? [];\n setFeatures(features);\n }, [\n isInitialized,\n selectedLocation,\n isLoading\n ]);\n return null;\n}\nfunction $24508fe2b4ce0838$var$FeatureHeader({ feature: feature }) {\n return $24508fe2b4ce0838$var$h(\"div.feature-header\", [\n $24508fe2b4ce0838$var$h(\"h3\", [\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$KeyValue, {\n label: \"Source\",\n value: feature.source\n }),\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$KeyValue, {\n label: \"Source layer\",\n value: feature.sourceLayer\n })\n ])\n ]);\n}\nfunction $24508fe2b4ce0838$var$KeyValue({ label: label, value: value }) {\n return $24508fe2b4ce0838$var$h(\"span.key-value\", [\n $24508fe2b4ce0838$var$h(\"span.key\", label),\n $24508fe2b4ce0838$var$h(\"code.value\", value)\n ]);\n}\nfunction $24508fe2b4ce0838$var$LoadingAwareFeatureSet({ features: features, sourceID: sourceID }) {\n const map = (0, $aOXfC$macrostratmapboxreact.useMapRef)();\n if (map?.current == null) return null;\n const [isLoaded, setIsLoaded] = (0, $aOXfC$react.useState)(false);\n const sourceFeatures = features.filter((d)=>d.source == \"burwell\");\n (0, $aOXfC$react.useEffect)(()=>{\n if (sourceFeatures.length > 0) {\n setIsLoaded(true);\n return;\n }\n const isLoaded = map.current.isSourceLoaded(sourceID);\n setIsLoaded(isLoaded);\n if (!isLoaded) map.current.once(\"sourcedata\", (e)=>{\n if (e.sourceId == sourceID) setIsLoaded(true);\n });\n }, [\n map.current,\n sourceID,\n sourceFeatures.length\n ]);\n if (!isLoaded) return $24508fe2b4ce0838$var$h((0, $aOXfC$blueprintjscore.Spinner));\n return $24508fe2b4ce0838$var$h($24508fe2b4ce0838$export$617d79dae526d2cf, {\n features: sourceFeatures\n });\n}\nfunction $24508fe2b4ce0838$export$43c75dec9d0b96c({ feature: feature, showExtent: showExtent, setShowExtent: setShowExtent }) {\n if (feature == null) return null;\n const size = feature._vectorTileFeature._pbf.length;\n return $24508fe2b4ce0838$var$h(\"div.tile-info\", [\n $24508fe2b4ce0838$var$h(\"h3\", \"Tile\"),\n $24508fe2b4ce0838$var$h(\"div.tile-index\", [\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$KeyValue, {\n label: \"x\",\n value: feature._x\n }),\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$KeyValue, {\n label: \"y\",\n value: feature._y\n }),\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$KeyValue, {\n label: \"z\",\n value: feature._z\n })\n ]),\n $24508fe2b4ce0838$var$h(\"div.spacer\"),\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$KeyValue, {\n label: \"Size\",\n value: $24508fe2b4ce0838$var$formatSize(size)\n }),\n $24508fe2b4ce0838$var$h((0, $aOXfC$blueprintjscore.Switch), {\n label: \"Show extent\",\n alignIndicator: \"right\",\n checked: showExtent,\n onChange () {\n setShowExtent(!showExtent);\n }\n })\n ]);\n}\nfunction $24508fe2b4ce0838$var$formatSize(size) {\n if (size > 1000000) return $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$UnitNumber, {\n value: size / 1000000,\n unit: \"Mb\"\n });\n if (size > 1000) return $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$UnitNumber, {\n value: size / 1000,\n unit: \"Kb\"\n });\n return `${size} bytes`;\n}\nfunction $24508fe2b4ce0838$var$UnitNumber({ value: value, unit: unit, precision: precision = 1 }) {\n return $24508fe2b4ce0838$var$h(\"span.unit-number\", [\n $24508fe2b4ce0838$var$h(\"span.number\", value.toFixed(precision)),\n $24508fe2b4ce0838$var$h(\"span.unit\", unit)\n ]);\n}\nfunction $24508fe2b4ce0838$export$43277c51a01761c1({ features: features, focusedSource: focusedSource = null }) {\n if (features == null) return null;\n let focusedSourcePanel = null;\n let filteredFeatures = features;\n let title = \"Features\";\n if (focusedSource != null) {\n title = \"Basemap features\";\n focusedSourcePanel = $24508fe2b4ce0838$var$h((0, $1b9f6bceeea1f7c0$exports.ExpansionPanel), {\n title: \"Macrostrat features\",\n className: \"macrostrat-features\",\n expanded: true\n }, [\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$LoadingAwareFeatureSet, {\n features: features,\n sourceID: focusedSource\n })\n ]);\n filteredFeatures = features.filter((d)=>d.source != focusedSource);\n }\n return $24508fe2b4ce0838$var$h(\"div.feature-panel\", [\n focusedSourcePanel,\n $24508fe2b4ce0838$var$h((0, $1b9f6bceeea1f7c0$exports.ExpansionPanel), {\n title: title,\n className: \"basemap-features\",\n expanded: focusedSource == null\n }, [\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$FeatureGroups, {\n features: filteredFeatures\n })\n ])\n ]);\n}\nfunction $24508fe2b4ce0838$var$FeatureGroups({ features: features }) {\n /** Group features by source and sourceLayer */ if (features == null) return null;\n const groups = (0, $aOXfC$d3array.group)(features, (d)=>`${d.source} - ${d.sourceLayer}`);\n return $24508fe2b4ce0838$var$h(\"div.feature-groups\", Array.from(groups).map(([key, features])=>{\n return $24508fe2b4ce0838$var$h(\"div.feature-group\", [\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$var$FeatureHeader, {\n feature: features[0]\n }),\n $24508fe2b4ce0838$var$h($24508fe2b4ce0838$export$617d79dae526d2cf, {\n features: features\n })\n ]);\n }));\n}\nfunction $24508fe2b4ce0838$export$617d79dae526d2cf({ features: features }) {\n return $24508fe2b4ce0838$var$h(\"div.features\", features.map((feature, i)=>$24508fe2b4ce0838$var$h($24508fe2b4ce0838$export$dc87b4d46cea200d, {\n key: i,\n feature: feature\n })));\n}\n\n\n//# sourceMappingURL=vector-tile-features.b5a23b71.js.map\n","import { Spinner, Switch, Button, Intent } from \"@blueprintjs/core\";\nimport { useMapRef, useMapStatus } from \"@macrostrat/mapbox-react\";\nimport mapboxgl from \"mapbox-gl\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { JSONView } from \"@macrostrat/ui-components\";\nimport { group } from \"d3-array\";\nimport { ExpansionPanel } from \"../expansion-panel\";\n\nconst h = hyper.styled(styles);\n\nexport function FeatureProperties({ data, ...rest }) {\n // Instead of managing hover state with CSS, we use a state variable,\n // so that the button re-renders when the state changes\n const [showControls, setShowControls] = useState(false);\n const onMouseEnter = useCallback(() => setShowControls(true), []);\n const onMouseLeave = useCallback(() => setShowControls(false), []);\n\n return h(\"div.feature-properties\", { onMouseEnter, onMouseLeave }, [\n h.if(showControls)(\"div.controls\", h(CopyJSONButton, { data })),\n h(JSONView, {\n data,\n hideRoot: true,\n ...rest,\n }),\n ]);\n}\n\nexport function FeatureRecord({ feature }) {\n const props = feature.properties;\n return h(\"div.feature-record\", [\n h.if(Object.keys(props).length > 0)(FeatureProperties, { data: props }),\n ]);\n}\n\nfunction CopyJSONButton({ data }) {\n const [copied, setCopied] = useState(false);\n return h(Button, {\n icon: copied ? \"tick\" : \"clipboard\",\n intent: copied ? Intent.SUCCESS : Intent.NONE,\n minimal: true,\n small: true,\n onClick() {\n navigator.clipboard.writeText(JSON.stringify(data, null, 2));\n setCopied(true);\n },\n });\n}\n\n/** This component wraps queryRenderedFeatures to get features at a given location */\nexport function FeatureSelectionHandler({\n selectedLocation,\n setFeatures,\n radius = 2,\n}: {\n selectedLocation: mapboxgl.LngLat;\n setFeatures: (features: mapboxgl.MapboxGeoJSONFeature[]) => void;\n radius?: number;\n}) {\n const mapRef = useMapRef();\n const isLoading = useMapStatus((s) => s.isLoading);\n const isInitialized = useMapStatus((s) => s.isInitialized);\n const prevLocation = useRef(null);\n const prevFeatures = useRef([]);\n\n useEffect(() => {\n const map = mapRef?.current;\n if (map == null) return;\n if (selectedLocation == null) {\n setFeatures(null);\n return;\n }\n\n if (!isInitialized) return;\n\n const hasPreviouslyLoadedFeatures = prevFeatures.current.length > 0;\n\n const locationMemo = JSON.stringify(selectedLocation);\n if (locationMemo == prevLocation.current && hasPreviouslyLoadedFeatures)\n return;\n\n prevLocation.current = locationMemo;\n\n // Don't update if the location hasn't changed\n //if (selectedLocation == prevLocation) return;\n\n const r = radius;\n const pt = map.project(selectedLocation);\n\n const bbox: [mapboxgl.PointLike, mapboxgl.PointLike] = [\n [pt.x - r, pt.y - r],\n [pt.x + r, pt.y + r],\n ];\n const features = map.queryRenderedFeatures(bbox);\n prevFeatures.current = features ?? [];\n setFeatures(features);\n }, [isInitialized, selectedLocation, isLoading]);\n\n return null;\n}\n\nfunction FeatureHeader({ feature }) {\n return h(\"div.feature-header\", [\n h(\"h3\", [\n h(KeyValue, { label: \"Source\", value: feature.source }),\n h(KeyValue, { label: \"Source layer\", value: feature.sourceLayer }),\n ]),\n ]);\n}\n\nfunction KeyValue({ label, value }) {\n return h(\"span.key-value\", [h(\"span.key\", label), h(\"code.value\", value)]);\n}\n\nfunction LoadingAwareFeatureSet({ features, sourceID }) {\n const map = useMapRef();\n if (map?.current == null) return null;\n const [isLoaded, setIsLoaded] = useState(false);\n\n const sourceFeatures = features.filter((d) => d.source == \"burwell\");\n\n useEffect(() => {\n if (sourceFeatures.length > 0) {\n setIsLoaded(true);\n return;\n }\n\n const isLoaded = map.current.isSourceLoaded(sourceID);\n setIsLoaded(isLoaded);\n if (!isLoaded) {\n map.current.once(\"sourcedata\", (e) => {\n if (e.sourceId == sourceID) {\n setIsLoaded(true);\n }\n });\n }\n }, [map.current, sourceID, sourceFeatures.length]);\n\n if (!isLoaded) return h(Spinner);\n return h(Features, { features: sourceFeatures });\n}\n\nexport function TileInfo({ feature, showExtent, setShowExtent }) {\n if (feature == null) return null;\n const size = feature._vectorTileFeature._pbf.length;\n return h(\"div.tile-info\", [\n h(\"h3\", \"Tile\"),\n h(\"div.tile-index\", [\n h(KeyValue, { label: \"x\", value: feature._x }),\n h(KeyValue, { label: \"y\", value: feature._y }),\n h(KeyValue, { label: \"z\", value: feature._z }),\n ]),\n h(\"div.spacer\"),\n h(KeyValue, { label: \"Size\", value: formatSize(size) }),\n h(Switch, {\n label: \"Show extent\",\n alignIndicator: \"right\",\n checked: showExtent,\n onChange() {\n setShowExtent(!showExtent);\n },\n }),\n ]);\n}\n\nfunction formatSize(size: number) {\n if (size > 1000000)\n return h(UnitNumber, { value: size / 1000000, unit: \"Mb\" });\n if (size > 1000) return h(UnitNumber, { value: size / 1000, unit: \"Kb\" });\n return `${size} bytes`;\n}\n\nfunction UnitNumber({ value, unit, precision = 1 }) {\n return h(\"span.unit-number\", [\n h(\"span.number\", value.toFixed(precision)),\n h(\"span.unit\", unit),\n ]);\n}\n\nexport function FeaturePanel({ features, focusedSource = null }) {\n if (features == null) return null;\n\n let focusedSourcePanel = null;\n let filteredFeatures = features;\n let title = \"Features\";\n\n if (focusedSource != null) {\n title = \"Basemap features\";\n focusedSourcePanel = h(\n ExpansionPanel,\n {\n title: \"Macrostrat features\",\n className: \"macrostrat-features\",\n expanded: true,\n },\n [\n h(LoadingAwareFeatureSet, {\n features,\n sourceID: focusedSource,\n }),\n ]\n );\n filteredFeatures = features.filter((d) => d.source != focusedSource);\n }\n\n return h(\"div.feature-panel\", [\n focusedSourcePanel,\n h(\n ExpansionPanel,\n { title, className: \"basemap-features\", expanded: focusedSource == null },\n [\n h(FeatureGroups, {\n features: filteredFeatures,\n }),\n ]\n ),\n ]);\n}\n\nfunction FeatureGroups({ features }) {\n /** Group features by source and sourceLayer */\n if (features == null) return null;\n\n const groups = group(features, (d) => `${d.source} - ${d.sourceLayer}`);\n\n return h(\n \"div.feature-groups\",\n Array.from(groups).map(([key, features]) => {\n return h(\"div.feature-group\", [\n h(FeatureHeader, { feature: features[0] }),\n h(Features, { features }),\n ]);\n })\n );\n}\n\nexport function Features({ features }) {\n return h(\n \"div.features\",\n features.map((feature, i) => h(FeatureRecord, { key: i, feature }))\n );\n}\n","module.exports = new __parcel__URL__(\"expansion-panel.62240ee3.js\").toString();"],"names":["require","$aOXfC$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$7gWgo","URL","__filename","toString","styled"],"version":3,"file":"vector-tile-features.b5a23b71.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("@macrostrat/mapbox-utils"),require("@macrostrat/color-utils");
2
+ //# sourceMappingURL=xray.bce11e7b.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,Q,4B,Q","sources":["<anon>","packages/map-interface/src/dev/xray.ts"],"sourcesContent":["var $39uCi$macrostratmapboxutils = require(\"@macrostrat/mapbox-utils\");\nvar $39uCi$macrostratcolorutils = require(\"@macrostrat/color-utils\");\n\n\n\nasync function $acfff4a514fdc100$export$eff5fb2e10d05b1d(baseStyle, params = null) {\n const { inDarkMode: inDarkMode = false, color: color = \"rgb(74, 242, 161)\", mapboxToken: mapboxToken, xRaySources: xRaySources } = params;\n const style = await (0, $39uCi$macrostratmapboxutils.getMapboxStyle)(baseStyle, {\n access_token: mapboxToken\n });\n const sources = xRaySources ?? Object.keys(style.sources);\n let layers = [];\n for (let layer of style.layers){\n if (!sources.includes(layer.source)) {\n layers.push(layer);\n continue;\n }\n let newLayer = $acfff4a514fdc100$var$transformMapboxLayer(layer, color, inDarkMode);\n if (newLayer != null) layers.push(newLayer);\n }\n return {\n ...style,\n layers: layers\n };\n}\nfunction $acfff4a514fdc100$var$transformMapboxLayer(layer, color, inDarkMode) {\n const c = (0, $39uCi$macrostratcolorutils.asChromaColor)(color);\n const xRayColor = (opacity = 1, darken = 0)=>{\n if (!inDarkMode) return (0, $39uCi$macrostratcolorutils.toRGBAString)(c.darken(2 - darken).alpha(opacity));\n return (0, $39uCi$macrostratcolorutils.toRGBAString)(c.alpha(opacity).darken(darken));\n };\n if (layer.type == \"background\") return null;\n let newLayer = {\n ...layer\n };\n console.log(xRayColor(0.5));\n if (layer.type == \"fill\") newLayer.paint = {\n \"fill-color\": xRayColor(0.1),\n \"fill-outline-color\": xRayColor(0.5)\n };\n else if (layer.type == \"line\") newLayer.paint = {\n \"line-color\": xRayColor(0.5, 0),\n \"line-width\": 1.5\n };\n else if (layer.type == \"symbol\") newLayer.paint = {\n \"text-color\": xRayColor(1, -0.5),\n \"text-halo-color\": \"#000\"\n };\n else if (layer.type == \"circle\") newLayer.paint = {\n \"circle-color\": xRayColor(0.5, 0),\n \"circle-stroke-color\": xRayColor(0.5, 1),\n \"circle-radius\": 2\n };\n return newLayer;\n}\nasync function $acfff4a514fdc100$export$e739dc8dfc0db9a6(baseStyle, overlayStyle = null, params = {}) {\n const { mapboxToken: mapboxToken, xRay: xRay = false, xRaySources: _xRaySources, ...rest } = params;\n let xRaySources = _xRaySources;\n let style = await (0, $39uCi$macrostratmapboxutils.getMapboxStyle)(baseStyle, {\n access_token: mapboxToken\n });\n if (overlayStyle != null) {\n const overlay = await (0, $39uCi$macrostratmapboxutils.getMapboxStyle)(overlayStyle, {\n access_token: mapboxToken\n });\n style = (0, $39uCi$macrostratmapboxutils.mergeStyles)(style, overlay);\n xRaySources ?? (xRaySources = Object.keys(overlay.sources));\n }\n if (xRay) {\n // If we haven't specified sources, then we'll use all of them\n xRaySources ?? (xRaySources = Object.keys(style.sources));\n style = await $acfff4a514fdc100$export$eff5fb2e10d05b1d(style, {\n ...rest,\n mapboxToken: mapboxToken,\n xRaySources: xRaySources\n });\n }\n return style;\n}\n\n\n//# sourceMappingURL=xray.bce11e7b.js.map\n","import { getMapboxStyle, mergeStyles } from \"@macrostrat/mapbox-utils\";\nimport { asChromaColor, toRGBAString } from \"@macrostrat/color-utils\";\nimport mapboxgl from \"mapbox-gl\";\n\ninterface XRayOptions {\n color?: string;\n inDarkMode?: boolean;\n mapboxToken?: string;\n xRaySources?: string[];\n}\n\nexport async function buildXRayStyle(\n baseStyle: string | object,\n params: XRayOptions = null\n) {\n const {\n inDarkMode = false,\n color = \"rgb(74, 242, 161)\",\n mapboxToken,\n xRaySources,\n } = params;\n const style = await getMapboxStyle(baseStyle, { access_token: mapboxToken });\n const sources = xRaySources ?? Object.keys(style.sources);\n\n let layers = [];\n for (let layer of style.layers) {\n if (!sources.includes(layer.source)) {\n layers.push(layer);\n continue;\n }\n let newLayer = transformMapboxLayer(layer, color, inDarkMode);\n if (newLayer != null) {\n layers.push(newLayer);\n }\n }\n\n return {\n ...style,\n layers,\n };\n}\n\nfunction transformMapboxLayer(layer, color, inDarkMode) {\n const c = asChromaColor(color);\n const xRayColor = (opacity = 1, darken = 0) => {\n if (!inDarkMode) {\n return toRGBAString(c.darken(2 - darken).alpha(opacity));\n }\n return toRGBAString(c.alpha(opacity).darken(darken));\n };\n\n if (layer.type == \"background\") {\n return null;\n }\n\n let newLayer = { ...layer };\n\n console.log(xRayColor(0.5));\n\n if (layer.type == \"fill\") {\n newLayer.paint = {\n \"fill-color\": xRayColor(0.1),\n \"fill-outline-color\": xRayColor(0.5),\n };\n } else if (layer.type == \"line\") {\n newLayer.paint = {\n \"line-color\": xRayColor(0.5, 0),\n \"line-width\": 1.5,\n };\n } else if (layer.type == \"symbol\") {\n newLayer.paint = {\n \"text-color\": xRayColor(1, -0.5),\n \"text-halo-color\": \"#000\",\n };\n } else if (layer.type == \"circle\") {\n newLayer.paint = {\n \"circle-color\": xRayColor(0.5, 0),\n \"circle-stroke-color\": xRayColor(0.5, 1),\n \"circle-radius\": 2,\n };\n }\n\n return newLayer;\n}\n\ntype InspectorStyleOptions = XRayOptions & {\n xRay?: boolean;\n};\n\nexport async function buildInspectorStyle(\n baseStyle: mapboxgl.Style | string,\n overlayStyle: mapboxgl.Style | string | null = null,\n params: InspectorStyleOptions = {}\n) {\n const {\n mapboxToken,\n xRay = false,\n xRaySources: _xRaySources,\n ...rest\n } = params;\n let xRaySources = _xRaySources;\n let style = await getMapboxStyle(baseStyle, {\n access_token: mapboxToken,\n });\n\n if (overlayStyle != null) {\n const overlay = await getMapboxStyle(overlayStyle, {\n access_token: mapboxToken,\n });\n style = mergeStyles(style, overlay);\n xRaySources ??= Object.keys(overlay.sources);\n }\n\n if (xRay) {\n // If we haven't specified sources, then we'll use all of them\n xRaySources ??= Object.keys(style.sources);\n\n style = await buildXRayStyle(style, { ...rest, mapboxToken, xRaySources });\n }\n return style;\n}\n"],"names":["require"],"version":3,"file":"xray.bce11e7b.js.map","sourceRoot":"../../../../"}
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "@macrostrat/map-interface",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "Map interface for Macrostrat",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "source": "src/index.ts",
8
8
  "types": "dist/esm/index.d.ts",
9
+ "node": "dist/node/index.js",
9
10
  "dependencies": {
10
11
  "@blueprintjs/core": "^5.0.0",
11
12
  "@macrostrat/color-utils": "^1.0.1",
12
13
  "@macrostrat/hyper": "^3.0.6",
13
14
  "@macrostrat/mapbox-react": "^2.5.0",
14
15
  "@macrostrat/mapbox-utils": "^1.4.0",
15
- "@macrostrat/ui-components": "^4.1.0",
16
+ "@macrostrat/ui-components": "^4.1.2",
16
17
  "@mapbox/tilebelt": "^2.0.0",
17
18
  "classnames": "^2.5.1",
18
19
  "d3-array": "^3.2.4",
@@ -40,7 +41,15 @@
40
41
  "source": "./src/index.ts",
41
42
  "import": "./dist/esm/index.js",
42
43
  "require": "./dist/cjs/index.js",
43
- "types": "./dist/esm/index.d.ts"
44
+ "types": "./dist/esm/index.d.ts",
45
+ "node": "./dist/node/index.js"
46
+ }
47
+ },
48
+ "targets": {
49
+ "node": {
50
+ "engines": {
51
+ "node": ">=14"
52
+ }
44
53
  }
45
54
  },
46
55
  "files": [
@@ -20,7 +20,7 @@ function ExpansionPanelSummary(props) {
20
20
  title,
21
21
  component: titleComponent,
22
22
  },
23
- [children, h(Icon, { icon })]
23
+ [children, h(Icon, { icon, className: "expansion-panel-icon" })]
24
24
  );
25
25
  }
26
26
 
@@ -1,25 +1,29 @@
1
1
 
2
2
  .panel-subhead
3
- padding: 0.2em var(--box-horizontal-padding)
4
- border-top: 1px solid var(--panel-rule-color)
3
+ padding: 0 1rem
4
+ border: 1px solid var(--panel-rule-color)
5
5
  border-bottom: 1px solid var(--panel-rule-color)
6
6
  background-color: var(--accent-color)
7
7
  display: flex
8
8
  flex-direction: row
9
9
  align-items: center
10
10
  z-index: 1
11
- gap: var(--box-horizontal-padding)
11
+ gap: var(--panel-header-gap, 0.5rem)
12
12
  top: -1px
13
13
  position: sticky
14
+ min-height: var(--panel-header-height, 40px)
14
15
  h1, h2, h3, h4
15
16
  font-family: Montserrat,sans-serif
16
17
  font-weight: 700
17
- margin: 0.2em 0
18
+ margin: 0
18
19
  h4
19
20
  font-weight: 600
20
21
  .title
21
22
  flex-grow: 1
22
23
 
24
+ .expansion-panel-icon
25
+ margin-right: -0.35em
26
+
23
27
  // :global(.bp5-dark) .panel-subhead
24
28
  // margin 0 1px
25
29
 
@@ -48,14 +52,14 @@
48
52
  .expansion-panel-header
49
53
  background-color: var(--accent-secondary-color)
50
54
  cursor: pointer
55
+ padding: 0 1rem
56
+
51
57
  &:hover
52
58
  background-color: var(--accent-secondary-hover-color)
53
59
  h2, h3, h4
54
60
  font-weight: 500
55
61
  border-bottom: 1px solid var(--tertiary-border-color)
56
62
  border-top: 1px solid var(--tertiary-border-color)
57
- margin-top: -1px
58
- padding: 5px 1em 5px
59
63
  align-items: center
60
64
 
61
65
  .expansion-summary-title-help
@@ -71,12 +75,18 @@
71
75
  transform: translate(0,3px)
72
76
 
73
77
  .expansion-children
74
- padding: 5px 1em 10px
78
+ padding: 0 1rem
75
79
  .expansion-panel
76
- margin-left: -1em
77
- margin-right: -1em
80
+ margin-left: -1rem
81
+ margin-right: -1rem
78
82
  &:first-child
79
- margin-top: -5px
83
+ margin-top: 0
84
+ &>:first-child
85
+ margin-top: 1rem
86
+ &>:last-child
87
+ margin-bottom: 1rem
88
+
89
+
80
90
 
81
91
  .expansion-panel-subtext
82
92
  font-size: 85%
@@ -8,6 +8,7 @@ import {
8
8
  useFocusState,
9
9
  isCentered,
10
10
  } from "@macrostrat/mapbox-react";
11
+ import classNames from "classnames";
11
12
 
12
13
  const h = hyper.styled(styles);
13
14
 
@@ -74,6 +75,9 @@ export interface InfoDrawerHeaderProps {
74
75
  elevation?: number;
75
76
  showCopyPositionButton?: boolean;
76
77
  bounds?: mapboxgl.LngLatBounds;
78
+ fixedHeight?: boolean;
79
+ children?: React.ReactNode;
80
+ className?: string;
77
81
  }
78
82
 
79
83
  export function InfoDrawerHeader(props: InfoDrawerHeaderProps) {
@@ -84,7 +88,9 @@ export function InfoDrawerHeader(props: InfoDrawerHeaderProps) {
84
88
  zoom = 7,
85
89
  elevation,
86
90
  showCopyPositionButton,
91
+ fixedHeight = false,
87
92
  children,
93
+ className,
88
94
  } = props;
89
95
 
90
96
  let leftButton = null;
@@ -96,23 +102,29 @@ export function InfoDrawerHeader(props: InfoDrawerHeaderProps) {
96
102
  });
97
103
  }
98
104
 
99
- return h("header.location-panel-header", [
100
- leftButton,
101
- children,
102
- h("div.spacer"),
103
- h.if(position != null)(LngLatCoords, {
104
- position,
105
- zoom,
106
- className: "infodrawer-header-item",
107
- }),
108
- h.if(elevation != null)(Elevation, {
109
- elevation,
110
- className: "infodrawer-header-item",
111
- }),
112
- h.if(onClose != null)(Button, {
113
- minimal: true,
114
- icon: "cross",
115
- onClick: onClose,
116
- }),
117
- ]);
105
+ return h(
106
+ "header.location-panel-header",
107
+ {
108
+ className: classNames(className, { "fixed-height": fixedHeight }),
109
+ },
110
+ [
111
+ leftButton,
112
+ children,
113
+ h("div.spacer"),
114
+ h.if(position != null)(LngLatCoords, {
115
+ position,
116
+ zoom,
117
+ className: "infodrawer-header-item",
118
+ }),
119
+ h.if(elevation != null)(Elevation, {
120
+ elevation,
121
+ className: "infodrawer-header-item",
122
+ }),
123
+ h.if(onClose != null)(Button, {
124
+ minimal: true,
125
+ icon: "cross",
126
+ onClick: onClose,
127
+ }),
128
+ ]
129
+ );
118
130
  }
@@ -4,6 +4,7 @@ import classNames from "classnames";
4
4
  import styles from "./main.module.sass";
5
5
  import { ErrorBoundary } from "@macrostrat/ui-components";
6
6
  import { PanelCard } from "../container";
7
+ import { ComponentType } from "react";
7
8
 
8
9
  const h = hyper.styled(styles);
9
10
 
@@ -12,11 +13,14 @@ export function InfoDrawerContainer(props) {
12
13
  return h(PanelCard, { ...props, className });
13
14
  }
14
15
 
16
+ type Component = string | ComponentType<any>;
17
+
15
18
  interface BaseInfoDrawerProps extends InfoDrawerHeaderProps {
16
19
  className?: string;
17
20
  title?: string;
18
21
  headerElement?: JSX.Element;
19
22
  children?: React.ReactNode;
23
+ contentContainer?: Component;
20
24
  }
21
25
 
22
26
  export function BaseInfoDrawer(props: BaseInfoDrawerProps) {
@@ -26,6 +30,7 @@ export function BaseInfoDrawer(props: BaseInfoDrawerProps) {
26
30
  title,
27
31
  onClose,
28
32
  children,
33
+ contentContainer = "div.infodrawer-contents",
29
34
  ...rest
30
35
  } = props;
31
36
  const header =
@@ -35,10 +40,7 @@ export function BaseInfoDrawer(props: BaseInfoDrawerProps) {
35
40
  ]);
36
41
  return h(InfoDrawerContainer, { className }, [
37
42
  header,
38
- h(
39
- "div.infodrawer-body",
40
- h("div.infodrawer-contents", h(ErrorBoundary, null, children))
41
- ),
43
+ h("div.infodrawer-body", h(ErrorBoundary, h(contentContainer, children))),
42
44
  ]);
43
45
  }
44
46