@classic-homes/maps-core 0.7.2 → 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/README.md CHANGED
@@ -159,7 +159,7 @@ const lodManager = createDynamicLODManager({
159
159
  ```typescript
160
160
  import { createGeoJSONFingerprint, fingerprintEqual, geoJSONEqual } from '@classic-homes/maps-core';
161
161
 
162
- // O(1) equality check instead of deep comparison
162
+ // Count, first/last id and a hash of every feature: catches any change in one pass
163
163
  const prevFingerprint = createGeoJSONFingerprint(prevData);
164
164
  const nextFingerprint = createGeoJSONFingerprint(nextData);
165
165
 
@@ -1,35 +1,37 @@
1
- import { fontFamily, colors, semanticColors } from '@classic-homes/theme-tokens';
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: colors.white,
9
- water: colors.sky[200],
10
- land: colors.sage[50],
11
- park: colors.forest[100],
12
- building: colors.gray[200],
13
- buildingOutline: colors.gray[300],
14
- roadPrimary: colors.white,
15
- roadSecondary: colors.gray[100],
16
- roadCasing: colors.gray[300],
17
- rail: colors.gray[400],
18
- boundary: colors.gray[400],
19
- adminBoundary: colors.plum[300],
20
- residential: colors.sage[100],
21
- commercial: colors.stone[100],
22
- industrial: colors.gray[200],
23
- highlight: colors.teal[500],
24
- // Core 1 - brand teal
25
- highlightSecondary: colors.teal[300],
26
- selection: colors.red[500],
27
- // Brand red
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: colors.white,
31
- poi: colors.navy[700],
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
- sequence: [
69
- colors.teal[500],
70
- // chart.1
71
- colors.navy[700],
72
- // chart.2
73
- colors.plum[700],
74
- // chart.3
75
- colors.forest[500],
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,4 @@
1
- import { lightTheme, THEME_DARK, darkTheme } from './chunk-ZGUACUEF.js';
1
+ import { lightTheme, THEME_DARK, darkTheme } from './chunk-KEBZDTH3.js';
2
2
 
3
3
  // src/theme/style.ts
4
4
  var DEFAULT_TILE_SOURCE = {
@@ -1,4 +1,5 @@
1
- import { lightTheme } from './chunk-ZGUACUEF.js';
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 = "#888888") {
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 = "#888888" } = options;
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
- smallColor = "#51bbd6",
1143
- mediumColor = "#f1f075",
1144
- largeColor = "#f28cb1",
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 = "#fff",
1171
+ strokeColor = clusterColors.stroke,
1151
1172
  strokeWidth = 2,
1152
1173
  opacity = 0.85
1153
1174
  } = options.circle ?? {};
1154
1175
  const {
1155
- textColor = "#333",
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 = "#11b4da",
1182
+ color: pointColor = clusterColors.small,
1162
1183
  radius: pointRadius = 8,
1163
- strokeColor: pointStrokeColor = "#fff",
1184
+ strokeColor: pointStrokeColor = clusterColors.stroke,
1164
1185
  strokeWidth: pointStrokeWidth = 1
1165
1186
  } = options.unclusteredPoint ?? {};
1166
1187
  return {
@@ -2680,24 +2701,72 @@ function createGeoJSONFingerprint(data) {
2680
2701
  if (data.type !== "FeatureCollection") return null;
2681
2702
  const features = data.features;
2682
2703
  if (!features || !Array.isArray(features)) {
2683
- return { count: 0, firstId: void 0, lastId: void 0 };
2704
+ return { count: 0, firstId: void 0, lastId: void 0, hash: 0 };
2684
2705
  }
2685
2706
  const count = features.length;
2686
2707
  if (count === 0) {
2687
- return { count: 0, firstId: void 0, lastId: void 0 };
2708
+ return { count: 0, firstId: void 0, lastId: void 0, hash: 0 };
2688
2709
  }
2689
2710
  const firstFeature = features[0];
2690
2711
  const lastFeature = features[count - 1];
2691
2712
  return {
2692
2713
  count,
2693
2714
  firstId: firstFeature?.id,
2694
- lastId: lastFeature?.id
2715
+ lastId: lastFeature?.id,
2716
+ hash: hashValue(SEED, features)
2695
2717
  };
2696
2718
  }
2719
+ var SEED = 2166136261;
2720
+ var TAG_NULL = 1;
2721
+ var TAG_FALSE = 2;
2722
+ var TAG_TRUE = 3;
2723
+ var TAG_NUMBER = 4;
2724
+ var TAG_STRING = 5;
2725
+ var TAG_ARRAY = 6;
2726
+ var TAG_OBJECT = 7;
2727
+ var TAG_UNDEFINED = 8;
2728
+ var float = new Float64Array(1);
2729
+ var floatWords = new Uint32Array(float.buffer);
2730
+ function mix(hash, word) {
2731
+ hash = Math.imul(hash ^ word, 1540483477);
2732
+ return hash ^ hash >>> 15;
2733
+ }
2734
+ function hashString(hash, value) {
2735
+ hash = mix(mix(hash, TAG_STRING), value.length);
2736
+ for (let i = 0; i < value.length; i++) hash = mix(hash, value.charCodeAt(i));
2737
+ return hash;
2738
+ }
2739
+ function hashValue(hash, value) {
2740
+ switch (typeof value) {
2741
+ case "number":
2742
+ float[0] = value;
2743
+ return mix(mix(mix(hash, TAG_NUMBER), floatWords[0]), floatWords[1]);
2744
+ case "string":
2745
+ return hashString(hash, value);
2746
+ case "boolean":
2747
+ return mix(hash, value ? TAG_TRUE : TAG_FALSE);
2748
+ case "object": {
2749
+ if (value === null) return mix(hash, TAG_NULL);
2750
+ if (Array.isArray(value)) {
2751
+ hash = mix(mix(hash, TAG_ARRAY), value.length);
2752
+ for (let i = 0; i < value.length; i++) hash = hashValue(hash, value[i]);
2753
+ return hash;
2754
+ }
2755
+ hash = mix(hash, TAG_OBJECT);
2756
+ for (const key in value) {
2757
+ if (!Object.prototype.hasOwnProperty.call(value, key)) continue;
2758
+ hash = hashValue(hashString(hash, key), value[key]);
2759
+ }
2760
+ return hash;
2761
+ }
2762
+ default:
2763
+ return mix(hash, TAG_UNDEFINED);
2764
+ }
2765
+ }
2697
2766
  function fingerprintEqual(a, b) {
2698
2767
  if (a === null && b === null) return true;
2699
2768
  if (a === null || b === null) return false;
2700
- return a.count === b.count && a.firstId === b.firstId && a.lastId === b.lastId;
2769
+ return a.count === b.count && a.firstId === b.firstId && a.lastId === b.lastId && a.hash === b.hash;
2701
2770
  }
2702
2771
  function geoJSONEqual(a, b) {
2703
2772
  if (typeof a === "string" || typeof b === "string") {
@@ -2879,4 +2948,14 @@ function warnIfWorkerUrlMissing(maplibregl, log = console.warn) {
2879
2948
  }
2880
2949
  }
2881
2950
 
2882
- export { DEFAULT_SIMPLIFICATION_THRESHOLDS, KEYBOARD_CONTROLS, MARKER_PROTECTION_CLASS, applyMarkerChildProtection, applyMarkerProtection, boundsToPolygon, buildRTreeIndex, buildSpatialIndex, calculateBounds, calculateCentroid, calculateZoomThresholds, clampLatitude, 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, normalizeLongitude, normalizePadding, paintPropsEqual, panToFitPopup, prefersReducedMotion, queryByBounds, queryByBoundsWithStats, queryRTreeByBounds, queryRTreeByBoundsWithStats, removeMarkerProtection, resetWorkerUrlWarning, serializeFilter, simplifyFeature, simplifyFeatureCollection, simplifyFeatureCollectionWithStats, simplifyPolygon, validateBoundsArray, validateCoordinates, validateGeoJSON, warnIfWorkerUrlMissing, zoomToScale };
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: '#22c55e',
229
- * hoverColor: '#3b82f6',
230
- * selectedColor: '#f59e0b',
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: '#333',
268
- * hoverColor: '#1d4ed8',
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: '#888888')
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: '#22c55e', // green
334
- * pending: '#f59e0b', // amber
335
- * sold: '#ef4444', // red
336
- * reserved: '#3b82f6', // blue
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: '#22c55e', sold: '#ef4444' },
356
- * { hoverColor: '#3b82f6', selectedColor: '#f59e0b' }
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: '#51bbd6') */
832
+ /** Base color for small clusters (default: Heritage Teal) */
833
833
  smallColor?: string;
834
- /** Color for medium clusters (default: '#f1f075') */
834
+ /** Color for medium clusters (default: Steel Navy) */
835
835
  mediumColor?: string;
836
- /** Color for large clusters (default: '#f28cb1') */
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: '#333') */
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: '#11b4da') */
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: '#3b82f6',
911
- * mediumColor: '#f59e0b',
912
- * largeColor: '#ef4444',
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: '#3b82f6' })}
951
+ * paint={createClusterCirclePaint({ smallColor: '#2b4660' })}
952
952
  * />
953
953
  * ```
954
954
  */
@@ -1325,14 +1325,18 @@ declare function getSimplificationToleranceForZoom(zoom: number, baseToleranceAt
1325
1325
  declare const DEFAULT_SIMPLIFICATION_THRESHOLDS: SimplificationThreshold[];
1326
1326
 
1327
1327
  /**
1328
- * Fast O(1) fingerprinting utilities for GeoJSON data equality checking.
1328
+ * Fingerprinting utilities for GeoJSON data equality checking.
1329
1329
  *
1330
- * Instead of deep comparing potentially 100k+ features, we compare:
1331
- * - Feature count
1332
- * - First feature ID
1333
- * - Last feature ID
1330
+ * A fingerprint is the feature count, the first and last feature ids, and a
1331
+ * hash of every feature's id, geometry and properties. It is built in one pass
1332
+ * without serialising the data, so it costs far less than the `setData` it
1333
+ * guards (which structured-clones and re-parses the whole collection in the
1334
+ * worker).
1334
1335
  *
1335
- * This provides a fast, reliable check for most data update scenarios.
1336
+ * The hash is what makes it reliable: count and first/last id alone miss a
1337
+ * filter that keeps as many features, a change in the middle of the
1338
+ * collection, any geometry or property edit, and every change at all when the
1339
+ * features carry no top-level ids.
1336
1340
  */
1337
1341
 
1338
1342
  /**
@@ -1345,9 +1349,12 @@ interface GeoJSONFingerprint {
1345
1349
  firstId: string | number | undefined;
1346
1350
  /** ID of the last feature (undefined if no features or no ID) */
1347
1351
  lastId: string | number | undefined;
1352
+ /** Hash of every feature's id, geometry and properties (0 for no features) */
1353
+ hash: number;
1348
1354
  }
1349
1355
  /**
1350
- * Creates a fast O(1) fingerprint for a GeoJSON FeatureCollection.
1356
+ * Creates a fingerprint for a GeoJSON FeatureCollection. Linear in the size of
1357
+ * the data; two collections with the same content get the same fingerprint.
1351
1358
  *
1352
1359
  * @param data - GeoJSON data to fingerprint
1353
1360
  * @returns Fingerprint object or null if data is not a FeatureCollection
@@ -1358,16 +1365,16 @@ declare function createGeoJSONFingerprint(data: GeoJSONFeatureCollection | GeoJS
1358
1365
  *
1359
1366
  * @param a - First fingerprint
1360
1367
  * @param b - Second fingerprint
1361
- * @returns true if fingerprints match (data likely unchanged)
1368
+ * @returns true if fingerprints match (data unchanged)
1362
1369
  */
1363
1370
  declare function fingerprintEqual(a: GeoJSONFingerprint | null, b: GeoJSONFingerprint | null): boolean;
1364
1371
  /**
1365
- * Checks if two GeoJSON data objects are equal based on their fingerprints.
1366
- * This is a fast O(1) check that works for most practical scenarios.
1372
+ * Checks if two GeoJSON data objects are equal based on their fingerprints:
1373
+ * same features, ids, geometry and properties.
1367
1374
  *
1368
1375
  * @param a - First GeoJSON data
1369
1376
  * @param b - Second GeoJSON data
1370
- * @returns true if data is likely unchanged based on fingerprints
1377
+ * @returns true if the data is unchanged (barring a 32-bit hash collision)
1371
1378
  */
1372
1379
  declare function geoJSONEqual(a: GeoJSONFeatureCollection | GeoJSON.GeoJSON | string | null | undefined, b: GeoJSONFeatureCollection | GeoJSON.GeoJSON | string | null | undefined): boolean;
1373
1380
 
@@ -1526,4 +1533,29 @@ declare function resetWorkerUrlWarning(): void;
1526
1533
  */
1527
1534
  declare function warnIfWorkerUrlMissing(maplibregl: MapLibreWorkerApi, log?: (message: string) => void): boolean;
1528
1535
 
1529
- export { createContinuousColorExpression as $, applyMarkerChildProtection as A, applyMarkerProtection as B, type ClusterCircleStyleOptions as C, DEFAULT_SIMPLIFICATION_THRESHOLDS as D, type ExtrusionHeightOptions as E, type FeatureGroup as F, type GenerateLODOptions as G, boundsToPolygon as H, calculateBounds as I, calculateCentroid as J, KEYBOARD_CONTROLS as K, type LODData as L, MARKER_PROTECTION_CLASS as M, type NumberExpression as N, calculateZoomThresholds as O, type PaintProps as P, clampLatitude as Q, combineBounds as R, type SimplificationStats as S, countFeaturesByType as T, type UnclusteredPointStyleOptions as U, type ValidationResult as V, createCategoricalColorExpression as W, createCircleStyle as X, createClusterCirclePaint as Y, createClusterStyles as Z, createClusterTextLayout as _, type ClusterExpandOptions as a, normalizeLongitude as a$, createDynamicLODManager as a0, createExtrusionHeightExpression as a1, createExtrusionStyle as a2, createFillStyle as a3, createGeoJSONFingerprint as a4, createHeatmapStyle as a5, createHoverExpression as a6, createInteractiveExpression as a7, createInteractiveStatusColorExpression as a8, createLineStyle as a9, generateConvexHull as aA, generateFeatureCollectionDescription as aB, generateFeatureTable as aC, generateKeyboardControlsDescription as aD, generateLODData as aE, generateLODDataWithSimplification as aF, generateMapDescription as aG, generateMarkerList as aH, generateMarkersDescription as aI, generateMoveAnnouncement as aJ, geoJSONEqual as aK, getChangedPaintProps as aL, getClusterBounds as aM, getClusterChildren as aN, getClusterExpansionZoom as aO, getClusterLeaves as aP, getGridNavigationIndex as aQ, getHighlightStyle as aR, getSelectionStyle as aS, getSimplificationToleranceForZoom as aT, getSimplifiedFeaturesForZoom as aU, groupFeaturesByProperty as aV, isClusterFeature as aW, isValidBounds as aX, isValidLatitude as aY, isValidLongitude as aZ, loadGeoJSON as a_, createLotFillStyle as aa, createLotOutlineStyle as ab, createSelectionExpression as ac, createStatusColorExpression as ad, createZoomExpression as ae, decimalToDMS as af, deepEqual as ag, ensureValidCoordinates as ah, expandCluster as ai, expandClusterToBounds as aj, extendBounds as ak, filterByGeometryType as al, filterEqual as am, fingerprintEqual as an, formatArea as ao, formatBearing as ap, formatBounds as aq, formatCoordinates as ar, formatDistance as as, formatFeatureProperties as at, formatLabel as au, formatPitch as av, formatPropertyValue as aw, formatScale as ax, formatZoom as ay, generateBoundingPolygon as az, type ClusterExpansionResult as b, paintPropsEqual as b0, removeMarkerProtection as b1, resetWorkerUrlWarning as b2, serializeFilter as b3, simplifyFeature as b4, simplifyFeatureCollection as b5, simplifyFeatureCollectionWithStats as b6, simplifyPolygon as b7, validateBoundsArray as b8, validateCoordinates as b9, validateGeoJSON as ba, warnIfWorkerUrlMissing as bb, zoomToScale as bc, 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 DynamicLODOptions as l, type DynamicLODState as m, type FilterExpression as n, type FilterOperator as o, type FilterValue as p, type GeoJSONFingerprint as q, type GroupFeaturesOptions as r, type LODDataWithSimplification as s, type LoadGeoJSONOptions as t, type LoadGeoJSONResult as u, type LotFillStyleOptions as v, type LotOutlineStyleOptions as w, type MapLibreWorkerApi as x, type PaintPropsDiff as y, type SimplificationThreshold as z };
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 };