@opendata-ai/openchart-vanilla 6.1.3 → 6.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendata-ai/openchart-vanilla",
3
- "version": "6.1.3",
3
+ "version": "6.1.4",
4
4
  "description": "Vanilla JS renderer for openchart: SVG charts, HTML tables, force-directed graphs",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Riley Hilliard",
@@ -50,8 +50,8 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@floating-ui/dom": "^1.7.6",
53
- "@opendata-ai/openchart-core": "6.1.3",
54
- "@opendata-ai/openchart-engine": "6.1.3",
53
+ "@opendata-ai/openchart-core": "6.1.4",
54
+ "@opendata-ai/openchart-engine": "6.1.4",
55
55
  "d3-force": "^3.0.0",
56
56
  "d3-quadtree": "^3.0.1"
57
57
  },
@@ -272,14 +272,16 @@ export class SimulationManager {
272
272
 
273
273
  w.onerror = () => {
274
274
  // .js failed (likely Vite dev with source aliases). Try .ts.
275
+ // The URL is constructed dynamically to prevent bundlers (Rollup)
276
+ // from statically analyzing it and trying to resolve the .ts file
277
+ // as an asset entry point in production builds.
275
278
  if (this.destroyed) return;
276
279
  w.terminate();
277
280
  this.worker = null;
278
281
 
279
282
  try {
280
- const w2 = new Worker(new URL('./simulation-worker.ts', import.meta.url), {
281
- type: 'module',
282
- });
283
+ const tsUrl = new URL(import.meta.url.replace(/\/[^/]+$/, '/simulation-worker.ts'));
284
+ const w2 = new Worker(tsUrl, { type: 'module' });
283
285
 
284
286
  w2.onerror = () => {
285
287
  // Both .js and .ts failed - fall back to sync.