@macrostrat/map-interface 1.0.11 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format
4
4
  is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.1.0] - 2024-11-16
8
+
9
+ - Improve map state management with `zustand` (in `@macrostrat/mapbox-react`)
10
+ - Add `styleType` prop to `DevMapPage` component to allow setting "standard"
11
+ Mapbox styles or "macrostrat" styles (the default)
12
+
13
+ ## [1.0.12] - 2024-11-13
14
+
15
+ - Add a `bounds` option to the `DevMapPage` component
16
+
7
17
  ## [1.0.11] - 2024-11-07
8
18
 
9
19
  - Fix bundling again
@@ -958,4 +958,4 @@
958
958
  .expansion-panel-detail-body_1340c8 {
959
959
  display: inline;
960
960
  }
961
- /*# sourceMappingURL=module.css.map */
961
+ /*# sourceMappingURL=index.cjs.css.map */
@@ -1 +1 @@
1
- {"mappings":"ACAA;;;;;;;AAME;;;;;AAIA;;;;;;;;;;;AAUE;;;;;AAIJ;;;;AAGA;;;;;AAIA;;;;;;;AASA;EACE;;;;;;;ACzCF;;;;AAGE;;;;AAGF;;;;;;;;;AAQE;;;;AAGA;;;;AAGA;;;;AAGF;;;;AAGE;;;;;AAIF;;;;;;;;;;;AAUE;;;;;AAME;;;;;AAKJ;;;;AAGA;;;;;;;;AAQA;EACE;;;;;AC/DF;;;;;;;;;AASI;;;;AAGF;;;;;;AAOA;;;;AAIE;;;;AAGF;;;;AAGA;;;;AAGA;;;;AAME;;;;AAGF;;;;AAIE;;;;;AAME;;;;;;;;;;;;;;;;;;;;;;AAgBJ;;;;;;;;;AAOA;;;;;;;;;;AAYF;;;;;AAME;;;;AAGA;;;;;AAKE;;;;;;AAKF;;;;AAEF;;;;AAGE;;;;AAGE;;;;AAEJ;;;;;AAKI;;;;;;;;;AAKJ;;;;;;;;;AAOE;;;;;;;;;;;;;;AASA;;;;;;;AAKA;;;;;;;;;;;;;;;;;AAYA;;;;;AAGF;;;;AAGE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;;;AAKA;;;;;;;;AAKA;;;;;AAEF;;;;;AAIA;;;;AAGE;;;;AAGE;;;;AAGA;;;;AAIA;;;;AAGF;;;;AAGA;;;;;;;;AAME;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAIE;;;;;;;;;;;;;;;;AAcJ;;;;;;;;;;;;;;;;;;;;;;;AAqBA;;;;;;;;;;;;AAaF;EAAA;;;;;;EAME;;;;;;EAGF;;;;EAIE;;;;EAGA;;;;;;;;;;;;;;;;EA4BE;;;;;;;EAMA;;;;;;;;;;;;;;;;;;;;;;;;;EAoBJ;;;;;EAME;;;;EAIA;;;;;;;;;;;EASE;;;;;EAIA;;;;EAGA;;;;EAGE;;;;EAQF;;;;;AAKA;;;;;;;;;;AAQA;;;;AAGA;;;;AAGA;;;;;;;;;;;;;;;;AAeF;;;;AAQE;;;;AAGA;;;;;;;;;EAQF;;;;EAGA;;;;;EAOI;;;;EAGA;;;;;;;;;;;;;;AAaF;EACE;;;;EAGA;;;;EAGA;;;;;AC7eN;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBE;;;;;;;AAKE;;;;;AAGF;;;;;AAGF;;;;;;;;;;AAMA;;;;AAGE;;;;AAEE;;;;;AAGF;;;;;;;;;;;AASE;;;;ACjDJ;;;;;;;;;;;;;;AAYE;;;;;;AAIA;;;;AAEA;;;;;;;;;;;;;;AAaA;;;;;AAMA;;;;AAGE;;;;;AAGA;;;;;AAIA;;;;AAEA;;;;;;;;;AAOE;;;;;;;;;;;;AASJ;;;;AAEE;;;;AAEA;;;;;AAGF;;;;AAEE;;;;;AAGE;;;;AAEN;;;;;;;;;;;;;;;;;;;;;;;;AAoBE;;;;;;;;AAKA;;;;;;;;AAKA;;;;AAGA;;;;;;;;;;;AASE;;;;;;;;AAOF;;;;AAGA","sources":["026f05482703be1f","packages/map-interface/src/context-panel/main.module.sass","packages/map-interface/src/location-panel/main.module.sass","packages/map-interface/src/main.module.sass","packages/map-interface/src/dev/main.module.sass","packages/map-interface/src/expansion-panel/main.module.sass"],"sourcesContent":["@import \"ae7b07f141202fc9\";\n@import \"48f0a4a6f8ddc91e\";\n@import \"82cdba93b0548a93\";\n@import \"07c2aff8cd76b425\";\n@import \"b685950deb9cf075\";\n",".searchbar-holder\n transition: margin 300ms\n display: flex\n flex-direction: column\n margin: 0\n\n .navbar-holder\n display: flex\n flex-direction: row\n\n .searchbar\n width: 100%\n background-color: var(--panel-background-color)\n border-radius: 5px\n padding: var(--navbar-padding, 10px)\n display: flex\n flex-direction: row\n align-items: center\n gap: 5px\n\n :global(.bp5-input-group)\n flex-grow: 1\n cursor: text\n\n.navbar\n min-height: 50px\n\n:global(.bp5-navbar) > .loading-button\n width: 40px\n height: 40px\n\n.status-tongue\n background-color: var(--panel-background-color)\n margin: 5px\n margin-bottom: 0\n margin-top: -12px\n padding: 0\n padding-top: 12px\n overflow: hidden\n\n@media screen and (max-width: 768px)\n .status-tongue\n max-width: 100vw\n margin: 0\n border-radius: 0\n margin-top: -3px\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: 1em\n border-bottom: 1px solid var(--panel-rule-color)\n\n .spacer\n flex-grow: 1\n\n .left-icon\n padding: 7px\n\n .position-controls :global(.bp5-button)\n font-size: 12px !important\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: 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 1em\n\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",".map-container\n display: flex\n flex-direction: column\n position: relative\n width: 100%\n height: 100%\n overflow: hidden\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\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 &.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",".feature-panel\n position: relative\n margin: 0 -1em\n\n.key-value\n display: inline-block\n margin-right: 1em\n .key\n font-weight: bold\n font-size: 0.9em\n &:after\n content: ': '\n .value\n font-size: 0.9em\n\n.feature-properties\n position: relative\n &:before\n content: \"–\"\n position: absolute\n top: 4px\n left: 0\n\n.feature-header h3\n margin-bottom: 0\n margin-top: 0.5em\n\n.feature-group\n border-bottom: 1px solid var(--panel-rule-inner)\n margin-bottom: 0.5em\n &:last-child\n border-bottom: none\n\n.tile-info\n display: flex\n flex-direction: row\n align-items: baseline\n h3\n margin-right: 0.5em\n\n.opacity-slider\n margin: 0 1em 0.5em\n :global\n .bp5-slider-handle .bp5-slider-label\n background-color: var(--secondary-color)\n color: var(--text-color)\n\n.unit-number\n .unit\n font-size: 0.9em\n margin-left: 0.2em\n font-weight: bold\n\n.page\n margin: 2em auto\n max-width: 50em\n\n.dev-index-page\n overflow-y: scroll\n","\n.panel-subhead\n padding: 0.2em var(--box-horizontal-padding)\n border-top: 1px solid var(--panel-rule-color)\n border-bottom: 1px solid var(--panel-rule-color)\n background-color: var(--accent-color)\n display: flex\n flex-direction: row\n align-items: center\n z-index: 1\n gap: var(--box-horizontal-padding)\n top: -1px\n position: sticky\n h1, h2, h3, h4\n font-family: Montserrat,sans-serif\n font-weight: 700\n margin: 0.2em 0\n h4\n font-weight: 600\n .title\n flex-grow: 1\n\n// :global(.bp5-dark) .panel-subhead\n// margin 0 1px\n\n.info-panel-section\n &>.panel-subhead\n margin: -1px calc(var(--panel-padding-h) * -1) 0\n\n.expansion-panel\n padding: 0\n flex-wrap: wrap\n margin-top: -1px\n // &.collapsed\n // .expansion-panel-header\n // border-bottom-width: 0;\n\n.sub-expansion-panel\n margin: -1px calc(var(--panel-padding-h) * -0.5) 0\n overflow: hidden\n &:first-child\n .expansion-panel-header\n border-top-width: 0\n .panel-subhead\n border-top: none\n border-bottom: none\n\n .expansion-panel-header\n background-color: var(--accent-secondary-color)\n cursor: pointer\n &:hover\n background-color: var(--accent-secondary-hover-color)\n h2, h3, h4\n font-weight: 500\n border-bottom: 1px solid var(--tertiary-border-color)\n border-top: 1px solid var(--tertiary-border-color)\n margin-top: -1px\n padding: 5px 1em 5px\n align-items: center\n\n.expansion-summary-title-help\n margin-left: 5px\n :global(.bp5-icon)\n margin-left: 5px\n\n.expansion-panel-header\n cursor: pointer\n &:hover\n background-color: var(--accent-hover-color)\n :global(.bp5-icon)\n transform: translate(0,3px)\n\n.expansion-children\n padding: 5px 1em 10px\n .expansion-panel\n margin-left: -1em\n margin-right: -1em\n &:first-child\n margin-top: -5px\n\n.expansion-panel-subtext\n font-size: 85%\n font-weight: 400\n\n:global\n .expansion-panel-root\n padding-left: 15px !important\n\n .expansion-panel-detail\n display: block !important\n padding: 0 !important\n\n .expansion-panel-detail-sub\n display: block !important\n\n// New expandable panel for details\n.expandable-details-main\n display: flex\n flex-direction: row\n align-items: center\n justify-content: space-between\n margin: 3px 0\n\n.expandable-details-header\n display: inline-flex\n flex-direction: row\n align-items: baseline\n flex-grow: 1\n\n.expandable-details-children\n position: relative\n\n.expandable-details-toggle\n :global(.bp5-button)\n font-size: 10px\n\n.expandable-details\n &.macrostrat-unit\n .title:after\n content: none\n .title\n margin-right: 1em\n &:after\n content: \":\"\n\n.expansion-body\n display: inline-block\n //flex-direction row\n align-items: baseline\n background-color: var(--tertiary-background)\n padding: 2px 6px\n border-radius: 4px\n width: 100%\n box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.2)\n margin-bottom: 6px\n\n.expansion-panel-detail-header\n font-size: 90%\n font-style: italic\n margin-right: 1em\n display: inline\n color: var(--secondary-color)\n &:after\n content: \":\"\n\n.expansion-panel-detail-body\n display: inline\n"],"names":[],"version":3,"file":"main.css.map"}
1
+ {"mappings":"ACAA;;;;;;;AAME;;;;;AAIA;;;;;;;;;;;AAUE;;;;;AAIJ;;;;AAGA;;;;;AAIA;;;;;;;AASA;EACE;;;;;;;ACzCF;;;;AAGE;;;;AAGF;;;;;;;;;AAQE;;;;AAGA;;;;AAGA;;;;AAGF;;;;AAGE;;;;;AAIF;;;;;;;;;;;AAUE;;;;;AAME;;;;;AAKJ;;;;AAGA;;;;;;;;AAQA;EACE;;;;;AC/DF;;;;;;;;;AASI;;;;AAGF;;;;;;AAOA;;;;AAIE;;;;AAGF;;;;AAGA;;;;AAGA;;;;AAME;;;;AAGF;;;;AAIE;;;;;AAME;;;;;;;;;;;;;;;;;;;;;;AAgBJ;;;;;;;;;AAOA;;;;;;;;;;AAYF;;;;;AAME;;;;AAGA;;;;;AAKE;;;;;;AAKF;;;;AAEF;;;;AAGE;;;;AAGE;;;;AAEJ;;;;;AAKI;;;;;;;;;AAKJ;;;;;;;;;AAOE;;;;;;;;;;;;;;AASA;;;;;;;AAKA;;;;;;;;;;;;;;;;;AAYA;;;;;AAGF;;;;AAGE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;;;AAKA;;;;;;;;AAKA;;;;;AAEF;;;;;AAIA;;;;AAGE;;;;AAGE;;;;AAGA;;;;AAIA;;;;AAGF;;;;AAGA;;;;;;;;AAME;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAGA;;;;AAIE;;;;;;;;;;;;;;;;AAcJ;;;;;;;;;;;;;;;;;;;;;;;AAqBA;;;;;;;;;;;;AAaF;EAAA;;;;;;EAME;;;;;;EAGF;;;;EAIE;;;;EAGA;;;;;;;;;;;;;;;;EA4BE;;;;;;;EAMA;;;;;;;;;;;;;;;;;;;;;;;;;EAoBJ;;;;;EAME;;;;EAIA;;;;;;;;;;;EASE;;;;;EAIA;;;;EAGA;;;;EAGE;;;;EAQF;;;;;AAKA;;;;;;;;;;AAQA;;;;AAGA;;;;AAGA;;;;;;;;;;;;;;;;AAeF;;;;AAQE;;;;AAGA;;;;;;;;;EAQF;;;;EAGA;;;;;EAOI;;;;EAGA;;;;;;;;;;;;;;AAaF;EACE;;;;EAGA;;;;EAGA;;;;;AC7eN;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBE;;;;;;;AAKE;;;;;AAGF;;;;;AAGF;;;;;;;;;;AAMA;;;;AAGE;;;;AAEE;;;;;AAGF;;;;;;;;;;;AASE;;;;ACjDJ;;;;;;;;;;;;;;AAYE;;;;;;AAIA;;;;AAEA;;;;;;;;;;;;;;AAaA;;;;;AAMA;;;;AAGE;;;;;AAGA;;;;;AAIA;;;;AAEA;;;;;;;;;AAOE;;;;;;;;;;;;AASJ;;;;AAEE;;;;AAEA;;;;;AAGF;;;;AAEE;;;;;AAGE;;;;AAEN;;;;;;;;;;;;;;;;;;;;;;;;AAoBE;;;;;;;;AAKA;;;;;;;;AAKA;;;;AAGA;;;;;;;;;;;AASE;;;;;;;;AAOF;;;;AAGA","sources":["026f05482703be1f","packages/map-interface/src/context-panel/main.module.sass","packages/map-interface/src/location-panel/main.module.sass","packages/map-interface/src/main.module.sass","packages/map-interface/src/dev/main.module.sass","packages/map-interface/src/expansion-panel/main.module.sass"],"sourcesContent":["@import \"ae7b07f141202fc9\";\n@import \"48f0a4a6f8ddc91e\";\n@import \"82cdba93b0548a93\";\n@import \"07c2aff8cd76b425\";\n@import \"b685950deb9cf075\";\n",".searchbar-holder\n transition: margin 300ms\n display: flex\n flex-direction: column\n margin: 0\n\n .navbar-holder\n display: flex\n flex-direction: row\n\n .searchbar\n width: 100%\n background-color: var(--panel-background-color)\n border-radius: 5px\n padding: var(--navbar-padding, 10px)\n display: flex\n flex-direction: row\n align-items: center\n gap: 5px\n\n :global(.bp5-input-group)\n flex-grow: 1\n cursor: text\n\n.navbar\n min-height: 50px\n\n:global(.bp5-navbar) > .loading-button\n width: 40px\n height: 40px\n\n.status-tongue\n background-color: var(--panel-background-color)\n margin: 5px\n margin-bottom: 0\n margin-top: -12px\n padding: 0\n padding-top: 12px\n overflow: hidden\n\n@media screen and (max-width: 768px)\n .status-tongue\n max-width: 100vw\n margin: 0\n border-radius: 0\n margin-top: -3px\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: 1em\n border-bottom: 1px solid var(--panel-rule-color)\n\n .spacer\n flex-grow: 1\n\n .left-icon\n padding: 7px\n\n .position-controls :global(.bp5-button)\n font-size: 12px !important\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: 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 1em\n\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",".map-container\n display: flex\n flex-direction: column\n position: relative\n width: 100%\n height: 100%\n overflow: hidden\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\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 &.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",".feature-panel\n position: relative\n margin: 0 -1em\n\n.key-value\n display: inline-block\n margin-right: 1em\n .key\n font-weight: bold\n font-size: 0.9em\n &:after\n content: ': '\n .value\n font-size: 0.9em\n\n.feature-properties\n position: relative\n &:before\n content: \"–\"\n position: absolute\n top: 4px\n left: 0\n\n.feature-header h3\n margin-bottom: 0\n margin-top: 0.5em\n\n.feature-group\n border-bottom: 1px solid var(--panel-rule-inner)\n margin-bottom: 0.5em\n &:last-child\n border-bottom: none\n\n.tile-info\n display: flex\n flex-direction: row\n align-items: baseline\n h3\n margin-right: 0.5em\n\n.opacity-slider\n margin: 0 1em 0.5em\n :global\n .bp5-slider-handle .bp5-slider-label\n background-color: var(--secondary-color)\n color: var(--text-color)\n\n.unit-number\n .unit\n font-size: 0.9em\n margin-left: 0.2em\n font-weight: bold\n\n.page\n margin: 2em auto\n max-width: 50em\n\n.dev-index-page\n overflow-y: scroll\n","\n.panel-subhead\n padding: 0.2em var(--box-horizontal-padding)\n border-top: 1px solid var(--panel-rule-color)\n border-bottom: 1px solid var(--panel-rule-color)\n background-color: var(--accent-color)\n display: flex\n flex-direction: row\n align-items: center\n z-index: 1\n gap: var(--box-horizontal-padding)\n top: -1px\n position: sticky\n h1, h2, h3, h4\n font-family: Montserrat,sans-serif\n font-weight: 700\n margin: 0.2em 0\n h4\n font-weight: 600\n .title\n flex-grow: 1\n\n// :global(.bp5-dark) .panel-subhead\n// margin 0 1px\n\n.info-panel-section\n &>.panel-subhead\n margin: -1px calc(var(--panel-padding-h) * -1) 0\n\n.expansion-panel\n padding: 0\n flex-wrap: wrap\n margin-top: -1px\n // &.collapsed\n // .expansion-panel-header\n // border-bottom-width: 0;\n\n.sub-expansion-panel\n margin: -1px calc(var(--panel-padding-h) * -0.5) 0\n overflow: hidden\n &:first-child\n .expansion-panel-header\n border-top-width: 0\n .panel-subhead\n border-top: none\n border-bottom: none\n\n .expansion-panel-header\n background-color: var(--accent-secondary-color)\n cursor: pointer\n &:hover\n background-color: var(--accent-secondary-hover-color)\n h2, h3, h4\n font-weight: 500\n border-bottom: 1px solid var(--tertiary-border-color)\n border-top: 1px solid var(--tertiary-border-color)\n margin-top: -1px\n padding: 5px 1em 5px\n align-items: center\n\n.expansion-summary-title-help\n margin-left: 5px\n :global(.bp5-icon)\n margin-left: 5px\n\n.expansion-panel-header\n cursor: pointer\n &:hover\n background-color: var(--accent-hover-color)\n :global(.bp5-icon)\n transform: translate(0,3px)\n\n.expansion-children\n padding: 5px 1em 10px\n .expansion-panel\n margin-left: -1em\n margin-right: -1em\n &:first-child\n margin-top: -5px\n\n.expansion-panel-subtext\n font-size: 85%\n font-weight: 400\n\n:global\n .expansion-panel-root\n padding-left: 15px !important\n\n .expansion-panel-detail\n display: block !important\n padding: 0 !important\n\n .expansion-panel-detail-sub\n display: block !important\n\n// New expandable panel for details\n.expandable-details-main\n display: flex\n flex-direction: row\n align-items: center\n justify-content: space-between\n margin: 3px 0\n\n.expandable-details-header\n display: inline-flex\n flex-direction: row\n align-items: baseline\n flex-grow: 1\n\n.expandable-details-children\n position: relative\n\n.expandable-details-toggle\n :global(.bp5-button)\n font-size: 10px\n\n.expandable-details\n &.macrostrat-unit\n .title:after\n content: none\n .title\n margin-right: 1em\n &:after\n content: \":\"\n\n.expansion-body\n display: inline-block\n //flex-direction row\n align-items: baseline\n background-color: var(--tertiary-background)\n padding: 2px 6px\n border-radius: 4px\n width: 100%\n box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.2)\n margin-bottom: 6px\n\n.expansion-panel-detail-header\n font-size: 90%\n font-style: italic\n margin-right: 1em\n display: inline\n color: var(--secondary-color)\n &:after\n content: \":\"\n\n.expansion-panel-detail-body\n display: inline\n"],"names":[],"version":3,"file":"index.cjs.css.map"}
@@ -1,5 +1,4 @@
1
- require("./main.css");
2
- var $9B3TU$react = require("react");
1
+ require("./index.cjs.css");
3
2
  var $9B3TU$blueprintjscore = require("@blueprintjs/core");
