@macrostrat/column-views 3.8.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +125 -0
- package/dist/animated-age-window.cjs +51 -0
- package/dist/animated-age-window.cjs.map +1 -0
- package/dist/animated-age-window.d.ts +51 -0
- package/dist/animated-age-window.js +51 -0
- package/dist/animated-age-window.js.map +1 -0
- package/dist/column.cjs +11 -1
- package/dist/column.cjs.map +1 -1
- package/dist/column.d.ts +11 -0
- package/dist/column.js +11 -1
- package/dist/column.js.map +1 -1
- package/dist/correlation-chart/main.cjs +24 -12
- package/dist/correlation-chart/main.cjs.map +1 -1
- package/dist/correlation-chart/main.d.ts +8 -1
- package/dist/correlation-chart/main.js +24 -12
- package/dist/correlation-chart/main.js.map +1 -1
- package/dist/data-provider/store.cjs +17 -4
- package/dist/data-provider/store.cjs.map +1 -1
- package/dist/data-provider/store.d.ts +6 -1
- package/dist/data-provider/store.js +17 -4
- package/dist/data-provider/store.js.map +1 -1
- package/dist/index.cjs +17 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -34
- package/dist/index.js.map +1 -1
- package/dist/prepare-units/composite-scale.cjs +94 -8
- package/dist/prepare-units/composite-scale.cjs.map +1 -1
- package/dist/prepare-units/composite-scale.d.ts +39 -0
- package/dist/prepare-units/composite-scale.js +96 -10
- package/dist/prepare-units/composite-scale.js.map +1 -1
- package/dist/prepare-units/helpers.cjs +0 -1
- package/dist/prepare-units/helpers.cjs.map +1 -1
- package/dist/prepare-units/helpers.js +0 -1
- package/dist/prepare-units/helpers.js.map +1 -1
- package/dist/prepare-units/index.cjs +33 -12
- package/dist/prepare-units/index.cjs.map +1 -1
- package/dist/prepare-units/index.js +34 -13
- package/dist/prepare-units/index.js.map +1 -1
- package/dist/prepare-units/types.cjs.map +1 -1
- package/dist/prepare-units/types.d.ts +13 -0
- package/dist/prepare-units/types.js.map +1 -1
- package/dist/section.cjs +4 -2
- package/dist/section.cjs.map +1 -1
- package/dist/section.d.ts +4 -1
- package/dist/section.js +4 -2
- package/dist/section.js.map +1 -1
- package/dist/units/boxes.cjs +22 -39
- package/dist/units/boxes.cjs.map +1 -1
- package/dist/units/boxes.js +24 -41
- package/dist/units/boxes.js.map +1 -1
- package/dist/units/composite.cjs +12 -12
- package/dist/units/composite.cjs.map +1 -1
- package/dist/units/composite.js +12 -12
- package/dist/units/composite.js.map +1 -1
- package/dist/units/index.cjs +7 -11
- package/dist/units/index.cjs.map +1 -1
- package/dist/units/index.d.ts +0 -1
- package/dist/units/index.js +4 -9
- package/dist/units/index.js.map +1 -1
- package/package.json +10 -31
- package/src/animated-age-window.ts +120 -0
- package/src/column.ts +24 -0
- package/src/correlation-chart/main.ts +30 -8
- package/src/data-provider/store.ts +21 -2
- package/src/index.ts +4 -1
- package/src/prepare-units/composite-scale.ts +210 -10
- package/src/prepare-units/helpers.ts +0 -2
- package/src/prepare-units/index.ts +68 -14
- package/src/prepare-units/types.ts +13 -0
- package/src/section.ts +6 -0
- package/src/units/boxes.ts +37 -56
- package/src/units/composite.ts +21 -12
- package/src/units/index.ts +9 -26
- package/dist/maps/column-correlation/core.cjs +0 -288
- package/dist/maps/column-correlation/core.cjs.map +0 -1
- package/dist/maps/column-correlation/core.d.ts +0 -9
- package/dist/maps/column-correlation/core.js +0 -286
- package/dist/maps/column-correlation/core.js.map +0 -1
- package/dist/maps/column-correlation/index.d.ts +0 -2
- package/dist/maps/column-correlation/state.cjs +0 -193
- package/dist/maps/column-correlation/state.cjs.map +0 -1
- package/dist/maps/column-correlation/state.d.ts +0 -62
- package/dist/maps/column-correlation/state.js +0 -190
- package/dist/maps/column-correlation/state.js.map +0 -1
- package/dist/maps/column-navigation/index.d.ts +0 -2
- package/dist/maps/column-navigation/mapbox/index.cjs +0 -215
- package/dist/maps/column-navigation/mapbox/index.cjs.map +0 -1
- package/dist/maps/column-navigation/mapbox/index.d.ts +0 -38
- package/dist/maps/column-navigation/mapbox/index.js +0 -213
- package/dist/maps/column-navigation/mapbox/index.js.map +0 -1
- package/dist/maps/column-navigation/mapbox/keyboard-navigation.cjs +0 -105
- package/dist/maps/column-navigation/mapbox/keyboard-navigation.cjs.map +0 -1
- package/dist/maps/column-navigation/mapbox/keyboard-navigation.d.ts +0 -8
- package/dist/maps/column-navigation/mapbox/keyboard-navigation.js +0 -105
- package/dist/maps/column-navigation/mapbox/keyboard-navigation.js.map +0 -1
- package/dist/maps/column-navigation/mapbox/state.cjs +0 -73
- package/dist/maps/column-navigation/mapbox/state.cjs.map +0 -1
- package/dist/maps/column-navigation/mapbox/state.d.ts +0 -23
- package/dist/maps/column-navigation/mapbox/state.js +0 -71
- package/dist/maps/column-navigation/mapbox/state.js.map +0 -1
- package/dist/maps/column-navigation/svg/animated.d.ts +0 -1
- package/dist/maps/column-navigation/svg/data-fetcher.cjs +0 -25
- package/dist/maps/column-navigation/svg/data-fetcher.cjs.map +0 -1
- package/dist/maps/column-navigation/svg/data-fetcher.d.ts +0 -6
- package/dist/maps/column-navigation/svg/data-fetcher.js +0 -25
- package/dist/maps/column-navigation/svg/data-fetcher.js.map +0 -1
- package/dist/maps/column-navigation/svg/index.cjs +0 -94
- package/dist/maps/column-navigation/svg/index.cjs.map +0 -1
- package/dist/maps/column-navigation/svg/index.d.ts +0 -9
- package/dist/maps/column-navigation/svg/index.js +0 -93
- package/dist/maps/column-navigation/svg/index.js.map +0 -1
- package/dist/maps/column-navigation/svg/layers.cjs +0 -177
- package/dist/maps/column-navigation/svg/layers.cjs.map +0 -1
- package/dist/maps/column-navigation/svg/layers.d.ts +0 -54
- package/dist/maps/column-navigation/svg/layers.js +0 -174
- package/dist/maps/column-navigation/svg/layers.js.map +0 -1
- package/dist/maps/column-navigation/utils/keyboard-navigation.cjs +0 -50
- package/dist/maps/column-navigation/utils/keyboard-navigation.cjs.map +0 -1
- package/dist/maps/column-navigation/utils/keyboard-navigation.d.ts +0 -10
- package/dist/maps/column-navigation/utils/keyboard-navigation.js +0 -50
- package/dist/maps/column-navigation/utils/keyboard-navigation.js.map +0 -1
- package/dist/maps/index.d.ts +0 -4
- package/dist/maps/inset-map/index.cjs +0 -71
- package/dist/maps/inset-map/index.cjs.map +0 -1
- package/dist/maps/inset-map/index.d.ts +0 -16
- package/dist/maps/inset-map/index.js +0 -69
- package/dist/maps/inset-map/index.js.map +0 -1
- package/dist/maps/layers/columns.cjs +0 -165
- package/dist/maps/layers/columns.cjs.map +0 -1
- package/dist/maps/layers/columns.d.ts +0 -28
- package/dist/maps/layers/columns.js +0 -165
- package/dist/maps/layers/columns.js.map +0 -1
- package/dist/maps/layers/index.d.ts +0 -2
- package/dist/maps/layers/units.cjs +0 -207
- package/dist/maps/layers/units.cjs.map +0 -1
- package/dist/maps/layers/units.d.ts +0 -14
- package/dist/maps/layers/units.js +0 -204
- package/dist/maps/layers/units.js.map +0 -1
- package/dist/units/colors.cjs +0 -115
- package/dist/units/colors.cjs.map +0 -1
- package/dist/units/colors.d.ts +0 -20
- package/dist/units/colors.js +0 -113
- package/dist/units/colors.js.map +0 -1
- package/dist/units/resolvers.cjs +0 -125
- package/dist/units/resolvers.cjs.map +0 -1
- package/dist/units/resolvers.d.ts +0 -8
- package/dist/units/resolvers.js +0 -125
- package/dist/units/resolvers.js.map +0 -1
- package/src/maps/column-correlation/column-correlation-map.stories.ts +0 -108
- package/src/maps/column-correlation/core.ts +0 -342
- package/src/maps/column-correlation/index.ts +0 -2
- package/src/maps/column-correlation/state.ts +0 -315
- package/src/maps/column-navigation/index.ts +0 -2
- package/src/maps/column-navigation/mapbox/column-navigation-map.stories.ts +0 -278
- package/src/maps/column-navigation/mapbox/index.ts +0 -276
- package/src/maps/column-navigation/mapbox/keyboard-navigation.ts +0 -133
- package/src/maps/column-navigation/mapbox/state.ts +0 -119
- package/src/maps/column-navigation/svg/animated.ts +0 -78
- package/src/maps/column-navigation/svg/column-navigation-svg-map.stories.ts +0 -46
- package/src/maps/column-navigation/svg/data-fetcher.ts +0 -34
- package/src/maps/column-navigation/svg/index.ts +0 -96
- package/src/maps/column-navigation/svg/layers.ts +0 -233
- package/src/maps/column-navigation/utils/keyboard-navigation.ts +0 -58
- package/src/maps/index.ts +0 -4
- package/src/maps/inset-map/index.ts +0 -87
- package/src/maps/inset-map/inset-map.stories.ts +0 -20
- package/src/maps/layers/columns.ts +0 -216
- package/src/maps/layers/index.ts +0 -2
- package/src/maps/layers/units.ts +0 -286
- package/src/maps/unit-map.stories.ts +0 -79
- package/src/units/colors.ts +0 -183
- package/src/units/resolvers.ts +0 -141
package/src/units/index.ts
CHANGED
|
@@ -5,20 +5,21 @@ import {
|
|
|
5
5
|
} from "@macrostrat/column-components";
|
|
6
6
|
import { UnitNamesColumn } from "./names";
|
|
7
7
|
import { ICompositeUnitProps } from "./composite";
|
|
8
|
-
import { UnitBoxes
|
|
8
|
+
import { UnitBoxes } from "./boxes";
|
|
9
9
|
import { useColumnLayout } from "@macrostrat/column-components";
|
|
10
10
|
import { useInDarkMode } from "@macrostrat/ui-components";
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
getBestFGDCPatternForUnit,
|
|
13
|
+
getMixedUnitColor,
|
|
14
|
+
} from "@macrostrat/stratigraphy-utils";
|
|
12
15
|
import { TrackedLabeledUnit } from "./composite";
|
|
13
16
|
import { useEnvironments, useLithologies } from "@macrostrat/data-provider";
|
|
14
17
|
import { useMemo } from "react";
|
|
15
|
-
import { resolveID } from "./resolvers";
|
|
16
18
|
import { BaseUnit, Lithology } from "@macrostrat/api-types";
|
|
17
19
|
import { UnitWithLayoutParameters } from "../prepare-units/helpers.ts";
|
|
18
20
|
|
|
19
21
|
export * from "./composite";
|
|
20
22
|
export * from "./types";
|
|
21
|
-
export * from "./colors";
|
|
22
23
|
|
|
23
24
|
export function UnitsColumn({ width = 100 }) {
|
|
24
25
|
/*
|
|
@@ -80,11 +81,12 @@ export function UnitComponent<T extends BaseUnit>({
|
|
|
80
81
|
let reducedWidth = _nColumns;
|
|
81
82
|
if ("layout" in division) {
|
|
82
83
|
const layout = division.layout;
|
|
83
|
-
_nColumns =
|
|
84
|
+
_nColumns = layout.totalColumns;
|
|
84
85
|
columnIx = layout.column;
|
|
85
86
|
reducedWidth = width / layout.totalColumns / layout.nColumns;
|
|
86
87
|
x = (columnIx * width) / _nColumns;
|
|
87
88
|
}
|
|
89
|
+
|
|
88
90
|
return h(TrackedLabeledUnit, {
|
|
89
91
|
division,
|
|
90
92
|
...rest,
|
|
@@ -115,7 +117,7 @@ export function ColoredUnitComponent(props) {
|
|
|
115
117
|
const backgroundColor = useUnitColor(props.division);
|
|
116
118
|
|
|
117
119
|
const patternID = useMemo(() => {
|
|
118
|
-
return
|
|
120
|
+
return getBestFGDCPatternForUnit(props.division); // ?? getPatternID(props.division.lith, lithMap);
|
|
119
121
|
}, [props.division?.unit_id]);
|
|
120
122
|
|
|
121
123
|
const fill = useGeologicPattern(patternID);
|
|
@@ -157,7 +159,7 @@ export function EnvironmentColoredUnitComponent(props) {
|
|
|
157
159
|
const backgroundColor = useUnitColorByEnvironment(props.division);
|
|
158
160
|
|
|
159
161
|
const patternID = useMemo(() => {
|
|
160
|
-
return
|
|
162
|
+
return getBestFGDCPatternForUnit(props.division); // ?? getPatternID(props.division.lith, lithMap);
|
|
161
163
|
}, [props.division?.unit_id]);
|
|
162
164
|
|
|
163
165
|
const fill = useGeologicPattern(patternID);
|
|
@@ -168,22 +170,3 @@ export function EnvironmentColoredUnitComponent(props) {
|
|
|
168
170
|
...props,
|
|
169
171
|
});
|
|
170
172
|
}
|
|
171
|
-
|
|
172
|
-
function getPatternID(
|
|
173
|
-
liths: Array<Lithology>,
|
|
174
|
-
lithMap: Map<number, Lithology>,
|
|
175
|
-
): string | null {
|
|
176
|
-
if (lithMap == null || liths == null || liths.length == 0) {
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
const patternIDs = new Set<string>();
|
|
180
|
-
for (const lith of liths) {
|
|
181
|
-
const lithData = lithMap.get(lith.lith_id);
|
|
182
|
-
if (lithData) {
|
|
183
|
-
patternIDs.add(`${lithData.fill}`);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
let id = patternIDs.values()[0];
|
|
187
|
-
if (id == "0") return null;
|
|
188
|
-
return id;
|
|
189
|
-
}
|
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const mapboxReact = require("@macrostrat/mapbox-react");
|
|
4
|
-
const mapboxGl = require("mapbox-gl");
|
|
5
|
-
const h = require("@macrostrat/hyper");
|
|
6
|
-
const React = require("react");
|
|
7
|
-
const mapboxUtils = require("@macrostrat/mapbox-utils");
|
|
8
|
-
const state = require("./state.cjs");
|
|
9
|
-
const index = require("../inset-map/index.cjs");
|
|
10
|
-
const mapStyles = require("@macrostrat/map-styles");
|
|
11
|
-
const columns = require("../layers/columns.cjs");
|
|
12
|
-
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
13
|
-
const h__default = /* @__PURE__ */ _interopDefault(h);
|
|
14
|
-
function ColumnCorrelationMap(props) {
|
|
15
|
-
const { padding = 50, children, columnColor, projectID, ...rest } = props;
|
|
16
|
-
return h__default.default(
|
|
17
|
-
index.InsetMap,
|
|
18
|
-
{
|
|
19
|
-
...rest,
|
|
20
|
-
boxZoom: false,
|
|
21
|
-
dragRotate: false
|
|
22
|
-
},
|
|
23
|
-
[
|
|
24
|
-
h__default.default(ColumnsLayer, { color: columnColor }),
|
|
25
|
-
h__default.default(SelectedColumnsLayer),
|
|
26
|
-
h__default.default(MapClickHandler),
|
|
27
|
-
h__default.default(ColumnInteractionHandler),
|
|
28
|
-
h__default.default(HoveredColumnHighlight),
|
|
29
|
-
h__default.default(ColumnZoomer, { padding }),
|
|
30
|
-
h__default.default(SectionLine, { padding }),
|
|
31
|
-
children
|
|
32
|
-
]
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
function ColumnZoomer({ padding }) {
|
|
36
|
-
const zoomColumn = state.useCorrelationMapStore((state2) => state2.zoomColumn);
|
|
37
|
-
const zoomNonce = state.useCorrelationMapStore((state2) => state2.zoomNonce);
|
|
38
|
-
const columns2 = state.useCorrelationMapStore((state2) => state2.columns);
|
|
39
|
-
const bounds = React.useMemo(() => {
|
|
40
|
-
if (zoomColumn == null || columns2 == null) return null;
|
|
41
|
-
const col = columns2.find((c) => c.properties?.col_id === zoomColumn);
|
|
42
|
-
if (col?.geometry == null) return null;
|
|
43
|
-
const b = new mapboxGl.LngLatBounds();
|
|
44
|
-
forEachCoordinate(col.geometry, (coord) => b.extend(coord));
|
|
45
|
-
return b.isEmpty() ? null : b;
|
|
46
|
-
}, [zoomColumn, zoomNonce, columns2]);
|
|
47
|
-
mapboxReact.useMapEaseTo({ bounds, padding: padding * 2 });
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
function forEachCoordinate(geometry, fn) {
|
|
51
|
-
const walk = (coords) => {
|
|
52
|
-
if (typeof coords[0] === "number") {
|
|
53
|
-
fn(coords);
|
|
54
|
-
} else {
|
|
55
|
-
for (const c of coords) walk(c);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
if (geometry?.coordinates != null) walk(geometry.coordinates);
|
|
59
|
-
}
|
|
60
|
-
const columnLayers = ["columns-fill", "columns-points"];
|
|
61
|
-
function MapClickHandler() {
|
|
62
|
-
const onClickMap = state.useCorrelationMapStore((state2) => state2.onClickMap);
|
|
63
|
-
mapboxReact.useMapClickHandler(
|
|
64
|
-
(e) => {
|
|
65
|
-
onClickMap(e, { type: "Point", coordinates: e.lngLat.toArray() });
|
|
66
|
-
},
|
|
67
|
-
[onClickMap]
|
|
68
|
-
);
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
function ColumnInteractionHandler() {
|
|
72
|
-
const toggleColumn = state.useCorrelationMapStore((state2) => state2.toggleColumn);
|
|
73
|
-
const setHoveredColumn = state.useCorrelationMapStore(
|
|
74
|
-
(state2) => state2.setHoveredColumn
|
|
75
|
-
);
|
|
76
|
-
const isManual = state.useCorrelationMapStore(
|
|
77
|
-
(state2) => state2.selectionMode === "manual"
|
|
78
|
-
);
|
|
79
|
-
const hoveredRef = React.useRef(null);
|
|
80
|
-
mapboxReact.useMapStyleOperator(
|
|
81
|
-
(map) => {
|
|
82
|
-
if (!isManual) return;
|
|
83
|
-
const onClick = (e) => {
|
|
84
|
-
const colID = e.features?.[0]?.properties?.col_id;
|
|
85
|
-
if (colID != null) toggleColumn(colID);
|
|
86
|
-
};
|
|
87
|
-
map.on("click", columnLayers, onClick);
|
|
88
|
-
return () => map.off("click", columnLayers, onClick);
|
|
89
|
-
},
|
|
90
|
-
[isManual, toggleColumn]
|
|
91
|
-
);
|
|
92
|
-
mapboxReact.useMapStyleOperator(
|
|
93
|
-
(map) => {
|
|
94
|
-
const clearHover = () => {
|
|
95
|
-
if (hoveredRef.current != null) {
|
|
96
|
-
map.setFeatureState(
|
|
97
|
-
{ source: "columns", id: hoveredRef.current },
|
|
98
|
-
{ hover: false }
|
|
99
|
-
);
|
|
100
|
-
hoveredRef.current = null;
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const onMove = (e) => {
|
|
104
|
-
const f = e.features?.[0];
|
|
105
|
-
if (f == null) return;
|
|
106
|
-
if (hoveredRef.current !== f.id) {
|
|
107
|
-
clearHover();
|
|
108
|
-
map.setFeatureState({ source: "columns", id: f.id }, { hover: true });
|
|
109
|
-
hoveredRef.current = f.id;
|
|
110
|
-
}
|
|
111
|
-
setHoveredColumn(f.properties?.col_id ?? null);
|
|
112
|
-
map.getCanvas().style.cursor = "pointer";
|
|
113
|
-
};
|
|
114
|
-
const onLeave = () => {
|
|
115
|
-
clearHover();
|
|
116
|
-
setHoveredColumn(null);
|
|
117
|
-
map.getCanvas().style.cursor = "";
|
|
118
|
-
};
|
|
119
|
-
map.on("mousemove", columnLayers, onMove);
|
|
120
|
-
map.on("mouseleave", columnLayers, onLeave);
|
|
121
|
-
return () => {
|
|
122
|
-
map.off("mousemove", columnLayers, onMove);
|
|
123
|
-
map.off("mouseleave", columnLayers, onLeave);
|
|
124
|
-
clearHover();
|
|
125
|
-
};
|
|
126
|
-
},
|
|
127
|
-
[setHoveredColumn]
|
|
128
|
-
);
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
function HoveredColumnHighlight() {
|
|
132
|
-
const hoveredColumn = state.useCorrelationMapStore((state2) => state2.hoveredColumn);
|
|
133
|
-
const columns2 = state.useCorrelationMapStore((state2) => state2.columns);
|
|
134
|
-
const appliedRef = React.useRef(null);
|
|
135
|
-
mapboxReact.useMapStyleOperator(
|
|
136
|
-
(map) => {
|
|
137
|
-
if (appliedRef.current != null) {
|
|
138
|
-
map.setFeatureState(
|
|
139
|
-
{ source: "columns", id: appliedRef.current },
|
|
140
|
-
{ highlighted: false }
|
|
141
|
-
);
|
|
142
|
-
appliedRef.current = null;
|
|
143
|
-
}
|
|
144
|
-
if (hoveredColumn == null || columns2 == null) return;
|
|
145
|
-
const col = columns2.find((c) => c.properties?.col_id === hoveredColumn);
|
|
146
|
-
const id = col?.id ?? col?.properties?.col_id;
|
|
147
|
-
if (id == null) return;
|
|
148
|
-
map.setFeatureState({ source: "columns", id }, { highlighted: true });
|
|
149
|
-
appliedRef.current = id;
|
|
150
|
-
},
|
|
151
|
-
[hoveredColumn, columns2]
|
|
152
|
-
);
|
|
153
|
-
return null;
|
|
154
|
-
}
|
|
155
|
-
function SelectedColumnsLayer() {
|
|
156
|
-
mapboxReact.useOverlayStyle(() => selectedColumnsStyle, []);
|
|
157
|
-
const focusedColumns = state.useCorrelationMapStore(
|
|
158
|
-
(state2) => state2.focusedColumns
|
|
159
|
-
);
|
|
160
|
-
mapboxReact.useMapStyleOperator(
|
|
161
|
-
(map) => {
|
|
162
|
-
let features = focusedColumns;
|
|
163
|
-
const data = {
|
|
164
|
-
type: "FeatureCollection",
|
|
165
|
-
features
|
|
166
|
-
};
|
|
167
|
-
const columnCentroidLine = {
|
|
168
|
-
type: "Feature",
|
|
169
|
-
geometry: {
|
|
170
|
-
type: "LineString",
|
|
171
|
-
coordinates: features.map(
|
|
172
|
-
(col) => col.properties.centroid.geometry.coordinates
|
|
173
|
-
)
|
|
174
|
-
},
|
|
175
|
-
properties: {}
|
|
176
|
-
};
|
|
177
|
-
mapboxUtils.setGeoJSON(map, "selected-columns", data);
|
|
178
|
-
mapboxUtils.setGeoJSON(map, "selected-column-centroids", {
|
|
179
|
-
type: "FeatureCollection",
|
|
180
|
-
features: [columnCentroidLine]
|
|
181
|
-
});
|
|
182
|
-
},
|
|
183
|
-
[focusedColumns]
|
|
184
|
-
);
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
function ColumnsLayer({ enabled = true, color }) {
|
|
188
|
-
const columns$1 = state.useCorrelationMapStore((state2) => state2.columns);
|
|
189
|
-
return h__default.default(columns.BaseColumnsLayer, { enabled, color, columns: columns$1 });
|
|
190
|
-
}
|
|
191
|
-
const selectedColumnsStyle = {
|
|
192
|
-
version: 8,
|
|
193
|
-
sources: {
|
|
194
|
-
"selected-columns": mapboxUtils.buildGeoJSONSource(),
|
|
195
|
-
"selected-column-centroids": mapboxUtils.buildGeoJSONSource()
|
|
196
|
-
},
|
|
197
|
-
layers: [
|
|
198
|
-
{
|
|
199
|
-
id: "selected-columns-fill",
|
|
200
|
-
type: "fill",
|
|
201
|
-
source: "selected-columns",
|
|
202
|
-
paint: {
|
|
203
|
-
"fill-color": "rgba(255, 0, 0, 0.1)"
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
id: "selected-column-centroids-line",
|
|
208
|
-
type: "line",
|
|
209
|
-
source: "selected-column-centroids",
|
|
210
|
-
paint: {
|
|
211
|
-
"line-color": "rgba(255, 0, 0, 0.8)",
|
|
212
|
-
"line-width": 2,
|
|
213
|
-
"line-dasharray": [2, 2]
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
id: "selected-column-centroids-points",
|
|
218
|
-
type: "circle",
|
|
219
|
-
source: "selected-column-centroids",
|
|
220
|
-
paint: {
|
|
221
|
-
"circle-radius": 4,
|
|
222
|
-
"circle-color": "rgba(255, 0, 0, 0.8)"
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
]
|
|
226
|
-
};
|
|
227
|
-
const lineOfSectionStyle = {
|
|
228
|
-
version: 8,
|
|
229
|
-
sources: {
|
|
230
|
-
elevationMarker: mapboxUtils.buildGeoJSONSource(),
|
|
231
|
-
crossSectionLine: mapboxUtils.buildGeoJSONSource(),
|
|
232
|
-
crossSectionEndpoints: mapboxUtils.buildGeoJSONSource()
|
|
233
|
-
},
|
|
234
|
-
layers: mapStyles.buildCrossSectionLayers()
|
|
235
|
-
};
|
|
236
|
-
function SectionLine({ padding }) {
|
|
237
|
-
mapboxReact.useOverlayStyle(() => lineOfSectionStyle, []);
|
|
238
|
-
const focusedLine = state.useCorrelationMapStore((state2) => state2.focusedLine);
|
|
239
|
-
const focusedColumns = state.useCorrelationMapStore(
|
|
240
|
-
(state2) => state2.focusedColumns
|
|
241
|
-
);
|
|
242
|
-
mapboxReact.useMapStyleOperator(
|
|
243
|
-
(map) => {
|
|
244
|
-
if (focusedLine == null) {
|
|
245
|
-
mapboxUtils.setGeoJSON(map, "crossSectionLine", emptyFeatureCollection);
|
|
246
|
-
mapboxUtils.setGeoJSON(map, "crossSectionEndpoints", emptyFeatureCollection);
|
|
247
|
-
return;
|
|
248
|
-
}
|
|
249
|
-
const data = {
|
|
250
|
-
type: "FeatureCollection",
|
|
251
|
-
features: [
|
|
252
|
-
{
|
|
253
|
-
type: "Feature",
|
|
254
|
-
geometry: focusedLine,
|
|
255
|
-
properties: { id: "focusedLine" }
|
|
256
|
-
}
|
|
257
|
-
]
|
|
258
|
-
};
|
|
259
|
-
mapboxUtils.setGeoJSON(map, "crossSectionLine", data);
|
|
260
|
-
mapboxUtils.setGeoJSON(map, "crossSectionEndpoints", {
|
|
261
|
-
type: "FeatureCollection",
|
|
262
|
-
features: focusedLine.coordinates.map((coord) => ({
|
|
263
|
-
type: "Feature",
|
|
264
|
-
geometry: { type: "Point", coordinates: coord },
|
|
265
|
-
properties: {}
|
|
266
|
-
}))
|
|
267
|
-
});
|
|
268
|
-
},
|
|
269
|
-
[focusedLine]
|
|
270
|
-
);
|
|
271
|
-
const bounds = React.useMemo(() => {
|
|
272
|
-
const coords = focusedLine != null && focusedLine.coordinates.length >= 2 ? focusedLine.coordinates : focusedColumns.map((c) => c.properties.centroid.geometry.coordinates);
|
|
273
|
-
if (coords.length < 2) return null;
|
|
274
|
-
const bounds2 = new mapboxGl.LngLatBounds();
|
|
275
|
-
for (const coord of coords) {
|
|
276
|
-
bounds2.extend(coord);
|
|
277
|
-
}
|
|
278
|
-
return bounds2;
|
|
279
|
-
}, [focusedLine, focusedColumns]);
|
|
280
|
-
mapboxReact.useMapEaseTo({ bounds, padding, trackResize: true });
|
|
281
|
-
return null;
|
|
282
|
-
}
|
|
283
|
-
const emptyFeatureCollection = {
|
|
284
|
-
type: "FeatureCollection",
|
|
285
|
-
features: []
|
|
286
|
-
};
|
|
287
|
-
exports.ColumnCorrelationMap = ColumnCorrelationMap;
|
|
288
|
-
//# sourceMappingURL=core.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"core.cjs","sources":["../../../src/maps/column-correlation/core.ts"],"sourcesContent":["import {\n useMapClickHandler,\n useMapEaseTo,\n useMapStyleOperator,\n useOverlayStyle,\n} from \"@macrostrat/mapbox-react\";\nimport { LngLatBounds, Style } from \"mapbox-gl\";\nimport h from \"@macrostrat/hyper\";\nimport { Feature, FeatureCollection } from \"geojson\";\nimport { ReactNode, useMemo, useRef } from \"react\";\nimport { setGeoJSON, buildGeoJSONSource } from \"@macrostrat/mapbox-utils\";\n\nimport { useCorrelationMapStore } from \"./state\";\nimport { InsetMap, type InsetMapProps } from \"../inset-map\";\nimport { BaseColumnsLayer } from \"../layers\";\nimport { buildCrossSectionLayers } from \"@macrostrat/map-styles\";\n\nexport interface CorrelationMapProps extends InsetMapProps {\n padding?: number;\n children?: ReactNode;\n accessToken?: string;\n columnColor?: string;\n}\n\nexport function ColumnCorrelationMap(props: CorrelationMapProps) {\n const { padding = 50, children, columnColor, projectID, ...rest } = props;\n\n return h(\n InsetMap,\n {\n ...rest,\n boxZoom: false,\n dragRotate: false,\n },\n [\n h(ColumnsLayer, { color: columnColor }),\n h(SelectedColumnsLayer),\n h(MapClickHandler),\n h(ColumnInteractionHandler),\n h(HoveredColumnHighlight),\n h(ColumnZoomer, { padding }),\n h(SectionLine, { padding }),\n children,\n ],\n );\n}\n\nfunction ColumnZoomer({ padding }: { padding: number }) {\n /** Frame a single column when `zoomColumn` is set (e.g. header click). */\n const zoomColumn = useCorrelationMapStore((state) => state.zoomColumn);\n const zoomNonce = useCorrelationMapStore((state) => state.zoomNonce);\n const columns = useCorrelationMapStore((state) => state.columns);\n\n const bounds = useMemo(() => {\n if (zoomColumn == null || columns == null) return null;\n const col = columns.find((c) => c.properties?.col_id === zoomColumn);\n if (col?.geometry == null) return null;\n const b = new LngLatBounds();\n forEachCoordinate(col.geometry, (coord) => b.extend(coord as [number, number]));\n return b.isEmpty() ? null : b;\n // zoomNonce forces a fresh bounds object so repeat clicks re-frame\n }, [zoomColumn, zoomNonce, columns]);\n\n useMapEaseTo({ bounds, padding: padding * 2 });\n return null;\n}\n\nfunction forEachCoordinate(geometry: any, fn: (coord: number[]) => void) {\n const walk = (coords: any) => {\n if (typeof coords[0] === \"number\") {\n fn(coords);\n } else {\n for (const c of coords) walk(c);\n }\n };\n if (geometry?.coordinates != null) walk(geometry.coordinates);\n}\n\nconst columnLayers = [\"columns-fill\", \"columns-points\"];\n\nfunction MapClickHandler() {\n const onClickMap = useCorrelationMapStore((state) => state.onClickMap);\n\n useMapClickHandler(\n (e) => {\n onClickMap(e, { type: \"Point\", coordinates: e.lngLat.toArray() });\n },\n [onClickMap],\n );\n\n return null;\n}\n\nfunction ColumnInteractionHandler() {\n /** Per-column click (manual selection) and hover highlighting. */\n const toggleColumn = useCorrelationMapStore((state) => state.toggleColumn);\n const setHoveredColumn = useCorrelationMapStore(\n (state) => state.setHoveredColumn,\n );\n const isManual = useCorrelationMapStore(\n (state) => state.selectionMode === \"manual\",\n );\n const hoveredRef = useRef<number | string | null>(null);\n\n // Click a column to toggle it in/out of the selection (manual mode only)\n useMapStyleOperator(\n (map) => {\n if (!isManual) return;\n const onClick = (e) => {\n const colID = e.features?.[0]?.properties?.col_id;\n if (colID != null) toggleColumn(colID);\n };\n map.on(\"click\", columnLayers, onClick);\n return () => map.off(\"click\", columnLayers, onClick);\n },\n [isManual, toggleColumn],\n );\n\n // Hover highlighting (via the columns layer's `hover` feature-state)\n useMapStyleOperator(\n (map) => {\n const clearHover = () => {\n if (hoveredRef.current != null) {\n map.setFeatureState(\n { source: \"columns\", id: hoveredRef.current },\n { hover: false },\n );\n hoveredRef.current = null;\n }\n };\n const onMove = (e) => {\n const f = e.features?.[0];\n if (f == null) return;\n if (hoveredRef.current !== f.id) {\n clearHover();\n map.setFeatureState({ source: \"columns\", id: f.id }, { hover: true });\n hoveredRef.current = f.id;\n }\n setHoveredColumn(f.properties?.col_id ?? null);\n map.getCanvas().style.cursor = \"pointer\";\n };\n const onLeave = () => {\n clearHover();\n setHoveredColumn(null);\n map.getCanvas().style.cursor = \"\";\n };\n map.on(\"mousemove\", columnLayers, onMove);\n map.on(\"mouseleave\", columnLayers, onLeave);\n return () => {\n map.off(\"mousemove\", columnLayers, onMove);\n map.off(\"mouseleave\", columnLayers, onLeave);\n clearHover();\n };\n },\n [setHoveredColumn],\n );\n\n return null;\n}\n\nfunction HoveredColumnHighlight() {\n /** Reflects the store's `hoveredColumn` on the map (e.g. when a column is\n * hovered elsewhere in the UI) using the `highlighted` feature-state. */\n const hoveredColumn = useCorrelationMapStore((state) => state.hoveredColumn);\n const columns = useCorrelationMapStore((state) => state.columns);\n const appliedRef = useRef<number | string | null>(null);\n\n useMapStyleOperator(\n (map) => {\n if (appliedRef.current != null) {\n map.setFeatureState(\n { source: \"columns\", id: appliedRef.current },\n { highlighted: false },\n );\n appliedRef.current = null;\n }\n if (hoveredColumn == null || columns == null) return;\n const col = columns.find((c) => c.properties?.col_id === hoveredColumn);\n const id = (col as any)?.id ?? col?.properties?.col_id;\n if (id == null) return;\n map.setFeatureState({ source: \"columns\", id }, { highlighted: true });\n appliedRef.current = id;\n },\n [hoveredColumn, columns],\n );\n\n return null;\n}\n\nfunction SelectedColumnsLayer() {\n useOverlayStyle(() => selectedColumnsStyle, []);\n\n const focusedColumns = useCorrelationMapStore(\n (state) => state.focusedColumns,\n );\n\n useMapStyleOperator(\n (map) => {\n let features = focusedColumns;\n\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features,\n };\n\n const columnCentroidLine: Feature = {\n type: \"Feature\",\n geometry: {\n type: \"LineString\",\n coordinates: features.map(\n (col) => col.properties.centroid.geometry.coordinates,\n ),\n },\n properties: {},\n };\n\n setGeoJSON(map, \"selected-columns\", data);\n setGeoJSON(map, \"selected-column-centroids\", {\n type: \"FeatureCollection\",\n features: [columnCentroidLine],\n });\n },\n [focusedColumns],\n );\n return null;\n}\n\nfunction ColumnsLayer({ enabled = true, color }) {\n const columns = useCorrelationMapStore((state) => state.columns);\n return h(BaseColumnsLayer, { enabled, color, columns });\n}\n\nconst selectedColumnsStyle: Style = {\n version: 8,\n sources: {\n \"selected-columns\": buildGeoJSONSource(),\n \"selected-column-centroids\": buildGeoJSONSource(),\n },\n layers: [\n {\n id: \"selected-columns-fill\",\n type: \"fill\",\n source: \"selected-columns\",\n paint: {\n \"fill-color\": \"rgba(255, 0, 0, 0.1)\",\n },\n },\n {\n id: \"selected-column-centroids-line\",\n type: \"line\",\n source: \"selected-column-centroids\",\n paint: {\n \"line-color\": \"rgba(255, 0, 0, 0.8)\",\n \"line-width\": 2,\n \"line-dasharray\": [2, 2],\n },\n },\n {\n id: \"selected-column-centroids-points\",\n type: \"circle\",\n source: \"selected-column-centroids\",\n paint: {\n \"circle-radius\": 4,\n \"circle-color\": \"rgba(255, 0, 0, 0.8)\",\n },\n },\n ],\n};\n\nconst lineOfSectionStyle: Style = {\n version: 8,\n sources: {\n elevationMarker: buildGeoJSONSource(),\n crossSectionLine: buildGeoJSONSource(),\n crossSectionEndpoints: buildGeoJSONSource(),\n },\n layers: buildCrossSectionLayers(),\n};\n\nfunction SectionLine({ padding }: { padding: number }) {\n useOverlayStyle(() => lineOfSectionStyle, []);\n const focusedLine = useCorrelationMapStore((state) => state.focusedLine);\n const focusedColumns = useCorrelationMapStore(\n (state) => state.focusedColumns,\n );\n\n // Setup focused line (only drawn in line-of-section mode)\n useMapStyleOperator(\n (map) => {\n if (focusedLine == null) {\n // Clear any previously-drawn line (e.g. after switching to manual mode)\n setGeoJSON(map, \"crossSectionLine\", emptyFeatureCollection);\n setGeoJSON(map, \"crossSectionEndpoints\", emptyFeatureCollection);\n return;\n }\n const data: FeatureCollection = {\n type: \"FeatureCollection\",\n features: [\n {\n type: \"Feature\",\n geometry: focusedLine,\n properties: { id: \"focusedLine\" },\n },\n ],\n };\n\n setGeoJSON(map, \"crossSectionLine\", data);\n setGeoJSON(map, \"crossSectionEndpoints\", {\n type: \"FeatureCollection\",\n features: focusedLine.coordinates.map((coord) => ({\n type: \"Feature\",\n geometry: { type: \"Point\", coordinates: coord },\n properties: {},\n })),\n });\n },\n [focusedLine],\n );\n\n const bounds = useMemo(() => {\n // In line mode, frame the line; in manual mode, frame the selected columns\n const coords: number[][] =\n focusedLine != null && focusedLine.coordinates.length >= 2\n ? focusedLine.coordinates\n : focusedColumns.map((c) => c.properties.centroid.geometry.coordinates);\n if (coords.length < 2) return null;\n const bounds = new LngLatBounds();\n for (const coord of coords) {\n bounds.extend(coord as [number, number]);\n }\n return bounds;\n }, [focusedLine, focusedColumns]);\n\n useMapEaseTo({ bounds, padding, trackResize: true });\n\n return null;\n}\n\nconst emptyFeatureCollection: FeatureCollection = {\n type: \"FeatureCollection\",\n features: [],\n};\n"],"names":["h","InsetMap","useCorrelationMapStore","state","columns","useMemo","LngLatBounds","useMapEaseTo","useMapClickHandler","useRef","useMapStyleOperator","useOverlayStyle","setGeoJSON","BaseColumnsLayer","buildGeoJSONSource","buildCrossSectionLayers","bounds"],"mappings":";;;;;;;;;;;;;AAwBO,SAAS,qBAAqB,OAA4B;AAC/D,QAAM,EAAE,UAAU,IAAI,UAAU,aAAa,WAAW,GAAG,SAAS;AAEpE,SAAOA,WAAAA;AAAAA,IACLC,MAAAA;AAAAA,IACA;AAAA,MACE,GAAG;AAAA,MACH,SAAS;AAAA,MACT,YAAY;AAAA,IAAA;AAAA,IAEd;AAAA,MACED,WAAAA,QAAE,cAAc,EAAE,OAAO,aAAa;AAAA,MACtCA,WAAAA,QAAE,oBAAoB;AAAA,MACtBA,WAAAA,QAAE,eAAe;AAAA,MACjBA,WAAAA,QAAE,wBAAwB;AAAA,MAC1BA,WAAAA,QAAE,sBAAsB;AAAA,MACxBA,mBAAE,cAAc,EAAE,SAAS;AAAA,MAC3BA,mBAAE,aAAa,EAAE,SAAS;AAAA,MAC1B;AAAA,IAAA;AAAA,EACF;AAEJ;AAEA,SAAS,aAAa,EAAE,WAAgC;AAEtD,QAAM,aAAaE,MAAAA,uBAAuB,CAACC,WAAUA,OAAM,UAAU;AACrE,QAAM,YAAYD,MAAAA,uBAAuB,CAACC,WAAUA,OAAM,SAAS;AACnE,QAAMC,WAAUF,MAAAA,uBAAuB,CAACC,WAAUA,OAAM,OAAO;AAE/D,QAAM,SAASE,MAAAA,QAAQ,MAAM;AAC3B,QAAI,cAAc,QAAQD,YAAW,KAAM,QAAO;AAClD,UAAM,MAAMA,SAAQ,KAAK,CAAC,MAAM,EAAE,YAAY,WAAW,UAAU;AACnE,QAAI,KAAK,YAAY,KAAM,QAAO;AAClC,UAAM,IAAI,IAAIE,sBAAA;AACd,sBAAkB,IAAI,UAAU,CAA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Q;AACP,UAAI,eAAe,MAAM;AAEvBE,+BAAW,KAAK,oBAAoB,sBAAsB;AAC1DA,+BAAW,KAAK,yBAAyB,sBAAsB;AAC/D;AAAA,MACF;AACA,YAAM,OAA0B;AAAA,QAC9B,MAAM;AAAA,QACN,UAAU;AAAA,UACR;AAAA,YACE,MAAM;AAAA,YACN,UAAU;AAAA,YACV,YAAY,EAAE,IAAI,cAAA;AAAA,UAAc;AAAA,QAClC;AAAA,MACF;AAGFA,6BAAW,KAAK,oBAAoB,IAAI;AACxCA,kBAAAA,WAAW,KAAK,yBAAyB;AAAA,QACvC,MAAM;AAAA,QACN,UAAU,YAAY,YAAY,IAAI,CAAC,WAAW;AAAA,UAChD,MAAM;AAAA,UACN,UAAU,EAAE,MAAM,SAAS,aAAa,MAAA;AAAA,UACxC,YAAY,CAAA;AAAA,QAAC,EACb;AAAA,MAAA,CACH;AAAA,IACH;AAAA,IACA,CAAC,WAAW;AAAA,EAAA;AAGd,QAAM,SAASP,MAAAA,QAAQ,MAAM;AAE3B,UAAM,SACJ,eAAe,QAAQ,YAAY,YAAY,UAAU,IACrD,YAAY,cACZ,eAAe,IAAI,CAAC,MAAM,EAAE,WAAW,SAAS,SAAS,WAAW;AAC1E,QAAI,OAAO,SAAS,EAAG,QAAO;AAC9B,UAAMW,UAAS,IAAIV,sBAAA;AACnB,eAAW,SAAS,QAAQ;AAC1BU,cAAO,OAAO,KAAyB;AAAA,IACzC;AACA,WAAOA;AAAAA,EACT,GAAG,CAAC,aAAa,cAAc,CAAC;AAEhCT,cAAAA,aAAa,EAAE,QAAQ,SAAS,aAAa,MAAM;AAEnD,SAAO;AACT;AAEA,MAAM,yBAA4C;AAAA,EAChD,MAAM;AAAA,EACN,UAAU,CAAA;AACZ;;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { InsetMapProps } from '../inset-map';
|
|
3
|
-
export interface CorrelationMapProps extends InsetMapProps {
|
|
4
|
-
padding?: number;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
accessToken?: string;
|
|
7
|
-
columnColor?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function ColumnCorrelationMap(props: CorrelationMapProps): import('react').FunctionComponentElement<InsetMapProps>;
|