@next/swc-wasm-web 14.0.5-canary.39 → 14.0.5-canary.40

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": "@next/swc-wasm-web",
3
- "version": "14.0.5-canary.39",
3
+ "version": "14.0.5-canary.40",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.d.ts CHANGED
@@ -1,6 +1,18 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ * @param {string} value
5
+ * @param {any} opts
6
+ * @returns {any}
7
+ */
8
+ export function mdxCompileSync(value: string, opts: any): any;
9
+ /**
10
+ * @param {string} value
11
+ * @param {any} opts
12
+ * @returns {Promise<any>}
13
+ */
14
+ export function mdxCompile(value: string, opts: any): Promise<any>;
15
+ /**
4
16
  * @param {string} s
5
17
  * @param {any} opts
6
18
  * @returns {any}
@@ -36,31 +48,19 @@ export function parseSync(s: string, opts: any): any;
36
48
  * @returns {Promise<any>}
37
49
  */
38
50
  export function parse(s: string, opts: any): Promise<any>;
39
- /**
40
- * @param {string} value
41
- * @param {any} opts
42
- * @returns {any}
43
- */
44
- export function mdxCompileSync(value: string, opts: any): any;
45
- /**
46
- * @param {string} value
47
- * @param {any} opts
48
- * @returns {Promise<any>}
49
- */
50
- export function mdxCompile(value: string, opts: any): Promise<any>;
51
51
 
52
52
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
53
53
 
