@carto/api-client 0.5.6-alpha.0 → 0.5.6-alpha.bundle.2
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 +15 -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 +15 -5
- package/build/api-client.js.map +1 -1
- package/build/worker.global.js +19721 -0
- package/build/worker.global.js.map +1 -0
- package/package.json +4 -1
- package/src/sources/types.ts +8 -0
- package/src/widget-sources/widget-tileset-source.ts +18 -5
package/CHANGELOG.md
CHANGED
package/build/api-client.cjs
CHANGED
|
@@ -7746,13 +7746,23 @@ var WidgetTilesetSource = class extends WidgetSource {
|
|
|
7746
7746
|
if (this._workerImpl) {
|
|
7747
7747
|
return this._workerImpl;
|
|
7748
7748
|
}
|
|
7749
|
-
this.
|
|
7750
|
-
new
|
|
7751
|
-
{
|
|
7749
|
+
if (this.props.widgetWorkerUrl) {
|
|
7750
|
+
this._workerImpl = new Worker(this.props.widgetWorkerUrl, {
|
|
7752
7751
|
type: "module",
|
|
7753
7752
|
name: "cartowidgettileset"
|
|
7754
|
-
}
|
|
7755
|
-
|
|
7753
|
+
});
|
|
7754
|
+
} else {
|
|
7755
|
+
this._workerImpl = new Worker(
|
|
7756
|
+
new URL("@carto/api-client/worker", importMetaUrl),
|
|
7757
|
+
{
|
|
7758
|
+
type: "module",
|
|
7759
|
+
name: "cartowidgettileset"
|
|
7760
|
+
}
|
|
7761
|
+
);
|
|
7762
|
+
}
|
|
7763
|
+
this._workerImpl.addEventListener("error", (e) => {
|
|
7764
|
+
console.error("widget-tileset-source worker error", e);
|
|
7765
|
+
});
|
|
7756
7766
|
this._workerImpl.postMessage({
|
|
7757
7767
|
method: "init" /* INIT */,
|
|
7758
7768
|
params: [this.props]
|