@unmap/themes 0.22.0 → 0.23.0

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/README.md CHANGED
@@ -31,7 +31,7 @@ const doc = await decodeTheme(code) // validated ThemeDoc, or th
31
31
 
32
32
  ## What is in a theme
33
33
 
34
- - `base` picks the style: `base`, `muted`, `outdoor`, `blueprint`, `blush`, `orchid`, `canopy`, `lagoon`, `tropic`, `sunset`, `bold`, `pastel`, `atlas` or `swiss`. Each of `light` and `dark` carries
34
+ - `base` picks the style: `base`, `muted`, `outdoor`, `blueprint`, `blush`, `orchid`, `canopy`, `lagoon`, `tropic`, `sunset`, `bold`, `pastel`, `atlas`, `swiss` or `winter`. Each of `light` and `dark` carries
35
35
  sparse overrides on that style, so a theme with no overrides renders exactly like the style
36
36
  itself at `/styles/<style>.json`.
37
37
  - `basemap` overrides are colours on the style's recipe (land, water, vegetation, roads, labels,
package/dist/index.d.ts CHANGED
@@ -461,7 +461,7 @@ declare const swissRelief: {
461
461
  * the unmap.dev builder, so inserting a style mid-array silently reorders a control people have
462
462
  * already learned.
463
463
  */
464
- declare const THEME_BASES: readonly ["base", "muted", "outdoor", "blueprint", "blush", "orchid", "canopy", "lagoon", "tropic", "sunset", "bold", "pastel", "atlas", "swiss"];
464
+ declare const THEME_BASES: readonly ["base", "muted", "outdoor", "blueprint", "blush", "orchid", "canopy", "lagoon", "tropic", "sunset", "bold", "pastel", "atlas", "swiss", "winter"];
465
465
  type ThemeBase = (typeof THEME_BASES)[number];
466
466
  /** Whether `base` names a shipped style. */
467
467
  declare function isThemeBase(base: unknown): base is ThemeBase;
package/dist/index.js CHANGED
@@ -364,7 +364,8 @@ var THEME_BASES = [
364
364
  "bold",
365
365
  "pastel",
366
366
  "atlas",
367
- "swiss"
367
+ "swiss",
368
+ "winter"
368
369
  ];
369
370
  function isThemeBase(base) {
370
371
  return typeof base === "string" && THEME_BASES.includes(base);
@@ -2290,6 +2291,156 @@ function buildRecipes(r) {
2290
2291
  forest: r.fern[800]
2291
2292
  }
2292
2293
  };
2294
+ const WINTER_LIGHT = {
2295
+ background: r.ink[50],
2296
+ earth: r.ink[25],
2297
+ water: r.azure[300],
2298
+ parkA: r.jade[200],
2299
+ parkB: r.jade[300],
2300
+ woodA: r.jade[400],
2301
+ woodB: r.jade[500],
2302
+ scrubA: r.ink[100],
2303
+ scrubB: r.ink[200],
2304
+ sand: r.ink[100],
2305
+ beach: r.ink[100],
2306
+ glacier: r.ink[25],
2307
+ institutional: r.ink[50],
2308
+ pedestrian: r.ink[50],
2309
+ aerodrome: r.ink[100],
2310
+ runway: r.ink[300],
2311
+ pier: r.ink[300],
2312
+ buildings: r.ink[200],
2313
+ railway: r.ink[500],
2314
+ boundaries: r.cobalt[500],
2315
+ roads: {
2316
+ other: "#FFFFFF",
2317
+ otherCasing: r.ink[200],
2318
+ minor: "#FFFFFF",
2319
+ minorCasing: r.ink[200],
2320
+ service: "#FFFFFF",
2321
+ serviceCasing: r.ink[200],
2322
+ major: "#FFFFFF",
2323
+ majorCasing: r.ink[300],
2324
+ highway: r.cobalt[400],
2325
+ highwayCasing: r.cobalt[600],
2326
+ link: r.cobalt[300],
2327
+ linkCasing: r.cobalt[500]
2328
+ },
2329
+ tunnelFill: r.ink[100],
2330
+ tunnelCasing: r.ink[200],
2331
+ bridgeCasing: r.ink[400],
2332
+ labels: {
2333
+ city: r.ink[1e3],
2334
+ cityHalo: r.ink[25],
2335
+ state: r.ink[700],
2336
+ stateHalo: r.ink[25],
2337
+ country: r.ink[700],
2338
+ subplace: r.ink[700],
2339
+ subplaceHalo: r.ink[25],
2340
+ address: r.ink[700],
2341
+ addressHalo: r.ink[25],
2342
+ roadMinor: r.ink[700],
2343
+ roadMinorHalo: r.ink[25],
2344
+ roadMajor: r.ink[800],
2345
+ roadMajorHalo: r.ink[25],
2346
+ ocean: r.azure[800]
2347
+ },
2348
+ pois: {
2349
+ blue: r.azure[700],
2350
+ green: r.jade[800],
2351
+ lapis: r.cobalt[700],
2352
+ pink: r.rose[700],
2353
+ red: r.rose[800],
2354
+ slategray: r.ink[700],
2355
+ tangerine: r.sandstone[500],
2356
+ turquoise: r.wave[700]
2357
+ },
2358
+ landcover: {
2359
+ // Snow covers the open ground, so grass, barren land and fields all go to the snow tones
2360
+ // and only the forest keeps colour.
2361
+ grassland: r.ink[100],
2362
+ barren: r.ink[100],
2363
+ urban_area: r.ink[100],
2364
+ farmland: r.ink[50],
2365
+ glacier: r.ink[25],
2366
+ scrub: r.ink[200],
2367
+ forest: r.jade[500]
2368
+ }
2369
+ };
2370
+ const WINTER_DARK = {
2371
+ background: r.ink[1e3],
2372
+ earth: r.ink[950],
2373
+ water: r.azure[980],
2374
+ parkA: r.jade[850],
2375
+ parkB: r.jade[800],
2376
+ woodA: r.jade[800],
2377
+ woodB: r.jade[700],
2378
+ scrubA: r.ink[900],
2379
+ scrubB: r.ink[850],
2380
+ sand: r.ink[850],
2381
+ beach: r.ink[850],
2382
+ glacier: r.ink[800],
2383
+ institutional: r.ink[1e3],
2384
+ pedestrian: r.ink[950],
2385
+ aerodrome: r.ink[950],
2386
+ runway: r.ink[850],
2387
+ pier: r.ink[850],
2388
+ buildings: r.ink[900],
2389
+ railway: r.ink[700],
2390
+ boundaries: r.cobalt[400],
2391
+ roads: {
2392
+ other: r.ink[900],
2393
+ otherCasing: r.ink[1e3],
2394
+ minor: r.ink[850],
2395
+ minorCasing: r.ink[1e3],
2396
+ service: r.ink[900],
2397
+ serviceCasing: r.ink[1e3],
2398
+ major: r.ink[700],
2399
+ majorCasing: r.ink[1e3],
2400
+ highway: r.cobalt[600],
2401
+ highwayCasing: r.ink[1e3],
2402
+ link: r.cobalt[700],
2403
+ linkCasing: r.ink[1e3]
2404
+ },
2405
+ tunnelFill: r.ink[900],
2406
+ tunnelCasing: r.ink[1e3],
2407
+ bridgeCasing: r.ink[1e3],
2408
+ labels: {
2409
+ city: r.ink[100],
2410
+ cityHalo: r.ink[1e3],
2411
+ state: r.ink[500],
2412
+ stateHalo: r.ink[1e3],
2413
+ country: r.ink[500],
2414
+ subplace: r.ink[500],
2415
+ subplaceHalo: r.ink[1e3],
2416
+ address: r.ink[500],
2417
+ addressHalo: r.ink[1e3],
2418
+ roadMinor: r.ink[500],
2419
+ roadMinorHalo: r.ink[1e3],
2420
+ roadMajor: r.ink[400],
2421
+ roadMajorHalo: r.ink[1e3],
2422
+ ocean: r.azure[400]
2423
+ },
2424
+ pois: {
2425
+ blue: r.azure[300],
2426
+ green: r.jade[300],
2427
+ lapis: r.cobalt[300],
2428
+ pink: r.rose[300],
2429
+ red: r.rose[400],
2430
+ slategray: r.ink[500],
2431
+ tangerine: r.sandstone[300],
2432
+ turquoise: r.wave[400]
2433
+ },
2434
+ landcover: {
2435
+ grassland: r.ink[900],
2436
+ barren: r.ink[900],
2437
+ urban_area: r.ink[950],
2438
+ farmland: r.ink[900],
2439
+ glacier: r.ink[800],
2440
+ scrub: r.ink[850],
2441
+ forest: r.jade[700]
2442
+ }
2443
+ };
2293
2444
  const traditional = (swiss, mode) => {
2294
2445
  const light = mode === "light";
2295
2446
  const land = swiss ? r.swissPaper : r.atlasPaper;
@@ -2374,7 +2525,8 @@ function buildRecipes(r) {
2374
2525
  bold: { light: BOLD_LIGHT, dark: BOLD_DARK },
2375
2526
  pastel: { light: PASTEL_LIGHT, dark: PASTEL_DARK },
2376
2527
  atlas: { light: traditional(false, "light"), dark: traditional(false, "dark") },
2377
- swiss: { light: traditional(true, "light"), dark: traditional(true, "dark") }
2528
+ swiss: { light: traditional(true, "light"), dark: traditional(true, "dark") },
2529
+ winter: { light: WINTER_LIGHT, dark: WINTER_DARK }
2378
2530
  };
2379
2531
  }
2380
2532
  var RECIPES = buildRecipes(STOCK_RAMPS);
@@ -2557,7 +2709,8 @@ var STYLE_THEMES = {
2557
2709
  bold: { v: 1, name: "bold", base: "bold" },
2558
2710
  pastel: { v: 1, name: "pastel", base: "pastel" },
2559
2711
  atlas: { v: 1, name: "atlas", base: "atlas" },
2560
- swiss: { v: 1, name: "swiss", base: "swiss" }
2712
+ swiss: { v: 1, name: "swiss", base: "swiss" },
2713
+ winter: { v: 1, name: "winter", base: "winter" }
2561
2714
  };
2562
2715
 
2563
2716
  // src/oklch.ts
@@ -3041,7 +3194,8 @@ var STYLE_SLOTS = [
3041
3194
  "bold",
3042
3195
  "pastel",
3043
3196
  "atlas",
3044
- "swiss"
3197
+ "swiss",
3198
+ "winter"
3045
3199
  ];
3046
3200
  var STYLE_BITS = 5n;
3047
3201
  var KIND_BITS = 2n;