@classic-homes/maps-core 0.7.3 → 0.7.5

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 {
@@ -3429,6 +3435,16 @@ function warnIfWorkerUrlMissing(maplibregl, log = console.warn) {
3429
3435
  }
3430
3436
  }
3431
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
+
3432
3448
  // src/basemaps/registry.ts
3433
3449
  var DEFAULT_BASEMAP = {
3434
3450
  id: "default",
@@ -3622,8 +3638,6 @@ function resolveBasemapThumbnail(basemap, apiKeys) {
3622
3638
  }
3623
3639
  return thumbnail;
3624
3640
  }
3625
-
3626
- // src/layers/registry.ts
3627
3641
  var CATEGORY_META = {
3628
3642
  boundaries: {
3629
3643
  label: "Boundaries",
@@ -3651,6 +3665,43 @@ var CATEGORY_META = {
3651
3665
  order: 5
3652
3666
  }
3653
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
+ ];
3654
3705
  var SCHOOL_DISTRICTS = {
3655
3706
  id: "school-districts",
3656
3707
  name: "School Districts",
@@ -3664,14 +3715,18 @@ var SCHOOL_DISTRICTS = {
3664
3715
  style: {
3665
3716
  renderType: "fill",
3666
3717
  light: {
3667
- "fill-color": "hsl(210, 80%, 60%)",
3668
- "fill-opacity": 0.2,
3669
- "fill-outline-color": "hsl(210, 80%, 40%)"
3718
+ "fill-color": themeTokens.ch.collection.classic,
3719
+ "fill-opacity": 0.2
3670
3720
  },
3671
3721
  dark: {
3672
3722
  "fill-color": "hsl(210, 70%, 50%)",
3673
3723
  "fill-opacity": 0.25,
3674
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 }
3675
3730
  }
3676
3731
  },
3677
3732
  interactive: true,
@@ -3690,7 +3745,7 @@ var CITY_LIMITS = {
3690
3745
  style: {
3691
3746
  renderType: "line",
3692
3747
  light: {
3693
- "line-color": "hsl(0, 0%, 40%)",
3748
+ "line-color": themeTokens.ch.grey01,
3694
3749
  "line-width": 2,
3695
3750
  "line-dasharray": [4, 2]
3696
3751
  },
@@ -3716,19 +3771,7 @@ var ZONING_DISTRICTS = {
3716
3771
  style: {
3717
3772
  renderType: "fill",
3718
3773
  light: {
3719
- "fill-color": [
3720
- "match",
3721
- ["get", "zone_type"],
3722
- "residential",
3723
- "hsl(120, 50%, 70%)",
3724
- "commercial",
3725
- "hsl(30, 80%, 70%)",
3726
- "industrial",
3727
- "hsl(0, 50%, 70%)",
3728
- "mixed",
3729
- "hsl(270, 50%, 70%)",
3730
- "hsl(0, 0%, 70%)"
3731
- ],
3774
+ "fill-color": ZONING_COLORS,
3732
3775
  "fill-opacity": 0.3
3733
3776
  },
3734
3777
  dark: {
@@ -3746,15 +3789,22 @@ var ZONING_DISTRICTS = {
3746
3789
  "hsl(0, 0%, 50%)"
3747
3790
  ],
3748
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 }
3749
3799
  }
3750
3800
  },
3751
3801
  legend: {
3752
3802
  type: "categorical",
3753
3803
  items: [
3754
- { label: "Residential", color: "hsl(120, 50%, 70%)" },
3755
- { label: "Commercial", color: "hsl(30, 80%, 70%)" },
3756
- { label: "Industrial", color: "hsl(0, 50%, 70%)" },
3757
- { 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 }
3758
3808
  ]
3759
3809
  },
3760
3810
  interactive: true,
@@ -3773,14 +3823,18 @@ var PARKS = {
3773
3823
  style: {
3774
3824
  renderType: "fill",
3775
3825
  light: {
3776
- "fill-color": "hsl(120, 60%, 50%)",
3777
- "fill-opacity": 0.4,
3778
- "fill-outline-color": "hsl(120, 60%, 30%)"
3826
+ "fill-color": themeTokens.ch.collection.cadence,
3827
+ "fill-opacity": 0.4
3779
3828
  },
3780
3829
  dark: {
3781
3830
  "fill-color": "hsl(120, 50%, 40%)",
3782
3831
  "fill-opacity": 0.5,
3783
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 }
3784
3838
  }
3785
3839
  },
3786
3840
  interactive: true,
@@ -3799,7 +3853,7 @@ var TRAILS = {
3799
3853
  style: {
3800
3854
  renderType: "line",
3801
3855
  light: {
3802
- "line-color": "hsl(30, 70%, 45%)",
3856
+ "line-color": themeTokens.ch.collection.fourSquare,
3803
3857
  "line-width": 2,
3804
3858
  "line-dasharray": [2, 1]
3805
3859
  },
@@ -3825,10 +3879,10 @@ var SPORTS_FACILITIES = {
3825
3879
  style: {
3826
3880
  renderType: "circle",
3827
3881
  light: {
3828
- "circle-color": "hsl(200, 70%, 50%)",
3882
+ "circle-color": themeTokens.ch.collection.classic,
3829
3883
  "circle-radius": 6,
3830
3884
  "circle-stroke-width": 2,
3831
- "circle-stroke-color": "hsl(200, 70%, 30%)"
3885
+ "circle-stroke-color": themeTokens.ch.white
3832
3886
  },
3833
3887
  dark: {
3834
3888
  "circle-color": "hsl(200, 60%, 55%)",
@@ -3853,7 +3907,7 @@ var TRANSIT_ROUTES = {
3853
3907
  style: {
3854
3908
  renderType: "line",
3855
3909
  light: {
3856
- "line-color": "hsl(270, 70%, 50%)",
3910
+ "line-color": themeTokens.ch.collection.portrait,
3857
3911
  "line-width": 3
3858
3912
  },
3859
3913
  dark: {
@@ -3877,7 +3931,7 @@ var BIKE_LANES = {
3877
3931
  style: {
3878
3932
  renderType: "line",
3879
3933
  light: {
3880
- "line-color": "hsl(150, 70%, 45%)",
3934
+ "line-color": themeTokens.ch.collection.preamble,
3881
3935
  "line-width": 2
3882
3936
  },
3883
3937
  dark: {
@@ -3901,19 +3955,7 @@ var FLOOD_ZONES = {
3901
3955
  style: {
3902
3956
  renderType: "fill",
3903
3957
  light: {
3904
- "fill-color": [
3905
- "match",
3906
- ["get", "flood_zone"],
3907
- "A",
3908
- "hsl(200, 80%, 60%)",
3909
- "AE",
3910
- "hsl(200, 80%, 50%)",
3911
- "AH",
3912
- "hsl(200, 80%, 45%)",
3913
- "X",
3914
- "hsl(200, 40%, 70%)",
3915
- "hsl(200, 60%, 60%)"
3916
- ],
3958
+ "fill-color": FLOOD_COLORS,
3917
3959
  "fill-opacity": 0.4
3918
3960
  },
3919
3961
  dark: {
@@ -3931,15 +3973,20 @@ var FLOOD_ZONES = {
3931
3973
  "hsl(200, 50%, 45%)"
3932
3974
  ],
3933
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 }
3934
3981
  }
3935
3982
  },
3936
3983
  legend: {
3937
3984
  type: "categorical",
3938
3985
  items: [
3939
- { label: "Zone A (High Risk)", color: "hsl(200, 80%, 60%)" },
3940
- { label: "Zone AE (High Risk)", color: "hsl(200, 80%, 50%)" },
3941
- { label: "Zone AH (High Risk)", color: "hsl(200, 80%, 45%)" },
3942
- { 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 }
3943
3990
  ]
3944
3991
  },
3945
3992
  interactive: true,
@@ -3958,7 +4005,7 @@ var WATERSHEDS = {
3958
4005
  style: {
3959
4006
  renderType: "line",
3960
4007
  light: {
3961
- "line-color": "hsl(190, 70%, 45%)",
4008
+ "line-color": themeTokens.ch.accentTeal,
3962
4009
  "line-width": 2
3963
4010
  },
3964
4011
  dark: {
@@ -4006,6 +4053,11 @@ function resolveLayerSourceUrl(layer, apiKeys) {
4006
4053
  function getLayerStyleForTheme(layer, theme) {
4007
4054
  return theme === "dark" ? layer.style.dark : layer.style.light;
4008
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
+ }
4009
4061
  function searchLayers(layers, query) {
4010
4062
  if (!query.trim()) {
4011
4063
  return layers;
@@ -4540,42 +4592,42 @@ function createPositioningCoordinator() {
4540
4592
  return new PositioningCoordinator();
4541
4593
  }
4542
4594
  var lotAvailabilityColors = {
4543
- Available: "#4caf50",
4544
- // Green - ready for sale
4545
- Future: "#795548",
4546
- // Brown - coming soon
4547
- Spec: "#FFEB3B",
4548
- // Yellow - spec home
4549
- Model: "#CE93D8",
4550
- // Lavender - model home
4551
- "Under Contract": "#81D4FA",
4552
- // Light Blue - pending sale
4553
- Sold: "#f44336",
4554
- // Red - sold
4555
- Unavailable: "#757575",
4556
- // Gray - not available
4557
- Unknown: "#757575"
4558
- // 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
4559
4611
  };
4560
4612
  var inventoryStatusColors = {
4561
- "Ready Now": "#2E7D32",
4562
- // Green - available immediately
4563
- Upcoming: "#ED6C02",
4564
- // Orange - coming soon
4565
- default: "#757575"
4566
- // 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)
4567
4619
  };
4568
4620
  var lotSizeColors = {
4569
- Small: "#2196f3",
4570
- // Blue
4571
- Medium: "#4caf50",
4572
- // Green
4573
- Large: "#ff9800",
4574
- // Orange
4575
- "Extra Large": "#f44336",
4576
- // Red
4577
- Unknown: "#757575"
4578
- // 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)
4579
4631
  };
4580
4632
  function getContrastTextColor(backgroundColor) {
4581
4633
  try {
@@ -4590,27 +4642,6 @@ function getAvailabilityColor(availability) {
4590
4642
  function getSizeColor(size) {
4591
4643
  return lotSizeColors[size] ?? lotSizeColors.Unknown;
4592
4644
  }
4593
- var clusterColors = {
4594
- small: themeTokens.colors.teal[500],
4595
- // #3ba4a7 - < 10 points
4596
- medium: themeTokens.colors.navy[700],
4597
- // #002e3f - 10-50 points
4598
- large: themeTokens.colors.plum[700],
4599
- // #5e2c41 - 50+ points
4600
- stroke: themeTokens.colors.white,
4601
- text: themeTokens.colors.white
4602
- };
4603
- var boundaryColors = {
4604
- fill: "#C50F22",
4605
- // Brand red
4606
- line: "#C50F22",
4607
- hoverFill: "#1976d2",
4608
- defaultFill: "#4A90E2",
4609
- hoverLine: "#1565c0",
4610
- defaultLine: "#4A90E2"
4611
- };
4612
- var salesOfficeColor = "#C50F22";
4613
- var nonMatchedColor = "#9e9e9e";
4614
4645
 
4615
4646
  // src/colors/expressions.ts
4616
4647
  var lotAvailabilityColorExpression = createCategoricalColorExpression(
@@ -4669,6 +4700,7 @@ exports.MAPTILER_SATELLITE = MAPTILER_SATELLITE;
4669
4700
  exports.MAPTILER_STREETS = MAPTILER_STREETS;
4670
4701
  exports.MARKER_PROTECTION_CLASS = MARKER_PROTECTION_CLASS;
4671
4702
  exports.OSM_STANDARD = OSM_STANDARD;
4703
+ exports.OUTLINE_LAYER_SUFFIX = OUTLINE_LAYER_SUFFIX;
4672
4704
  exports.PARKS = PARKS;
4673
4705
  exports.PRIMARY_BASEMAPS = PRIMARY_BASEMAPS;
4674
4706
  exports.PRIORITY_ORDER = PRIORITY_ORDER;
@@ -4791,6 +4823,7 @@ exports.getLayerStatesArray = getLayerStatesArray;
4791
4823
  exports.getLayerStyleForTheme = getLayerStyleForTheme;
4792
4824
  exports.getLayersByCategory = getLayersByCategory;
4793
4825
  exports.getLayersWithErrors = getLayersWithErrors;
4826
+ exports.getOutlineStyleForTheme = getOutlineStyleForTheme;
4794
4827
  exports.getSelectionStyle = getSelectionStyle;
4795
4828
  exports.getSimplificationToleranceForZoom = getSimplificationToleranceForZoom;
4796
4829
  exports.getSimplifiedFeaturesForZoom = getSimplifiedFeaturesForZoom;
@@ -4815,6 +4848,7 @@ exports.lotAvailabilityColorExpression = lotAvailabilityColorExpression;
4815
4848
  exports.lotAvailabilityColors = lotAvailabilityColors;
4816
4849
  exports.lotSizeColorExpression = lotSizeColorExpression;
4817
4850
  exports.lotSizeColors = lotSizeColors;
4851
+ exports.markerColor = markerColor;
4818
4852
  exports.nonMatchedColor = nonMatchedColor;
4819
4853
  exports.normalizeLongitude = normalizeLongitude;
4820
4854
  exports.paintPropsEqual = paintPropsEqual;
@@ -4827,6 +4861,7 @@ exports.reorderLayers = reorderLayers;
4827
4861
  exports.resetWorkerUrlWarning = resetWorkerUrlWarning;
4828
4862
  exports.resolveBasemapStyle = resolveBasemapStyle;
4829
4863
  exports.resolveBasemapThumbnail = resolveBasemapThumbnail;
4864
+ exports.resolveDeckInterleaved = resolveDeckInterleaved;
4830
4865
  exports.resolveLayerSourceUrl = resolveLayerSourceUrl;
4831
4866
  exports.salesOfficeColor = salesOfficeColor;
4832
4867
  exports.searchLayers = searchLayers;
@@ -4839,6 +4874,7 @@ exports.simplifyFeature = simplifyFeature;
4839
4874
  exports.simplifyFeatureCollection = simplifyFeatureCollection;
4840
4875
  exports.simplifyFeatureCollectionWithStats = simplifyFeatureCollectionWithStats;
4841
4876
  exports.simplifyPolygon = simplifyPolygon;
4877
+ exports.supportsDeckInterleaving = supportsDeckInterleaving;
4842
4878
  exports.toggleLayerVisibility = toggleLayerVisibility;
4843
4879
  exports.updateLayerState = updateLayerState;
4844
4880
  exports.validateBoundsArray = validateBoundsArray;