@macrostrat/map-interface 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/cjs/index.js +1 -1
  3. package/dist/cjs/{map-interface.5cea0ff4.js → map-interface.853e0edd.js} +3 -3
  4. package/dist/cjs/{map-interface.5cea0ff4.js.map → map-interface.853e0edd.js.map} +1 -1
  5. package/dist/cjs/{map-interface.17e81e8a.js → map-interface.f1eec151.js} +4 -3
  6. package/dist/cjs/map-interface.f1eec151.js.map +1 -0
  7. package/dist/cjs/{map-interface.175c4635.js → map-interface.f8826069.js} +12 -17
  8. package/dist/cjs/map-interface.f8826069.js.map +1 -0
  9. package/dist/esm/index.d.ts.map +1 -1
  10. package/dist/esm/index.js +1 -1
  11. package/dist/esm/map-interface.22ea3934.js +41 -0
  12. package/dist/esm/map-interface.22ea3934.js.map +1 -0
  13. package/dist/esm/{map-interface.3248abc7.js → map-interface.25a708b1.js} +3 -3
  14. package/dist/esm/{map-interface.3248abc7.js.map → map-interface.25a708b1.js.map} +1 -1
  15. package/dist/esm/{map-interface.00058d23.js → map-interface.f4e2f84e.js} +4 -3
  16. package/dist/esm/map-interface.f4e2f84e.js.map +1 -0
  17. package/dist/node/index.js +1 -1
  18. package/dist/node/index.js.map +1 -1
  19. package/dist/node/{map-interface.d16a06b1.js → map-interface.55fa679c.js} +2 -2
  20. package/dist/node/{map-interface.d16a06b1.js.map → map-interface.55fa679c.js.map} +1 -1
  21. package/dist/node/map-interface.992dea73.js +2 -0
  22. package/dist/node/map-interface.992dea73.js.map +1 -0
  23. package/dist/node/map-interface.d9814996.js +2 -0
  24. package/dist/node/map-interface.d9814996.js.map +1 -0
  25. package/package.json +1 -1
  26. package/src/dev/map-page.ts +2 -1
  27. package/src/dev/tile-extent.ts +17 -18
  28. package/dist/cjs/map-interface.175c4635.js.map +0 -1
  29. package/dist/cjs/map-interface.17e81e8a.js.map +0 -1
  30. package/dist/esm/map-interface.00058d23.js.map +0 -1
  31. package/dist/esm/map-interface.f107347b.js +0 -46
  32. package/dist/esm/map-interface.f107347b.js.map +0 -1
  33. package/dist/node/map-interface.02dd6884.js +0 -2
  34. package/dist/node/map-interface.02dd6884.js.map +0 -1
  35. package/dist/node/map-interface.44d3f3bf.js +0 -2
  36. package/dist/node/map-interface.44d3f3bf.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format
4
4
  is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.3.2] - 2025-06-26
8
+
9
+ Bugfix for DevMapPage when applying custom styles
10
+
7
11
  ## [1.3.1] - 2025-06-25
8
12
 
9
13
  Small improvements to types and styles
package/dist/cjs/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var $fce5fc950d1fe35b$exports = require("./map-interface.0e252a74.js");
2
2
  var $2bc7c1e4e7da7fdf$exports = require("./map-interface.3934d6d6.js");
3
- var $9acbb47bf7cb7660$exports = require("./map-interface.5cea0ff4.js");
3
+ var $9acbb47bf7cb7660$exports = require("./map-interface.853e0edd.js");
4
4
  var $c3311f59335df34d$exports = require("./map-interface.bda26b27.js");
5
5
  var $493deb9ab6b848e3$exports = require("./map-interface.e7194f92.js");
6
6
  var $f333fe6f49373ca9$exports = require("./map-interface.99a048dc.js");
@@ -1,5 +1,5 @@
1
- var $6f5ca387ac26c0b5$exports = require("./map-interface.17e81e8a.js");
2
- var $abbe8d0af34cbbed$exports = require("./map-interface.175c4635.js");
1
+ var $6f5ca387ac26c0b5$exports = require("./map-interface.f1eec151.js");
2
+ var $abbe8d0af34cbbed$exports = require("./map-interface.f8826069.js");
3
3
  var $db14eb7a5c07abdb$exports = require("./map-interface.e9bcd5c0.js");
4
4
  var $8646508ae99a5857$exports = require("./map-interface.4c5addca.js");
5
5
 
@@ -30,4 +30,4 @@ $parcel$exportWildcard(module.exports, $db14eb7a5c07abdb$exports);
30
30
  $parcel$exportWildcard(module.exports, $8646508ae99a5857$exports);
31
31
 
32
32
 
33
- //# sourceMappingURL=map-interface.5cea0ff4.js.map
33
+ //# sourceMappingURL=map-interface.853e0edd.js.map
@@ -1 +1 @@
1
- {"mappings":"","sources":["packages/map-interface/src/dev/index.ts"],"sourcesContent":["export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n"],"names":[],"version":3,"file":"map-interface.5cea0ff4.js.map"}
1
+ {"mappings":"","sources":["packages/map-interface/src/dev/index.ts"],"sourcesContent":["export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n"],"names":[],"version":3,"file":"map-interface.853e0edd.js.map"}
@@ -6,7 +6,7 @@ var $2bc7c1e4e7da7fdf$exports = require("./map-interface.3934d6d6.js");
6
6
  var $493deb9ab6b848e3$exports = require("./map-interface.e7194f92.js");
7
7
  var $33088e8384af337c$exports = require("./map-interface.abe5fe65.js");
8
8
  require("./map-interface.26497065.css");
9
- var $abbe8d0af34cbbed$exports = require("./map-interface.175c4635.js");
9
+ var $abbe8d0af34cbbed$exports = require("./map-interface.f8826069.js");
10
10
  var $db14eb7a5c07abdb$exports = require("./map-interface.e9bcd5c0.js");
11
11
  var $g1A1s$blueprintjscore = require("@blueprintjs/core");
12
12
  var $g1A1s$macrostrathyper = require("@macrostrat/hyper");
