@chrtco/sdk 0.10.24 → 0.10.25
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/atlas/browser.cjs +20 -3
- package/dist/atlas/browser.cjs.map +1 -1
- package/dist/atlas/browser.js +20 -3
- package/dist/atlas/browser.js.map +1 -1
- package/dist/index.cjs +45 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +45 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4542,7 +4542,7 @@ var S52_DAY = {
|
|
|
4542
4542
|
SNDG1: "#7d898c",
|
|
4543
4543
|
SNDG2: "#070707",
|
|
4544
4544
|
DEPSC: "#525a5c",
|
|
4545
|
-
DEPCN: "#
|
|
4545
|
+
DEPCN: "#555555",
|
|
4546
4546
|
// Utility / infrastructure
|
|
4547
4547
|
UINFD: "#070707",
|
|
4548
4548
|
UINFF: "#7d898c",
|
|
@@ -4616,7 +4616,7 @@ var S52_DUSK = {
|
|
|
4616
4616
|
SNDG1: "#606060",
|
|
4617
4617
|
SNDG2: "#b0b0b0",
|
|
4618
4618
|
DEPSC: "#606060",
|
|
4619
|
-
DEPCN: "#
|
|
4619
|
+
DEPCN: "#2E2E2E",
|
|
4620
4620
|
UINFD: "#b0b0b0",
|
|
4621
4621
|
UINFF: "#606060",
|
|
4622
4622
|
UINFR: "#b05060",
|
|
@@ -4687,7 +4687,24 @@ var S52_NIGHT = {
|
|
|
4687
4687
|
SNDG1: "#383028",
|
|
4688
4688
|
SNDG2: "#c8aa78",
|
|
4689
4689
|
DEPSC: "#383028",
|
|
4690
|
-
|
|
4690
|
+
// ⚠ DELIBERATE DEVIATION from the published S-52 NIGHT value (#1f2223),
|
|
4691
|
+
// recorded here because `docs/validation/s52-spec-gap-matrix.json` tracks
|
|
4692
|
+
// this token as `value-differs` and the CHRTstyles programme is bringing
|
|
4693
|
+
// colours TO spec — this one moves further away, on purpose.
|
|
4694
|
+
//
|
|
4695
|
+
// Spec NIGHT DEPCN is near-black, which measures ~1.1:1 against this
|
|
4696
|
+
// palette's own deep water (#051a28). S-52's NIGHT table assumes a
|
|
4697
|
+
// dark-adapted eye in a darkened wheelhouse; on a phone or a laptop at
|
|
4698
|
+
// anchor it is not dim, it is absent — reported as "can't see bottom
|
|
4699
|
+
// contours in night mode only". A contour nobody can see fails the
|
|
4700
|
+
// standard's intent while matching its number.
|
|
4701
|
+
//
|
|
4702
|
+
// The palette already makes this trade elsewhere and in the same
|
|
4703
|
+
// direction: NIGHT's CHBLK/CSTLN/OUTLW are #c8aa78, light warm linework on
|
|
4704
|
+
// dark water. This value is that family, dimmed to stay subordinate to the
|
|
4705
|
+
// coastline. Revisit with the CHRTstyles programme, which owns the
|
|
4706
|
+
// spec-vs-legibility call across all 63 tokens.
|
|
4707
|
+
DEPCN: "#A68E84",
|
|
4691
4708
|
UINFD: "#c8aa78",
|
|
4692
4709
|
UINFF: "#383028",
|
|
4693
4710
|
UINFR: "#682030",
|
|
@@ -5621,7 +5638,16 @@ var S52_LOOKUP = {
|
|
|
5621
5638
|
category: "Depths",
|
|
5622
5639
|
displayCategory: "STANDARD",
|
|
5623
5640
|
int1Ref: "I30",
|
|
5624
|
-
|
|
5641
|
+
// S-52 names a dedicated depth-contour colour, and this used the shared
|
|
5642
|
+
// chart-grey instead. Reported 2026-09-02: "can't see bottom contours in
|
|
5643
|
+
// night mode only" — measured at 1.06:1 against the deepest NIGHT water,
|
|
5644
|
+
// which is invisible. DAY was 2.00:1 and DUSK 1.63:1 off the same token,
|
|
5645
|
+
// so the bug was worst where the palette is darkest.
|
|
5646
|
+
//
|
|
5647
|
+
// CHGRD is shared by dozens of linestyles (s52-linestyles-generated.ts),
|
|
5648
|
+
// so it could not be retuned for contours without moving all of them.
|
|
5649
|
+
// DEPCN exists in all three palettes and is the token S-52 specifies.
|
|
5650
|
+
style: { type: "line", paint: { "line-color": "DEPCN", "line-width": 0.5 } },
|
|
5625
5651
|
viewingGroup: 13030,
|
|
5626
5652
|
scamin: 45e3
|
|
5627
5653
|
},
|
|
@@ -29411,6 +29437,7 @@ var DOMINANCE_EXEMPT_CLASSES = /* @__PURE__ */ new Set([
|
|
|
29411
29437
|
"RTPBCN",
|
|
29412
29438
|
"RDOSTA"
|
|
29413
29439
|
]);
|
|
29440
|
+
var FINE_LAND_REPAINT_MIN_BAND = 4;
|
|
29414
29441
|
function isDominanceExempt(layer) {
|
|
29415
29442
|
for (const cls of DOMINANCE_EXEMPT_CLASSES) {
|
|
29416
29443
|
if (layer.id.startsWith(`s52-${cls}-`)) return true;
|
|
@@ -29920,6 +29947,20 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
29920
29947
|
repaint.push(domVariant);
|
|
29921
29948
|
}
|
|
29922
29949
|
}
|
|
29950
|
+
if (parseInt(b, 10) >= FINE_LAND_REPAINT_MIN_BAND) {
|
|
29951
|
+
for (const l of relocated.filter(
|
|
29952
|
+
(x) => bandOf(x) === b && isLndareFill(x)
|
|
29953
|
+
)) {
|
|
29954
|
+
const src = l;
|
|
29955
|
+
const landClone = {
|
|
29956
|
+
...l,
|
|
29957
|
+
id: `${src.id}-overpair`,
|
|
29958
|
+
metadata: { ...src.metadata ?? {}, "chrt:role": "charted-land-repaint" }
|
|
29959
|
+
};
|
|
29960
|
+
delete landClone.maxzoom;
|
|
29961
|
+
repaint.push(landClone);
|
|
29962
|
+
}
|
|
29963
|
+
}
|
|
29923
29964
|
}
|
|
29924
29965
|
const isCoalneLine = (l) => /^s52-COALNE-line-band\d(-domBy\d)?$/.test(l.id);
|
|
29925
29966
|
for (const l of layers.filter(isCoalneLine)) {
|