@loaders.gl/tiles 5.0.0-alpha.13 → 5.0.0-alpha.14

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.
Files changed (38) hide show
  1. package/dist/dist.dev.js +665 -472
  2. package/dist/dist.min.js +3 -3
  3. package/dist/index.cjs +9 -6
  4. package/dist/index.cjs.map +2 -2
  5. package/dist/mlt/index.cjs +9 -11
  6. package/dist/mlt/index.cjs.map +1 -1
  7. package/dist/mlt/mlt-loader.js +1 -1
  8. package/dist/mlt/mlt-writer.js +1 -1
  9. package/dist/mvt/arrow-table-tile-source-loader-types.js +1 -1
  10. package/dist/mvt/arrow-table-tile-source-loader.cjs +8 -10
  11. package/dist/mvt/arrow-table-tile-source-loader.cjs.map +1 -1
  12. package/dist/mvt/dist.dev.js +15 -20
  13. package/dist/mvt/dist.min.js +19 -19
  14. package/dist/mvt/index.cjs +14 -24
  15. package/dist/mvt/index.cjs.map +3 -3
  16. package/dist/mvt/lib/mvt-worker-transport.d.ts.map +1 -1
  17. package/dist/mvt/lib/mvt-worker-transport.js +1 -1
  18. package/dist/mvt/lib/mvt-worker-transport.js.map +1 -1
  19. package/dist/mvt/map-style-loader.js +1 -1
  20. package/dist/mvt/mvt-geojson-loader-types.js +1 -1
  21. package/dist/mvt/mvt-geojson-loader.cjs +1 -1
  22. package/dist/mvt/mvt-loader.js +1 -1
  23. package/dist/mvt/mvt-writer.js +1 -1
  24. package/dist/mvt/tilejson-loader.js +1 -1
  25. package/dist/mvt-worker-node.js +69 -27
  26. package/dist/mvt-worker-node.js.map +4 -4
  27. package/dist/mvt-worker.js +68 -27
  28. package/dist/pmtiles/dist.dev.js +18 -23
  29. package/dist/pmtiles/dist.min.js +15 -15
  30. package/dist/pmtiles/geoarrow.cjs +7 -9
  31. package/dist/pmtiles/geoarrow.cjs.map +1 -1
  32. package/dist/pmtiles/index.cjs +13 -23
  33. package/dist/pmtiles/index.cjs.map +3 -3
  34. package/dist/pmtiles/lib/version.js +1 -1
  35. package/dist/pmtiles/pmtiles-writer.js +1 -1
  36. package/dist/pmtiles/raster.cjs.map +1 -1
  37. package/package.json +9 -9
  38. package/src/mvt/lib/mvt-worker-transport.ts +5 -2
