@chrtco/sdk 0.10.10 → 0.10.11

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.js CHANGED
@@ -28101,6 +28101,21 @@ var BAND_DATA_MINZOOM = {
28101
28101
  function dominatedVariantMaxzoom(D) {
28102
28102
  return Math.max(BAND_PRIORITY_RANGES[D].minzoom, BAND_DATA_MINZOOM[D]);
28103
28103
  }
28104
+ var DOMINANCE_EXEMPT_FILL_CLASSES = /* @__PURE__ */ new Set([
28105
+ "LNDARE",
28106
+ "DEPARE",
28107
+ "UNSARE",
28108
+ "LAKARE",
28109
+ "DRGARE",
28110
+ "SEAARE"
28111
+ ]);
28112
+ function isExemptOpaqueFill(layer) {
28113
+ if (layer.type !== "fill") return false;
28114
+ for (const cls of DOMINANCE_EXEMPT_FILL_CLASSES) {
28115
+ if (layer.id.startsWith(`s52-${cls}-`)) return true;
28116
+ }
28117
+ return false;
28118
+ }
28104
28119
  var BAND_DRAW_ORDER = ["1", "2", "3", "4", "5", "6"];
28105
28120
  var CHART_BAND_CODES = {
28106
28121
  Overview: ["1"],
@@ -28221,7 +28236,7 @@ function collapsedDominanceGate(B, minzoom) {
28221
28236
  function makeCollapsedBandVariant(layer, B, isExempt) {
28222
28237
  const range = BAND_PRIORITY_RANGES[B];
28223
28238
  const classMinzoom = layer.minzoom ?? 0;
28224
- const minzoom = Math.max(classMinzoom, range.minzoom);
28239
+ const minzoom = isExemptOpaqueFill(layer) ? classMinzoom : Math.max(classMinzoom, range.minzoom);
28225
28240
  if (isExempt) {
28226
28241
  const exempt = {
28227
28242
  ...layer,
@@ -28350,30 +28365,18 @@ var DOMINANCE_EXEMPT_CLASSES = /* @__PURE__ */ new Set([
28350
28365
  "RTPBCN",
28351
28366
  "RDOSTA"
28352
28367
  ]);
28353
- var DOMINANCE_EXEMPT_FILL_CLASSES = /* @__PURE__ */ new Set([
28354
- "LNDARE",
28355
- "DEPARE",
28356
- "UNSARE",
28357
- "LAKARE",
28358
- "DRGARE",
28359
- "SEAARE"
28360
- ]);
28361
28368
  function isDominanceExempt(layer) {
28362
28369
  for (const cls of DOMINANCE_EXEMPT_CLASSES) {
28363
28370
  if (layer.id.startsWith(`s52-${cls}-`)) return true;
28364
28371
  }
28365
- if (layer.type === "fill") {
28366
- for (const cls of DOMINANCE_EXEMPT_FILL_CLASSES) {
28367
- if (layer.id.startsWith(`s52-${cls}-`)) return true;
28368
- }
28369
- }
28372
+ if (isExemptOpaqueFill(layer)) return true;
28370
28373
  return false;
28371
28374
  }
28372
28375
  var TOP_STACK_LIGHT_CLASSES = /* @__PURE__ */ new Set(["LIGHTS"]);
28373
28376
  function makeBandVariants(layer, B) {
28374
28377
  const range = BAND_PRIORITY_RANGES[B];
28375
28378
  const classMinzoom = layer.minzoom ?? 0;
28376
- const minzoom = Math.max(classMinzoom, range.minzoom);
28379
+ const minzoom = isExemptOpaqueFill(layer) ? classMinzoom : Math.max(classMinzoom, range.minzoom);
28377
28380
  const variants = [];
28378
28381
  if (isDominanceExempt(layer)) {
28379
28382
  const exempt = {