@unmap/themes 0.20.0 → 0.22.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/dist/index.d.ts CHANGED
@@ -909,8 +909,8 @@ declare const DEFAULT_SEEDS: Required<ThemeSeeds>;
909
909
  * seed can carry them to any hue, plus `blush`'s `rose`, `orchid`'s `lilac`, the cream `linen` of
910
910
  * `tropic` and `sunset`, and `sunset`'s `indigo`. `nature` recolours `verdant`, `sunset`'s `peach`
911
911
  * and the teal `aqua` of `orchid` and `lagoon`. `water` recolours the wave, sky, azure and mist ramps (`mist` is
912
- * greyscale in stock `muted` and takes the water seed's hue outright), `nature` the verdant
913
- * ramp. Warm landcover (sandstone), the highway ramps (ember, coral, amber), POI accents and white road fills stay stock: they
912
+ * greyscale in stock `muted` and takes the water seed's hue outright), and the water fill of
913
+ * every style whatever ramp it is drawn from, `nature` the verdant ramp. Warm landcover (sandstone), the highway ramps (ember, coral, amber), POI accents and white road fills stay stock: they
914
914
  * are tuned relationships, not identity. `accent` styles the marker and route overlays only —
915
915
  * it never enters the basemap, same rule as the brand magenta.
916
916
  */
package/dist/index.js CHANGED
@@ -2824,9 +2824,14 @@ function generateTheme(base, seeds) {
2824
2824
  peach: reRamp(STOCK_RAMPS.peach, seeds.nature, CHROMA_CAP)
2825
2825
  };
2826
2826
  const generated = buildRecipes(ramps);
2827
+ const watered = buildRecipes(
2828
+ Object.fromEntries(
2829
+ Object.entries(STOCK_RAMPS).map(([name, ramp]) => [name, reRamp(ramp, seeds.water, CHROMA_CAP)])
2830
+ )
2831
+ );
2827
2832
  const doc = { v: 1, base, seeds: { ...seeds } };
2828
2833
  for (const mode of MODES) {
2829
- const recipe = enforceLabelContrast(generated[base][mode]);
2834
+ const recipe = enforceLabelContrast({ ...generated[base][mode], water: watered[base][mode].water });
2830
2835
  const basemap = diffRecipe(RECIPES[base][mode], recipe);
2831
2836
  const half = {};
2832
2837
  if (basemap) half.basemap = basemap;