@grame/faustwasm 0.14.0 → 0.14.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.
Files changed (37) hide show
  1. package/assets/standalone/faustwasm/index.d.ts +6 -0
  2. package/assets/standalone/faustwasm/index.js +13 -6
  3. package/assets/standalone/faustwasm/index.js.map +2 -2
  4. package/dist/cjs/index.d.ts +6 -0
  5. package/dist/cjs/index.js +13 -6
  6. package/dist/cjs/index.js.map +2 -2
  7. package/dist/cjs-bundle/index.d.ts +6 -0
  8. package/dist/cjs-bundle/index.js +13 -6
  9. package/dist/cjs-bundle/index.js.map +2 -2
  10. package/dist/esm/index.d.ts +6 -0
  11. package/dist/esm/index.js +13 -6
  12. package/dist/esm/index.js.map +2 -2
  13. package/dist/esm-bundle/index.d.ts +6 -0
  14. package/dist/esm-bundle/index.js +13 -6
  15. package/dist/esm-bundle/index.js.map +2 -2
  16. package/package.json +1 -1
  17. package/src/SoundfileReader.ts +14 -6
  18. package/test/faustlive-wasm/faustwasm/index.d.ts +6 -0
  19. package/test/faustlive-wasm/faustwasm/index.js +13 -6
  20. package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
  21. package/test/organ/create-node.js +0 -252
  22. package/test/organ/dsp-meta.json +0 -131
  23. package/test/organ/dsp-module.wasm +0 -0
  24. package/test/organ/faust-pwa.js +0 -344
  25. package/test/organ/faust-ui/index.css +0 -442
  26. package/test/organ/faust-ui/index.css.map +0 -1
  27. package/test/organ/faust-ui/index.d.ts +0 -1
  28. package/test/organ/faust-ui/index.js +0 -3756
  29. package/test/organ/faust-ui/index.js.map +0 -1
  30. package/test/organ/faustwasm/index.d.ts +0 -1730
  31. package/test/organ/faustwasm/index.js +0 -5969
  32. package/test/organ/faustwasm/index.js.map +0 -7
  33. package/test/organ/icon.png +0 -0
  34. package/test/organ/index.html +0 -76
  35. package/test/organ/index.js +0 -69
  36. package/test/organ/manifest.json +0 -17
  37. package/test/organ/service-worker.js +0 -165
@@ -1323,6 +1323,12 @@ export declare class WavDecoder {
1323
1323
  }
1324
1324
  /** Read metadata and fetch soundfiles */
1325
1325
  export declare class SoundfileReader {
1326
+ /**
1327
+ * Set fallback base URLs used to resolve soundfile paths.
1328
+ *
1329
+ * In Node or other non-browser runtimes, `location` may be undefined;
1330
+ * in that case this returns an empty list to avoid resolution errors.
1331
+ */
1326
1332
  static get fallbackPaths(): string[];
1327
1333
  /**
1328
1334
  * Extract the parent URL from an URL.
package/dist/cjs/index.js CHANGED
@@ -4473,13 +4473,20 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
4473
4473
 
4474
4474
  // src/SoundfileReader.ts
4475
4475
  var SoundfileReader = class {
4476
- // Set the fallback paths
4476
+ /**
4477
+ * Set fallback base URLs used to resolve soundfile paths.
4478
+ *
4479
+ * In Node or other non-browser runtimes, `location` may be undefined;
4480
+ * in that case this returns an empty list to avoid resolution errors.
4481
+ */
4477
4482
  static get fallbackPaths() {
4478
- return [
4479
- location.href,
4480
- this.getParentUrl(location.href),
4481
- location.origin
4482
- ];
4483
+ const loc = typeof location !== "undefined" ? location : null;
4484
+ const href = loc == null ? void 0 : loc.href;
4485
+ const origin = loc == null ? void 0 : loc.origin;
4486
+ const parent = href ? this.getParentUrl(href) : null;
4487
+ return [href, parent, origin].filter(
4488
+ (value) => typeof value === "string" && value.length > 0
4489
+ );
4483
4490
  }
4484
4491
  /**
4485
4492
  * Extract the parent URL from an URL.