@versatiles/style 5.9.4 → 5.10.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.js CHANGED
@@ -456,7 +456,7 @@ class RGB extends Color {
456
456
  const max = Math.max(r, g, b);
457
457
  const delta = max - min;
458
458
  let h = 0;
459
- let s = 0;
459
+ let s;
460
460
  if (max === min)
461
461
  h = 0;
462
462
  else if (r === max)
@@ -1591,81 +1591,59 @@ function getShortbreadLayers(option) {
1591
1591
  ];
1592
1592
  }
1593
1593
 
1594
- /**
1595
- * @param {string | RegExp} a
1596
- * @param {string | RegExp} b
1597
- * @param {string} str
1598
- */
1599
- function balanced (a, b, str) {
1600
- if (a instanceof RegExp) a = maybeMatch(a, str);
1601
- if (b instanceof RegExp) b = maybeMatch(b, str);
1602
-
1603
- const r = range(a, b, str);
1604
-
1605
- return (
1606
- r && {
1607
- start: r[0],
1608
- end: r[1],
1609
- pre: str.slice(0, r[0]),
1610
- body: str.slice(r[0] + a.length, r[1]),
1611
- post: str.slice(r[1] + b.length)
1612
- }
1613
- )
1614
- }
1615
-
1616
- /**
1617
- * @param {RegExp} reg
1618
- * @param {string} str
1619
- */
1620
- function maybeMatch (reg, str) {
1621
- const m = str.match(reg);
1622
- return m ? m[0] : null
1623
- }
1624
-
1625
- /**
1626
- * @param {string} a
1627
- * @param {string} b
1628
- * @param {string} str
1629
- */
1630
- function range (a, b, str) {
1631
- let begs, beg, left, right, result;
1632
- let ai = str.indexOf(a);
1633
- let bi = str.indexOf(b, ai + 1);
1634
- let i = ai;
1635
-
1636
- if (ai >= 0 && bi > 0) {
1637
- if (a === b) {
1638
- return [ai, bi]
1639
- }
1640
- begs = [];
1641
- left = str.length;
1642
-
1643
- while (i >= 0 && !result) {
1644
- if (i === ai) {
1645
- begs.push(i);
1646
- ai = str.indexOf(a, i + 1);
1647
- } else if (begs.length === 1) {
1648
- result = [begs.pop(), bi];
1649
- } else {
1650
- beg = begs.pop();
1651
- if (beg < left) {
1652
- left = beg;
1653
- right = bi;
1594
+ const balanced = (a, b, str) => {
1595
+ const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
1596
+ const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
1597
+ const r = ma !== null && mb != null && range(ma, mb, str);
1598
+ return (r && {
1599
+ start: r[0],
1600
+ end: r[1],
1601
+ pre: str.slice(0, r[0]),
1602
+ body: str.slice(r[0] + ma.length, r[1]),
1603
+ post: str.slice(r[1] + mb.length),
1604
+ });
1605
+ };
1606
+ const maybeMatch = (reg, str) => {
1607
+ const m = str.match(reg);
1608
+ return m ? m[0] : null;
1609
+ };
1610
+ const range = (a, b, str) => {
1611
+ let begs, beg, left, right = undefined, result;
1612
+ let ai = str.indexOf(a);
1613
+ let bi = str.indexOf(b, ai + 1);
1614
+ let i = ai;
1615
+ if (ai >= 0 && bi > 0) {
1616
+ if (a === b) {
1617
+ return [ai, bi];
1618
+ }
1619
+ begs = [];
1620
+ left = str.length;
1621
+ while (i >= 0 && !result) {
1622
+ if (i === ai) {
1623
+ begs.push(i);
1624
+ ai = str.indexOf(a, i + 1);
1625
+ }
1626
+ else if (begs.length === 1) {
1627
+ const r = begs.pop();
1628
+ if (r !== undefined)
1629
+ result = [r, bi];
1630
+ }
1631
+ else {
1632
+ beg = begs.pop();
1633
+ if (beg !== undefined && beg < left) {
1634
+ left = beg;
1635
+ right = bi;
1636
+ }
1637
+ bi = str.indexOf(b, i + 1);
1638
+ }
1639
+ i = ai < bi && ai >= 0 ? ai : bi;
1640
+ }
1641
+ if (begs.length && right !== undefined) {
1642
+ result = [left, right];
1654
1643
  }
1655
-
1656
- bi = str.indexOf(b, i + 1);
1657
- }
1658
-
1659
- i = ai < bi && ai >= 0 ? ai : bi;
1660
- }
1661
-
1662
- if (begs.length) {
1663
- result = [left, right];
1664
1644
  }
1665
- }
1666
-
1667
- return result
1668
- }
1645
+ return result;
1646
+ };
1669
1647
 
1670
1648
  const escSlash = '\0SLASH' + Math.random() + '\0';
1671
1649
  const escOpen = '\0OPEN' + Math.random() + '\0';
@@ -1681,224 +1659,183 @@ const slashPattern = /\\\\/g;
1681
1659
  const openPattern = /\\{/g;
1682
1660
  const closePattern = /\\}/g;
1683
1661
  const commaPattern = /\\,/g;
1684
- const periodPattern = /\\./g;
1685
-
1686
- /**
1687
- * @return {number}
1688
- */
1689
- function numeric (str) {
1690
- return !isNaN(str)
1691
- ? parseInt(str, 10)
1692
- : str.charCodeAt(0)
1662
+ const periodPattern = /\\\./g;
1663
+ const EXPANSION_MAX = 100_000;
1664
+ function numeric(str) {
1665
+ return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
1693
1666
  }
1694
-
1695
- /**
1696
- * @param {string} str
1697
- */
1698
- function escapeBraces (str) {
1699
- return str.replace(slashPattern, escSlash)
1700
- .replace(openPattern, escOpen)
1701
- .replace(closePattern, escClose)
1702
- .replace(commaPattern, escComma)
1703
- .replace(periodPattern, escPeriod)
1667
+ function escapeBraces(str) {
1668
+ return str
1669
+ .replace(slashPattern, escSlash)
1670
+ .replace(openPattern, escOpen)
1671
+ .replace(closePattern, escClose)
1672
+ .replace(commaPattern, escComma)
1673
+ .replace(periodPattern, escPeriod);
1704
1674
  }
1705
-
1706
- /**
1707
- * @param {string} str
1708
- */
1709
- function unescapeBraces (str) {
1710
- return str.replace(escSlashPattern, '\\')
1711
- .replace(escOpenPattern, '{')
1712
- .replace(escClosePattern, '}')
1713
- .replace(escCommaPattern, ',')
1714
- .replace(escPeriodPattern, '.')
1675
+ function unescapeBraces(str) {
1676
+ return str
1677
+ .replace(escSlashPattern, '\\')
1678
+ .replace(escOpenPattern, '{')
1679
+ .replace(escClosePattern, '}')
1680
+ .replace(escCommaPattern, ',')
1681
+ .replace(escPeriodPattern, '.');
1715
1682
  }
1716
-
1717
1683
  /**
1718
1684
  * Basically just str.split(","), but handling cases
1719
1685
  * where we have nested braced sections, which should be
1720
1686
  * treated as individual members, like {a,{b,c},d}
1721
- * @param {string} str
1722
1687
  */
1723
- function parseCommaParts (str) {
1724
- if (!str) { return [''] }
1725
-
1726
- const parts = [];
1727
- const m = balanced('{', '}', str);
1728
-
1729
- if (!m) { return str.split(',') }
1730
-
1731
- const { pre, body, post } = m;
1732
- const p = pre.split(',');
1733
-
1734
- p[p.length - 1] += '{' + body + '}';
1735
- const postParts = parseCommaParts(post);
1736
- if (post.length) {
1737
- p[p.length - 1] += postParts.shift();
1738
- p.push.apply(p, postParts);
1739
- }
1740
-
1741
- parts.push.apply(parts, p);
1742
-
1743
- return parts
1688
+ function parseCommaParts(str) {
1689
+ if (!str) {
1690
+ return [''];
1691
+ }
1692
+ const parts = [];
1693
+ const m = balanced('{', '}', str);
1694
+ if (!m) {
1695
+ return str.split(',');
1696
+ }
1697
+ const { pre, body, post } = m;
1698
+ const p = pre.split(',');
1699
+ p[p.length - 1] += '{' + body + '}';
1700
+ const postParts = parseCommaParts(post);
1701
+ if (post.length) {
1702
+ p[p.length - 1] += postParts.shift();
1703
+ p.push.apply(p, postParts);
1704
+ }
1705
+ parts.push.apply(parts, p);
1706
+ return parts;
1744
1707
  }
1745
-
1746
- /**
1747
- * @param {string} str
1748
- */
1749
- function expandTop (str) {
1750
- if (!str) { return [] }
1751
-
1752
- // I don't know why Bash 4.3 does this, but it does.
1753
- // Anything starting with {} will have the first two bytes preserved
1754
- // but *only* at the top level, so {},a}b will not expand to anything,
1755
- // but a{},b}c will be expanded to [a}c,abc].
1756
- // One could argue that this is a bug in Bash, but since the goal of
1757
- // this module is to match Bash's rules, we escape a leading {}
1758
- if (str.slice(0, 2) === '{}') {
1759
- str = '\\{\\}' + str.slice(2);
1760
- }
1761
-
1762
- return expand(escapeBraces(str), true).map(unescapeBraces)
1708
+ function expand(str, options = {}) {
1709
+ if (!str) {
1710
+ return [];
1711
+ }
1712
+ const { max = EXPANSION_MAX } = options;
1713
+ // I don't know why Bash 4.3 does this, but it does.
1714
+ // Anything starting with {} will have the first two bytes preserved
1715
+ // but *only* at the top level, so {},a}b will not expand to anything,
1716
+ // but a{},b}c will be expanded to [a}c,abc].
1717
+ // One could argue that this is a bug in Bash, but since the goal of
1718
+ // this module is to match Bash's rules, we escape a leading {}
1719
+ if (str.slice(0, 2) === '{}') {
1720
+ str = '\\{\\}' + str.slice(2);
1721
+ }
1722
+ return expand_(escapeBraces(str), max, true).map(unescapeBraces);
1763
1723
  }
1764
-
1765
- /**
1766
- * @param {string} str
1767
- */
1768
- function embrace (str) {
1769
- return '{' + str + '}'
1724
+ function embrace(str) {
1725
+ return '{' + str + '}';
1770
1726
  }
1771
-
1772
- /**
1773
- * @param {string} el
1774
- */
1775
- function isPadded (el) {
1776
- return /^-?0\d/.test(el)
1727
+ function isPadded(el) {
1728
+ return /^-?0\d/.test(el);
1777
1729
  }
1778
-
1779
- /**
1780
- * @param {number} i
1781
- * @param {number} y
1782
- */
1783
- function lte (i, y) {
1784
- return i <= y
1730
+ function lte(i, y) {
1731
+ return i <= y;
1785
1732
  }
1786
-
1787
- /**
1788
- * @param {number} i
1789
- * @param {number} y
1790
- */
1791
- function gte (i, y) {
1792
- return i >= y
1733
+ function gte(i, y) {
1734
+ return i >= y;
1793
1735
  }
1794
-
1795
- /**
1796
- * @param {string} str
1797
- * @param {boolean} [isTop]
1798
- */
1799
- function expand (str, isTop) {
1800
- /** @type {string[]} */
1801
- const expansions = [];
1802
-
1803
- const m = balanced('{', '}', str);
1804
- if (!m) return [str]
1805
-
1806
- // no need to expand pre, since it is guaranteed to be free of brace-sets
1807
- const pre = m.pre;
1808
- const post = m.post.length
1809
- ? expand(m.post, false)
1810
- : [''];
1811
-
1812
- if (/\$$/.test(m.pre)) {
1813
- for (let k = 0; k < post.length; k++) {
1814
- const expansion = pre + '{' + m.body + '}' + post[k];
1815
- expansions.push(expansion);
1816
- }
1817
- } else {
1818
- const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
1819
- const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
1820
- const isSequence = isNumericSequence || isAlphaSequence;
1821
- const isOptions = m.body.indexOf(',') >= 0;
1822
- if (!isSequence && !isOptions) {
1823
- // {a},b}
1824
- if (m.post.match(/,(?!,).*\}/)) {
1825
- str = m.pre + '{' + m.body + escClose + m.post;
1826
- return expand(str)
1827
- }
1828
- return [str]
1829
- }
1830
-
1831
- let n;
1832
- if (isSequence) {
1833
- n = m.body.split(/\.\./);
1834
- } else {
1835
- n = parseCommaParts(m.body);
1836
- if (n.length === 1) {
1837
- // x{{a,b}}y ==> x{a}y x{b}y
1838
- n = expand(n[0], false).map(embrace);
1839
- if (n.length === 1) {
1840
- return post.map(function (p) {
1841
- return m.pre + n[0] + p
1842
- })
1736
+ function expand_(str, max, isTop) {
1737
+ /** @type {string[]} */
1738
+ const expansions = [];
1739
+ const m = balanced('{', '}', str);
1740
+ if (!m)
1741
+ return [str];
1742
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
1743
+ const pre = m.pre;
1744
+ const post = m.post.length ? expand_(m.post, max, false) : [''];
1745
+ if (/\$$/.test(m.pre)) {
1746
+ for (let k = 0; k < post.length && k < max; k++) {
1747
+ const expansion = pre + '{' + m.body + '}' + post[k];
1748
+ expansions.push(expansion);
1843
1749
  }
1844
- }
1845
1750
  }
1846
-
1847
- // at this point, n is the parts, and we know it's not a comma set
1848
- // with a single entry.
1849
- let N;
1850
-
1851
- if (isSequence) {
1852
- const x = numeric(n[0]);
1853
- const y = numeric(n[1]);
1854
- const width = Math.max(n[0].length, n[1].length);
1855
- let incr = n.length === 3
1856
- ? Math.abs(numeric(n[2]))
1857
- : 1;
1858
- let test = lte;
1859
- const reverse = y < x;
1860
- if (reverse) {
1861
- incr *= -1;
1862
- test = gte;
1863
- }
1864
- const pad = n.some(isPadded);
1865
-
1866
- N = [];
1867
-
1868
- for (let i = x; test(i, y); i += incr) {
1869
- let c;
1870
- if (isAlphaSequence) {
1871
- c = String.fromCharCode(i);
1872
- if (c === '\\') { c = ''; }
1873
- } else {
1874
- c = String(i);
1875
- if (pad) {
1876
- const need = width - c.length;
1877
- if (need > 0) {
1878
- const z = new Array(need + 1).join('0');
1879
- if (i < 0) { c = '-' + z + c.slice(1); } else { c = z + c; }
1751
+ else {
1752
+ const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
1753
+ const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
1754
+ const isSequence = isNumericSequence || isAlphaSequence;
1755
+ const isOptions = m.body.indexOf(',') >= 0;
1756
+ if (!isSequence && !isOptions) {
1757
+ // {a},b}
1758
+ if (m.post.match(/,(?!,).*\}/)) {
1759
+ str = m.pre + '{' + m.body + escClose + m.post;
1760
+ return expand_(str, max, true);
1761
+ }
1762
+ return [str];
1763
+ }
1764
+ let n;
1765
+ if (isSequence) {
1766
+ n = m.body.split(/\.\./);
1767
+ }
1768
+ else {
1769
+ n = parseCommaParts(m.body);
1770
+ if (n.length === 1 && n[0] !== undefined) {
1771
+ // x{{a,b}}y ==> x{a}y x{b}y
1772
+ n = expand_(n[0], max, false).map(embrace);
1773
+ //XXX is this necessary? Can't seem to hit it in tests.
1774
+ /* c8 ignore start */
1775
+ if (n.length === 1) {
1776
+ return post.map(p => m.pre + n[0] + p);
1777
+ }
1778
+ /* c8 ignore stop */
1779
+ }
1780
+ }
1781
+ // at this point, n is the parts, and we know it's not a comma set
1782
+ // with a single entry.
1783
+ let N;
1784
+ if (isSequence && n[0] !== undefined && n[1] !== undefined) {
1785
+ const x = numeric(n[0]);
1786
+ const y = numeric(n[1]);
1787
+ const width = Math.max(n[0].length, n[1].length);
1788
+ let incr = n.length === 3 && n[2] !== undefined ? Math.abs(numeric(n[2])) : 1;
1789
+ let test = lte;
1790
+ const reverse = y < x;
1791
+ if (reverse) {
1792
+ incr *= -1;
1793
+ test = gte;
1794
+ }
1795
+ const pad = n.some(isPadded);
1796
+ N = [];
1797
+ for (let i = x; test(i, y); i += incr) {
1798
+ let c;
1799
+ if (isAlphaSequence) {
1800
+ c = String.fromCharCode(i);
1801
+ if (c === '\\') {
1802
+ c = '';
1803
+ }
1804
+ }
1805
+ else {
1806
+ c = String(i);
1807
+ if (pad) {
1808
+ const need = width - c.length;
1809
+ if (need > 0) {
1810
+ const z = new Array(need + 1).join('0');
1811
+ if (i < 0) {
1812
+ c = '-' + z + c.slice(1);
1813
+ }
1814
+ else {
1815
+ c = z + c;
1816
+ }
1817
+ }
1818
+ }
1819
+ }
1820
+ N.push(c);
1821
+ }
1822
+ }
1823
+ else {
1824
+ N = [];
1825
+ for (let j = 0; j < n.length; j++) {
1826
+ N.push.apply(N, expand_(n[j], max, false));
1827
+ }
1828
+ }
1829
+ for (let j = 0; j < N.length; j++) {
1830
+ for (let k = 0; k < post.length && expansions.length < max; k++) {
1831
+ const expansion = pre + N[j] + post[k];
1832
+ if (!isTop || isSequence || expansion) {
1833
+ expansions.push(expansion);
1834
+ }
1880
1835
  }
1881
- }
1882
1836
  }
1883
- N.push(c);
1884
- }
1885
- } else {
1886
- N = [];
1887
-
1888
- for (let j = 0; j < n.length; j++) {
1889
- N.push.apply(N, expand(n[j], false));
1890
- }
1891
- }
1892
-
1893
- for (let j = 0; j < N.length; j++) {
1894
- for (let k = 0; k < post.length; k++) {
1895
- const expansion = pre + N[j] + post[k];
1896
- if (!isTop || isSequence || expansion) { expansions.push(expansion); }
1897
- }
1898
1837
  }
1899
- }
1900
-
1901
- return expansions
1838
+ return expansions;
1902
1839
  }
1903
1840
 
1904
1841
  const propertyLookup = new Map();
@@ -2153,7 +2090,7 @@ function decorate(layers, rules, recolor) {
2153
2090
  if (layerStyle == null)
2154
2091
  return;
2155
2092
  // Expand any braces in IDs and filter them through a RegExp if necessary
2156
- const ids = expandTop(idDef).flatMap((id) => {
2093
+ const ids = expand(idDef).flatMap((id) => {
2157
2094
  if (!id.includes('*'))
2158
2095
  return id;
2159
2096
  const regExpString = id.replace(/[^a-z_:-]/g, (c) => {
@@ -4121,10 +4058,90 @@ async function buildSatelliteStyle(options) {
4121
4058
  minzoom: 0,
4122
4059
  ...(Object.keys(rasterPaint).length > 0 ? { paint: rasterPaint } : {}),
4123
4060
  });
4061
+ // Elevation source (for terrain and/or hillshade)
4062
+ const needsElevation = !!(options.terrain || options.hillshade);
4063
+ if (needsElevation) {
4064
+ const elevationTilejsonUrl = resolveUrl(baseUrl, options.elevationTilejson ?? '/tiles/elevation/tiles.json');
4065
+ const elevationTilejson = (await fetch(elevationTilejsonUrl).then((res) => res.json()));
4066
+ if (elevationTilejson.tiles) {
4067
+ elevationTilejson.tiles = elevationTilejson.tiles.map((url) => resolveUrl(baseUrl, url));
4068
+ }
4069
+ style.sources.elevation = {
4070
+ attribution: elevationTilejson.attribution,
4071
+ bounds: elevationTilejson.bounds,
4072
+ minzoom: elevationTilejson.minzoom,
4073
+ maxzoom: elevationTilejson.maxzoom,
4074
+ tiles: elevationTilejson.tiles,
4075
+ encoding: elevationTilejson.encoding,
4076
+ tileSize: elevationTilejson.tile_size ?? 512,
4077
+ type: 'raster-dem',
4078
+ };
4079
+ switch (elevationTilejson.tile_schema) {
4080
+ case 'dem/mapbox':
4081
+ style.sources.elevation.encoding = 'mapbox';
4082
+ break;
4083
+ case 'dem/terrarium':
4084
+ style.sources.elevation.encoding = 'terrarium';
4085
+ break;
4086
+ }
4087
+ }
4088
+ // 3D terrain
4089
+ if (options.terrain) {
4090
+ const terrainConfig = typeof options.terrain === 'object' ? options.terrain : {};
4091
+ style.terrain = { source: 'elevation', exaggeration: terrainConfig.exaggeration ?? 1 };
4092
+ }
4093
+ // Hillshade layer
4094
+ if (options.hillshade) {
4095
+ const hsConfig = typeof options.hillshade === 'object' ? options.hillshade : {};
4096
+ const paint = {};
4097
+ paint['hillshade-exaggeration'] = hsConfig.exaggeration ?? ['interpolate', ['linear'], ['zoom'], 5, 0, 10, 0.3];
4098
+ paint['hillshade-shadow-color'] = hsConfig.shadowColor ?? '#000000';
4099
+ paint['hillshade-highlight-color'] = hsConfig.highlightColor ?? '#ffffff';
4100
+ paint['hillshade-accent-color'] = hsConfig.accentColor ?? '#000000';
4101
+ paint['hillshade-illumination-direction'] = hsConfig.illuminationDirection ?? 315;
4102
+ paint['hillshade-illumination-altitude'] = hsConfig.illuminationAltitude ?? 45;
4103
+ paint['hillshade-illumination-anchor'] = hsConfig.illuminationAnchor ?? 'map';
4104
+ paint['hillshade-method'] = 'standard';
4105
+ style.layers.splice(1, 0, {
4106
+ id: 'hillshade',
4107
+ type: 'hillshade',
4108
+ source: 'elevation',
4109
+ ...(Object.keys(paint).length > 0 ? { paint } : {}),
4110
+ });
4111
+ }
4124
4112
  style.name = 'versatiles-satellite';
4125
4113
  return style;
4126
4114
  }
4127
4115
 
4116
+ function getStyleVariants() {
4117
+ const variants = [];
4118
+ for (const { name, builder } of [
4119
+ { name: 'colorful', builder: colorful },
4120
+ { name: 'eclipse', builder: eclipse },
4121
+ { name: 'empty', builder: empty },
4122
+ { name: 'graybeard', builder: graybeard },
4123
+ { name: 'neutrino', builder: neutrino },
4124
+ { name: 'shadow', builder: shadow },
4125
+ ]) {
4126
+ variants.push({ name: name + '/style', build: () => builder({ language: undefined }) });
4127
+ if (name === 'empty')
4128
+ continue;
4129
+ variants.push({ name: name + '/en', build: () => builder({ language: 'en' }) });
4130
+ variants.push({ name: name + '/de', build: () => builder({ language: 'de' }) });
4131
+ variants.push({ name: name + '/nolabel', build: () => builder({ hideLabels: true }) });
4132
+ }
4133
+ variants.push({ name: 'satellite/style', build: () => buildSatelliteStyle({ language: undefined }) });
4134
+ variants.push({ name: 'satellite/en', build: () => buildSatelliteStyle({ language: 'en' }) });
4135
+ variants.push({ name: 'satellite/de', build: () => buildSatelliteStyle({ language: 'de' }) });
4136
+ variants.push({ name: 'satellite/nooverlay', build: () => buildSatelliteStyle({ overlay: false }) });
4137
+ const terrain = { terrain: true, hillshade: true };
4138
+ variants.push({ name: 'terrain/style', build: () => buildSatelliteStyle({ ...terrain, language: undefined }) });
4139
+ variants.push({ name: 'terrain/en', build: () => buildSatelliteStyle({ ...terrain, language: 'en' }) });
4140
+ variants.push({ name: 'terrain/de', build: () => buildSatelliteStyle({ ...terrain, language: 'de' }) });
4141
+ variants.push({ name: 'terrain/nooverlay', build: () => buildSatelliteStyle({ ...terrain, overlay: false }) });
4142
+ return variants;
4143
+ }
4144
+
4128
4145
  // import styles
4129
4146
  function getStyleBuilder(styleBuilder) {
4130
4147
  const fn = function (options) {
@@ -4139,7 +4156,7 @@ const eclipse = getStyleBuilder(Eclipse);
4139
4156
  const graybeard = getStyleBuilder(Graybeard);
4140
4157
  const shadow = getStyleBuilder(Shadow);
4141
4158
  const neutrino = getStyleBuilder(Neutrino);
4142
- getStyleBuilder(Empty);
4159
+ const empty = getStyleBuilder(Empty);
4143
4160
 
4144
4161
  /**
4145
4162
  * Checks if an object adheres to the TileJSON specification.
@@ -4511,5 +4528,5 @@ const styles = {
4511
4528
  satellite: buildSatelliteStyle,
4512
4529
  };
4513
4530
 
4514
- export { Color, colorful, eclipse, graybeard, guessStyle, neutrino, buildSatelliteStyle as satellite, shadow, styles };
4531
+ export { Color, colorful, eclipse, getStyleVariants, graybeard, guessStyle, neutrino, buildSatelliteStyle as satellite, shadow, styles };
4515
4532
  //# sourceMappingURL=index.js.map