loom-browser 0.0.2 → 0.0.3

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.
@@ -4,11 +4,14 @@
4
4
  * Directly instantiates the zstd WASM binary (from @bokuweb/zstd-wasm, MIT license)
5
5
  * without the Emscripten glue code that breaks webpack bundling.
6
6
  *
7
+ * The WASM binary is base64-inlined to avoid bundler issues with
8
+ * `new URL('./zstd.wasm', import.meta.url)` (e.g. Turbopack).
9
+ *
7
10
  * Only exposes decompression with dictionary — the minimum needed for GTX.
8
11
  */
9
12
  /**
10
13
  * Initialize the zstd WASM module. Idempotent — safe to call multiple times.
11
- * Loads the WASM binary from the same directory as this module.
14
+ * Instantiates from the base64-inlined binary.
12
15
  */
13
16
  export declare function initZstd(): Promise<void>;
14
17
  /** Create a decompression context. Returns an opaque handle. */
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Base64-inlined zstd WASM binary (from @bokuweb/zstd-wasm, MIT license).
3
+ * Eliminates the need for bundlers to handle `new URL('./zstd.wasm', import.meta.url)`.
4
+ */
5
+ /** Decode the base64 string to bytes (cached after first call). */
6
+ export declare function getZstdWasmBytes(): Uint8Array;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loom-browser",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "main": "dist/loom.esm.js",
5
5
  "module": "dist/loom.esm.js",
6
6
  "types": "dist/types/index.d.ts",