@macrostrat/map-interface 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/{container.72611900.js → container.b61e4d0f.js} +2 -2
  3. package/dist/cjs/{container.72611900.js.map → container.b61e4d0f.js.map} +1 -1
  4. package/dist/cjs/{dev.10ac2fb3.js → dev.8ee72000.js} +2 -2
  5. package/dist/{esm/dev.30b435dc.js.map → cjs/dev.8ee72000.js.map} +1 -1
  6. package/dist/cjs/index.js +5 -5
  7. package/dist/cjs/{location-panel.42ca3200.js → location-panel.6a4dc310.js} +2 -2
  8. package/dist/cjs/{location-panel.42ca3200.js.map → location-panel.6a4dc310.js.map} +1 -1
  9. package/dist/cjs/{map-page.9c19b2a9.js → map-page.cde24ee5.js} +5 -5
  10. package/dist/cjs/{map-page.9c19b2a9.js.map → map-page.cde24ee5.js.map} +1 -1
  11. package/dist/cjs/map-view.12e9ea3e.js +178 -0
  12. package/dist/cjs/map-view.12e9ea3e.js.map +1 -0
  13. package/dist/esm/{container.16bde261.js → container.2ebe27af.js} +2 -2
  14. package/dist/esm/{container.16bde261.js.map → container.2ebe27af.js.map} +1 -1
  15. package/dist/esm/{dev.30b435dc.js → dev.58b994e7.js} +2 -2
  16. package/dist/{cjs/dev.10ac2fb3.js.map → esm/dev.58b994e7.js.map} +1 -1
  17. package/dist/esm/index.d.ts +2 -1
  18. package/dist/esm/index.d.ts.map +1 -1
  19. package/dist/esm/index.js +5 -5
  20. package/dist/esm/{location-panel.b56899ab.js → location-panel.f22673f5.js} +2 -2
  21. package/dist/esm/{location-panel.b56899ab.js.map → location-panel.f22673f5.js.map} +1 -1
  22. package/dist/esm/{map-page.93c11cef.js → map-page.f9f59ea0.js} +5 -5
  23. package/dist/esm/{map-page.93c11cef.js.map → map-page.f9f59ea0.js.map} +1 -1
  24. package/dist/esm/map-view.4f256782.js +172 -0
  25. package/dist/esm/map-view.4f256782.js.map +1 -0
  26. package/dist/node/container.abd6f0d2.js.map +1 -1
  27. package/dist/node/{dev.ee1e89e9.js → dev.3cbf6106.js} +2 -2
  28. package/dist/node/{dev.ee1e89e9.js.map → dev.3cbf6106.js.map} +1 -1
  29. package/dist/node/index.js +1 -1
  30. package/dist/node/index.js.map +1 -1
  31. package/dist/node/{map-page.cb4c713e.js → map-page.f99c4a48.js} +2 -2
  32. package/dist/node/{map-page.cb4c713e.js.map → map-page.f99c4a48.js.map} +1 -1
  33. package/dist/node/map-view.77013338.js +2 -0
  34. package/dist/node/map-view.77013338.js.map +1 -0
  35. package/package.json +3 -3
  36. package/src/container.ts +1 -1
  37. package/src/{map-view/index.ts → map-view.ts} +51 -18
  38. package/dist/cjs/map-view.93363b41.js +0 -167
  39. package/dist/cjs/map-view.93363b41.js.map +0 -1
  40. package/dist/cjs/terrain.90f76b4e.js +0 -59
  41. package/dist/cjs/terrain.90f76b4e.js.map +0 -1
  42. package/dist/esm/map-view.a3fe6257.js +0 -161
  43. package/dist/esm/map-view.a3fe6257.js.map +0 -1
  44. package/dist/esm/terrain.f65cf7c5.js +0 -54
  45. package/dist/esm/terrain.f65cf7c5.js.map +0 -1
  46. package/dist/node/map-view.c6746dca.js +0 -2
  47. package/dist/node/map-view.c6746dca.js.map +0 -1
  48. package/dist/node/terrain.96ae432a.js +0 -2
  49. package/dist/node/terrain.96ae432a.js.map +0 -1
  50. package/src/map-view/terrain.ts +0 -63
package/dist/esm/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {LoadingButton as $6e914c81c8e053da$export$4ec83e90d030b2f3, MapLoadingButton as $6e914c81c8e053da$export$9e3bae3c08bde368, FloatingNavbar as $6e914c81c8e053da$export$a8cc0062d02a3841} from "./context-panel.c288c5cd.js";
2
- import {InfoDrawerContainer as $f50c3537aaff0cff$export$83f9a19cf91c2d06, BaseInfoDrawer as $f50c3537aaff0cff$export$a5ddcc2a88716895, DetailsPanel as $f50c3537aaff0cff$export$e54a7f2505304e20, LocationPanel as $f50c3537aaff0cff$export$aa4baff5242ea6e1} from "./location-panel.b56899ab.js";
3
- import {h as $a281a0612311d660$export$dda1d9f60106f0e9, MapInspectorV2 as $a281a0612311d660$export$eab3034e57b46e26, DevMapPage as $a281a0612311d660$export$2391061fbdfb71ef, TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd, FeatureProperties as $b8c84b63e75fe4f2$export$2906e7f4b228efe9, FeatureRecord as $b8c84b63e75fe4f2$export$dc87b4d46cea200d, FeatureSelectionHandler as $b8c84b63e75fe4f2$export$214daccdda0f4ac6, Features as $b8c84b63e75fe4f2$export$617d79dae526d2cf, TileInfo as $b8c84b63e75fe4f2$export$43c75dec9d0b96c, FeaturePanel as $b8c84b63e75fe4f2$export$43277c51a01761c1, buildXRayStyle as $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d, buildInspectorStyle as $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6} from "./dev.30b435dc.js";
4
- import {PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b, DetailPanelStyle as $4bdfa9cd8240b2fd$export$612ca936d3ed4784, MapAreaContainer as $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290, MapStyledContainer as $4bdfa9cd8240b2fd$export$fa395a37c3898ae3} from "./container.16bde261.js";
5
- import {MapView as $9e150e311a3261e9$export$ab1e7a67d6ec5ad8, MapTerrainManager as $9e150e311a3261e9$export$cee395a8a2a00b29} from "./map-view.a3fe6257.js";
2
+ import {InfoDrawerContainer as $f50c3537aaff0cff$export$83f9a19cf91c2d06, BaseInfoDrawer as $f50c3537aaff0cff$export$a5ddcc2a88716895, DetailsPanel as $f50c3537aaff0cff$export$e54a7f2505304e20, LocationPanel as $f50c3537aaff0cff$export$aa4baff5242ea6e1} from "./location-panel.f22673f5.js";
3
+ import {h as $a281a0612311d660$export$dda1d9f60106f0e9, MapInspectorV2 as $a281a0612311d660$export$eab3034e57b46e26, DevMapPage as $a281a0612311d660$export$2391061fbdfb71ef, TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd, FeatureProperties as $b8c84b63e75fe4f2$export$2906e7f4b228efe9, FeatureRecord as $b8c84b63e75fe4f2$export$dc87b4d46cea200d, FeatureSelectionHandler as $b8c84b63e75fe4f2$export$214daccdda0f4ac6, Features as $b8c84b63e75fe4f2$export$617d79dae526d2cf, TileInfo as $b8c84b63e75fe4f2$export$43c75dec9d0b96c, FeaturePanel as $b8c84b63e75fe4f2$export$43277c51a01761c1, buildXRayStyle as $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d, buildInspectorStyle as $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6} from "./dev.58b994e7.js";
4
+ import {PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b, DetailPanelStyle as $4bdfa9cd8240b2fd$export$612ca936d3ed4784, MapAreaContainer as $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290, MapStyledContainer as $4bdfa9cd8240b2fd$export$fa395a37c3898ae3} from "./container.2ebe27af.js";
5
+ import {MapView as $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8, MapTerrainManager as $0118fc9193bb1bf4$export$cee395a8a2a00b29} from "./map-view.4f256782.js";
6
6
  import {MapBottomControls as $91d5aa004eeb2226$export$db1a2e058a06fb5c} from "./controls.f757ce16.js";
7
7
  import {MapResizeManager as $4bc3dd5f0732eed3$export$31b2e088aff2dc5d, MapPaddingManager as $4bc3dd5f0732eed3$export$2ab96428dea558d6, MapMovedReporter as $4bc3dd5f0732eed3$export$f6eeee399afc4e9a, MapLoadingReporter as $4bc3dd5f0732eed3$export$e57f9eaa51773f82, MapMarker as $4bc3dd5f0732eed3$export$5c90a91c7455938c, useBasicStylePair as $4bc3dd5f0732eed3$export$566518253d2584f8} from "./helpers.fb1d7227.js";
8
8
  import {getMapPadding as $82fe09613877ffc2$export$bb78f9f01775eef1, useMapMarker as $82fe09613877ffc2$export$278090850f6b3a9f} from "./utils.d40349f0.js";
