@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.cjs CHANGED
@@ -28307,6 +28307,21 @@ var BAND_DATA_MINZOOM = {
28307
28307
  function dominatedVariantMaxzoom(D) {
28308
28308
  return Math.max(BAND_PRIORITY_RANGES[D].minzoom, BAND_DATA_MINZOOM[D]);
28309
28309
  }
28310
+ var DOMINANCE_EXEMPT_FILL_CLASSES = /* @__PURE__ */ new Set([
28311
+ "LNDARE",
28312
+ "DEPARE",
28313
+ "UNSARE",
28314
+ "LAKARE",
28315
+ "DRGARE",
28316
+ "SEAARE"
28317
+ ]);
28318
+ function isExemptOpaqueFill(layer) {
28319
+ if (layer.type !== "fill") return false;
28320
+ for (const cls of DOMINANCE_EXEMPT_FILL_CLASSES) {
28321
+ if (layer.id.startsWith(`s52-${cls}-`)) return true;
28322
+ }
28323
+ return false;
28324
+ }
28310
28325
  var BAND_DRAW_ORDER = ["1", "2", "3", "4", "5", "6"];
28311
28326
  var CHART_BAND_CODES = {
28312
28327
  Overview: ["1"],
@@ -28427,7 +28442,7 @@ function collapsedDominanceGate(B, minzoom) {
28427
28442
  function makeCollapsedBandVariant(layer, B, isExempt) {
28428
28443
  const range = BAND_PRIORITY_RANGES[B];
28429
28444
  const classMinzoom = layer.minzoom ?? 0;
28430
- const minzoom = Math.max(classMinzoom, range.minzoom);
28445
+ const minzoom = isExemptOpaqueFill(layer) ? classMinzoom : Math.max(classMinzoom, range.minzoom);
28431
28446
  if (isExempt) {
28432
28447
  const exempt = {
28433
28448
  ...layer,
@@ -28556,30 +28571,18 @@ var DOMINANCE_EXEMPT_CLASSES = /* @__PURE__ */ new Set([
28556
28571
  "RTPBCN",
28557
28572
  "RDOSTA"
28558
28573
  ]);
28559
- var DOMINANCE_EXEMPT_FILL_CLASSES = /* @__PURE__ */ new Set([
28560
- "LNDARE",
28561
- "DEPARE",
28562
- "UNSARE",
28563
- "LAKARE",
28564
- "DRGARE",
28565
- "SEAARE"
28566
- ]);
28567
28574
  function isDominanceExempt(layer) {
28568
28575
  for (const cls of DOMINANCE_EXEMPT_CLASSES) {
28569
28576
  if (layer.id.startsWith(`s52-${cls}-`)) return true;
28570
28577
  }
28571
- if (layer.type === "fill") {
28572
- for (const cls of DOMINANCE_EXEMPT_FILL_CLASSES) {
28573
- if (layer.id.startsWith(`s52-${cls}-`)) return true;
28574
- }
28575
- }
28578
+ if (isExemptOpaqueFill(layer)) return true;
28576
28579
  return false;
28577
28580
  }
28578
28581
  var TOP_STACK_LIGHT_CLASSES = /* @__PURE__ */ new Set(["LIGHTS"]);
28579
28582
  function makeBandVariants(layer, B) {
28580
28583
  const range = BAND_PRIORITY_RANGES[B];
28581
28584
  const classMinzoom = layer.minzoom ?? 0;
28582
- const minzoom = Math.max(classMinzoom, range.minzoom);
28585
+ const minzoom = isExemptOpaqueFill(layer) ? classMinzoom : Math.max(classMinzoom, range.minzoom);
28583
28586
  const variants = [];
28584
28587
  if (isDominanceExempt(layer)) {
28585
28588
  const exempt = {