@classic-homes/maps-core 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZGUACUEF.js → chunk-KEBZDTH3.js} +35 -49
- package/dist/{chunk-6WMCIBJJ.js → chunk-Q4ISJ6FV.js} +1 -1
- package/dist/{chunk-OVHVN7QO.js → chunk-ZAGAADA3.js} +44 -13
- package/dist/{worker-CQNc5vck.d.ts → deck-Crhj7TKV.d.ts} +47 -22
- package/dist/{worker-BoWJ1lO0.d.cts → deck-Cvmx9g1O.d.cts} +47 -22
- package/dist/index.cjs +236 -200
- package/dist/index.d.cts +60 -35
- package/dist/index.d.ts +60 -35
- package/dist/index.js +124 -109
- package/dist/theme/index.cjs +34 -48
- package/dist/theme/index.js +2 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +77 -59
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -2
- package/package.json +1 -1
- package/src/styles/bundled.css +58 -75
- package/src/styles/bundled.test.ts +44 -0
- package/src/styles/controls.css +14 -11
- package/src/styles/layer-manager.css +29 -16
- package/src/styles/popup.css +12 -11
- package/src/styles/utilities.css +32 -52
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { fontFamily,
|
|
1
|
+
import { fontFamily, semanticColors, ch, colors } from '@classic-homes/theme-tokens';
|
|
2
2
|
|
|
3
3
|
// src/theme/generator.ts
|
|
4
4
|
var THEME_LIGHT = "classic-light";
|
|
5
5
|
var THEME_DARK = "classic-dark";
|
|
6
6
|
function generateLightColors() {
|
|
7
7
|
return {
|
|
8
|
-
background:
|
|
9
|
-
water:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
//
|
|
8
|
+
background: ch.white,
|
|
9
|
+
water: ch.accentTeal100,
|
|
10
|
+
// Shallows
|
|
11
|
+
land: ch.paper,
|
|
12
|
+
park: ch.linen,
|
|
13
|
+
building: ch.linen,
|
|
14
|
+
buildingOutline: ch.lichen,
|
|
15
|
+
roadPrimary: ch.white,
|
|
16
|
+
roadSecondary: ch.white,
|
|
17
|
+
roadCasing: ch.lichen,
|
|
18
|
+
rail: ch.sage500,
|
|
19
|
+
boundary: ch.sage500,
|
|
20
|
+
adminBoundary: ch.sage600,
|
|
21
|
+
residential: ch.paper,
|
|
22
|
+
commercial: ch.linen,
|
|
23
|
+
industrial: ch.linen,
|
|
24
|
+
highlight: ch.heritageTeal,
|
|
25
|
+
// hovered: 11.30:1 on land
|
|
26
|
+
highlightSecondary: ch.accentTeal,
|
|
27
|
+
// resting: 3.03:1 on land
|
|
28
|
+
// Selection is not an error: Steel Navy (8.71:1 on land), with the width
|
|
29
|
+
// step in getHighlightStyle, not red
|
|
30
|
+
selection: ch.collection.classic,
|
|
28
31
|
textPrimary: semanticColors.light.foreground,
|
|
29
32
|
textSecondary: semanticColors.light.mutedForeground,
|
|
30
|
-
textHalo:
|
|
31
|
-
poi:
|
|
32
|
-
// Core 2 - brand navy
|
|
33
|
+
textHalo: ch.white,
|
|
34
|
+
poi: ch.heritageTeal,
|
|
33
35
|
labelBackground: "rgba(255, 255, 255, 0.85)"
|
|
34
36
|
};
|
|
35
37
|
}
|
|
@@ -64,32 +66,16 @@ function generateDarkColors() {
|
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
68
|
function generateLightDataColors() {
|
|
69
|
+
const { chart } = semanticColors.light;
|
|
67
70
|
return {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// chart.4
|
|
77
|
-
colors.sky[600]
|
|
78
|
-
// chart.5
|
|
79
|
-
],
|
|
80
|
-
positive: colors.forest[500],
|
|
81
|
-
negative: colors.red[500],
|
|
82
|
-
neutral: colors.gray[500],
|
|
83
|
-
heatmapRamp: [
|
|
84
|
-
"rgba(59, 164, 167, 0)",
|
|
85
|
-
// teal transparent
|
|
86
|
-
colors.teal[200],
|
|
87
|
-
colors.teal[400],
|
|
88
|
-
colors.teal[500],
|
|
89
|
-
colors.red[400],
|
|
90
|
-
colors.red[500],
|
|
91
|
-
colors.red[600]
|
|
92
|
-
]
|
|
71
|
+
// The chart series colours, each 3:1 or more on White
|
|
72
|
+
sequence: [chart[1], chart[2], chart[3], chart[4], chart[5]],
|
|
73
|
+
positive: ch.heritageTeal,
|
|
74
|
+
negative: ch.foundersRed,
|
|
75
|
+
neutral: ch.grey02,
|
|
76
|
+
// One teal ramp (Shallows, Accent Teal, Heritage Teal); no red in it, since
|
|
77
|
+
// red means a problem in v2.5
|
|
78
|
+
heatmapRamp: ["rgba(216, 237, 237, 0)", ch.accentTeal100, ch.accentTeal, ch.heritageTeal]
|
|
93
79
|
};
|
|
94
80
|
}
|
|
95
81
|
function generateDarkDataColors() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { lightTheme } from './chunk-
|
|
1
|
+
import { lightTheme } from './chunk-KEBZDTH3.js';
|
|
2
|
+
import { ch } from '@classic-homes/theme-tokens';
|
|
2
3
|
import RBush from 'rbush';
|
|
3
4
|
|
|
4
5
|
// src/utils/format.ts
|
|
@@ -440,8 +441,6 @@ function getGridNavigationIndex(key, index, count, columns) {
|
|
|
440
441
|
return null;
|
|
441
442
|
}
|
|
442
443
|
}
|
|
443
|
-
|
|
444
|
-
// src/utils/styles.ts
|
|
445
444
|
function createFillStyle(options) {
|
|
446
445
|
const paint = {
|
|
447
446
|
"fill-color": options.color
|
|
@@ -662,11 +661,11 @@ function createExtrusionHeightExpression(property, options = {}) {
|
|
|
662
661
|
}
|
|
663
662
|
return heightExpr;
|
|
664
663
|
}
|
|
665
|
-
function createStatusColorExpression(statusColors, defaultColor =
|
|
664
|
+
function createStatusColorExpression(statusColors, defaultColor = ch.grey02) {
|
|
666
665
|
return createCategoricalColorExpression("status", statusColors, defaultColor);
|
|
667
666
|
}
|
|
668
667
|
function createInteractiveStatusColorExpression(statusColors, options) {
|
|
669
|
-
const { hoverColor, selectedColor, defaultColor =
|
|
668
|
+
const { hoverColor, selectedColor, defaultColor = ch.grey02 } = options;
|
|
670
669
|
const baseExpr = createCategoricalColorExpression("status", statusColors, defaultColor);
|
|
671
670
|
if (selectedColor) {
|
|
672
671
|
return [
|
|
@@ -1055,6 +1054,27 @@ function filterByGeometryType(geojson, types) {
|
|
|
1055
1054
|
features: geojson.features.filter((f) => f.geometry && types.includes(f.geometry.type))
|
|
1056
1055
|
};
|
|
1057
1056
|
}
|
|
1057
|
+
var markerColor = ch.heritageTeal;
|
|
1058
|
+
var clusterColors = {
|
|
1059
|
+
small: ch.heritageTeal,
|
|
1060
|
+
// < 10 points
|
|
1061
|
+
medium: ch.collection.classic,
|
|
1062
|
+
// Steel Navy, 10-50 points
|
|
1063
|
+
large: ch.collection.portrait,
|
|
1064
|
+
// Aubergine, 50+ points
|
|
1065
|
+
stroke: ch.white,
|
|
1066
|
+
text: ch.white
|
|
1067
|
+
};
|
|
1068
|
+
var boundaryColors = {
|
|
1069
|
+
fill: ch.heritageTeal,
|
|
1070
|
+
line: ch.heritageTeal,
|
|
1071
|
+
hoverFill: ch.heritageTeal,
|
|
1072
|
+
defaultFill: ch.accentTeal,
|
|
1073
|
+
hoverLine: ch.heritageTeal,
|
|
1074
|
+
defaultLine: ch.accentTeal
|
|
1075
|
+
};
|
|
1076
|
+
var salesOfficeColor = ch.foundersRed;
|
|
1077
|
+
var nonMatchedColor = ch.grey02;
|
|
1058
1078
|
|
|
1059
1079
|
// src/utils/cluster.ts
|
|
1060
1080
|
function isClusterFeature(feature) {
|
|
@@ -1139,28 +1159,29 @@ async function expandClusterToBounds(map, sourceId, clusterId, options = {}) {
|
|
|
1139
1159
|
}
|
|
1140
1160
|
function createClusterStyles(options = {}) {
|
|
1141
1161
|
const {
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1162
|
+
// v2.5 defaults: dark circles that carry White counts (12.68, 9.78, 6.71)
|
|
1163
|
+
smallColor = clusterColors.small,
|
|
1164
|
+
mediumColor = clusterColors.medium,
|
|
1165
|
+
largeColor = clusterColors.large,
|
|
1145
1166
|
mediumThreshold = 100,
|
|
1146
1167
|
largeThreshold = 750,
|
|
1147
1168
|
smallRadius = 20,
|
|
1148
1169
|
mediumRadius = 30,
|
|
1149
1170
|
largeRadius = 40,
|
|
1150
|
-
strokeColor =
|
|
1171
|
+
strokeColor = clusterColors.stroke,
|
|
1151
1172
|
strokeWidth = 2,
|
|
1152
1173
|
opacity = 0.85
|
|
1153
1174
|
} = options.circle ?? {};
|
|
1154
1175
|
const {
|
|
1155
|
-
textColor =
|
|
1176
|
+
textColor = clusterColors.text,
|
|
1156
1177
|
textSize = 12,
|
|
1157
1178
|
fontStack = ["Open Sans Bold", "Arial Unicode MS Bold"],
|
|
1158
1179
|
abbreviated = false
|
|
1159
1180
|
} = options.text ?? {};
|
|
1160
1181
|
const {
|
|
1161
|
-
color: pointColor =
|
|
1182
|
+
color: pointColor = clusterColors.small,
|
|
1162
1183
|
radius: pointRadius = 8,
|
|
1163
|
-
strokeColor: pointStrokeColor =
|
|
1184
|
+
strokeColor: pointStrokeColor = clusterColors.stroke,
|
|
1164
1185
|
strokeWidth: pointStrokeWidth = 1
|
|
1165
1186
|
} = options.unclusteredPoint ?? {};
|
|
1166
1187
|
return {
|
|
@@ -2927,4 +2948,14 @@ function warnIfWorkerUrlMissing(maplibregl, log = console.warn) {
|
|
|
2927
2948
|
}
|
|
2928
2949
|
}
|
|
2929
2950
|
|
|
2930
|
-
|
|
2951
|
+
// src/utils/deck.ts
|
|
2952
|
+
function supportsDeckInterleaving(map) {
|
|
2953
|
+
if (!map) return false;
|
|
2954
|
+
const transform = map.transform;
|
|
2955
|
+
return typeof transform === "object" && transform !== null;
|
|
2956
|
+
}
|
|
2957
|
+
function resolveDeckInterleaved(map, requested) {
|
|
2958
|
+
return requested && supportsDeckInterleaving(map);
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
export { DEFAULT_SIMPLIFICATION_THRESHOLDS, KEYBOARD_CONTROLS, MARKER_PROTECTION_CLASS, applyMarkerChildProtection, applyMarkerProtection, boundaryColors, boundsToPolygon, buildRTreeIndex, buildSpatialIndex, calculateBounds, calculateCentroid, calculateZoomThresholds, clampLatitude, clusterColors, combineBounds, countFeaturesByType, createCategoricalColorExpression, createCircleStyle, createClusterCirclePaint, createClusterStyles, createClusterTextLayout, createContinuousColorExpression, createDynamicLODManager, createExtrusionHeightExpression, createExtrusionStyle, createFillStyle, createGeoJSONFingerprint, createHeatmapStyle, createHoverExpression, createIdleViewportManager, createInteractiveExpression, createInteractiveStatusColorExpression, createLineStyle, createLotFillStyle, createLotOutlineStyle, createPredictiveViewportManager, createRTreeViewportManager, createSelectionExpression, createStatusColorExpression, createViewportManager, createViewportQuery, createZoomExpression, decimalToDMS, deepEqual, ensureValidCoordinates, expandCluster, expandClusterToBounds, extendBounds, filterByGeometryType, filterEqual, fingerprintEqual, formatArea, formatBearing, formatBounds, formatCoordinates, formatDistance, formatFeatureProperties, formatLabel, formatPitch, formatPropertyValue, formatScale, formatZoom, generateBoundingPolygon, generateConvexHull, generateFeatureCollectionDescription, generateFeatureTable, generateKeyboardControlsDescription, generateLODData, generateLODDataWithSimplification, generateMapDescription, generateMarkerList, generateMarkersDescription, generateMoveAnnouncement, geoJSONEqual, getChangedPaintProps, getClusterBounds, getClusterChildren, getClusterExpansionZoom, getClusterLeaves, getGridNavigationIndex, getHighlightStyle, getSelectionStyle, getSimplificationToleranceForZoom, getSimplifiedFeaturesForZoom, groupFeaturesByProperty, isClusterFeature, isValidBounds, isValidLatitude, isValidLongitude, loadGeoJSON, markerColor, nonMatchedColor, normalizeLongitude, normalizePadding, paintPropsEqual, panToFitPopup, prefersReducedMotion, queryByBounds, queryByBoundsWithStats, queryRTreeByBounds, queryRTreeByBoundsWithStats, removeMarkerProtection, resetWorkerUrlWarning, resolveDeckInterleaved, salesOfficeColor, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, supportsDeckInterleaving, validateBoundsArray, validateCoordinates, validateGeoJSON, warnIfWorkerUrlMissing, zoomToScale };
|
|
@@ -225,9 +225,9 @@ interface LotFillStyleOptions {
|
|
|
225
225
|
* @example
|
|
226
226
|
* ```tsx
|
|
227
227
|
* const fillStyle = createLotFillStyle({
|
|
228
|
-
* defaultColor: '#
|
|
229
|
-
* hoverColor: '#
|
|
230
|
-
* selectedColor: '#
|
|
228
|
+
* defaultColor: '#34999c', // Accent Teal
|
|
229
|
+
* hoverColor: '#1b373b', // Heritage Teal
|
|
230
|
+
* selectedColor: '#2b4660', // Steel Navy
|
|
231
231
|
* opacity: 0.7,
|
|
232
232
|
* });
|
|
233
233
|
*
|
|
@@ -264,8 +264,8 @@ interface LotOutlineStyleOptions {
|
|
|
264
264
|
* @example
|
|
265
265
|
* ```tsx
|
|
266
266
|
* const outlineStyle = createLotOutlineStyle({
|
|
267
|
-
* defaultColor: '#
|
|
268
|
-
* hoverColor: '#
|
|
267
|
+
* defaultColor: '#50504f', // Grey 01
|
|
268
|
+
* hoverColor: '#1b373b', // Heritage Teal
|
|
269
269
|
* defaultWidth: 1,
|
|
270
270
|
* hoverWidth: 2,
|
|
271
271
|
* });
|
|
@@ -325,15 +325,15 @@ declare function createExtrusionHeightExpression(property: string, options?: Ext
|
|
|
325
325
|
* Commonly used for real estate lot statuses like available, sold, pending.
|
|
326
326
|
*
|
|
327
327
|
* @param statusColors - Map of status values to colors
|
|
328
|
-
* @param defaultColor - Fallback color for unknown statuses (default: '#
|
|
328
|
+
* @param defaultColor - Fallback color for unknown statuses (default: Grey 02, '#767574', 4.29:1 on the basemap land)
|
|
329
329
|
*
|
|
330
330
|
* @example
|
|
331
331
|
* ```tsx
|
|
332
332
|
* const statusColorExpr = createStatusColorExpression({
|
|
333
|
-
* available: '#
|
|
334
|
-
* pending: '#
|
|
335
|
-
* sold: '#
|
|
336
|
-
* reserved: '#
|
|
333
|
+
* available: '#1b373b', // Heritage Teal
|
|
334
|
+
* pending: '#34999c', // Accent Teal
|
|
335
|
+
* sold: '#767574', // Grey 02 (sold is not a problem: no red)
|
|
336
|
+
* reserved: '#2b4660', // Steel Navy
|
|
337
337
|
* });
|
|
338
338
|
*
|
|
339
339
|
* <FillLayer fillColor={statusColorExpr} />
|
|
@@ -352,8 +352,8 @@ declare function createStatusColorExpression(statusColors: Record<string, string
|
|
|
352
352
|
* @example
|
|
353
353
|
* ```tsx
|
|
354
354
|
* const colorExpr = createInteractiveStatusColorExpression(
|
|
355
|
-
* { available: '#
|
|
356
|
-
* { hoverColor: '#
|
|
355
|
+
* { available: '#1b373b', sold: '#767574' },
|
|
356
|
+
* { hoverColor: '#34999c', selectedColor: '#2b4660' }
|
|
357
357
|
* );
|
|
358
358
|
*
|
|
359
359
|
* <FillLayer fillColor={colorExpr} />
|
|
@@ -829,11 +829,11 @@ declare function expandClusterToBounds(map: ClusterMapBoundsExpander, sourceId:
|
|
|
829
829
|
* Options for cluster circle layer style
|
|
830
830
|
*/
|
|
831
831
|
interface ClusterCircleStyleOptions {
|
|
832
|
-
/** Base color for small clusters (default:
|
|
832
|
+
/** Base color for small clusters (default: Heritage Teal) */
|
|
833
833
|
smallColor?: string;
|
|
834
|
-
/** Color for medium clusters (default:
|
|
834
|
+
/** Color for medium clusters (default: Steel Navy) */
|
|
835
835
|
mediumColor?: string;
|
|
836
|
-
/** Color for large clusters (default:
|
|
836
|
+
/** Color for large clusters (default: Aubergine) */
|
|
837
837
|
largeColor?: string;
|
|
838
838
|
/** Point count threshold for medium size (default: 100) */
|
|
839
839
|
mediumThreshold?: number;
|
|
@@ -856,7 +856,7 @@ interface ClusterCircleStyleOptions {
|
|
|
856
856
|
* Options for cluster text layer style
|
|
857
857
|
*/
|
|
858
858
|
interface ClusterTextStyleOptions {
|
|
859
|
-
/** Text color (default:
|
|
859
|
+
/** Text color (default: White, 6.7:1 or more on the default circles) */
|
|
860
860
|
textColor?: string;
|
|
861
861
|
/** Text size (default: 12) */
|
|
862
862
|
textSize?: number;
|
|
@@ -869,7 +869,7 @@ interface ClusterTextStyleOptions {
|
|
|
869
869
|
* Options for unclustered point layer style
|
|
870
870
|
*/
|
|
871
871
|
interface UnclusteredPointStyleOptions {
|
|
872
|
-
/** Point color (default:
|
|
872
|
+
/** Point color (default: Heritage Teal) */
|
|
873
873
|
color?: string;
|
|
874
874
|
/** Point radius (default: 8) */
|
|
875
875
|
radius?: number;
|
|
@@ -907,9 +907,9 @@ interface ClusterLayerStyles {
|
|
|
907
907
|
* @example
|
|
908
908
|
* ```tsx
|
|
909
909
|
* const styles = createClusterStyles({
|
|
910
|
-
* smallColor: '#
|
|
911
|
-
* mediumColor: '#
|
|
912
|
-
* largeColor: '#
|
|
910
|
+
* smallColor: '#1b373b', // Heritage Teal
|
|
911
|
+
* mediumColor: '#2b4660', // Steel Navy
|
|
912
|
+
* largeColor: '#6a5280', // Aubergine
|
|
913
913
|
* });
|
|
914
914
|
*
|
|
915
915
|
* <Source id="points" type="geojson" data={data} cluster={true}>
|
|
@@ -948,7 +948,7 @@ declare function createClusterStyles(options?: {
|
|
|
948
948
|
* <CircleLayer
|
|
949
949
|
* id="clusters"
|
|
950
950
|
* filter={['has', 'point_count']}
|
|
951
|
-
* paint={createClusterCirclePaint({ smallColor: '#
|
|
951
|
+
* paint={createClusterCirclePaint({ smallColor: '#2b4660' })}
|
|
952
952
|
* />
|
|
953
953
|
* ```
|
|
954
954
|
*/
|
|
@@ -1533,4 +1533,29 @@ declare function resetWorkerUrlWarning(): void;
|
|
|
1533
1533
|
*/
|
|
1534
1534
|
declare function warnIfWorkerUrlMissing(maplibregl: MapLibreWorkerApi, log?: (message: string) => void): boolean;
|
|
1535
1535
|
|
|
1536
|
-
|
|
1536
|
+
/**
|
|
1537
|
+
* deck.gl interleaving guard.
|
|
1538
|
+
*
|
|
1539
|
+
* `@deck.gl/mapbox` draws interleaved layers from a MapLibre custom layer and
|
|
1540
|
+
* reads the camera from the map's undocumented `map.transform` (`height`,
|
|
1541
|
+
* `_nearZ`, `elevation`). MapLibre 6 moved the camera out of the `Map` class
|
|
1542
|
+
* into `map._camera`, so `map.transform` is `undefined` there and every
|
|
1543
|
+
* interleaved frame throws `Cannot read properties of undefined (reading
|
|
1544
|
+
* 'height')`. As of deck.gl 9.4.1 (and 10.0.0-alpha.1) no release handles it.
|
|
1545
|
+
*
|
|
1546
|
+
* Overlaid rendering (deck.gl's own canvas stacked above the map) only uses the
|
|
1547
|
+
* public camera API (`getCenter`, `getZoom`, ...), so it keeps working. The
|
|
1548
|
+
* check is on the property, not the MapLibre version, so interleaving comes
|
|
1549
|
+
* back on its own once either side restores it.
|
|
1550
|
+
*/
|
|
1551
|
+
/** Anything that might be a MapLibre/Mapbox map. */
|
|
1552
|
+
type DeckHostMap = object | null | undefined;
|
|
1553
|
+
/** Whether deck.gl can render interleaved into this map. */
|
|
1554
|
+
declare function supportsDeckInterleaving(map: DeckHostMap): boolean;
|
|
1555
|
+
/**
|
|
1556
|
+
* The `interleaved` value to hand `MapboxOverlay`: the requested one, or
|
|
1557
|
+
* `false` when the map cannot be drawn into interleaved (see above).
|
|
1558
|
+
*/
|
|
1559
|
+
declare function resolveDeckInterleaved(map: DeckHostMap, requested: boolean): boolean;
|
|
1560
|
+
|
|
1561
|
+
export { createClusterTextLayout as $, type SimplificationThreshold as A, applyMarkerChildProtection as B, type ClusterCircleStyleOptions as C, DEFAULT_SIMPLIFICATION_THRESHOLDS as D, type ExtrusionHeightOptions as E, type FeatureGroup as F, type GenerateLODOptions as G, applyMarkerProtection as H, boundsToPolygon as I, calculateBounds as J, KEYBOARD_CONTROLS as K, type LODData as L, MARKER_PROTECTION_CLASS as M, type NumberExpression as N, calculateCentroid as O, type PaintProps as P, calculateZoomThresholds as Q, clampLatitude as R, type SimplificationStats as S, combineBounds as T, type UnclusteredPointStyleOptions as U, type ValidationResult as V, countFeaturesByType as W, createCategoricalColorExpression as X, createCircleStyle as Y, createClusterCirclePaint as Z, createClusterStyles as _, type ClusterExpandOptions as a, loadGeoJSON as a$, createContinuousColorExpression as a0, createDynamicLODManager as a1, createExtrusionHeightExpression as a2, createExtrusionStyle as a3, createFillStyle as a4, createGeoJSONFingerprint as a5, createHeatmapStyle as a6, createHoverExpression as a7, createInteractiveExpression as a8, createInteractiveStatusColorExpression as a9, generateBoundingPolygon as aA, generateConvexHull as aB, generateFeatureCollectionDescription as aC, generateFeatureTable as aD, generateKeyboardControlsDescription as aE, generateLODData as aF, generateLODDataWithSimplification as aG, generateMapDescription as aH, generateMarkerList as aI, generateMarkersDescription as aJ, generateMoveAnnouncement as aK, geoJSONEqual as aL, getChangedPaintProps as aM, getClusterBounds as aN, getClusterChildren as aO, getClusterExpansionZoom as aP, getClusterLeaves as aQ, getGridNavigationIndex as aR, getHighlightStyle as aS, getSelectionStyle as aT, getSimplificationToleranceForZoom as aU, getSimplifiedFeaturesForZoom as aV, groupFeaturesByProperty as aW, isClusterFeature as aX, isValidBounds as aY, isValidLatitude as aZ, isValidLongitude as a_, createLineStyle as aa, createLotFillStyle as ab, createLotOutlineStyle as ac, createSelectionExpression as ad, createStatusColorExpression as ae, createZoomExpression as af, decimalToDMS as ag, deepEqual as ah, ensureValidCoordinates as ai, expandCluster as aj, expandClusterToBounds as ak, extendBounds as al, filterByGeometryType as am, filterEqual as an, fingerprintEqual as ao, formatArea as ap, formatBearing as aq, formatBounds as ar, formatCoordinates as as, formatDistance as at, formatFeatureProperties as au, formatLabel as av, formatPitch as aw, formatPropertyValue as ax, formatScale as ay, formatZoom as az, type ClusterExpansionResult as b, normalizeLongitude as b0, paintPropsEqual as b1, removeMarkerProtection as b2, resetWorkerUrlWarning as b3, resolveDeckInterleaved as b4, serializeFilter as b5, simplifyFeature as b6, simplifyFeatureCollection as b7, simplifyFeatureCollectionWithStats as b8, simplifyPolygon as b9, supportsDeckInterleaving as ba, validateBoundsArray as bb, validateCoordinates as bc, validateGeoJSON as bd, warnIfWorkerUrlMissing as be, zoomToScale as bf, type ClusterFeatureProperties as c, type ClusterLayerStyles as d, type ClusterMapBoundsExpander as e, type ClusterMapExpander as f, type ClusterMapReader as g, type ClusterTextStyleOptions as h, type ClusterableGeoJSONSource as i, type ColorExpression as j, type CoordinateValidationResult as k, type DeckHostMap as l, type DynamicLODOptions as m, type DynamicLODState as n, type FilterExpression as o, type FilterOperator as p, type FilterValue as q, type GeoJSONFingerprint as r, type GroupFeaturesOptions as s, type LODDataWithSimplification as t, type LoadGeoJSONOptions as u, type LoadGeoJSONResult as v, type LotFillStyleOptions as w, type LotOutlineStyleOptions as x, type MapLibreWorkerApi as y, type PaintPropsDiff as z };
|
|
@@ -225,9 +225,9 @@ interface LotFillStyleOptions {
|
|
|
225
225
|
* @example
|
|
226
226
|
* ```tsx
|
|
227
227
|
* const fillStyle = createLotFillStyle({
|
|
228
|
-
* defaultColor: '#
|
|
229
|
-
* hoverColor: '#
|
|
230
|
-
* selectedColor: '#
|
|
228
|
+
* defaultColor: '#34999c', // Accent Teal
|
|
229
|
+
* hoverColor: '#1b373b', // Heritage Teal
|
|
230
|
+
* selectedColor: '#2b4660', // Steel Navy
|
|
231
231
|
* opacity: 0.7,
|
|
232
232
|
* });
|
|
233
233
|
*
|
|
@@ -264,8 +264,8 @@ interface LotOutlineStyleOptions {
|
|
|
264
264
|
* @example
|
|
265
265
|
* ```tsx
|
|
266
266
|
* const outlineStyle = createLotOutlineStyle({
|
|
267
|
-
* defaultColor: '#
|
|
268
|
-
* hoverColor: '#
|
|
267
|
+
* defaultColor: '#50504f', // Grey 01
|
|
268
|
+
* hoverColor: '#1b373b', // Heritage Teal
|
|
269
269
|
* defaultWidth: 1,
|
|
270
270
|
* hoverWidth: 2,
|
|
271
271
|
* });
|
|
@@ -325,15 +325,15 @@ declare function createExtrusionHeightExpression(property: string, options?: Ext
|
|
|
325
325
|
* Commonly used for real estate lot statuses like available, sold, pending.
|
|
326
326
|
*
|
|
327
327
|
* @param statusColors - Map of status values to colors
|
|
328
|
-
* @param defaultColor - Fallback color for unknown statuses (default: '#
|
|
328
|
+
* @param defaultColor - Fallback color for unknown statuses (default: Grey 02, '#767574', 4.29:1 on the basemap land)
|
|
329
329
|
*
|
|
330
330
|
* @example
|
|
331
331
|
* ```tsx
|
|
332
332
|
* const statusColorExpr = createStatusColorExpression({
|
|
333
|
-
* available: '#
|
|
334
|
-
* pending: '#
|
|
335
|
-
* sold: '#
|
|
336
|
-
* reserved: '#
|
|
333
|
+
* available: '#1b373b', // Heritage Teal
|
|
334
|
+
* pending: '#34999c', // Accent Teal
|
|
335
|
+
* sold: '#767574', // Grey 02 (sold is not a problem: no red)
|
|
336
|
+
* reserved: '#2b4660', // Steel Navy
|
|
337
337
|
* });
|
|
338
338
|
*
|
|
339
339
|
* <FillLayer fillColor={statusColorExpr} />
|
|
@@ -352,8 +352,8 @@ declare function createStatusColorExpression(statusColors: Record<string, string
|
|
|
352
352
|
* @example
|
|
353
353
|
* ```tsx
|
|
354
354
|
* const colorExpr = createInteractiveStatusColorExpression(
|
|
355
|
-
* { available: '#
|
|
356
|
-
* { hoverColor: '#
|
|
355
|
+
* { available: '#1b373b', sold: '#767574' },
|
|
356
|
+
* { hoverColor: '#34999c', selectedColor: '#2b4660' }
|
|
357
357
|
* );
|
|
358
358
|
*
|
|
359
359
|
* <FillLayer fillColor={colorExpr} />
|
|
@@ -829,11 +829,11 @@ declare function expandClusterToBounds(map: ClusterMapBoundsExpander, sourceId:
|
|
|
829
829
|
* Options for cluster circle layer style
|
|
830
830
|
*/
|
|
831
831
|
interface ClusterCircleStyleOptions {
|
|
832
|
-
/** Base color for small clusters (default:
|
|
832
|
+
/** Base color for small clusters (default: Heritage Teal) */
|
|
833
833
|
smallColor?: string;
|
|
834
|
-
/** Color for medium clusters (default:
|
|
834
|
+
/** Color for medium clusters (default: Steel Navy) */
|
|
835
835
|
mediumColor?: string;
|
|
836
|
-
/** Color for large clusters (default:
|
|
836
|
+
/** Color for large clusters (default: Aubergine) */
|
|
837
837
|
largeColor?: string;
|
|
838
838
|
/** Point count threshold for medium size (default: 100) */
|
|
839
839
|
mediumThreshold?: number;
|
|
@@ -856,7 +856,7 @@ interface ClusterCircleStyleOptions {
|
|
|
856
856
|
* Options for cluster text layer style
|
|
857
857
|
*/
|
|
858
858
|
interface ClusterTextStyleOptions {
|
|
859
|
-
/** Text color (default:
|
|
859
|
+
/** Text color (default: White, 6.7:1 or more on the default circles) */
|
|
860
860
|
textColor?: string;
|
|
861
861
|
/** Text size (default: 12) */
|
|
862
862
|
textSize?: number;
|
|
@@ -869,7 +869,7 @@ interface ClusterTextStyleOptions {
|
|
|
869
869
|
* Options for unclustered point layer style
|
|
870
870
|
*/
|
|
871
871
|
interface UnclusteredPointStyleOptions {
|
|
872
|
-
/** Point color (default:
|
|
872
|
+
/** Point color (default: Heritage Teal) */
|
|
873
873
|
color?: string;
|
|
874
874
|
/** Point radius (default: 8) */
|
|
875
875
|
radius?: number;
|
|
@@ -907,9 +907,9 @@ interface ClusterLayerStyles {
|
|
|
907
907
|
* @example
|
|
908
908
|
* ```tsx
|
|
909
909
|
* const styles = createClusterStyles({
|
|
910
|
-
* smallColor: '#
|
|
911
|
-
* mediumColor: '#
|
|
912
|
-
* largeColor: '#
|
|
910
|
+
* smallColor: '#1b373b', // Heritage Teal
|
|
911
|
+
* mediumColor: '#2b4660', // Steel Navy
|
|
912
|
+
* largeColor: '#6a5280', // Aubergine
|
|
913
913
|
* });
|
|
914
914
|
*
|
|
915
915
|
* <Source id="points" type="geojson" data={data} cluster={true}>
|
|
@@ -948,7 +948,7 @@ declare function createClusterStyles(options?: {
|
|
|
948
948
|
* <CircleLayer
|
|
949
949
|
* id="clusters"
|
|
950
950
|
* filter={['has', 'point_count']}
|
|
951
|
-
* paint={createClusterCirclePaint({ smallColor: '#
|
|
951
|
+
* paint={createClusterCirclePaint({ smallColor: '#2b4660' })}
|
|
952
952
|
* />
|
|
953
953
|
* ```
|
|
954
954
|
*/
|
|
@@ -1533,4 +1533,29 @@ declare function resetWorkerUrlWarning(): void;
|
|
|
1533
1533
|
*/
|
|
1534
1534
|
declare function warnIfWorkerUrlMissing(maplibregl: MapLibreWorkerApi, log?: (message: string) => void): boolean;
|
|
1535
1535
|
|
|
1536
|
-
|
|
1536
|
+
/**
|
|
1537
|
+
* deck.gl interleaving guard.
|
|
1538
|
+
*
|
|
1539
|
+
* `@deck.gl/mapbox` draws interleaved layers from a MapLibre custom layer and
|
|
1540
|
+
* reads the camera from the map's undocumented `map.transform` (`height`,
|
|
1541
|
+
* `_nearZ`, `elevation`). MapLibre 6 moved the camera out of the `Map` class
|
|
1542
|
+
* into `map._camera`, so `map.transform` is `undefined` there and every
|
|
1543
|
+
* interleaved frame throws `Cannot read properties of undefined (reading
|
|
1544
|
+
* 'height')`. As of deck.gl 9.4.1 (and 10.0.0-alpha.1) no release handles it.
|
|
1545
|
+
*
|
|
1546
|
+
* Overlaid rendering (deck.gl's own canvas stacked above the map) only uses the
|
|
1547
|
+
* public camera API (`getCenter`, `getZoom`, ...), so it keeps working. The
|
|
1548
|
+
* check is on the property, not the MapLibre version, so interleaving comes
|
|
1549
|
+
* back on its own once either side restores it.
|
|
1550
|
+
*/
|
|
1551
|
+
/** Anything that might be a MapLibre/Mapbox map. */
|
|
1552
|
+
type DeckHostMap = object | null | undefined;
|
|
1553
|
+
/** Whether deck.gl can render interleaved into this map. */
|
|
1554
|
+
declare function supportsDeckInterleaving(map: DeckHostMap): boolean;
|
|
1555
|
+
/**
|
|
1556
|
+
* The `interleaved` value to hand `MapboxOverlay`: the requested one, or
|
|
1557
|
+
* `false` when the map cannot be drawn into interleaved (see above).
|
|
1558
|
+
*/
|
|
1559
|
+
declare function resolveDeckInterleaved(map: DeckHostMap, requested: boolean): boolean;
|
|
1560
|
+
|
|
1561
|
+
export { createClusterTextLayout as $, type SimplificationThreshold as A, applyMarkerChildProtection as B, type ClusterCircleStyleOptions as C, DEFAULT_SIMPLIFICATION_THRESHOLDS as D, type ExtrusionHeightOptions as E, type FeatureGroup as F, type GenerateLODOptions as G, applyMarkerProtection as H, boundsToPolygon as I, calculateBounds as J, KEYBOARD_CONTROLS as K, type LODData as L, MARKER_PROTECTION_CLASS as M, type NumberExpression as N, calculateCentroid as O, type PaintProps as P, calculateZoomThresholds as Q, clampLatitude as R, type SimplificationStats as S, combineBounds as T, type UnclusteredPointStyleOptions as U, type ValidationResult as V, countFeaturesByType as W, createCategoricalColorExpression as X, createCircleStyle as Y, createClusterCirclePaint as Z, createClusterStyles as _, type ClusterExpandOptions as a, loadGeoJSON as a$, createContinuousColorExpression as a0, createDynamicLODManager as a1, createExtrusionHeightExpression as a2, createExtrusionStyle as a3, createFillStyle as a4, createGeoJSONFingerprint as a5, createHeatmapStyle as a6, createHoverExpression as a7, createInteractiveExpression as a8, createInteractiveStatusColorExpression as a9, generateBoundingPolygon as aA, generateConvexHull as aB, generateFeatureCollectionDescription as aC, generateFeatureTable as aD, generateKeyboardControlsDescription as aE, generateLODData as aF, generateLODDataWithSimplification as aG, generateMapDescription as aH, generateMarkerList as aI, generateMarkersDescription as aJ, generateMoveAnnouncement as aK, geoJSONEqual as aL, getChangedPaintProps as aM, getClusterBounds as aN, getClusterChildren as aO, getClusterExpansionZoom as aP, getClusterLeaves as aQ, getGridNavigationIndex as aR, getHighlightStyle as aS, getSelectionStyle as aT, getSimplificationToleranceForZoom as aU, getSimplifiedFeaturesForZoom as aV, groupFeaturesByProperty as aW, isClusterFeature as aX, isValidBounds as aY, isValidLatitude as aZ, isValidLongitude as a_, createLineStyle as aa, createLotFillStyle as ab, createLotOutlineStyle as ac, createSelectionExpression as ad, createStatusColorExpression as ae, createZoomExpression as af, decimalToDMS as ag, deepEqual as ah, ensureValidCoordinates as ai, expandCluster as aj, expandClusterToBounds as ak, extendBounds as al, filterByGeometryType as am, filterEqual as an, fingerprintEqual as ao, formatArea as ap, formatBearing as aq, formatBounds as ar, formatCoordinates as as, formatDistance as at, formatFeatureProperties as au, formatLabel as av, formatPitch as aw, formatPropertyValue as ax, formatScale as ay, formatZoom as az, type ClusterExpansionResult as b, normalizeLongitude as b0, paintPropsEqual as b1, removeMarkerProtection as b2, resetWorkerUrlWarning as b3, resolveDeckInterleaved as b4, serializeFilter as b5, simplifyFeature as b6, simplifyFeatureCollection as b7, simplifyFeatureCollectionWithStats as b8, simplifyPolygon as b9, supportsDeckInterleaving as ba, validateBoundsArray as bb, validateCoordinates as bc, validateGeoJSON as bd, warnIfWorkerUrlMissing as be, zoomToScale as bf, type ClusterFeatureProperties as c, type ClusterLayerStyles as d, type ClusterMapBoundsExpander as e, type ClusterMapExpander as f, type ClusterMapReader as g, type ClusterTextStyleOptions as h, type ClusterableGeoJSONSource as i, type ColorExpression as j, type CoordinateValidationResult as k, type DeckHostMap as l, type DynamicLODOptions as m, type DynamicLODState as n, type FilterExpression as o, type FilterOperator as p, type FilterValue as q, type GeoJSONFingerprint as r, type GroupFeaturesOptions as s, type LODDataWithSimplification as t, type LoadGeoJSONOptions as u, type LoadGeoJSONResult as v, type LotFillStyleOptions as w, type LotOutlineStyleOptions as x, type MapLibreWorkerApi as y, type PaintPropsDiff as z };
|