@chrtco/sdk 0.10.8 → 0.10.10

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.d.cts CHANGED
@@ -114,11 +114,15 @@ declare function buildOfflineStyle(onlineStyle: MapLibreStyle, mbtilesPath: stri
114
114
  * baremetal NDJSON export time). NOAA's cell-id format encodes the source
115
115
  * scale band as the third character: `US5MA85M` is band 5 (Harbor).
116
116
  *
117
- * MapLibre layer filters can't read `["zoom"]`, so to enforce "only one
118
- * band renders at any given zoom" we emit one layer copy per band, each
119
- * with a static band filter and per-band `minzoom`/`maxzoom`. The ranges
120
- * below are non-overlapping (`minzoom` inclusive, `maxzoom` exclusive),
121
- * so exactly one band is visible at any continuous zoom.
117
+ * We emit one layer copy per band, each with a static band filter and a
118
+ * per-band `minzoom`. The ranges deliberately have NO `maxzoom` and are
119
+ * NOT exclusive: bands cascade — every band whose floor is satisfied
120
+ * renders, deeper bands paint over coarser ones, and the coarser bands
121
+ * ARE the fallback wherever finer coverage is missing (see
122
+ * BAND_PRIORITY_RANGES below). An earlier design hard-swapped exactly
123
+ * one band per zoom window; that shipped visible voids wherever the
124
+ * active band had no data and was replaced by the cascade — do not
125
+ * reintroduce per-band `maxzoom` here.
122
126
  *
123
127
  * Long-term cleanup: baremetal should emit a normalized `_band: 1..6`
124
128
  * integer in NDJSON so this works for non-NOAA chart sources too. The
@@ -2553,9 +2557,10 @@ declare function getLookupEntry(layerName: string): LookupEntry;
2553
2557
  * none is supplied. It matches `custom-style.ts`'s config default.
2554
2558
  *
2555
2559
  * NOTE: `depareFillExpression` below deliberately does NOT use this — its
2556
- * 2/5/10 m bands are the S-52 four-shade DEPARE ramp, a separate concept
2557
- * from the safety contour. Wiring those to the user's contour would change
2558
- * rendering for every existing user and needs its own decision.
2560
+ * 2/5/18.2 m bands are the four-shade DEPARE ramp (see DEPARE_DEEP_CUT_M
2561
+ * for why the deep cut is 18.2), a separate concept from the safety
2562
+ * contour. Wiring those to the user's contour would change rendering for
2563
+ * every existing user and needs its own decision.
2559
2564
  */
2560
2565
  declare const DEFAULT_SAFETY_CONTOUR_M = 10;
2561
2566
  declare function depareColor(props: Record<string, unknown>, ct?: ColorTableName): string;
package/dist/index.d.ts CHANGED
@@ -114,11 +114,15 @@ declare function buildOfflineStyle(onlineStyle: MapLibreStyle, mbtilesPath: stri
114
114
  * baremetal NDJSON export time). NOAA's cell-id format encodes the source
115
115
  * scale band as the third character: `US5MA85M` is band 5 (Harbor).
116
116
  *
117
- * MapLibre layer filters can't read `["zoom"]`, so to enforce "only one
118
- * band renders at any given zoom" we emit one layer copy per band, each
119
- * with a static band filter and per-band `minzoom`/`maxzoom`. The ranges
120
- * below are non-overlapping (`minzoom` inclusive, `maxzoom` exclusive),
121
- * so exactly one band is visible at any continuous zoom.
117
+ * We emit one layer copy per band, each with a static band filter and a
118
+ * per-band `minzoom`. The ranges deliberately have NO `maxzoom` and are
119
+ * NOT exclusive: bands cascade — every band whose floor is satisfied
120
+ * renders, deeper bands paint over coarser ones, and the coarser bands
121
+ * ARE the fallback wherever finer coverage is missing (see
122
+ * BAND_PRIORITY_RANGES below). An earlier design hard-swapped exactly
123
+ * one band per zoom window; that shipped visible voids wherever the
124
+ * active band had no data and was replaced by the cascade — do not
125
+ * reintroduce per-band `maxzoom` here.
122
126
  *
123
127
  * Long-term cleanup: baremetal should emit a normalized `_band: 1..6`
124
128
  * integer in NDJSON so this works for non-NOAA chart sources too. The
@@ -2553,9 +2557,10 @@ declare function getLookupEntry(layerName: string): LookupEntry;
2553
2557
  * none is supplied. It matches `custom-style.ts`'s config default.
2554
2558
  *
2555
2559
  * NOTE: `depareFillExpression` below deliberately does NOT use this — its
2556
- * 2/5/10 m bands are the S-52 four-shade DEPARE ramp, a separate concept
2557
- * from the safety contour. Wiring those to the user's contour would change
2558
- * rendering for every existing user and needs its own decision.
2560
+ * 2/5/18.2 m bands are the four-shade DEPARE ramp (see DEPARE_DEEP_CUT_M
2561
+ * for why the deep cut is 18.2), a separate concept from the safety
2562
+ * contour. Wiring those to the user's contour would change rendering for
2563
+ * every existing user and needs its own decision.
2559
2564
  */
2560
2565
  declare const DEFAULT_SAFETY_CONTOUR_M = 10;
2561
2566
  declare function depareColor(props: Record<string, unknown>, ct?: ColorTableName): string;
package/dist/index.js CHANGED
@@ -5270,13 +5270,14 @@ function patternSpriteId(patternName) {
5270
5270
 
5271
5271
  // src/atlas/s52-conditional.ts
5272
5272
  var DEFAULT_SAFETY_CONTOUR_M = 10;
5273
+ var DEPARE_DEEP_CUT_M = 18.2;
5273
5274
  function depareColor(props, ct = "DAY") {
5274
5275
  const drval1 = Number(props.DRVAL1 ?? props.drval1 ?? -1);
5275
5276
  const drval2 = Number(props.DRVAL2 ?? props.drval2 ?? drval1);
5276
5277
  if (drval1 < 0 && drval2 <= 0) return resolveColor("DEPIT", ct);
5277
5278
  if (drval1 < 2) return resolveColor("DEPVS", ct);
5278
5279
  if (drval1 < 5) return resolveColor("DEPMS", ct);
5279
- if (drval1 < 10) return resolveColor("DEPMD", ct);
5280
+ if (drval1 < DEPARE_DEEP_CUT_M) return resolveColor("DEPMD", ct);
5280
5281
  return resolveColor("DEPDW", ct);
5281
5282
  }
5282
5283
  function depareFillExpression(ct = "DAY") {
@@ -5292,7 +5293,7 @@ function depareFillExpression(ct = "DAY") {
5292
5293
  resolveColor("DEPVS", ct),
5293
5294
  ["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], 5],
5294
5295
  resolveColor("DEPMS", ct),
5295
- ["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], 10],
5296
+ ["<", ["coalesce", ["get", "DRVAL1"], ["get", "drval1"], -1], DEPARE_DEEP_CUT_M],
5296
5297
  resolveColor("DEPMD", ct),
5297
5298
  resolveColor("DEPDW", ct)
5298
5299
  ];