@carto/api-client
Advanced tools
Comparing version
@@ -5,6 +5,2 @@ # CHANGELOG | ||
### 0.5.6 | ||
- feat(widgets): WidgetRemoteSource: custom aggregations for category, timeseries models (#174) | ||
### 0.5.5 | ||
@@ -11,0 +7,0 @@ |
@@ -11,3 +11,3 @@ { | ||
"packageManager": "yarn@4.3.1", | ||
"version": "0.5.6-alpha.0", | ||
"version": "0.5.6-alpha.1", | ||
"license": "MIT", | ||
@@ -14,0 +14,0 @@ "publishConfig": { |
@@ -191,2 +191,10 @@ // deck.gl | ||
widgetWorker?: boolean; | ||
/** | ||
* Script URL used to create Web Workers for local widget calculations. In | ||
* most cases a custom URL is not needed; bundlers will resolve the worker | ||
* URL from a `@carto/api-client/worker` import internally. Advanced uses | ||
* may require deploying the script manually and providing a custom URL. | ||
*/ | ||
widgetWorkerUrl?: string; | ||
}; | ||
@@ -193,0 +201,0 @@ |
@@ -102,9 +102,18 @@ import type { | ||
this._workerImpl = new Worker( | ||
new URL('@carto/api-client/worker', import.meta.url), | ||
{ | ||
// For Vite (and perhaps other bundlers) to parse WorkerOptions, it | ||
// must be a static, inline object – duplicated below. | ||
if (this.props.widgetWorkerUrl) { | ||
this._workerImpl = new Worker(this.props.widgetWorkerUrl, { | ||
type: 'module', | ||
name: 'cartowidgettileset', | ||
} | ||
); | ||
}); | ||
} else { | ||
this._workerImpl = new Worker( | ||
new URL('@carto/api-client/worker', import.meta.url), | ||
{ | ||
type: 'module', | ||
name: 'cartowidgettileset', | ||
} | ||
); | ||
} | ||
@@ -111,0 +120,0 @@ this._workerImpl.postMessage({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
3564573
0.08%36307
0.1%20
-13.04%4
-20%