@perspective-dev/client 5.6.0 → 5.6.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.
- package/dist/cdn/perspective.js +2 -2
- package/dist/cdn/perspective.js.map +4 -4
- package/dist/esm/perspective.js +2 -2
- package/dist/esm/perspective.js.map +4 -4
- package/dist/esm/perspective.node.js +36 -5
- package/dist/esm/perspective.node.js.map +2 -2
- package/dist/esm/virtual_servers/duckdb.js +1 -1
- package/dist/esm/virtual_servers/duckdb.js.map +2 -2
- package/dist/esm/wasm/decompress.d.ts +1 -0
- package/dist/wasm/perspective-js.d.ts +1 -1
- package/dist/wasm/perspective-js.js +4 -4
- package/dist/wasm/perspective-js.wasm +0 -0
- package/dist/wasm/perspective-js.wasm.d.ts +1 -1
- package/package.json +6 -6
- package/src/ts/virtual_servers/duckdb.ts +1 -1
- package/src/ts/wasm/decompress.ts +42 -23
|
@@ -2211,7 +2211,7 @@ function __wbg_get_imports() {
|
|
|
2211
2211
|
const a = state0.a;
|
|
2212
2212
|
state0.a = 0;
|
|
2213
2213
|
try {
|
|
2214
|
-
return
|
|
2214
|
+
return __wasm_bindgen_func_elem_13018(a, state0.b, arg02, arg12);
|
|
2215
2215
|
} finally {
|
|
2216
2216
|
state0.a = a;
|
|
2217
2217
|
}
|
|
@@ -2290,7 +2290,7 @@ function __wbg_get_imports() {
|
|
|
2290
2290
|
const ret = Promise.resolve(getObject(arg0));
|
|
2291
2291
|
return addHeapObject(ret);
|
|
2292
2292
|
},
|
|
2293
|
-
|
|
2293
|
+
__wbg_run_312def04b15a0d44: function() {
|
|
2294
2294
|
return handleError(function(arg0, arg1) {
|
|
2295
2295
|
const ret = getObject(arg0).run(getObject(arg1));
|
|
2296
2296
|
return addHeapObject(ret);
|
|
@@ -2470,8 +2470,8 @@ function __wasm_bindgen_func_elem_2057(arg0, arg1) {
|
|
|
2470
2470
|
function __wasm_bindgen_func_elem_4641(arg0, arg1, arg2) {
|
|
2471
2471
|
wasm.__wasm_bindgen_func_elem_4641(arg0, arg1, addHeapObject(arg2));
|
|
2472
2472
|
}
|
|
2473
|
-
function
|
|
2474
|
-
wasm.
|
|
2473
|
+
function __wasm_bindgen_func_elem_13018(arg0, arg1, arg2, arg3) {
|
|
2474
|
+
wasm.__wasm_bindgen_func_elem_13018(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
2475
2475
|
}
|
|
2476
2476
|
var ClientFinalization = typeof FinalizationRegistry === "undefined" ? { register: () => {
|
|
2477
2477
|
}, unregister: () => {
|
|
@@ -2854,7 +2854,35 @@ async function __wbg_init(module_or_path) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
|
|
2856
2856
|
// src/ts/wasm/decompress.ts
|
|
2857
|
-
|
|
2857
|
+
async function extract(input) {
|
|
2858
|
+
let bin;
|
|
2859
|
+
if (input instanceof Response) {
|
|
2860
|
+
bin = await WebAssembly.instantiateStreaming(input);
|
|
2861
|
+
} else if (typeof input === "string") {
|
|
2862
|
+
bin = await WebAssembly.instantiateStreaming(fetch(input));
|
|
2863
|
+
} else if (input instanceof ArrayBuffer) {
|
|
2864
|
+
bin = await WebAssembly.instantiate(input);
|
|
2865
|
+
} else {
|
|
2866
|
+
bin = input;
|
|
2867
|
+
}
|
|
2868
|
+
const inst = bin.instance.exports;
|
|
2869
|
+
const [payload] = WebAssembly.Module.customSections(
|
|
2870
|
+
bin.module,
|
|
2871
|
+
"psp-runtime"
|
|
2872
|
+
);
|
|
2873
|
+
const [raw_length_view] = WebAssembly.Module.customSections(
|
|
2874
|
+
bin.module,
|
|
2875
|
+
"psp-len"
|
|
2876
|
+
);
|
|
2877
|
+
const raw_length = new DataView(raw_length_view).getUint32(0, true);
|
|
2878
|
+
const ptr = inst.resize(payload.byteLength);
|
|
2879
|
+
new Uint8Array(inst.memory.buffer).set(new Uint8Array(payload), ptr);
|
|
2880
|
+
const offset = inst.compile(payload.byteLength, raw_length);
|
|
2881
|
+
return new Uint8Array(inst.memory.buffer).slice(
|
|
2882
|
+
offset,
|
|
2883
|
+
raw_length + offset
|
|
2884
|
+
);
|
|
2885
|
+
}
|
|
2858
2886
|
if (typeof WebAssembly === "undefined") {
|
|
2859
2887
|
throw new Error("WebAssembly not supported.");
|
|
2860
2888
|
}
|
|
@@ -2862,6 +2890,9 @@ async function load_wasm_stage_0(wasm2) {
|
|
|
2862
2890
|
if (wasm2 instanceof Function) {
|
|
2863
2891
|
wasm2 = await wasm2();
|
|
2864
2892
|
}
|
|
2893
|
+
if (wasm2 instanceof Promise) {
|
|
2894
|
+
wasm2 = await wasm2;
|
|
2895
|
+
}
|
|
2865
2896
|
try {
|
|
2866
2897
|
return await extract(wasm2);
|
|
2867
2898
|
} catch (e) {
|