4
3
  var $9B3TU$macrostrathyper = require("@macrostrat/hyper");
5
4
  var $9B3TU$macrostratmapboxreact = require("@macrostrat/mapbox-react");
@@ -8,6 +7,7 @@ var $9B3TU$classnames = require("classnames");
8
7
  var $9B3TU$macrostratmapboxutils = require("@macrostrat/mapbox-utils");
9
8
  var $9B3TU$d3format = require("d3-format");
10
9
  var $9B3TU$mapboxgl = require("mapbox-gl");
10
+ var $9B3TU$react = require("react");
11
11
  var $9B3TU$macrostratcolorutils = require("@macrostrat/color-utils");
12
12
  var $9B3TU$transitionhook = require("transition-hook");
13
13
  var $9B3TU$underscore = require("underscore");
@@ -48,7 +48,6 @@ $parcel$export($fce5fc950d1fe35b$exports, "MapLoadingButton", () => $fce5fc950d1
48
48
  $parcel$export($fce5fc950d1fe35b$exports, "FloatingNavbar", () => $fce5fc950d1fe35b$export$a8cc0062d02a3841);
49
49
 
50
50
 
51
-
52
51
  var $7a1b0f72a2e7f87d$exports = {};
53
52
 
54
53
  $parcel$export($7a1b0f72a2e7f87d$exports, "loading-button", () => $7a1b0f72a2e7f87d$export$fcaa8d3bc8e9cf1e, (v) => $7a1b0f72a2e7f87d$export$fcaa8d3bc8e9cf1e = v);
@@ -89,13 +88,10 @@ function $fce5fc950d1fe35b$export$4ec83e90d030b2f3({ isLoading: isLoading = fals
89
88
  });
90
89
  }
