@chrtco/sdk 0.10.24 → 0.10.26
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 +66 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +66 -5
- 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
|
},
|
|
@@ -28389,6 +28415,9 @@ function bandVariantMinzoom(layer, B) {
|
|
|
28389
28415
|
if (isExemptOpaqueFill(layer) && FILL_FLOOR_FREE_BANDS.has(B)) {
|
|
28390
28416
|
return classMinzoom;
|
|
28391
28417
|
}
|
|
28418
|
+
if (isExemptOpaqueFill(layer)) {
|
|
28419
|
+
return BAND_PRIORITY_RANGES[B].minzoom;
|
|
28420
|
+
}
|
|
28392
28421
|
return Math.max(classMinzoom, BAND_PRIORITY_RANGES[B].minzoom);
|
|
28393
28422
|
}
|
|
28394
28423
|
var GENERALISED_AREA_FILL_CLASSES = /* @__PURE__ */ new Set([
|
|
@@ -29411,6 +29440,7 @@ var DOMINANCE_EXEMPT_CLASSES = /* @__PURE__ */ new Set([
|
|
|
29411
29440
|
"RTPBCN",
|
|
29412
29441
|
"RDOSTA"
|
|
29413
29442
|
]);
|
|
29443
|
+
var FINE_LAND_REPAINT_MIN_BAND = 4;
|
|
29414
29444
|
function isDominanceExempt(layer) {
|
|
29415
29445
|
for (const cls of DOMINANCE_EXEMPT_CLASSES) {
|
|
29416
29446
|
if (layer.id.startsWith(`s52-${cls}-`)) return true;
|
|
@@ -29788,7 +29818,9 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
29788
29818
|
}
|
|
29789
29819
|
}
|
|
29790
29820
|
{
|
|
29791
|
-
const TERMINAL_FILL_RE =
|
|
29821
|
+
const TERMINAL_FILL_RE = new RegExp(
|
|
29822
|
+
`^s52-(?:${[...DOMINANCE_EXEMPT_FILL_CLASSES].join("|")})-fill-band[456]$`
|
|
29823
|
+
);
|
|
29792
29824
|
for (const l of layers) {
|
|
29793
29825
|
const lay = l;
|
|
29794
29826
|
if (!TERMINAL_FILL_RE.test(lay.id)) continue;
|
|
@@ -29920,6 +29952,20 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
29920
29952
|
repaint.push(domVariant);
|
|
29921
29953
|
}
|
|
29922
29954
|
}
|
|
29955
|
+
if (parseInt(b, 10) >= FINE_LAND_REPAINT_MIN_BAND) {
|
|
29956
|
+
for (const l of relocated.filter(
|
|
29957
|
+
(x) => bandOf(x) === b && isLndareFill(x)
|
|
29958
|
+
)) {
|
|
29959
|
+
const src = l;
|
|
29960
|
+
const landClone = {
|
|
29961
|
+
...asBaseTan(l),
|
|
29962
|
+
id: `${src.id}-overpair`,
|
|
29963
|
+
metadata: { ...src.metadata ?? {}, "chrt:role": "charted-land-repaint" }
|
|
29964
|
+
};
|
|
29965
|
+
delete landClone.maxzoom;
|
|
29966
|
+
repaint.push(landClone);
|
|
29967
|
+
}
|
|
29968
|
+
}
|
|
29923
29969
|
}
|
|
29924
29970
|
const isCoalneLine = (l) => /^s52-COALNE-line-band\d(-domBy\d)?$/.test(l.id);
|
|
29925
29971
|
for (const l of layers.filter(isCoalneLine)) {
|
|
@@ -29948,6 +29994,21 @@ function generateStyle(palette = "DAY", opts = {}) {
|
|
|
29948
29994
|
...restAbove.slice(pairAt + 1)
|
|
29949
29995
|
];
|
|
29950
29996
|
}
|
|
29997
|
+
{
|
|
29998
|
+
const hsAt = restFinal.findIndex(
|
|
29999
|
+
(l) => l.type === "hillshade"
|
|
30000
|
+
);
|
|
30001
|
+
let lastRepaint = -1;
|
|
30002
|
+
restFinal.forEach((l, i) => {
|
|
30003
|
+
if (/-overpair(-|$)/.test(l.id)) lastRepaint = i;
|
|
30004
|
+
});
|
|
30005
|
+
if (hsAt !== -1 && lastRepaint > hsAt) {
|
|
30006
|
+
const reordered = [...restFinal];
|
|
30007
|
+
const [hs] = reordered.splice(hsAt, 1);
|
|
30008
|
+
reordered.splice(lastRepaint, 0, hs);
|
|
30009
|
+
restFinal = reordered;
|
|
30010
|
+
}
|
|
30011
|
+
}
|
|
29951
30012
|
return [restFinal[0], ...baseBlock, ...seaare, ...ordered, ...restFinal.slice(1)];
|
|
29952
30013
|
})() : layers;
|
|
29953
30014
|
for (const id of [
|