@loaders.gl/tiles 4.0.0-alpha.21 → 4.0.0-alpha.22
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.min.js +13 -13
- package/package.json +4 -4
package/dist/dist.min.js
CHANGED
|
@@ -6655,6 +6655,11 @@
|
|
|
6655
6655
|
loaders._state = loaders._state || {};
|
|
6656
6656
|
return loaders._state;
|
|
6657
6657
|
}
|
|
6658
|
+
function getGlobalLoaderOptions() {
|
|
6659
|
+
const state = getGlobalLoaderState();
|
|
6660
|
+
state.globalOptions = state.globalOptions || { ...DEFAULT_LOADER_OPTIONS };
|
|
6661
|
+
return state.globalOptions;
|
|
6662
|
+
}
|
|
6658
6663
|
function normalizeOptions(options, loader, loaders, url) {
|
|
6659
6664
|
loaders = loaders || [];
|
|
6660
6665
|
loaders = Array.isArray(loaders) ? loaders : [loaders];
|
|
@@ -6735,17 +6740,11 @@
|
|
|
6735
6740
|
options.baseUri = url;
|
|
6736
6741
|
}
|
|
6737
6742
|
}
|
|
6738
|
-
var getGlobalLoaderOptions;
|
|
6739
6743
|
var init_option_utils = __esm({
|
|
6740
6744
|
"../core/src/lib/loader-utils/option-utils.ts"() {
|
|
6741
6745
|
init_is_type();
|
|
6742
6746
|
init_loggers();
|
|
6743
6747
|
init_option_defaults();
|
|
6744
|
-
getGlobalLoaderOptions = () => {
|
|
6745
|
-
const state = getGlobalLoaderState();
|
|
6746
|
-
state.globalOptions = state.globalOptions || { ...DEFAULT_LOADER_OPTIONS };
|
|
6747
|
-
return state.globalOptions;
|
|
6748
|
-
};
|
|
6749
6748
|
}
|
|
6750
6749
|
});
|
|
6751
6750
|
|
|
@@ -6866,8 +6865,10 @@
|
|
|
6866
6865
|
reason = reason || (loader ? `matched MIME type ${type}` : "");
|
|
6867
6866
|
loader = loader || findLoaderByInitialBytes(loaders, data);
|
|
6868
6867
|
reason = reason || (loader ? `matched initial data ${getFirstCharacters(data)}` : "");
|
|
6869
|
-
|
|
6870
|
-
|
|
6868
|
+
if (options?.fallbackMimeType) {
|
|
6869
|
+
loader = loader || findLoaderByMIMEType(loaders, options?.fallbackMimeType);
|
|
6870
|
+
reason = reason || (loader ? `matched fallback MIME type ${type}` : "");
|
|
6871
|
+
}
|
|
6871
6872
|
if (reason) {
|
|
6872
6873
|
log.log(1, `selectLoader selected ${loader?.name}: ${reason}.`);
|
|
6873
6874
|
}
|
|
@@ -6963,7 +6964,7 @@
|
|
|
6963
6964
|
}
|
|
6964
6965
|
switch (typeof test) {
|
|
6965
6966
|
case "function":
|
|
6966
|
-
return test(data
|
|
6967
|
+
return test(data);
|
|
6967
6968
|
case "string":
|
|
6968
6969
|
const magic = getMagicString(data, byteOffset, test.length);
|
|
6969
6970
|
return test === magic;
|
|
@@ -7236,7 +7237,7 @@
|
|
|
7236
7237
|
return newContext;
|
|
7237
7238
|
}
|
|
7238
7239
|
function getLoadersFromContext(loaders, context) {
|
|
7239
|
-
if (
|
|
7240
|
+
if (loaders && !Array.isArray(loaders)) {
|
|
7240
7241
|
return loaders;
|
|
7241
7242
|
}
|
|
7242
7243
|
let candidateLoaders;
|
|
@@ -7247,7 +7248,7 @@
|
|
|
7247
7248
|
const contextLoaders = Array.isArray(context.loaders) ? context.loaders : [context.loaders];
|
|
7248
7249
|
candidateLoaders = candidateLoaders ? [...candidateLoaders, ...contextLoaders] : contextLoaders;
|
|
7249
7250
|
}
|
|
7250
|
-
return candidateLoaders && candidateLoaders.length ? candidateLoaders :
|
|
7251
|
+
return candidateLoaders && candidateLoaders.length ? candidateLoaders : void 0;
|
|
7251
7252
|
}
|
|
7252
7253
|
var init_loader_context = __esm({
|
|
7253
7254
|
"../core/src/lib/loader-utils/loader-context.ts"() {
|
|
@@ -7259,7 +7260,6 @@
|
|
|
7259
7260
|
|
|
7260
7261
|
// ../core/src/lib/api/parse.ts
|
|
7261
7262
|
async function parse(data, loaders, options, context) {
|
|
7262
|
-
assert3(!context || typeof context === "object");
|
|
7263
7263
|
if (loaders && !Array.isArray(loaders) && !isLoaderObject(loaders)) {
|
|
7264
7264
|
context = void 0;
|
|
7265
7265
|
options = loaders;
|
|
@@ -7275,7 +7275,7 @@
|
|
|
7275
7275
|
return null;
|
|
7276
7276
|
}
|
|
7277
7277
|
options = normalizeOptions(options, loader, candidateLoaders, url);
|
|
7278
|
-
context = getLoaderContext({ url, parse, loaders: candidateLoaders }, options, context || null);
|
|
7278
|
+
context = getLoaderContext({ url, _parse: parse, loaders: candidateLoaders }, options, context || null);
|
|
7279
7279
|
return await parseWithLoader(loader, data, options, context);
|
|
7280
7280
|
}
|
|
7281
7281
|
async function parseWithLoader(loader, data, options, context) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/tiles",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.22",
|
|
4
4
|
"description": "Common components for different tiles loaders.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@loaders.gl/loader-utils": "4.0.0-alpha.
|
|
37
|
-
"@loaders.gl/math": "4.0.0-alpha.
|
|
36
|
+
"@loaders.gl/loader-utils": "4.0.0-alpha.22",
|
|
37
|
+
"@loaders.gl/math": "4.0.0-alpha.22",
|
|
38
38
|
"@math.gl/core": "^3.5.1",
|
|
39
39
|
"@math.gl/culling": "^3.5.1",
|
|
40
40
|
"@math.gl/geospatial": "^3.5.1",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@deck.gl/core": "^8.9.0"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "0da838c506d1275383f2fd3d244d9c72b25397d2"
|
|
51
51
|
}
|