@next/swc-wasm-web 13.5.4-canary.6 → 13.5.4-canary.7
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 +1 -1
- package/wasm.d.ts +14 -14
- package/wasm.js +77 -77
- package/wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/wasm.d.ts
CHANGED
|
@@ -7,18 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export function browserslist(query: string, opts: any): any;
|
|
9
9
|
/**
|
|
10
|
-
* @param {string} value
|
|
11
|
-
* @param {any} opts
|
|
12
|
-
* @returns {any}
|
|
13
|
-
*/
|
|
14
|
-
export function mdxCompileSync(value: string, opts: any): any;
|
|
15
|
-
/**
|
|
16
|
-
* @param {string} value
|
|
17
|
-
* @param {any} opts
|
|
18
|
-
* @returns {Promise<any>}
|
|
19
|
-
*/
|
|
20
|
-
export function mdxCompile(value: string, opts: any): Promise<any>;
|
|
21
|
-
/**
|
|
22
10
|
* @param {string} s
|
|
23
11
|
* @param {any} opts
|
|
24
12
|
* @returns {any}
|
|
@@ -54,20 +42,32 @@ export function parseSync(s: string, opts: any): any;
|
|
|
54
42
|
* @returns {Promise<any>}
|
|
55
43
|
*/
|
|
56
44
|
export function parse(s: string, opts: any): Promise<any>;
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} value
|
|
47
|
+
* @param {any} opts
|
|
48
|
+
* @returns {any}
|
|
49
|
+
*/
|
|
50
|
+
export function mdxCompileSync(value: string, opts: any): any;
|
|
51
|
+
/**
|
|
52
|
+
* @param {string} value
|
|
53
|
+
* @param {any} opts
|
|
54
|
+
* @returns {Promise<any>}
|
|
55
|
+
*/
|
|
56
|
+
export function mdxCompile(value: string, opts: any): Promise<any>;
|
|
57
57
|
|
|
58
58
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
59
59
|
|
|
60
60
|
export interface InitOutput {
|
|
61
61
|
readonly memory: WebAssembly.Memory;
|
|
62
62
|
readonly browserslist: (a: number, b: number, c: number, d: number) => void;
|
|
63
|
-
readonly mdxCompileSync: (a: number, b: number, c: number) => void;
|
|
64
|
-
readonly mdxCompile: (a: number, b: number) => number;
|
|
65
63
|
readonly minifySync: (a: number, b: number, c: number) => void;
|
|
66
64
|
readonly minify: (a: number, b: number) => number;
|
|
67
65
|
readonly transformSync: (a: number, b: number, c: number) => void;
|
|
68
66
|
readonly transform: (a: number, b: number) => number;
|
|
69
67
|
readonly parseSync: (a: number, b: number, c: number) => void;
|
|
70
68
|
readonly parse: (a: number, b: number) => number;
|
|
69
|
+
readonly mdxCompileSync: (a: number, b: number, c: number) => void;
|
|
70
|
+
readonly mdxCompile: (a: number, b: number) => number;
|
|
71
71
|
readonly __wbindgen_malloc: (a: number) => number;
|
|
72
72
|
readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
|
|
73
73
|
readonly __wbindgen_export_2: WebAssembly.Table;
|
package/wasm.js
CHANGED
|
@@ -20,9 +20,7 @@ function takeObject(idx) {
|
|
|
20
20
|
return ret;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
cachedTextDecoder.decode();
|
|
23
|
+
let WASM_VECTOR_LEN = 0;
|
|
26
24
|
|
|
27
25
|
let cachedUint8Memory0 = null;
|
|
28
26
|
|
|
@@ -33,21 +31,6 @@ function getUint8Memory0() {
|
|
|
33
31
|
return cachedUint8Memory0;
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
function getStringFromWasm0(ptr, len) {
|
|
37
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function addHeapObject(obj) {
|
|
41
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
42
|
-
const idx = heap_next;
|
|
43
|
-
heap_next = heap[idx];
|
|
44
|
-
|
|
45
|
-
heap[idx] = obj;
|
|
46
|
-
return idx;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
let WASM_VECTOR_LEN = 0;
|
|
50
|
-
|
|
51
34
|
const cachedTextEncoder = new TextEncoder('utf-8');
|
|
52
35
|
|
|
53
36
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -114,6 +97,23 @@ function getInt32Memory0() {
|
|
|
114
97
|
return cachedInt32Memory0;
|
|
115
98
|
}
|
|
116
99
|
|
|
100
|
+
const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
101
|
+
|
|
102
|
+
cachedTextDecoder.decode();
|
|
103
|
+
|
|
104
|
+
function getStringFromWasm0(ptr, len) {
|
|
105
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function addHeapObject(obj) {
|
|
109
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
110
|
+
const idx = heap_next;
|
|
111
|
+
heap_next = heap[idx];
|
|
112
|
+
|
|
113
|
+
heap[idx] = obj;
|
|
114
|
+
return idx;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
117
|
function debugString(val) {
|
|
118
118
|
// primitive types
|
|
119
119
|
const type = typeof val;
|
|
@@ -268,14 +268,14 @@ function __wbg_adapter_114(arg0, arg1, arg2, arg3) {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
/**
|
|
271
|
-
* @param {string}
|
|
271
|
+
* @param {string} s
|
|
272
272
|
* @param {any} opts
|
|
273
273
|
* @returns {any}
|
|
274
274
|
*/
|
|
275
|
-
export function
|
|
275
|
+
export function minifySync(s, opts) {
|
|
276
276
|
try {
|
|
277
277
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
278
|
-
wasm.
|
|
278
|
+
wasm.minifySync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
279
279
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
280
280
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
281
281
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -289,24 +289,24 @@ export function mdxCompileSync(value, opts) {
|
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
/**
|
|
292
|
-
* @param {string}
|
|
292
|
+
* @param {string} s
|
|
293
293
|
* @param {any} opts
|
|
294
294
|
* @returns {Promise<any>}
|
|
295
295
|
*/
|
|
296
|
-
export function
|
|
297
|
-
const ret = wasm.
|
|
296
|
+
export function minify(s, opts) {
|
|
297
|
+
const ret = wasm.minify(addHeapObject(s), addHeapObject(opts));
|
|
298
298
|
return takeObject(ret);
|
|
299
299
|
}
|
|
300
300
|
|
|
301
301
|
/**
|
|
302
|
-
* @param {
|
|
302
|
+
* @param {any} s
|
|
303
303
|
* @param {any} opts
|
|
304
304
|
* @returns {any}
|
|
305
305
|
*/
|
|
306
|
-
export function
|
|
306
|
+
export function transformSync(s, opts) {
|
|
307
307
|
try {
|
|
308
308
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
309
|
-
wasm.
|
|
309
|
+
wasm.transformSync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
310
310
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
311
311
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
312
312
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -320,24 +320,24 @@ export function minifySync(s, opts) {
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
/**
|
|
323
|
-
* @param {
|
|
323
|
+
* @param {any} s
|
|
324
324
|
* @param {any} opts
|
|
325
325
|
* @returns {Promise<any>}
|
|
326
326
|
*/
|
|
327
|
-
export function
|
|
328
|
-
const ret = wasm.
|
|
327
|
+
export function transform(s, opts) {
|
|
328
|
+
const ret = wasm.transform(addHeapObject(s), addHeapObject(opts));
|
|
329
329
|
return takeObject(ret);
|
|
330
330
|
}
|
|
331
331
|
|
|
332
332
|
/**
|
|
333
|
-
* @param {
|
|
333
|
+
* @param {string} s
|
|
334
334
|
* @param {any} opts
|
|
335
335
|
* @returns {any}
|
|
336
336
|
*/
|
|
337
|
-
export function
|
|
337
|
+
export function parseSync(s, opts) {
|
|
338
338
|
try {
|
|
339
339
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
340
|
-
wasm.
|
|
340
|
+
wasm.parseSync(retptr, addHeapObject(s), addHeapObject(opts));
|
|
341
341
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
342
342
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
343
343
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -351,24 +351,24 @@ export function transformSync(s, opts) {
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
* @param {
|
|
354
|
+
* @param {string} s
|
|
355
355
|
* @param {any} opts
|
|
356
356
|
* @returns {Promise<any>}
|
|
357
357
|
*/
|
|
358
|
-
export function
|
|
359
|
-
const ret = wasm.
|
|
358
|
+
export function parse(s, opts) {
|
|
359
|
+
const ret = wasm.parse(addHeapObject(s), addHeapObject(opts));
|
|
360
360
|
return takeObject(ret);
|
|
361
361
|
}
|
|
362
362
|
|
|
363
363
|
/**
|
|
364
|
-
* @param {string}
|
|
364
|
+
* @param {string} value
|
|
365
365
|
* @param {any} opts
|
|
366
366
|
* @returns {any}
|
|
367
367
|
*/
|
|
368
|
-
export function
|
|
368
|
+
export function mdxCompileSync(value, opts) {
|
|
369
369
|
try {
|
|
370
370
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
371
|
-
wasm.
|
|
371
|
+
wasm.mdxCompileSync(retptr, addHeapObject(value), addHeapObject(opts));
|
|
372
372
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
373
373
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
374
374
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -382,12 +382,12 @@ export function parseSync(s, opts) {
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
/**
|
|
385
|
-
* @param {string}
|
|
385
|
+
* @param {string} value
|
|
386
386
|
* @param {any} opts
|
|
387
387
|
* @returns {Promise<any>}
|
|
388
388
|
*/
|
|
389
|
-
export function
|
|
390
|
-
const ret = wasm.
|
|
389
|
+
export function mdxCompile(value, opts) {
|
|
390
|
+
const ret = wasm.mdxCompile(addHeapObject(value), addHeapObject(opts));
|
|
391
391
|
return takeObject(ret);
|
|
392
392
|
}
|
|
393
393
|
|
|
@@ -444,14 +444,6 @@ function getImports() {
|
|
|
444
444
|
const ret = getObject(arg0).value;
|
|
445
445
|
return addHeapObject(ret);
|
|
446
446
|
};
|
|
447
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
448
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
449
|
-
return addHeapObject(ret);
|
|
450
|
-
};
|
|
451
|
-
imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
|
|
452
|
-
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
453
|
-
return addHeapObject(ret);
|
|
454
|
-
}, arguments) };
|
|
455
447
|
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
456
448
|
const obj = getObject(arg1);
|
|
457
449
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
@@ -460,6 +452,14 @@ function getImports() {
|
|
|
460
452
|
getInt32Memory0()[arg0 / 4 + 1] = len0;
|
|
461
453
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
462
454
|
};
|
|
455
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
456
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
457
|
+
return addHeapObject(ret);
|
|
458
|
+
};
|
|
459
|
+
imports.wbg.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
|
|
460
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
461
|
+
return addHeapObject(ret);
|
|
462
|
+
}, arguments) };
|
|
463
463
|
imports.wbg.__wbg_new0_25059e40b1c02766 = function() {
|
|
464
464
|
const ret = new Date();
|
|
465
465
|
return addHeapObject(ret);
|
|
@@ -688,6 +688,31 @@ imports.wbg.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
|
|
|
688
688
|
const ret = getObject(arg0).length;
|
|
689
689
|
return ret;
|
|
690
690
|
};
|
|
691
|
+
imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
692
|
+
try {
|
|
693
|
+
var state0 = {a: arg0, b: arg1};
|
|
694
|
+
var cb0 = (arg0, arg1) => {
|
|
695
|
+
const a = state0.a;
|
|
696
|
+
state0.a = 0;
|
|
697
|
+
try {
|
|
698
|
+
return __wbg_adapter_114(a, state0.b, arg0, arg1);
|
|
699
|
+
} finally {
|
|
700
|
+
state0.a = a;
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
const ret = new Promise(cb0);
|
|
704
|
+
return addHeapObject(ret);
|
|
705
|
+
} finally {
|
|
706
|
+
state0.a = state0.b = 0;
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
imports.wbg.__wbg_new_f9876326328f45ed = function() {
|
|
710
|
+
const ret = new Object();
|
|
711
|
+
return addHeapObject(ret);
|
|
712
|
+
};
|
|
713
|
+
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
714
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
715
|
+
};
|
|
691
716
|
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
692
717
|
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
693
718
|
return ret;
|
|
@@ -714,31 +739,6 @@ imports.wbg.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
|
|
|
714
739
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
715
740
|
return ret;
|
|
716
741
|
};
|
|
717
|
-
imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
|
|
718
|
-
try {
|
|
719
|
-
var state0 = {a: arg0, b: arg1};
|
|
720
|
-
var cb0 = (arg0, arg1) => {
|
|
721
|
-
const a = state0.a;
|
|
722
|
-
state0.a = 0;
|
|
723
|
-
try {
|
|
724
|
-
return __wbg_adapter_114(a, state0.b, arg0, arg1);
|
|
725
|
-
} finally {
|
|
726
|
-
state0.a = a;
|
|
727
|
-
}
|
|
728
|
-
};
|
|
729
|
-
const ret = new Promise(cb0);
|
|
730
|
-
return addHeapObject(ret);
|
|
731
|
-
} finally {
|
|
732
|
-
state0.a = state0.b = 0;
|
|
733
|
-
}
|
|
734
|
-
};
|
|
735
|
-
imports.wbg.__wbg_new_f9876326328f45ed = function() {
|
|
736
|
-
const ret = new Object();
|
|
737
|
-
return addHeapObject(ret);
|
|
738
|
-
};
|
|
739
|
-
imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
|
|
740
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
741
|
-
};
|
|
742
742
|
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
743
743
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
744
744
|
};
|
|
@@ -759,8 +759,8 @@ imports.wbg.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
|
|
|
759
759
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
760
760
|
return addHeapObject(ret);
|
|
761
761
|
};
|
|
762
|
-
imports.wbg.
|
|
763
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
762
|
+
imports.wbg.__wbindgen_closure_wrapper22503 = function(arg0, arg1, arg2) {
|
|
763
|
+
const ret = makeMutClosure(arg0, arg1, 286, __wbg_adapter_48);
|
|
764
764
|
return addHeapObject(ret);
|
|
765
765
|
};
|
|
766
766
|
|
package/wasm_bg.wasm
CHANGED
|
Binary file
|