@@ -21,5 +21,5 @@ import {ExpansionPanelSummary as $d570ac304373e71c$export$cea00a9d724d5a32, Info
21
21
 
22
22
 
23
23
 
24
- export {$6e914c81c8e053da$export$4ec83e90d030b2f3 as LoadingButton, $6e914c81c8e053da$export$9e3bae3c08bde368 as MapLoadingButton, $6e914c81c8e053da$export$a8cc0062d02a3841 as FloatingNavbar, $f50c3537aaff0cff$export$83f9a19cf91c2d06 as InfoDrawerContainer, $f50c3537aaff0cff$export$a5ddcc2a88716895 as BaseInfoDrawer, $f50c3537aaff0cff$export$e54a7f2505304e20 as DetailsPanel, $f50c3537aaff0cff$export$aa4baff5242ea6e1 as LocationPanel, $a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$eab3034e57b46e26 as MapInspectorV2, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage, $1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer, $b8c84b63e75fe4f2$export$2906e7f4b228efe9 as FeatureProperties, $b8c84b63e75fe4f2$export$dc87b4d46cea200d as FeatureRecord, $b8c84b63e75fe4f2$export$214daccdda0f4ac6 as FeatureSelectionHandler, $b8c84b63e75fe4f2$export$617d79dae526d2cf as Features, $b8c84b63e75fe4f2$export$43c75dec9d0b96c as TileInfo, $b8c84b63e75fe4f2$export$43277c51a01761c1 as FeaturePanel, $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d as buildXRayStyle, $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6 as buildInspectorStyle, $4bdfa9cd8240b2fd$export$ec68dd77edbe678b as PanelCard, $4bdfa9cd8240b2fd$export$612ca936d3ed4784 as DetailPanelStyle, $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290 as MapAreaContainer, $4bdfa9cd8240b2fd$export$fa395a37c3898ae3 as MapStyledContainer, $9e150e311a3261e9$export$ab1e7a67d6ec5ad8 as MapView, $9e150e311a3261e9$export$cee395a8a2a00b29 as MapTerrainManager, $91d5aa004eeb2226$export$db1a2e058a06fb5c as MapBottomControls, $4bc3dd5f0732eed3$export$31b2e088aff2dc5d as MapResizeManager, $4bc3dd5f0732eed3$export$2ab96428dea558d6 as MapPaddingManager, $4bc3dd5f0732eed3$export$f6eeee399afc4e9a as MapMovedReporter, $4bc3dd5f0732eed3$export$e57f9eaa51773f82 as MapLoadingReporter, $4bc3dd5f0732eed3$export$5c90a91c7455938c as MapMarker, $4bc3dd5f0732eed3$export$566518253d2584f8 as useBasicStylePair, $82fe09613877ffc2$export$bb78f9f01775eef1 as getMapPadding, $82fe09613877ffc2$export$278090850f6b3a9f as useMapMarker, $4fae2d573d730db8$export$716098b85fd0efdf as ValueWithUnit, $4fae2d573d730db8$export$af8082af0bea3eb1 as DegreeCoord, $4fae2d573d730db8$export$f195b3550849e560 as LngLatCoords, $4fae2d573d730db8$export$58bfb4f6ec5aa58d as Elevation, $bb5f34705d9c44bc$export$8391d1abb505ffb3 as applyMapPositionToHash, $bb5f34705d9c44bc$export$80abf1cbcc3918e4 as getMapPositionForHash, $d570ac304373e71c$export$cea00a9d724d5a32 as ExpansionPanelSummary, $d570ac304373e71c$export$39c134eb0b07cf0e as InfoPanelSection, $d570ac304373e71c$export$40e646e38e6ed100 as ExpansionPanel, $d570ac304373e71c$export$d7160281aff7c3b8 as SubExpansionPanel, $d570ac304373e71c$export$44ad9ff780615135 as ExpandableDetailsPanel, $d570ac304373e71c$export$263416b670b3f129 as ExpansionBody, $72e497a412b1da0a$export$ed081779ec3709aa as PanelSubhead};
24
+ export {$6e914c81c8e053da$export$4ec83e90d030b2f3 as LoadingButton, $6e914c81c8e053da$export$9e3bae3c08bde368 as MapLoadingButton, $6e914c81c8e053da$export$a8cc0062d02a3841 as FloatingNavbar, $f50c3537aaff0cff$export$83f9a19cf91c2d06 as InfoDrawerContainer, $f50c3537aaff0cff$export$a5ddcc2a88716895 as BaseInfoDrawer, $f50c3537aaff0cff$export$e54a7f2505304e20 as DetailsPanel, $f50c3537aaff0cff$export$aa4baff5242ea6e1 as LocationPanel, $a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$eab3034e57b46e26 as MapInspectorV2, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage, $1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer, $b8c84b63e75fe4f2$export$2906e7f4b228efe9 as FeatureProperties, $b8c84b63e75fe4f2$export$dc87b4d46cea200d as FeatureRecord, $b8c84b63e75fe4f2$export$214daccdda0f4ac6 as FeatureSelectionHandler, $b8c84b63e75fe4f2$export$617d79dae526d2cf as Features, $b8c84b63e75fe4f2$export$43c75dec9d0b96c as TileInfo, $b8c84b63e75fe4f2$export$43277c51a01761c1 as FeaturePanel, $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d as buildXRayStyle, $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6 as buildInspectorStyle, $4bdfa9cd8240b2fd$export$ec68dd77edbe678b as PanelCard, $4bdfa9cd8240b2fd$export$612ca936d3ed4784 as DetailPanelStyle, $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290 as MapAreaContainer, $4bdfa9cd8240b2fd$export$fa395a37c3898ae3 as MapStyledContainer, $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8 as MapView, $0118fc9193bb1bf4$export$cee395a8a2a00b29 as MapTerrainManager, $91d5aa004eeb2226$export$db1a2e058a06fb5c as MapBottomControls, $4bc3dd5f0732eed3$export$31b2e088aff2dc5d as MapResizeManager, $4bc3dd5f0732eed3$export$2ab96428dea558d6 as MapPaddingManager, $4bc3dd5f0732eed3$export$f6eeee399afc4e9a as MapMovedReporter, $4bc3dd5f0732eed3$export$e57f9eaa51773f82 as MapLoadingReporter, $4bc3dd5f0732eed3$export$5c90a91c7455938c as MapMarker, $4bc3dd5f0732eed3$export$566518253d2584f8 as useBasicStylePair, $82fe09613877ffc2$export$bb78f9f01775eef1 as getMapPadding, $82fe09613877ffc2$export$278090850f6b3a9f as useMapMarker, $4fae2d573d730db8$export$716098b85fd0efdf as ValueWithUnit, $4fae2d573d730db8$export$af8082af0bea3eb1 as DegreeCoord, $4fae2d573d730db8$export$f195b3550849e560 as LngLatCoords, $4fae2d573d730db8$export$58bfb4f6ec5aa58d as Elevation, $bb5f34705d9c44bc$export$8391d1abb505ffb3 as applyMapPositionToHash, $bb5f34705d9c44bc$export$80abf1cbcc3918e4 as getMapPositionForHash, $d570ac304373e71c$export$cea00a9d724d5a32 as ExpansionPanelSummary, $d570ac304373e71c$export$39c134eb0b07cf0e as InfoPanelSection, $d570ac304373e71c$export$40e646e38e6ed100 as ExpansionPanel, $d570ac304373e71c$export$d7160281aff7c3b8 as SubExpansionPanel, $d570ac304373e71c$export$44ad9ff780615135 as ExpandableDetailsPanel, $d570ac304373e71c$export$263416b670b3f129 as ExpansionBody, $72e497a412b1da0a$export$ed081779ec3709aa as PanelSubhead};
25
25
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import {InfoDrawerHeader as $427faf94283514d4$export$e9ff14c4822c2e8c} from "./header.b4aa864a.js";
2
2
  import "../cjs/main.module.3dbc089f.css";
3
3
  import $2cJVU$mainmodule303f6d99js from "./main.module.303f6d99.js";
4
- import {PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b} from "./container.16bde261.js";
4
+ import {PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b} from "./container.2ebe27af.js";
5
5
  import $2cJVU$macrostrathyper from "@macrostrat/hyper";
6
6
  import $2cJVU$classnames from "classnames";
7
7
  import {ErrorBoundary as $2cJVU$ErrorBoundary} from "@macrostrat/ui-components";
@@ -55,4 +55,4 @@ function $f50c3537aaff0cff$export$aa4baff5242ea6e1(props) {
55
55
 
56
56
 
57
57
  export {$f50c3537aaff0cff$export$83f9a19cf91c2d06 as InfoDrawerContainer, $f50c3537aaff0cff$export$a5ddcc2a88716895 as BaseInfoDrawer, $f50c3537aaff0cff$export$e54a7f2505304e20 as DetailsPanel, $f50c3537aaff0cff$export$aa4baff5242ea6e1 as LocationPanel};
58
- //# sourceMappingURL=location-panel.b56899ab.js.map
58
+ //# sourceMappingURL=location-panel.f22673f5.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAQA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,sEAAK;AAErB,SAAS,0CAAoB,KAAK;IACvC,MAAM,YAAY,CAAA,GAAA,iBAAS,EAAE,cAAc,MAAM,SAAS;IAC1D,OAAO,wBAAE,CAAA,GAAA,yCAAQ,GAAG;QAAE,GAAG,KAAK;mBAAE;IAAU;AAC5C;AAYO,SAAS,0CAAe,KAA0B;IACvD,MAAM,aACJ,SAAS,iBACT,gBAAgB,aAChB,KAAK,WACL,OAAO,YACP,QAAQ,oBACR,mBAAmB,2BACnB,GAAG,MACJ,GAAG;IACJ,MAAM,SACJ,iBACA,wBAAE,CAAA,GAAA,yCAAe,GAAG;iBAAE;QAAS,GAAG,IAAI;IAAC,GAAG;QACxC,SAAS,OAAO,OAAO,wBAAE,MAAM;YAAC;SAAM;KACvC;IACH,OAAO,wBAAE,2CAAqB;mBAAE;IAAU,GAAG;QAC3C;QACA,wBAAE,uBAAuB,wBAAE,CAAA,GAAA,oBAAY,GAAG,wBAAE,kBAAkB;KAC/D;AACH;AAEO,MAAM,4CAAe;AAErB,SAAS,0CAAc,KAAK;IACjC,MAAM,YAAE,QAAQ,aAAE,SAAS,WAAE,UAAU,OAAO,GAAG,MAAM,GAAG;IAC1D,MAAM,MAAM,CAAA,GAAA,iBAAS,EAAE,kBAAkB,WAAW;iBAAE;IAAQ;IAC9D,OAAO,wBAAE,2CAAgB;QAAE,WAAW;QAAK,GAAG,IAAI;IAAC,GAAG;AACxD","sources":["packages/map-interface/src/location-panel/index.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { InfoDrawerHeader, InfoDrawerHeaderProps } from \"./header\";\nimport classNames from \"classnames\";\nimport styles from \"./main.module.sass\";\nimport { ErrorBoundary } from \"@macrostrat/ui-components\";\nimport { PanelCard } from \"../container\";\nimport { ComponentType } from \"react\";\n\nconst h = hyper.styled(styles);\n\nexport function InfoDrawerContainer(props) {\n const className = classNames(\"infodrawer\", props.className);\n return h(PanelCard, { ...props, className });\n}\n\ntype Component = string | ComponentType<any>;\n\ninterface BaseInfoDrawerProps extends InfoDrawerHeaderProps {\n className?: string;\n title?: string;\n headerElement?: JSX.Element;\n children?: React.ReactNode;\n contentContainer?: Component;\n}\n\nexport function BaseInfoDrawer(props: BaseInfoDrawerProps) {\n const {\n className,\n headerElement = null,\n title,\n onClose,\n children,\n contentContainer = \"div.infodrawer-contents\",\n ...rest\n } = props;\n const header =\n headerElement ??\n h(InfoDrawerHeader, { onClose, ...rest }, [\n title == null ? null : h(\"h3\", [title]),\n ]);\n return h(InfoDrawerContainer, { className }, [\n header,\n h(\"div.infodrawer-body\", h(ErrorBoundary, h(contentContainer, children))),\n ]);\n}\n\nexport const DetailsPanel = BaseInfoDrawer;\n\nexport function LocationPanel(props) {\n const { children, className, loading = false, ...rest } = props;\n const cls = classNames(\"location-panel\", className, { loading });\n return h(BaseInfoDrawer, { className: cls, ...rest }, children);\n}\n"],"names":[],"version":3,"file":"location-panel.b56899ab.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;AAQA,MAAM,0BAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,sEAAK;AAErB,SAAS,0CAAoB,KAAK;IACvC,MAAM,YAAY,CAAA,GAAA,iBAAS,EAAE,cAAc,MAAM,SAAS;IAC1D,OAAO,wBAAE,CAAA,GAAA,yCAAQ,GAAG;QAAE,GAAG,KAAK;mBAAE;IAAU;AAC5C;AAYO,SAAS,0CAAe,KAA0B;IACvD,MAAM,aACJ,SAAS,iBACT,gBAAgB,aAChB,KAAK,WACL,OAAO,YACP,QAAQ,oBACR,mBAAmB,2BACnB,GAAG,MACJ,GAAG;IACJ,MAAM,SACJ,iBACA,wBAAE,CAAA,GAAA,yCAAe,GAAG;iBAAE;QAAS,GAAG,IAAI;IAAC,GAAG;QACxC,SAAS,OAAO,OAAO,wBAAE,MAAM;YAAC;SAAM;KACvC;IACH,OAAO,wBAAE,2CAAqB;mBAAE;IAAU,GAAG;QAC3C;QACA,wBAAE,uBAAuB,wBAAE,CAAA,GAAA,oBAAY,GAAG,wBAAE,kBAAkB;KAC/D;AACH;AAEO,MAAM,4CAAe;AAErB,SAAS,0CAAc,KAAK;IACjC,MAAM,YAAE,QAAQ,aAAE,SAAS,WAAE,UAAU,OAAO,GAAG,MAAM,GAAG;IAC1D,MAAM,MAAM,CAAA,GAAA,iBAAS,EAAE,kBAAkB,WAAW;iBAAE;IAAQ;IAC9D,OAAO,wBAAE,2CAAgB;QAAE,WAAW;QAAK,GAAG,IAAI;IAAC,GAAG;AACxD","sources":["packages/map-interface/src/location-panel/index.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport { InfoDrawerHeader, InfoDrawerHeaderProps } from \"./header\";\nimport classNames from \"classnames\";\nimport styles from \"./main.module.sass\";\nimport { ErrorBoundary } from \"@macrostrat/ui-components\";\nimport { PanelCard } from \"../container\";\nimport { ComponentType } from \"react\";\n\nconst h = hyper.styled(styles);\n\nexport function InfoDrawerContainer(props) {\n const className = classNames(\"infodrawer\", props.className);\n return h(PanelCard, { ...props, className });\n}\n\ntype Component = string | ComponentType<any>;\n\ninterface BaseInfoDrawerProps extends InfoDrawerHeaderProps {\n className?: string;\n title?: string;\n headerElement?: JSX.Element;\n children?: React.ReactNode;\n contentContainer?: Component;\n}\n\nexport function BaseInfoDrawer(props: BaseInfoDrawerProps) {\n const {\n className,\n headerElement = null,\n title,\n onClose,\n children,\n contentContainer = \"div.infodrawer-contents\",\n ...rest\n } = props;\n const header =\n headerElement ??\n h(InfoDrawerHeader, { onClose, ...rest }, [\n title == null ? null : h(\"h3\", [title]),\n ]);\n return h(InfoDrawerContainer, { className }, [\n header,\n h(\"div.infodrawer-body\", h(ErrorBoundary, h(contentContainer, children))),\n ]);\n}\n\nexport const DetailsPanel = BaseInfoDrawer;\n\nexport function LocationPanel(props) {\n const { children, className, loading = false, ...rest } = props;\n const cls = classNames(\"location-panel\", className, { loading });\n return h(BaseInfoDrawer, { className: cls, ...rest }, children);\n}\n"],"names":[],"version":3,"file":"location-panel.f22673f5.js.map"}
@@ -1,9 +1,9 @@
1
1
  import {buildInspectorStyle as $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6} from "./xray.c0663c25.js";
2
- import {MapAreaContainer as $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290, PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b} from "./container.16bde261.js";
2
+ import {MapAreaContainer as $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290, PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b} from "./container.2ebe27af.js";
3
3
  import {FloatingNavbar as $6e914c81c8e053da$export$a8cc0062d02a3841, MapLoadingButton as $6e914c81c8e053da$export$9e3bae3c08bde368} from "./context-panel.c288c5cd.js";
4
4
  import {MapMarker as $4bc3dd5f0732eed3$export$5c90a91c7455938c} from "./helpers.fb1d7227.js";
5
- import {LocationPanel as $f50c3537aaff0cff$export$aa4baff5242ea6e1} from "./location-panel.b56899ab.js";
6
- import {MapView as $9e150e311a3261e9$export$ab1e7a67d6ec5ad8} from "./map-view.a3fe6257.js";
5
+ import {LocationPanel as $f50c3537aaff0cff$export$aa4baff5242ea6e1} from "./location-panel.f22673f5.js";
6
+ import {MapView as $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8} from "./map-view.4f256782.js";
7
7
  import $f1pTx$mainmodule5eb366dejs from "./main.module.5eb366de.js";
8
8
  import "../cjs/main.module.becc2fe7.css";
9
9
  import {TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd} from "./tile-extent.ca526996.js";
@@ -131,7 +131,7 @@ function $a281a0612311d660$export$eab3034e57b46e26({ title: title = "Map inspect
131
131
  detailPanel: detailElement,
132
132
  contextPanelOpen: isOpen,
133
133
  fitViewport: fitViewport
134
- }, $a281a0612311d660$export$dda1d9f60106f0e9((0, $9e150e311a3261e9$export$ab1e7a67d6ec5ad8), {
134
+ }, $a281a0612311d660$export$dda1d9f60106f0e9((0, $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8), {
135
135
  style: actualStyle,
136
136
  transformRequest: transformRequest,
137
137
  mapPosition: mapPosition,
@@ -172,4 +172,4 @@ const $a281a0612311d660$export$2391061fbdfb71ef = $a281a0612311d660$var$MapInspe
172
172
 
173
173
 
174
174
  export {$a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$eab3034e57b46e26 as MapInspectorV2, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage};
175
- //# sourceMappingURL=map-page.93c11cef.js.map
175
+ //# sourceMappingURL=map-page.f9f59ea0.js.map
@@ -1 +1 @@
1
- {"mappings":"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","sources":["packages/map-interface/src/dev/map-page.ts"],"sourcesContent":["// 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"],"names":[],"version":3,"file":"map-page.93c11cef.js.map"}
1
+ {"mappings":"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","sources":["packages/map-interface/src/dev/map-page.ts"],"sourcesContent":["// 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"],"names":[],"version":3,"file":"map-page.f9f59ea0.js.map"}
@@ -0,0 +1,172 @@
1
+ import $jKrEn$mainmodulef70e002bjs from "./main.module.f70e002b.js";
2
+ import "../cjs/main.module.f085a193.css";
3
+ import {MapLoadingReporter as $4bc3dd5f0732eed3$export$e57f9eaa51773f82, MapMovedReporter as $4bc3dd5f0732eed3$export$f6eeee399afc4e9a, MapPaddingManager as $4bc3dd5f0732eed3$export$2ab96428dea558d6, MapResizeManager as $4bc3dd5f0732eed3$export$31b2e088aff2dc5d} from "./helpers.fb1d7227.js";
4
+ import {getMapPadding as $82fe09613877ffc2$export$bb78f9f01775eef1} from "./utils.d40349f0.js";
5
+ import $jKrEn$macrostrathyper from "@macrostrat/hyper";
6
+ import {useMapDispatch as $jKrEn$useMapDispatch, useMapRef as $jKrEn$useMapRef, addTerrainToStyle as $jKrEn$addTerrainToStyle, useMapPosition as $jKrEn$useMapPosition, use3DTerrain as $jKrEn$use3DTerrain} from "@macrostrat/mapbox-react";
7
+ import {setMapPosition as $jKrEn$setMapPosition, getMapPosition as $jKrEn$getMapPosition, mapViewInfo as $jKrEn$mapViewInfo, getMapboxStyle as $jKrEn$getMapboxStyle} from "@macrostrat/mapbox-utils";
8
+ import $jKrEn$classnames from "classnames";
9
+ import $jKrEn$mapboxgl from "mapbox-gl";
10
+ import {useRef as $jKrEn$useRef} from "react";
11
+ import "mapbox-gl/dist/mapbox-gl.css";
12
+ import {useAsyncEffect as $jKrEn$useAsyncEffect} from "@macrostrat/ui-components";
13
+
14
+
15
+ function $parcel$interopDefault(a) {
16
+ return a && a.__esModule ? a.default : a;
17
+ }
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+ const $0118fc9193bb1bf4$var$h = (0, $jKrEn$macrostrathyper).styled((0, ($parcel$interopDefault($jKrEn$mainmodulef70e002bjs))));
30
+ function $0118fc9193bb1bf4$var$defaultInitializeMap(container, args = {}) {
31
+ const { mapPosition: mapPosition, ...rest } = args;
32
+ console.log("Initializing map (default)", args);
33
+ const map = new (0, $jKrEn$mapboxgl).Map({
34
+ container: container,
35
+ maxZoom: 18,
36
+ //maxTileCacheSize: 0,
37
+ logoPosition: "bottom-left",
38
+ trackResize: true,
39
+ antialias: true,
40
+ optimizeForTerrain: true,
41
+ ...rest
42
+ });
43
+ // set initial map position
44
+ if (mapPosition != null) (0, $jKrEn$setMapPosition)(map, mapPosition);
45
+ //setMapPosition(map, mapPosition);
46
+ return map;
47
+ }
48
+ const $0118fc9193bb1bf4$var$defaultMapPosition = {
49
+ camera: {
50
+ lat: 34,
51
+ lng: -120,
52
+ altitude: 300000
53
+ }
54
+ };
55
+ function $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8(props) {
56
+ let { terrainSourceID: terrainSourceID } = props;
57
+ const { enableTerrain: enableTerrain = true, style: style, mapPosition: mapPosition = $0118fc9193bb1bf4$var$defaultMapPosition, initializeMap: initializeMap = $0118fc9193bb1bf4$var$defaultInitializeMap, children: children, mapboxToken: mapboxToken, accessToken: // Deprecated
58
+ accessToken, infoMarkerPosition: infoMarkerPosition, transformRequest: transformRequest, projection: projection, onMapLoaded: onMapLoaded = null, onStyleLoaded: onStyleLoaded = null, onMapMoved: onMapMoved = null, ...rest } = props;
59
+ if (enableTerrain) terrainSourceID ??= "mapbox-3d-dem";
60
+ const _mapboxToken = mapboxToken ?? accessToken;
61
+ if (_mapboxToken != null) (0, $jKrEn$mapboxgl).accessToken = _mapboxToken;
62
+ const dispatch = (0, $jKrEn$useMapDispatch)();
63
+ let mapRef = (0, $jKrEn$useMapRef)();
64
+ const ref = (0, $jKrEn$useRef)();
65
+ const parentRef = (0, $jKrEn$useRef)();
66
+ (0, $jKrEn$useAsyncEffect)(async ()=>{
67
+ /** Manager to update map style */ if (style == null) return;
68
+ let map = mapRef.current;
69
+ /** If we can, we try to update the map style with terrain information
70
+ * immediately, before the style is loaded. This allows us to avoid a
71
+ * flash of the map without terrain.
72
+ *
73
+ * To do this, we need to estimate the map position before load, which
74
+ * doesn't always work.
75
+ */ // We either get the map position directly from the map or from props
76
+ const estMapPosition = map == null ? mapPosition : (0, $jKrEn$getMapPosition)(map);
77
+ let newStyle = style;
78
+ const { mapUse3D: mapUse3D } = (0, $jKrEn$mapViewInfo)(estMapPosition);
79
+ /** If style is a string, we can't update it with terrain layers immediately.
80
+ * We need to wait for the style to load and then update it.
81
+ */ if (typeof style === "string") newStyle = await (0, $jKrEn$getMapboxStyle)(style, {
82
+ access_token: (0, $jKrEn$mapboxgl).accessToken
83
+ });
84
+ if (mapUse3D) // We can update the style with terrain layers immediately
85
+ newStyle = (0, $jKrEn$addTerrainToStyle)(newStyle, terrainSourceID);
86
+ if (map != null) {
87
+ console.log("Setting style", newStyle);
88
+ map.setStyle(newStyle);
89
+ } else {
90
+ console.log("Initializing map", newStyle);
91
+ const map = initializeMap(ref.current, {
92
+ style: newStyle,
93
+ projection: projection,
94
+ mapPosition: mapPosition,
95
+ transformRequest: transformRequest,
96
+ ...rest
97
+ });
98
+ dispatch({
99
+ type: "set-map",
100
+ payload: map
101
+ });
102
+ map.setPadding((0, $82fe09613877ffc2$export$bb78f9f01775eef1)(ref, parentRef), {
103
+ animate: false
104
+ });
105
+ onMapLoaded?.(map);
106
+ }
107
+ const loadCallback = ()=>{
108
+ onStyleLoaded?.(map);
109
+ // Set initial terrain state
110
+ dispatch({
111
+ type: "set-style-loaded",
112
+ payload: true
113
+ });
114
+ };
115
+ map = mapRef.current;
116
+ if (map.style?._loaded) // Catch a race condition where the style is loaded before the callback is set
117
+ loadCallback();
118
+ map.on("style.load", loadCallback);
119
+ return ()=>{
120
+ map.off("style.load", loadCallback);
121
+ };
122
+ }, [
123
+ style
124
+ ]);
125
+ const _computedMapPosition = (0, $jKrEn$useMapPosition)();
126
+ const { mapUse3D: mapUse3D, mapIsRotated: mapIsRotated } = (0, $jKrEn$mapViewInfo)(_computedMapPosition);
127
+ // Get map projection
128
+ const _projection = mapRef.current?.getProjection()?.name ?? "mercator";
129
+ const className = (0, $jKrEn$classnames)({
130
+ "is-rotated": mapIsRotated ?? false,
131
+ "is-3d-available": mapUse3D ?? false
132
+ }, `${_projection}-projection`);
133
+ return $0118fc9193bb1bf4$var$h("div.map-view-container.main-view", {
134
+ ref: parentRef
135
+ }, [
136
+ $0118fc9193bb1bf4$var$h("div.mapbox-map#map", {
137
+ ref: ref,
138
+ className: className
139
+ }),
140
+ $0118fc9193bb1bf4$var$h((0, $4bc3dd5f0732eed3$export$e57f9eaa51773f82), {
141
+ ignoredSources: [
142
+ "elevationMarker",
143
+ "crossSectionEndpoints"
144
+ ]
145
+ }),
146
+ $0118fc9193bb1bf4$var$h((0, $4bc3dd5f0732eed3$export$f6eeee399afc4e9a), {
147
+ onMapMoved: onMapMoved
148
+ }),
149
+ $0118fc9193bb1bf4$var$h((0, $4bc3dd5f0732eed3$export$31b2e088aff2dc5d), {
150
+ containerRef: ref
151
+ }),
152
+ $0118fc9193bb1bf4$var$h((0, $4bc3dd5f0732eed3$export$2ab96428dea558d6), {
153
+ containerRef: ref,
154
+ parentRef: parentRef,
155
+ infoMarkerPosition: infoMarkerPosition
156
+ }),
157
+ $0118fc9193bb1bf4$var$h($0118fc9193bb1bf4$export$cee395a8a2a00b29, {
158
+ mapUse3D: mapUse3D,
159
+ terrainSourceID: terrainSourceID,
160
+ style: style
161
+ }),
162
+ children
163
+ ]);
164
+ }
165
+ function $0118fc9193bb1bf4$export$cee395a8a2a00b29({ mapUse3D: mapUse3D, terrainSourceID: terrainSourceID, style: style }) {
166
+ (0, $jKrEn$use3DTerrain)(mapUse3D, terrainSourceID);
167
+ return null;
168
+ }
169
+
170
+
171
+ export {$0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8 as MapView, $0118fc9193bb1bf4$export$cee395a8a2a00b29 as MapTerrainManager};
172
+ //# sourceMappingURL=map-view.4f256782.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"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","sources":["packages/map-interface/src/map-view.ts"],"sourcesContent":["import hyper from \"@macrostrat/hyper\";\nimport {\n useMapRef,\n useMapDispatch,\n useMapPosition,\n setup3DTerrain,\n use3DTerrain,\n addTerrainToStyle,\n} from \"@macrostrat/mapbox-react\";\nimport {\n mapViewInfo,\n MapPosition,\n setMapPosition,\n getMapPosition,\n getMapboxStyle,\n} from \"@macrostrat/mapbox-utils\";\nimport classNames from \"classnames\";\nimport mapboxgl from \"mapbox-gl\";\nimport { useEffect, useRef } from \"react\";\nimport styles from \"./main.module.sass\";\nimport {\n MapLoadingReporter,\n MapMovedReporter,\n MapPaddingManager,\n MapResizeManager,\n} from \"./helpers\";\nimport \"mapbox-gl/dist/mapbox-gl.css\";\nimport { getMapPadding } from \"./utils\";\nimport { useAsyncEffect } from \"@macrostrat/ui-components\";\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 useAsyncEffect(async () => {\n /** Manager to update map style */\n if (style == null) return;\n let map = mapRef.current;\n\n /** If we can, we try to update the map style with terrain information\n * immediately, before the style is loaded. This allows us to avoid a\n * flash of the map without terrain.\n *\n * To do this, we need to estimate the map position before load, which\n * doesn't always work.\n */\n // We either get the map position directly from the map or from props\n const estMapPosition: MapPosition | null =\n map == null ? mapPosition : getMapPosition(map);\n let newStyle = style;\n const { mapUse3D } = mapViewInfo(estMapPosition);\n\n /** If style is a string, we can't update it with terrain layers immediately.\n * We need to wait for the style to load and then update it.\n */\n if (typeof style === \"string\") {\n newStyle = await getMapboxStyle(style, {\n access_token: mapboxgl.accessToken,\n });\n }\n\n if (mapUse3D) {\n // We can update the style with terrain layers immediately\n newStyle = addTerrainToStyle(newStyle as mapboxgl.Style, terrainSourceID);\n }\n\n if (map != null) {\n console.log(\"Setting style\", newStyle);\n map.setStyle(newStyle);\n } else {\n console.log(\"Initializing map\", newStyle);\n const map = initializeMap(ref.current, {\n style: newStyle,\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 // Set initial terrain state\n dispatch({ type: \"set-style-loaded\", payload: true });\n };\n\n map = mapRef.current;\n\n if (map.style?._loaded) {\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, style }),\n children,\n ]);\n}\n\nexport function MapTerrainManager({\n mapUse3D,\n terrainSourceID,\n style,\n}: {\n mapUse3D?: boolean;\n terrainSourceID?: string;\n style?: mapboxgl.Style | string;\n}) {\n use3DTerrain(mapUse3D, terrainSourceID);\n\n return null;\n}\n"],"names":[],"version":3,"file":"map-view.4f256782.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A,Q,8C,Q,+C,Q,2C,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,c,Q,mB,Q,4B,Q,6B,Q,4B,Q,qB,I,E,C,EEAA,EAAiB,IAAA,IAAoB,2CAAA,QAAA,YAA4C,QAAQ,GCAxE,IAAA,IAAoB,wCAAA,QAAA,YAAyC,QAAQ,GFiB5E,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/container.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-d62d2349645b8f4c.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-a05b7f3aef7398d8.js"],"sourcesContent":["require(\"./main.module.24615279.js\");\nrequire(\"./main.module.89f269c7.css\");\nrequire(\"./controls.ffb44307.js\");\nvar $lAyW8$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $lAyW8$classnames = require(\"classnames\");\nvar $lAyW8$transitionhook = require(\"transition-hook\");\nvar $lAyW8$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $lAyW8$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $lAyW8$macrostratmapboxutils = require(\"@macrostrat/mapbox-utils\");\nvar $lAyW8$blueprintjscore = require(\"@blueprintjs/core\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nvar $14b8bde8ee648c70$exports = {};\n$14b8bde8ee648c70$exports = new URL(\"main.module.24615279.js\", \"file:\" + __filename).toString();\n\n\n\n\n\n\nvar $df60ba5b782d207f$exports = {};\n$df60ba5b782d207f$exports = new URL(\"controls.ffb44307.js\", \"file:\" + __filename).toString();\n\n\n\n\nconst $4661d95a4b848918$var$h = (0, ($parcel$interopDefault($lAyW8$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($14b8bde8ee648c70$exports))));\nconst $4661d95a4b848918$export$ec68dd77edbe678b = (props)=>$4661d95a4b848918$var$h((0, $lAyW8$blueprintjscore.Card), {\n ...props,\n className: (0, ($parcel$interopDefault($lAyW8$classnames)))(\"panel-card\", props.className)\n });\nvar $4661d95a4b848918$export$612ca936d3ed4784 = /*#__PURE__*/ function(DetailPanelStyle) {\n DetailPanelStyle[\"FIXED\"] = \"fixed\";\n DetailPanelStyle[\"FLOATING\"] = \"floating\";\n return DetailPanelStyle;\n}({});\nconst $4661d95a4b848918$export$9fa5da0bcfd0a290 = (props)=>$4661d95a4b848918$var$h($4661d95a4b848918$var$MapProviders, $4661d95a4b848918$var$h($4661d95a4b848918$var$_MapAreaContainer, props));\nfunction $4661d95a4b848918$var$_MapAreaContainer({ children: children, className: className, navbar: navbar, contextPanel: contextPanel = null, detailPanel: detailPanel = null, detailPanelOpen: detailPanelOpen, contextPanelOpen: contextPanelOpen = true, bottomPanel: bottomPanel = null, mainPanel: mainPanel, mapControls: mapControls = $4661d95a4b848918$var$h((0, $df60ba5b782d207f$exports.MapBottomControls)), contextStackProps: contextStackProps = null, detailStackProps: detailStackProps = null, detailPanelStyle: detailPanelStyle = \"floating\", fitViewport: fitViewport = true, showPanelOutlines: showPanelOutlines = false, preventMapInteraction: preventMapInteraction = false, ...rest }) {\n const _detailPanelOpen = detailPanelOpen ?? detailPanel != null;\n const contextPanelTrans = (0, $lAyW8$transitionhook.useTransition)(contextPanelOpen, 800);\n const detailPanelTrans = (0, $lAyW8$transitionhook.useTransition)(_detailPanelOpen, 800);\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 - These styles are doubly applied so we can have both namespaced and\n outside-accessible styles for each case.\n */ const mainUIClassNames = (0, ($parcel$interopDefault($lAyW8$classnames)))(\"map-container\", className, `detail-panel-${detailPanelStyle}`, `context-panel-${contextPanelTrans.stage}`, `map-context-${contextPanelTrans.stage}`, `detail-panel-${detailPanelTrans.stage}`, `map-detail-${detailPanelTrans.stage}`, {\n \"detail-panel-open\": _detailPanelOpen,\n \"map-context-open\": contextPanelOpen,\n \"show-panel-outlines\": showPanelOutlines,\n \"fit-viewport\": fitViewport\n });\n const mapControlsExt = $4661d95a4b848918$var$h([\n $4661d95a4b848918$var$h((0, $lAyW8$macrostratmapboxreact.ZoomControl), {\n className: \"zoom-control\"\n }),\n $4661d95a4b848918$var$h(\"div.spacer\"),\n mapControls\n ]);\n const detailStackExt = $4661d95a4b848918$var$h(\"div.detail-stack.infodrawer-container\", detailStackProps, [\n $4661d95a4b848918$var$h(\"div.detail-panel-holder\", null, detailPanel),\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"floating\")([\n mapControlsExt\n ])\n ]);\n let contextStack = null;\n if (navbar != null && contextPanel != null) contextStack = $4661d95a4b848918$var$h($4661d95a4b848918$var$ContextStack, {\n navbar: navbar,\n ...contextStackProps\n }, [\n $4661d95a4b848918$var$h.if(contextPanelTrans.shouldMount)([\n contextPanel\n ])\n ]);\n return $4661d95a4b848918$var$h($4661d95a4b848918$export$fa395a37c3898ae3, {\n className: mainUIClassNames\n }, [\n $4661d95a4b848918$var$h(\"div.main-row\", [\n $4661d95a4b848918$var$h(\"div.map-ui\", {\n ...rest\n }, [\n contextStack,\n //h(MapView),\n children ?? mainPanel,\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"floating\")([\n detailStackExt\n ]),\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"fixed\")(\"div.map-control-stack\", mapControlsExt)\n ]),\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"fixed\")([\n detailStackExt\n ])\n ]),\n $4661d95a4b848918$var$h(\"div.bottom\", null, bottomPanel)\n ]);\n}\nfunction $4661d95a4b848918$var$ContextStack(props) {\n const { adaptiveWidth: adaptiveWidth, navbar: navbar, children: children, ...rest } = props;\n const props1 = (0, $lAyW8$macrostrathyper.addClassNames)(rest, {\n \"adaptive-width\": adaptiveWidth\n });\n return $4661d95a4b848918$var$h(\"div.context-stack\", props1, [\n navbar,\n $4661d95a4b848918$var$h(\"div.context-panel-holder\", null, children),\n $4661d95a4b848918$var$h(\"div.spacer\")\n ]);\n}\nconst $4661d95a4b848918$var$MapProviders = ({ children: children })=>$4661d95a4b848918$var$h((0, $lAyW8$macrostratuicomponents.ToasterContext), $4661d95a4b848918$var$h((0, $lAyW8$macrostratmapboxreact.MapboxMapProvider), children));\nfunction $4661d95a4b848918$export$fa395a37c3898ae3({ className: className, children: children }) {\n const mapPosition = (0, $lAyW8$macrostratmapboxreact.useMapPosition)();\n if (mapPosition != null) {\n const { mapIsRotated: mapIsRotated, mapUse3D: mapUse3D, mapIsGlobal: mapIsGlobal } = (0, $lAyW8$macrostratmapboxutils.mapViewInfo)(mapPosition);\n className = (0, ($parcel$interopDefault($lAyW8$classnames)))(className, {\n \"map-is-rotated\": mapIsRotated,\n \"map-3d-available\": mapUse3D,\n \"map-is-global\": mapIsGlobal\n });\n }\n return $4661d95a4b848918$var$h(\"div\", {\n className: className\n }, children);\n} //const _MapPage = compose(HotkeysProvider, MapPage);\n\n\n//# sourceMappingURL=container.abd6f0d2.js.map\n","import hyper, { addClassNames } from \"@macrostrat/hyper\";\nimport { HTMLDivProps } from \"@blueprintjs/core\";\nimport styles from \"./main.module.sass\";\nimport classNames from \"classnames\";\nimport { useTransition } from \"transition-hook\";\nimport {\n MapboxMapProvider,\n ZoomControl,\n useMapPosition,\n} from \"@macrostrat/mapbox-react\";\nimport { ToasterContext } from \"@macrostrat/ui-components\";\nimport { MapBottomControls } from \"./controls\";\nimport { mapViewInfo, MapPosition } from \"@macrostrat/mapbox-utils\";\nimport { Card } from \"@blueprintjs/core\";\n\nimport { ReactNode } from \"react\";\n\nconst h = hyper.styled(styles);\n\ntype AnyElement = React.ReactNode | React.ReactElement | React.ReactFragment;\n\nexport const PanelCard = (props) =>\n h(Card, { ...props, className: classNames(\"panel-card\", props.className) });\n\ninterface ContextStackProps extends HTMLDivProps {\n adaptiveWidth: boolean;\n navbar: AnyElement;\n}\n\nexport enum DetailPanelStyle {\n FIXED = \"fixed\",\n FLOATING = \"floating\",\n}\n\nexport const MapAreaContainer = (props) =>\n h(MapProviders, h(_MapAreaContainer, props));\n\ninterface MapAreaContainerProps {\n navbar: AnyElement;\n children?: AnyElement;\n mapControls?: AnyElement;\n contextPanel?: AnyElement;\n contextStack?: AnyElement;\n mainPanel?: AnyElement;\n detailPanel?: AnyElement;\n bottomPanel?: AnyElement;\n className?: string;\n detailPanelOpen?: boolean;\n contextPanelOpen?: boolean;\n contextStackProps?: ContextStackProps;\n detailStackProps?: HTMLDivProps;\n detailPanelStyle: DetailPanelStyle;\n fitViewport?: boolean;\n showPanelOutlines?: boolean;\n preventMapInteraction?: boolean;\n}\n\nfunction _MapAreaContainer({\n children,\n className,\n navbar,\n contextPanel = null,\n detailPanel = null,\n detailPanelOpen,\n contextPanelOpen = true,\n bottomPanel = null,\n mainPanel,\n mapControls = h(MapBottomControls),\n contextStackProps = null,\n detailStackProps = null,\n detailPanelStyle = DetailPanelStyle.FLOATING,\n fitViewport = true,\n showPanelOutlines = false,\n preventMapInteraction = false,\n ...rest\n}: MapAreaContainerProps) {\n const _detailPanelOpen = detailPanelOpen ?? detailPanel != null;\n const contextPanelTrans = useTransition(contextPanelOpen, 800);\n const detailPanelTrans = useTransition(_detailPanelOpen, 800);\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 - These styles are doubly applied so we can have both namespaced and\n outside-accessible styles for each case.\n */\n const mainUIClassNames = classNames(\n \"map-container\",\n className,\n `detail-panel-${detailPanelStyle}`,\n `context-panel-${contextPanelTrans.stage}`,\n `map-context-${contextPanelTrans.stage}`,\n `detail-panel-${detailPanelTrans.stage}`,\n `map-detail-${detailPanelTrans.stage}`,\n {\n \"detail-panel-open\": _detailPanelOpen,\n \"map-context-open\": contextPanelOpen,\n \"show-panel-outlines\": showPanelOutlines,\n \"fit-viewport\": fitViewport,\n }\n );\n\n const mapControlsExt = h([\n h(ZoomControl, { className: \"zoom-control\" }),\n h(\"div.spacer\"),\n mapControls,\n ]);\n\n const detailStackExt = h(\n \"div.detail-stack.infodrawer-container\",\n detailStackProps,\n [\n h(\"div.detail-panel-holder\", null, detailPanel),\n h.if(detailPanelStyle == DetailPanelStyle.FLOATING)([mapControlsExt]),\n ]\n );\n\n let contextStack = null;\n if (navbar != null && contextPanel != null) {\n contextStack = h(ContextStack, { navbar, ...contextStackProps }, [\n h.if(contextPanelTrans.shouldMount)([contextPanel]),\n ]);\n }\n\n return h(MapStyledContainer, { className: mainUIClassNames }, [\n h(\"div.main-row\", [\n h(\"div.map-ui\", { ...rest }, [\n contextStack,\n //h(MapView),\n children ?? mainPanel,\n h.if(detailPanelStyle == DetailPanelStyle.FLOATING)([detailStackExt]),\n h.if(detailPanelStyle == DetailPanelStyle.FIXED)(\n \"div.map-control-stack\",\n mapControlsExt\n ),\n ]),\n h.if(detailPanelStyle == DetailPanelStyle.FIXED)([detailStackExt]),\n ]),\n h(\"div.bottom\", null, bottomPanel),\n ]);\n}\n\nfunction ContextStack(props: ContextStackProps) {\n const { adaptiveWidth, navbar, children, ...rest } = props;\n const props1 = addClassNames(rest, { \"adaptive-width\": adaptiveWidth });\n return h(\"div.context-stack\", props1, [\n navbar,\n h(\"div.context-panel-holder\", null, children),\n h(\"div.spacer\"),\n ]);\n}\n\nconst MapProviders = ({ children }) =>\n h(ToasterContext, h(MapboxMapProvider, children));\n\ninterface MapContainerProps {\n className?: string;\n children?: ReactNode;\n}\n\nexport function MapStyledContainer({ className, children }: MapContainerProps) {\n const mapPosition = useMapPosition();\n if (mapPosition != null) {\n const { mapIsRotated, mapUse3D, mapIsGlobal } = mapViewInfo(mapPosition);\n className = classNames(className, {\n \"map-is-rotated\": mapIsRotated,\n \"map-3d-available\": mapUse3D,\n \"map-is-global\": mapIsGlobal,\n });\n }\n\n return h(\"div\", { className }, children);\n}\n\n//const _MapPage = compose(HotkeysProvider, MapPage);\n","module.exports = new __parcel__URL__(\"main.module.24615279.js\").toString();","module.exports = new __parcel__URL__(\"controls.ffb44307.js\").toString();"],"names":["require","$lAyW8$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$14b8bde8ee648c70$exports","URL","__filename","toString","styled"],"version":3,"file":"container.abd6f0d2.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,8C,Q,+C,Q,2C,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,c,Q,mB,Q,4B,Q,6B,Q,4B,Q,qB,I,E,C,EEAA,EAAiB,IAAA,IAAoB,2CAAA,QAAA,YAA4C,QAAQ,GCAxE,IAAA,IAAoB,wCAAA,QAAA,YAAyC,QAAQ,GFiB5E,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/container.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-d62d2349645b8f4c.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-a05b7f3aef7398d8.js"],"sourcesContent":["require(\"./main.module.24615279.js\");\nrequire(\"./main.module.89f269c7.css\");\nrequire(\"./controls.ffb44307.js\");\nvar $lAyW8$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $lAyW8$classnames = require(\"classnames\");\nvar $lAyW8$transitionhook = require(\"transition-hook\");\nvar $lAyW8$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $lAyW8$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $lAyW8$macrostratmapboxutils = require(\"@macrostrat/mapbox-utils\");\nvar $lAyW8$blueprintjscore = require(\"@blueprintjs/core\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nvar $14b8bde8ee648c70$exports = {};\n$14b8bde8ee648c70$exports = new URL(\"main.module.24615279.js\", \"file:\" + __filename).toString();\n\n\n\n\n\n\nvar $df60ba5b782d207f$exports = {};\n$df60ba5b782d207f$exports = new URL(\"controls.ffb44307.js\", \"file:\" + __filename).toString();\n\n\n\n\nconst $4661d95a4b848918$var$h = (0, ($parcel$interopDefault($lAyW8$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($14b8bde8ee648c70$exports))));\nconst $4661d95a4b848918$export$ec68dd77edbe678b = (props)=>$4661d95a4b848918$var$h((0, $lAyW8$blueprintjscore.Card), {\n ...props,\n className: (0, ($parcel$interopDefault($lAyW8$classnames)))(\"panel-card\", props.className)\n });\nvar $4661d95a4b848918$export$612ca936d3ed4784 = /*#__PURE__*/ function(DetailPanelStyle) {\n DetailPanelStyle[\"FIXED\"] = \"fixed\";\n DetailPanelStyle[\"FLOATING\"] = \"floating\";\n return DetailPanelStyle;\n}({});\nconst $4661d95a4b848918$export$9fa5da0bcfd0a290 = (props)=>$4661d95a4b848918$var$h($4661d95a4b848918$var$MapProviders, $4661d95a4b848918$var$h($4661d95a4b848918$var$_MapAreaContainer, props));\nfunction $4661d95a4b848918$var$_MapAreaContainer({ children: children, className: className, navbar: navbar, contextPanel: contextPanel = null, detailPanel: detailPanel = null, detailPanelOpen: detailPanelOpen, contextPanelOpen: contextPanelOpen = true, bottomPanel: bottomPanel = null, mainPanel: mainPanel, mapControls: mapControls = $4661d95a4b848918$var$h((0, $df60ba5b782d207f$exports.MapBottomControls)), contextStackProps: contextStackProps = null, detailStackProps: detailStackProps = null, detailPanelStyle: detailPanelStyle = \"floating\", fitViewport: fitViewport = true, showPanelOutlines: showPanelOutlines = false, preventMapInteraction: preventMapInteraction = false, ...rest }) {\n const _detailPanelOpen = detailPanelOpen ?? detailPanel != null;\n const contextPanelTrans = (0, $lAyW8$transitionhook.useTransition)(contextPanelOpen, 800);\n const detailPanelTrans = (0, $lAyW8$transitionhook.useTransition)(_detailPanelOpen, 800);\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 - These styles are doubly applied so we can have both namespaced and\n outside-accessible styles for each case.\n */ const mainUIClassNames = (0, ($parcel$interopDefault($lAyW8$classnames)))(\"map-container\", className, `detail-panel-${detailPanelStyle}`, `context-panel-${contextPanelTrans.stage}`, `map-context-${contextPanelTrans.stage}`, `detail-panel-${detailPanelTrans.stage}`, `map-detail-${detailPanelTrans.stage}`, {\n \"detail-panel-open\": _detailPanelOpen,\n \"map-context-open\": contextPanelOpen,\n \"show-panel-outlines\": showPanelOutlines,\n \"fit-viewport\": fitViewport\n });\n const mapControlsExt = $4661d95a4b848918$var$h([\n $4661d95a4b848918$var$h((0, $lAyW8$macrostratmapboxreact.ZoomControl), {\n className: \"zoom-control\"\n }),\n $4661d95a4b848918$var$h(\"div.spacer\"),\n mapControls\n ]);\n const detailStackExt = $4661d95a4b848918$var$h(\"div.detail-stack.infodrawer-container\", detailStackProps, [\n $4661d95a4b848918$var$h(\"div.detail-panel-holder\", null, detailPanel),\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"floating\")([\n mapControlsExt\n ])\n ]);\n let contextStack = null;\n if (navbar != null || contextPanel != null) contextStack = $4661d95a4b848918$var$h($4661d95a4b848918$var$ContextStack, {\n navbar: navbar,\n ...contextStackProps\n }, [\n $4661d95a4b848918$var$h.if(contextPanelTrans.shouldMount)([\n contextPanel\n ])\n ]);\n return $4661d95a4b848918$var$h($4661d95a4b848918$export$fa395a37c3898ae3, {\n className: mainUIClassNames\n }, [\n $4661d95a4b848918$var$h(\"div.main-row\", [\n $4661d95a4b848918$var$h(\"div.map-ui\", {\n ...rest\n }, [\n contextStack,\n //h(MapView),\n children ?? mainPanel,\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"floating\")([\n detailStackExt\n ]),\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"fixed\")(\"div.map-control-stack\", mapControlsExt)\n ]),\n $4661d95a4b848918$var$h.if(detailPanelStyle == \"fixed\")([\n detailStackExt\n ])\n ]),\n $4661d95a4b848918$var$h(\"div.bottom\", null, bottomPanel)\n ]);\n}\nfunction $4661d95a4b848918$var$ContextStack(props) {\n const { adaptiveWidth: adaptiveWidth, navbar: navbar, children: children, ...rest } = props;\n const props1 = (0, $lAyW8$macrostrathyper.addClassNames)(rest, {\n \"adaptive-width\": adaptiveWidth\n });\n return $4661d95a4b848918$var$h(\"div.context-stack\", props1, [\n navbar,\n $4661d95a4b848918$var$h(\"div.context-panel-holder\", null, children),\n $4661d95a4b848918$var$h(\"div.spacer\")\n ]);\n}\nconst $4661d95a4b848918$var$MapProviders = ({ children: children })=>$4661d95a4b848918$var$h((0, $lAyW8$macrostratuicomponents.ToasterContext), $4661d95a4b848918$var$h((0, $lAyW8$macrostratmapboxreact.MapboxMapProvider), children));\nfunction $4661d95a4b848918$export$fa395a37c3898ae3({ className: className, children: children }) {\n const mapPosition = (0, $lAyW8$macrostratmapboxreact.useMapPosition)();\n if (mapPosition != null) {\n const { mapIsRotated: mapIsRotated, mapUse3D: mapUse3D, mapIsGlobal: mapIsGlobal } = (0, $lAyW8$macrostratmapboxutils.mapViewInfo)(mapPosition);\n className = (0, ($parcel$interopDefault($lAyW8$classnames)))(className, {\n \"map-is-rotated\": mapIsRotated,\n \"map-3d-available\": mapUse3D,\n \"map-is-global\": mapIsGlobal\n });\n }\n return $4661d95a4b848918$var$h(\"div\", {\n className: className\n }, children);\n} //const _MapPage = compose(HotkeysProvider, MapPage);\n\n\n//# sourceMappingURL=container.abd6f0d2.js.map\n","import hyper, { addClassNames } from \"@macrostrat/hyper\";\nimport { HTMLDivProps } from \"@blueprintjs/core\";\nimport styles from \"./main.module.sass\";\nimport classNames from \"classnames\";\nimport { useTransition } from \"transition-hook\";\nimport {\n MapboxMapProvider,\n ZoomControl,\n useMapPosition,\n} from \"@macrostrat/mapbox-react\";\nimport { ToasterContext } from \"@macrostrat/ui-components\";\nimport { MapBottomControls } from \"./controls\";\nimport { mapViewInfo, MapPosition } from \"@macrostrat/mapbox-utils\";\nimport { Card } from \"@blueprintjs/core\";\n\nimport { ReactNode } from \"react\";\n\nconst h = hyper.styled(styles);\n\ntype AnyElement = React.ReactNode | React.ReactElement | React.ReactFragment;\n\nexport const PanelCard = (props) =>\n h(Card, { ...props, className: classNames(\"panel-card\", props.className) });\n\ninterface ContextStackProps extends HTMLDivProps {\n adaptiveWidth: boolean;\n navbar: AnyElement;\n}\n\nexport enum DetailPanelStyle {\n FIXED = \"fixed\",\n FLOATING = \"floating\",\n}\n\nexport const MapAreaContainer = (props) =>\n h(MapProviders, h(_MapAreaContainer, props));\n\ninterface MapAreaContainerProps {\n navbar: AnyElement;\n children?: AnyElement;\n mapControls?: AnyElement;\n contextPanel?: AnyElement;\n contextStack?: AnyElement;\n mainPanel?: AnyElement;\n detailPanel?: AnyElement;\n bottomPanel?: AnyElement;\n className?: string;\n detailPanelOpen?: boolean;\n contextPanelOpen?: boolean;\n contextStackProps?: ContextStackProps;\n detailStackProps?: HTMLDivProps;\n detailPanelStyle: DetailPanelStyle;\n fitViewport?: boolean;\n showPanelOutlines?: boolean;\n preventMapInteraction?: boolean;\n}\n\nfunction _MapAreaContainer({\n children,\n className,\n navbar,\n contextPanel = null,\n detailPanel = null,\n detailPanelOpen,\n contextPanelOpen = true,\n bottomPanel = null,\n mainPanel,\n mapControls = h(MapBottomControls),\n contextStackProps = null,\n detailStackProps = null,\n detailPanelStyle = DetailPanelStyle.FLOATING,\n fitViewport = true,\n showPanelOutlines = false,\n preventMapInteraction = false,\n ...rest\n}: MapAreaContainerProps) {\n const _detailPanelOpen = detailPanelOpen ?? detailPanel != null;\n const contextPanelTrans = useTransition(contextPanelOpen, 800);\n const detailPanelTrans = useTransition(_detailPanelOpen, 800);\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 - These styles are doubly applied so we can have both namespaced and\n outside-accessible styles for each case.\n */\n const mainUIClassNames = classNames(\n \"map-container\",\n className,\n `detail-panel-${detailPanelStyle}`,\n `context-panel-${contextPanelTrans.stage}`,\n `map-context-${contextPanelTrans.stage}`,\n `detail-panel-${detailPanelTrans.stage}`,\n `map-detail-${detailPanelTrans.stage}`,\n {\n \"detail-panel-open\": _detailPanelOpen,\n \"map-context-open\": contextPanelOpen,\n \"show-panel-outlines\": showPanelOutlines,\n \"fit-viewport\": fitViewport,\n }\n );\n\n const mapControlsExt = h([\n h(ZoomControl, { className: \"zoom-control\" }),\n h(\"div.spacer\"),\n mapControls,\n ]);\n\n const detailStackExt = h(\n \"div.detail-stack.infodrawer-container\",\n detailStackProps,\n [\n h(\"div.detail-panel-holder\", null, detailPanel),\n h.if(detailPanelStyle == DetailPanelStyle.FLOATING)([mapControlsExt]),\n ]\n );\n\n let contextStack = null;\n if (navbar != null || contextPanel != null) {\n contextStack = h(ContextStack, { navbar, ...contextStackProps }, [\n h.if(contextPanelTrans.shouldMount)([contextPanel]),\n ]);\n }\n\n return h(MapStyledContainer, { className: mainUIClassNames }, [\n h(\"div.main-row\", [\n h(\"div.map-ui\", { ...rest }, [\n contextStack,\n //h(MapView),\n children ?? mainPanel,\n h.if(detailPanelStyle == DetailPanelStyle.FLOATING)([detailStackExt]),\n h.if(detailPanelStyle == DetailPanelStyle.FIXED)(\n \"div.map-control-stack\",\n mapControlsExt\n ),\n ]),\n h.if(detailPanelStyle == DetailPanelStyle.FIXED)([detailStackExt]),\n ]),\n h(\"div.bottom\", null, bottomPanel),\n ]);\n}\n\nfunction ContextStack(props: ContextStackProps) {\n const { adaptiveWidth, navbar, children, ...rest } = props;\n const props1 = addClassNames(rest, { \"adaptive-width\": adaptiveWidth });\n return h(\"div.context-stack\", props1, [\n navbar,\n h(\"div.context-panel-holder\", null, children),\n h(\"div.spacer\"),\n ]);\n}\n\nconst MapProviders = ({ children }) =>\n h(ToasterContext, h(MapboxMapProvider, children));\n\ninterface MapContainerProps {\n className?: string;\n children?: ReactNode;\n}\n\nexport function MapStyledContainer({ className, children }: MapContainerProps) {\n const mapPosition = useMapPosition();\n if (mapPosition != null) {\n const { mapIsRotated, mapUse3D, mapIsGlobal } = mapViewInfo(mapPosition);\n className = classNames(className, {\n \"map-is-rotated\": mapIsRotated,\n \"map-3d-available\": mapUse3D,\n \"map-is-global\": mapIsGlobal,\n });\n }\n\n return h(\"div\", { className }, children);\n}\n\n//const _MapPage = compose(HotkeysProvider, MapPage);\n","module.exports = new __parcel__URL__(\"main.module.24615279.js\").toString();","module.exports = new __parcel__URL__(\"controls.ffb44307.js\").toString();"],"names":["require","$lAyW8$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$14b8bde8ee648c70$exports","URL","__filename","toString","styled"],"version":3,"file":"container.abd6f0d2.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- require("./map-page.cb4c713e.js"),require("./tile-extent.28db5d2c.js"),require("./vector-tile-features.b5a23b71.js"),require("./xray.bce11e7b.js");var e=globalThis,r={},i={},t=e.parcelRequire94c2;null==t&&((t=function(e){if(e in r)return r[e].exports;if(e in i){var t=i[e];delete i[e];var a={id:e,exports:{}};return r[e]=a,t.call(a.exports,a,a.exports),a.exports}var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(e,r){i[e]=r},e.parcelRequire94c2=t),t.register,new URL("map-page.cb4c713e.js","file:"+__filename).toString(),t("2DICz"),t("gnyJS"),t("2mAQJ");
2
- //# sourceMappingURL=dev.ee1e89e9.js.map
1
+ require("./map-page.f99c4a48.js"),require("./tile-extent.28db5d2c.js"),require("./vector-tile-features.b5a23b71.js"),require("./xray.bce11e7b.js");var e=globalThis,r={},i={},t=e.parcelRequire94c2;null==t&&((t=function(e){if(e in r)return r[e].exports;if(e in i){var t=i[e];delete i[e];var a={id:e,exports:{}};return r[e]=a,t.call(a.exports,a,a.exports),a.exports}var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(e,r){i[e]=r},e.parcelRequire94c2=t),t.register,new URL("map-page.f99c4a48.js","file:"+__filename).toString(),t("2DICz"),t("gnyJS"),t("2mAQJ");
2
+ //# sourceMappingURL=dev.3cbf6106.js.map
@@ -1 +1 @@
1
- {"mappings":"A,Q,2C,Q,8C,Q,uD,Q,uC,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,wCAAA,QAAA,YAAyC,QAAQ,G,E,S,E,S,E","sources":["<anon>","packages/map-interface/src/dev/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-f14b5173fc324a77.js"],"sourcesContent":["require(\"./map-page.cb4c713e.js\");\nrequire(\"./tile-extent.28db5d2c.js\");\nrequire(\"./vector-tile-features.b5a23b71.js\");\nrequire(\"./xray.bce11e7b.js\");\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;\nvar $dc6a786c8b10a4e8$exports = {};\n$dc6a786c8b10a4e8$exports = new URL(\"map-page.cb4c713e.js\", \"file:\" + __filename).toString();\n\n\nparcelRequire(\"2DICz\");\nparcelRequire(\"gnyJS\");\nparcelRequire(\"2mAQJ\");\n\n\n//# sourceMappingURL=dev.ee1e89e9.js.map\n","export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n","module.exports = new __parcel__URL__(\"map-page.cb4c713e.js\").toString();"],"names":["require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","URL","__filename","toString"],"version":3,"file":"dev.ee1e89e9.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,2C,Q,8C,Q,uD,Q,uC,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,wCAAA,QAAA,YAAyC,QAAQ,G,E,S,E,S,E","sources":["<anon>","packages/map-interface/src/dev/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-f14b5173fc324a77.js"],"sourcesContent":["require(\"./map-page.f99c4a48.js\");\nrequire(\"./tile-extent.28db5d2c.js\");\nrequire(\"./vector-tile-features.b5a23b71.js\");\nrequire(\"./xray.bce11e7b.js\");\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;\nvar $dc6a786c8b10a4e8$exports = {};\n$dc6a786c8b10a4e8$exports = new URL(\"map-page.f99c4a48.js\", \"file:\" + __filename).toString();\n\n\nparcelRequire(\"2DICz\");\nparcelRequire(\"gnyJS\");\nparcelRequire(\"2mAQJ\");\n\n\n//# sourceMappingURL=dev.3cbf6106.js.map\n","export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n","module.exports = new __parcel__URL__(\"map-page.f99c4a48.js\").toString();"],"names":["require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","URL","__filename","toString"],"version":3,"file":"dev.3cbf6106.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- require("./context-panel.7c2f42c9.js"),require("./location-panel.c39983e3.js"),require("./dev.ee1e89e9.js"),require("./container.abd6f0d2.js"),require("./map-view.c6746dca.js"),require("./controls.ffb44307.js"),require("./helpers.6bda171f.js"),require("./utils.dd92f725.js"),require("./location-info.9f59aad3.js"),require("./expansion-panel.62240ee3.js");var e=globalThis,r={},a={},i=e.parcelRequire94c2;null==i&&((i=function(e){if(e in r)return r[e].exports;if(e in a){var i=a[e];delete a[e];var n={id:e,exports:{}};return r[e]=n,i.call(n.exports,n,n.exports),n.exports}var _=Error("Cannot find module '"+e+"'");throw _.code="MODULE_NOT_FOUND",_}).register=function(e,r){a[e]=r},e.parcelRequire94c2=i),i.register,new URL("context-panel.7c2f42c9.js","file:"+__filename).toString(),new URL("location-panel.c39983e3.js","file:"+__filename).toString(),new URL("dev.ee1e89e9.js","file:"+__filename).toString(),i("lw3Ik"),i("5bvtL"),i("cL8YF"),i("7CmOU"),i("R3my3"),i("66CcX"),i("e9x7B");
1
+ require("./context-panel.7c2f42c9.js"),require("./location-panel.c39983e3.js"),require("./dev.3cbf6106.js"),require("./container.abd6f0d2.js"),require("./map-view.77013338.js"),require("./controls.ffb44307.js"),require("./helpers.6bda171f.js"),require("./utils.dd92f725.js"),require("./location-info.9f59aad3.js"),require("./expansion-panel.62240ee3.js");var e=globalThis,r={},a={},i=e.parcelRequire94c2;null==i&&((i=function(e){if(e in r)return r[e].exports;if(e in a){var i=a[e];delete a[e];var n={id:e,exports:{}};return r[e]=n,i.call(n.exports,n,n.exports),n.exports}var c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}).register=function(e,r){a[e]=r},e.parcelRequire94c2=i),i.register,new URL("context-panel.7c2f42c9.js","file:"+__filename).toString(),new URL("location-panel.c39983e3.js","file:"+__filename).toString(),new URL("dev.3cbf6106.js","file:"+__filename).toString(),i("lw3Ik"),i("3wYIs"),i("cL8YF"),i("7CmOU"),i("R3my3"),i("66CcX"),i("e9x7B");
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"mappings":"A,Q,gD,Q,iD,Q,sC,Q,4C,Q,2C,Q,2C,Q,0C,Q,wC,Q,gD,Q,kD,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,6CAAA,QAAA,YAA8C,QAAQ,GCA1E,IAAA,IAAoB,8CAAA,QAAA,YAA+C,QAAQ,GCA3E,IAAA,IAAoB,mCAAA,QAAA,YAAoC,QAAQ,G,E,S,E,S,E,S,E,S,E,S,E,S,E","sources":["<anon>","packages/map-interface/src/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-236b755256a6c7a4.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-6b95ac51dd58ea56.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-d1ee864570c44cc4.js"],"sourcesContent":["require(\"./context-panel.7c2f42c9.js\");\nrequire(\"./location-panel.c39983e3.js\");\nrequire(\"./dev.ee1e89e9.js\");\nrequire(\"./container.abd6f0d2.js\");\nrequire(\"./map-view.c6746dca.js\");\nrequire(\"./controls.ffb44307.js\");\nrequire(\"./helpers.6bda171f.js\");\nrequire(\"./utils.dd92f725.js\");\nrequire(\"./location-info.9f59aad3.js\");\nrequire(\"./expansion-panel.62240ee3.js\");\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;\nvar $98cdcb2099c80b13$exports = {};\n$98cdcb2099c80b13$exports = new URL(\"context-panel.7c2f42c9.js\", \"file:\" + __filename).toString();\n\n\nvar $8b2849cf2ef954b4$exports = {};\n$8b2849cf2ef954b4$exports = new URL(\"location-panel.c39983e3.js\", \"file:\" + __filename).toString();\n\n\nvar $4aea815117692f31$exports = {};\n$4aea815117692f31$exports = new URL(\"dev.ee1e89e9.js\", \"file:\" + __filename).toString();\n\n\nparcelRequire(\"lw3Ik\");\nparcelRequire(\"5bvtL\");\nparcelRequire(\"cL8YF\");\nparcelRequire(\"7CmOU\");\nparcelRequire(\"R3my3\");\nparcelRequire(\"66CcX\");\nparcelRequire(\"e9x7B\");\n\n\n//# sourceMappingURL=index.js.map\n","export * from \"./context-panel\";\nexport * from \"./location-panel\";\nexport * from \"./dev\";\nexport * from \"./container\";\nexport * from \"./map-view\";\nexport * from \"./controls\";\nexport * from \"./helpers\";\nexport * from \"./utils\";\nexport * from \"./location-info\";\nexport * from \"./expansion-panel\";\n","module.exports = new __parcel__URL__(\"context-panel.7c2f42c9.js\").toString();","module.exports = new __parcel__URL__(\"location-panel.c39983e3.js\").toString();","module.exports = new __parcel__URL__(\"dev.ee1e89e9.js\").toString();"],"names":["require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","URL","__filename","toString"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,gD,Q,iD,Q,sC,Q,4C,Q,2C,Q,2C,Q,0C,Q,wC,Q,gD,Q,kD,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,6CAAA,QAAA,YAA8C,QAAQ,GCA1E,IAAA,IAAoB,8CAAA,QAAA,YAA+C,QAAQ,GCA3E,IAAA,IAAoB,mCAAA,QAAA,YAAoC,QAAQ,G,E,S,E,S,E,S,E,S,E,S,E,S,E","sources":["<anon>","packages/map-interface/src/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-236b755256a6c7a4.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-6b95ac51dd58ea56.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-d1ee864570c44cc4.js"],"sourcesContent":["require(\"./context-panel.7c2f42c9.js\");\nrequire(\"./location-panel.c39983e3.js\");\nrequire(\"./dev.3cbf6106.js\");\nrequire(\"./container.abd6f0d2.js\");\nrequire(\"./map-view.77013338.js\");\nrequire(\"./controls.ffb44307.js\");\nrequire(\"./helpers.6bda171f.js\");\nrequire(\"./utils.dd92f725.js\");\nrequire(\"./location-info.9f59aad3.js\");\nrequire(\"./expansion-panel.62240ee3.js\");\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;\nvar $98cdcb2099c80b13$exports = {};\n$98cdcb2099c80b13$exports = new URL(\"context-panel.7c2f42c9.js\", \"file:\" + __filename).toString();\n\n\nvar $8b2849cf2ef954b4$exports = {};\n$8b2849cf2ef954b4$exports = new URL(\"location-panel.c39983e3.js\", \"file:\" + __filename).toString();\n\n\nvar $4aea815117692f31$exports = {};\n$4aea815117692f31$exports = new URL(\"dev.3cbf6106.js\", \"file:\" + __filename).toString();\n\n\nparcelRequire(\"lw3Ik\");\nparcelRequire(\"3wYIs\");\nparcelRequire(\"cL8YF\");\nparcelRequire(\"7CmOU\");\nparcelRequire(\"R3my3\");\nparcelRequire(\"66CcX\");\nparcelRequire(\"e9x7B\");\n\n\n//# sourceMappingURL=index.js.map\n","export * from \"./context-panel\";\nexport * from \"./location-panel\";\nexport * from \"./dev\";\nexport * from \"./container\";\nexport * from \"./map-view\";\nexport * from \"./controls\";\nexport * from \"./helpers\";\nexport * from \"./utils\";\nexport * from \"./location-info\";\nexport * from \"./expansion-panel\";\n","module.exports = new __parcel__URL__(\"context-panel.7c2f42c9.js\").toString();","module.exports = new __parcel__URL__(\"location-panel.c39983e3.js\").toString();","module.exports = new __parcel__URL__(\"dev.3cbf6106.js\").toString();"],"names":["require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","URL","__filename","toString"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
@@ -1,2 +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
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.77013338.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.77013338.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.f99c4a48.js.map
@@ -1 +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":"../../../../"}
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-85b6c739a2ea044e.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.77013338.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 $8037001667fd73db$exports = {};\n$8037001667fd73db$exports = new URL(\"map-view.77013338.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, $8037001667fd73db$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.f99c4a48.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.77013338.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.f99c4a48.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("./main.module.24615279.js"),require("./main.module.89f269c7.css"),require("./helpers.6bda171f.js"),require("./utils.dd92f725.js");var r=require("@macrostrat/hyper");function e(r){return r&&r.__esModule?r.default:r}require("@macrostrat/mapbox-react"),require("@macrostrat/mapbox-utils"),require("classnames"),require("mapbox-gl"),require("react"),require("mapbox-gl/dist/mapbox-gl.css"),require("@macrostrat/ui-components");var a=globalThis,i={},t={},s=a.parcelRequire94c2;null==s&&((s=function(r){if(r in i)return i[r].exports;if(r in t){var e=t[r];delete t[r];var a={id:r,exports:{}};return i[r]=a,e.call(a.exports,a,a.exports),a.exports}var s=Error("Cannot find module '"+r+"'");throw s.code="MODULE_NOT_FOUND",s}).register=function(r,e){t[r]=e},a.parcelRequire94c2=s),s.register;var u=s("6ULxP");s("7CmOU"),s("R3my3"),e(r).styled(e(u));
2
+ //# sourceMappingURL=map-view.77013338.js.map