@deck.gl/carto 8.9.5 → 8.9.7
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/dist.dev.js +61 -48
- package/dist.min.js +22 -22
- package/package.json +2 -2
- package/typed/api/index.js +3 -0
- package/typed/api/layer-map.js +264 -0
- package/typed/api/maps-api-common.js +50 -0
- package/typed/api/maps-client.js +125 -0
- package/typed/api/maps-v3-client.js +304 -0
- package/typed/api/parseMap.js +178 -0
- package/typed/basemap.js +9 -0
- package/typed/config.js +35 -0
- package/typed/index.js +10 -0
- package/typed/layers/carto-layer.js +173 -0
- package/typed/layers/carto-tile-layer.js +105 -0
- package/typed/layers/h3-tile-layer.js +47 -0
- package/typed/layers/h3-tileset-2d.js +85 -0
- package/typed/layers/quadkey-tile-layer.js +42 -0
- package/typed/layers/quadkey-tileset-2d.js +36 -0
- package/typed/layers/schema/carto-tile.js +161 -0
- package/typed/layers/spatial-index-tile-layer.js +40 -0
- package/typed/style/color-bins-style.js +12 -0
- package/typed/style/color-categories-style.js +16 -0
- package/typed/style/color-continuous-style.js +12 -0
- package/typed/style/palette.js +62 -0
- package/typed/style/utils.js +15 -0
- package/typed/utils.js +4 -0
- package/typed/layers/schema/carto-spa-tile.d.ts +0 -57
- package/typed/layers/schema/carto-spa-tile.d.ts.map +0 -1
package/dist/dist.dev.js
CHANGED
|
@@ -106,8 +106,8 @@ var __exports__ = (() => {
|
|
|
106
106
|
return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
|
|
107
107
|
}
|
|
108
108
|
function map2(arr, fn) {
|
|
109
|
-
var res = [], i;
|
|
110
|
-
for (i = 0; i <
|
|
109
|
+
var res = [], i, arrLen = arr.length;
|
|
110
|
+
for (i = 0; i < arrLen; ++i) {
|
|
111
111
|
res.push(fn(arr[i], i));
|
|
112
112
|
}
|
|
113
113
|
return res;
|
|
@@ -196,7 +196,7 @@ var __exports__ = (() => {
|
|
|
196
196
|
}
|
|
197
197
|
var momentProperties = hooks.momentProperties = [], updateInProgress = false;
|
|
198
198
|
function copyConfig(to2, from2) {
|
|
199
|
-
var i, prop, val;
|
|
199
|
+
var i, prop, val, momentPropertiesLen = momentProperties.length;
|
|
200
200
|
if (!isUndefined(from2._isAMomentObject)) {
|
|
201
201
|
to2._isAMomentObject = from2._isAMomentObject;
|
|
202
202
|
}
|
|
@@ -227,8 +227,8 @@ var __exports__ = (() => {
|
|
|
227
227
|
if (!isUndefined(from2._locale)) {
|
|
228
228
|
to2._locale = from2._locale;
|
|
229
229
|
}
|
|
230
|
-
if (
|
|
231
|
-
for (i = 0; i <
|
|
230
|
+
if (momentPropertiesLen > 0) {
|
|
231
|
+
for (i = 0; i < momentPropertiesLen; i++) {
|
|
232
232
|
prop = momentProperties[i];
|
|
233
233
|
val = from2[prop];
|
|
234
234
|
if (!isUndefined(val)) {
|
|
@@ -265,8 +265,8 @@ var __exports__ = (() => {
|
|
|
265
265
|
hooks.deprecationHandler(null, msg);
|
|
266
266
|
}
|
|
267
267
|
if (firstTime) {
|
|
268
|
-
var args = [], arg, i, key;
|
|
269
|
-
for (i = 0; i <
|
|
268
|
+
var args = [], arg, i, key, argLen = arguments.length;
|
|
269
|
+
for (i = 0; i < argLen; i++) {
|
|
270
270
|
arg = "";
|
|
271
271
|
if (typeof arguments[i] === "object") {
|
|
272
272
|
arg += "\n[" + i + "] ";
|
|
@@ -596,8 +596,8 @@ var __exports__ = (() => {
|
|
|
596
596
|
function stringSet(units, value) {
|
|
597
597
|
if (typeof units === "object") {
|
|
598
598
|
units = normalizeObjectUnits(units);
|
|
599
|
-
var prioritized = getPrioritizedUnits(units), i;
|
|
600
|
-
for (i = 0; i <
|
|
599
|
+
var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length;
|
|
600
|
+
for (i = 0; i < prioritizedLen; i++) {
|
|
601
601
|
this[prioritized[i].unit](units[prioritized[i].unit]);
|
|
602
602
|
}
|
|
603
603
|
} else {
|
|
@@ -623,9 +623,12 @@ var __exports__ = (() => {
|
|
|
623
623
|
}
|
|
624
624
|
function unescapeFormat(s) {
|
|
625
625
|
return regexEscape(
|
|
626
|
-
s.replace("\\", "").replace(
|
|
627
|
-
|
|
628
|
-
|
|
626
|
+
s.replace("\\", "").replace(
|
|
627
|
+
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
|
|
628
|
+
function(matched, p1, p2, p3, p4) {
|
|
629
|
+
return p1 || p2 || p3 || p4;
|
|
630
|
+
}
|
|
631
|
+
)
|
|
629
632
|
);
|
|
630
633
|
}
|
|
631
634
|
function regexEscape(s) {
|
|
@@ -633,7 +636,7 @@ var __exports__ = (() => {
|
|
|
633
636
|
}
|
|
634
637
|
var tokens = {};
|
|
635
638
|
function addParseToken(token2, callback) {
|
|
636
|
-
var i, func = callback;
|
|
639
|
+
var i, func = callback, tokenLen;
|
|
637
640
|
if (typeof token2 === "string") {
|
|
638
641
|
token2 = [token2];
|
|
639
642
|
}
|
|
@@ -642,7 +645,8 @@ var __exports__ = (() => {
|
|
|
642
645
|
array[callback] = toInt(input);
|
|
643
646
|
};
|
|
644
647
|
}
|
|
645
|
-
|
|
648
|
+
tokenLen = token2.length;
|
|
649
|
+
for (i = 0; i < tokenLen; i++) {
|
|
646
650
|
tokens[token2[i]] = func;
|
|
647
651
|
}
|
|
648
652
|
}
|
|
@@ -715,9 +719,7 @@ var __exports__ = (() => {
|
|
|
715
719
|
});
|
|
716
720
|
var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split(
|
|
717
721
|
"_"
|
|
718
|
-
), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split(
|
|
719
|
-
"_"
|
|
720
|
-
), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
|
|
722
|
+
), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
|
|
721
723
|
function localeMonths(m, format3) {
|
|
722
724
|
if (!m) {
|
|
723
725
|
return isArray(this._months) ? this._months : this._months["standalone"];
|
|
@@ -1019,9 +1021,12 @@ var __exports__ = (() => {
|
|
|
1019
1021
|
addRegexToken("ww", match1to2, match2);
|
|
1020
1022
|
addRegexToken("W", match1to2);
|
|
1021
1023
|
addRegexToken("WW", match1to2, match2);
|
|
1022
|
-
addWeekParseToken(
|
|
1023
|
-
|
|
1024
|
-
|
|
1024
|
+
addWeekParseToken(
|
|
1025
|
+
["w", "ww", "W", "WW"],
|
|
1026
|
+
function(input, week, config, token2) {
|
|
1027
|
+
week[token2.substr(0, 1)] = toInt(input);
|
|
1028
|
+
}
|
|
1029
|
+
);
|
|
1025
1030
|
function localeWeek(mom) {
|
|
1026
1031
|
return weekOfYear(mom, this._week.dow, this._week.doy).week;
|
|
1027
1032
|
}
|
|
@@ -1106,9 +1111,7 @@ var __exports__ = (() => {
|
|
|
1106
1111
|
function shiftWeekdays(ws, n) {
|
|
1107
1112
|
return ws.slice(n, 7).concat(ws.slice(0, n));
|
|
1108
1113
|
}
|
|
1109
|
-
var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split(
|
|
1110
|
-
"_"
|
|
1111
|
-
), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
|
|
1114
|
+
var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
|
|
1112
1115
|
function localeWeekdays(m, format3) {
|
|
1113
1116
|
var weekdays = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format3) ? "format" : "standalone"];
|
|
1114
1117
|
return m === true ? shiftWeekdays(weekdays, this._week.dow) : m ? weekdays[m.day()] : weekdays;
|
|
@@ -1492,9 +1495,12 @@ var __exports__ = (() => {
|
|
|
1492
1495
|
}
|
|
1493
1496
|
return globalLocale;
|
|
1494
1497
|
}
|
|
1498
|
+
function isLocaleNameSane(name) {
|
|
1499
|
+
return name.match("^[^/\\\\]*$") != null;
|
|
1500
|
+
}
|
|
1495
1501
|
function loadLocale(name) {
|
|
1496
1502
|
var oldLocale = null, aliasedRequire;
|
|
1497
|
-
if (locales[name] === void 0 && typeof module !== "undefined" && module && module.exports) {
|
|
1503
|
+
if (locales[name] === void 0 && typeof module !== "undefined" && module && module.exports && isLocaleNameSane(name)) {
|
|
1498
1504
|
try {
|
|
1499
1505
|
oldLocale = globalLocale._abbr;
|
|
1500
1506
|
aliasedRequire = __require;
|
|
@@ -1675,10 +1681,10 @@ var __exports__ = (() => {
|
|
|
1675
1681
|
PST: -8 * 60
|
|
1676
1682
|
};
|
|
1677
1683
|
function configFromISO(config) {
|
|
1678
|
-
var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat;
|
|
1684
|
+
var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
|
|
1679
1685
|
if (match) {
|
|
1680
1686
|
getParsingFlags(config).iso = true;
|
|
1681
|
-
for (i = 0, l =
|
|
1687
|
+
for (i = 0, l = isoDatesLen; i < l; i++) {
|
|
1682
1688
|
if (isoDates[i][1].exec(match[1])) {
|
|
1683
1689
|
dateFormat = isoDates[i][0];
|
|
1684
1690
|
allowTime = isoDates[i][2] !== false;
|
|
@@ -1690,7 +1696,7 @@ var __exports__ = (() => {
|
|
|
1690
1696
|
return;
|
|
1691
1697
|
}
|
|
1692
1698
|
if (match[3]) {
|
|
1693
|
-
for (i = 0, l =
|
|
1699
|
+
for (i = 0, l = isoTimesLen; i < l; i++) {
|
|
1694
1700
|
if (isoTimes[i][1].exec(match[3])) {
|
|
1695
1701
|
timeFormat = (match[2] || " ") + isoTimes[i][0];
|
|
1696
1702
|
break;
|
|
@@ -1742,7 +1748,7 @@ var __exports__ = (() => {
|
|
|
1742
1748
|
return year;
|
|
1743
1749
|
}
|
|
1744
1750
|
function preprocessRFC2822(s) {
|
|
1745
|
-
return s.replace(/\([^)]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
|
|
1751
|
+
return s.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
|
|
1746
1752
|
}
|
|
1747
1753
|
function checkWeekday(weekdayStr, parsedInput, config) {
|
|
1748
1754
|
if (weekdayStr) {
|
|
@@ -1946,9 +1952,10 @@ var __exports__ = (() => {
|
|
|
1946
1952
|
}
|
|
1947
1953
|
config._a = [];
|
|
1948
1954
|
getParsingFlags(config).empty = true;
|
|
1949
|
-
var string = "" + config._i, i, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era;
|
|
1955
|
+
var string = "" + config._i, i, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen;
|
|
1950
1956
|
tokens2 = expandFormat(config._f, config._locale).match(formattingTokens) || [];
|
|
1951
|
-
|
|
1957
|
+
tokenLen = tokens2.length;
|
|
1958
|
+
for (i = 0; i < tokenLen; i++) {
|
|
1952
1959
|
token2 = tokens2[i];
|
|
1953
1960
|
parsedInput = (string.match(getParseRegexForToken(token2, config)) || [])[0];
|
|
1954
1961
|
if (parsedInput) {
|
|
@@ -2014,13 +2021,13 @@ var __exports__ = (() => {
|
|
|
2014
2021
|
}
|
|
2015
2022
|
}
|
|
2016
2023
|
function configFromStringAndArray(config) {
|
|
2017
|
-
var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false;
|
|
2018
|
-
if (
|
|
2024
|
+
var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length;
|
|
2025
|
+
if (configfLen === 0) {
|
|
2019
2026
|
getParsingFlags(config).invalidFormat = true;
|
|
2020
2027
|
config._d = new Date(NaN);
|
|
2021
2028
|
return;
|
|
2022
2029
|
}
|
|
2023
|
-
for (i = 0; i <
|
|
2030
|
+
for (i = 0; i < configfLen; i++) {
|
|
2024
2031
|
currentScore = 0;
|
|
2025
2032
|
validFormatFound = false;
|
|
2026
2033
|
tempConfig = copyConfig({}, config);
|
|
@@ -2203,13 +2210,13 @@ var __exports__ = (() => {
|
|
|
2203
2210
|
"millisecond"
|
|
2204
2211
|
];
|
|
2205
2212
|
function isDurationValid(m) {
|
|
2206
|
-
var key, unitHasDecimal = false, i;
|
|
2213
|
+
var key, unitHasDecimal = false, i, orderLen = ordering.length;
|
|
2207
2214
|
for (key in m) {
|
|
2208
2215
|
if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
|
|
2209
2216
|
return false;
|
|
2210
2217
|
}
|
|
2211
2218
|
}
|
|
2212
|
-
for (i = 0; i <
|
|
2219
|
+
for (i = 0; i < orderLen; ++i) {
|
|
2213
2220
|
if (m[ordering[i]]) {
|
|
2214
2221
|
if (unitHasDecimal) {
|
|
2215
2222
|
return false;
|
|
@@ -2570,8 +2577,8 @@ var __exports__ = (() => {
|
|
|
2570
2577
|
"milliseconds",
|
|
2571
2578
|
"millisecond",
|
|
2572
2579
|
"ms"
|
|
2573
|
-
], i, property;
|
|
2574
|
-
for (i = 0; i <
|
|
2580
|
+
], i, property, propertyLen = properties.length;
|
|
2581
|
+
for (i = 0; i < propertyLen; i += 1) {
|
|
2575
2582
|
property = properties[i];
|
|
2576
2583
|
propertyTest = propertyTest || hasOwnProp(input, property);
|
|
2577
2584
|
}
|
|
@@ -3031,14 +3038,17 @@ var __exports__ = (() => {
|
|
|
3031
3038
|
addRegexToken("NNN", matchEraAbbr);
|
|
3032
3039
|
addRegexToken("NNNN", matchEraName);
|
|
3033
3040
|
addRegexToken("NNNNN", matchEraNarrow);
|
|
3034
|
-
addParseToken(
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3041
|
+
addParseToken(
|
|
3042
|
+
["N", "NN", "NNN", "NNNN", "NNNNN"],
|
|
3043
|
+
function(input, array, config, token2) {
|
|
3044
|
+
var era = config._locale.erasParse(input, token2, config._strict);
|
|
3045
|
+
if (era) {
|
|
3046
|
+
getParsingFlags(config).era = era;
|
|
3047
|
+
} else {
|
|
3048
|
+
getParsingFlags(config).invalidEra = input;
|
|
3049
|
+
}
|
|
3040
3050
|
}
|
|
3041
|
-
|
|
3051
|
+
);
|
|
3042
3052
|
addRegexToken("y", matchUnsigned);
|
|
3043
3053
|
addRegexToken("yy", matchUnsigned);
|
|
3044
3054
|
addRegexToken("yyy", matchUnsigned);
|
|
@@ -3240,9 +3250,12 @@ var __exports__ = (() => {
|
|
|
3240
3250
|
addRegexToken("gggg", match1to4, match4);
|
|
3241
3251
|
addRegexToken("GGGGG", match1to6, match6);
|
|
3242
3252
|
addRegexToken("ggggg", match1to6, match6);
|
|
3243
|
-
addWeekParseToken(
|
|
3244
|
-
|
|
3245
|
-
|
|
3253
|
+
addWeekParseToken(
|
|
3254
|
+
["gggg", "ggggg", "GGGG", "GGGGG"],
|
|
3255
|
+
function(input, week, config, token2) {
|
|
3256
|
+
week[token2.substr(0, 2)] = toInt(input);
|
|
3257
|
+
}
|
|
3258
|
+
);
|
|
3246
3259
|
addWeekParseToken(["gg", "GG"], function(input, week, config, token2) {
|
|
3247
3260
|
week[token2] = hooks.parseTwoDigitYear(input);
|
|
3248
3261
|
});
|
|
@@ -3910,7 +3923,7 @@ var __exports__ = (() => {
|
|
|
3910
3923
|
addParseToken("x", function(input, array, config) {
|
|
3911
3924
|
config._d = new Date(toInt(input));
|
|
3912
3925
|
});
|
|
3913
|
-
hooks.version = "2.29.
|
|
3926
|
+
hooks.version = "2.29.4";
|
|
3914
3927
|
setHookCallback(createLocal);
|
|
3915
3928
|
hooks.fn = proto;
|
|
3916
3929
|
hooks.min = min2;
|