@macrostrat/map-interface 1.2.2 → 1.2.4

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 (92) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/{container.72611900.js → container.d2e83c46.js} +4 -4
  3. package/dist/cjs/{container.72611900.js.map → container.d2e83c46.js.map} +1 -1
  4. package/dist/cjs/{context-panel.8c4b009c.js → context-panel.3061a63e.js} +2 -2
  5. package/dist/cjs/{context-panel.8c4b009c.js.map → context-panel.3061a63e.js.map} +1 -1
  6. package/dist/cjs/{controls.7ce3e95c.js → controls.5fcf8a91.js} +2 -2
  7. package/dist/cjs/{controls.7ce3e95c.js.map → controls.5fcf8a91.js.map} +1 -1
  8. package/dist/cjs/{dev.10ac2fb3.js → dev.e6613cda.js} +2 -2
  9. package/dist/cjs/{dev.10ac2fb3.js.map → dev.e6613cda.js.map} +1 -1
  10. package/dist/cjs/{header.b86c0710.js → header.af864bde.js} +2 -2
  11. package/dist/cjs/{header.b86c0710.js.map → header.af864bde.js.map} +1 -1
  12. package/dist/cjs/index.js +7 -7
  13. package/dist/cjs/{location-panel.42ca3200.js → location-panel.e33becf0.js} +4 -4
  14. package/dist/cjs/{location-panel.42ca3200.js.map → location-panel.e33becf0.js.map} +1 -1
  15. package/dist/cjs/{main.module.3dbc089f.css → main.module.13eb33f8.css} +10 -1
  16. package/dist/cjs/main.module.13eb33f8.css.map +1 -0
  17. package/dist/cjs/{main.module.92978d8b.css → main.module.e872989b.css} +2 -2
  18. package/dist/cjs/{main.module.92978d8b.css.map → main.module.e872989b.css.map} +1 -1
  19. package/dist/cjs/{main.module.f085a193.css → main.module.f57e27f2.css} +4 -4
  20. package/dist/cjs/main.module.f57e27f2.css.map +1 -0
  21. package/dist/cjs/{map-page.9c19b2a9.js → map-page.1e1970d8.js} +6 -6
  22. package/dist/cjs/{map-page.9c19b2a9.js.map → map-page.1e1970d8.js.map} +1 -1
  23. package/dist/cjs/map-view.61e50e18.js +178 -0
  24. package/dist/cjs/map-view.61e50e18.js.map +1 -0
  25. package/dist/esm/{container.16bde261.js → container.bba0b16c.js} +4 -4
  26. package/dist/esm/{container.16bde261.js.map → container.bba0b16c.js.map} +1 -1
  27. package/dist/esm/{context-panel.c288c5cd.js → context-panel.5dae1a8c.js} +2 -2
  28. package/dist/esm/{context-panel.c288c5cd.js.map → context-panel.5dae1a8c.js.map} +1 -1
  29. package/dist/esm/{controls.f757ce16.js → controls.42c750c4.js} +2 -2
  30. package/dist/esm/{controls.f757ce16.js.map → controls.42c750c4.js.map} +1 -1
  31. package/dist/esm/{dev.30b435dc.js → dev.b2d9d35d.js} +2 -2
  32. package/dist/esm/{dev.30b435dc.js.map → dev.b2d9d35d.js.map} +1 -1
  33. package/dist/esm/{header.b4aa864a.js → header.a73b6e0a.js} +2 -2
  34. package/dist/esm/{header.b4aa864a.js.map → header.a73b6e0a.js.map} +1 -1
  35. package/dist/esm/index.d.ts +2 -1
  36. package/dist/esm/index.d.ts.map +1 -1
  37. package/dist/esm/index.js +7 -7
  38. package/dist/esm/{location-panel.b56899ab.js → location-panel.c620b13b.js} +4 -4
  39. package/dist/esm/{location-panel.b56899ab.js.map → location-panel.c620b13b.js.map} +1 -1
  40. package/dist/esm/{map-page.93c11cef.js → map-page.1da2d70c.js} +6 -6
  41. package/dist/esm/{map-page.93c11cef.js.map → map-page.1da2d70c.js.map} +1 -1
  42. package/dist/esm/map-view.1fc6297b.js +172 -0
  43. package/dist/esm/map-view.1fc6297b.js.map +1 -0
  44. package/dist/node/{container.abd6f0d2.js → container.053f798f.js} +2 -2
  45. package/dist/node/{container.abd6f0d2.js.map → container.053f798f.js.map} +1 -1
  46. package/dist/node/{context-panel.7c2f42c9.js → context-panel.0ae29ecf.js} +2 -2
  47. package/dist/node/{context-panel.7c2f42c9.js.map → context-panel.0ae29ecf.js.map} +1 -1
  48. package/dist/node/{controls.ffb44307.js → controls.6ec8e9ac.js} +2 -2
  49. package/dist/node/{controls.ffb44307.js.map → controls.6ec8e9ac.js.map} +1 -1
  50. package/dist/node/{dev.ee1e89e9.js → dev.4640438e.js} +2 -2
  51. package/dist/node/{dev.ee1e89e9.js.map → dev.4640438e.js.map} +1 -1
  52. package/dist/node/{header.4b58753a.js → header.cf9ba12b.js} +2 -2
  53. package/dist/node/{header.4b58753a.js.map → header.cf9ba12b.js.map} +1 -1
  54. package/dist/node/index.js +1 -1
  55. package/dist/node/index.js.map +1 -1
  56. package/dist/node/{location-panel.c39983e3.js → location-panel.2e422cc0.js} +2 -2
  57. package/dist/node/{location-panel.c39983e3.js.map → location-panel.2e422cc0.js.map} +1 -1
  58. package/dist/node/{main.module.ba3f4a78.css → main.module.3943144e.css} +2 -2
  59. package/dist/node/main.module.3943144e.css.map +1 -0
  60. package/dist/node/main.module.65e40c2e.css +2 -0
  61. package/dist/node/main.module.65e40c2e.css.map +1 -0
  62. package/dist/node/{main.module.61b261c8.css → main.module.8a9943af.css} +2 -2
  63. package/dist/node/main.module.8a9943af.css.map +1 -0
  64. package/dist/node/{map-page.cb4c713e.js → map-page.d0e099ab.js} +2 -2
  65. package/dist/node/{map-page.cb4c713e.js.map → map-page.d0e099ab.js.map} +1 -1
  66. package/dist/node/map-view.9dc96288.js +2 -0
  67. package/dist/node/map-view.9dc96288.js.map +1 -0
  68. package/package.json +3 -3
  69. package/src/container.ts +1 -1
  70. package/src/context-panel/main.module.sass +1 -1
  71. package/src/location-panel/main.module.sass +5 -0
  72. package/src/main.module.sass +2 -2
  73. package/src/{map-view/index.ts → map-view.ts} +51 -18
  74. package/dist/cjs/main.module.3dbc089f.css.map +0 -1
  75. package/dist/cjs/main.module.f085a193.css.map +0 -1
  76. package/dist/cjs/map-view.93363b41.js +0 -167
  77. package/dist/cjs/map-view.93363b41.js.map +0 -1
  78. package/dist/cjs/terrain.90f76b4e.js +0 -59
  79. package/dist/cjs/terrain.90f76b4e.js.map +0 -1
  80. package/dist/esm/map-view.a3fe6257.js +0 -161
  81. package/dist/esm/map-view.a3fe6257.js.map +0 -1
  82. package/dist/esm/terrain.f65cf7c5.js +0 -54
  83. package/dist/esm/terrain.f65cf7c5.js.map +0 -1
  84. package/dist/node/main.module.61b261c8.css.map +0 -1
  85. package/dist/node/main.module.89f269c7.css +0 -2
  86. package/dist/node/main.module.89f269c7.css.map +0 -1
  87. package/dist/node/main.module.ba3f4a78.css.map +0 -1
  88. package/dist/node/map-view.c6746dca.js +0 -2
  89. package/dist/node/map-view.c6746dca.js.map +0 -1
  90. package/dist/node/terrain.96ae432a.js +0 -2
  91. package/dist/node/terrain.96ae432a.js.map +0 -1
  92. package/src/map-view/terrain.ts +0 -63