54
54
  export interface InitOutput {
55
55
  readonly memory: WebAssembly.Memory;
56
+ readonly mdxCompileSync: (a: number, b: number, c: number) => void;
57
+ readonly mdxCompile: (a: number, b: number) => number;
56
58
  readonly minifySync: (a: number, b: number, c: number) => void;
57
59
  readonly minify: (a: number, b: number) => number;
58
60
  readonly transformSync: (a: number, b: number, c: number) => void;
59
61
  readonly transform: (a: number, b: number) => number;
60
62
  readonly parseSync: (a: number, b: number, c: number) => void;
61
63
  readonly parse: (a: number, b: number) => number;
62
- readonly mdxCompileSync: (a: number, b: number, c: number) => void;
63
- readonly mdxCompile: (a: number, b: number) => number;
64
64
  readonly __wbindgen_malloc: (a: number) => number;
65
65
  readonly __wbindgen_realloc: (a: number, b: number, c: number) => number;
66
66
  readonly __wbindgen_export_2: WebAssembly.Table;
package/wasm.js CHANGED
@@ -245,14 +245,14 @@ function __wbg_adapter_109(arg0, arg1, arg2, arg3) {
245
245
  }
246
246
 
247
247
  /**
248
- * @param {string} s
248
+ * @param {string} value
249
249
  * @param {any} opts
250
250
  * @returns {any}
251
251
  */
252
- export function minifySync(s, opts) {
252
+ export function mdxCompileSync(value, opts) {
253
253
  try {
254
254
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
255
- wasm.minifySync(retptr, addHeapObject(s), addHeapObject(opts));
255
+ wasm.mdxCompileSync(retptr, addHeapObject(value), addHeapObject(opts));
256
256
  var r0 = getInt32Memory0()[retptr / 4 + 0];
257
257
  var r1 = getInt32Memory0()[retptr / 4 + 1];
258
258
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -266,24 +266,24 @@ export function minifySync(s, opts) {
266
266
  }
267
267
 
268
268
  /**
269
- * @param {string} s
269
+ * @param {string} value
270
270
  * @param {any} opts
271
271
  * @returns {Promise<any>}
272
272
  */
273
- export function minify(s, opts) {
274
- const ret = wasm.minify(addHeapObject(s), addHeapObject(opts));
273
+ export function mdxCompile(value, opts) {
274
+ const ret = wasm.mdxCompile(addHeapObject(value), addHeapObject(opts));
275
275
  return takeObject(ret);
276
276
  }
277
277
 
278
278
  /**
279
- * @param {any} s
279
+ * @param {string} s
280
280
  * @param {any} opts
281
281
  * @returns {any}
282
282
  */
283
- export function transformSync(s, opts) {
283
+ export function minifySync(s, opts) {
284
284
  try {
285
285
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
286
- wasm.transformSync(retptr, addHeapObject(s), addHeapObject(opts));
286
+ wasm.minifySync(retptr, addHeapObject(s), addHeapObject(opts));
287
287
  var r0 = getInt32Memory0()[retptr / 4 + 0];
288
288
  var r1 = getInt32Memory0()[retptr / 4 + 1];
289
289
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -297,24 +297,24 @@ export function transformSync(s, opts) {
297
297
  }
298
298
 
299
299
  /**
300
- * @param {any} s
300
+ * @param {string} s
301
301
  * @param {any} opts
302
302
  * @returns {Promise<any>}
303
303
  */
304
- export function transform(s, opts) {
305
- const ret = wasm.transform(addHeapObject(s), addHeapObject(opts));
304
+ export function minify(s, opts) {
305
+ const ret = wasm.minify(addHeapObject(s), addHeapObject(opts));
306
306
  return takeObject(ret);
307
307
  }
308
308
 
309
309
  /**
310
- * @param {string} s
310
+ * @param {any} s
311
311
  * @param {any} opts
312
312
  * @returns {any}
313
313
  */
314
- export function parseSync(s, opts) {
314
+ export function transformSync(s, opts) {
315
315
  try {
316
316
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
317
- wasm.parseSync(retptr, addHeapObject(s), addHeapObject(opts));
317
+ wasm.transformSync(retptr, addHeapObject(s), addHeapObject(opts));
318
318
  var r0 = getInt32Memory0()[retptr / 4 + 0];
319
319
  var r1 = getInt32Memory0()[retptr / 4 + 1];
320
320
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -328,24 +328,24 @@ export function parseSync(s, opts) {
328
328
  }
329
329
 
330
330
  /**
331
- * @param {string} s
331
+ * @param {any} s
332
332
  * @param {any} opts
333
333
  * @returns {Promise<any>}
334
334
  */
335
- export function parse(s, opts) {
336
- const ret = wasm.parse(addHeapObject(s), addHeapObject(opts));
335
+ export function transform(s, opts) {
336
+ const ret = wasm.transform(addHeapObject(s), addHeapObject(opts));
337
337
  return takeObject(ret);
338
338
  }
339
339
 
340
340
  /**
341
- * @param {string} value
341
+ * @param {string} s
342
342
  * @param {any} opts
343
343
  * @returns {any}
344
344
  */
345
- export function mdxCompileSync(value, opts) {
345
+ export function parseSync(s, opts) {
346
346
  try {
347
347
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
348
- wasm.mdxCompileSync(retptr, addHeapObject(value), addHeapObject(opts));
348
+ wasm.parseSync(retptr, addHeapObject(s), addHeapObject(opts));
349
349
  var r0 = getInt32Memory0()[retptr / 4 + 0];
350
350
  var r1 = getInt32Memory0()[retptr / 4 + 1];
351
351
  var r2 = getInt32Memory0()[retptr / 4 + 2];
@@ -359,12 +359,12 @@ export function mdxCompileSync(value, opts) {
359
359
  }
360
360
 
361
361
  /**
362
- * @param {string} value
362
+ * @param {string} s
363
363
  * @param {any} opts
364
364
  * @returns {Promise<any>}
365
365
  */
366
- export function mdxCompile(value, opts) {
367
- const ret = wasm.mdxCompile(addHeapObject(value), addHeapObject(opts));
366
+ export function parse(s, opts) {
367
+ const ret = wasm.parse(addHeapObject(s), addHeapObject(opts));
368
368
  return takeObject(ret);
369
369
  }
370
370
 
@@ -677,20 +677,6 @@ imports.wbg.__wbg_getwithrefkey_15c62c2b8546208d = function(arg0, arg1) {
677
677
  const ret = getObject(arg0)[getObject(arg1)];
678
678
  return addHeapObject(ret);
679
679
  };
680
- imports.wbg.__wbg_new_f9876326328f45ed = function() {
681
- const ret = new Object();
682
- return addHeapObject(ret);
683
- };
684
- imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
685
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
686
- };
687
- imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
688
- const ret = debugString(getObject(arg1));
689
- const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
690
- const len0 = WASM_VECTOR_LEN;
691
- getInt32Memory0()[arg0 / 4 + 1] = len0;
692
- getInt32Memory0()[arg0 / 4 + 0] = ptr0;
693
- };
694
680
  imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
695
681
  try {
696
682
  var state0 = {a: arg0, b: arg1};
@@ -709,6 +695,20 @@ imports.wbg.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
709
695
  state0.a = state0.b = 0;
710
696
  }
711
697
  };
698
+ imports.wbg.__wbg_new_f9876326328f45ed = function() {
699
+ const ret = new Object();
700
+ return addHeapObject(ret);
701
+ };
702
+ imports.wbg.__wbg_set_20cbc34131e76824 = function(arg0, arg1, arg2) {
703
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
704
+ };
705
+ imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
706
+ const ret = debugString(getObject(arg1));
707
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
708
+ const len0 = WASM_VECTOR_LEN;
709
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
710
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
711
+ };
712
712
  imports.wbg.__wbindgen_throw = function(arg0, arg1) {
713
713
  throw new Error(getStringFromWasm0(arg0, arg1));
714
714
  };
@@ -729,7 +729,7 @@ imports.wbg.__wbindgen_cb_drop = function(arg0) {
729
729
  const ret = false;
730
730
  return ret;
731
731
  };
732
- imports.wbg.__wbindgen_closure_wrapper23905 = function(arg0, arg1, arg2) {
732
+ imports.wbg.__wbindgen_closure_wrapper23892 = function(arg0, arg1, arg2) {
733
733
  const ret = makeMutClosure(arg0, arg1, 361, __wbg_adapter_48);
734
734
  return addHeapObject(ret);
735
735
  };
package/wasm_bg.wasm CHANGED
Binary file