@chrtco/sdk 0.10.48 → 0.10.49

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
@@ -25706,8 +25706,6 @@ function getLabelConfig(layerName, opts = {}) {
25706
25706
  // UWTROC/OBSTRN/WRECKS are dominance-PARTICIPATING classes —
25707
25707
  // exactly one band's copy renders at any zoom, so anchor-shifting
25708
25708
  // can't split a cross-band duplicate pair into two visible labels.
25709
- // Shallowest (most dangerous) hazard wins within-class contests;
25710
- // VALSOU-less hazards (awash / unsounded) rank first of all.
25711
25709
  layout: {
25712
25710
  "text-variable-anchor": ["top-left", "bottom-left", "top-right", "bottom-right"],
25713
25711
  "text-radial-offset": 0.9,
@@ -25731,6 +25729,23 @@ function getLabelConfig(layerName, opts = {}) {
25731
25729
  "text-allow-overlap": true,
25732
25730
  "text-optional": true,
25733
25731
  "text-padding": 2,
25732
+ // ⚠ THE DEPTH SORT KEY IS LOAD-BEARING — do not "optimise" it to a
25733
+ // constant. It costs draw calls: MapLibre 5.24 draws an overlapping
25734
+ // layer with a data-driven key one segment per distinct key, twice
25735
+ // with a halo over 1 px (`drawLayerSymbols`, `hasSortKey &&
25736
+ // bucket.canOverlap`), so at 100 % the chart issues +14 % draw calls
25737
+ // at z12.3 against 0.10.3 (R6's 0.10.4 gate). But the key is also
25738
+ // the PLACEMENT order, and a callout keeps its collision box, so the
25739
+ // order decides which corner each callout takes and therefore which
25740
+ // soundings and buoy names survive beneath it. Measured with each
25741
+ // form booted fresh (2026-10-06, Boston and Salem Sound, z11.5–16,
25742
+ // at 1280×800 and the Pi's 1920×1185): a constant key, 3/4/5 depth
25743
+ // bands and whole metres ALL uncover shoals that 0.10.3 drew (a
25744
+ // constant key: 5 at z12.3 on the Pi's canvas, a 0.6 m one at
25745
+ // 1280×800) and change buoy names; only this key matches 0.10.4's
25746
+ // census. `danger-depth-census.ts --form <json>` re-runs that gate
25747
+ // for any candidate. A 1 px halo (one pass, not two) halves the
25748
+ // cost with placement byte-identical — a portrayal call, not taken.
25734
25749
  "symbol-sort-key": labelSortKey(100, ["*", 10, valsou])
25735
25750
  }
25736
25751
  };