91
90
  function $fce5fc950d1fe35b$export$9e3bae3c08bde368(props) {
92
- const { isLoading: isLoading } = (0, $9B3TU$macrostratmapboxreact.useMapStatus)();
93
- const mapIsLoading = (0, $9B3TU$react.useMemo)(()=>isLoading, [
94
- isLoading
95
- ]);
91
+ const isLoading = (0, $9B3TU$macrostratmapboxreact.useMapStatus)((s)=>s.isLoading);
96
92
  return $fce5fc950d1fe35b$var$h($fce5fc950d1fe35b$export$4ec83e90d030b2f3, {
97
93
  ...props,
98
- isLoading: mapIsLoading
94
+ isLoading: isLoading
99
95
  });
100
96
  }
101
97
  function $fce5fc950d1fe35b$export$a8cc0062d02a3841({ className: className, children: children, headerElement: headerElement = null, title: title = null, statusElement: statusElement = null, rightElement: rightElement = null, height: height, width: width, style: style = {} }) {
@@ -1006,6 +1002,7 @@ function $2611a7b4364593e5$export$2ab96428dea558d6({ containerRef: containerRef,
1006
1002
  function $2611a7b4364593e5$export$f6eeee399afc4e9a({ onMapMoved: onMapMoved = null }) {
1007
1003
  const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1008
1004
  const dispatch = (0, $9B3TU$macrostratmapboxreact.useMapDispatch)();
1005
+ const isInitialized = (0, $9B3TU$macrostratmapboxreact.useMapInitialized)();
1009
1006
  const mapMovedCallback = (0, $9B3TU$react.useCallback)(()=>{
1010
1007
  const map = mapRef.current;
1011
1008
  if (map == null) return;
@@ -1016,9 +1013,9 @@ function $2611a7b4364593e5$export$f6eeee399afc4e9a({ onMapMoved: onMapMoved = nu
1016
1013
  });
1017
1014
  onMapMoved?.(mapPosition, map);
1018
1015
  }, [
1019
- mapRef.current,
1020
1016
  onMapMoved,
1021
- dispatch
1017
+ dispatch,
1018
+ isInitialized
1022
1019
  ]);
1023
1020
  (0, $9B3TU$react.useEffect)(()=>{
1024
1021
  // Get the current value of the map. Useful for gradually moving away
@@ -1041,6 +1038,7 @@ function $2611a7b4364593e5$export$e57f9eaa51773f82({ ignoredSources: ignoredSour
1041
1038
  const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1042
1039
  const loadingRef = (0, $9B3TU$react.useRef)(false);
1043
1040
  const dispatch = (0, $9B3TU$macrostratmapboxreact.useMapDispatch)();
1041
+ const isInitialized = (0, $9B3TU$macrostratmapboxreact.useMapInitialized)();
1044
1042
  (0, $9B3TU$react.useEffect)(()=>{
1045
1043
  const map = mapRef.current;
1046
1044
  const mapIsLoading = loadingRef.current;
@@ -1074,35 +1072,34 @@ function $2611a7b4364593e5$export$e57f9eaa51773f82({ ignoredSources: ignoredSour
1074
1072
  };
1075
1073
  }, [
1076
1074
  ignoredSources,
1077
- mapRef.current,
1078
- mapIsLoading
1075
+ mapIsLoading,
1076
+ isInitialized
1079
1077
  ]);
1080
1078
  return null;
1081
1079
  }
1082
1080
  function $2611a7b4364593e5$export$5c90a91c7455938c({ position: position, setPosition: setPosition, centerMarker: centerMarker = true }) {
1083
1081
  const mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1084
1082
  const markerRef = (0, $9B3TU$react.useRef)(null);
1083
+ const isInitialized = (0, $9B3TU$macrostratmapboxreact.useMapInitialized)();
1085
1084
  (0, $3490fc4f4bda12f7$export$278090850f6b3a9f)(mapRef, markerRef, position);
1086
- const handleMapClick = (0, $9B3TU$react.useCallback)((event)=>{
1087
- setPosition(event.lngLat, event, mapRef.current);
1088
- // We should integrate this with the "easeToCenter" hook
1089
- if (centerMarker) mapRef.current?.flyTo({
1090
- center: event.lngLat,
1091
- duration: 800
1092
- });
1093
- }, [
1094
- mapRef.current,
1095
- setPosition
1096
- ]);
1097
1085
  (0, $9B3TU$react.useEffect)(()=>{
1098
1086
  const map = mapRef.current;
1099
- if (map != null && setPosition != null) map.on("click", handleMapClick);
1087
+ if (map == null || setPosition == null) return;
1088
+ const handleMapClick = (event)=>{
1089
+ setPosition(event.lngLat, event, mapRef.current);
1090
+ // We should integrate this with the "easeToCenter" hook
1091
+ if (centerMarker) mapRef.current?.flyTo({
1092
+ center: event.lngLat,
1093
+ duration: 800
1094
+ });
1095
+ };
1096
+ map.on("click", handleMapClick);
1100
1097
  return ()=>{
1101
1098
  map?.off("click", handleMapClick);
1102
1099
  };
1103
1100
  }, [
1104
- mapRef.current,
1105
- setPosition
1101
+ setPosition,
1102
+ isInitialized
1106
1103
  ]);
1107
1104
  return null;
1108
1105
  }
@@ -1216,54 +1213,46 @@ function $12b6032029db16d4$export$ab1e7a67d6ec5ad8(props) {
1216
1213
  let mapRef = (0, $9B3TU$macrostratmapboxreact.useMapRef)();
1217
1214
  const ref = (0, $9B3TU$react.useRef)();
1218
1215
  const parentRef = (0, $9B3TU$react.useRef)();
1219
- // Keep track of map position for reloads
1220
- (0, $9B3TU$react.useEffect)(()=>{
1221
- console.log("Map updated", mapRef.current);
1222
- }, [
1223
- mapRef.current
1224
- ]);
1225
1216
  (0, $9B3TU$react.useEffect)(()=>{
1226
1217
  if (style == null) return;
1227
- if (mapRef.current != null) {
1218
+ let map = mapRef.current;
1219
+ if (map != null) {
1228
1220
  console.log("Setting style", style);
1229
- mapRef.current.setStyle(style);
1230
- return;
1221
+ map.setStyle(style);
1222
+ } else {
1223
+ console.log("Initializing map", style);
1224
+ const map = initializeMap(ref.current, {
1225
+ style: style,
1226
+ projection: projection,
1227
+ mapPosition: mapPosition,
1228
+ ...rest
1229
+ });
1230
+ dispatch({
1231
+ type: "set-map",
1232
+ payload: map
1233
+ });
1234
+ map.setPadding((0, $3490fc4f4bda12f7$export$bb78f9f01775eef1)(ref, parentRef), {
1235
+ animate: false
1236
+ });
1237
+ onMapLoaded?.(map);
1231
1238
  }
1232
- const map = initializeMap(ref.current, {
1233
- style: style,
1234
- projection: projection,
1235
- mapPosition: mapPosition,
1236
- ...rest
1237
- });
1238
- map.setPadding((0, $3490fc4f4bda12f7$export$bb78f9f01775eef1)(ref, parentRef), {
1239
- animate: false
1240
- });
1241
- map.on("style.load", ()=>{
1239
+ const loadCallback = ()=>{
1242
1240
  onStyleLoaded?.(map);
1243
1241
  dispatch({
1244
1242
  type: "set-style-loaded",
1245
1243
  payload: true
1246
1244
  });
1247
- });
1248
- onMapLoaded?.(map);
1249
- dispatch({
1250
- type: "set-map",
1251
- payload: map
1252
- });
1245
+ };
1246
+ map = mapRef.current;
1247
+ if (map.isStyleLoaded()) // Catch a race condition where the style is loaded before the callback is set
1248
+ loadCallback();
1249
+ map.on("style.load", loadCallback);
1250
+ return ()=>{
1251
+ map.off("style.load", loadCallback);
1252
+ };
1253
1253
  }, [
1254
1254
  style
1255
1255
  ]);
1256
- // Map style updating
1257
- // useEffect(() => {
1258
- // if (mapRef?.current == null || style == null) return;
1259
- // mapRef?.current?.setStyle(style);
1260
- // }, [mapRef.current, style]);
1261
- // Set map position if it changes
1262
- // useEffect(() => {
1263
- // const map = mapRef.current;
1264
- // if (map == null || mapPosition == null) return;
1265
- // setMapPosition(map, mapPosition);
1266
- // }, [mapPosition]);
1267
1256
  const _computedMapPosition = (0, $9B3TU$macrostratmapboxreact.useMapPosition)();
1268
1257
  const { mapUse3D: mapUse3D, mapIsRotated: mapIsRotated } = (0, $9B3TU$macrostratmapboxutils.mapViewInfo)(_computedMapPosition);
1269
1258
  // Get map projection
@@ -1810,7 +1799,7 @@ function $db14eb7a5c07abdb$export$617d79dae526d2cf({ features: features }) {
1810
1799
 
1811
1800
 
1812
1801
  const $6f5ca387ac26c0b5$export$dda1d9f60106f0e9 = (0, ($parcel$interopDefault($9B3TU$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($33088e8384af337c$exports))));
1813
- function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspector", headerElement: headerElement = null, transformRequest: transformRequest = null, mapPosition: mapPosition = null, mapboxToken: mapboxToken = null, overlayStyle: overlayStyle = null, children: children, style: style, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null, fitViewport: fitViewport = true }) {
1802
+ function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspector", headerElement: headerElement = null, transformRequest: transformRequest = null, mapPosition: mapPosition = null, mapboxToken: mapboxToken = null, overlayStyle: overlayStyle = null, children: children, style: style, bounds: bounds = null, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null, fitViewport: fitViewport = true, styleType: styleType = "macrostrat" }) {
1814
1803
  /* We apply a custom style to the panel container when we are interacting
1815
1804
  with the search bar, so that we can block map interactions until search
1816
1805
  bar focus is lost.
@@ -1819,15 +1808,15 @@ function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspect
1819
1808
  */ const dark = (0, $9B3TU$macrostratuicomponents.useDarkMode)();
1820
1809
  const isEnabled = dark?.isEnabled;
1821
1810
  if (mapboxToken != null) (0, ($parcel$interopDefault($9B3TU$mapboxgl))).accessToken = mapboxToken;
1822
- style ??= isEnabled ? "mapbox://styles/mapbox/dark-v10" : "mapbox://styles/mapbox/light-v10";
1811
+ if (styleType == "macrostrat") style ??= isEnabled ? "mapbox://styles/jczaplewski/cl5uoqzzq003614o6url9ou9z?optimize=true" : "mapbox://styles/jczaplewski/clatdbkw4002q14lov8zx0bm0?optimize=true";
1812
+ else style ??= isEnabled ? "mapbox://styles/mapbox/dark-v10" : "mapbox://styles/mapbox/light-v10";
1823
1813
  const [isOpen, setOpen] = (0, $9B3TU$react.useState)(false);
1824
1814
  const [state, setState] = (0, $9B3TU$macrostratuicomponents.useStoredState)("macrostrat:dev-map-page", {
1825
1815
  showTileExtent: false,
1826
1816
  xRay: false
1827
1817
  });
1828
1818
  const { showTileExtent: showTileExtent, xRay: xRay } = state;
1829
- const [actualStyle, setActualStyle] = (0, $9B3TU$react.useState)(style);
1830
- console.log("actualStyle", actualStyle);
1819
+ const [actualStyle, setActualStyle] = (0, $9B3TU$react.useState)(null);
1831
1820
  (0, $9B3TU$react.useEffect)(()=>{
1832
1821
  (0, $8646508ae99a5857$export$e739dc8dfc0db9a6)(style, overlayStyle, {
1833
1822
  mapboxToken: mapboxToken,
@@ -1892,6 +1881,7 @@ function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspect
1892
1881
  title: title
1893
1882
  }),
1894
1883
  contextPanel: $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $c3311f59335df34d$export$ec68dd77edbe678b), [
1884
+ children,
1895
1885
  $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $9B3TU$blueprintjscore.Switch), {
1896
1886
  checked: xRay,
1897
1887
  label: "X-ray mode",
@@ -1901,8 +1891,7 @@ function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspect
1901
1891
  xRay: !xRay
1902
1892
  });
1903
1893
  }
1904
- }),
1905
- children
1894
+ })
1906
1895
  ]),
1907
1896
  detailPanel: detailElement,
1908
1897
  contextPanelOpen: isOpen,
@@ -1914,7 +1903,8 @@ function $6f5ca387ac26c0b5$export$c5febf3ae8816972({ title: title = "Map inspect
1914
1903
  projection: {
1915
1904
  name: "globe"
1916
1905
  },
1917
- mapboxToken: mapboxToken
1906
+ mapboxToken: mapboxToken,
1907
+ bounds: bounds
1918
1908
  }, [
1919
1909
  $6f5ca387ac26c0b5$export$dda1d9f60106f0e9((0, $db14eb7a5c07abdb$export$214daccdda0f4ac6), {
1920
1910
  selectedLocation: inspectPosition,
@@ -1961,4 +1951,4 @@ $parcel$exportWildcard(module.exports, $860d9939f7032c69$exports);
1961
1951
  $parcel$exportWildcard(module.exports, $750d69d73bfbdc9a$exports);
1962
1952
 
1963
1953
 
1964
- //# sourceMappingURL=main.cjs.map
1954
+ //# sourceMappingURL=index.cjs.js.map