@@ -423,7 +423,7 @@ var init_tilejson_loader = __esm({
423
423
  "dist/mvt/tilejson-loader.js"() {
424
424
  "use strict";
425
425
  init_tilejson_format();
426
- VERSION = true ? "5.0.0-alpha.13" : "latest";
426
+ VERSION = true ? "5.0.0-alpha.14" : "latest";
427
427
  TileJSONLoader = {
428
428
  dataType: null,
429
429
  batchType: null,
@@ -617,7 +617,7 @@ var init_map_style_loader = __esm({
617
617
  "dist/mvt/map-style-loader.js"() {
618
618
  "use strict";
619
619
  init_map_style_format();
620
- VERSION2 = true ? "5.0.0-alpha.13" : "latest";
620
+ VERSION2 = true ? "5.0.0-alpha.14" : "latest";
621
621
  MapStyleLoader = {
622
622
  dataType: null,
623
623
  batchType: null,
@@ -1261,14 +1261,6 @@ var init_transport = __esm({
1261
1261
  }
1262
1262
  });
1263
1263
 
1264
- // ../arrow/src/transport.ts
1265
- var init_transport2 = __esm({
1266
- "../arrow/src/transport.ts"() {
1267
- "use strict";
1268
- init_transport();
1269
- }
1270
- });
1271
-
1272
1264
  // dist/mvt/lib/mvt-worker-transport.js
1273
1265
  function serializeMVTWorkerResult(result, options) {
1274
1266
  if (isArrowTable2(result)) {
@@ -1304,7 +1296,7 @@ function getWorkerTransferBufferCopyMode(options) {
1304
1296
  var init_mvt_worker_transport = __esm({
1305
1297
  "dist/mvt/lib/mvt-worker-transport.js"() {
1306
1298
  "use strict";
1307
- init_transport2();
1299
+ init_transport();
1308
1300
  }
1309
1301
  });
1310
1302
 
@@ -3739,7 +3731,7 @@ function createAuthenticatedFetch(options) {
3739
3731
  const authenticatedFetch = async (url, requestOptions = {}) => {
3740
3732
  var _a, _b, _c, _d, _e, _f, _g;
3741
3733
  requestOptions = mergeFetchOptions(fetchOptions, requestOptions);
3742
- if ((_a = requestOptions.signal) == null ? void 0 : _a.aborted) throw createAbortError();
3734
+ (_a = requestOptions.signal) == null ? void 0 : _a.throwIfAborted();
3743
3735
  if (!credentials.length) return baseFetch(url, requestOptions);
3744
3736
  const resolvedURL = parseHTTPURL(url);
3745
3737
  const authorization = resolvedURL ? await authorizeRequest(resolvedURL, requestOptions, tokenCredentials) : { url, options: requestOptions, credentials: [] };
@@ -3758,7 +3750,7 @@ function createAuthenticatedFetch(options) {
3758
3750
  }
3759
3751
  );
3760
3752
  if (!refreshableCredentials.length && !shouldRetrySignature) return response;
3761
- if ((_e = requestOptions.signal) == null ? void 0 : _e.aborted) throw createAbortError();
3753
+ (_e = requestOptions.signal) == null ? void 0 : _e.throwIfAborted();
3762
3754
  const refreshedTokens = /* @__PURE__ */ new Map();
3763
3755
  await Promise.all(
3764
3756
  refreshableCredentials.map(async ({ credential }) => {
@@ -3769,7 +3761,7 @@ function createAuthenticatedFetch(options) {
3769
3761
  if (!refreshedTokens.size && !shouldRetrySignature) return response;
3770
3762
  await ((_f = response.body) == null ? void 0 : _f.cancel().catch(() => {
3771
3763
  }));
3772
- if ((_g = requestOptions.signal) == null ? void 0 : _g.aborted) throw createAbortError();
3764
+ (_g = requestOptions.signal) == null ? void 0 : _g.throwIfAborted();
3773
3765
  const replayAuthorization = resolvedURL ? await authorizeRequest(
3774
3766
  resolvedURL,
3775
3767
  requestOptions,
@@ -3804,9 +3796,10 @@ function getAuthenticatedFetch(options = {}) {
3804
3796
  } else {
3805
3797
  fetchFunction = (url, requestOptions) => fetch(url, requestOptions);
3806
3798
  }
3799
+ const fetchOptions = typeof fetchOption === "object" && fetchOption ? fetchOption : void 0;
3807
3800
  return createAuthenticatedFetch({
3808
3801
  fetch: fetchFunction,
3809
- fetchOptions: typeof fetchOption === "object" && fetchOption ? fetchOption : void 0,
3802
+ fetchOptions: options.signal ? { ...fetchOptions, signal: options.signal } : fetchOptions,
3810
3803
  credentials: ((_b = options.core) == null ? void 0 : _b.credentials) || [],
3811
3804
  authentications: (_c = options.core) == null ? void 0 : _c.authentications
3812
3805
  });
@@ -3826,7 +3819,7 @@ async function authenticateRequest(request, credentials, reason, response) {
3826
3819
  for (const credential of credentials) {
3827
3820
  const origin = getRequestOrigin(request.url);
3828
3821
  if (!origin || !normalizeRequestOrigins(credential.origins).includes(origin)) continue;
3829
- if (signal == null ? void 0 : signal.aborted) throw createAbortError();
3822
+ signal == null ? void 0 : signal.throwIfAborted();
3830
3823
  const authenticatedRequest = await credential.authenticate({
3831
3824
  url: request.url,
3832
3825
  options: { ...request.options, headers: new Headers(request.options.headers) },
@@ -3842,7 +3835,7 @@ async function authenticateRequest(request, credentials, reason, response) {
3842
3835
  };
3843
3836
  appliedCredentials.push(credential);
3844
3837
  }
3845
- if (signal == null ? void 0 : signal.aborted) throw createAbortError();
3838
+ signal == null ? void 0 : signal.throwIfAborted();
3846
3839
  return { ...request, credentials: appliedCredentials };
3847
3840
  }
3848
3841
  function getRequestOrigin(url) {
@@ -3932,9 +3925,6 @@ function isReplayableRequest(options) {
3932
3925
  if (!["GET", "HEAD", "OPTIONS", "PUT", "DELETE"].includes(method)) return false;
3933
3926
  return !(options.body && typeof ReadableStream !== "undefined" && options.body instanceof ReadableStream);
3934
3927
  }
3935
- function createAbortError() {
3936
- return new DOMException("The operation was aborted.", "AbortError");
3937
- }
3938
3928
  var AUTHENTICATED_FETCH, refreshPromises;
3939
3929
  var init_request_credentials = __esm({
3940
3930
  "../core/src/loader-utils/lib/request-utils/request-credentials.ts"() {
@@ -5037,7 +5027,7 @@ var init_mvt_loader = __esm({
5037
5027
  "use strict";
5038
5028
  init_mvt_format();
5039
5029
  init_mvt_worker_transport();
5040
- VERSION4 = true ? "5.0.0-alpha.13" : "latest";
5030
+ VERSION4 = true ? "5.0.0-alpha.14" : "latest";
5041
5031
  MVTLoader = {
5042
5032
  ...MVTFormat,
5043
5033
  dataType: null,
@@ -8161,7 +8151,7 @@ init_mvt_loader();
8161
8151
 
8162
8152
  // dist/mvt/mvt-geojson-loader-types.js
8163
8153
  init_mvt_format();
8164
- var VERSION6 = true ? "5.0.0-alpha.13" : "latest";
8154
+ var VERSION6 = true ? "5.0.0-alpha.14" : "latest";
8165
8155
  async function preload5() {
8166
8156
  const { MVTGeoJSONLoaderWithParser: MVTGeoJSONLoaderWithParser2 } = await Promise.resolve().then(() => (init_mvt_geojson_loader(), mvt_geojson_loader_exports));
8167
8157
  return MVTGeoJSONLoaderWithParser2;
@@ -8767,7 +8757,7 @@ function encodeMVT(data, options) {
8767
8757
  }
8768
8758
 
8769
8759
  // dist/mvt/mvt-writer.js
8770
- var VERSION7 = true ? "5.0.0-alpha.13" : "latest";
8760
+ var VERSION7 = true ? "5.0.0-alpha.14" : "latest";
8771
8761
  var MVTWriter = {
8772
8762
  ...MVTFormat,
8773
8763
  version: VERSION7,
@@ -10062,7 +10052,7 @@ function isGeoJSONTable(table) {
10062
10052
  var ARROW_TABLE_TILE_SOURCE_DEFAULT_OPTIONS = { table: { coordinates: "local" } };
10063
10053
 
10064
10054
  // dist/mvt/arrow-table-tile-source-loader-types.js
10065
- var VERSION10 = true ? "5.0.0-alpha.13" : "latest";
10055
+ var VERSION10 = true ? "5.0.0-alpha.14" : "latest";
10066
10056
  async function preloadArrowTableTileSourceLoader2() {
10067
10057
  const { ArrowTableTileSourceLoaderWithParser: ArrowTableTileSourceLoaderWithParser2 } = await Promise.resolve().then(() => (init_arrow_table_tile_source_loader(), arrow_table_tile_source_loader_exports));
10068
10058
  return ArrowTableTileSourceLoaderWithParser2;