@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.d.cts
CHANGED
|
@@ -3500,6 +3500,8 @@ interface RasterDemSource {
|
|
|
3500
3500
|
tileSize: number;
|
|
3501
3501
|
minzoom: number;
|
|
3502
3502
|
maxzoom: number;
|
|
3503
|
+
/** The credit a renderer shows for this source (MapLibre's attribution control). */
|
|
3504
|
+
attribution?: string;
|
|
3503
3505
|
}
|
|
3504
3506
|
type VectorSourceSpec = MapboxVectorSource | PmtilesVectorSource;
|
|
3505
3507
|
type AnySourceSpec = VectorSourceSpec | RasterDemSource;
|
package/dist/index.d.ts
CHANGED
|
@@ -3500,6 +3500,8 @@ interface RasterDemSource {
|
|
|
3500
3500
|
tileSize: number;
|
|
3501
3501
|
minzoom: number;
|
|
3502
3502
|
maxzoom: number;
|
|
3503
|
+
/** The credit a renderer shows for this source (MapLibre's attribution control). */
|
|
3504
|
+
attribution?: string;
|
|
3503
3505
|
}
|
|
3504
3506
|
type VectorSourceSpec = MapboxVectorSource | PmtilesVectorSource;
|
|
3505
3507
|
type AnySourceSpec = VectorSourceSpec | RasterDemSource;
|
package/dist/index.js
CHANGED
|
@@ -409,7 +409,8 @@ function buildSources(opts = {}) {
|
|
|
409
409
|
type: "vector",
|
|
410
410
|
tiles: [tileTemplate(base, LAND_REGION, "mvt", buildFor(LAND_REGION))],
|
|
411
411
|
minzoom: BUILD_MINZOOM,
|
|
412
|
-
maxzoom: LAND_BUILD_MAXZOOM
|
|
412
|
+
maxzoom: LAND_BUILD_MAXZOOM,
|
|
413
|
+
attribution: LAND_ATTRIBUTION
|
|
413
414
|
};
|
|
414
415
|
}
|
|
415
416
|
if (opts.base) {
|
|
@@ -428,7 +429,8 @@ function buildSources(opts = {}) {
|
|
|
428
429
|
encoding: RELIEF_ENCODING,
|
|
429
430
|
tileSize: RELIEF_TILE_SIZE,
|
|
430
431
|
minzoom: RELIEF_MINZOOM,
|
|
431
|
-
maxzoom: RELIEF_MAXZOOM
|
|
432
|
+
maxzoom: RELIEF_MAXZOOM,
|
|
433
|
+
attribution: RELIEF_ATTRIBUTION
|
|
432
434
|
};
|
|
433
435
|
}
|
|
434
436
|
return sources;
|
|
@@ -1105,6 +1107,14 @@ function requireManifestPath(manifestPath) {
|
|
|
1105
1107
|
// src/endpoints/offline.ts
|
|
1106
1108
|
var PROGRESS_MIN_BYTES = 1024 * 1024;
|
|
1107
1109
|
var PROGRESS_MIN_FRACTION = 0.01;
|
|
1110
|
+
function noStoreInit() {
|
|
1111
|
+
try {
|
|
1112
|
+
new Request("http://localhost/", { cache: "no-store" });
|
|
1113
|
+
return { cache: "no-store" };
|
|
1114
|
+
} catch {
|
|
1115
|
+
return {};
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1108
1118
|
var OfflineEndpoint = class {
|
|
1109
1119
|
constructor(http, deviceId, manifestPath) {
|
|
1110
1120
|
this.http = http;
|
|
@@ -1391,7 +1401,7 @@ var OfflineEndpoint = class {
|
|
|
1391
1401
|
resumed = true;
|
|
1392
1402
|
}
|
|
1393
1403
|
}
|
|
1394
|
-
const fetchInit = { method: "GET", signal };
|
|
1404
|
+
const fetchInit = { method: "GET", signal, ...noStoreInit() };
|
|
1395
1405
|
if (startByte > 0) {
|
|
1396
1406
|
fetchInit.headers = { Range: `bytes=${startByte}-` };
|
|
1397
1407
|
}
|
|
@@ -2170,7 +2180,12 @@ var S52_DUSK = {
|
|
|
2170
2180
|
CHMGF: "#905090",
|
|
2171
2181
|
CHWHT: "#90a0a0",
|
|
2172
2182
|
CHCOR: "#a06030",
|
|
2173
|
-
|
|
2183
|
+
// Deeper-than-safety soundings. Was #606060, which measured 2.39:1 on this
|
|
2184
|
+
// palette's DEPMD (#7ba6b8). DUSK water is LIGHT, so the only way to 3:1 is
|
|
2185
|
+
// darker: #505050 = 3.07:1 on DEPMD, 4.09:1 on DEPDW (spec: #292e2e). The
|
|
2186
|
+
// shoaler SNDG2 stays the louder numeral through its UIBCK halo cut-out.
|
|
2187
|
+
// Guarded with NIGHT's by `sounding-legibility.test.ts`; see S52_NIGHT.SNDG1.
|
|
2188
|
+
SNDG1: "#505050",
|
|
2174
2189
|
SNDG2: "#b0b0b0",
|
|
2175
2190
|
DEPSC: "#606060",
|
|
2176
2191
|
DEPCN: "#2E2E2E",
|
|
@@ -2241,7 +2256,24 @@ var S52_NIGHT = {
|
|
|
2241
2256
|
CHMGF: "#482848",
|
|
2242
2257
|
CHWHT: "#484840",
|
|
2243
2258
|
CHCOR: "#683818",
|
|
2244
|
-
|
|
2259
|
+
// ⚠ DELIBERATE DEVIATION from the published S-52 NIGHT value (#1f2223),
|
|
2260
|
+
// for the reason DEPCN's below gives, on the deeper-than-safety soundings.
|
|
2261
|
+
//
|
|
2262
|
+
// Reported 2026-09-30 at night on CHRTdesktop (Raspberry Pi 4): "we mute
|
|
2263
|
+
// out the ones that are 'deep' but I need to still be able to see them."
|
|
2264
|
+
// The previous value, #383028, measured 1.37:1 on DEPDW and 1.08:1 on
|
|
2265
|
+
// DEPMD: the muted soundings had disappeared entirely.
|
|
2266
|
+
//
|
|
2267
|
+
// #897350 is SNDG2 (#c8aa78) scaled to 43% of its linear light, so it keeps
|
|
2268
|
+
// SNDG2's hue (the NIGHT table's warm linework family, kind to a
|
|
2269
|
+
// dark-adapted eye and to red night). Against this palette's water it
|
|
2270
|
+
// measures 3.10:1 on DEPMD and 3.91:1 on DEPDW, which clears the 3:1 floor.
|
|
2271
|
+
// It is 0.49x SNDG2's contrast on any of them, so the eye still goes to
|
|
2272
|
+
// the shoal soundings first. On the lighter DEPMS/DEPVS water the UIBCK
|
|
2273
|
+
// halo carries it: fill against halo is 4.37:1.
|
|
2274
|
+
// The window is narrow (luminance 0.175-0.187 meets both conditions), and
|
|
2275
|
+
// `sounding-legibility.test.ts` pins both ends for every symbol family.
|
|
2276
|
+
SNDG1: "#897350",
|
|
2245
2277
|
SNDG2: "#c8aa78",
|
|
2246
2278
|
DEPSC: "#383028",
|
|
2247
2279
|
// ⚠ DELIBERATE DEVIATION from the published S-52 NIGHT value (#1f2223),
|