@carto/api-client 0.5.6-alpha.0 → 0.5.6-alpha.1
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/CHANGELOG.md +0 -4
- package/build/api-client.cjs +12 -5
- package/build/api-client.cjs.map +1 -1
- package/build/api-client.d.cts +7 -0
- package/build/api-client.d.ts +7 -0
- package/build/api-client.js +12 -5
- package/build/api-client.js.map +1 -1
- package/package.json +1 -1
- package/src/sources/types.ts +8 -0
- package/src/widget-sources/widget-tileset-source.ts +14 -5
package/build/api-client.d.cts
CHANGED
|
@@ -476,6 +476,13 @@ type TilesetSourceOptions = {
|
|
|
476
476
|
* are used by default if the runtime environment supports ES Module Workers.
|
|
477
477
|
*/
|
|
478
478
|
widgetWorker?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Script URL used to create Web Workers for local widget calculations. In
|
|
481
|
+
* most cases a custom URL is not needed; bundlers will resolve the worker
|
|
482
|
+
* URL from a `@carto/api-client/worker` import internally. Advanced uses
|
|
483
|
+
* may require deploying the script manually and providing a custom URL.
|
|
484
|
+
*/
|
|
485
|
+
widgetWorkerUrl?: string;
|
|
479
486
|
};
|
|
480
487
|
type ColumnsOption = {
|
|
481
488
|
/**
|
package/build/api-client.d.ts
CHANGED
|
@@ -476,6 +476,13 @@ type TilesetSourceOptions = {
|
|
|
476
476
|
* are used by default if the runtime environment supports ES Module Workers.
|
|
477
477
|
*/
|
|
478
478
|
widgetWorker?: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Script URL used to create Web Workers for local widget calculations. In
|
|
481
|
+
* most cases a custom URL is not needed; bundlers will resolve the worker
|
|
482
|
+
* URL from a `@carto/api-client/worker` import internally. Advanced uses
|
|
483
|
+
* may require deploying the script manually and providing a custom URL.
|
|
484
|
+
*/
|
|
485
|
+
widgetWorkerUrl?: string;
|
|
479
486
|
};
|
|
480
487
|
type ColumnsOption = {
|
|
481
488
|
/**
|
package/build/api-client.js
CHANGED
|
@@ -7467,13 +7467,20 @@ var WidgetTilesetSource = class extends WidgetSource {
|
|
|
7467
7467
|
if (this._workerImpl) {
|
|
7468
7468
|
return this._workerImpl;
|
|
7469
7469
|
}
|
|
7470
|
-
this.
|
|
7471
|
-
new
|
|
7472
|
-
{
|
|
7470
|
+
if (this.props.widgetWorkerUrl) {
|
|
7471
|
+
this._workerImpl = new Worker(this.props.widgetWorkerUrl, {
|
|
7473
7472
|
type: "module",
|
|
7474
7473
|
name: "cartowidgettileset"
|
|
7475
|
-
}
|
|
7476
|
-
|
|
7474
|
+
});
|
|
7475
|
+
} else {
|
|
7476
|
+
this._workerImpl = new Worker(
|
|
7477
|
+
new URL("@carto/api-client/worker", import.meta.url),
|
|
7478
|
+
{
|
|
7479
|
+
type: "module",
|
|
7480
|
+
name: "cartowidgettileset"
|
|
7481
|
+
}
|
|
7482
|
+
);
|
|
7483
|
+
}
|
|
7477
7484
|
this._workerImpl.postMessage({
|
|
7478
7485
|
method: "init" /* INIT */,
|
|
7479
7486
|
params: [this.props]
|