@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/dist/index.cjs CHANGED
@@ -13,31 +13,33 @@ var THEME_LIGHT = "classic-light";
13
13
  var THEME_DARK = "classic-dark";
14
14
  function generateLightColors() {
15
15
  return {
16
- background: themeTokens.colors.white,
17
- water: themeTokens.colors.sky[200],
18
- land: themeTokens.colors.sage[50],
19
- park: themeTokens.colors.forest[100],
20
- building: themeTokens.colors.gray[200],
21
- buildingOutline: themeTokens.colors.gray[300],
22
- roadPrimary: themeTokens.colors.white,
23
- roadSecondary: themeTokens.colors.gray[100],
24
- roadCasing: themeTokens.colors.gray[300],
25
- rail: themeTokens.colors.gray[400],
26
- boundary: themeTokens.colors.gray[400],
27
- adminBoundary: themeTokens.colors.plum[300],
28
- residential: themeTokens.colors.sage[100],
29
- commercial: themeTokens.colors.stone[100],
30
- industrial: themeTokens.colors.gray[200],
31
- highlight: themeTokens.colors.teal[500],
32
- // Core 1 - brand teal
33
- highlightSecondary: themeTokens.colors.teal[300],
34
- selection: themeTokens.colors.red[500],
35
- // Brand red
16
+ background: themeTokens.ch.white,
17
+ water: themeTokens.ch.accentTeal100,
18
+ // Shallows
19
+ land: themeTokens.ch.paper,
20
+ park: themeTokens.ch.linen,
21
+ building: themeTokens.ch.linen,
22
+ buildingOutline: themeTokens.ch.lichen,
23
+ roadPrimary: themeTokens.ch.white,
24
+ roadSecondary: themeTokens.ch.white,
25
+ roadCasing: themeTokens.ch.lichen,
26
+ rail: themeTokens.ch.sage500,
27
+ boundary: themeTokens.ch.sage500,
28
+ adminBoundary: themeTokens.ch.sage600,
29
+ residential: themeTokens.ch.paper,
30
+ commercial: themeTokens.ch.linen,
31
+ industrial: themeTokens.ch.linen,
32
+ highlight: themeTokens.ch.heritageTeal,
33
+ // hovered: 11.30:1 on land
34
+ highlightSecondary: themeTokens.ch.accentTeal,
35
+ // resting: 3.03:1 on land
36
+ // Selection is not an error: Steel Navy (8.71:1 on land), with the width
37
+ // step in getHighlightStyle, not red
38
+ selection: themeTokens.ch.collection.classic,
36
39
  textPrimary: themeTokens.semanticColors.light.foreground,
37
40
  textSecondary: themeTokens.semanticColors.light.mutedForeground,
38
- textHalo: themeTokens.colors.white,
39
- poi: themeTokens.colors.navy[700],
40
- // Core 2 - brand navy
41
+ textHalo: themeTokens.ch.white,
42
+ poi: themeTokens.ch.heritageTeal,
41
43
  labelBackground: "rgba(255, 255, 255, 0.85)"
42
44
  };
43
45
  }
@@ -72,32 +74,16 @@ function generateDarkColors() {
72
74
  };
73
75
  }
74
76
  function generateLightDataColors() {
77
+ const { chart } = themeTokens.semanticColors.light;
75
78
  return {
76
- sequence: [
77
- themeTokens.colors.teal[500],
78
- // chart.1
79
- themeTokens.colors.navy[700],
80
- // chart.2
81
- themeTokens.colors.plum[700],
82
- // chart.3
83
- themeTokens.colors.forest[500],
84
- // chart.4
85
- themeTokens.colors.sky[600]
86
- // chart.5
87
- ],
88
- positive: themeTokens.colors.forest[500],
89
- negative: themeTokens.colors.red[500],
90
- neutral: themeTokens.colors.gray[500],
91
- heatmapRamp: [
92
- "rgba(59, 164, 167, 0)",
93
- // teal transparent
94
- themeTokens.colors.teal[200],
95
- themeTokens.colors.teal[400],
96
- themeTokens.colors.teal[500],
97
- themeTokens.colors.red[400],
98
- themeTokens.colors.red[500],
99
- themeTokens.colors.red[600]
100
- ]
79
+ // The chart series colours, each 3:1 or more on White
80
+ sequence: [chart[1], chart[2], chart[3], chart[4], chart[5]],
81
+ positive: themeTokens.ch.heritageTeal,
82
+ negative: themeTokens.ch.foundersRed,
83
+ neutral: themeTokens.ch.grey02,
84
+ // One teal ramp (Shallows, Accent Teal, Heritage Teal); no red in it, since
85
+ // red means a problem in v2.5
86
+ heatmapRamp: ["rgba(216, 237, 237, 0)", themeTokens.ch.accentTeal100, themeTokens.ch.accentTeal, themeTokens.ch.heritageTeal]
101
87
  };
102
88
  }
