@chrtco/sdk 0.10.13 → 0.10.15
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 +37 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28224,6 +28224,11 @@ function getOrderedClasses() {
|
|
|
28224
28224
|
}
|
|
28225
28225
|
|
|
28226
28226
|
// src/atlas/land-layers.ts
|
|
28227
|
+
var FADE_PX = 80;
|
|
28228
|
+
var FADE_BANDS = 16;
|
|
28229
|
+
function fadeAlpha(r) {
|
|
28230
|
+
return Math.max(0, Math.min(1, (FADE_PX / 2 - Math.abs(r)) / FADE_PX));
|
|
28231
|
+
}
|
|
28227
28232
|
var LAND_THEMES = {
|
|
28228
28233
|
DAY: {
|
|
28229
28234
|
base: "#e8d9b0",
|
|
@@ -28235,7 +28240,14 @@ var LAND_THEMES = {
|
|
|
28235
28240
|
label: "#5b4f3a",
|
|
28236
28241
|
halo: "#f2ead6",
|
|
28237
28242
|
shadow: "#6b5a3e",
|
|
28238
|
-
highlight: "#fffaf0"
|
|
28243
|
+
highlight: "#fffaf0",
|
|
28244
|
+
fade: "#e8f2f8",
|
|
28245
|
+
// Raised from 0.45 on 2026-08-23. ⚠ Above the ~0.5 that
|
|
28246
|
+
// hillshade-style.mjs warns "starts competing with depth areas" — a
|
|
28247
|
+
// deliberate, sighted choice made against rendered evidence, not a
|
|
28248
|
+
// default. If soundings or DEPARE ever read as fighting the terrain,
|
|
28249
|
+
// this number is the first thing to walk back.
|
|
28250
|
+
exaggeration: 0.8
|
|
28239
28251
|
},
|
|
28240
28252
|
DUSK: {
|
|
28241
28253
|
base: "#4a4433",
|
|
@@ -28247,7 +28259,10 @@ var LAND_THEMES = {
|
|
|
28247
28259
|
label: "#c3b898",
|
|
28248
28260
|
halo: "#2b2820",
|
|
28249
28261
|
shadow: "#2e2a20",
|
|
28250
|
-
highlight: "#8a8068"
|
|
28262
|
+
highlight: "#8a8068",
|
|
28263
|
+
fade: "#16202a",
|
|
28264
|
+
// Unchanged. DUSK was not the palette the 0.8 decision was made against.
|
|
28265
|
+
exaggeration: 0.45
|
|
28251
28266
|
},
|
|
28252
28267
|
NIGHT: {
|
|
28253
28268
|
base: "#2a2620",
|
|
@@ -28259,7 +28274,13 @@ var LAND_THEMES = {
|
|
|
28259
28274
|
label: "#7d745e",
|
|
28260
28275
|
halo: "#15130f",
|
|
28261
28276
|
shadow: "#1a1712",
|
|
28262
|
-
highlight: "#4a4436"
|
|
28277
|
+
highlight: "#4a4436",
|
|
28278
|
+
fade: "#07090b",
|
|
28279
|
+
// ⚠ DELIBERATELY NOT RAISED. See the type's note: a strong hillshade
|
|
28280
|
+
// under red night vision is a grey haze over exactly the contrast a
|
|
28281
|
+
// skipper is navigating by. Left at the shipped value rather than
|
|
28282
|
+
// lowered, because lowering it is a separate decision from this one.
|
|
28283
|
+
exaggeration: 0.45
|
|
28263
28284
|
}
|
|
28264
28285
|
};
|
|
28265
28286
|
var FITS = ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]];
|
|
@@ -28322,7 +28343,7 @@ function landLayers(opts = {}) {
|
|
|
28322
28343
|
type: "hillshade",
|
|
28323
28344
|
source: demSrc,
|
|
28324
28345
|
paint: {
|
|
28325
|
-
"hillshade-exaggeration":
|
|
28346
|
+
"hillshade-exaggeration": T.exaggeration,
|
|
28326
28347
|
"hillshade-shadow-color": T.shadow,
|
|
28327
28348
|
"hillshade-highlight-color": T.highlight,
|
|
28328
28349
|
"hillshade-accent-color": T.shadow
|
|
@@ -28340,6 +28361,18 @@ function landLayers(opts = {}) {
|
|
|
28340
28361
|
"line-opacity": 0.7
|
|
28341
28362
|
}
|
|
28342
28363
|
}));
|
|
28364
|
+
const d = FADE_PX / 2 / FADE_BANDS;
|
|
28365
|
+
for (let k = 0; k < FADE_BANDS; k++) {
|
|
28366
|
+
const width = k === 0 ? { "line-width": 2 * d } : { "line-width": d, "line-gap-width": 2 * k * d };
|
|
28367
|
+
layers.push(L({
|
|
28368
|
+
id: `chrtland-fade-${k}`,
|
|
28369
|
+
type: "line",
|
|
28370
|
+
source: src,
|
|
28371
|
+
"source-layer": "land_edge",
|
|
28372
|
+
layout: { "line-join": "bevel" },
|
|
28373
|
+
paint: { "line-color": T.fade, "line-blur": 0, "line-opacity": fadeAlpha(k * d + d / 2), ...width }
|
|
28374
|
+
}));
|
|
28375
|
+
}
|
|
28343
28376
|
layers.push(L({
|
|
28344
28377
|
id: "chrtland-road",
|
|
28345
28378
|
type: "line",
|