@@ -51,9 +51,10 @@ function $6f5ca387ac26c0b5$export$eab3034e57b46e26({ title: title = "Map inspect
51
51
  */ const dark = (0, $g1A1s$macrostratuicomponents.useDarkMode)();
52
52
  const isEnabled = dark?.isEnabled;
53
53
  if (mapboxToken != null) (0, ($parcel$interopDefault($g1A1s$mapboxgl))).accessToken = mapboxToken;
54
- style ??= (0, $2611a7b4364593e5$exports.useBasicMapStyle)({
54
+ const basicStyle = (0, $2611a7b4364593e5$exports.useBasicMapStyle)({
55
55
  styleType: styleType
56
56
  });
57
+ style ??= basicStyle;
57
58
  const [isOpen, setOpen] = (0, $g1A1s$react.useState)(false);
58
59
  const [state, setState] = (0, $g1A1s$macrostratuicomponents.useStoredState)("macrostrat:dev-map-page", {
59
60
  showTileExtent: false,
@@ -180,4 +181,4 @@ function $6f5ca387ac26c0b5$var$MapInspector(props) {
180
181
  const $6f5ca387ac26c0b5$export$2391061fbdfb71ef = $6f5ca387ac26c0b5$var$MapInspector;
181
182
 
182
183
 
183
- //# sourceMappingURL=map-interface.17e81e8a.js.map
184
+ //# sourceMappingURL=map-interface.f1eec151.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0BAA0B;;;;;;;;;;;;;;;AAqBnB,MAAM,4CAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAE5B,SAAS,0CAAe,SAC7B,QAAQ,gCACR,gBAAgB,wBAChB,mBAAmB,mBACnB,cAAc,mBACd,cAAc,oBACd,eAAe,gBACf,WAAW,gBACX,WAAW,aACX,KAAK,UACL,SAAS,qBACT,gBAAgB,0BAChB,qBAAqB,mBACrB,cAAc,iBACd,YAAY,cAiBb;IACC;;;;;EAKA,GAEA,MAAM,OAAO,CAAA,GAAA,yCAAU;IACvB,MAAM,YAAY,MAAM;IAExB,IAAI,eAAe,MACjB,CAAA,GAAA,yCAAO,EAAE,WAAW,GAAG;IAGzB,MAAM,aAAa,CAAA,GAAA,0CAAe,EAAE;mBAAE;IAAU;IAChD,UAAU;IAEV,MAAM,CAAC,QAAQ,QAAQ,GAAG,CAAA,GAAA,qBAAO,EAAE;IAEnC,MAAM,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,4CAAa,EAAE,2BAA2B;QAClE,gBAAgB;QAChB,MAAM;IACR;IACA,MAAM,kBAAE,cAAc,QAAE,IAAI,EAAE,GAAG;IAEjC,MAAM,CA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BACA;mBACA;QACF;QACA,cAAc,0CAAE,CAAA,GAAA,mCAAQ,GAAG;YACzB;YACA,0CAAE,CAAA,GAAA,6BAAK,GAAG;gBACR,SAAS;gBACT,OAAO;gBACP;oBACE,SAAS;wBAAE,GAAG,KAAK;wBAAE,MAAM,CAAC;oBAAK;gBACnC;YACF;SACD;QACD,aAAa;QACb,kBAAkB;qBAClB;IACF,GACA,0CACE,CAAA,GAAA,iCAAM,GACN;QACE,OAAO;0BACP;qBACA;QACA,YAAY;YAAE,MAAM;QAAQ;qBAC5B;gBACA;IACF,GACA;QACE,0CAAE,CAAA,GAAA,iDAAsB,GAAG;YACzB,kBAAkB;YAClB,aAAa;QACf;QACA,0CAAE,CAAA,GAAA,mCAAQ,GAAG;YACX,UAAU;YACV,aAAa;QACf;QACA,0CAAE,CAAA,GAAA,yCAAc,GAAG;kBAAE;YAAM,OAAO,YAAY,UAAU;QAAQ;QAChE;KACD;AAGP;AAEA,SAAS,mCAAa,KAAK;IACzB,MAAM,YAAE,QAAQ,YAAE,QAAQ,EAAE,GAAG,MAAM,GAAG;IACxC,6CAA6C,GAC7C,wCAAwC;IACxC,QAAQ,IAAI,CAAC;IAEb,OAAO,0CAAE,2CAAgB;QACvB,GAAG,IAAI;QACP,UAAU;YAAC;YAAU;SAAS;IAChC;AACF;AAGO,MAAM,4CAAa","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, useBasicMapStyle } 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 const basicStyle = useBasicMapStyle({ styleType });\n style ??= basicStyle;\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-interface.f1eec151.js.map"}
@@ -1,6 +1,6 @@
1
1
  var $eRYHH$macrostratmapboxreact = require("@macrostrat/mapbox-react");
2
2
  var $eRYHH$mapboxtilebelt = require("@mapbox/tilebelt");
3
- var $eRYHH$react = require("react");
3
+ var $eRYHH$macrostratmapboxutils = require("@macrostrat/mapbox-utils");
4
4
 
5
5
 
6
6
  function $parcel$export(e, n, v, s) {
@@ -12,22 +12,21 @@ $parcel$export(module.exports, "TileExtentLayer", () => $abbe8d0af34cbbed$export
12
12
 
13
13
 
14
14
  function $abbe8d0af34cbbed$export$86c09739b12f23cd({ tile: tile, color: color = "red" }) {
15
- const styleCallback = (0, $eRYHH$react.useCallback)((map, val)=>{
15
+ (0, $eRYHH$macrostratmapboxreact.useMapStyleOperator)((map)=>{
16
16
  const style = map.getStyle();
17
17
  if (style.layers == null) return;
18
18
  style.layers = style.layers.filter((l)=>l.id != "tile-extent");
19
- if (val == null) return map.setStyle(style);
20
- const { x: x, y: y, z: z } = val;
19
+ if (tile == null) return map.setStyle(style);
20
+ const { x: x, y: y, z: z } = tile;
21
21
  const extent = (0, $eRYHH$mapboxtilebelt.tileToGeoJSON)([
22
22
  x,
23
23
  y,
24
24
  z
25
25
  ]);
26
- const source = {
27
- type: "geojson",
28
- data: extent
29
- };
30
- const layer = {
26
+ (0, $eRYHH$macrostratmapboxutils.setGeoJSON)(map, "tile-extent", extent);
27
+ if (map.getLayer("tile-extent") != null) // If the layer already exists, we can just update it
28
+ map.removeLayer("tile-extent");
29
+ map.addLayer({
31
30
  id: "tile-extent",
32
31
  type: "line",
33
32
  source: "tile-extent",
@@ -35,17 +34,13 @@ function $abbe8d0af34cbbed$export$86c09739b12f23cd({ tile: tile, color: color =
35
34
  "line-color": color,
36
35
  "line-width": 2
37
36
  }
38
- };
39
- style.sources["tile-extent"] = source;
40
- style.layers.push(layer);
41
- map.setStyle(style);
37
+ });
42
38
  }, [
43
- color
39
+ color,
40
+ tile
44
41
  ]);
45
- const map = (0, $eRYHH$macrostratmapboxreact.useMapRef)();
46
- (0, $eRYHH$macrostratmapboxreact.useMapConditionalStyle)(map, tile, styleCallback);
47
42
  return null;
48
43
  }
49
44
 
50
45
 
51
- //# sourceMappingURL=map-interface.175c4635.js.map
46
+ //# sourceMappingURL=map-interface.f8826069.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;AAMO,SAAS,0CAAgB,QAC9B,IAAI,SACJ,QAAQ,OAIT;IACC,CAAA,GAAA,gDAAkB,EAChB,CAAC;QACC,MAAM,QAAQ,IAAI,QAAQ;QAC1B,IAAI,MAAM,MAAM,IAAI,MAAM;QAC1B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,IAAM,EAAE,EAAE,IAAI;QAClD,IAAI,QAAQ,MACV,OAAO,IAAI,QAAQ,CAAC;QAEtB,MAAM,KAAE,CAAC,KAAE,CAAC,KAAE,CAAC,EAAE,GAAG;QACpB,MAAM,SAAS,CAAA,GAAA,mCAAY,EAAE;YAAC;YAAG;YAAG;SAAE;QAEtC,CAAA,GAAA,uCAAS,EAAE,KAAK,eAAe;QAE/B,IAAI,IAAI,QAAQ,CAAC,kBAAkB,MACjC,qDAAqD;QACrD,IAAI,WAAW,CAAC;QAGlB,IAAI,QAAQ,CAAC;YACX,IAAI;YACJ,MAAM;YACN,QAAQ;YACR,OAAO;gBACL,cAAc;gBACd,cAAc;YAChB;QACF;IACF,GACA;QAAC;QAAO;KAAK;IAEf,OAAO;AACT","sources":["packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["import { useMapStyleOperator } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { setGeoJSON } from \"@macrostrat/mapbox-utils\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n useMapStyleOperator(\n (map) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (tile == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = tile;\n const extent = tileToGeoJSON([x, y, z]);\n\n setGeoJSON(map, \"tile-extent\", extent as any);\n\n if (map.getLayer(\"tile-extent\") != null) {\n // If the layer already exists, we can just update it\n map.removeLayer(\"tile-extent\");\n }\n\n map.addLayer({\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n });\n },\n [color, tile],\n );\n return null;\n}\n"],"names":[],"version":3,"file":"map-interface.f8826069.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;ACIA,cAAqB;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,sBAAsB,MAAM,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,sBAAsB,MAAM,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,mBAA0B;IACxB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,cAAc,CAAC;CACzB,CAAC;kB+CqJO,kBAAkB;;;;;;yBAwKR,mBAAmB;;;kBwBnO7B,iBAAiB;;;AQrG1B,8BAA8B,EAC5B,SAAiB,EACjB,OAAO,EACP,MAAc,EACd,KAAY,EACZ,IAAa,EACb,KAAK,GACN;;;;;;;CAAA,yCAUA;AAED,iCAAiC,KAAK,EAAE,GAAG;;;;;;;GAG1C;AAED,mBAAmB,SAAS,CAAC;AAE7B;IACE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,aAAa,CAAC,EAAE,WAAW,CAAC;IAC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AM;mBACL,SAAS,KAAK,GAAG,MAAM;oBACtB,MAAM;yBACD,MAAM;iBACd,MAAM;kBACL,WAAW;aAChB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;kBAC3B,OAAO;gBACT,UAAU,GAAG,YAAY;GA2ItC;AAGD,OAAO,MAAM,+BAAyB,CAAC","sources":["packages/map-interface/mapbox-utils/src/labels.ts","packages/map-interface/mapbox-utils/src/position.ts","packages/map-interface/mapbox-utils/src/preprocess-styles.ts","packages/map-interface/mapbox-utils/src/utils.ts","packages/map-interface/mapbox-utils/src/view-info.ts","packages/map-interface/mapbox-utils/src/style-helpers.ts","packages/map-interface/mapbox-utils/src/index.ts","packages/map-interface/mapbox-react/src/context.ts","packages/map-interface/mapbox-react/src/hooks.ts","packages/map-interface/mapbox-react/src/controls.ts","packages/map-interface/mapbox-react/src/terrain.ts","packages/map-interface/mapbox-react/src/debugger.ts","packages/map-interface/mapbox-react/src/focus-state.ts","packages/map-interface/map-styles/src/layer-helpers/symbol-layers.ts","packages/map-interface/map-styles/src/layer-helpers/geology-layers.ts","packages/map-interface/map-styles/src/layer-helpers/pattern-fill.ts","packages/map-interface/map-styles/src/layer-helpers/utils.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/symbols/index.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/icon-image.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/symbol-layer.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/index.ts","packages/map-interface/color-utils/src/index.ts","packages/map-interface/map-styles/src/layer-helpers/cross-sections.ts","packages/map-interface/map-styles/src/layer-helpers/index.ts","packages/map-interface/map-styles/src/styles/line-symbols.ts","packages/map-interface/map-styles/src/styles/layers.ts","packages/map-interface/map-styles/src/styles/index.ts","packages/map-interface/map-styles/src/index.ts","packages/map-interface/mapbox-react/src/layer-managers/line-symbols.ts","packages/map-interface/ui-components/src/api/types.ts","packages/map-interface/ui-components/src/util/query-string.ts","packages/map-interface/ui-components/src/util/state-hooks.ts","packages/map-interface/ui-components/src/util/layout-hooks.ts","packages/map-interface/ui-components/src/util/local-storage.ts","packages/map-interface/ui-components/src/util/json-view.ts","packages/map-interface/ui-components/src/util/scroll-helpers.ts","packages/map-interface/ui-components/src/util/migration-helpers.ts","packages/map-interface/ui-components/src/util/box-model.ts","packages/map-interface/ui-components/src/util/event-hooks.ts","packages/map-interface/ui-components/src/util/flexbox.ts","packages/map-interface/ui-components/src/util/size-aware-label.ts","packages/map-interface/ui-components/src/util/index.ts","packages/map-interface/ui-components/src/api/provider.ts","packages/map-interface/ui-components/src/api/data-provider.ts","packages/map-interface/ui-components/src/api/indexing.ts","packages/map-interface/ui-components/src/api/frontend.ts","packages/map-interface/ui-components/src/api/paged.ts","packages/map-interface/ui-components/src/api/index.ts","packages/map-interface/ui-components/src/infinite-scroll.ts","packages/map-interface/ui-components/src/buttons/delete-button.ts","packages/map-interface/ui-components/src/buttons/index.ts","packages/map-interface/ui-components/src/collapse-panel/index.ts","packages/map-interface/ui-components/src/link-card.ts","packages/map-interface/ui-components/src/file-upload/index.ts","packages/map-interface/ui-components/src/image.ts","packages/map-interface/ui-components/src/model-editor.ts","packages/map-interface/ui-components/src/toaster.ts","packages/map-interface/ui-components/src/citations/author-list.ts","packages/map-interface/ui-components/src/citations/index.ts","packages/map-interface/ui-components/src/geodeepdive/reference-card.ts","packages/map-interface/ui-components/src/geodeepdive/index.ts","packages/map-interface/ui-components/src/text.ts","packages/map-interface/ui-components/src/dark-mode.ts","packages/map-interface/ui-components/src/form-controls/slider.ts","packages/map-interface/ui-components/src/form-controls/index.ts","packages/map-interface/ui-components/src/settings/index.ts","packages/map-interface/ui-components/src/error-boundary.ts","packages/map-interface/ui-components/src/patterns/composite-image.ts","packages/map-interface/ui-components/src/patterns/index.ts","packages/map-interface/ui-components/src/collapse-card.ts","packages/map-interface/ui-components/src/modal-panel/draggable-overlay.ts","packages/map-interface/ui-components/src/modal-panel/index.ts","packages/map-interface/ui-components/src/page-layouts/index.ts","packages/map-interface/ui-components/src/dev-panel/_inner.ts","packages/map-interface/ui-components/src/dev-panel/index.ts","packages/map-interface/ui-components/src/data/index.ts","packages/map-interface/ui-components/src/index.ts","packages/map-interface/mapbox-react/src/layer-managers/map-sources.ts","packages/map-interface/mapbox-react/src/layer-managers/index.ts","packages/map-interface/mapbox-react/src/index.ts","packages/map-interface/src/src/context-panel/index.ts","packages/map-interface/src/src/location-info/utils.ts","packages/map-interface/src/src/location-info/hash-string.ts","packages/map-interface/src/src/location-info/index.ts","packages/map-interface/src/src/location-panel/header.ts","packages/map-interface/src/src/controls.ts","packages/map-interface/src/src/container.ts","packages/map-interface/src/src/location-panel/index.ts","packages/map-interface/src/src/dev/xray.ts","packages/map-interface/src/src/utils.ts","packages/map-interface/src/src/helpers.ts","packages/map-interface/src/src/map-view.ts","packages/map-interface/src/src/dev/tile-extent.ts","packages/map-interface/src/src/expansion-panel/headers.ts","packages/map-interface/src/src/expansion-panel/index.ts","packages/map-interface/src/src/dev/vector-tile-features.ts","packages/map-interface/src/src/dev/map-page.ts","packages/map-interface/src/src/dev/index.ts","packages/map-interface/src/src/index.ts","packages/map-interface/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"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"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;;ACIA,cAAqB;IACnB,GAAG,EAAE,MA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BAAgB,CAAC,EAAE,SAAS,wBAAwB,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,SAAS,KAAK,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,SAAS,KAAK,GAAG,MAAM,CAAC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACvC,iCA+HA;AAED,8BAAsB,KAAK,KAAA;oBAhJT,MAAM,SAAS;uBACZ,SAAS,wBAAwB;YAC5C,MAAM;YACN,SAAS,KAAK,GAAG,MAAM;eACpB,MAAM,SAAS;eACf,MAAM,SAAS;kBACZ,MAAM;mBACL,SAAS,KAAK,GAAG,MAAM;oBACtB,MAAM;yBACD,MAAM;iBACd,MAAM;kBACL,WAAW;aAChB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;kBAC3B,OAAO;gBACT,UAAU,GAAG,YAAY;GA4ItC;AAGD,OAAO,MAAM,+BAAyB,CAAC","sources":["packages/map-interface/mapbox-utils/src/labels.ts","packages/map-interface/mapbox-utils/src/position.ts","packages/map-interface/mapbox-utils/src/preprocess-styles.ts","packages/map-interface/mapbox-utils/src/utils.ts","packages/map-interface/mapbox-utils/src/view-info.ts","packages/map-interface/mapbox-utils/src/style-helpers.ts","packages/map-interface/mapbox-utils/src/index.ts","packages/map-interface/mapbox-react/src/context.ts","packages/map-interface/mapbox-react/src/hooks.ts","packages/map-interface/mapbox-react/src/controls.ts","packages/map-interface/mapbox-react/src/terrain.ts","packages/map-interface/mapbox-react/src/debugger.ts","packages/map-interface/mapbox-react/src/focus-state.ts","packages/map-interface/map-styles/src/layer-helpers/symbol-layers.ts","packages/map-interface/map-styles/src/layer-helpers/geology-layers.ts","packages/map-interface/map-styles/src/layer-helpers/pattern-fill.ts","packages/map-interface/map-styles/src/layer-helpers/utils.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/symbols/index.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/icon-image.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/symbol-layer.ts","packages/map-interface/map-styles/src/layer-helpers/point-features/index.ts","packages/map-interface/color-utils/src/index.ts","packages/map-interface/map-styles/src/layer-helpers/cross-sections.ts","packages/map-interface/map-styles/src/layer-helpers/index.ts","packages/map-interface/map-styles/src/styles/line-symbols.ts","packages/map-interface/map-styles/src/styles/layers.ts","packages/map-interface/map-styles/src/styles/index.ts","packages/map-interface/map-styles/src/index.ts","packages/map-interface/mapbox-react/src/layer-managers/line-symbols.ts","packages/map-interface/ui-components/src/api/types.ts","packages/map-interface/ui-components/src/util/query-string.ts","packages/map-interface/ui-components/src/util/state-hooks.ts","packages/map-interface/ui-components/src/util/layout-hooks.ts","packages/map-interface/ui-components/src/util/local-storage.ts","packages/map-interface/ui-components/src/util/json-view.ts","packages/map-interface/ui-components/src/util/scroll-helpers.ts","packages/map-interface/ui-components/src/util/migration-helpers.ts","packages/map-interface/ui-components/src/util/box-model.ts","packages/map-interface/ui-components/src/util/event-hooks.ts","packages/map-interface/ui-components/src/util/flexbox.ts","packages/map-interface/ui-components/src/util/size-aware-label.ts","packages/map-interface/ui-components/src/util/index.ts","packages/map-interface/ui-components/src/api/provider.ts","packages/map-interface/ui-components/src/api/data-provider.ts","packages/map-interface/ui-components/src/api/indexing.ts","packages/map-interface/ui-components/src/api/frontend.ts","packages/map-interface/ui-components/src/api/paged.ts","packages/map-interface/ui-components/src/api/index.ts","packages/map-interface/ui-components/src/infinite-scroll.ts","packages/map-interface/ui-components/src/buttons/delete-button.ts","packages/map-interface/ui-components/src/buttons/index.ts","packages/map-interface/ui-components/src/collapse-panel/index.ts","packages/map-interface/ui-components/src/link-card.ts","packages/map-interface/ui-components/src/file-upload/index.ts","packages/map-interface/ui-components/src/image.ts","packages/map-interface/ui-components/src/model-editor.ts","packages/map-interface/ui-components/src/toaster.ts","packages/map-interface/ui-components/src/citations/author-list.ts","packages/map-interface/ui-components/src/citations/index.ts","packages/map-interface/ui-components/src/geodeepdive/reference-card.ts","packages/map-interface/ui-components/src/geodeepdive/index.ts","packages/map-interface/ui-components/src/text.ts","packages/map-interface/ui-components/src/dark-mode.ts","packages/map-interface/ui-components/src/form-controls/slider.ts","packages/map-interface/ui-components/src/form-controls/index.ts","packages/map-interface/ui-components/src/settings/index.ts","packages/map-interface/ui-components/src/error-boundary.ts","packages/map-interface/ui-components/src/patterns/composite-image.ts","packages/map-interface/ui-components/src/patterns/index.ts","packages/map-interface/ui-components/src/collapse-card.ts","packages/map-interface/ui-components/src/modal-panel/draggable-overlay.ts","packages/map-interface/ui-components/src/modal-panel/index.ts","packages/map-interface/ui-components/src/page-layouts/index.ts","packages/map-interface/ui-components/src/dev-panel/_inner.ts","packages/map-interface/ui-components/src/dev-panel/index.ts","packages/map-interface/ui-components/src/data/index.ts","packages/map-interface/ui-components/src/index.ts","packages/map-interface/mapbox-react/src/layer-managers/map-sources.ts","packages/map-interface/mapbox-react/src/layer-managers/index.ts","packages/map-interface/mapbox-react/src/index.ts","packages/map-interface/src/src/context-panel/index.ts","packages/map-interface/src/src/location-info/utils.ts","packages/map-interface/src/src/location-info/hash-string.ts","packages/map-interface/src/src/location-info/index.ts","packages/map-interface/src/src/location-panel/header.ts","packages/map-interface/src/src/controls.ts","packages/map-interface/src/src/container.ts","packages/map-interface/src/src/location-panel/index.ts","packages/map-interface/src/src/dev/xray.ts","packages/map-interface/src/src/utils.ts","packages/map-interface/src/src/helpers.ts","packages/map-interface/src/src/map-view.ts","packages/map-interface/src/src/dev/tile-extent.ts","packages/map-interface/src/src/expansion-panel/headers.ts","packages/map-interface/src/src/expansion-panel/index.ts","packages/map-interface/src/src/dev/vector-tile-features.ts","packages/map-interface/src/src/dev/map-page.ts","packages/map-interface/src/src/dev/index.ts","packages/map-interface/src/src/index.ts","packages/map-interface/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"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"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {LoadingButton as $6e914c81c8e053da$export$4ec83e90d030b2f3, MapLoadingButton as $6e914c81c8e053da$export$9e3bae3c08bde368, FloatingNavbar as $6e914c81c8e053da$export$a8cc0062d02a3841} from "./map-interface.0b1aa8f2.js";
2
2
  import {InfoDrawerContainer as $f50c3537aaff0cff$export$83f9a19cf91c2d06, BaseInfoDrawer as $f50c3537aaff0cff$export$a5ddcc2a88716895, DetailsPanel as $f50c3537aaff0cff$export$e54a7f2505304e20, LocationPanel as $f50c3537aaff0cff$export$aa4baff5242ea6e1} from "./map-interface.e5349e97.js";
3
- import {h as $a281a0612311d660$export$dda1d9f60106f0e9, MapInspectorV2 as $a281a0612311d660$export$eab3034e57b46e26, DevMapPage as $a281a0612311d660$export$2391061fbdfb71ef, TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd, FeatureProperties as $b8c84b63e75fe4f2$export$2906e7f4b228efe9, FeatureRecord as $b8c84b63e75fe4f2$export$dc87b4d46cea200d, FeatureSelectionHandler as $b8c84b63e75fe4f2$export$214daccdda0f4ac6, Features as $b8c84b63e75fe4f2$export$617d79dae526d2cf, TileInfo as $b8c84b63e75fe4f2$export$43c75dec9d0b96c, FeaturePanel as $b8c84b63e75fe4f2$export$43277c51a01761c1, buildXRayStyle as $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d, buildInspectorStyle as $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6} from "./map-interface.3248abc7.js";
3
+ import {h as $a281a0612311d660$export$dda1d9f60106f0e9, MapInspectorV2 as $a281a0612311d660$export$eab3034e57b46e26, DevMapPage as $a281a0612311d660$export$2391061fbdfb71ef, TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd, FeatureProperties as $b8c84b63e75fe4f2$export$2906e7f4b228efe9, FeatureRecord as $b8c84b63e75fe4f2$export$dc87b4d46cea200d, FeatureSelectionHandler as $b8c84b63e75fe4f2$export$214daccdda0f4ac6, Features as $b8c84b63e75fe4f2$export$617d79dae526d2cf, TileInfo as $b8c84b63e75fe4f2$export$43c75dec9d0b96c, FeaturePanel as $b8c84b63e75fe4f2$export$43277c51a01761c1, buildXRayStyle as $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d, buildInspectorStyle as $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6} from "./map-interface.25a708b1.js";
4
4
  import {PanelCard as $4bdfa9cd8240b2fd$export$ec68dd77edbe678b, DetailPanelStyle as $4bdfa9cd8240b2fd$export$612ca936d3ed4784, MapAreaContainer as $4bdfa9cd8240b2fd$export$9fa5da0bcfd0a290, MapStyledContainer as $4bdfa9cd8240b2fd$export$fa395a37c3898ae3} from "./map-interface.27587c50.js";
5
5
  import {MapView as $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8, MapTerrainManager as $0118fc9193bb1bf4$export$cee395a8a2a00b29} from "./map-interface.9ce3d553.js";
6
6
  import {MapBottomControls as $91d5aa004eeb2226$export$db1a2e058a06fb5c} from "./map-interface.50edfdfd.js";
@@ -0,0 +1,41 @@
1
+ import {useMapStyleOperator as $edFMK$useMapStyleOperator} from "@macrostrat/mapbox-react";
2
+ import {tileToGeoJSON as $edFMK$tileToGeoJSON} from "@mapbox/tilebelt";
3
+ import {setGeoJSON as $edFMK$setGeoJSON} from "@macrostrat/mapbox-utils";
4
+
5
+
6
+
7
+
8
+ function $1d4d29ef2725aa16$export$86c09739b12f23cd({ tile: tile, color: color = "red" }) {
9
+ (0, $edFMK$useMapStyleOperator)((map)=>{
10
+ const style = map.getStyle();
11
+ if (style.layers == null) return;
12
+ style.layers = style.layers.filter((l)=>l.id != "tile-extent");
13
+ if (tile == null) return map.setStyle(style);
14
+ const { x: x, y: y, z: z } = tile;
15
+ const extent = (0, $edFMK$tileToGeoJSON)([
16
+ x,
17
+ y,
18
+ z
19
+ ]);
20
+ (0, $edFMK$setGeoJSON)(map, "tile-extent", extent);
21
+ if (map.getLayer("tile-extent") != null) // If the layer already exists, we can just update it
22
+ map.removeLayer("tile-extent");
23
+ map.addLayer({
24
+ id: "tile-extent",
25
+ type: "line",
26
+ source: "tile-extent",
27
+ paint: {
28
+ "line-color": color,
29
+ "line-width": 2
30
+ }
31
+ });
32
+ }, [
33
+ color,
34
+ tile
35
+ ]);
36
+ return null;
37
+ }
38
+
39
+
40
+ export {$1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer};
41
+ //# sourceMappingURL=map-interface.22ea3934.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;AAMO,SAAS,0CAAgB,QAC9B,IAAI,SACJ,QAAQ,OAIT;IACC,CAAA,GAAA,0BAAkB,EAChB,CAAC;QACC,MAAM,QAAQ,IAAI,QAAQ;QAC1B,IAAI,MAAM,MAAM,IAAI,MAAM;QAC1B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,IAAM,EAAE,EAAE,IAAI;QAClD,IAAI,QAAQ,MACV,OAAO,IAAI,QAAQ,CAAC;QAEtB,MAAM,KAAE,CAAC,KAAE,CAAC,KAAE,CAAC,EAAE,GAAG;QACpB,MAAM,SAAS,CAAA,GAAA,oBAAY,EAAE;YAAC;YAAG;YAAG;SAAE;QAEtC,CAAA,GAAA,iBAAS,EAAE,KAAK,eAAe;QAE/B,IAAI,IAAI,QAAQ,CAAC,kBAAkB,MACjC,qDAAqD;QACrD,IAAI,WAAW,CAAC;QAGlB,IAAI,QAAQ,CAAC;YACX,IAAI;YACJ,MAAM;YACN,QAAQ;YACR,OAAO;gBACL,cAAc;gBACd,cAAc;YAChB;QACF;IACF,GACA;QAAC;QAAO;KAAK;IAEf,OAAO;AACT","sources":["packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["import { useMapStyleOperator } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { setGeoJSON } from \"@macrostrat/mapbox-utils\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n useMapStyleOperator(\n (map) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (tile == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = tile;\n const extent = tileToGeoJSON([x, y, z]);\n\n setGeoJSON(map, \"tile-extent\", extent as any);\n\n if (map.getLayer(\"tile-extent\") != null) {\n // If the layer already exists, we can just update it\n map.removeLayer(\"tile-extent\");\n }\n\n map.addLayer({\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n });\n },\n [color, tile],\n );\n return null;\n}\n"],"names":[],"version":3,"file":"map-interface.22ea3934.js.map"}
@@ -1,5 +1,5 @@
1
- import {h as $a281a0612311d660$export$dda1d9f60106f0e9, MapInspectorV2 as $a281a0612311d660$export$eab3034e57b46e26, DevMapPage as $a281a0612311d660$export$2391061fbdfb71ef} from "./map-interface.00058d23.js";
2
- import {TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd} from "./map-interface.f107347b.js";
1
+ import {h as $a281a0612311d660$export$dda1d9f60106f0e9, MapInspectorV2 as $a281a0612311d660$export$eab3034e57b46e26, DevMapPage as $a281a0612311d660$export$2391061fbdfb71ef} from "./map-interface.f4e2f84e.js";
2
+ import {TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd} from "./map-interface.22ea3934.js";
3
3
  import {FeatureProperties as $b8c84b63e75fe4f2$export$2906e7f4b228efe9, FeatureRecord as $b8c84b63e75fe4f2$export$dc87b4d46cea200d, FeatureSelectionHandler as $b8c84b63e75fe4f2$export$214daccdda0f4ac6, Features as $b8c84b63e75fe4f2$export$617d79dae526d2cf, TileInfo as $b8c84b63e75fe4f2$export$43c75dec9d0b96c, FeaturePanel as $b8c84b63e75fe4f2$export$43277c51a01761c1} from "./map-interface.786d6e58.js";
4
4
  import {buildXRayStyle as $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d, buildInspectorStyle as $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6} from "./map-interface.1843c708.js";
5
5
 
@@ -10,4 +10,4 @@ import {buildXRayStyle as $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d, buildInspec
10
10
 
11
11
 
12
12
  export {$a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$eab3034e57b46e26 as MapInspectorV2, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage, $1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer, $b8c84b63e75fe4f2$export$2906e7f4b228efe9 as FeatureProperties, $b8c84b63e75fe4f2$export$dc87b4d46cea200d as FeatureRecord, $b8c84b63e75fe4f2$export$214daccdda0f4ac6 as FeatureSelectionHandler, $b8c84b63e75fe4f2$export$617d79dae526d2cf as Features, $b8c84b63e75fe4f2$export$43c75dec9d0b96c as TileInfo, $b8c84b63e75fe4f2$export$43277c51a01761c1 as FeaturePanel, $64ee2eed3ed5ffbc$export$eff5fb2e10d05b1d as buildXRayStyle, $64ee2eed3ed5ffbc$export$e739dc8dfc0db9a6 as buildInspectorStyle};
13
- //# sourceMappingURL=map-interface.3248abc7.js.map
13
+ //# sourceMappingURL=map-interface.25a708b1.js.map
@@ -1 +1 @@
1
- {"mappings":"","sources":["packages/map-interface/src/dev/index.ts"],"sourcesContent":["export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n"],"names":[],"version":3,"file":"map-interface.3248abc7.js.map"}
1
+ {"mappings":"","sources":["packages/map-interface/src/dev/index.ts"],"sourcesContent":["export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n"],"names":[],"version":3,"file":"map-interface.25a708b1.js.map"}
@@ -6,7 +6,7 @@ import {LocationPanel as $f50c3537aaff0cff$export$aa4baff5242ea6e1} from "./map-
6
6
  import {MapView as $0118fc9193bb1bf4$export$ab1e7a67d6ec5ad8} from "./map-interface.9ce3d553.js";
7
7
  import $f1pTx$mapinterface957e414cjs from "./map-interface.957e414c.js";
8
8
  import "../cjs/map-interface.26497065.css";
9
- import {TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd} from "./map-interface.f107347b.js";
9
+ import {TileExtentLayer as $1d4d29ef2725aa16$export$86c09739b12f23cd} from "./map-interface.22ea3934.js";
10
10
  import {FeaturePanel as $b8c84b63e75fe4f2$export$43277c51a01761c1, FeatureSelectionHandler as $b8c84b63e75fe4f2$export$214daccdda0f4ac6, TileInfo as $b8c84b63e75fe4f2$export$43c75dec9d0b96c} from "./map-interface.786d6e58.js";
11
11
  import {Switch as $f1pTx$Switch} from "@blueprintjs/core";
12
12
  import $f1pTx$macrostrathyper from "@macrostrat/hyper";
@@ -43,9 +43,10 @@ function $a281a0612311d660$export$eab3034e57b46e26({ title: title = "Map inspect
43
43
  */ const dark = (0, $f1pTx$useDarkMode)();
44
44
  const isEnabled = dark?.isEnabled;
45
45
  if (mapboxToken != null) (0, $f1pTx$mapboxgl).accessToken = mapboxToken;
46
- style ??= (0, $4bc3dd5f0732eed3$export$6daf1520df36ae21)({
46
+ const basicStyle = (0, $4bc3dd5f0732eed3$export$6daf1520df36ae21)({
47
47
  styleType: styleType
48
48
  });
49
+ style ??= basicStyle;
49
50
  const [isOpen, setOpen] = (0, $f1pTx$useState)(false);
50
51
  const [state, setState] = (0, $f1pTx$useStoredState)("macrostrat:dev-map-page", {
51
52
  showTileExtent: false,
@@ -173,4 +174,4 @@ const $a281a0612311d660$export$2391061fbdfb71ef = $a281a0612311d660$var$MapInspe
173
174
 
174
175
 
175
176
  export {$a281a0612311d660$export$dda1d9f60106f0e9 as h, $a281a0612311d660$export$eab3034e57b46e26 as MapInspectorV2, $a281a0612311d660$export$2391061fbdfb71ef as DevMapPage};
176
- //# sourceMappingURL=map-interface.00058d23.js.map
177
+ //# sourceMappingURL=map-interface.f4e2f84e.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,0BAA0B;;;;;;;;;;;;;;;AAqBnB,MAAM,4CAAI,CAAA,GAAA,sBAAI,EAAE,MAAM,CAAC,CAAA,GAAA,wEAAK;AAE5B,SAAS,0CAAe,SAC7B,QAAQ,gCACR,gBAAgB,wBAChB,mBAAmB,mBACnB,cAAc,mBACd,cAAc,oBACd,eAAe,gBACf,WAAW,gBACX,WAAW,aACX,KAAK,UACL,SAAS,qBACT,gBAAgB,0BAChB,qBAAqB,mBACrB,cAAc,iBACd,YAAY,cAiBb;IACC;;;;;EAKA,GAEA,MAAM,OAAO,CAAA,GAAA,kBAAU;IACvB,MAAM,YAAY,MAAM;IAExB,IAAI,eAA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IAAI,CAAC,EAAE;QACf,OAAO;YAAE,GAAG,EAAE,EAAE;YAAE,GAAG,EAAE,EAAE;YAAE,GAAG,EAAE,EAAE;QAAC;IACrC;IAEA,OAAO,0CACL,CAAA,GAAA,yCAAe,GACf;QACE,QAAQ,0CAAE,CAAA,GAAA,yCAAa,GAAG;YACxB,cAAc,0CAAE,CAAA,GAAA,yCAAe,GAAG;gBAChC,OAAO;gBACP,QAAQ;gBACR,SAAS,IAAM,QAAQ,CAAC;gBACxB,OAAO;oBACL,aAAa;gBACf;YACF;2BACA;mBACA;QACF;QACA,cAAc,0CAAE,CAAA,GAAA,yCAAQ,GAAG;YACzB;YACA,0CAAE,CAAA,GAAA,aAAK,GAAG;gBACR,SAAS;gBACT,OAAO;gBACP;oBACE,SAAS;wBAAE,GAAG,KAAK;wBAAE,MAAM,CAAC;oBAAK;gBACnC;YACF;SACD;QACD,aAAa;QACb,kBAAkB;qBAClB;IACF,GACA,0CACE,CAAA,GAAA,yCAAM,GACN;QACE,OAAO;0BACP;qBACA;QACA,YAAY;YAAE,MAAM;QAAQ;qBAC5B;gBACA;IACF,GACA;QACE,0CAAE,CAAA,GAAA,yCAAsB,GAAG;YACzB,kBAAkB;YAClB,aAAa;QACf;QACA,0CAAE,CAAA,GAAA,yCAAQ,GAAG;YACX,UAAU;YACV,aAAa;QACf;QACA,0CAAE,CAAA,GAAA,yCAAc,GAAG;kBAAE;YAAM,OAAO,YAAY,UAAU;QAAQ;QAChE;KACD;AAGP;AAEA,SAAS,mCAAa,KAAK;IACzB,MAAM,YAAE,QAAQ,YAAE,QAAQ,EAAE,GAAG,MAAM,GAAG;IACxC,6CAA6C,GAC7C,wCAAwC;IACxC,QAAQ,IAAI,CAAC;IAEb,OAAO,0CAAE,2CAAgB;QACvB,GAAG,IAAI;QACP,UAAU;YAAC;YAAU;SAAS;IAChC;AACF;AAGO,MAAM,4CAAa","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, useBasicMapStyle } 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 const basicStyle = useBasicMapStyle({ styleType });\n style ??= basicStyle;\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-interface.f4e2f84e.js.map"}
@@ -1,2 +1,2 @@
1
- function $parcel$exportWildcard(e,r){return Object.keys(r).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})}),e}require("./map-interface.ed6b5586.js"),require("./map-interface.cf540298.js"),require("./map-interface.d16a06b1.js"),require("./map-interface.b14f08e8.js"),require("./map-interface.20c346ba.js"),require("./map-interface.971af4bc.js"),require("./map-interface.eb663cae.js"),require("./map-interface.713361a4.js"),require("./map-interface.d92b296e.js"),require("./map-interface.10f5ef81.js");var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.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){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$d7LVS=parcelRequire("d7LVS"),$6t6Bb=parcelRequire("6t6Bb"),$jVPp0=parcelRequire("jVPp0"),$lw3Ik=parcelRequire("lw3Ik"),$3wYIs=parcelRequire("3wYIs"),$cL8YF=parcelRequire("cL8YF"),$7CmOU=parcelRequire("7CmOU"),$R3my3=parcelRequire("R3my3"),$66CcX=parcelRequire("66CcX"),$e9x7B=parcelRequire("e9x7B");$parcel$exportWildcard(module.exports,$d7LVS),$parcel$exportWildcard(module.exports,$6t6Bb),$parcel$exportWildcard(module.exports,$jVPp0),$parcel$exportWildcard(module.exports,$lw3Ik),$parcel$exportWildcard(module.exports,$3wYIs),$parcel$exportWildcard(module.exports,$cL8YF),$parcel$exportWildcard(module.exports,$7CmOU),$parcel$exportWildcard(module.exports,$R3my3),$parcel$exportWildcard(module.exports,$66CcX),$parcel$exportWildcard(module.exports,$e9x7B);
1
+ function $parcel$exportWildcard(e,r){return Object.keys(r).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})}),e}require("./map-interface.ed6b5586.js"),require("./map-interface.cf540298.js"),require("./map-interface.55fa679c.js"),require("./map-interface.b14f08e8.js"),require("./map-interface.20c346ba.js"),require("./map-interface.971af4bc.js"),require("./map-interface.eb663cae.js"),require("./map-interface.713361a4.js"),require("./map-interface.d92b296e.js"),require("./map-interface.10f5ef81.js");var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.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){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$d7LVS=parcelRequire("d7LVS"),$6t6Bb=parcelRequire("6t6Bb"),$jVPp0=parcelRequire("jVPp0"),$lw3Ik=parcelRequire("lw3Ik"),$3wYIs=parcelRequire("3wYIs"),$cL8YF=parcelRequire("cL8YF"),$7CmOU=parcelRequire("7CmOU"),$R3my3=parcelRequire("R3my3"),$66CcX=parcelRequire("66CcX"),$e9x7B=parcelRequire("e9x7B");$parcel$exportWildcard(module.exports,$d7LVS),$parcel$exportWildcard(module.exports,$6t6Bb),$parcel$exportWildcard(module.exports,$jVPp0),$parcel$exportWildcard(module.exports,$lw3Ik),$parcel$exportWildcard(module.exports,$3wYIs),$parcel$exportWildcard(module.exports,$cL8YF),$parcel$exportWildcard(module.exports,$7CmOU),$parcel$exportWildcard(module.exports,$R3my3),$parcel$exportWildcard(module.exports,$66CcX),$parcel$exportWildcard(module.exports,$e9x7B);
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"mappings":"A,S,uB,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,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,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C","sources":["<anon>","packages/map-interface/src/index.ts"],"sourcesContent":["require(\"./map-interface.ed6b5586.js\");\nrequire(\"./map-interface.cf540298.js\");\nrequire(\"./map-interface.d16a06b1.js\");\nrequire(\"./map-interface.b14f08e8.js\");\nrequire(\"./map-interface.20c346ba.js\");\nrequire(\"./map-interface.971af4bc.js\");\nrequire(\"./map-interface.eb663cae.js\");\nrequire(\"./map-interface.713361a4.js\");\nrequire(\"./map-interface.d92b296e.js\");\nrequire(\"./map-interface.10f5ef81.js\");\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\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[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\n\nvar $jVPp0 = parcelRequire(\"jVPp0\");\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $3wYIs = parcelRequire(\"3wYIs\");\n\nvar $cL8YF = parcelRequire(\"cL8YF\");\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\nvar $R3my3 = parcelRequire(\"R3my3\");\n\nvar $66CcX = parcelRequire(\"66CcX\");\n\nvar $e9x7B = parcelRequire(\"e9x7B\");\n$parcel$exportWildcard(module.exports, $d7LVS);\n$parcel$exportWildcard(module.exports, $6t6Bb);\n$parcel$exportWildcard(module.exports, $jVPp0);\n$parcel$exportWildcard(module.exports, $lw3Ik);\n$parcel$exportWildcard(module.exports, $3wYIs);\n$parcel$exportWildcard(module.exports, $cL8YF);\n$parcel$exportWildcard(module.exports, $7CmOU);\n$parcel$exportWildcard(module.exports, $R3my3);\n$parcel$exportWildcard(module.exports, $66CcX);\n$parcel$exportWildcard(module.exports, $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"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","parcelRegister","$d7LVS","$6t6Bb","$jVPp0","$lw3Ik","$3wYIs","$cL8YF","$7CmOU","$R3my3","$66CcX","$e9x7B"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,S,uB,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,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,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C","sources":["<anon>","packages/map-interface/src/index.ts"],"sourcesContent":["require(\"./map-interface.ed6b5586.js\");\nrequire(\"./map-interface.cf540298.js\");\nrequire(\"./map-interface.55fa679c.js\");\nrequire(\"./map-interface.b14f08e8.js\");\nrequire(\"./map-interface.20c346ba.js\");\nrequire(\"./map-interface.971af4bc.js\");\nrequire(\"./map-interface.eb663cae.js\");\nrequire(\"./map-interface.713361a4.js\");\nrequire(\"./map-interface.d92b296e.js\");\nrequire(\"./map-interface.10f5ef81.js\");\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\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[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\n\nvar $jVPp0 = parcelRequire(\"jVPp0\");\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $3wYIs = parcelRequire(\"3wYIs\");\n\nvar $cL8YF = parcelRequire(\"cL8YF\");\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\nvar $R3my3 = parcelRequire(\"R3my3\");\n\nvar $66CcX = parcelRequire(\"66CcX\");\n\nvar $e9x7B = parcelRequire(\"e9x7B\");\n$parcel$exportWildcard(module.exports, $d7LVS);\n$parcel$exportWildcard(module.exports, $6t6Bb);\n$parcel$exportWildcard(module.exports, $jVPp0);\n$parcel$exportWildcard(module.exports, $lw3Ik);\n$parcel$exportWildcard(module.exports, $3wYIs);\n$parcel$exportWildcard(module.exports, $cL8YF);\n$parcel$exportWildcard(module.exports, $7CmOU);\n$parcel$exportWildcard(module.exports, $R3my3);\n$parcel$exportWildcard(module.exports, $66CcX);\n$parcel$exportWildcard(module.exports, $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"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","parcelRegister","$d7LVS","$6t6Bb","$jVPp0","$lw3Ik","$3wYIs","$cL8YF","$7CmOU","$R3my3","$66CcX","$e9x7B"],"version":3,"file":"index.js.map","sourceRoot":"../../../../"}
@@ -1,2 +1,2 @@
1
- function $parcel$exportWildcard(e,r){return Object.keys(r).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})}),e}require("./map-interface.02dd6884.js"),require("./map-interface.44d3f3bf.js"),require("./map-interface.62b147ce.js"),require("./map-interface.2d12b35c.js");var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.call(a.exports,a,a.exports),a.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,r){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$c9InG=parcelRequire("c9InG"),$2DICz=parcelRequire("2DICz"),$gnyJS=parcelRequire("gnyJS"),$2mAQJ=parcelRequire("2mAQJ");$parcel$exportWildcard(module.exports,$c9InG),$parcel$exportWildcard(module.exports,$2DICz),$parcel$exportWildcard(module.exports,$gnyJS),$parcel$exportWildcard(module.exports,$2mAQJ);
2
- //# sourceMappingURL=map-interface.d16a06b1.js.map
1
+ function $parcel$exportWildcard(e,r){return Object.keys(r).forEach(function(a){"default"===a||"__esModule"===a||Object.prototype.hasOwnProperty.call(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:function(){return r[a]}})}),e}require("./map-interface.d9814996.js"),require("./map-interface.992dea73.js"),require("./map-interface.62b147ce.js"),require("./map-interface.2d12b35c.js");var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.call(a.exports,a,a.exports),a.exports}var l=Error("Cannot find module '"+e+"'");throw l.code="MODULE_NOT_FOUND",l}).register=function(e,r){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register,$c9InG=parcelRequire("c9InG"),$2DICz=parcelRequire("2DICz"),$gnyJS=parcelRequire("gnyJS"),$2mAQJ=parcelRequire("2mAQJ");$parcel$exportWildcard(module.exports,$c9InG),$parcel$exportWildcard(module.exports,$2DICz),$parcel$exportWildcard(module.exports,$gnyJS),$parcel$exportWildcard(module.exports,$2mAQJ);
2
+ //# sourceMappingURL=map-interface.55fa679c.js.map
@@ -1 +1 @@
1
- {"mappings":"A,S,uB,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,Q,gD,Q,gD,Q,gD,Q,gD,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,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,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,S,O,c,S,O,c,S,O,c,S,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C","sources":["<anon>","packages/map-interface/src/dev/index.ts"],"sourcesContent":["require(\"./map-interface.02dd6884.js\");\nrequire(\"./map-interface.44d3f3bf.js\");\nrequire(\"./map-interface.62b147ce.js\");\nrequire(\"./map-interface.2d12b35c.js\");\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\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[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $c9InG = parcelRequire(\"c9InG\");\n\nvar $2DICz = parcelRequire(\"2DICz\");\n\nvar $gnyJS = parcelRequire(\"gnyJS\");\n\nvar $2mAQJ = parcelRequire(\"2mAQJ\");\n$parcel$exportWildcard(module.exports, $c9InG);\n$parcel$exportWildcard(module.exports, $2DICz);\n$parcel$exportWildcard(module.exports, $gnyJS);\n$parcel$exportWildcard(module.exports, $2mAQJ);\n\n\n//# sourceMappingURL=map-interface.d16a06b1.js.map\n","export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","parcelRegister","$c9InG","$2DICz","$gnyJS","$2mAQJ"],"version":3,"file":"map-interface.d16a06b1.js.map","sourceRoot":"../../../../"}
1
+ {"mappings":"A,S,uB,C,C,C,E,O,O,I,C,G,O,C,S,C,E,Y,G,A,e,G,O,S,C,c,C,I,C,E,I,O,c,C,E,E,C,W,C,E,I,W,O,C,C,E,A,C,E,G,C,C,Q,gD,Q,gD,Q,gD,Q,gD,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,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,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,O,c,S,O,c,S,O,c,S,O,c,S,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C,Q,uB,O,O,C","sources":["<anon>","packages/map-interface/src/dev/index.ts"],"sourcesContent":["require(\"./map-interface.d9814996.js\");\nrequire(\"./map-interface.992dea73.js\");\nrequire(\"./map-interface.62b147ce.js\");\nrequire(\"./map-interface.2d12b35c.js\");\n\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule' || Object.prototype.hasOwnProperty.call(dest, key)) {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n }\n });\n });\n\n return dest;\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\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[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\nvar $c9InG = parcelRequire(\"c9InG\");\n\nvar $2DICz = parcelRequire(\"2DICz\");\n\nvar $gnyJS = parcelRequire(\"gnyJS\");\n\nvar $2mAQJ = parcelRequire(\"2mAQJ\");\n$parcel$exportWildcard(module.exports, $c9InG);\n$parcel$exportWildcard(module.exports, $2DICz);\n$parcel$exportWildcard(module.exports, $gnyJS);\n$parcel$exportWildcard(module.exports, $2mAQJ);\n\n\n//# sourceMappingURL=map-interface.55fa679c.js.map\n","export * from \"./map-page\";\nexport * from \"./tile-extent\";\nexport * from \"./vector-tile-features\";\nexport * from \"./xray\";\n"],"names":["$parcel$exportWildcard","dest","source","Object","keys","forEach","key","prototype","hasOwnProperty","call","defineProperty","enumerable","get","require","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","err","Error","code","register","parcelRegister","$c9InG","$2DICz","$gnyJS","$2mAQJ"],"version":3,"file":"map-interface.55fa679c.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ var $8kl9w$macrostratmapboxreact=require("@macrostrat/mapbox-react"),$8kl9w$mapboxtilebelt=require("@mapbox/tilebelt"),$8kl9w$macrostratmapboxutils=require("@macrostrat/mapbox-utils");function $parcel$export(e,t,r,l){Object.defineProperty(e,t,{get:r,set:l,enumerable:!0,configurable:!0})}function $d89f06dba650370d$export$86c09739b12f23cd({tile:e,color:t="red"}){return(0,$8kl9w$macrostratmapboxreact.useMapStyleOperator)(r=>{let l=r.getStyle();if(null==l.layers)return;if(l.layers=l.layers.filter(e=>"tile-extent"!=e.id),null==e)return r.setStyle(l);let{x:a,y:o,z:i}=e,n=(0,$8kl9w$mapboxtilebelt.tileToGeoJSON)([a,o,i]);(0,$8kl9w$macrostratmapboxutils.setGeoJSON)(r,"tile-extent",n),null!=r.getLayer("tile-extent")&&r.removeLayer("tile-extent"),r.addLayer({id:"tile-extent",type:"line",source:"tile-extent",paint:{"line-color":t,"line-width":2}})},[t,e]),null}$parcel$export(module.exports,"TileExtentLayer",()=>$d89f06dba650370d$export$86c09739b12f23cd);
2
+ //# sourceMappingURL=map-interface.992dea73.js.map
@@ -0,0 +1 @@
1
+ {"mappings":"A,I,6B,Q,4B,sB,Q,oB,6B,Q,4B,S,e,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,CCMO,SAAS,0CAAgB,CAAA,KAC9B,CAAI,CAAA,MACJ,EAAQ,KAAA,CAIT,EA+BC,MA9BA,AAAA,CAAA,EAAA,6BAAA,mBAAkB,AAAlB,EACE,AAAC,IACC,IAAM,EAAQ,EAAI,QAAQ,GAC1B,GAAI,AAAgB,MAAhB,EAAM,MAAM,CAAU,OAE1B,GADA,EAAM,MAAM,CAAG,EAAM,MAAM,CAAC,MAAM,CAAC,AAAC,GAAM,AAAQ,eAAR,EAAE,EAAE,EAC1C,AAAQ,MAAR,EACF,OAAO,EAAI,QAAQ,CAAC,GAEtB,GAAM,CAAA,EAAE,CAAC,CAAA,EAAE,CAAC,CAAA,EAAE,CAAC,CAAE,CAAG,EACd,EAAS,AAAA,CAAA,EAAA,sBAAA,aAAY,AAAZ,EAAc,CAAC,EAAG,EAAG,EAAE,EAEtC,AAAA,CAAA,EAAA,6BAAA,UAAS,AAAT,EAAW,EAAK,cAAe,GAE3B,AAA+B,MAA/B,EAAI,QAAQ,CAAC,gBAEf,EAAI,WAAW,CAAC,eAGlB,EAAI,QAAQ,CAAC,CACX,GAAI,cACJ,KAAM,OACN,OAAQ,cACR,MAAO,CACL,aAAc,EACd,aAAc,CAChB,CACF,EACF,EACA,CAAC,EAAO,EAAK,EAER,IACT,C,e,O,O,C,kB,I","sources":["<anon>","packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["var $8kl9w$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $8kl9w$mapboxtilebelt = require(\"@mapbox/tilebelt\");\nvar $8kl9w$macrostratmapboxutils = require(\"@macrostrat/mapbox-utils\");\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n$parcel$export(module.exports, \"TileExtentLayer\", () => $d89f06dba650370d$export$86c09739b12f23cd);\n\n\n\nfunction $d89f06dba650370d$export$86c09739b12f23cd({ tile: tile, color: color = \"red\" }) {\n (0, $8kl9w$macrostratmapboxreact.useMapStyleOperator)((map)=>{\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l)=>l.id != \"tile-extent\");\n if (tile == null) return map.setStyle(style);\n const { x: x, y: y, z: z } = tile;\n const extent = (0, $8kl9w$mapboxtilebelt.tileToGeoJSON)([\n x,\n y,\n z\n ]);\n (0, $8kl9w$macrostratmapboxutils.setGeoJSON)(map, \"tile-extent\", extent);\n if (map.getLayer(\"tile-extent\") != null) // If the layer already exists, we can just update it\n map.removeLayer(\"tile-extent\");\n map.addLayer({\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2\n }\n });\n }, [\n color,\n tile\n ]);\n return null;\n}\n\n\n//# sourceMappingURL=map-interface.992dea73.js.map\n","import { useMapStyleOperator } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { setGeoJSON } from \"@macrostrat/mapbox-utils\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n useMapStyleOperator(\n (map) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (tile == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = tile;\n const extent = tileToGeoJSON([x, y, z]);\n\n setGeoJSON(map, \"tile-extent\", extent as any);\n\n if (map.getLayer(\"tile-extent\") != null) {\n // If the layer already exists, we can just update it\n map.removeLayer(\"tile-extent\");\n }\n\n map.addLayer({\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n });\n },\n [color, tile],\n );\n return null;\n}\n"],"names":["$8kl9w$macrostratmapboxreact","require","$8kl9w$mapboxtilebelt","$8kl9w$macrostratmapboxutils","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$d89f06dba650370d$export$86c09739b12f23cd","tile","color","useMapStyleOperator","map","style","getStyle","layers","filter","l","id","setStyle","x","y","z","extent","tileToGeoJSON","setGeoJSON","getLayer","removeLayer","addLayer","type","source","paint","module","exports"],"version":3,"file":"map-interface.992dea73.js.map","sourceRoot":"../../../../"}
@@ -0,0 +1,2 @@
1
+ require("./map-interface.2d12b35c.js"),require("./map-interface.b14f08e8.js"),require("./map-interface.ed6b5586.js"),require("./map-interface.eb663cae.js"),require("./map-interface.cf540298.js"),require("./map-interface.20c346ba.js"),require("./map-interface.83fa8028.js"),require("./map-interface.992dea73.js"),require("./map-interface.62b147ce.js");var $8RvAA$blueprintjscore=require("@blueprintjs/core"),$8RvAA$macrostrathyper=require("@macrostrat/hyper"),$8RvAA$macrostratuicomponents=require("@macrostrat/ui-components"),$8RvAA$mapboxgl=require("mapbox-gl"),$8RvAA$react=require("react");function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e}function $parcel$export(e,r,a,t){Object.defineProperty(e,r,{get:a,set:t,enumerable:!0,configurable:!0})}var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.call(a.exports,a,a.exports),a.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,r){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register;$parcel$export(module.exports,"h",()=>$0bad82db04876d25$export$dda1d9f60106f0e9),$parcel$export(module.exports,"MapInspectorV2",()=>$0bad82db04876d25$export$eab3034e57b46e26),$parcel$export(module.exports,"DevMapPage",()=>$0bad82db04876d25$export$2391061fbdfb71ef);var $2mAQJ=parcelRequire("2mAQJ"),$lw3Ik=parcelRequire("lw3Ik"),$d7LVS=parcelRequire("d7LVS"),$7CmOU=parcelRequire("7CmOU"),$6t6Bb=parcelRequire("6t6Bb"),$3wYIs=parcelRequire("3wYIs"),$7gWgo=parcelRequire("7gWgo"),$2DICz=parcelRequire("2DICz"),$gnyJS=parcelRequire("gnyJS");let $0bad82db04876d25$export$dda1d9f60106f0e9=$parcel$interopDefault($8RvAA$macrostrathyper).styled($parcel$interopDefault($7gWgo));function $0bad82db04876d25$export$eab3034e57b46e26({title:e="Map inspector",headerElement:r=null,transformRequest:a=null,mapPosition:t=null,mapboxToken:l=null,overlayStyle:d=null,controls:o=null,children:$=null,style:n,bounds:c=null,focusedSource:p=null,focusedSourceTitle:i=null,fitViewport:u=!0,styleType:s="macrostrat"}){let f=(0,$8RvAA$macrostratuicomponents.useDarkMode)(),b=f?.isEnabled;null!=l&&($parcel$interopDefault($8RvAA$mapboxgl).accessToken=l);let m=(0,$7CmOU.useBasicMapStyle)({styleType:s});n??(n=m);let[x,R]=(0,$8RvAA$react.useState)(!1),[A,S]=(0,$8RvAA$macrostratuicomponents.useStoredState)("macrostrat:dev-map-page",{showTileExtent:!1,xRay:!1}),{showTileExtent:g,xRay:q}=A,[v,y]=(0,$8RvAA$react.useState)(null);(0,$8RvAA$react.useEffect)(()=>{(0,$2mAQJ.buildInspectorStyle)(n,d,{mapboxToken:l,inDarkMode:b,xRay:q}).then(y)},[n,q,l,b,d]);let[_,h]=(0,$8RvAA$react.useState)(null),[E,w]=(0,$8RvAA$react.useState)(null),H=(0,$8RvAA$react.useCallback)(e=>{h(e)},[]),I=null;null!=_&&(I=$0bad82db04876d25$export$dda1d9f60106f0e9($6t6Bb.LocationPanel,{onClose(){h(null)},position:_},[$0bad82db04876d25$export$dda1d9f60106f0e9($gnyJS.TileInfo,{feature:E?.[0]??null,showExtent:g,setShowExtent(){S({...A,showTileExtent:!g})}}),$0bad82db04876d25$export$dda1d9f60106f0e9($gnyJS.FeaturePanel,{features:E,focusedSource:p,focusedSourceTitle:i})]));let M=null;if(g&&E?.[0]!=null){let e=E[0];M={x:e._x,y:e._y,z:e._z}}return $0bad82db04876d25$export$dda1d9f60106f0e9($lw3Ik.MapAreaContainer,{navbar:$0bad82db04876d25$export$dda1d9f60106f0e9($d7LVS.FloatingNavbar,{rightElement:$0bad82db04876d25$export$dda1d9f60106f0e9($d7LVS.MapLoadingButton,{large:!0,active:x,onClick:()=>R(!x),style:{marginRight:"-5px"}}),headerElement:r,title:e}),contextPanel:$0bad82db04876d25$export$dda1d9f60106f0e9($lw3Ik.PanelCard,[o,$0bad82db04876d25$export$dda1d9f60106f0e9($8RvAA$blueprintjscore.Switch,{checked:q,label:"X-ray mode",onChange(){S({...A,xRay:!q})}})]),detailPanel:I,contextPanelOpen:x,fitViewport:u},$0bad82db04876d25$export$dda1d9f60106f0e9($3wYIs.MapView,{style:v,transformRequest:a,mapPosition:t,projection:{name:"globe"},mapboxToken:l,bounds:c},[$0bad82db04876d25$export$dda1d9f60106f0e9($gnyJS.FeatureSelectionHandler,{selectedLocation:_,setFeatures:w}),$0bad82db04876d25$export$dda1d9f60106f0e9($7CmOU.MapMarker,{position:_,setPosition:H}),$0bad82db04876d25$export$dda1d9f60106f0e9($2DICz.TileExtentLayer,{tile:M,color:b?"white":"black"}),$]))}function $0bad82db04876d25$var$MapInspector(e){let{children:r,controls:a,...t}=e;return console.warn("MapInspector is deprecated. Use MapInspectorV2 instead"),$0bad82db04876d25$export$dda1d9f60106f0e9($0bad82db04876d25$export$eab3034e57b46e26,{...t,controls:[r,a]})}let $0bad82db04876d25$export$2391061fbdfb71ef=$0bad82db04876d25$var$MapInspector;
2
+ //# sourceMappingURL=map-interface.d9814996.js.map
@@ -0,0 +1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sources":["<anon>","packages/map-interface/src/dev/map-page.ts"],"sourcesContent":["require(\"./map-interface.2d12b35c.js\");\nrequire(\"./map-interface.b14f08e8.js\");\nrequire(\"./map-interface.ed6b5586.js\");\nrequire(\"./map-interface.eb663cae.js\");\nrequire(\"./map-interface.cf540298.js\");\nrequire(\"./map-interface.20c346ba.js\");\nrequire(\"./map-interface.83fa8028.js\");\nrequire(\"./map-interface.992dea73.js\");\nrequire(\"./map-interface.62b147ce.js\");\nvar $8RvAA$blueprintjscore = require(\"@blueprintjs/core\");\nvar $8RvAA$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $8RvAA$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $8RvAA$mapboxgl = require(\"mapbox-gl\");\nvar $8RvAA$react = require(\"react\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\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[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n$parcel$export(module.exports, \"h\", () => $0bad82db04876d25$export$dda1d9f60106f0e9);\n$parcel$export(module.exports, \"MapInspectorV2\", () => $0bad82db04876d25$export$eab3034e57b46e26);\n$parcel$export(module.exports, \"DevMapPage\", () => $0bad82db04876d25$export$2391061fbdfb71ef);\n// Import other components\n\n\n\n\n\n\nvar $2mAQJ = parcelRequire(\"2mAQJ\");\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\n\nvar $3wYIs = parcelRequire(\"3wYIs\");\n\nvar $7gWgo = parcelRequire(\"7gWgo\");\n\nvar $2DICz = parcelRequire(\"2DICz\");\n\nvar $gnyJS = parcelRequire(\"gnyJS\");\nconst $0bad82db04876d25$export$dda1d9f60106f0e9 = (0, ($parcel$interopDefault($8RvAA$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($7gWgo))));\nfunction $0bad82db04876d25$export$eab3034e57b46e26({ title: title = \"Map inspector\", headerElement: headerElement = null, transformRequest: transformRequest = null, mapPosition: mapPosition = null, mapboxToken: mapboxToken = null, overlayStyle: overlayStyle = null, controls: controls = null, children: children = null, style: style, bounds: bounds = null, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null, fitViewport: fitViewport = true, styleType: styleType = \"macrostrat\" }) {\n /* We apply a custom style to the panel container when we are interacting\n with the search bar, so that we can block map interactions until search\n bar focus is lost.\n We also apply a custom style when the infodrawer is open so we can hide\n the search bar on mobile platforms\n */ const dark = (0, $8RvAA$macrostratuicomponents.useDarkMode)();\n const isEnabled = dark?.isEnabled;\n if (mapboxToken != null) (0, ($parcel$interopDefault($8RvAA$mapboxgl))).accessToken = mapboxToken;\n const basicStyle = (0, $7CmOU.useBasicMapStyle)({\n styleType: styleType\n });\n style ?? (style = basicStyle);\n const [isOpen, setOpen] = (0, $8RvAA$react.useState)(false);\n const [state, setState] = (0, $8RvAA$macrostratuicomponents.useStoredState)(\"macrostrat:dev-map-page\", {\n showTileExtent: false,\n xRay: false\n });\n const { showTileExtent: showTileExtent, xRay: xRay } = state;\n const [actualStyle, setActualStyle] = (0, $8RvAA$react.useState)(null);\n (0, $8RvAA$react.useEffect)(()=>{\n (0, $2mAQJ.buildInspectorStyle)(style, overlayStyle, {\n mapboxToken: mapboxToken,\n inDarkMode: isEnabled,\n xRay: xRay\n }).then(setActualStyle);\n }, [\n style,\n xRay,\n mapboxToken,\n isEnabled,\n overlayStyle\n ]);\n const [inspectPosition, setInspectPosition] = (0, $8RvAA$react.useState)(null);\n const [data, setData] = (0, $8RvAA$react.useState)(null);\n const onSelectPosition = (0, $8RvAA$react.useCallback)((position)=>{\n setInspectPosition(position);\n }, []);\n let detailElement = null;\n if (inspectPosition != null) detailElement = $0bad82db04876d25$export$dda1d9f60106f0e9((0, $6t6Bb.LocationPanel), {\n onClose () {\n setInspectPosition(null);\n },\n position: inspectPosition\n }, [\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $gnyJS.TileInfo), {\n feature: data?.[0] ?? null,\n showExtent: showTileExtent,\n setShowExtent () {\n setState({\n ...state,\n showTileExtent: !showTileExtent\n });\n }\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $gnyJS.FeaturePanel), {\n features: data,\n focusedSource: focusedSource,\n focusedSourceTitle: focusedSourceTitle\n })\n ]);\n let tile = null;\n if (showTileExtent && data?.[0] != null) {\n let f = data[0];\n tile = {\n x: f._x,\n y: f._y,\n z: f._z\n };\n }\n return $0bad82db04876d25$export$dda1d9f60106f0e9((0, $lw3Ik.MapAreaContainer), {\n navbar: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $d7LVS.FloatingNavbar), {\n rightElement: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $d7LVS.MapLoadingButton), {\n large: true,\n active: isOpen,\n onClick: ()=>setOpen(!isOpen),\n style: {\n marginRight: \"-5px\"\n }\n }),\n headerElement: headerElement,\n title: title\n }),\n contextPanel: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $lw3Ik.PanelCard), [\n controls,\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $8RvAA$blueprintjscore.Switch), {\n checked: xRay,\n label: \"X-ray mode\",\n onChange () {\n setState({\n ...state,\n xRay: !xRay\n });\n }\n })\n ]),\n detailPanel: detailElement,\n contextPanelOpen: isOpen,\n fitViewport: fitViewport\n }, $0bad82db04876d25$export$dda1d9f60106f0e9((0, $3wYIs.MapView), {\n style: actualStyle,\n transformRequest: transformRequest,\n mapPosition: mapPosition,\n projection: {\n name: \"globe\"\n },\n mapboxToken: mapboxToken,\n bounds: bounds\n }, [\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $gnyJS.FeatureSelectionHandler), {\n selectedLocation: inspectPosition,\n setFeatures: setData\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $7CmOU.MapMarker), {\n position: inspectPosition,\n setPosition: onSelectPosition\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $2DICz.TileExtentLayer), {\n tile: tile,\n color: isEnabled ? \"white\" : \"black\"\n }),\n children\n ]));\n}\nfunction $0bad82db04876d25$var$MapInspector(props) {\n const { children: children, controls: controls, ...rest } = props;\n /** Compatibility wrapper for MapInspectorV2 */ // React warning about this legacy usage\n console.warn(\"MapInspector is deprecated. Use MapInspectorV2 instead\");\n return $0bad82db04876d25$export$dda1d9f60106f0e9($0bad82db04876d25$export$eab3034e57b46e26, {\n ...rest,\n controls: [\n children,\n controls\n ]\n });\n}\nconst $0bad82db04876d25$export$2391061fbdfb71ef = $0bad82db04876d25$var$MapInspector;\n\n\n//# sourceMappingURL=map-interface.d9814996.js.map\n","// Import other components\nimport { Switch } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport { Spacer, useDarkMode, useStoredState } from \"@macrostrat/ui-components\";\nimport mapboxgl from \"mapbox-gl\";\nimport { useCallback, useState, useEffect } from \"react\";\nimport { buildInspectorStyle } from \"./xray\";\nimport { MapAreaContainer, PanelCard } from \"../container\";\nimport { FloatingNavbar, MapLoadingButton } from \"../context-panel\";\nimport { MapMarker, useBasicMapStyle } 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 const basicStyle = useBasicMapStyle({ styleType });\n style ??= basicStyle;\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":["require","$8RvAA$blueprintjscore","$8RvAA$macrostrathyper","$8RvAA$macrostratuicomponents","$8RvAA$mapboxgl","$8RvAA$react","$parcel$interopDefault","a","__esModule","default","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$0bad82db04876d25$export$dda1d9f60106f0e9","$0bad82db04876d25$export$eab3034e57b46e26","$0bad82db04876d25$export$2391061fbdfb71ef","$2mAQJ","$lw3Ik","$d7LVS","$7CmOU","$6t6Bb","$3wYIs","$7gWgo","$2DICz","$gnyJS","styled","title","headerElement","transformRequest","mapPosition","mapboxToken","overlayStyle","controls","children","style","bounds","focusedSource","focusedSourceTitle","fitViewport","styleType","dark","useDarkMode","isEnabled","accessToken","basicStyle","useBasicMapStyle","isOpen","setOpen","useState","state","setState","useStoredState","showTileExtent","xRay","actualStyle","setActualStyle","useEffect","buildInspectorStyle","inDarkMode","then","inspectPosition","setInspectPosition","data","setData","onSelectPosition","useCallback","position","detailElement","LocationPanel","onClose","TileInfo","feature","showExtent","setShowExtent","FeaturePanel","features","tile","f","x","_x","y","_y","z","_z","MapAreaContainer","navbar","FloatingNavbar","rightElement","MapLoadingButton","large","active","onClick","marginRight","contextPanel","PanelCard","Switch","checked","label","onChange","detailPanel","contextPanelOpen","MapView","projection","name","FeatureSelectionHandler","selectedLocation","setFeatures","MapMarker","setPosition","TileExtentLayer","color","$0bad82db04876d25$var$MapInspector","props","rest","console","warn"],"version":3,"file":"map-interface.d9814996.js.map","sourceRoot":"../../../../"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macrostrat/map-interface",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Map interface for Macrostrat",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -67,7 +67,8 @@ export function MapInspectorV2({
67
67
  mapboxgl.accessToken = mapboxToken;
68
68
  }
69
69
 
70
- style ??= useBasicMapStyle({ styleType });
70
+ const basicStyle = useBasicMapStyle({ styleType });
71
+ style ??= basicStyle;
71
72
 
72
73
  const [isOpen, setOpen] = useState(false);
73
74
 
@@ -1,6 +1,6 @@
1
- import { useMapConditionalStyle, useMapRef } from "@macrostrat/mapbox-react";
1
+ import { useMapStyleOperator } from "@macrostrat/mapbox-react";
2
2
  import { tileToGeoJSON } from "@mapbox/tilebelt";
3
- import { useCallback } from "react";
3
+ import { setGeoJSON } from "@macrostrat/mapbox-utils";
4
4
 
5
5
  type TileIndex = { x: number; y: number; z: number };
6
6
 
@@ -11,21 +11,25 @@ export function TileExtentLayer({
11
11
  tile: TileIndex | null;
12
12
  color?: string;
13
13
  }) {
14
- const styleCallback = useCallback(
15
- (map, val: TileIndex) => {
14
+ useMapStyleOperator(
15
+ (map) => {
16
16
  const style = map.getStyle();
17
17
  if (style.layers == null) return;
18
18
  style.layers = style.layers.filter((l) => l.id != "tile-extent");
19
- if (val == null) {
19
+ if (tile == null) {
20
20
  return map.setStyle(style);
21
21
  }
22
- const { x, y, z } = val;
22
+ const { x, y, z } = tile;
23
23
  const extent = tileToGeoJSON([x, y, z]);
24
- const source = {
25
- type: "geojson",
26
- data: extent,
27
- };
28
- const layer = {
24
+
25
+ setGeoJSON(map, "tile-extent", extent as any);
26
+
27
+ if (map.getLayer("tile-extent") != null) {
28
+ // If the layer already exists, we can just update it
29
+ map.removeLayer("tile-extent");
30
+ }
31
+
32
+ map.addLayer({
29
33
  id: "tile-extent",
30
34
  type: "line",
31
35
  source: "tile-extent",
@@ -33,14 +37,9 @@ export function TileExtentLayer({
33
37
  "line-color": color,
34
38
  "line-width": 2,
35
39
  },
36
- };
37
- style.sources["tile-extent"] = source;
38
- style.layers.push(layer);
39
- map.setStyle(style);
40
+ });
40
41
  },
41
- [color],
42
+ [color, tile],
42
43
  );
43
- const map = useMapRef();
44
- useMapConditionalStyle(map, tile, styleCallback);
45
44
  return null;
46
45
  }
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;AAMO,SAAS,0CAAgB,QAC9B,IAAI,SACJ,QAAQ,OAIT;IACC,MAAM,gBAAgB,CAAA,GAAA,wBAAU,EAC9B,CAAC,KAAK;QACJ,MAAM,QAAQ,IAAI,QAAQ;QAC1B,IAAI,MAAM,MAAM,IAAI,MAAM;QAC1B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,IAAM,EAAE,EAAE,IAAI;QAClD,IAAI,OAAO,MACT,OAAO,IAAI,QAAQ,CAAC;QAEtB,MAAM,KAAE,CAAC,KAAE,CAAC,KAAE,CAAC,EAAE,GAAG;QACpB,MAAM,SAAS,CAAA,GAAA,mCAAY,EAAE;YAAC;YAAG;YAAG;SAAE;QACtC,MAAM,SAAS;YACb,MAAM;YACN,MAAM;QACR;QACA,MAAM,QAAQ;YACZ,IAAI;YACJ,MAAM;YACN,QAAQ;YACR,OAAO;gBACL,cAAc;gBACd,cAAc;YAChB;QACF;QACA,MAAM,OAAO,CAAC,cAAc,GAAG;QAC/B,MAAM,MAAM,CAAC,IAAI,CAAC;QAClB,IAAI,QAAQ,CAAC;IACf,GACA;QAAC;KAAM;IAET,MAAM,MAAM,CAAA,GAAA,sCAAQ;IACpB,CAAA,GAAA,mDAAqB,EAAE,KAAK,MAAM;IAClC,OAAO;AACT","sources":["packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["import { useMapConditionalStyle, useMapRef } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { useCallback } from \"react\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n const styleCallback = useCallback(\n (map, val: TileIndex) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (val == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = val;\n const extent = tileToGeoJSON([x, y, z]);\n const source = {\n type: \"geojson\",\n data: extent,\n };\n const layer = {\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n };\n style.sources[\"tile-extent\"] = source;\n style.layers.push(layer);\n map.setStyle(style);\n },\n [color],\n );\n const map = useMapRef();\n useMapConditionalStyle(map, tile, styleCallback);\n return null;\n}\n"],"names":[],"version":3,"file":"map-interface.175c4635.js.map"}
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,0BAA0B;;;;;;;;;;;;;;;AAqBnB,MAAM,4CAAI,CAAA,GAAA,gDAAI,EAAE,MAAM,CAAC,CAAA,GAAA,mDAAK;AAE5B,SAAS,0CAAe,SAC7B,QAAQ,gCACR,gBAAgB,wBAChB,mBAAmB,mBACnB,cAAc,mBACd,cAAc,oBACd,eAAe,gBACf,WAAW,gBACX,WAAW,aACX,KAAK,UACL,SAAS,qBACT,gBAAgB,0BAChB,qBAAqB,mBACrB,cAAc,iBACd,YAAY,cAiBb;IACC;;;;;EAKA,GAEA,MAAM,OAAO,CAAA,GAAA,yCAAU;IACvB,MAAM,YAAY,MAAM;IAExB,IAAI,eAAe,MACjB,CAAA,GAAA,yCAAO,EAAE,WAAW,GAAG;IAGzB,UAAU,CAAA,GAAA,0CAAe,EAAE;mBAAE;IAAU;IAEvC,MAAM,CAAC,QAAQ,QAAQ,GAAG,CAAA,GAAA,qBAAO,EAAE;IAEnC,MAAM,CAAC,OAAO,SAAS,GAAG,CAAA,GAAA,4CAAa,EAAE,2BAA2B;QAClE,gBAAgB;QAChB,MAAM;IACR;IACA,MAAM,kBAAE,cAAc,QAAE,IAAI,EAAE,GAAG;IAEjC,MAAM,CAAC,aAAa,eAAe,GAAG,CAAA,GAAA,qBAAO,EAAE;IAE/C,CAAA,G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ACzB;YACA,0CAAE,CAAA,GAAA,6BAAK,GAAG;gBACR,SAAS;gBACT,OAAO;gBACP;oBACE,SAAS;wBAAE,GAAG,KAAK;wBAAE,MAAM,CAAC;oBAAK;gBACnC;YACF;SACD;QACD,aAAa;QACb,kBAAkB;qBAClB;IACF,GACA,0CACE,CAAA,GAAA,iCAAM,GACN;QACE,OAAO;0BACP;qBACA;QACA,YAAY;YAAE,MAAM;QAAQ;qBAC5B;gBACA;IACF,GACA;QACE,0CAAE,CAAA,GAAA,iDAAsB,GAAG;YACzB,kBAAkB;YAClB,aAAa;QACf;QACA,0CAAE,CAAA,GAAA,mCAAQ,GAAG;YACX,UAAU;YACV,aAAa;QACf;QACA,0CAAE,CAAA,GAAA,yCAAc,GAAG;kBAAE;YAAM,OAAO,YAAY,UAAU;QAAQ;QAChE;KACD;AAGP;AAEA,SAAS,mCAAa,KAAK;IACzB,MAAM,YAAE,QAAQ,YAAE,QAAQ,EAAE,GAAG,MAAM,GAAG;IACxC,6CAA6C,GAC7C,wCAAwC;IACxC,QAAQ,IAAI,CAAC;IAEb,OAAO,0CAAE,2CAAgB;QACvB,GAAG,IAAI;QACP,UAAU;YAAC;YAAU;SAAS;IAChC;AACF;AAGO,MAAM,4CAAa","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, useBasicMapStyle } 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 style ??= useBasicMapStyle({ styleType });\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-interface.17e81e8a.js.map"}
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,0BAA0B;;;;;;;;;;;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AG;kBAAE;YAAM,OAAO,YAAY,UAAU;QAAQ;QAChE;KACD;AAGP;AAEA,SAAS,mCAAa,KAAK;IACzB,MAAM,YAAE,QAAQ,YAAE,QAAQ,EAAE,GAAG,MAAM,GAAG;IACxC,6CAA6C,GAC7C,wCAAwC;IACxC,QAAQ,IAAI,CAAC;IAEb,OAAO,0CAAE,2CAAgB;QACvB,GAAG,IAAI;QACP,UAAU;YAAC;YAAU;SAAS;IAChC;AACF;AAGO,MAAM,4CAAa","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, useBasicMapStyle } 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 style ??= useBasicMapStyle({ styleType });\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-interface.00058d23.js.map"}
@@ -1,46 +0,0 @@
1
- import {useMapRef as $edFMK$useMapRef, useMapConditionalStyle as $edFMK$useMapConditionalStyle} from "@macrostrat/mapbox-react";
2
- import {tileToGeoJSON as $edFMK$tileToGeoJSON} from "@mapbox/tilebelt";
3
- import {useCallback as $edFMK$useCallback} from "react";
4
-
5
-
6
-
7
-
8
- function $1d4d29ef2725aa16$export$86c09739b12f23cd({ tile: tile, color: color = "red" }) {
9
- const styleCallback = (0, $edFMK$useCallback)((map, val)=>{
10
- const style = map.getStyle();
11
- if (style.layers == null) return;
12
- style.layers = style.layers.filter((l)=>l.id != "tile-extent");
13
- if (val == null) return map.setStyle(style);
14
- const { x: x, y: y, z: z } = val;
15
- const extent = (0, $edFMK$tileToGeoJSON)([
16
- x,
17
- y,
18
- z
19
- ]);
20
- const source = {
21
- type: "geojson",
22
- data: extent
23
- };
24
- const layer = {
25
- id: "tile-extent",
26
- type: "line",
27
- source: "tile-extent",
28
- paint: {
29
- "line-color": color,
30
- "line-width": 2
31
- }
32
- };
33
- style.sources["tile-extent"] = source;
34
- style.layers.push(layer);
35
- map.setStyle(style);
36
- }, [
37
- color
38
- ]);
39
- const map = (0, $edFMK$useMapRef)();
40
- (0, $edFMK$useMapConditionalStyle)(map, tile, styleCallback);
41
- return null;
42
- }
43
-
44
-
45
- export {$1d4d29ef2725aa16$export$86c09739b12f23cd as TileExtentLayer};
46
- //# sourceMappingURL=map-interface.f107347b.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;AAMO,SAAS,0CAAgB,QAC9B,IAAI,SACJ,QAAQ,OAIT;IACC,MAAM,gBAAgB,CAAA,GAAA,kBAAU,EAC9B,CAAC,KAAK;QACJ,MAAM,QAAQ,IAAI,QAAQ;QAC1B,IAAI,MAAM,MAAM,IAAI,MAAM;QAC1B,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,IAAM,EAAE,EAAE,IAAI;QAClD,IAAI,OAAO,MACT,OAAO,IAAI,QAAQ,CAAC;QAEtB,MAAM,KAAE,CAAC,KAAE,CAAC,KAAE,CAAC,EAAE,GAAG;QACpB,MAAM,SAAS,CAAA,GAAA,oBAAY,EAAE;YAAC;YAAG;YAAG;SAAE;QACtC,MAAM,SAAS;YACb,MAAM;YACN,MAAM;QACR;QACA,MAAM,QAAQ;YACZ,IAAI;YACJ,MAAM;YACN,QAAQ;YACR,OAAO;gBACL,cAAc;gBACd,cAAc;YAChB;QACF;QACA,MAAM,OAAO,CAAC,cAAc,GAAG;QAC/B,MAAM,MAAM,CAAC,IAAI,CAAC;QAClB,IAAI,QAAQ,CAAC;IACf,GACA;QAAC;KAAM;IAET,MAAM,MAAM,CAAA,GAAA,gBAAQ;IACpB,CAAA,GAAA,6BAAqB,EAAE,KAAK,MAAM;IAClC,OAAO;AACT","sources":["packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["import { useMapConditionalStyle, useMapRef } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { useCallback } from \"react\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n const styleCallback = useCallback(\n (map, val: TileIndex) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (val == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = val;\n const extent = tileToGeoJSON([x, y, z]);\n const source = {\n type: \"geojson\",\n data: extent,\n };\n const layer = {\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n };\n style.sources[\"tile-extent\"] = source;\n style.layers.push(layer);\n map.setStyle(style);\n },\n [color],\n );\n const map = useMapRef();\n useMapConditionalStyle(map, tile, styleCallback);\n return null;\n}\n"],"names":[],"version":3,"file":"map-interface.f107347b.js.map"}
@@ -1,2 +0,0 @@
1
- require("./map-interface.2d12b35c.js"),require("./map-interface.b14f08e8.js"),require("./map-interface.ed6b5586.js"),require("./map-interface.eb663cae.js"),require("./map-interface.cf540298.js"),require("./map-interface.20c346ba.js"),require("./map-interface.83fa8028.js"),require("./map-interface.44d3f3bf.js"),require("./map-interface.62b147ce.js");var $8RvAA$blueprintjscore=require("@blueprintjs/core"),$8RvAA$macrostrathyper=require("@macrostrat/hyper"),$8RvAA$macrostratuicomponents=require("@macrostrat/ui-components"),$8RvAA$mapboxgl=require("mapbox-gl"),$8RvAA$react=require("react");function $parcel$interopDefault(e){return e&&e.__esModule?e.default:e}function $parcel$export(e,r,a,t){Object.defineProperty(e,r,{get:a,set:t,enumerable:!0,configurable:!0})}var $parcel$global=globalThis,$parcel$modules={},$parcel$inits={},parcelRequire=$parcel$global.parcelRequirea149;null==parcelRequire&&((parcelRequire=function(e){if(e in $parcel$modules)return $parcel$modules[e].exports;if(e in $parcel$inits){var r=$parcel$inits[e];delete $parcel$inits[e];var a={id:e,exports:{}};return $parcel$modules[e]=a,r.call(a.exports,a,a.exports),a.exports}var t=Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}).register=function(e,r){$parcel$inits[e]=r},$parcel$global.parcelRequirea149=parcelRequire);var parcelRegister=parcelRequire.register;$parcel$export(module.exports,"h",()=>$0bad82db04876d25$export$dda1d9f60106f0e9),$parcel$export(module.exports,"MapInspectorV2",()=>$0bad82db04876d25$export$eab3034e57b46e26),$parcel$export(module.exports,"DevMapPage",()=>$0bad82db04876d25$export$2391061fbdfb71ef);var $2mAQJ=parcelRequire("2mAQJ"),$lw3Ik=parcelRequire("lw3Ik"),$d7LVS=parcelRequire("d7LVS"),$7CmOU=parcelRequire("7CmOU"),$6t6Bb=parcelRequire("6t6Bb"),$3wYIs=parcelRequire("3wYIs"),$7gWgo=parcelRequire("7gWgo"),$2DICz=parcelRequire("2DICz"),$gnyJS=parcelRequire("gnyJS");let $0bad82db04876d25$export$dda1d9f60106f0e9=$parcel$interopDefault($8RvAA$macrostrathyper).styled($parcel$interopDefault($7gWgo));function $0bad82db04876d25$export$eab3034e57b46e26({title:e="Map inspector",headerElement:r=null,transformRequest:a=null,mapPosition:t=null,mapboxToken:l=null,overlayStyle:d=null,controls:o=null,children:$=null,style:n,bounds:c=null,focusedSource:p=null,focusedSourceTitle:i=null,fitViewport:u=!0,styleType:s="macrostrat"}){let f=(0,$8RvAA$macrostratuicomponents.useDarkMode)(),b=f?.isEnabled;null!=l&&($parcel$interopDefault($8RvAA$mapboxgl).accessToken=l),n??(n=(0,$7CmOU.useBasicMapStyle)({styleType:s}));let[m,x]=(0,$8RvAA$react.useState)(!1),[R,A]=(0,$8RvAA$macrostratuicomponents.useStoredState)("macrostrat:dev-map-page",{showTileExtent:!1,xRay:!1}),{showTileExtent:S,xRay:g}=R,[q,v]=(0,$8RvAA$react.useState)(null);(0,$8RvAA$react.useEffect)(()=>{(0,$2mAQJ.buildInspectorStyle)(n,d,{mapboxToken:l,inDarkMode:b,xRay:g}).then(v)},[n,g,l,b,d]);let[y,_]=(0,$8RvAA$react.useState)(null),[h,E]=(0,$8RvAA$react.useState)(null),w=(0,$8RvAA$react.useCallback)(e=>{_(e)},[]),H=null;null!=y&&(H=$0bad82db04876d25$export$dda1d9f60106f0e9($6t6Bb.LocationPanel,{onClose(){_(null)},position:y},[$0bad82db04876d25$export$dda1d9f60106f0e9($gnyJS.TileInfo,{feature:h?.[0]??null,showExtent:S,setShowExtent(){A({...R,showTileExtent:!S})}}),$0bad82db04876d25$export$dda1d9f60106f0e9($gnyJS.FeaturePanel,{features:h,focusedSource:p,focusedSourceTitle:i})]));let I=null;if(S&&h?.[0]!=null){let e=h[0];I={x:e._x,y:e._y,z:e._z}}return $0bad82db04876d25$export$dda1d9f60106f0e9($lw3Ik.MapAreaContainer,{navbar:$0bad82db04876d25$export$dda1d9f60106f0e9($d7LVS.FloatingNavbar,{rightElement:$0bad82db04876d25$export$dda1d9f60106f0e9($d7LVS.MapLoadingButton,{large:!0,active:m,onClick:()=>x(!m),style:{marginRight:"-5px"}}),headerElement:r,title:e}),contextPanel:$0bad82db04876d25$export$dda1d9f60106f0e9($lw3Ik.PanelCard,[o,$0bad82db04876d25$export$dda1d9f60106f0e9($8RvAA$blueprintjscore.Switch,{checked:g,label:"X-ray mode",onChange(){A({...R,xRay:!g})}})]),detailPanel:H,contextPanelOpen:m,fitViewport:u},$0bad82db04876d25$export$dda1d9f60106f0e9($3wYIs.MapView,{style:q,transformRequest:a,mapPosition:t,projection:{name:"globe"},mapboxToken:l,bounds:c},[$0bad82db04876d25$export$dda1d9f60106f0e9($gnyJS.FeatureSelectionHandler,{selectedLocation:y,setFeatures:E}),$0bad82db04876d25$export$dda1d9f60106f0e9($7CmOU.MapMarker,{position:y,setPosition:w}),$0bad82db04876d25$export$dda1d9f60106f0e9($2DICz.TileExtentLayer,{tile:I,color:b?"white":"black"}),$]))}function $0bad82db04876d25$var$MapInspector(e){let{children:r,controls:a,...t}=e;return console.warn("MapInspector is deprecated. Use MapInspectorV2 instead"),$0bad82db04876d25$export$dda1d9f60106f0e9($0bad82db04876d25$export$eab3034e57b46e26,{...t,controls:[r,a]})}let $0bad82db04876d25$export$2391061fbdfb71ef=$0bad82db04876d25$var$MapInspector;
2
- //# sourceMappingURL=map-interface.02dd6884.js.map
@@ -1 +0,0 @@
1
- {"mappings":"A,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,Q,gD,I,uB,Q,qB,uB,Q,qB,8B,Q,6B,gB,Q,a,a,Q,S,S,uB,C,E,O,G,E,U,C,E,O,C,C,C,S,e,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,C,I,e,W,gB,C,E,c,C,E,c,e,iB,A,O,gB,A,C,c,S,C,E,G,K,gB,O,e,C,E,C,O,C,G,K,c,C,I,E,a,C,E,A,Q,a,C,E,C,I,E,C,G,E,Q,C,C,E,O,e,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,a,C,E,C,C,E,e,iB,C,e,I,e,c,Q,C,e,O,O,C,I,I,2C,e,O,O,C,iB,I,2C,e,O,O,C,a,I,2C,I,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,S,O,c,SCqBO,IAAM,0CAAI,AAAA,uBAAA,wBAAM,MAAM,CAAC,uBAAA,SAEvB,SAAS,0CAAe,CAAA,MAC7B,EAAQ,eAAA,CAAA,cACR,EAAgB,IAAA,CAAA,iBAChB,EAAmB,IAAA,CAAA,YACnB,EAAc,IAAA,CAAA,YACd,EAAc,IAAA,CAAA,aACd,EAAe,IAAA,CAAA,SACf,EAAW,IAAA,CAAA,SACX,EAAW,IAAA,CAAA,MACX,CAAK,CAAA,OACL,EAAS,IAAA,CAAA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AChE,EACD,EAGP,CAEA,SAAS,mCAAa,CAAK,EACzB,GAAM,CAAA,SAAE,CAAQ,CAAA,SAAE,CAAQ,CAAE,GAAG,EAAM,CAAG,EAKxC,OAFA,QAAQ,IAAI,CAAC,0DAEN,0CAAE,0CAAgB,CACvB,GAAG,CAAI,CACP,SAAU,CAAC,EAAU,EAAS,AAChC,EACF,CAGO,IAAM,0CAAa","sources":["<anon>","packages/map-interface/src/dev/map-page.ts"],"sourcesContent":["require(\"./map-interface.2d12b35c.js\");\nrequire(\"./map-interface.b14f08e8.js\");\nrequire(\"./map-interface.ed6b5586.js\");\nrequire(\"./map-interface.eb663cae.js\");\nrequire(\"./map-interface.cf540298.js\");\nrequire(\"./map-interface.20c346ba.js\");\nrequire(\"./map-interface.83fa8028.js\");\nrequire(\"./map-interface.44d3f3bf.js\");\nrequire(\"./map-interface.62b147ce.js\");\nvar $8RvAA$blueprintjscore = require(\"@blueprintjs/core\");\nvar $8RvAA$macrostrathyper = require(\"@macrostrat/hyper\");\nvar $8RvAA$macrostratuicomponents = require(\"@macrostrat/ui-components\");\nvar $8RvAA$mapboxgl = require(\"mapbox-gl\");\nvar $8RvAA$react = require(\"react\");\n\n\nfunction $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n var $parcel$global = globalThis;\n \nvar $parcel$modules = {};\nvar $parcel$inits = {};\n\nvar parcelRequire = $parcel$global[\"parcelRequirea149\"];\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[\"parcelRequirea149\"] = parcelRequire;\n}\n\nvar parcelRegister = parcelRequire.register;\n\n$parcel$export(module.exports, \"h\", () => $0bad82db04876d25$export$dda1d9f60106f0e9);\n$parcel$export(module.exports, \"MapInspectorV2\", () => $0bad82db04876d25$export$eab3034e57b46e26);\n$parcel$export(module.exports, \"DevMapPage\", () => $0bad82db04876d25$export$2391061fbdfb71ef);\n// Import other components\n\n\n\n\n\n\nvar $2mAQJ = parcelRequire(\"2mAQJ\");\n\nvar $lw3Ik = parcelRequire(\"lw3Ik\");\n\nvar $d7LVS = parcelRequire(\"d7LVS\");\n\nvar $7CmOU = parcelRequire(\"7CmOU\");\n\nvar $6t6Bb = parcelRequire(\"6t6Bb\");\n\nvar $3wYIs = parcelRequire(\"3wYIs\");\n\nvar $7gWgo = parcelRequire(\"7gWgo\");\n\nvar $2DICz = parcelRequire(\"2DICz\");\n\nvar $gnyJS = parcelRequire(\"gnyJS\");\nconst $0bad82db04876d25$export$dda1d9f60106f0e9 = (0, ($parcel$interopDefault($8RvAA$macrostrathyper))).styled((0, (/*@__PURE__*/$parcel$interopDefault($7gWgo))));\nfunction $0bad82db04876d25$export$eab3034e57b46e26({ title: title = \"Map inspector\", headerElement: headerElement = null, transformRequest: transformRequest = null, mapPosition: mapPosition = null, mapboxToken: mapboxToken = null, overlayStyle: overlayStyle = null, controls: controls = null, children: children = null, style: style, bounds: bounds = null, focusedSource: focusedSource = null, focusedSourceTitle: focusedSourceTitle = null, fitViewport: fitViewport = true, styleType: styleType = \"macrostrat\" }) {\n /* We apply a custom style to the panel container when we are interacting\n with the search bar, so that we can block map interactions until search\n bar focus is lost.\n We also apply a custom style when the infodrawer is open so we can hide\n the search bar on mobile platforms\n */ const dark = (0, $8RvAA$macrostratuicomponents.useDarkMode)();\n const isEnabled = dark?.isEnabled;\n if (mapboxToken != null) (0, ($parcel$interopDefault($8RvAA$mapboxgl))).accessToken = mapboxToken;\n style ?? (style = (0, $7CmOU.useBasicMapStyle)({\n styleType: styleType\n }));\n const [isOpen, setOpen] = (0, $8RvAA$react.useState)(false);\n const [state, setState] = (0, $8RvAA$macrostratuicomponents.useStoredState)(\"macrostrat:dev-map-page\", {\n showTileExtent: false,\n xRay: false\n });\n const { showTileExtent: showTileExtent, xRay: xRay } = state;\n const [actualStyle, setActualStyle] = (0, $8RvAA$react.useState)(null);\n (0, $8RvAA$react.useEffect)(()=>{\n (0, $2mAQJ.buildInspectorStyle)(style, overlayStyle, {\n mapboxToken: mapboxToken,\n inDarkMode: isEnabled,\n xRay: xRay\n }).then(setActualStyle);\n }, [\n style,\n xRay,\n mapboxToken,\n isEnabled,\n overlayStyle\n ]);\n const [inspectPosition, setInspectPosition] = (0, $8RvAA$react.useState)(null);\n const [data, setData] = (0, $8RvAA$react.useState)(null);\n const onSelectPosition = (0, $8RvAA$react.useCallback)((position)=>{\n setInspectPosition(position);\n }, []);\n let detailElement = null;\n if (inspectPosition != null) detailElement = $0bad82db04876d25$export$dda1d9f60106f0e9((0, $6t6Bb.LocationPanel), {\n onClose () {\n setInspectPosition(null);\n },\n position: inspectPosition\n }, [\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $gnyJS.TileInfo), {\n feature: data?.[0] ?? null,\n showExtent: showTileExtent,\n setShowExtent () {\n setState({\n ...state,\n showTileExtent: !showTileExtent\n });\n }\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $gnyJS.FeaturePanel), {\n features: data,\n focusedSource: focusedSource,\n focusedSourceTitle: focusedSourceTitle\n })\n ]);\n let tile = null;\n if (showTileExtent && data?.[0] != null) {\n let f = data[0];\n tile = {\n x: f._x,\n y: f._y,\n z: f._z\n };\n }\n return $0bad82db04876d25$export$dda1d9f60106f0e9((0, $lw3Ik.MapAreaContainer), {\n navbar: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $d7LVS.FloatingNavbar), {\n rightElement: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $d7LVS.MapLoadingButton), {\n large: true,\n active: isOpen,\n onClick: ()=>setOpen(!isOpen),\n style: {\n marginRight: \"-5px\"\n }\n }),\n headerElement: headerElement,\n title: title\n }),\n contextPanel: $0bad82db04876d25$export$dda1d9f60106f0e9((0, $lw3Ik.PanelCard), [\n controls,\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $8RvAA$blueprintjscore.Switch), {\n checked: xRay,\n label: \"X-ray mode\",\n onChange () {\n setState({\n ...state,\n xRay: !xRay\n });\n }\n })\n ]),\n detailPanel: detailElement,\n contextPanelOpen: isOpen,\n fitViewport: fitViewport\n }, $0bad82db04876d25$export$dda1d9f60106f0e9((0, $3wYIs.MapView), {\n style: actualStyle,\n transformRequest: transformRequest,\n mapPosition: mapPosition,\n projection: {\n name: \"globe\"\n },\n mapboxToken: mapboxToken,\n bounds: bounds\n }, [\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $gnyJS.FeatureSelectionHandler), {\n selectedLocation: inspectPosition,\n setFeatures: setData\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $7CmOU.MapMarker), {\n position: inspectPosition,\n setPosition: onSelectPosition\n }),\n $0bad82db04876d25$export$dda1d9f60106f0e9((0, $2DICz.TileExtentLayer), {\n tile: tile,\n color: isEnabled ? \"white\" : \"black\"\n }),\n children\n ]));\n}\nfunction $0bad82db04876d25$var$MapInspector(props) {\n const { children: children, controls: controls, ...rest } = props;\n /** Compatibility wrapper for MapInspectorV2 */ // React warning about this legacy usage\n console.warn(\"MapInspector is deprecated. Use MapInspectorV2 instead\");\n return $0bad82db04876d25$export$dda1d9f60106f0e9($0bad82db04876d25$export$eab3034e57b46e26, {\n ...rest,\n controls: [\n children,\n controls\n ]\n });\n}\nconst $0bad82db04876d25$export$2391061fbdfb71ef = $0bad82db04876d25$var$MapInspector;\n\n\n//# sourceMappingURL=map-interface.02dd6884.js.map\n","// Import other components\nimport { Switch } from \"@blueprintjs/core\";\nimport hyper from \"@macrostrat/hyper\";\nimport { Spacer, useDarkMode, useStoredState } from \"@macrostrat/ui-components\";\nimport mapboxgl from \"mapbox-gl\";\nimport { useCallback, useState, useEffect } from \"react\";\nimport { buildInspectorStyle } from \"./xray\";\nimport { MapAreaContainer, PanelCard } from \"../container\";\nimport { FloatingNavbar, MapLoadingButton } from \"../context-panel\";\nimport { MapMarker, useBasicMapStyle } 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 style ??= useBasicMapStyle({ styleType });\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":["require","$8RvAA$blueprintjscore","$8RvAA$macrostrathyper","$8RvAA$macrostratuicomponents","$8RvAA$mapboxgl","$8RvAA$react","$parcel$interopDefault","a","__esModule","default","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$parcel$global","globalThis","$parcel$modules","$parcel$inits","parcelRequire","id","exports","init","module","call","err","Error","code","register","parcelRegister","$0bad82db04876d25$export$dda1d9f60106f0e9","$0bad82db04876d25$export$eab3034e57b46e26","$0bad82db04876d25$export$2391061fbdfb71ef","$2mAQJ","$lw3Ik","$d7LVS","$7CmOU","$6t6Bb","$3wYIs","$7gWgo","$2DICz","$gnyJS","styled","title","headerElement","transformRequest","mapPosition","mapboxToken","overlayStyle","controls","children","style","bounds","focusedSource","focusedSourceTitle","fitViewport","styleType","dark","useDarkMode","isEnabled","accessToken","useBasicMapStyle","isOpen","setOpen","useState","state","setState","useStoredState","showTileExtent","xRay","actualStyle","setActualStyle","useEffect","buildInspectorStyle","inDarkMode","then","inspectPosition","setInspectPosition","data","setData","onSelectPosition","useCallback","position","detailElement","LocationPanel","onClose","TileInfo","feature","showExtent","setShowExtent","FeaturePanel","features","tile","f","x","_x","y","_y","z","_z","MapAreaContainer","navbar","FloatingNavbar","rightElement","MapLoadingButton","large","active","onClick","marginRight","contextPanel","PanelCard","Switch","checked","label","onChange","detailPanel","contextPanelOpen","MapView","projection","name","FeatureSelectionHandler","selectedLocation","setFeatures","MapMarker","setPosition","TileExtentLayer","color","$0bad82db04876d25$var$MapInspector","props","rest","console","warn"],"version":3,"file":"map-interface.02dd6884.js.map","sourceRoot":"../../../../"}
@@ -1,2 +0,0 @@
1
- var $8kl9w$macrostratmapboxreact=require("@macrostrat/mapbox-react"),$8kl9w$mapboxtilebelt=require("@mapbox/tilebelt"),$8kl9w$react=require("react");function $parcel$export(e,t,l,r){Object.defineProperty(e,t,{get:l,set:r,enumerable:!0,configurable:!0})}function $d89f06dba650370d$export$86c09739b12f23cd({tile:e,color:t="red"}){let l=(0,$8kl9w$react.useCallback)((e,l)=>{let r=e.getStyle();if(null==r.layers)return;if(r.layers=r.layers.filter(e=>"tile-extent"!=e.id),null==l)return e.setStyle(r);let{x:a,y:o,z:i}=l,c=(0,$8kl9w$mapboxtilebelt.tileToGeoJSON)([a,o,i]);r.sources["tile-extent"]={type:"geojson",data:c},r.layers.push({id:"tile-extent",type:"line",source:"tile-extent",paint:{"line-color":t,"line-width":2}}),e.setStyle(r)},[t]),r=(0,$8kl9w$macrostratmapboxreact.useMapRef)();return(0,$8kl9w$macrostratmapboxreact.useMapConditionalStyle)(r,e,l),null}$parcel$export(module.exports,"TileExtentLayer",()=>$d89f06dba650370d$export$86c09739b12f23cd);
2
- //# sourceMappingURL=map-interface.44d3f3bf.js.map
@@ -1 +0,0 @@
1
- {"mappings":"A,I,6B,Q,4B,sB,Q,oB,a,Q,S,S,e,C,C,C,C,C,C,C,E,O,c,C,E,E,C,I,E,I,E,W,C,E,a,C,C,E,CCMO,SAAS,0CAAgB,CAAA,KAC9B,CAAI,CAAA,MACJ,EAAQ,KAAA,CAIT,EACC,IAAM,EAAgB,AAAA,CAAA,EAAA,aAAA,WAAU,AAAV,EACpB,CAAC,EAAK,KACJ,IAAM,EAAQ,EAAI,QAAQ,GAC1B,GAAI,AAAgB,MAAhB,EAAM,MAAM,CAAU,OAE1B,GADA,EAAM,MAAM,CAAG,EAAM,MAAM,CAAC,MAAM,CAAC,AAAC,GAAM,AAAQ,eAAR,EAAE,EAAE,EAC1C,AAAO,MAAP,EACF,OAAO,EAAI,QAAQ,CAAC,GAEtB,GAAM,CAAA,EAAE,CAAC,CAAA,EAAE,CAAC,CAAA,EAAE,CAAC,CAAE,CAAG,EACd,EAAS,AAAA,CAAA,EAAA,sBAAA,aAAY,AAAZ,EAAc,CAAC,EAAG,EAAG,EAAE,CActC,CAAA,EAAM,OAAO,CAAC,cAAc,CAbb,CACb,KAAM,UACN,KAAM,CACR,EAWA,EAAM,MAAM,CAAC,IAAI,CAVH,CACZ,GAAI,cACJ,KAAM,OACN,OAAQ,cACR,MAAO,CACL,aAAc,EACd,aAAc,CAChB,CACF,GAGA,EAAI,QAAQ,CAAC,EACf,EACA,CAAC,EAAM,EAEH,EAAM,AAAA,CAAA,EAAA,6BAAA,SAAQ,AAAR,IAEZ,MADA,AAAA,CAAA,EAAA,6BAAA,sBAAqB,AAArB,EAAuB,EAAK,EAAM,GAC3B,IACT,C,e,O,O,C,kB,I","sources":["<anon>","packages/map-interface/src/dev/tile-extent.ts"],"sourcesContent":["var $8kl9w$macrostratmapboxreact = require(\"@macrostrat/mapbox-react\");\nvar $8kl9w$mapboxtilebelt = require(\"@mapbox/tilebelt\");\nvar $8kl9w$react = require(\"react\");\n\n\nfunction $parcel$export(e, n, v, s) {\n Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});\n}\n\n$parcel$export(module.exports, \"TileExtentLayer\", () => $d89f06dba650370d$export$86c09739b12f23cd);\n\n\n\nfunction $d89f06dba650370d$export$86c09739b12f23cd({ tile: tile, color: color = \"red\" }) {\n const styleCallback = (0, $8kl9w$react.useCallback)((map, val)=>{\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l)=>l.id != \"tile-extent\");\n if (val == null) return map.setStyle(style);\n const { x: x, y: y, z: z } = val;\n const extent = (0, $8kl9w$mapboxtilebelt.tileToGeoJSON)([\n x,\n y,\n z\n ]);\n const source = {\n type: \"geojson\",\n data: extent\n };\n const layer = {\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2\n }\n };\n style.sources[\"tile-extent\"] = source;\n style.layers.push(layer);\n map.setStyle(style);\n }, [\n color\n ]);\n const map = (0, $8kl9w$macrostratmapboxreact.useMapRef)();\n (0, $8kl9w$macrostratmapboxreact.useMapConditionalStyle)(map, tile, styleCallback);\n return null;\n}\n\n\n//# sourceMappingURL=map-interface.44d3f3bf.js.map\n","import { useMapConditionalStyle, useMapRef } from \"@macrostrat/mapbox-react\";\nimport { tileToGeoJSON } from \"@mapbox/tilebelt\";\nimport { useCallback } from \"react\";\n\ntype TileIndex = { x: number; y: number; z: number };\n\nexport function TileExtentLayer({\n tile,\n color = \"red\",\n}: {\n tile: TileIndex | null;\n color?: string;\n}) {\n const styleCallback = useCallback(\n (map, val: TileIndex) => {\n const style = map.getStyle();\n if (style.layers == null) return;\n style.layers = style.layers.filter((l) => l.id != \"tile-extent\");\n if (val == null) {\n return map.setStyle(style);\n }\n const { x, y, z } = val;\n const extent = tileToGeoJSON([x, y, z]);\n const source = {\n type: \"geojson\",\n data: extent,\n };\n const layer = {\n id: \"tile-extent\",\n type: \"line\",\n source: \"tile-extent\",\n paint: {\n \"line-color\": color,\n \"line-width\": 2,\n },\n };\n style.sources[\"tile-extent\"] = source;\n style.layers.push(layer);\n map.setStyle(style);\n },\n [color],\n );\n const map = useMapRef();\n useMapConditionalStyle(map, tile, styleCallback);\n return null;\n}\n"],"names":["$8kl9w$macrostratmapboxreact","require","$8kl9w$mapboxtilebelt","$8kl9w$react","$parcel$export","e","n","v","s","Object","defineProperty","get","set","enumerable","configurable","$d89f06dba650370d$export$86c09739b12f23cd","tile","color","styleCallback","useCallback","map","val","style","getStyle","layers","filter","l","id","setStyle","x","y","z","extent","tileToGeoJSON","sources","type","data","push","source","paint","useMapRef","useMapConditionalStyle","module","exports"],"version":3,"file":"map-interface.44d3f3bf.js.map","sourceRoot":"../../../../"}