@@ -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.1da2d70c.js.map"}
@@ -0,0 +1,172 @@
1
+ import $jKrEn$mainmodulef70e002bjs from "./main.module.f70e002b.js";
2
+ import "../cjs/main.module.f57e27f2.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.1fc6297b.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.1fc6297b.js.map"}
@@ -1,2 +1,2 @@
1
- require("./main.module.24615279.js"),require("./main.module.89f269c7.css"),require("./controls.ffb44307.js");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("classnames"),require("transition-hook"),require("@macrostrat/mapbox-react"),require("@macrostrat/ui-components"),require("@macrostrat/mapbox-utils"),require("@blueprintjs/core");var i={};i=new URL("main.module.24615279.js","file:"+__filename).toString(),new URL("controls.ffb44307.js","file:"+__filename).toString(),r(e).styled(r(i));
2
- //# sourceMappingURL=container.abd6f0d2.js.map
1
+ require("./main.module.24615279.js"),require("./main.module.65e40c2e.css"),require("./controls.6ec8e9ac.js");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("classnames"),require("transition-hook"),require("@macrostrat/mapbox-react"),require("@macrostrat/ui-components"),require("@macrostrat/mapbox-utils"),require("@blueprintjs/core");var i={};i=new URL("main.module.24615279.js","file:"+__filename).toString(),new URL("controls.6ec8e9ac.js","file:"+__filename).toString(),r(e).styled(r(i));
2
+ //# sourceMappingURL=container.053f798f.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.65e40c2e.css\");\nrequire(\"./controls.6ec8e9ac.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.6ec8e9ac.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.053f798f.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.6ec8e9ac.js\").toString();"],"names":["require","$lAyW8$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$14b8bde8ee648c70$exports","URL","__filename","toString","styled"],"version":3,"file":"container.053f798f.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- require("./main.module.61b261c8.css"),require("./main.module.e200d631.js");var e=require("@blueprintjs/core"),r=require("@macrostrat/hyper");function a(e){return e&&e.__esModule?e.default:e}require("@macrostrat/mapbox-react"),require("@macrostrat/ui-components");var i={};i=new URL("main.module.61b261c8.css","file:"+__filename).toString(),a(r).styled(a(i))(e.Spinner,{size:16});
2
- //# sourceMappingURL=context-panel.7c2f42c9.js.map
1
+ require("./main.module.8a9943af.css"),require("./main.module.e200d631.js");var e=require("@blueprintjs/core"),r=require("@macrostrat/hyper");function a(e){return e&&e.__esModule?e.default:e}require("@macrostrat/mapbox-react"),require("@macrostrat/ui-components");var i={};i=new URL("main.module.8a9943af.css","file:"+__filename).toString(),a(r).styled(a(i))(e.Spinner,{size:16});
2
+ //# sourceMappingURL=context-panel.0ae29ecf.js.map
@@ -1 +1 @@
1
- {"mappings":"A,Q,+C,Q,8C,I,E,Q,qB,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,4B,Q,6B,I,E,C,EEAA,EAAiB,IAAA,IAAoB,4CAAA,QAAA,YAA6C,QAAQ,GDSnE,AAFb,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA,IAEE,EAAA,OAAM,CAAG,CAAE,KAAM,EAAG","sources":["<anon>","packages/map-interface/src/context-panel/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-7d2d42ad16b9364e.js"],"sourcesContent":["require(\"./main.module.61b261c8.css\");\nrequire(\"./main.module.e200d631.js\");\nvar $14Taq$blueprintjscore = require(\"@blueprintjs/core\");\nvar $14Taq$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $14Taq$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $14Taq$macrostratuicomponents = require(\"@macrostrat/ui-components\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n\nvar $e988a53ec4c6f1a8$exports = {};\n$e988a53ec4c6f1a8$exports = new URL(\"main.module.61b261c8.css\", \"file:\" + __filename).toString();\n\n\n\n\nconst $8c3698ca3fcf939f$var$h = (0, ($parcel$interopDefault($14Taq$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($e988a53ec4c6f1a8$exports))));\nconst $8c3698ca3fcf939f$var$spinnerElement = $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Spinner), {\n size: 16\n});\nfunction $8c3698ca3fcf939f$export$4ec83e90d030b2f3({ isLoading: isLoading = false, onClick: onClick, active: active = false, large: large = true, icon: icon = \"menu\", style: style }) {\n return $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Button), {\n className: \"loading-button\",\n icon: isLoading ? $8c3698ca3fcf939f$var$spinnerElement : icon,\n large: large,\n minimal: true,\n onClick: onClick,\n active: active && !isLoading,\n style: style\n });\n}\nfunction $8c3698ca3fcf939f$export$9e3bae3c08bde368(props) {\n const isLoading = (0, $14Taq$macrostratmapboxreact.useMapStatus)((s)=>s.isLoading);\n return $8c3698ca3fcf939f$var$h($8c3698ca3fcf939f$export$4ec83e90d030b2f3, {\n ...props,\n isLoading: isLoading\n });\n}\nfunction $8c3698ca3fcf939f$export$a8cc0062d02a3841({ className: className, children: children, headerElement: headerElement = null, title: title = null, statusElement: statusElement = null, rightElement: rightElement = null, height: height, width: width, style: style = {} }) {\n let _rightElement = null;\n if (rightElement != null) _rightElement = $8c3698ca3fcf939f$var$h(\"div.right-element\", rightElement);\n let _headerElement = headerElement;\n if (title != null && _headerElement == null) {\n if (typeof title === \"string\") _headerElement = $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Text), {\n tagName: \"h2\",\n ellipsize: true\n }, title);\n else _headerElement = title;\n }\n if (_headerElement != null) _headerElement = $8c3698ca3fcf939f$var$h([\n _headerElement,\n $8c3698ca3fcf939f$var$h((0, $14Taq$macrostratuicomponents.Spacer))\n ]);\n return $8c3698ca3fcf939f$var$h(\"div.searchbar-holder\", {\n className: className,\n style: {\n width: width\n }\n }, [\n $8c3698ca3fcf939f$var$h(\"div.navbar-holder\", [\n $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Navbar), {\n className: \"searchbar navbar panel\",\n style: {\n height: height,\n ...style\n }\n }, [\n _headerElement,\n children,\n _rightElement\n ])\n ]),\n $8c3698ca3fcf939f$var$h.if(statusElement != null)((0, $14Taq$blueprintjscore.Card), {\n className: \"status-tongue\"\n }, statusElement)\n ]);\n}\n\n\n//# sourceMappingURL=context-panel.7c2f42c9.js.map\n","import { useMemo } from \"react\";\nimport { Navbar, Button, Spinner, Card, Text } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useMapStatus } from \"@macrostrat/mapbox-react\";\nimport { Spacer } from \"@macrostrat/ui-components\";\n\nconst h = hyper.styled(styles);\n\nconst spinnerElement = h(Spinner, { size: 16 });\n\nexport function LoadingButton({\n isLoading = false,\n onClick,\n active = false,\n large = true,\n icon = \"menu\",\n style,\n}) {\n return h(Button, {\n className: \"loading-button\",\n icon: isLoading ? spinnerElement : icon,\n large,\n minimal: true,\n onClick,\n active: active && !isLoading,\n style,\n });\n}\n\nexport function MapLoadingButton(props) {\n const isLoading = useMapStatus((s) => s.isLoading);\n return h(LoadingButton, { ...props, isLoading });\n}\n\ntype AnyChildren = React.ReactNode;\n\nexport interface FloatingNavbarProps {\n className?: string;\n children?: AnyChildren;\n headerElement?: AnyChildren;\n title?: AnyChildren;\n statusElement?: AnyChildren;\n rightElement?: AnyChildren;\n height?: number | string;\n width?: number | string;\n style?: object;\n}\n\nexport function FloatingNavbar({\n className,\n children,\n headerElement = null,\n title = null,\n statusElement = null,\n rightElement = null,\n height,\n width,\n style = {},\n}: FloatingNavbarProps) {\n let _rightElement: React.ReactNode | null = null;\n if (rightElement != null) {\n _rightElement = h(\"div.right-element\", rightElement);\n }\n\n let _headerElement: React.ReactNode | null = headerElement;\n if (title != null && _headerElement == null) {\n if (typeof title === \"string\") {\n _headerElement = h(Text, { tagName: \"h2\", ellipsize: true }, title);\n } else {\n _headerElement = title;\n }\n }\n\n if (_headerElement != null) {\n _headerElement = h([_headerElement, h(Spacer)]);\n }\n\n return h(\"div.searchbar-holder\", { className, style: { width } }, [\n h(\"div.navbar-holder\", [\n h(\n Navbar,\n {\n className: \"searchbar navbar panel\",\n style: { height, ...style },\n },\n [_headerElement, children, _rightElement]\n ),\n ]),\n h.if(statusElement != null)(\n Card,\n { className: \"status-tongue\" },\n statusElement\n ),\n ]);\n}\n","module.exports = new __parcel__URL__(\"main.module.61b261c8.css\").toString();"],"names":["require","$14Taq$blueprintjscore","$14Taq$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$e988a53ec4c6f1a8$exports","URL","__filename","toString","$8c3698ca3fcf939f$var$h","styled","Spinner","size"],"version":3,"file":"context-panel.7c2f42c9.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,+C,Q,8C,I,E,Q,qB,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,4B,Q,6B,I,E,C,EEAA,EAAiB,IAAA,IAAoB,4CAAA,QAAA,YAA6C,QAAQ,GDSnE,AAFb,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA,IAEE,EAAA,OAAM,CAAG,CAAE,KAAM,EAAG","sources":["<anon>","packages/map-interface/src/context-panel/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-7d2d42ad16b9364e.js"],"sourcesContent":["require(\"./main.module.8a9943af.css\");\nrequire(\"./main.module.e200d631.js\");\nvar $14Taq$blueprintjscore = require(\"@blueprintjs/core\");\nvar $14Taq$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $14Taq$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $14Taq$macrostratuicomponents = require(\"@macrostrat/ui-components\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n\nvar $e988a53ec4c6f1a8$exports = {};\n$e988a53ec4c6f1a8$exports = new URL(\"main.module.8a9943af.css\", \"file:\" + __filename).toString();\n\n\n\n\nconst $8c3698ca3fcf939f$var$h = (0, ($parcel$interopDefault($14Taq$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($e988a53ec4c6f1a8$exports))));\nconst $8c3698ca3fcf939f$var$spinnerElement = $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Spinner), {\n size: 16\n});\nfunction $8c3698ca3fcf939f$export$4ec83e90d030b2f3({ isLoading: isLoading = false, onClick: onClick, active: active = false, large: large = true, icon: icon = \"menu\", style: style }) {\n return $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Button), {\n className: \"loading-button\",\n icon: isLoading ? $8c3698ca3fcf939f$var$spinnerElement : icon,\n large: large,\n minimal: true,\n onClick: onClick,\n active: active && !isLoading,\n style: style\n });\n}\nfunction $8c3698ca3fcf939f$export$9e3bae3c08bde368(props) {\n const isLoading = (0, $14Taq$macrostratmapboxreact.useMapStatus)((s)=>s.isLoading);\n return $8c3698ca3fcf939f$var$h($8c3698ca3fcf939f$export$4ec83e90d030b2f3, {\n ...props,\n isLoading: isLoading\n });\n}\nfunction $8c3698ca3fcf939f$export$a8cc0062d02a3841({ className: className, children: children, headerElement: headerElement = null, title: title = null, statusElement: statusElement = null, rightElement: rightElement = null, height: height, width: width, style: style = {} }) {\n let _rightElement = null;\n if (rightElement != null) _rightElement = $8c3698ca3fcf939f$var$h(\"div.right-element\", rightElement);\n let _headerElement = headerElement;\n if (title != null && _headerElement == null) {\n if (typeof title === \"string\") _headerElement = $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Text), {\n tagName: \"h2\",\n ellipsize: true\n }, title);\n else _headerElement = title;\n }\n if (_headerElement != null) _headerElement = $8c3698ca3fcf939f$var$h([\n _headerElement,\n $8c3698ca3fcf939f$var$h((0, $14Taq$macrostratuicomponents.Spacer))\n ]);\n return $8c3698ca3fcf939f$var$h(\"div.searchbar-holder\", {\n className: className,\n style: {\n width: width\n }\n }, [\n $8c3698ca3fcf939f$var$h(\"div.navbar-holder\", [\n $8c3698ca3fcf939f$var$h((0, $14Taq$blueprintjscore.Navbar), {\n className: \"searchbar navbar panel\",\n style: {\n height: height,\n ...style\n }\n }, [\n _headerElement,\n children,\n _rightElement\n ])\n ]),\n $8c3698ca3fcf939f$var$h.if(statusElement != null)((0, $14Taq$blueprintjscore.Card), {\n className: \"status-tongue\"\n }, statusElement)\n ]);\n}\n\n\n//# sourceMappingURL=context-panel.0ae29ecf.js.map\n","import { useMemo } from \"react\";\nimport { Navbar, Button, Spinner, Card, Text } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useMapStatus } from \"@macrostrat/mapbox-react\";\nimport { Spacer } from \"@macrostrat/ui-components\";\n\nconst h = hyper.styled(styles);\n\nconst spinnerElement = h(Spinner, { size: 16 });\n\nexport function LoadingButton({\n isLoading = false,\n onClick,\n active = false,\n large = true,\n icon = \"menu\",\n style,\n}) {\n return h(Button, {\n className: \"loading-button\",\n icon: isLoading ? spinnerElement : icon,\n large,\n minimal: true,\n onClick,\n active: active && !isLoading,\n style,\n });\n}\n\nexport function MapLoadingButton(props) {\n const isLoading = useMapStatus((s) => s.isLoading);\n return h(LoadingButton, { ...props, isLoading });\n}\n\ntype AnyChildren = React.ReactNode;\n\nexport interface FloatingNavbarProps {\n className?: string;\n children?: AnyChildren;\n headerElement?: AnyChildren;\n title?: AnyChildren;\n statusElement?: AnyChildren;\n rightElement?: AnyChildren;\n height?: number | string;\n width?: number | string;\n style?: object;\n}\n\nexport function FloatingNavbar({\n className,\n children,\n headerElement = null,\n title = null,\n statusElement = null,\n rightElement = null,\n height,\n width,\n style = {},\n}: FloatingNavbarProps) {\n let _rightElement: React.ReactNode | null = null;\n if (rightElement != null) {\n _rightElement = h(\"div.right-element\", rightElement);\n }\n\n let _headerElement: React.ReactNode | null = headerElement;\n if (title != null && _headerElement == null) {\n if (typeof title === \"string\") {\n _headerElement = h(Text, { tagName: \"h2\", ellipsize: true }, title);\n } else {\n _headerElement = title;\n }\n }\n\n if (_headerElement != null) {\n _headerElement = h([_headerElement, h(Spacer)]);\n }\n\n return h(\"div.searchbar-holder\", { className, style: { width } }, [\n h(\"div.navbar-holder\", [\n h(\n Navbar,\n {\n className: \"searchbar navbar panel\",\n style: { height, ...style },\n },\n [_headerElement, children, _rightElement]\n ),\n ]),\n h.if(statusElement != null)(\n Card,\n { className: \"status-tongue\" },\n statusElement\n ),\n ]);\n}\n","module.exports = new __parcel__URL__(\"main.module.8a9943af.css\").toString();"],"names":["require","$14Taq$blueprintjscore","$14Taq$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$e988a53ec4c6f1a8$exports","URL","__filename","toString","$8c3698ca3fcf939f$var$h","styled","Spinner","size"],"version":3,"file":"context-panel.0ae29ecf.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- require("./main.module.24615279.js"),require("./main.module.89f269c7.css"),require("react"),require("mapbox-gl");var r=require("@macrostrat/hyper");function e(r){return r&&r.__esModule?r.default:r}require("@macrostrat/mapbox-react"),require("@macrostrat/ui-components");var t=globalThis,a={},i={},o=t.parcelRequire94c2;null==o&&((o=function(r){if(r in a)return a[r].exports;if(r in i){var e=i[r];delete i[r];var t={id:r,exports:{}};return a[r]=t,e.call(t.exports,t,t.exports),t.exports}var o=Error("Cannot find module '"+r+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(r,e){i[r]=e},t.parcelRequire94c2=o),o.register;var u=o("6ULxP");e(r).styled(e(u));
2
- //# sourceMappingURL=controls.ffb44307.js.map
1
+ require("./main.module.24615279.js"),require("./main.module.65e40c2e.css"),require("react"),require("mapbox-gl");var r=require("@macrostrat/hyper");function e(r){return r&&r.__esModule?r.default:r}require("@macrostrat/mapbox-react"),require("@macrostrat/ui-components");var t=globalThis,a={},i={},o=t.parcelRequire94c2;null==o&&((o=function(r){if(r in a)return a[r].exports;if(r in i){var e=i[r];delete i[r];var t={id:r,exports:{}};return a[r]=t,e.call(t.exports,t,t.exports),t.exports}var o=Error("Cannot find module '"+r+"'");throw o.code="MODULE_NOT_FOUND",o}).register=function(r,e){i[r]=e},t.parcelRequire94c2=o),o.register;var u=o("6ULxP");e(r).styled(e(u));
2
+ //# sourceMappingURL=controls.6ec8e9ac.js.map
@@ -1 +1 @@
1
- {"mappings":"A,Q,8C,Q,+C,Q,S,Q,a,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,4B,Q,6B,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,SCcU,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/controls.ts"],"sourcesContent":["require(\"./main.module.24615279.js\");\nrequire(\"./main.module.89f269c7.css\");\nvar $kbh3o$react = require(\"react\");\nvar $kbh3o$mapboxgl = require(\"mapbox-gl\");\nvar $kbh3o$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $kbh3o$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $kbh3o$macrostratuicomponents = require(\"@macrostrat/ui-components\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\nvar $6ULxP = parcelRequire(\"6ULxP\");\n\n\nconst $7a11e3c77fefb3c4$var$h = (0, ($parcel$interopDefault($kbh3o$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($6ULxP))));\nfunction $7a11e3c77fefb3c4$var$ScaleControl(props) {\n const optionsRef = (0, $kbh3o$react.useRef)({\n maxWidth: 200,\n unit: \"metric\"\n });\n return $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.MapControlWrapper), {\n className: \"map-scale-control\",\n control: (0, $kbh3o$mapboxgl.ScaleControl),\n options: optionsRef.current,\n ...props\n });\n}\nfunction $7a11e3c77fefb3c4$var$GeolocationControl(props) {\n const optionsRef = (0, $kbh3o$react.useRef)({\n showAccuracyCircle: true,\n showUserLocation: true,\n trackUserLocation: true,\n positionOptions: {\n enableHighAccuracy: true\n }\n });\n return $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.MapControlWrapper), {\n control: (0, $kbh3o$mapboxgl.GeolocateControl),\n options: optionsRef.current,\n ...props\n });\n}\nfunction $7a11e3c77fefb3c4$export$db1a2e058a06fb5c({ children: children }) {\n const { isInitialized: isInitialized } = (0, $kbh3o$macrostratmapboxreact.useMapStatus)();\n if (!isInitialized) return null;\n return $7a11e3c77fefb3c4$var$h(\"div.map-controls\", [\n $7a11e3c77fefb3c4$var$h($7a11e3c77fefb3c4$var$ScaleControl),\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.ThreeDControl), {\n className: \"map-3d-control\"\n }),\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.CompassControl), {\n className: \"compass-control\"\n }),\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.GlobeControl), {\n className: \"globe-control\"\n }),\n $7a11e3c77fefb3c4$var$h($7a11e3c77fefb3c4$var$GeolocationControl, {\n className: \"geolocation-control\"\n }),\n // If we have global development tools enabled, show the button\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratuicomponents.DevToolsButtonSlot), {\n className: \"map-control\"\n }),\n children\n ]);\n}\n\n\n//# sourceMappingURL=controls.ffb44307.js.map\n","import { useRef } from \"react\";\nimport { GeolocateControl } from \"mapbox-gl\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport {\n CompassControl,\n GlobeControl,\n ThreeDControl,\n MapControlWrapper,\n useMapStatus,\n} from \"@macrostrat/mapbox-react\";\nimport { ScaleControl as BaseScaleControl } from \"mapbox-gl\";\nimport { DevToolsButtonSlot } from \"@macrostrat/ui-components\";\n\nconst h = hyper.styled(styles);\n\nfunction ScaleControl(props) {\n const optionsRef = useRef({\n maxWidth: 200,\n unit: \"metric\",\n });\n return h(MapControlWrapper, {\n className: \"map-scale-control\",\n control: BaseScaleControl,\n options: optionsRef.current,\n ...props,\n });\n}\n\nfunction GeolocationControl(props) {\n const optionsRef = useRef({\n showAccuracyCircle: true,\n showUserLocation: true,\n trackUserLocation: true,\n positionOptions: {\n enableHighAccuracy: true,\n },\n });\n return h(MapControlWrapper, {\n control: GeolocateControl,\n options: optionsRef.current,\n ...props,\n });\n}\n\nexport function MapBottomControls({ children }) {\n const { isInitialized } = useMapStatus();\n\n if (!isInitialized) {\n return null;\n }\n\n return h(\"div.map-controls\", [\n h(ScaleControl),\n h(ThreeDControl, { className: \"map-3d-control\" }),\n h(CompassControl, { className: \"compass-control\" }),\n h(GlobeControl, { className: \"globe-control\" }),\n h(GeolocationControl, { className: \"geolocation-control\" }),\n // If we have global development tools enabled, show the button\n h(DevToolsButtonSlot, { className: \"map-control\" }),\n children,\n ]);\n}\n"],"names":["require","$kbh3o$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$6ULxP","styled"],"version":3,"file":"controls.ffb44307.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,8C,Q,+C,Q,S,Q,a,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,4B,Q,6B,I,E,W,E,C,E,E,C,E,E,E,iB,A,O,I,A,C,E,S,C,E,G,K,E,O,C,C,E,C,O,C,G,K,E,C,I,E,C,C,E,A,Q,C,C,E,C,I,E,C,G,E,Q,C,C,E,O,C,C,E,C,E,E,I,C,E,O,C,E,E,O,E,E,O,A,C,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,Q,C,S,C,C,C,E,C,C,E,C,C,E,E,iB,C,G,E,Q,C,I,E,E,SCcU,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/controls.ts"],"sourcesContent":["require(\"./main.module.24615279.js\");\nrequire(\"./main.module.65e40c2e.css\");\nvar $kbh3o$react = require(\"react\");\nvar $kbh3o$mapboxgl = require(\"mapbox-gl\");\nvar $kbh3o$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $kbh3o$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $kbh3o$macrostratuicomponents = require(\"@macrostrat/ui-components\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequire94c2\"];\n\nif (parcelRequire == null) {\n parcelRequire = function(id) {\n if (id in $parcel$modules) {\n return $parcel$modules[id].exports;\n }\n if (id in $parcel$inits) {\n var init = $parcel$inits[id];\n delete $parcel$inits[id];\n var module = {id: id, exports: {}};\n $parcel$modules[id] = module;\n init.call(module.exports, module, module.exports);\n return module.exports;\n }\n var err = new Error(\"Cannot find module '\" + id + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n };\n\n parcelRequire.register = function register(id, init) {\n $parcel$inits[id] = init;\n };\n\n $parcel$global[\"parcelRequire94c2\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n\n\n\nvar $6ULxP = parcelRequire(\"6ULxP\");\n\n\nconst $7a11e3c77fefb3c4$var$h = (0, ($parcel$interopDefault($kbh3o$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($6ULxP))));\nfunction $7a11e3c77fefb3c4$var$ScaleControl(props) {\n const optionsRef = (0, $kbh3o$react.useRef)({\n maxWidth: 200,\n unit: \"metric\"\n });\n return $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.MapControlWrapper), {\n className: \"map-scale-control\",\n control: (0, $kbh3o$mapboxgl.ScaleControl),\n options: optionsRef.current,\n ...props\n });\n}\nfunction $7a11e3c77fefb3c4$var$GeolocationControl(props) {\n const optionsRef = (0, $kbh3o$react.useRef)({\n showAccuracyCircle: true,\n showUserLocation: true,\n trackUserLocation: true,\n positionOptions: {\n enableHighAccuracy: true\n }\n });\n return $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.MapControlWrapper), {\n control: (0, $kbh3o$mapboxgl.GeolocateControl),\n options: optionsRef.current,\n ...props\n });\n}\nfunction $7a11e3c77fefb3c4$export$db1a2e058a06fb5c({ children: children }) {\n const { isInitialized: isInitialized } = (0, $kbh3o$macrostratmapboxreact.useMapStatus)();\n if (!isInitialized) return null;\n return $7a11e3c77fefb3c4$var$h(\"div.map-controls\", [\n $7a11e3c77fefb3c4$var$h($7a11e3c77fefb3c4$var$ScaleControl),\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.ThreeDControl), {\n className: \"map-3d-control\"\n }),\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.CompassControl), {\n className: \"compass-control\"\n }),\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratmapboxreact.GlobeControl), {\n className: \"globe-control\"\n }),\n $7a11e3c77fefb3c4$var$h($7a11e3c77fefb3c4$var$GeolocationControl, {\n className: \"geolocation-control\"\n }),\n // If we have global development tools enabled, show the button\n $7a11e3c77fefb3c4$var$h((0, $kbh3o$macrostratuicomponents.DevToolsButtonSlot), {\n className: \"map-control\"\n }),\n children\n ]);\n}\n\n\n//# sourceMappingURL=controls.6ec8e9ac.js.map\n","import { useRef } from \"react\";\nimport { GeolocateControl } from \"mapbox-gl\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport {\n CompassControl,\n GlobeControl,\n ThreeDControl,\n MapControlWrapper,\n useMapStatus,\n} from \"@macrostrat/mapbox-react\";\nimport { ScaleControl as BaseScaleControl } from \"mapbox-gl\";\nimport { DevToolsButtonSlot } from \"@macrostrat/ui-components\";\n\nconst h = hyper.styled(styles);\n\nfunction ScaleControl(props) {\n const optionsRef = useRef({\n maxWidth: 200,\n unit: \"metric\",\n });\n return h(MapControlWrapper, {\n className: \"map-scale-control\",\n control: BaseScaleControl,\n options: optionsRef.current,\n ...props,\n });\n}\n\nfunction GeolocationControl(props) {\n const optionsRef = useRef({\n showAccuracyCircle: true,\n showUserLocation: true,\n trackUserLocation: true,\n positionOptions: {\n enableHighAccuracy: true,\n },\n });\n return h(MapControlWrapper, {\n control: GeolocateControl,\n options: optionsRef.current,\n ...props,\n });\n}\n\nexport function MapBottomControls({ children }) {\n const { isInitialized } = useMapStatus();\n\n if (!isInitialized) {\n return null;\n }\n\n return h(\"div.map-controls\", [\n h(ScaleControl),\n h(ThreeDControl, { className: \"map-3d-control\" }),\n h(CompassControl, { className: \"compass-control\" }),\n h(GlobeControl, { className: \"globe-control\" }),\n h(GeolocationControl, { className: \"geolocation-control\" }),\n // If we have global development tools enabled, show the button\n h(DevToolsButtonSlot, { className: \"map-control\" }),\n children,\n ]);\n}\n"],"names":["require","$kbh3o$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","$6ULxP","styled"],"version":3,"file":"controls.6ec8e9ac.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.d0e099ab.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.d0e099ab.js","file:"+__filename).toString(),t("2DICz"),t("gnyJS"),t("2mAQJ");
2
+ //# sourceMappingURL=dev.4640438e.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.d0e099ab.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.d0e099ab.js\", \"file:\" + __filename).toString();\n\n\nparcelRequire(\"2DICz\");\nparcelRequire(\"gnyJS\");\nparcelRequire(\"2mAQJ\");\n\n\n//# sourceMappingURL=dev.4640438e.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.d0e099ab.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.4640438e.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- require("./main.module.ba3f4a78.css"),require("./main.module.3a8fef67.js"),require("./location-info.9f59aad3.js"),require("@blueprintjs/core");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("@macrostrat/ui-components"),require("@macrostrat/mapbox-react"),require("classnames");var a={};a=new URL("main.module.ba3f4a78.css","file:"+__filename).toString(),new URL("location-info.9f59aad3.js","file:"+__filename).toString(),r(e).styled(r(a));
2
- //# sourceMappingURL=header.4b58753a.js.map
1
+ require("./main.module.3943144e.css"),require("./main.module.3a8fef67.js"),require("./location-info.9f59aad3.js"),require("@blueprintjs/core");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("@macrostrat/ui-components"),require("@macrostrat/mapbox-react"),require("classnames");var a={};a=new URL("main.module.3943144e.css","file:"+__filename).toString(),new URL("location-info.9f59aad3.js","file:"+__filename).toString(),r(e).styled(r(a));
2
+ //# sourceMappingURL=header.cf9ba12b.js.map
@@ -1 +1 @@
1
- {"mappings":"A,Q,+C,Q,8C,Q,gD,Q,qB,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,6B,Q,4B,Q,c,I,E,C,EEAA,EAAiB,IAAA,IAAoB,4CAAA,QAAA,YAA6C,QAAQ,GCAzE,IAAA,IAAoB,6CAAA,QAAA,YAA8C,QAAQ,GFYjF,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/location-panel/header.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-6d6e92b02eb73299.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-c5bf3b5be72c4e09.js"],"sourcesContent":["require(\"./main.module.ba3f4a78.css\");\nrequire(\"./main.module.3a8fef67.js\");\nrequire(\"./location-info.9f59aad3.js\");\nvar $9HnAS$blueprintjscore = require(\"@blueprintjs/core\");\nvar $9HnAS$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $9HnAS$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $9HnAS$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $9HnAS$classnames = require(\"classnames\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n\nvar $b3d3cdac95f8f8a9$exports = {};\n$b3d3cdac95f8f8a9$exports = new URL(\"main.module.ba3f4a78.css\", \"file:\" + __filename).toString();\n\n\n\nvar $7d4f3c2ee54a88a2$exports = {};\n$7d4f3c2ee54a88a2$exports = new URL(\"location-info.9f59aad3.js\", \"file:\" + __filename).toString();\n\n\n\n\nconst $1a913554a5c0869b$var$h = (0, ($parcel$interopDefault($9HnAS$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($b3d3cdac95f8f8a9$exports))));\nfunction $1a913554a5c0869b$var$PositionButton({ position: position, bounds: bounds, showCopyLink: showCopyLink = false }) {\n const focusState = (0, $9HnAS$macrostratmapboxreact.useFocusState)(position);\n const copyLinkIsVisible = (0, $9HnAS$macrostratmapboxreact.isCentered)(focusState) && showCopyLink;\n return $1a913554a5c0869b$var$h(\"div.position-controls\", [\n $1a913554a5c0869b$var$h((0, $9HnAS$macrostratmapboxreact.LocationFocusButton), {\n location: position,\n bounds: bounds,\n focusState: focusState\n }, []),\n $1a913554a5c0869b$var$h.if(copyLinkIsVisible && position != null)($1a913554a5c0869b$var$CopyLinkButton, {\n itemName: \"position\"\n })\n ]);\n}\nfunction $1a913554a5c0869b$var$CopyLinkButton({ itemName: itemName, children: children, onClick: onClick, ...rest }) {\n const toaster = (0, $9HnAS$macrostratuicomponents.useToaster)();\n let message = `Copied link`;\n if (itemName != null) message += ` to ${itemName}`;\n message += \"!\";\n return $1a913554a5c0869b$var$h((0, $9HnAS$blueprintjscore.Button), {\n className: \"copy-link-button\",\n rightIcon: $1a913554a5c0869b$var$h((0, $9HnAS$blueprintjscore.Icon), {\n icon: \"link\",\n size: 12\n }),\n minimal: true,\n small: true,\n onClick () {\n navigator.clipboard.writeText(window.location.href).then(()=>{\n toaster?.show({\n message: message,\n intent: \"success\",\n icon: \"clipboard\",\n timeout: 1000\n });\n onClick?.();\n }, ()=>{\n toaster?.show({\n message: \"Failed to copy link\",\n intent: \"danger\",\n icon: \"error\",\n timeout: 1000\n });\n });\n },\n ...rest\n }, children ?? \"Copy link\");\n}\nfunction $1a913554a5c0869b$export$e9ff14c4822c2e8c(props) {\n const { onClose: onClose, position: position, bounds: bounds, zoom: zoom = 7, elevation: elevation, showCopyPositionButton: showCopyPositionButton, fixedHeight: fixedHeight = false, children: children, className: className } = props;\n let leftButton = null;\n if (bounds != null || position != null) leftButton = $1a913554a5c0869b$var$h($1a913554a5c0869b$var$PositionButton, {\n position: position,\n bounds: bounds,\n showCopyLink: showCopyPositionButton\n });\n return $1a913554a5c0869b$var$h(\"header.location-panel-header\", {\n className: (0, ($parcel$interopDefault($9HnAS$classnames)))(className, {\n \"fixed-height\": fixedHeight\n })\n }, [\n leftButton,\n children,\n $1a913554a5c0869b$var$h(\"div.spacer\"),\n $1a913554a5c0869b$var$h.if(position != null)((0, $7d4f3c2ee54a88a2$exports.LngLatCoords), {\n position: position,\n zoom: zoom,\n className: \"infodrawer-header-item\"\n }),\n $1a913554a5c0869b$var$h.if(elevation != null)((0, $7d4f3c2ee54a88a2$exports.Elevation), {\n elevation: elevation,\n className: \"infodrawer-header-item\"\n }),\n $1a913554a5c0869b$var$h.if(onClose != null)((0, $9HnAS$blueprintjscore.Button), {\n minimal: true,\n icon: \"cross\",\n onClick: onClose\n })\n ]);\n}\n\n\n//# sourceMappingURL=header.4b58753a.js.map\n","import { Icon, Button } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useToaster } from \"@macrostrat/ui-components\";\nimport { LngLatCoords, Elevation } from \"../location-info\";\nimport {\n LocationFocusButton,\n useFocusState,\n isCentered,\n} from \"@macrostrat/mapbox-react\";\nimport classNames from \"classnames\";\n\nconst h = hyper.styled(styles);\n\nfunction PositionButton({ position, bounds, showCopyLink = false }) {\n const focusState = useFocusState(position);\n\n const copyLinkIsVisible = isCentered(focusState) && showCopyLink;\n\n return h(\"div.position-controls\", [\n h(LocationFocusButton, { location: position, bounds, focusState }, []),\n h.if(copyLinkIsVisible && position != null)(CopyLinkButton, {\n itemName: \"position\",\n }),\n ]);\n}\n\nfunction CopyLinkButton({ itemName, children, onClick, ...rest }) {\n const toaster = useToaster();\n\n let message = `Copied link`;\n if (itemName != null) {\n message += ` to ${itemName}`;\n }\n message += \"!\";\n\n return h(\n Button,\n {\n className: \"copy-link-button\",\n rightIcon: h(Icon, { icon: \"link\", size: 12 }),\n minimal: true,\n small: true,\n onClick() {\n navigator.clipboard.writeText(window.location.href).then(\n () => {\n toaster?.show({\n message,\n intent: \"success\",\n icon: \"clipboard\",\n timeout: 1000,\n });\n onClick?.();\n },\n () => {\n toaster?.show({\n message: \"Failed to copy link\",\n intent: \"danger\",\n icon: \"error\",\n timeout: 1000,\n });\n }\n );\n },\n ...rest,\n },\n children ?? \"Copy link\"\n );\n}\n\nexport interface InfoDrawerHeaderProps {\n onClose?: () => void;\n position?: mapboxgl.LngLat;\n zoom?: number;\n elevation?: number;\n showCopyPositionButton?: boolean;\n bounds?: mapboxgl.LngLatBounds;\n fixedHeight?: boolean;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function InfoDrawerHeader(props: InfoDrawerHeaderProps) {\n const {\n onClose,\n position,\n bounds,\n zoom = 7,\n elevation,\n showCopyPositionButton,\n fixedHeight = false,\n children,\n className,\n } = props;\n\n let leftButton = null;\n if (bounds != null || position != null) {\n leftButton = h(PositionButton, {\n position,\n bounds,\n showCopyLink: showCopyPositionButton,\n });\n }\n\n return h(\n \"header.location-panel-header\",\n {\n className: classNames(className, { \"fixed-height\": fixedHeight }),\n },\n [\n leftButton,\n children,\n h(\"div.spacer\"),\n h.if(position != null)(LngLatCoords, {\n position,\n zoom,\n className: \"infodrawer-header-item\",\n }),\n h.if(elevation != null)(Elevation, {\n elevation,\n className: \"infodrawer-header-item\",\n }),\n h.if(onClose != null)(Button, {\n minimal: true,\n icon: \"cross\",\n onClick: onClose,\n }),\n ]\n );\n}\n","module.exports = new __parcel__URL__(\"main.module.ba3f4a78.css\").toString();","module.exports = new __parcel__URL__(\"location-info.9f59aad3.js\").toString();"],"names":["require","$9HnAS$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$b3d3cdac95f8f8a9$exports","URL","__filename","toString","styled"],"version":3,"file":"header.4b58753a.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,+C,Q,8C,Q,gD,Q,qB,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,6B,Q,4B,Q,c,I,E,C,EEAA,EAAiB,IAAA,IAAoB,4CAAA,QAAA,YAA6C,QAAQ,GCAzE,IAAA,IAAoB,6CAAA,QAAA,YAA8C,QAAQ,GFYjF,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/location-panel/header.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-6d6e92b02eb73299.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-c5bf3b5be72c4e09.js"],"sourcesContent":["require(\"./main.module.3943144e.css\");\nrequire(\"./main.module.3a8fef67.js\");\nrequire(\"./location-info.9f59aad3.js\");\nvar $9HnAS$blueprintjscore = require(\"@blueprintjs/core\");\nvar $9HnAS$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $9HnAS$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $9HnAS$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $9HnAS$classnames = require(\"classnames\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\n\nvar $b3d3cdac95f8f8a9$exports = {};\n$b3d3cdac95f8f8a9$exports = new URL(\"main.module.3943144e.css\", \"file:\" + __filename).toString();\n\n\n\nvar $7d4f3c2ee54a88a2$exports = {};\n$7d4f3c2ee54a88a2$exports = new URL(\"location-info.9f59aad3.js\", \"file:\" + __filename).toString();\n\n\n\n\nconst $1a913554a5c0869b$var$h = (0, ($parcel$interopDefault($9HnAS$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($b3d3cdac95f8f8a9$exports))));\nfunction $1a913554a5c0869b$var$PositionButton({ position: position, bounds: bounds, showCopyLink: showCopyLink = false }) {\n const focusState = (0, $9HnAS$macrostratmapboxreact.useFocusState)(position);\n const copyLinkIsVisible = (0, $9HnAS$macrostratmapboxreact.isCentered)(focusState) && showCopyLink;\n return $1a913554a5c0869b$var$h(\"div.position-controls\", [\n $1a913554a5c0869b$var$h((0, $9HnAS$macrostratmapboxreact.LocationFocusButton), {\n location: position,\n bounds: bounds,\n focusState: focusState\n }, []),\n $1a913554a5c0869b$var$h.if(copyLinkIsVisible && position != null)($1a913554a5c0869b$var$CopyLinkButton, {\n itemName: \"position\"\n })\n ]);\n}\nfunction $1a913554a5c0869b$var$CopyLinkButton({ itemName: itemName, children: children, onClick: onClick, ...rest }) {\n const toaster = (0, $9HnAS$macrostratuicomponents.useToaster)();\n let message = `Copied link`;\n if (itemName != null) message += ` to ${itemName}`;\n message += \"!\";\n return $1a913554a5c0869b$var$h((0, $9HnAS$blueprintjscore.Button), {\n className: \"copy-link-button\",\n rightIcon: $1a913554a5c0869b$var$h((0, $9HnAS$blueprintjscore.Icon), {\n icon: \"link\",\n size: 12\n }),\n minimal: true,\n small: true,\n onClick () {\n navigator.clipboard.writeText(window.location.href).then(()=>{\n toaster?.show({\n message: message,\n intent: \"success\",\n icon: \"clipboard\",\n timeout: 1000\n });\n onClick?.();\n }, ()=>{\n toaster?.show({\n message: \"Failed to copy link\",\n intent: \"danger\",\n icon: \"error\",\n timeout: 1000\n });\n });\n },\n ...rest\n }, children ?? \"Copy link\");\n}\nfunction $1a913554a5c0869b$export$e9ff14c4822c2e8c(props) {\n const { onClose: onClose, position: position, bounds: bounds, zoom: zoom = 7, elevation: elevation, showCopyPositionButton: showCopyPositionButton, fixedHeight: fixedHeight = false, children: children, className: className } = props;\n let leftButton = null;\n if (bounds != null || position != null) leftButton = $1a913554a5c0869b$var$h($1a913554a5c0869b$var$PositionButton, {\n position: position,\n bounds: bounds,\n showCopyLink: showCopyPositionButton\n });\n return $1a913554a5c0869b$var$h(\"header.location-panel-header\", {\n className: (0, ($parcel$interopDefault($9HnAS$classnames)))(className, {\n \"fixed-height\": fixedHeight\n })\n }, [\n leftButton,\n children,\n $1a913554a5c0869b$var$h(\"div.spacer\"),\n $1a913554a5c0869b$var$h.if(position != null)((0, $7d4f3c2ee54a88a2$exports.LngLatCoords), {\n position: position,\n zoom: zoom,\n className: \"infodrawer-header-item\"\n }),\n $1a913554a5c0869b$var$h.if(elevation != null)((0, $7d4f3c2ee54a88a2$exports.Elevation), {\n elevation: elevation,\n className: \"infodrawer-header-item\"\n }),\n $1a913554a5c0869b$var$h.if(onClose != null)((0, $9HnAS$blueprintjscore.Button), {\n minimal: true,\n icon: \"cross\",\n onClick: onClose\n })\n ]);\n}\n\n\n//# sourceMappingURL=header.cf9ba12b.js.map\n","import { Icon, Button } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport styles from \"./main.module.sass\";\nimport { useToaster } from \"@macrostrat/ui-components\";\nimport { LngLatCoords, Elevation } from \"../location-info\";\nimport {\n LocationFocusButton,\n useFocusState,\n isCentered,\n} from \"@macrostrat/mapbox-react\";\nimport classNames from \"classnames\";\n\nconst h = hyper.styled(styles);\n\nfunction PositionButton({ position, bounds, showCopyLink = false }) {\n const focusState = useFocusState(position);\n\n const copyLinkIsVisible = isCentered(focusState) && showCopyLink;\n\n return h(\"div.position-controls\", [\n h(LocationFocusButton, { location: position, bounds, focusState }, []),\n h.if(copyLinkIsVisible && position != null)(CopyLinkButton, {\n itemName: \"position\",\n }),\n ]);\n}\n\nfunction CopyLinkButton({ itemName, children, onClick, ...rest }) {\n const toaster = useToaster();\n\n let message = `Copied link`;\n if (itemName != null) {\n message += ` to ${itemName}`;\n }\n message += \"!\";\n\n return h(\n Button,\n {\n className: \"copy-link-button\",\n rightIcon: h(Icon, { icon: \"link\", size: 12 }),\n minimal: true,\n small: true,\n onClick() {\n navigator.clipboard.writeText(window.location.href).then(\n () => {\n toaster?.show({\n message,\n intent: \"success\",\n icon: \"clipboard\",\n timeout: 1000,\n });\n onClick?.();\n },\n () => {\n toaster?.show({\n message: \"Failed to copy link\",\n intent: \"danger\",\n icon: \"error\",\n timeout: 1000,\n });\n }\n );\n },\n ...rest,\n },\n children ?? \"Copy link\"\n );\n}\n\nexport interface InfoDrawerHeaderProps {\n onClose?: () => void;\n position?: mapboxgl.LngLat;\n zoom?: number;\n elevation?: number;\n showCopyPositionButton?: boolean;\n bounds?: mapboxgl.LngLatBounds;\n fixedHeight?: boolean;\n children?: React.ReactNode;\n className?: string;\n}\n\nexport function InfoDrawerHeader(props: InfoDrawerHeaderProps) {\n const {\n onClose,\n position,\n bounds,\n zoom = 7,\n elevation,\n showCopyPositionButton,\n fixedHeight = false,\n children,\n className,\n } = props;\n\n let leftButton = null;\n if (bounds != null || position != null) {\n leftButton = h(PositionButton, {\n position,\n bounds,\n showCopyLink: showCopyPositionButton,\n });\n }\n\n return h(\n \"header.location-panel-header\",\n {\n className: classNames(className, { \"fixed-height\": fixedHeight }),\n },\n [\n leftButton,\n children,\n h(\"div.spacer\"),\n h.if(position != null)(LngLatCoords, {\n position,\n zoom,\n className: \"infodrawer-header-item\",\n }),\n h.if(elevation != null)(Elevation, {\n elevation,\n className: \"infodrawer-header-item\",\n }),\n h.if(onClose != null)(Button, {\n minimal: true,\n icon: \"cross\",\n onClick: onClose,\n }),\n ]\n );\n}\n","module.exports = new __parcel__URL__(\"main.module.3943144e.css\").toString();","module.exports = new __parcel__URL__(\"location-info.9f59aad3.js\").toString();"],"names":["require","$9HnAS$macrostrathyper","$parcel$interopDefault","a","__esModule","default","$b3d3cdac95f8f8a9$exports","URL","__filename","toString","styled"],"version":3,"file":"header.cf9ba12b.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.0ae29ecf.js"),require("./location-panel.2e422cc0.js"),require("./dev.4640438e.js"),require("./container.053f798f.js"),require("./map-view.9dc96288.js"),require("./controls.6ec8e9ac.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.0ae29ecf.js","file:"+__filename).toString(),new URL("location-panel.2e422cc0.js","file:"+__filename).toString(),new URL("dev.4640438e.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.0ae29ecf.js\");\nrequire(\"./location-panel.2e422cc0.js\");\nrequire(\"./dev.4640438e.js\");\nrequire(\"./container.053f798f.js\");\nrequire(\"./map-view.9dc96288.js\");\nrequire(\"./controls.6ec8e9ac.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.0ae29ecf.js\", \"file:\" + __filename).toString();\n\n\nvar $8b2849cf2ef954b4$exports = {};\n$8b2849cf2ef954b4$exports = new URL(\"location-panel.2e422cc0.js\", \"file:\" + __filename).toString();\n\n\nvar $4aea815117692f31$exports = {};\n$4aea815117692f31$exports = new URL(\"dev.4640438e.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.0ae29ecf.js\").toString();","module.exports = new __parcel__URL__(\"location-panel.2e422cc0.js\").toString();","module.exports = new __parcel__URL__(\"dev.4640438e.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("./header.4b58753a.js"),require("./main.module.ba3f4a78.css"),require("./main.module.3a8fef67.js"),require("./container.abd6f0d2.js");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("classnames"),require("@macrostrat/ui-components");var i=globalThis,n={},a={},t=i.parcelRequire94c2;null==t&&((t=function(e){if(e in n)return n[e].exports;if(e in a){var r=a[e];delete a[e];var i={id:e,exports:{}};return n[e]=i,r.call(i.exports,i,i.exports),i.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,r){a[e]=r},i.parcelRequire94c2=t),t.register,new URL("header.4b58753a.js","file:"+__filename).toString();var c=t("2UJTP");new URL("container.abd6f0d2.js","file:"+__filename).toString(),r(e).styled(r(c));
2
- //# sourceMappingURL=location-panel.c39983e3.js.map
1
+ require("./header.cf9ba12b.js"),require("./main.module.3943144e.css"),require("./main.module.3a8fef67.js"),require("./container.053f798f.js");var e=require("@macrostrat/hyper");function r(e){return e&&e.__esModule?e.default:e}require("classnames"),require("@macrostrat/ui-components");var i=globalThis,n={},a={},t=i.parcelRequire94c2;null==t&&((t=function(e){if(e in n)return n[e].exports;if(e in a){var r=a[e];delete a[e];var i={id:e,exports:{}};return n[e]=i,r.call(i.exports,i,i.exports),i.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,r){a[e]=r},i.parcelRequire94c2=t),t.register,new URL("header.cf9ba12b.js","file:"+__filename).toString();var c=t("2UJTP");new URL("container.053f798f.js","file:"+__filename).toString(),r(e).styled(r(c));
2
+ //# sourceMappingURL=location-panel.2e422cc0.js.map
@@ -1 +1 @@
1
- {"mappings":"A,Q,yC,Q,+C,Q,8C,Q,4C,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,c,Q,6B,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,sCAAA,QAAA,YAAuC,QAAQ,G,I,E,E,SCAnE,IAAA,IAAoB,yCAAA,QAAA,YAA0C,QAAQ,GFQ7E,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/location-panel/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-6eff41384e4a05ae.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-1fa26f28051dce2d.js"],"sourcesContent":["require(\"./header.4b58753a.js\");\nrequire(\"./main.module.ba3f4a78.css\");\nrequire(\"./main.module.3a8fef67.js\");\nrequire(\"./container.abd6f0d2.js\");\nvar $eV7Yx$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $eV7Yx$classnames = require(\"classnames\");\nvar $eV7Yx$macrostratuicomponents = require(\"@macrostrat/ui-components\");\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\nvar $3661f7ed1614b54b$exports = {};\n$3661f7ed1614b54b$exports = new URL(\"header.4b58753a.js\", \"file:\" + __filename).toString();\n\n\n\n\nvar $2UJTP = parcelRequire(\"2UJTP\");\n\nvar $821c0ad2f6c90b1b$exports = {};\n$821c0ad2f6c90b1b$exports = new URL(\"container.abd6f0d2.js\", \"file:\" + __filename).toString();\n\n\nconst $6b3ac418f085f13e$var$h = (0, ($parcel$interopDefault($eV7Yx$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($2UJTP))));\nfunction $6b3ac418f085f13e$export$83f9a19cf91c2d06(props) {\n const className = (0, ($parcel$interopDefault($eV7Yx$classnames)))(\"infodrawer\", props.className);\n return $6b3ac418f085f13e$var$h((0, $821c0ad2f6c90b1b$exports.PanelCard), {\n ...props,\n className: className\n });\n}\nfunction $6b3ac418f085f13e$export$a5ddcc2a88716895(props) {\n const { className: className, headerElement: headerElement = null, title: title, onClose: onClose, children: children, contentContainer: contentContainer = \"div.infodrawer-contents\", ...rest } = props;\n const header = headerElement ?? $6b3ac418f085f13e$var$h((0, $3661f7ed1614b54b$exports.InfoDrawerHeader), {\n onClose: onClose,\n ...rest\n }, [\n title == null ? null : $6b3ac418f085f13e$var$h(\"h3\", [\n title\n ])\n ]);\n return $6b3ac418f085f13e$var$h($6b3ac418f085f13e$export$83f9a19cf91c2d06, {\n className: className\n }, [\n header,\n $6b3ac418f085f13e$var$h(\"div.infodrawer-body\", $6b3ac418f085f13e$var$h((0, $eV7Yx$macrostratuicomponents.ErrorBoundary), $6b3ac418f085f13e$var$h(contentContainer, children)))\n ]);\n}\nconst $6b3ac418f085f13e$export$e54a7f2505304e20 = $6b3ac418f085f13e$export$a5ddcc2a88716895;\nfunction $6b3ac418f085f13e$export$aa4baff5242ea6e1(props) {\n const { children: children, className: className, loading: loading = false, ...rest } = props;\n const cls = (0, ($parcel$interopDefault($eV7Yx$classnames)))(\"location-panel\", className, {\n loading: loading\n });\n return $6b3ac418f085f13e$var$h($6b3ac418f085f13e$export$a5ddcc2a88716895, {\n className: cls,\n ...rest\n }, children);\n}\n\n\n//# sourceMappingURL=location-panel.c39983e3.js.map\n","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","module.exports = new __parcel__URL__(\"header.4b58753a.js\").toString();","module.exports = new __parcel__URL__(\"container.abd6f0d2.js\").toString();"],"names":["require","$eV7Yx$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","$2UJTP","styled"],"version":3,"file":"location-panel.c39983e3.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,Q,yC,Q,+C,Q,8C,Q,4C,I,E,Q,qB,S,E,C,E,O,G,E,U,C,E,O,C,C,C,Q,c,Q,6B,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,sCAAA,QAAA,YAAuC,QAAQ,G,I,E,E,SCAnE,IAAA,IAAoB,yCAAA,QAAA,YAA0C,QAAQ,GFQ7E,AAAA,AAAA,EAAA,GAAM,MAAM,CAAC,EAAA","sources":["<anon>","packages/map-interface/src/location-panel/index.ts","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-6eff41384e4a05ae.js","../../../../.yarn/berry/cache/@parcel-runtime-js-npm-2.13.3-f44fec8492-10c0.zip/node_modules/@parcel/runtime-js/lib/runtime-1fa26f28051dce2d.js"],"sourcesContent":["require(\"./header.cf9ba12b.js\");\nrequire(\"./main.module.3943144e.css\");\nrequire(\"./main.module.3a8fef67.js\");\nrequire(\"./container.053f798f.js\");\nvar $eV7Yx$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $eV7Yx$classnames = require(\"classnames\");\nvar $eV7Yx$macrostratuicomponents = require(\"@macrostrat/ui-components\");\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\nvar $3661f7ed1614b54b$exports = {};\n$3661f7ed1614b54b$exports = new URL(\"header.cf9ba12b.js\", \"file:\" + __filename).toString();\n\n\n\n\nvar $2UJTP = parcelRequire(\"2UJTP\");\n\nvar $821c0ad2f6c90b1b$exports = {};\n$821c0ad2f6c90b1b$exports = new URL(\"container.053f798f.js\", \"file:\" + __filename).toString();\n\n\nconst $6b3ac418f085f13e$var$h = (0, ($parcel$interopDefault($eV7Yx$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($2UJTP))));\nfunction $6b3ac418f085f13e$export$83f9a19cf91c2d06(props) {\n const className = (0, ($parcel$interopDefault($eV7Yx$classnames)))(\"infodrawer\", props.className);\n return $6b3ac418f085f13e$var$h((0, $821c0ad2f6c90b1b$exports.PanelCard), {\n ...props,\n className: className\n });\n}\nfunction $6b3ac418f085f13e$export$a5ddcc2a88716895(props) {\n const { className: className, headerElement: headerElement = null, title: title, onClose: onClose, children: children, contentContainer: contentContainer = \"div.infodrawer-contents\", ...rest } = props;\n const header = headerElement ?? $6b3ac418f085f13e$var$h((0, $3661f7ed1614b54b$exports.InfoDrawerHeader), {\n onClose: onClose,\n ...rest\n }, [\n title == null ? null : $6b3ac418f085f13e$var$h(\"h3\", [\n title\n ])\n ]);\n return $6b3ac418f085f13e$var$h($6b3ac418f085f13e$export$83f9a19cf91c2d06, {\n className: className\n }, [\n header,\n $6b3ac418f085f13e$var$h(\"div.infodrawer-body\", $6b3ac418f085f13e$var$h((0, $eV7Yx$macrostratuicomponents.ErrorBoundary), $6b3ac418f085f13e$var$h(contentContainer, children)))\n ]);\n}\nconst $6b3ac418f085f13e$export$e54a7f2505304e20 = $6b3ac418f085f13e$export$a5ddcc2a88716895;\nfunction $6b3ac418f085f13e$export$aa4baff5242ea6e1(props) {\n const { children: children, className: className, loading: loading = false, ...rest } = props;\n const cls = (0, ($parcel$interopDefault($eV7Yx$classnames)))(\"location-panel\", className, {\n loading: loading\n });\n return $6b3ac418f085f13e$var$h($6b3ac418f085f13e$export$a5ddcc2a88716895, {\n className: cls,\n ...rest\n }, children);\n}\n\n\n//# sourceMappingURL=location-panel.2e422cc0.js.map\n","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","module.exports = new __parcel__URL__(\"header.cf9ba12b.js\").toString();","module.exports = new __parcel__URL__(\"container.053f798f.js\").toString();"],"names":["require","$eV7Yx$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","$2UJTP","styled"],"version":3,"file":"location-panel.2e422cc0.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- .VPa3-W_copy-link-button.bp5-minimal.bp5-button{color:var(--text-subtle-color)}.VPa3-W_copy-link-button.bp5-minimal.bp5-button svg{fill:var(--text-subtle-color)}.VPa3-W_location-panel-header{align-items:center;gap:var(--panel-header-gap,.5rem);min-height:var(--panel-header-height,40px);border-bottom:1px solid var(--panel-rule-color);flex-direction:row;padding:5px;display:flex}.VPa3-W_location-panel-header.VPa3-W_fixed-height{height:var(--panel-header-height,40px)}.VPa3-W_location-panel-header .VPa3-W_spacer{margin-right:calc(-1*var(--panel-header-gap,.5rem));flex-grow:1}.VPa3-W_location-panel-header .VPa3-W_left-icon{padding:7px}.VPa3-W_location-panel-header .VPa3-W_position-controls .bp5-button{font-size:12px!important}.VPa3-W_location-panel-header h1,.VPa3-W_location-panel-header h2,.VPa3-W_location-panel-header h3,.VPa3-W_location-panel-header h4,.VPa3-W_location-panel-header h5,.VPa3-W_location-panel-header h6,.VPa3-W_location-panel-header p{text-overflow:ellipsis;margin:0;font-size:16px;overflow:hidden}.VPa3-W_location-panel-header h1:first-child,.VPa3-W_location-panel-header h2:first-child,.VPa3-W_location-panel-header h3:first-child,.VPa3-W_location-panel-header h4:first-child,.VPa3-W_location-panel-header h5:first-child,.VPa3-W_location-panel-header h6:first-child,.VPa3-W_location-panel-header p:first-child{margin-left:10px}.VPa3-W_infodrawer-header-item{font-size:12px}.VPa3-W_infodrawer-header-item .secondary{color:var(--text-subtle-color);font-size:.9em}.VPa3-W_infodrawer{pointer-events:all;background-color:var(--panel-background-color);flex-direction:column;max-width:100%;height:fit-content;max-height:100%;display:flex;overflow-y:hidden}.VPa3-W_infodrawer.bp5-card{background-color:var(--panel-background-color);padding:0}.VPa3-W_infodrawer.VPa3-W_loading .VPa3-W_infodrawer-body{min-height:70px;overflow-y:hidden}.VPa3-W_infodrawer-contents{padding:0 1em}.VPa3-W_infodrawer-contents>:first-child{margin-top:1rem}.VPa3-W_infodrawer-contents>:last-child{margin-bottom:1rem}.VPa3-W_infodrawer-body{flex-shrink:1;min-height:0;transition:min-height .5s;position:relative;overflow-y:scroll}@media screen and (width<=768px){.VPa3-W_infodrawer{border-radius:var(--panel-border-radius,0px)}}
2
- /*# sourceMappingURL=main.module.ba3f4a78.css.map */
1
+ .VPa3-W_copy-link-button.bp5-minimal.bp5-button{color:var(--text-subtle-color)}.VPa3-W_copy-link-button.bp5-minimal.bp5-button svg{fill:var(--text-subtle-color)}.VPa3-W_location-panel-header{align-items:center;gap:var(--panel-header-gap,.5rem);min-height:var(--panel-header-height,40px);border-bottom:1px solid var(--panel-rule-color);flex-direction:row;padding:5px;display:flex}.VPa3-W_location-panel-header.VPa3-W_fixed-height{height:var(--panel-header-height,40px)}.VPa3-W_location-panel-header .VPa3-W_spacer{margin-right:calc(-1*var(--panel-header-gap,.5rem));flex-grow:1}.VPa3-W_location-panel-header .VPa3-W_left-icon{padding:7px}.VPa3-W_location-panel-header .VPa3-W_position-controls .bp5-button{font-size:12px!important}.VPa3-W_location-panel-header h1,.VPa3-W_location-panel-header h2,.VPa3-W_location-panel-header h3,.VPa3-W_location-panel-header h4,.VPa3-W_location-panel-header h5,.VPa3-W_location-panel-header h6,.VPa3-W_location-panel-header p{text-overflow:ellipsis;margin:0;font-size:16px;overflow:hidden}.VPa3-W_location-panel-header h1:first-child,.VPa3-W_location-panel-header h2:first-child,.VPa3-W_location-panel-header h3:first-child,.VPa3-W_location-panel-header h4:first-child,.VPa3-W_location-panel-header h5:first-child,.VPa3-W_location-panel-header h6:first-child,.VPa3-W_location-panel-header p:first-child{margin-left:10px}.VPa3-W_infodrawer-header-item{font-size:12px}.VPa3-W_infodrawer-header-item .secondary{color:var(--text-subtle-color);font-size:.9em}.VPa3-W_infodrawer{pointer-events:all;background-color:var(--panel-background-color);--panel-padding:0;flex-direction:column;max-width:100%;height:fit-content;max-height:100%;display:flex;overflow-y:hidden}.VPa3-W_infodrawer.bp5-card{background-color:var(--panel-background-color);padding:0}.VPa3-W_infodrawer.VPa3-W_loading .VPa3-W_infodrawer-body{min-height:70px;overflow-y:hidden}.VPa3-W_infodrawer-contents{padding:0 1em}.VPa3-W_infodrawer-contents>:first-child{margin-top:1rem}.VPa3-W_infodrawer-contents>div:first-child{margin-top:0}.VPa3-W_infodrawer-contents>:last-child{margin-bottom:1rem}.VPa3-W_infodrawer-contents>div:last-child{margin-bottom:0}.VPa3-W_infodrawer-body{flex-shrink:1;min-height:0;transition:min-height .5s;position:relative;overflow-y:scroll}@media screen and (width<=768px){.VPa3-W_infodrawer{border-radius:var(--panel-border-radius,0px)}}
2
+ /*# sourceMappingURL=main.module.3943144e.css.map */