@chrtco/sdk 0.10.40 → 0.10.42
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/CHANGELOG.md +22 -0
- package/dist/atlas/browser.cjs +24 -2
- package/dist/atlas/browser.cjs.map +1 -1
- package/dist/atlas/browser.js +24 -2
- package/dist/atlas/browser.js.map +1 -1
- package/dist/index.cjs +37 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +37 -5
- package/dist/index.js.map +1 -1
- package/package.json +20 -3
package/dist/index.cjs
CHANGED
|
@@ -665,7 +665,8 @@ function buildSources(opts = {}) {
|
|
|
665
665
|
type: "vector",
|
|
666
666
|
tiles: [tileTemplate(base, LAND_REGION, "mvt", buildFor(LAND_REGION))],
|
|
667
667
|
minzoom: BUILD_MINZOOM,
|
|
668
|
-
maxzoom: LAND_BUILD_MAXZOOM
|
|
668
|
+
maxzoom: LAND_BUILD_MAXZOOM,
|
|
669
|
+
attribution: LAND_ATTRIBUTION
|
|
669
670
|
};
|
|
670
671
|
}
|
|
671
672
|
if (opts.base) {
|
|
@@ -684,7 +685,8 @@ function buildSources(opts = {}) {
|
|
|
684
685
|
encoding: RELIEF_ENCODING,
|
|
685
686
|
tileSize: RELIEF_TILE_SIZE,
|
|
686
687
|
minzoom: RELIEF_MINZOOM,
|
|
687
|
-
maxzoom: RELIEF_MAXZOOM
|
|
688
|
+
maxzoom: RELIEF_MAXZOOM,
|
|
689
|
+
attribution: RELIEF_ATTRIBUTION
|
|
688
690
|
};
|
|
689
691
|
}
|
|
690
692
|
return sources;
|
|
@@ -1361,6 +1363,14 @@ function requireManifestPath(manifestPath) {
|
|
|
1361
1363
|
// src/endpoints/offline.ts
|
|
1362
1364
|
var PROGRESS_MIN_BYTES = 1024 * 1024;
|
|
1363
1365
|
var PROGRESS_MIN_FRACTION = 0.01;
|
|
1366
|
+
function noStoreInit() {
|
|
1367
|
+
try {
|
|
1368
|
+
new Request("http://localhost/", { cache: "no-store" });
|
|
1369
|
+
return { cache: "no-store" };
|
|
1370
|
+
} catch {
|
|
1371
|
+
return {};
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1364
1374
|
var OfflineEndpoint = class {
|
|
1365
1375
|
constructor(http, deviceId, manifestPath) {
|
|
1366
1376
|
this.http = http;
|
|
@@ -1647,7 +1657,7 @@ var OfflineEndpoint = class {
|
|
|
1647
1657
|
resumed = true;
|
|
1648
1658
|
}
|
|
1649
1659
|
}
|
|
1650
|
-
const fetchInit = { method: "GET", signal };
|
|
1660
|
+
const fetchInit = { method: "GET", signal, ...noStoreInit() };
|
|
1651
1661
|
if (startByte > 0) {
|
|
1652
1662
|
fetchInit.headers = { Range: `bytes=${startByte}-` };
|
|
1653
1663
|
}
|
|
@@ -2426,7 +2436,12 @@ var S52_DUSK = {
|
|
|
2426
2436
|
CHMGF: "#905090",
|
|
2427
2437
|
CHWHT: "#90a0a0",
|
|
2428
2438
|
CHCOR: "#a06030",
|
|
2429
|
-
|
|
2439
|
+
// Deeper-than-safety soundings. Was #606060, which measured 2.39:1 on this
|
|
2440
|
+
// palette's DEPMD (#7ba6b8). DUSK water is LIGHT, so the only way to 3:1 is
|
|
2441
|
+
// darker: #505050 = 3.07:1 on DEPMD, 4.09:1 on DEPDW (spec: #292e2e). The
|
|
2442
|
+
// shoaler SNDG2 stays the louder numeral through its UIBCK halo cut-out.
|
|
2443
|
+
// Guarded with NIGHT's by `sounding-legibility.test.ts`; see S52_NIGHT.SNDG1.
|
|
2444
|
+
SNDG1: "#505050",
|
|
2430
2445
|
SNDG2: "#b0b0b0",
|
|
2431
2446
|
DEPSC: "#606060",
|
|
2432
2447
|
DEPCN: "#2E2E2E",
|
|
@@ -2497,7 +2512,24 @@ var S52_NIGHT = {
|
|
|
2497
2512
|
CHMGF: "#482848",
|
|
2498
2513
|
CHWHT: "#484840",
|
|
2499
2514
|
CHCOR: "#683818",
|
|
2500
|
-
|
|
2515
|
+
// ⚠ DELIBERATE DEVIATION from the published S-52 NIGHT value (#1f2223),
|
|
2516
|
+
// for the reason DEPCN's below gives, on the deeper-than-safety soundings.
|
|
2517
|
+
//
|
|
2518
|
+
// Reported 2026-09-30 at night on CHRTdesktop (Raspberry Pi 4): "we mute
|
|
2519
|
+
// out the ones that are 'deep' but I need to still be able to see them."
|
|
2520
|
+
// The previous value, #383028, measured 1.37:1 on DEPDW and 1.08:1 on
|
|
2521
|
+
// DEPMD: the muted soundings had disappeared entirely.
|
|
2522
|
+
//
|
|
2523
|
+
// #897350 is SNDG2 (#c8aa78) scaled to 43% of its linear light, so it keeps
|
|
2524
|
+
// SNDG2's hue (the NIGHT table's warm linework family, kind to a
|
|
2525
|
+
// dark-adapted eye and to red night). Against this palette's water it
|
|
2526
|
+
// measures 3.10:1 on DEPMD and 3.91:1 on DEPDW, which clears the 3:1 floor.
|
|
2527
|
+
// It is 0.49x SNDG2's contrast on any of them, so the eye still goes to
|
|
2528
|
+
// the shoal soundings first. On the lighter DEPMS/DEPVS water the UIBCK
|
|
2529
|
+
// halo carries it: fill against halo is 4.37:1.
|
|
2530
|
+
// The window is narrow (luminance 0.175-0.187 meets both conditions), and
|
|
2531
|
+
// `sounding-legibility.test.ts` pins both ends for every symbol family.
|
|
2532
|
+
SNDG1: "#897350",
|
|
2501
2533
|
SNDG2: "#c8aa78",
|
|
2502
2534
|
DEPSC: "#383028",
|
|
2503
2535
|
// ⚠ DELIBERATE DEVIATION from the published S-52 NIGHT value (#1f2223),
|