@macrostrat/map-interface 0.0.12 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1783 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{module.css → index.css} +52 -217
- package/dist/index.css.map +1 -0
- package/dist/index.js +1774 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +11 -6
- package/src/container.ts +17 -10
- package/src/dev/vector-tile-features.ts +22 -18
- package/src/expansion-panel/index.ts +1 -0
- package/src/expansion-panel/main.module.sass +3 -3
- package/src/location-panel/main.module.sass +3 -0
- package/src/main.module.sass +87 -82
- package/src/map-view/index.ts +49 -27
- package/src/map-view/main.module.sass +7 -0
- package/dist/module.css.map +0 -1
- package/dist/module.js +0 -4518
- package/dist/module.js.map +0 -1
package/src/main.module.sass
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
position: relative
|
|
5
5
|
width: 100%
|
|
6
6
|
height: 100%
|
|
7
|
+
overflow: hidden
|
|
7
8
|
&.fit-viewport
|
|
8
9
|
height: 100vh
|
|
9
10
|
width: 100vw
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
.panel-card
|
|
44
45
|
padding: 10px
|
|
45
46
|
background-color: var(--panel-background-color)
|
|
47
|
+
overflow: hidden
|
|
46
48
|
|
|
47
49
|
& >:last-child
|
|
48
50
|
margin-bottom: 0
|
|
@@ -148,66 +150,60 @@
|
|
|
148
150
|
& hr
|
|
149
151
|
width: 100%
|
|
150
152
|
|
|
151
|
-
:global
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
left: 0
|
|
156
|
-
right: 0
|
|
153
|
+
:global
|
|
154
|
+
.mapbox-map
|
|
155
|
+
.mapbox-compass, .mapbox-3d
|
|
156
|
+
display: none
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
:
|
|
160
|
-
display: none
|
|
161
|
-
|
|
162
|
-
:global .mapboxgl-ctrl.mapbox-3d.mapbox-control
|
|
163
|
-
width: unset
|
|
158
|
+
.mapboxgl-ctrl.mapbox-3d.mapbox-control
|
|
159
|
+
width: unset
|
|
164
160
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
161
|
+
.mapboxgl-ctrl.mapbox-3d.mapbox-control button
|
|
162
|
+
width: unset
|
|
163
|
+
padding-inline: 4px
|
|
168
164
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
.mapboxgl-canvas-container
|
|
166
|
+
width: 100%
|
|
167
|
+
height: 100%
|
|
172
168
|
|
|
173
|
-
|
|
174
|
-
|
|
169
|
+
.mapboxgl-ctrl.mapboxgl-ctrl-attrib
|
|
170
|
+
background-color: var(--translucent-panel-background-color) !important
|
|
175
171
|
|
|
176
|
-
|
|
177
|
-
|
|
172
|
+
.mapboxgl-ctrl.mapboxgl-ctrl-attrib a
|
|
173
|
+
color: var(--text-color)
|
|
178
174
|
|
|
179
|
-
|
|
180
|
-
|
|
175
|
+
.mapboxgl-marker svg path
|
|
176
|
+
fill: var(--panel-background-color) !important
|
|
181
177
|
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
.mapboxgl-marker svg circle
|
|
179
|
+
fill: var(--secondary-color) !important
|
|
184
180
|
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
.mapbox-control.mapbox-zoom
|
|
182
|
+
background: var(--translucent-panel-background-inner)
|
|
187
183
|
|
|
188
|
-
|
|
189
|
-
|
|
184
|
+
.mapbox-control.mapbox-zoom svg
|
|
185
|
+
fill: var(--text-color) !important
|
|
190
186
|
|
|
191
|
-
|
|
192
|
-
|
|
187
|
+
.mapboxgl-ctrl-logo
|
|
188
|
+
transform: scale(0.9) translate(-8px, 2px)
|
|
193
189
|
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
.bp4-dark .mapboxgl-ctrl-logo
|
|
191
|
+
filter: invert(100%)
|
|
196
192
|
|
|
197
|
-
|
|
198
|
-
|
|
193
|
+
.mapboxgl-ctrl-group button + button
|
|
194
|
+
border-top: 1px solid var(--panel-rule-color) !important
|
|
199
195
|
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
.bp4-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon
|
|
197
|
+
filter: invert(40%)
|
|
202
198
|
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
.bp4-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon:hover
|
|
200
|
+
filter: invert(50%)
|
|
205
201
|
|
|
206
|
-
|
|
207
|
-
|
|
202
|
+
.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon
|
|
203
|
+
filter: invert(40%)
|
|
208
204
|
|
|
209
|
-
|
|
210
|
-
|
|
205
|
+
.mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon:hover
|
|
206
|
+
filter: invert(50%)
|
|
211
207
|
|
|
212
208
|
.detail-stack
|
|
213
209
|
position: relative
|
|
@@ -284,9 +280,8 @@
|
|
|
284
280
|
|
|
285
281
|
.infodrawer-stack
|
|
286
282
|
max-height: 70%
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
max-height: 0
|
|
283
|
+
&:global(.exit-active)
|
|
284
|
+
max-height: 0
|
|
290
285
|
|
|
291
286
|
:global(.mapbox-control.mapbox-zoom)
|
|
292
287
|
display: none
|
|
@@ -311,27 +306,27 @@
|
|
|
311
306
|
&>*:last-child
|
|
312
307
|
margin-right: 0
|
|
313
308
|
|
|
314
|
-
&.searching .context-stack
|
|
315
|
-
width: 24em
|
|
316
|
-
|
|
317
309
|
.context-stack
|
|
318
310
|
max-width: 34em
|
|
319
311
|
min-width: 14em
|
|
320
|
-
width: 16em
|
|
321
312
|
transition: width 300ms ease
|
|
322
313
|
padding-bottom: 0.5em
|
|
314
|
+
width: var(--map-context-stack-width, 16em)
|
|
315
|
+
margin-right: 0.5em
|
|
316
|
+
display: flex
|
|
317
|
+
flex-direction: column
|
|
323
318
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
margin-right: 0.5em
|
|
319
|
+
&>.spacer
|
|
320
|
+
flex-grow: 0
|
|
327
321
|
|
|
328
|
-
.context-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
322
|
+
.context-panel-holder
|
|
323
|
+
min-height: 0
|
|
324
|
+
position: relative
|
|
325
|
+
&>div
|
|
326
|
+
max-height: 100%
|
|
332
327
|
|
|
333
328
|
.main-ui.detail-panel-open .detail-stack
|
|
334
|
-
width: 30em
|
|
329
|
+
width: var(--map-detail-stack-width, 30em)
|
|
335
330
|
|
|
336
331
|
.detail-stack
|
|
337
332
|
width: 30em
|
|
@@ -339,24 +334,25 @@
|
|
|
339
334
|
display: flex
|
|
340
335
|
flex-direction: column
|
|
341
336
|
|
|
342
|
-
.context-stack,
|
|
343
|
-
.detail-stack
|
|
337
|
+
.context-stack, .detail-stack
|
|
344
338
|
pointer-events: none
|
|
345
339
|
z-index: 100
|
|
346
340
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
margin-bottom: 0.5em
|
|
341
|
+
&>div
|
|
342
|
+
pointer-events: all
|
|
343
|
+
margin-bottom: 0.5em
|
|
351
344
|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
margin-bottom: 0
|
|
345
|
+
&:last-child
|
|
346
|
+
margin-bottom: 0
|
|
355
347
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
pointer-events: none
|
|
348
|
+
&.spacer
|
|
349
|
+
pointer-events: none
|
|
359
350
|
|
|
351
|
+
.context-stack .spacer
|
|
352
|
+
min-height: 1em
|
|
353
|
+
|
|
354
|
+
/* Make map fill page rather than containing div,
|
|
355
|
+
by unsetting map position */
|
|
360
356
|
.map-view-container
|
|
361
357
|
position: unset
|
|
362
358
|
|
|
@@ -372,17 +368,26 @@
|
|
|
372
368
|
.main-ui.detail-panel-leave .detail-panel
|
|
373
369
|
opacity: 0
|
|
374
370
|
|
|
375
|
-
.main-ui .context-panel
|
|
376
|
-
|
|
371
|
+
.main-ui .context-panel-holder
|
|
372
|
+
pointer-events: none
|
|
373
|
+
flex: 1
|
|
374
|
+
&>div
|
|
375
|
+
pointer-events: all
|
|
376
|
+
transition: opacity 0.8s ease //, height 0.8s ease, max-height 0.8s ease, padding 0.8s ease
|
|
377
377
|
|
|
378
|
-
.main-ui.context-panel-from .context-panel
|
|
378
|
+
.main-ui.context-panel-from .context-panel-holder>div
|
|
379
379
|
opacity: 0
|
|
380
380
|
|
|
381
|
-
.main-ui.context-panel-enter .context-panel
|
|
381
|
+
.main-ui.context-panel-enter .context-panel-holder>div
|
|
382
382
|
opacity: 1
|
|
383
383
|
|
|
384
|
-
.main-ui.context-panel-leave .context-panel
|
|
384
|
+
.main-ui.context-panel-leave .context-panel-holder>div
|
|
385
385
|
opacity: 0
|
|
386
|
+
// The max-height transition is a bit jerky because of panel padding.
|
|
387
|
+
// We could probably fix this by pulling the panel container itself into
|
|
388
|
+
// the class.
|
|
389
|
+
//max-height: 0
|
|
390
|
+
//padding: 0
|
|
386
391
|
|
|
387
392
|
@media only screen and (max-width: 768px)
|
|
388
393
|
.main-ui .detail-stack
|
|
@@ -396,16 +401,16 @@
|
|
|
396
401
|
max-height: 0
|
|
397
402
|
max-height: 0
|
|
398
403
|
|
|
399
|
-
.main-ui .context-panel
|
|
400
|
-
transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease
|
|
401
|
-
|
|
402
404
|
.main-ui.context-panel-from .context-panel
|
|
403
405
|
max-height: 0
|
|
404
406
|
height: 0
|
|
405
407
|
|
|
406
|
-
.main-ui.context-panel-leave
|
|
407
|
-
|
|
408
|
-
|
|
408
|
+
.main-ui.context-panel-leave
|
|
409
|
+
.context-stack
|
|
410
|
+
.context-panel-holder
|
|
411
|
+
flex: 0
|
|
412
|
+
.spacer
|
|
413
|
+
flex: 1
|
|
409
414
|
|
|
410
415
|
// Shift UI around to center elements if we're in the global view
|
|
411
416
|
@media only screen and (min-width: 768px)
|
package/src/map-view/index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import hyper from "@macrostrat/hyper";
|
|
2
2
|
import {
|
|
3
3
|
useMapRef,
|
|
4
|
-
useMapStatus,
|
|
5
4
|
useMapDispatch,
|
|
5
|
+
useMapPosition,
|
|
6
6
|
} from "@macrostrat/mapbox-react";
|
|
7
7
|
import {
|
|
8
8
|
mapViewInfo,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "@macrostrat/mapbox-utils";
|
|
12
12
|
import classNames from "classnames";
|
|
13
13
|
import mapboxgl from "mapbox-gl";
|
|
14
|
-
import { useEffect, useRef } from "react";
|
|
14
|
+
import { useEffect, useRef, useCallback } from "react";
|
|
15
15
|
import styles from "./main.module.sass";
|
|
16
16
|
import rootStyles from "../main.module.sass";
|
|
17
17
|
import { enable3DTerrain } from "./terrain";
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
MapPaddingManager,
|
|
22
22
|
MapResizeManager,
|
|
23
23
|
} from "../helpers";
|
|
24
|
+
import "mapbox-gl/dist/mapbox-gl.css";
|
|
24
25
|
|
|
25
26
|
const h = hyper.styled({ ...styles, ...rootStyles });
|
|
26
27
|
|
|
@@ -36,9 +37,16 @@ export interface MapViewProps extends MapboxCoreOptions {
|
|
|
36
37
|
//style: mapboxgl.Style | string;
|
|
37
38
|
//transformRequest?: mapboxgl.TransformRequestFunction;
|
|
38
39
|
mapPosition?: MapPosition;
|
|
40
|
+
onMapLoad?: (map: mapboxgl.Map) => void;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
export interface MapboxOptionsExt extends MapboxCoreOptions {
|
|
44
|
+
mapPosition?: MapPosition;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function defaultInitializeMap(container, args: MapboxOptionsExt = {}) {
|
|
48
|
+
const { mapPosition, ...rest } = args;
|
|
49
|
+
|
|
42
50
|
const map = new mapboxgl.Map({
|
|
43
51
|
container,
|
|
44
52
|
maxZoom: 18,
|
|
@@ -47,9 +55,14 @@ function initializeMap(container, args: MapboxCoreOptions = {}) {
|
|
|
47
55
|
trackResize: true,
|
|
48
56
|
antialias: true,
|
|
49
57
|
optimizeForTerrain: true,
|
|
50
|
-
...
|
|
58
|
+
...rest,
|
|
51
59
|
});
|
|
52
60
|
|
|
61
|
+
// set initial map position
|
|
62
|
+
if (mapPosition != null) {
|
|
63
|
+
setMapPosition(map, mapPosition);
|
|
64
|
+
}
|
|
65
|
+
|
|
53
66
|
//setMapPosition(map, mapPosition);
|
|
54
67
|
return map;
|
|
55
68
|
}
|
|
@@ -67,12 +80,16 @@ export function MapView(props: MapViewProps) {
|
|
|
67
80
|
const {
|
|
68
81
|
enableTerrain = true,
|
|
69
82
|
style,
|
|
70
|
-
transformRequest,
|
|
71
83
|
mapPosition = defaultMapPosition,
|
|
84
|
+
initializeMap = defaultInitializeMap,
|
|
72
85
|
children,
|
|
73
86
|
accessToken,
|
|
74
87
|
infoMarkerPosition,
|
|
88
|
+
transformRequest,
|
|
75
89
|
projection,
|
|
90
|
+
onMapLoaded = null,
|
|
91
|
+
onStyleLoaded = null,
|
|
92
|
+
...rest
|
|
76
93
|
} = props;
|
|
77
94
|
if (enableTerrain) {
|
|
78
95
|
terrainSourceID ??= "mapbox-3d-dem";
|
|
@@ -90,35 +107,40 @@ export function MapView(props: MapViewProps) {
|
|
|
90
107
|
// Keep track of map position for reloads
|
|
91
108
|
|
|
92
109
|
useEffect(() => {
|
|
93
|
-
if (style == null
|
|
94
|
-
if (mapRef
|
|
95
|
-
|
|
110
|
+
if (style == null) return;
|
|
111
|
+
if (mapRef.current != null) {
|
|
112
|
+
console.log("Setting style", style);
|
|
113
|
+
mapRef.current.setStyle(style);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
96
116
|
const map = initializeMap(ref.current, {
|
|
97
117
|
style,
|
|
98
|
-
transformRequest,
|
|
99
118
|
projection,
|
|
119
|
+
mapPosition,
|
|
120
|
+
...rest,
|
|
121
|
+
});
|
|
122
|
+
map.on("style.load", () => {
|
|
123
|
+
onStyleLoaded?.(map);
|
|
124
|
+
dispatch({ type: "set-style-loaded", payload: true });
|
|
100
125
|
});
|
|
126
|
+
onMapLoaded?.(map);
|
|
101
127
|
dispatch({ type: "set-map", payload: map });
|
|
102
|
-
|
|
103
|
-
return () => {
|
|
104
|
-
map.remove();
|
|
105
|
-
dispatch({ type: "set-map", payload: null });
|
|
106
|
-
};
|
|
107
|
-
}, [transformRequest, dispatch, style]);
|
|
128
|
+
}, [style]);
|
|
108
129
|
|
|
109
130
|
// Map style updating
|
|
110
|
-
useEffect(() => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}, [mapRef.current, style]);
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
131
|
+
// useEffect(() => {
|
|
132
|
+
// if (mapRef?.current == null || style == null) return;
|
|
133
|
+
// mapRef?.current?.setStyle(style);
|
|
134
|
+
// }, [mapRef.current, style]);
|
|
135
|
+
|
|
136
|
+
// Set map position if it changes
|
|
137
|
+
// useEffect(() => {
|
|
138
|
+
// const map = mapRef.current;
|
|
139
|
+
// if (map == null || mapPosition == null) return;
|
|
140
|
+
// setMapPosition(map, mapPosition);
|
|
141
|
+
// }, [mapPosition]);
|
|
142
|
+
|
|
143
|
+
const _computedMapPosition = useMapPosition();
|
|
122
144
|
const { mapUse3D, mapIsRotated } = mapViewInfo(_computedMapPosition);
|
|
123
145
|
|
|
124
146
|
// Get map projection
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
position: relative
|
|
4
4
|
overflow: hidden
|
|
5
5
|
|
|
6
|
+
.mapbox-map
|
|
7
|
+
position: absolute
|
|
8
|
+
top: 0
|
|
9
|
+
bottom: 0
|
|
10
|
+
left: 0
|
|
11
|
+
right: 0
|
|
12
|
+
|
|
6
13
|
/* Desktop styling is necessarily much more complicated than mobile
|
|
7
14
|
to handle a two-column layout. */
|
|
8
15
|
@media screen and (min-width: 768px)
|
package/dist/module.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAAA;;;;;;;AAKE;;;;;AAGA;;;;;;;;;;AAQE;;;;;AAGA;;;;AAEE;;;;AAGN;;;;;;AAOA;EACE;;;;;;;AChCF;;;;AAEE;;;;AAGF;;;;;;;;;AAOE;;;;AAEA;;;;AAGA;;;;AAGF;;;;AAEE;;;;;AAIF;;;;;;;;;;AAQE;;;;AAIE;;;;;AAIJ;;;;;;;;AAQA;EACE;;;;;ACnDF;;;;AAIA;;;;;AAKA;;;;;AAKA;;;;ACbE;;;;AAGF;;;;;;AAIE;;;;;;AAIA;;;;ACTF;;;;;;;;;;AASE;;;;;;AAIE;;;;;;AASF;;;;AAIF;;;;AAGA;;;;;AAIA;;;;;;;;;AAQA;;;;AAGA;;;;;;AAKE;;;;AAGE;;;;;AAIJ;;;;;;AAIE;;;;AAGF;;;;;;;AAMA;;;;;;;AAQE;;;;AAGF;;;;AAGA;;;;;;;;ACtFA;;;;;;;;;;AASA;;;;AAGA;;;;;;;;;AAOE;;;;;;;;AAOE;;;;;AAGA;;;;;AC7BJ;;;;;;;;AAME;;;;;;AAOA;;;;AAGE;;;;AAGF;;;;AAEA;;;;AAEA;;;;AAKE;;;;AAEF;;;;A;;;;;;;;;;A;;;;;AAcA;;;;AAGE;;;;AAEJ;;;;;;AAIE;;;;A;;;;A;;;;A;;;;;A;;;;AAeA;;;;AAGA;;;;;AAGF;;;;;;AAIE;;;;A;;;;AAKA;;;;;;;A;;;;;;;AASF;;;;AAIE;;;;;;AAIA;;;;;AAIA;;;;A;;;;;;;AASA;;;;;;AAIF;;;;;AAGA;;;;AAIE;;;;;;AAIA;;;;A;;;;AAKA;;;;;A;;;;AAQA;;;;AAGA;;;;;AAIE;;;;;AAGF;;;;AAGA;;;;A;;;;AAKA;;;;AAEF;;;;A;;;;AAKE;;;;AAEF;;;;A;;;;AAKE;;;;AAEF;;;;A;;;;A;;;;AAOE;;;;AAEF;;;;;AAGA;;;;;;;;A;;;;A;;;;;;;AAYA;;;;A;;;;;;;;AASA;;;;;;;;;AAQE;;;;AAIA;;;;;;A;;;;;;AAUA;EACA;;;;;;E;;;;;;EASA;;;;EAGA;;;;E;;;;EAGF;;;;;;EAOE;;;;;AAGF;EAGE;;;;;;EAIA;;;;EAGA;;;;EAGE;;;;EAEJ;;;;;;;;E;;;;;EAWI;;;;;EAKF;;;;EAGA;;;;;;;EAME;;;;;E;;;;;EASA;;;;EAGA;;;;EAGI;;;;;A;;;;AAOJ;;;;AAGA;;;;AAGE;;;;AAGJ;;;;AAGE;;;;AAGA;;;;AAGA;;;;AAGA;E;;;;EAIA;;;;;EAGF;;;;;EAKA;;;;E;;;;;E;;;;;;AAWF;EACE;;;;EAEF;;;;E;;;;;AC7WA;;;;;;AAOA;EAIE;;;;;ACXF;;;;;A;;;;;A;;;;;A;;;;A;;;;A;;;;AAgBE;;;;;;;AAKE;;;;;AAGF;;;;;;;;AAMA;;;;A;;;;;;;AAOA;;;;AAGA;;;;AAEE;;;;;AAGF;;;;;;A;;;;;AASE;;;;ACrDJ;;;;;;;;;;;;;;AAYE;;;;;;AAIA;;;;AAEA;;;;A;;;;;;A;;;;;AAgBA;;;;AAGI;;;;;AAGF;;;;;AAIA;;;;AAEE;;;;;;;;;AAOA;;;;AAIJ;;;;A;;;;A;;;;A;;;;A;;;;;A;;;;AAcE;;;;;A;;;;AAKF;;;;;AAIA;;;;AAGA;;;;;;;;A;;;;;;;AAaA;;;;AAEF;;;;AAGE;;;;A;;;;A;;;;AAQE;;;;;;;;;;;AASE;;;;;;;;AAOJ;;;;AAGA","sources":["packages/map-interface/src/context-panel/main.module.sass","packages/map-interface/src/location-panel/main.module.sass","packages/ui-components/src/util/main.module.scss","packages/ui-components/src/form-controls/main.module.sass","packages/ui-components/src/modal-panel/main.module.sass","packages/ui-components/src/page-layouts/main.module.sass","packages/map-interface/src/main.module.sass","packages/map-interface/src/map-view/main.module.sass","packages/map-interface/src/dev/main.module.sass","packages/map-interface/src/expansion-panel/main.module.sass"],"sourcesContent":[".searchbar-holder\n transition: margin 300ms\n display: flex\n flex-direction: column\n margin: 0\n .navbar-holder\n display: flex\n flex-direction: row\n .searchbar\n width: 100%\n background-color: var(--panel-background-color)\n border-radius: 3px\n padding: 0 5px\n display: flex\n flex-direction: row\n align-items: center\n :global(.bp4-input-group)\n flex-grow: 1\n cursor: text\n &>*\n margin-right: 5px\n &:last-child\n margin-right: 0\n\n.status-tongue\n background-color: var(--panel-background-color)\n margin: 5px\n margin-top: -12px\n padding: 0\n padding-top: 12px\n\n@media screen and (max-width: 768px)\n .status-tongue\n max-width: 100vw\n margin: 0\n border-radius: 0\n margin-top: -3px\n",".copy-link-button:global(.bp4-minimal.bp4-button)\n color: var(--text-subtle-color)\n svg\n fill: var(--text-subtle-color)\n\n.location-panel-header\n padding: 5px\n display: flex\n flex-direction: row\n align-items: center\n gap: 1em\n border-bottom: 1px solid var(--panel-rule-color)\n .spacer\n flex-grow: 1\n .left-icon\n padding: 7px\n\n .position-controls :global(.bp4-button)\n font-size: 12px !important\n\n.infodrawer-header-item\n font-size: 12px\n :global(.secondary)\n font-size: 0.9em\n color: var(--text-subtle-color)\n\n.infodrawer\n pointer-events: all\n max-height: 100%\n max-width: 100%\n height: fit-content\n display: flex\n flex-direction: column\n overflow: hidden\n &:global(.bp4-card)\n padding: 0\n\n &.loading\n .infodrawer-body\n overflow-y: hidden\n min-height: 70px\n\n.infodrawer-body\n flex-shrink: 1\n min-height: 0\n transition: min-height 0.5s ease\n overflow-y: scroll\n position: relative\n\n// TODO: remove this when we have a better way to handle card media queries\n@media screen and (max-width: 768px)\n .infodrawer\n border-radius: var(--panel-border-radius, 0px)\n",".json-view-container.root-hidden {\n padding-left: 0.8em;\n}\n\n.flex-row {\n display: flex;\n flex-direction: row;\n}\n\n.flex-col {\n display: flex;\n flex-direction: column;\n}\n\n.flex-spacer {\n flex: 1;\n}\n",".mui-slider-disabled\n .bp4-slider-handle\n display: none\n\n.nullable-slider\n display: flex\n flex-direction: row\n align-items: center\n .bp4-slider\n flex-grow: 1\n margin-right: 1em\n margin-left: 1em\n .controls\n margin-top: -22px\n","\n$c1: rgb(16, 22, 26)\n\n.panel-header\n background-color: var(--panel-secondary-background-color, #eee)\n display: flex\n flex-direction: row\n justify-content: space-between\n align-items: center\n padding: 0.2em 0.6em\n border-bottom: 1px solid var(--panel-rule-color, #ddd)\n\n h1\n margin-bottom: 0.2em\n margin-top: 0.2em\n font-size: var(--panel-header-font-size, 1.2em)\n &.overflow-hidden\n white-space: nowrap\n overflow: hidden\n text-overflow: ellipsis\n\n // \\:global(.bp4-button)\n // align-self: center\n\n:global(.bp4-dark)\n .panel, .content-panel\n $c2: rgb(255, 255, 255)\n box-shadow: 0 0 0 1px rgba($c2, 0.2), 0 0 0 rgba($c2, 0), 0 1px 1px rgba($c2, 0.4)\n\n.expander\n flex-grow: 1\n\n.panel-column\n flex-grow: 1\n position: relative\n\n.panel,.content-panel\n overflow: hidden\n box-shadow: 0 0 0 1px rgba($c1, 0.2), 0 0 0 rgba($c1, 0), 0 1px 1px rgba($c1, 0.4)\n border-radius: 6px\n background-color: var(--panel-background-color, #fff)\n display: flex\n flex-direction: column\n\n.content-panel\n padding: 0.5em\n\n.panel\n flex-shrink: 1\n height: 100%\n max-height: 100vh\n\n &.minimal\n border-radius: 0\n //box-shadow: none\n .panel-content\n padding: 0\n border-radius: 0\n\n.panel-content\n overflow-y: scroll\n padding: 1em\n flex: 1\n &>:last-child\n margin-bottom: 1em\n\n.panel-outer\n display: flex\n flex-direction: column\n position: relative\n max-height: 100%\n\n.panel-container-inner\n position: absolute\n top: 2em\n bottom: 2em\n left: 1em\n right: 1em\n display: flex\n flex-direction: column\n .expander\n flex: 1\n\n.extra-space\n width: 1em\n\n.panel-container\n position: sticky\n height: 100vh\n top: 0\n display: flex\n flex-direction: column\n",".user-interface\n position: absolute\n width: 100%\n height: 100%\n top: 0\n display: flex\n flex-direction: column\n overflow: hidden\n\n.spacer\n width: 1em\n\n.three-column\n display: flex\n flex: 1\n flex-direction: row\n position: relative\n height: 100%\n overflow: hidden\n &>div\n min-width: 50px\n height: 100%\n //max-width: 50%\n position: relative\n overflow-y: scroll\n flex-shrink: 1\n &.main-column\n flex-grow: 1\n max-width: 100%\n &.context-column.expanded\n flex-grow: 2\n max-width: 100%",".map-page\n display: flex\n flex-direction: column\n position: relative\n width: 100%\n height: 100%\n &.fit-viewport\n height: 100vh\n width: 100vw\n /* mobile viewport bug fix */\n max-height: -webkit-fill-available\n\n // Compass display\n .compass-control\n display: none\n &.map-is-rotated\n .compass-control\n display: block\n\n .map-3d-control\n display: none\n &.map-3d-available .map-3d-control\n display: block\n &.map-is-rotated.map-3d-available .map-3d-control\n display: none\n\n .globe-control\n display: none\n svg\n color: var(--secondary-color)\n &.map-is-global .globe-control\n display: block\n\n.main-ui\n flex: 1\n position: relative\n display: flex\n flex-direction: column\n max-height: 100%\n height: 100%\n box-shadow: 0 0 10px 4px var(--card-shadow-color)\n\n.panel-card\n padding: 10px\n background-color: var(--panel-background-color)\n\n & >:last-child\n margin-bottom: 0\n\n:global(.bp4-dark) .panel-card\n background-color: var(--panel-background-color)\n\n.context-stack\n display: flex\n flex-direction: column\n max-height: 100%\n\n &>div\n flex-shrink: 1\n\n &>.searchbar\n flex: 0\n\n.context-stack,\n.detail-stack\n z-index: 100\n\n.panel-container\n display: flex\n flex-direction: column\n\n &>div\n pointer-events: all\n\n.panel-title\n font-size: 16px\n\n.spacer\n flex-grow: 1\n pointer-events: none\n\n.map-view-container\n flex-grow: 1\n position: relative\n overflow: hidden\n\n.searchbar-holder\n margin-bottom: 0.5em\n\n.right-panel\n width: 24em\n\n.buttons\n display: flex\n flex-direction: row\n flex: 1\n min-width: 0\n\n.tab-button\n flex-shrink: 1\n min-width: 40px\n overflow: hidden\n text-align: right\n\n & :global(.bp4-button-text)\n transition: all 0.2s\n transition-delay: 0.1s\n\n .menu-card.narrow-card .panel-header:not(.minimal) &:global(.bp4-active) ~ & :global(.bp4-button-text)\n width: 0\n opacity: 0\n margin-left: -7px\n\n .context-panel-leave .menu-card .panel-header & :global(.bp4-button-text)\n opacity: 0\n width: 0\n\n.narrow-card.narrow-enter .panel-header .buttons\n margin-right: -500px\n\n.panel-header.minimal .tab-button:not(:hover):not(:global(.bp4-active))\n padding-left: 0\n padding-right: 0\n min-width: 30px\n width: 30px\n\n.panel-header.minimal .tab-button:not(:hover) :global(.bp4-button-text)\n width: 0\n opacity: 0\n margin-left: -7px\n\n.menu-group\n margin-bottom: 0.5em\n margin-top: 0.2em\n\n.menu-card :global .bp4-text ul,\n.menu-card :global .text-panel ul\n padding-left: 1em\n\n.menu-content\n display: flex\n flex-direction: column\n margin-bottom: -8px\n\n & .bp4-button-group\n margin-bottom: 4px\n\n & hr\n width: 100%\n\n:global #map\n position: absolute\n top: 0\n bottom: 0\n left: 0\n right: 0\n\n:global #map .mapbox-compass,\n:global #map .mapbox-3d\n display: none\n\n:global .mapboxgl-ctrl.mapbox-3d.mapbox-control\n width: unset\n\n:global .mapboxgl-ctrl.mapbox-3d.mapbox-control button\n width: unset\n padding-inline: 4px\n\n:global .mapboxgl-canvas-container\n width: 100%\n height: 100%\n\n:global .mapboxgl-ctrl.mapboxgl-ctrl-attrib\n background-color: var(--translucent-panel-background-color) !important\n\n:global .mapboxgl-ctrl.mapboxgl-ctrl-attrib a\n color: var(--text-color)\n\n:global .mapboxgl-marker svg path\n fill: var(--panel-background-color) !important\n\n:global .mapboxgl-marker svg circle\n fill: var(--secondary-color) !important\n\n:global .mapbox-control.mapbox-zoom\n background: var(--translucent-panel-background-inner)\n\n:global .mapbox-control.mapbox-zoom svg\n fill: var(--text-color) !important\n\n:global .mapboxgl-ctrl-logo\n transform: scale(0.9) translate(-8px, 2px)\n\n:global .bp4-dark .mapboxgl-ctrl-logo\n filter: invert(100%)\n\n:global .mapboxgl-ctrl-group button + button\n border-top: 1px solid var(--panel-rule-color) !important\n\n:global .bp4-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon\n filter: invert(40%)\n\n:global .bp4-dark .mapboxgl-ctrl-group .mapboxgl-ctrl-icon:hover\n filter: invert(50%)\n\n:global .mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon\n filter: invert(40%)\n\n:global .mapboxgl-ctrl-geolocate .mapboxgl-ctrl-icon:hover\n filter: invert(50%)\n\n.detail-stack\n position: relative\n\n.main-ui.detail-panel-open .zoom-control\n opacity: 0\n display: none\n\n.zoom-control\n transition: opacity 1s ease-in-out\n width: 30px\n position: absolute\n top: 0\n right: 0\n\n.main-ui.searching .map-view-container\n pointer-events: none\n\n.map-controls\n display: flex\n flex-direction: row\n justify-content: right\n margin-bottom: 0\n\n &>*\n margin-left: 0.5em\n\n.map-controls :global(.mapbox-control),\n.map-controls :global(.map-control-wrapper),\n.map-controls .map-control\n min-width: 22px\n min-height: 22px\n border-radius: 4px\n background-color: var(--panel-background-color)\n box-shadow: 0 0 0 1px var(--card-shadow-color)\n\n.map-controls :global(.mapbox-control) button,\n.map-controls :global(.map-control-wrapper) button,\n.map-controls .map-control button\n width: 22px\n height: 22px\n background-position: center center\n padding: 0\n background-color: var(--panel-background-color)\n color: var(--text-color)\n\n.map-controls :global(.mapbox-control) button:hover,\n.map-controls :global(.map-control-wrapper) button:hover,\n.map-controls .map-control button:hover\n background-color: var(--panel-background-color) !important\n\n.map-controls .map-scale-control\n background: none\n box-shadow: none\n padding-top: 8px\n\n :global(.mapboxgl-ctrl-scale)\n background-color: var(--translucent-panel-background-color)\n border-color: var(--secondary-text-color)\n color: var(--secondary-text-color)\n\n/* For mobile phones, we want to make the most of screen space,\n which in some cases means adding complications to the basic page. */\n@media only screen and (max-width: 768px)\n .main-ui.detail-panel-enter .context-stack\n height: 0\n visibility: hidden\n transition: height 0.5s ease-in-out\n\n .detail-stack\n height: fit-content\n position: inherit\n max-height: 70%\n\n .infodrawer-stack\n max-height: 70%\n\n :global(.exit-active)\n max-height: 0\n\n :global(.mapbox-control.mapbox-zoom)\n display: none\n\n .map-controls\n position: absolute\n top: -60px\n right: 10px\n\n .detail-panel\n border-radius: 0px\n\n/* Desktop styling is necessarily much more complicated than mobile\n to handle a two-column layout. */\n@media screen and (min-width: 768px)\n .main-ui\n flex-direction: row\n padding: 1em 1em 2em\n min-height: 80px\n &>*\n margin-right: 0.5em\n &>*:last-child\n margin-right: 0\n\n &.searching .context-stack\n width: 24em\n\n .context-stack\n max-width: 34em\n min-width: 14em\n width: 16em\n transition: width 300ms ease\n padding-bottom: 0.5em\n\n &.panel-open\n width: 34em\n margin-right: 0.5em\n\n .context-stack.layers,\n .context-stack.settings\n width: 18em\n margin-right: 0.5em\n\n .main-ui.detail-panel-open .detail-stack\n width: 30em\n\n .detail-stack\n width: 30em\n pointer-events: none\n display: flex\n flex-direction: column\n\n .context-stack,\n .detail-stack\n pointer-events: none\n z-index: 100\n\n .context-stack>div,\n .detail-stack>div\n pointer-events: all\n margin-bottom: 0.5em\n\n .context-stack>div:last-child,\n .detail-stack>div:last-child\n margin-bottom: 0\n\n .context-stack>div.spacer,\n .detail-stack>div.spacer\n pointer-events: none\n\n .map-view-container\n position: unset\n\n.main-ui .detail-panel\n transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease\n\n.main-ui.detail-panel-from .detail-panel\n opacity: 0\n\n.main-ui.detail-panel-enter .detail-panel\n opacity: 1\n\n.main-ui.detail-panel-leave .detail-panel\n opacity: 0\n\n.main-ui .context-panel\n transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease\n\n.main-ui.context-panel-from .context-panel\n opacity: 0\n\n.main-ui.context-panel-enter .context-panel\n opacity: 1\n\n.main-ui.context-panel-leave .context-panel\n opacity: 0\n\n@media only screen and (max-width: 768px)\n .main-ui .detail-stack\n transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease\n\n .main-ui.detail-panel-from .detail-stack\n max-height: 0\n height: 0\n\n .main-ui.detail-panel-leave .detail-stack\n max-height: 0\n max-height: 0\n\n .main-ui .context-panel\n transition: opacity 0.8s ease, height 0.8s ease, max-height 0.8s ease\n\n .main-ui.context-panel-from .context-panel\n max-height: 0\n height: 0\n\n .main-ui.context-panel-leave .context-panel\n max-height: 0\n max-height: 0\n\n// Shift UI around to center elements if we're in the global view \n@media only screen and (min-width: 768px)\n .map-page .main-ui.detail-panel-leave .map-view-container\n margin-right: -14em\n\n .map-page.map-is-global .main-ui.detail-panel-leave .map-view-container\n margin-right: -30em\n\n .map-page.map-is-global .main-ui.context-panel-leave .map-view-container\n margin-left: -16em\n",".map-view-container\n flex-grow: 1\n position: relative\n overflow: hidden\n\n/* Desktop styling is necessarily much more complicated than mobile\n to handle a two-column layout. */\n@media screen and (min-width: 768px)\n /* Make map fill page rather than containing div,\n by unsetting map position */\n // We should move this to another file.\n .map-view-container\n position: unset\n",".feature-panel\n position: relative\n overflow-x: hidden\n\n.key-value\n display: inline-block\n margin-right: 1em\n .key\n font-weight: bold\n font-size: 0.9em\n &:after\n content: ': '\n .value\n font-size: 0.9em\n\n.feature-properties\n position: relative\n &:before\n content: \"–\"\n position: absolute\n top: 4px\n left: 0\n\n.feature-header h3\n margin-bottom: 0\n margin-top: 0.5em\n\n.feature-group\n border-bottom: 1px solid var(--panel-rule-inner)\n padding: 0 1em\n margin-left: -1em\n margin-right: -1em\n margin-bottom: 0.5em\n &:last-child\n border-bottom: none\n\n.tile-info\n display: flex\n flex-direction: row\n align-items: baseline\n padding: 0 1em\n h3\n margin-right: 0.5em\n\n.opacity-slider\n margin: 0 1em 0.5em\n :global\n .bp4-slider-handle .bp4-slider-label\n background-color: var(--secondary-color)\n color: var(--text-color)\n\n.unit-number\n .unit\n font-size: 0.9em\n margin-left: 0.2em\n font-weight: bold\n\n.page\n margin: 2em auto\n max-width: 50em\n\n.dev-index-page\n overflow-y: scroll\n","\n.panel-subhead\n padding: 0.2em var(--box-horizontal-padding)\n border-top: 1px solid var(--accent-border-color)\n border-bottom: 1px solid var(--accent-border-color)\n background-color: var(--accent-color)\n display: flex\n flex-direction: row\n align-items: center\n z-index: 1\n gap: var(--box-horizontal-padding)\n top: 0px\n position: sticky\n h1, h2, h3, h4\n font-family: Montserrat,sans-serif\n font-weight: 700\n margin: 0.2em 0\n h4\n font-weight: 600\n .title\n flex-grow: 1\n\n// :global(.bp4-dark) .panel-subhead\n// margin 0 1px\n\n.expansion-panel\n padding: 0\n flex-wrap: wrap\n margin-top: -1px\n // &.collapsed\n // .expansion-panel-header\n // border-bottom-width: 0;\n\n.sub-expansion-panel\n margin: -1px calc(var(--panel-padding-h) * -0.5) 0\n overflow: hidden\n &:first-child\n .expansion-panel-header\n border-top-width: 0\n .panel-subhead\n border-top: none\n border-bottom: none\n\n .expansion-panel-header\n background-color: var(--accent-secondary-color)\n cursor: pointer\n &:hover\n background-color: var(--accent-secondary-hover-color)\n h2, h3, h4\n font-weight: 500\n border-bottom: 1px solid var(--tertiary-border-color)\n border-top: 1px solid var(--tertiary-border-color)\n margin-top: -1px\n padding: 5px 1em 5px\n align-items: center\n\n.expansion-summary-title-help\n margin-left: 5px\n :global(.bp4-icon)\n margin-left: 5px\n\n.expansion-panel-header\n cursor: pointer\n &:hover\n background-color: var(--accent-hover-color)\n :global(.bp4-icon)\n transform: translate(0,3px)\n\n.expansion-children\n padding: 5px 1em 10px\n .expansion-panel\n margin-left: -1em\n margin-right: -1em\n &:first-child\n margin-top: -5px\n\n.expansion-panel-subtext\n font-size: 85%\n font-weight: 400\n\n:global\n .expansion-panel-root\n padding-left: 15px !important\n\n .expansion-panel-detail\n display: block !important\n padding: 0 !important\n\n .expansion-panel-detail-sub\n display: block !important\n\n// New expandable panel for details\n.expandable-details-main\n display: flex\n flex-direction: row\n align-items: center\n justify-content: space-between\n margin: 3px 0\n\n.expandable-details-header\n display: inline-flex\n flex-direction: row\n align-items: baseline\n flex-grow: 1\n\n.expandable-details-children\n position: relative\n\n.expandable-details-toggle\n :global(.bp4-button)\n font-size: 10px\n\n.expandable-details\n &.macrostrat-unit\n .title:after\n content: none\n .title\n margin-right: 1em\n &:after\n content: \":\"\n\n.expansion-body\n display: inline-block\n //flex-direction row\n align-items: baseline\n background-color: var(--tertiary-background)\n padding: 2px 6px\n border-radius: 4px\n width: 100%\n box-shadow: 0px 1px 2px 1px rgba(0,0,0,0.2)\n margin-bottom: 6px\n\n.expansion-panel-detail-header\n font-size: 90%\n font-style: italic\n margin-right: 1em\n display: inline\n color: var(--secondary-color)\n &:after\n content: \":\"\n\n.expansion-panel-detail-body\n display: inline\n"],"names":[],"version":3,"file":"module.css.map"}
|