103
89
  function generateDarkDataColors() {
@@ -173,7 +159,7 @@ var OSM_RASTER_SOURCE = {
173
159
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
174
160
  };
175
161
  function generateBasicStyle(theme = lightTheme) {
176
- const colors3 = theme.colors;
162
+ const colors2 = theme.colors;
177
163
  return {
178
164
  version: 8,
179
165
  name: `Classic Theme - ${theme.name}`,
@@ -185,7 +171,7 @@ function generateBasicStyle(theme = lightTheme) {
185
171
  id: "background",
186
172
  type: "background",
187
173
  paint: {
188
- "background-color": colors3.background
174
+ "background-color": colors2.background
189
175
  }
190
176
  },
191
177
  {
@@ -205,19 +191,19 @@ function generateBasicStyle(theme = lightTheme) {
205
191
  }
206
192
  };
207
193
  }
208
- function createWaterLayer(colors3) {
194
+ function createWaterLayer(colors2) {
209
195
  return {
210
196
  id: "water",
211
197
  type: "fill",
212
198
  source: "openmaptiles",
213
199
  "source-layer": "water",
214
200
  paint: {
215
- "fill-color": colors3.water,
201
+ "fill-color": colors2.water,
216
202
  "fill-opacity": 1
217
203
  }
218
204
  };
219
205
  }
220
- function createLanduseLayers(colors3) {
206
+ function createLanduseLayers(colors2) {
221
207
  return [
222
208
  {
223
209
  id: "landuse-residential",
@@ -226,7 +212,7 @@ function createLanduseLayers(colors3) {
226
212
  "source-layer": "landuse",
227
213
  filter: ["==", "class", "residential"],
228
214
  paint: {
229
- "fill-color": colors3.residential,
215
+ "fill-color": colors2.residential,
230
216
  "fill-opacity": 0.6
231
217
  }
232
218
  },
@@ -237,7 +223,7 @@ function createLanduseLayers(colors3) {
237
223
  "source-layer": "landuse",
238
224
  filter: ["==", "class", "commercial"],
239
225
  paint: {
240
- "fill-color": colors3.commercial,
226
+ "fill-color": colors2.commercial,
241
227
  "fill-opacity": 0.6
242
228
  }
243
229
  },
@@ -248,7 +234,7 @@ function createLanduseLayers(colors3) {
248
234
  "source-layer": "landuse",
249
235
  filter: ["==", "class", "industrial"],
250
236
  paint: {
251
- "fill-color": colors3.industrial,
237
+ "fill-color": colors2.industrial,
252
238
  "fill-opacity": 0.6
253
239
  }
254
240
  },
@@ -259,13 +245,13 @@ function createLanduseLayers(colors3) {
259
245
  "source-layer": "landuse",
260
246
  filter: ["in", "class", "park", "grass", "cemetery"],
261
247
  paint: {
262
- "fill-color": colors3.park,
248
+ "fill-color": colors2.park,
263
249
  "fill-opacity": 0.8
264
250
  }
265
251
  }
266
252
  ];
267
253
  }
268
- function createBuildingLayers(colors3) {
254
+ function createBuildingLayers(colors2) {
269
255
  return [
270
256
  {
271
257
  id: "building",
@@ -274,7 +260,7 @@ function createBuildingLayers(colors3) {
274
260
  "source-layer": "building",
275
261
  minzoom: 13,
276
262
  paint: {
277
- "fill-color": colors3.building,
263
+ "fill-color": colors2.building,
278
264
  "fill-opacity": ["interpolate", ["linear"], ["zoom"], 13, 0, 15, 1]
279
265
  }
280
266
  },
@@ -285,14 +271,14 @@ function createBuildingLayers(colors3) {
285
271
  "source-layer": "building",
286
272
  minzoom: 13,
287
273
  paint: {
288
- "line-color": colors3.buildingOutline,
274
+ "line-color": colors2.buildingOutline,
289
275
  "line-width": 1,
290
276
  "line-opacity": ["interpolate", ["linear"], ["zoom"], 13, 0, 15, 1]
291
277
  }
292
278
  }
293
279
  ];
294
280
  }
295
- function createRoadLayers(colors3) {
281
+ function createRoadLayers(colors2) {
296
282
  return [
297
283
  // Road casings (outlines)
298
284
  {
@@ -302,7 +288,7 @@ function createRoadLayers(colors3) {
302
288
  "source-layer": "transportation",
303
289
  filter: ["in", "class", "primary", "trunk", "motorway"],
304
290
  paint: {
305
- "line-color": colors3.roadCasing,
291
+ "line-color": colors2.roadCasing,
306
292
  "line-width": ["interpolate", ["linear"], ["zoom"], 5, 0.5, 12, 4, 18, 20]
307
293
  },
308
294
  layout: {
@@ -317,7 +303,7 @@ function createRoadLayers(colors3) {
317
303
  "source-layer": "transportation",
318
304
  filter: ["in", "class", "secondary", "tertiary"],
319
305
  paint: {
320
- "line-color": colors3.roadCasing,
306
+ "line-color": colors2.roadCasing,
321
307
  "line-width": ["interpolate", ["linear"], ["zoom"], 8, 0.5, 12, 2, 18, 12]
322
308
  },
323
309
  layout: {
@@ -333,7 +319,7 @@ function createRoadLayers(colors3) {
333
319
  "source-layer": "transportation",
334
320
  filter: ["in", "class", "primary", "trunk", "motorway"],
335
321
  paint: {
336
- "line-color": colors3.roadPrimary,
322
+ "line-color": colors2.roadPrimary,
337
323
  "line-width": ["interpolate", ["linear"], ["zoom"], 5, 0.25, 12, 3, 18, 18]
338
324
  },
339
325
  layout: {
@@ -348,7 +334,7 @@ function createRoadLayers(colors3) {
348
334
  "source-layer": "transportation",
349
335
  filter: ["in", "class", "secondary", "tertiary"],
350
336
  paint: {
351
- "line-color": colors3.roadSecondary,
337
+ "line-color": colors2.roadSecondary,
352
338
  "line-width": ["interpolate", ["linear"], ["zoom"], 8, 0.25, 12, 1.5, 18, 10]
353
339
  },
354
340
  layout: {
@@ -364,7 +350,7 @@ function createRoadLayers(colors3) {
364
350
  filter: ["in", "class", "minor", "service", "path"],
365
351
  minzoom: 13,
366
352
  paint: {
367
- "line-color": colors3.roadSecondary,
353
+ "line-color": colors2.roadSecondary,
368
354
  "line-width": ["interpolate", ["linear"], ["zoom"], 13, 0.5, 18, 6]
369
355
  },
370
356
  layout: {
@@ -381,14 +367,14 @@ function createRoadLayers(colors3) {
381
367
  filter: ["==", "class", "rail"],
382
368
  minzoom: 10,
383
369
  paint: {
384
- "line-color": colors3.rail,
370
+ "line-color": colors2.rail,
385
371
  "line-width": ["interpolate", ["linear"], ["zoom"], 10, 0.5, 18, 2],
386
372
  "line-dasharray": [2, 2]
387
373
  }
388
374
  }
389
375
  ];
390
376
  }
391
- function createBoundaryLayers(colors3) {
377
+ function createBoundaryLayers(colors2) {
392
378
  return [
393
379
  {
394
380
  id: "boundary-country",
@@ -397,7 +383,7 @@ function createBoundaryLayers(colors3) {
397
383
  "source-layer": "boundary",
398
384
  filter: ["==", "admin_level", 2],
399
385
  paint: {
400
- "line-color": colors3.adminBoundary,
386
+ "line-color": colors2.adminBoundary,
401
387
  "line-width": ["interpolate", ["linear"], ["zoom"], 2, 0.5, 10, 2],
402
388
  "line-dasharray": [3, 2]
403
389
  }
@@ -410,14 +396,14 @@ function createBoundaryLayers(colors3) {
410
396
  filter: ["==", "admin_level", 4],
411
397
  minzoom: 4,
412
398
  paint: {
413
- "line-color": colors3.boundary,
399
+ "line-color": colors2.boundary,
414
400
  "line-width": ["interpolate", ["linear"], ["zoom"], 4, 0.5, 10, 1.5],
415
401
  "line-dasharray": [2, 2]
416
402
  }
417
403
  }
418
404
  ];
419
405
  }
420
- function createLabelLayers(colors3, typography) {
406
+ function createLabelLayers(colors2, typography) {
421
407
  return [
422
408
  {
423
409
  id: "place-labels-city",
@@ -426,8 +412,8 @@ function createLabelLayers(colors3, typography) {
426
412
  "source-layer": "place",
427
413
  filter: ["in", "class", "city", "town"],
428
414
  paint: {
429
- "text-color": colors3.textPrimary,
430
- "text-halo-color": colors3.textHalo,
415
+ "text-color": colors2.textPrimary,
416
+ "text-halo-color": colors2.textHalo,
431
417
  "text-halo-width": 1.5
432
418
  },
433
419
  layout: {
@@ -446,8 +432,8 @@ function createLabelLayers(colors3, typography) {
446
432
  filter: ["in", "class", "suburb", "neighbourhood", "quarter"],
447
433
  minzoom: 12,
448
434
  paint: {
449
- "text-color": colors3.textSecondary,
450
- "text-halo-color": colors3.textHalo,
435
+ "text-color": colors2.textSecondary,
436
+ "text-halo-color": colors2.textHalo,
451
437
  "text-halo-width": 1
452
438
  },
453
439
  layout: {
@@ -465,8 +451,8 @@ function createLabelLayers(colors3, typography) {
465
451
  "source-layer": "transportation_name",
466
452
  minzoom: 13,
467
453
  paint: {
468
- "text-color": colors3.textPrimary,
469
- "text-halo-color": colors3.textHalo,
454
+ "text-color": colors2.textPrimary,
455
+ "text-halo-color": colors2.textHalo,
470
456
  "text-halo-width": 1
471
457
  },
472
458
  layout: {
@@ -485,8 +471,8 @@ function createLabelLayers(colors3, typography) {
485
471
  "source-layer": "poi",
486
472
  minzoom: 14,
487
473
  paint: {
488
- "text-color": colors3.poi,
489
- "text-halo-color": colors3.textHalo,
474
+ "text-color": colors2.poi,
475
+ "text-halo-color": colors2.textHalo,
490
476
  "text-halo-width": 1
491
477
  },
492
478
  layout: {
@@ -501,7 +487,7 @@ function createLabelLayers(colors3, typography) {
501
487
  ];
502
488
  }
503
489
  function generateVectorStyle(theme = lightTheme, tileSource, glyphsUrl, spriteUrl) {
504
- const colors3 = theme.colors;
490
+ const colors2 = theme.colors;
505
491
  return {
506
492
  version: 8,
507
493
  name: `Classic Theme Vector - ${theme.name}`,
@@ -515,15 +501,15 @@ function generateVectorStyle(theme = lightTheme, tileSource, glyphsUrl, spriteUr
515
501
  id: "background",
516
502
  type: "background",
517
503
  paint: {
518
- "background-color": colors3.land
504
+ "background-color": colors2.land
519
505
  }
520
506
  },
521
- createWaterLayer(colors3),
522
- ...createLanduseLayers(colors3),
523
- ...createBuildingLayers(colors3),
524
- ...createRoadLayers(colors3),
525
- ...createBoundaryLayers(colors3),
526
- ...createLabelLayers(colors3, theme.typography)
507
+ createWaterLayer(colors2),
508
+ ...createLanduseLayers(colors2),
509
+ ...createBuildingLayers(colors2),
510
+ ...createRoadLayers(colors2),
511
+ ...createBoundaryLayers(colors2),
512
+ ...createLabelLayers(colors2, theme.typography)
527
513
  ],
528
514
  metadata: {
529
515
  "classic-theme": theme.name
@@ -978,8 +964,6 @@ function getGridNavigationIndex(key, index, count, columns) {
978
964
  return null;
979
965
  }
980
966
  }
981
-
982
- // src/utils/styles.ts
983
967
  function createFillStyle(options) {
984
968
  const paint = {
985
969
  "fill-color": options.color
@@ -1200,11 +1184,11 @@ function createExtrusionHeightExpression(property, options = {}) {
1200
1184
  }
1201
1185
  return heightExpr;
1202
1186
  }
1203
- function createStatusColorExpression(statusColors, defaultColor = "#888888") {
1187
+ function createStatusColorExpression(statusColors, defaultColor = themeTokens.ch.grey02) {
1204
1188
  return createCategoricalColorExpression("status", statusColors, defaultColor);
1205
1189
  }
1206
1190
  function createInteractiveStatusColorExpression(statusColors, options) {
1207
- const { hoverColor, selectedColor, defaultColor = "#888888" } = options;
1191
+ const { hoverColor, selectedColor, defaultColor = themeTokens.ch.grey02 } = options;
1208
1192
  const baseExpr = createCategoricalColorExpression("status", statusColors, defaultColor);
1209
1193
  if (selectedColor) {
1210
1194
  return [
@@ -1593,6 +1577,27 @@ function filterByGeometryType(geojson, types) {
1593
1577
  features: geojson.features.filter((f) => f.geometry && types.includes(f.geometry.type))
1594
1578
  };
1595
1579
  }
1580
+ var markerColor = themeTokens.ch.heritageTeal;
1581
+ var clusterColors = {
1582
+ small: themeTokens.ch.heritageTeal,
1583
+ // < 10 points
1584
+ medium: themeTokens.ch.collection.classic,
1585
+ // Steel Navy, 10-50 points
1586
+ large: themeTokens.ch.collection.portrait,
1587
+ // Aubergine, 50+ points
1588
+ stroke: themeTokens.ch.white,
1589
+ text: themeTokens.ch.white
1590
+ };
1591
+ var boundaryColors = {
1592
+ fill: themeTokens.ch.heritageTeal,
1593
+ line: themeTokens.ch.heritageTeal,
1594
+ hoverFill: themeTokens.ch.heritageTeal,
1595
+ defaultFill: themeTokens.ch.accentTeal,
1596
+ hoverLine: themeTokens.ch.heritageTeal,
1597
+ defaultLine: themeTokens.ch.accentTeal
1598
+ };
1599
+ var salesOfficeColor = themeTokens.ch.foundersRed;
1600
+ var nonMatchedColor = themeTokens.ch.grey02;
1596
1601
 
1597
1602
  // src/utils/cluster.ts
1598
1603
  function isClusterFeature(feature) {
@@ -1677,28 +1682,29 @@ async function expandClusterToBounds(map, sourceId, clusterId, options = {}) {
1677
1682
  }
1678
1683
  function createClusterStyles(options = {}) {
1679
1684
  const {
1680
- smallColor = "#51bbd6",
1681
- mediumColor = "#f1f075",
1682
- largeColor = "#f28cb1",
1685
+ // v2.5 defaults: dark circles that carry White counts (12.68, 9.78, 6.71)
1686
+ smallColor = clusterColors.small,
1687
+ mediumColor = clusterColors.medium,
1688
+ largeColor = clusterColors.large,
1683
1689
  mediumThreshold = 100,
1684
1690
  largeThreshold = 750,
1685
1691
  smallRadius = 20,
1686
1692
  mediumRadius = 30,
1687
1693
  largeRadius = 40,
1688
- strokeColor = "#fff",
1694
+ strokeColor = clusterColors.stroke,
1689
1695
  strokeWidth = 2,
1690
1696
  opacity = 0.85
1691
1697
  } = options.circle ?? {};
1692
1698
  const {
1693
- textColor = "#333",
1699
+ textColor = clusterColors.text,
1694
1700
  textSize = 12,
1695
1701
  fontStack = ["Open Sans Bold", "Arial Unicode MS Bold"],
1696
1702
  abbreviated = false
1697
1703
  } = options.text ?? {};
1698
1704
  const {
1699
- color: pointColor = "#11b4da",
1705
+ color: pointColor = clusterColors.small,
1700
1706
  radius: pointRadius = 8,
1701
- strokeColor: pointStrokeColor = "#fff",
1707
+ strokeColor: pointStrokeColor = clusterColors.stroke,
1702
1708
  strokeWidth: pointStrokeWidth = 1
1703
1709
  } = options.unclusteredPoint ?? {};
1704
1710
  return {
@@ -3218,24 +3224,72 @@ function createGeoJSONFingerprint(data) {
3218
3224
  if (data.type !== "FeatureCollection") return null;
3219
3225
  const features = data.features;
3220
3226
  if (!features || !Array.isArray(features)) {
3221
- return { count: 0, firstId: void 0, lastId: void 0 };
3227
+ return { count: 0, firstId: void 0, lastId: void 0, hash: 0 };
3222
3228
  }
3223
3229
  const count = features.length;
3224
3230
  if (count === 0) {
3225
- return { count: 0, firstId: void 0, lastId: void 0 };
3231
+ return { count: 0, firstId: void 0, lastId: void 0, hash: 0 };
3226
3232
  }
3227
3233
  const firstFeature = features[0];
3228
3234
  const lastFeature = features[count - 1];
3229
3235
  return {
3230
3236
  count,
3231
3237
  firstId: firstFeature?.id,
3232
- lastId: lastFeature?.id
3238
+ lastId: lastFeature?.id,
3239
+ hash: hashValue(SEED, features)
3233
3240
  };
3234
3241
  }
3242
+ var SEED = 2166136261;
3243
+ var TAG_NULL = 1;
3244
+ var TAG_FALSE = 2;
3245
+ var TAG_TRUE = 3;
3246
+ var TAG_NUMBER = 4;
3247
+ var TAG_STRING = 5;
3248
+ var TAG_ARRAY = 6;
3249
+ var TAG_OBJECT = 7;
3250
+ var TAG_UNDEFINED = 8;
3251
+ var float = new Float64Array(1);
3252
+ var floatWords = new Uint32Array(float.buffer);
3253
+ function mix(hash, word) {
3254
+ hash = Math.imul(hash ^ word, 1540483477);
3255
+ return hash ^ hash >>> 15;
3256
+ }
3257
+ function hashString(hash, value) {
3258
+ hash = mix(mix(hash, TAG_STRING), value.length);
3259
+ for (let i = 0; i < value.length; i++) hash = mix(hash, value.charCodeAt(i));
3260
+ return hash;
3261
+ }
3262
+ function hashValue(hash, value) {
3263
+ switch (typeof value) {
3264
+ case "number":
3265
+ float[0] = value;
3266
+ return mix(mix(mix(hash, TAG_NUMBER), floatWords[0]), floatWords[1]);
3267
+ case "string":
3268
+ return hashString(hash, value);
3269
+ case "boolean":
3270
+ return mix(hash, value ? TAG_TRUE : TAG_FALSE);
3271
+ case "object": {
3272
+ if (value === null) return mix(hash, TAG_NULL);
3273
+ if (Array.isArray(value)) {
3274
+ hash = mix(mix(hash, TAG_ARRAY), value.length);
3275
+ for (let i = 0; i < value.length; i++) hash = hashValue(hash, value[i]);
3276
+ return hash;
3277
+ }
3278
+ hash = mix(hash, TAG_OBJECT);
3279
+ for (const key in value) {
3280
+ if (!Object.prototype.hasOwnProperty.call(value, key)) continue;
3281
+ hash = hashValue(hashString(hash, key), value[key]);
3282
+ }
3283
+ return hash;
3284
+ }
3285
+ default:
3286
+ return mix(hash, TAG_UNDEFINED);
3287
+ }
3288
+ }
3235
3289
  function fingerprintEqual(a, b) {
3236
3290
  if (a === null && b === null) return true;
3237
3291
  if (a === null || b === null) return false;
3238
- return a.count === b.count && a.firstId === b.firstId && a.lastId === b.lastId;
3292
+ return a.count === b.count && a.firstId === b.firstId && a.lastId === b.lastId && a.hash === b.hash;
3239
3293
  }
3240
3294
  function geoJSONEqual(a, b) {
3241
3295
  if (typeof a === "string" || typeof b === "string") {
@@ -3381,6 +3435,16 @@ function warnIfWorkerUrlMissing(maplibregl, log = console.warn) {
3381
3435
  }
3382
3436
  }
3383
3437
 
3438
+ // src/utils/deck.ts
3439
+ function supportsDeckInterleaving(map) {
3440
+ if (!map) return false;
3441
+ const transform = map.transform;
3442
+ return typeof transform === "object" && transform !== null;
3443
+ }
3444
+ function resolveDeckInterleaved(map, requested) {
3445
+ return requested && supportsDeckInterleaving(map);
3446
+ }
3447
+
3384
3448
  // src/basemaps/registry.ts
3385
3449
  var DEFAULT_BASEMAP = {
3386
3450
  id: "default",
@@ -3574,8 +3638,6 @@ function resolveBasemapThumbnail(basemap, apiKeys) {
3574
3638
  }
3575
3639
  return thumbnail;
3576
3640
  }
3577
-
3578
- // src/layers/registry.ts
3579
3641
  var CATEGORY_META = {
3580
3642
  boundaries: {
3581
3643
  label: "Boundaries",
@@ -3603,6 +3665,43 @@ var CATEGORY_META = {
3603
3665
  order: 5
3604
3666
  }
3605
3667
  };
3668
+ var ZONING_COLORS = [
3669
+ "match",
3670
+ ["get", "zone_type"],
3671
+ "residential",
3672
+ themeTokens.ch.collection.preamble,
3673
+ "commercial",
3674
+ themeTokens.ch.collection.fourSquare,
3675
+ "industrial",
3676
+ themeTokens.ch.sage700,
3677
+ "mixed",
3678
+ themeTokens.ch.collection.portrait,
3679
+ themeTokens.ch.grey02
3680
+ ];
3681
+ var FLOOD_COLORS = [
3682
+ "match",
3683
+ ["get", "flood_zone"],
3684
+ "A",
3685
+ themeTokens.ch.accentTeal,
3686
+ "AE",
3687
+ themeTokens.ch.heritageTeal,
3688
+ "AH",
3689
+ themeTokens.ch.collection.classic,
3690
+ "X",
3691
+ themeTokens.ch.accentTeal100,
3692
+ themeTokens.ch.lichen
3693
+ ];
3694
+ var FLOOD_OUTLINE_COLORS = [
3695
+ "match",
3696
+ ["get", "flood_zone"],
3697
+ "A",
3698
+ themeTokens.ch.accentTeal,
3699
+ "AE",
3700
+ themeTokens.ch.heritageTeal,
3701
+ "AH",
3702
+ themeTokens.ch.collection.classic,
3703
+ themeTokens.ch.grey02
3704
+ ];
3606
3705
  var SCHOOL_DISTRICTS = {
3607
3706
  id: "school-districts",
3608
3707
  name: "School Districts",
@@ -3616,14 +3715,18 @@ var SCHOOL_DISTRICTS = {
3616
3715
  style: {
3617
3716
  renderType: "fill",
3618
3717
  light: {
3619
- "fill-color": "hsl(210, 80%, 60%)",
3620
- "fill-opacity": 0.2,
3621
- "fill-outline-color": "hsl(210, 80%, 40%)"
3718
+ "fill-color": themeTokens.ch.collection.classic,
3719
+ "fill-opacity": 0.2
3622
3720
  },
3623
3721
  dark: {
3624
3722
  "fill-color": "hsl(210, 70%, 50%)",
3625
3723
  "fill-opacity": 0.25,
3626
3724
  "fill-outline-color": "hsl(210, 70%, 60%)"
3725
+ },
3726
+ // A fill's own outline is drawn at fill-opacity (0.2: 1.39:1 on Paper),
3727
+ // so the district edge is a separate full-strength Steel Navy line (8.71:1)
3728
+ outline: {
3729
+ light: { "line-color": themeTokens.ch.collection.classic, "line-width": 1 }
3627
3730
  }
3628
3731
  },
3629
3732
  interactive: true,
@@ -3642,7 +3745,7 @@ var CITY_LIMITS = {
3642
3745
  style: {
3643
3746
  renderType: "line",
3644
3747
  light: {
3645
- "line-color": "hsl(0, 0%, 40%)",
3748
+ "line-color": themeTokens.ch.grey01,
3646
3749
  "line-width": 2,
3647
3750
  "line-dasharray": [4, 2]
3648
3751
  },
@@ -3668,19 +3771,7 @@ var ZONING_DISTRICTS = {
3668
3771
  style: {
3669
3772
  renderType: "fill",
3670
3773
  light: {
3671
- "fill-color": [
3672
- "match",
3673
- ["get", "zone_type"],
3674
- "residential",
3675
- "hsl(120, 50%, 70%)",
3676
- "commercial",
3677
- "hsl(30, 80%, 70%)",
3678
- "industrial",
3679
- "hsl(0, 50%, 70%)",
3680
- "mixed",
3681
- "hsl(270, 50%, 70%)",
3682
- "hsl(0, 0%, 70%)"
3683
- ],
3774
+ "fill-color": ZONING_COLORS,
3684
3775
  "fill-opacity": 0.3
3685
3776
  },
3686
3777
  dark: {
@@ -3698,15 +3789,22 @@ var ZONING_DISTRICTS = {
3698
3789
  "hsl(0, 0%, 50%)"
3699
3790
  ],
3700
3791
  "fill-opacity": 0.35
3792
+ },
3793
+ // A fill's own outline is drawn at fill-opacity (0.3: 1.40 to 1.55:1 on
3794
+ // Paper), so the edge is a separate full-strength line in the zone's
3795
+ // colour, matching the legend swatch: Warm Jade 3.63, Tobacco 5.71,
3796
+ // Moss 4.56, Aubergine 5.98, Grey 02 fallback 4.10
3797
+ outline: {
3798
+ light: { "line-color": ZONING_COLORS, "line-width": 1 }
3701
3799
  }
3702
3800
  },
3703
3801
  legend: {
3704
3802
  type: "categorical",
3705
3803
  items: [
3706
- { label: "Residential", color: "hsl(120, 50%, 70%)" },
3707
- { label: "Commercial", color: "hsl(30, 80%, 70%)" },
3708
- { label: "Industrial", color: "hsl(0, 50%, 70%)" },
3709
- { label: "Mixed Use", color: "hsl(270, 50%, 70%)" }
3804
+ { label: "Residential", color: themeTokens.ch.collection.preamble },
3805
+ { label: "Commercial", color: themeTokens.ch.collection.fourSquare },
3806
+ { label: "Industrial", color: themeTokens.ch.sage700 },
3807
+ { label: "Mixed Use", color: themeTokens.ch.collection.portrait }
3710
3808
  ]
3711
3809
  },
3712
3810
  interactive: true,
@@ -3725,14 +3823,18 @@ var PARKS = {
3725
3823
  style: {
3726
3824
  renderType: "fill",
3727
3825
  light: {
3728
- "fill-color": "hsl(120, 60%, 50%)",
3729
- "fill-opacity": 0.4,
3730
- "fill-outline-color": "hsl(120, 60%, 30%)"
3826
+ "fill-color": themeTokens.ch.collection.cadence,
3827
+ "fill-opacity": 0.4
3731
3828
  },
3732
3829
  dark: {
3733
3830
  "fill-color": "hsl(120, 50%, 40%)",
3734
3831
  "fill-opacity": 0.5,
3735
3832
  "fill-outline-color": "hsl(120, 50%, 50%)"
3833
+ },
3834
+ // A fill's own outline is drawn at fill-opacity (0.4: 1.91:1 on Paper),
3835
+ // so the park edge is a separate full-strength Spruce line (6.99:1)
3836
+ outline: {
3837
+ light: { "line-color": themeTokens.ch.collection.cadence, "line-width": 1 }
3736
3838
  }
3737
3839
  },
3738
3840
  interactive: true,
@@ -3751,7 +3853,7 @@ var TRAILS = {
3751
3853
  style: {
3752
3854
  renderType: "line",
3753
3855
  light: {
3754
- "line-color": "hsl(30, 70%, 45%)",
3856
+ "line-color": themeTokens.ch.collection.fourSquare,
3755
3857
  "line-width": 2,
3756
3858
  "line-dasharray": [2, 1]
3757
3859
  },
@@ -3777,10 +3879,10 @@ var SPORTS_FACILITIES = {
3777
3879
  style: {
3778
3880
  renderType: "circle",
3779
3881
  light: {
3780
- "circle-color": "hsl(200, 70%, 50%)",
3882
+ "circle-color": themeTokens.ch.collection.classic,
3781
3883
  "circle-radius": 6,
3782
3884
  "circle-stroke-width": 2,
3783
- "circle-stroke-color": "hsl(200, 70%, 30%)"
3885
+ "circle-stroke-color": themeTokens.ch.white
3784
3886
  },
3785
3887
  dark: {
3786
3888
  "circle-color": "hsl(200, 60%, 55%)",
@@ -3805,7 +3907,7 @@ var TRANSIT_ROUTES = {
3805
3907
  style: {
3806
3908
  renderType: "line",
3807
3909
  light: {
3808
- "line-color": "hsl(270, 70%, 50%)",
3910
+ "line-color": themeTokens.ch.collection.portrait,
3809
3911
  "line-width": 3
3810
3912
  },
3811
3913
  dark: {
@@ -3829,7 +3931,7 @@ var BIKE_LANES = {
3829
3931
  style: {
3830
3932
  renderType: "line",
3831
3933
  light: {
3832
- "line-color": "hsl(150, 70%, 45%)",
3934
+ "line-color": themeTokens.ch.collection.preamble,
3833
3935
  "line-width": 2
3834
3936
  },
3835
3937
  dark: {
@@ -3853,19 +3955,7 @@ var FLOOD_ZONES = {
3853
3955
  style: {
3854
3956
  renderType: "fill",
3855
3957
  light: {
3856
- "fill-color": [
3857
- "match",
3858
- ["get", "flood_zone"],
3859
- "A",
3860
- "hsl(200, 80%, 60%)",
3861
- "AE",
3862
- "hsl(200, 80%, 50%)",
3863
- "AH",
3864
- "hsl(200, 80%, 45%)",
3865
- "X",
3866
- "hsl(200, 40%, 70%)",
3867
- "hsl(200, 60%, 60%)"
3868
- ],
3958
+ "fill-color": FLOOD_COLORS,
3869
3959
  "fill-opacity": 0.4
3870
3960
  },
3871
3961
  dark: {
@@ -3883,15 +3973,20 @@ var FLOOD_ZONES = {
3883
3973
  "hsl(200, 50%, 45%)"
3884
3974
  ],
3885
3975
  "fill-opacity": 0.45
3976
+ },
3977
+ // A fill's own outline is drawn at fill-opacity (0.4), too faint to
3978
+ // bound a zone, so the edge is a separate full-strength line
3979
+ outline: {
3980
+ light: { "line-color": FLOOD_OUTLINE_COLORS, "line-width": 1 }
3886
3981
  }
3887
3982
  },
3888
3983
  legend: {
3889
3984
  type: "categorical",
3890
3985
  items: [
3891
- { label: "Zone A (High Risk)", color: "hsl(200, 80%, 60%)" },
3892
- { label: "Zone AE (High Risk)", color: "hsl(200, 80%, 50%)" },
3893
- { label: "Zone AH (High Risk)", color: "hsl(200, 80%, 45%)" },
3894
- { label: "Zone X (Minimal Risk)", color: "hsl(200, 40%, 70%)" }
3986
+ { label: "Zone A (High Risk)", color: themeTokens.ch.accentTeal },
3987
+ { label: "Zone AE (High Risk)", color: themeTokens.ch.heritageTeal },
3988
+ { label: "Zone AH (High Risk)", color: themeTokens.ch.collection.classic },
3989
+ { label: "Zone X (Minimal Risk)", color: themeTokens.ch.accentTeal100 }
3895
3990
  ]
3896
3991
  },
3897
3992
  interactive: true,
@@ -3910,7 +4005,7 @@ var WATERSHEDS = {
3910
4005
  style: {
3911
4006
  renderType: "line",
3912
4007
  light: {
3913
- "line-color": "hsl(190, 70%, 45%)",
4008
+ "line-color": themeTokens.ch.accentTeal,
3914
4009
  "line-width": 2
3915
4010
  },
3916
4011
  dark: {
@@ -3958,6 +4053,11 @@ function resolveLayerSourceUrl(layer, apiKeys) {
3958
4053
  function getLayerStyleForTheme(layer, theme) {
3959
4054
  return theme === "dark" ? layer.style.dark : layer.style.light;
3960
4055
  }
4056
+ var OUTLINE_LAYER_SUFFIX = "-outline";
4057
+ function getOutlineStyleForTheme(layer, theme) {
4058
+ if (layer.style.renderType !== "fill") return void 0;
4059
+ return layer.style.outline?.[theme];
4060
+ }
3961
4061
  function searchLayers(layers, query) {
3962
4062
  if (!query.trim()) {
3963
4063
  return layers;
@@ -4492,42 +4592,42 @@ function createPositioningCoordinator() {
4492
4592
  return new PositioningCoordinator();
4493
4593
  }
4494
4594
  var lotAvailabilityColors = {
4495
- Available: "#4caf50",
4496
- // Green - ready for sale
4497
- Future: "#795548",
4498
- // Brown - coming soon
4499
- Spec: "#FFEB3B",
4500
- // Yellow - spec home
4501
- Model: "#CE93D8",
4502
- // Lavender - model home
4503
- "Under Contract": "#81D4FA",
4504
- // Light Blue - pending sale
4505
- Sold: "#f44336",
4506
- // Red - sold
4507
- Unavailable: "#757575",
4508
- // Gray - not available
4509
- Unknown: "#757575"
4510
- // Gray - default fallback
4595
+ Available: themeTokens.ch.heritageTeal,
4596
+ // ready for sale (11.30)
4597
+ Future: themeTokens.ch.collection.fourSquare,
4598
+ // Tobacco - coming soon (5.71)
4599
+ Spec: themeTokens.ch.collection.preamble,
4600
+ // Warm Jade - spec home (3.63)
4601
+ Model: themeTokens.ch.collection.portrait,
4602
+ // Aubergine - model home (5.98)
4603
+ "Under Contract": themeTokens.ch.accentTeal,
4604
+ // pending sale (3.03)
4605
+ Sold: themeTokens.ch.grey01,
4606
+ // sold (7.19)
4607
+ Unavailable: themeTokens.ch.grey02,
4608
+ // not available (4.10)
4609
+ Unknown: themeTokens.ch.grey02
4610
+ // default fallback
4511
4611
  };
4512
4612
  var inventoryStatusColors = {
4513
- "Ready Now": "#2E7D32",
4514
- // Green - available immediately
4515
- Upcoming: "#ED6C02",
4516
- // Orange - coming soon
4517
- default: "#757575"
4518
- // Gray - unknown status
4613
+ "Ready Now": themeTokens.ch.heritageTeal,
4614
+ // available immediately (11.30)
4615
+ Upcoming: themeTokens.ch.collection.classic,
4616
+ // Steel Navy - coming soon (8.71)
4617
+ default: themeTokens.ch.grey02
4618
+ // unknown status (4.10)
4519
4619
  };
4520
4620
  var lotSizeColors = {
4521
- Small: "#2196f3",
4522
- // Blue
4523
- Medium: "#4caf50",
4524
- // Green
4525
- Large: "#ff9800",
4526
- // Orange
4527
- "Extra Large": "#f44336",
4528
- // Red
4529
- Unknown: "#757575"
4530
- // Gray
4621
+ Small: themeTokens.ch.sage600,
4622
+ // Fern (3.39)
4623
+ Medium: themeTokens.ch.sage700,
4624
+ // Moss (4.56)
4625
+ Large: themeTokens.ch.collection.cadence,
4626
+ // Spruce (6.99)
4627
+ "Extra Large": themeTokens.ch.heritageTeal,
4628
+ // (11.30)
4629
+ Unknown: themeTokens.ch.grey02
4630
+ // (4.10)
4531
4631
  };
4532
4632
  function getContrastTextColor(backgroundColor) {
4533
4633
  try {
@@ -4542,27 +4642,6 @@ function getAvailabilityColor(availability) {
4542
4642
  function getSizeColor(size) {
4543
4643
  return lotSizeColors[size] ?? lotSizeColors.Unknown;
4544
4644
  }
4545
- var clusterColors = {
4546
- small: themeTokens.colors.teal[500],
4547
- // #3ba4a7 - < 10 points
4548
- medium: themeTokens.colors.navy[700],
4549
- // #002e3f - 10-50 points
4550
- large: themeTokens.colors.plum[700],
4551
- // #5e2c41 - 50+ points
4552
- stroke: themeTokens.colors.white,
4553
- text: themeTokens.colors.white
4554
- };
4555
- var boundaryColors = {
4556
- fill: "#C50F22",
4557
- // Brand red
4558
- line: "#C50F22",
4559
- hoverFill: "#1976d2",
4560
- defaultFill: "#4A90E2",
4561
- hoverLine: "#1565c0",
4562
- defaultLine: "#4A90E2"
4563
- };
4564
- var salesOfficeColor = "#C50F22";
4565
- var nonMatchedColor = "#9e9e9e";
4566
4645
 
4567
4646
  // src/colors/expressions.ts
4568
4647
  var lotAvailabilityColorExpression = createCategoricalColorExpression(
@@ -4621,6 +4700,7 @@ exports.MAPTILER_SATELLITE = MAPTILER_SATELLITE;
4621
4700
  exports.MAPTILER_STREETS = MAPTILER_STREETS;
4622
4701
  exports.MARKER_PROTECTION_CLASS = MARKER_PROTECTION_CLASS;
4623
4702
  exports.OSM_STANDARD = OSM_STANDARD;
4703
+ exports.OUTLINE_LAYER_SUFFIX = OUTLINE_LAYER_SUFFIX;
4624
4704
  exports.PARKS = PARKS;
4625
4705
  exports.PRIMARY_BASEMAPS = PRIMARY_BASEMAPS;
4626
4706
  exports.PRIORITY_ORDER = PRIORITY_ORDER;
@@ -4743,6 +4823,7 @@ exports.getLayerStatesArray = getLayerStatesArray;
4743
4823
  exports.getLayerStyleForTheme = getLayerStyleForTheme;
4744
4824
  exports.getLayersByCategory = getLayersByCategory;
4745
4825
  exports.getLayersWithErrors = getLayersWithErrors;
4826
+ exports.getOutlineStyleForTheme = getOutlineStyleForTheme;
4746
4827
  exports.getSelectionStyle = getSelectionStyle;
4747
4828
  exports.getSimplificationToleranceForZoom = getSimplificationToleranceForZoom;
4748
4829
  exports.getSimplifiedFeaturesForZoom = getSimplifiedFeaturesForZoom;
@@ -4767,6 +4848,7 @@ exports.lotAvailabilityColorExpression = lotAvailabilityColorExpression;
4767
4848
  exports.lotAvailabilityColors = lotAvailabilityColors;
4768
4849
  exports.lotSizeColorExpression = lotSizeColorExpression;
4769
4850
  exports.lotSizeColors = lotSizeColors;
4851
+ exports.markerColor = markerColor;
4770
4852
  exports.nonMatchedColor = nonMatchedColor;
4771
4853
  exports.normalizeLongitude = normalizeLongitude;
4772
4854
  exports.paintPropsEqual = paintPropsEqual;
@@ -4779,6 +4861,7 @@ exports.reorderLayers = reorderLayers;
4779
4861
  exports.resetWorkerUrlWarning = resetWorkerUrlWarning;
4780
4862
  exports.resolveBasemapStyle = resolveBasemapStyle;
4781
4863
  exports.resolveBasemapThumbnail = resolveBasemapThumbnail;
4864
+ exports.resolveDeckInterleaved = resolveDeckInterleaved;
4782
4865
  exports.resolveLayerSourceUrl = resolveLayerSourceUrl;
4783
4866
  exports.salesOfficeColor = salesOfficeColor;
4784
4867
  exports.searchLayers = searchLayers;
@@ -4791,6 +4874,7 @@ exports.simplifyFeature = simplifyFeature;
4791
4874
  exports.simplifyFeatureCollection = simplifyFeatureCollection;
4792
4875
  exports.simplifyFeatureCollectionWithStats = simplifyFeatureCollectionWithStats;
4793
4876
  exports.simplifyPolygon = simplifyPolygon;
4877
+ exports.supportsDeckInterleaving = supportsDeckInterleaving;
4794
4878
  exports.toggleLayerVisibility = toggleLayerVisibility;
4795
4879
  exports.updateLayerState = updateLayerState;
4796
4880
  exports.validateBoundsArray = validateBoundsArray;