@next/swc-wasm-web 16.0.3 → 16.1.0-canary.0

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,12 +1,13 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-web",
3
- "version": "16.0.3",
3
+ "type": "module",
4
+ "version": "16.1.0-canary.0",
4
5
  "files": [
5
6
  "wasm_bg.wasm",
6
7
  "wasm.js",
7
8
  "wasm.d.ts"
8
9
  ],
9
- "module": "wasm.js",
10
+ "main": "wasm.js",
10
11
  "types": "wasm.d.ts",
11
12
  "sideEffects": [
12
13
  "./snippets/*"
package/wasm.d.ts CHANGED
@@ -1,28 +1,28 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
+ export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
4
+ export function transform(s: any, opts: any): Promise<any>;
3
5
  export function transformSync(s: any, opts: any): any;
4
6
  export function parseSync(s: string, opts: any): any;
5
7
  export function minify(s: string, opts: any): Promise<any>;
6
- export function expandNextJsTemplate(content: Uint8Array, template_path: string, next_package_dir_path: string, replacements: any, injections: any, imports: any): string;
7
- export function parse(s: string, opts: any): Promise<any>;
8
8
  export function minifySync(s: string, opts: any): any;
9
- export function transform(s: any, opts: any): Promise<any>;
10
- export function mdxCompile(value: string, opts: any): Promise<any>;
9
+ export function parse(s: string, opts: any): Promise<any>;
11
10
  export function mdxCompileSync(value: string, opts: any): any;
11
+ export function mdxCompile(value: string, opts: any): Promise<any>;
12
12
 
13
13
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
14
14
 
15
15
  export interface InitOutput {
16
16
  readonly memory: WebAssembly.Memory;
17
17
  readonly expandNextJsTemplate: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: any, i: any) => [number, number, number, number];
18
+ readonly mdxCompile: (a: any, b: any) => any;
19
+ readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
18
20
  readonly minify: (a: any, b: any) => any;
19
21
  readonly minifySync: (a: any, b: any) => [number, number, number];
20
22
  readonly parse: (a: any, b: any) => any;
21
23
  readonly parseSync: (a: any, b: any) => [number, number, number];
22
24
  readonly transform: (a: any, b: any) => any;
23
25
  readonly transformSync: (a: any, b: any) => [number, number, number];
24
- readonly mdxCompile: (a: any, b: any) => any;
25
- readonly mdxCompileSync: (a: any, b: any) => [number, number, number];
26
26
  readonly __wbindgen_malloc: (a: number, b: number) => number;
27
27
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
28
28
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -31,8 +31,8 @@ export interface InitOutput {
31
31
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
32
32
  readonly __wbindgen_export_6: WebAssembly.Table;
33
33
  readonly __externref_table_dealloc: (a: number) => void;
34
- readonly closure1163_externref_shim: (a: number, b: number, c: any) => void;
35
- readonly closure124_externref_shim: (a: number, b: number, c: any, d: any) => void;
34
+ readonly closure1165_externref_shim: (a: number, b: number, c: any) => void;
35
+ readonly closure126_externref_shim: (a: number, b: number, c: any, d: any) => void;
36
36
  readonly __wbindgen_start: () => void;
37
37
  }
38
38
 
package/wasm.js CHANGED
@@ -213,53 +213,18 @@ function debugString(val) {
213
213
  return className;
214
214
  }
215
215
 
216
- function takeFromExternrefTable0(idx) {
217
- const value = wasm.__wbindgen_export_4.get(idx);
218
- wasm.__externref_table_dealloc(idx);
219
- return value;
220
- }
221
- /**
222
- * @param {any} s
223
- * @param {any} opts
224
- * @returns {any}
225
- */
226
- export function transformSync(s, opts) {
227
- const ret = wasm.transformSync(s, opts);
228
- if (ret[2]) {
229
- throw takeFromExternrefTable0(ret[1]);
230
- }
231
- return takeFromExternrefTable0(ret[0]);
232
- }
233
-
234
- /**
235
- * @param {string} s
236
- * @param {any} opts
237
- * @returns {any}
238
- */
239
- export function parseSync(s, opts) {
240
- const ret = wasm.parseSync(s, opts);
241
- if (ret[2]) {
242
- throw takeFromExternrefTable0(ret[1]);
243
- }
244
- return takeFromExternrefTable0(ret[0]);
245
- }
246
-
247
- /**
248
- * @param {string} s
249
- * @param {any} opts
250
- * @returns {Promise<any>}
251
- */
252
- export function minify(s, opts) {
253
- const ret = wasm.minify(s, opts);
254
- return ret;
255
- }
256
-
257
216
  function passArray8ToWasm0(arg, malloc) {
258
217
  const ptr = malloc(arg.length * 1, 1) >>> 0;
259
218
  getUint8ArrayMemory0().set(arg, ptr / 1);
260
219
  WASM_VECTOR_LEN = arg.length;
261
220
  return ptr;
262
221
  }
222
+
223
+ function takeFromExternrefTable0(idx) {
224
+ const value = wasm.__wbindgen_export_4.get(idx);
225
+ wasm.__externref_table_dealloc(idx);
226
+ return value;
227
+ }
263
228
  /**
264
229
  * @param {Uint8Array} content
265
230
  * @param {string} template_path
@@ -286,22 +251,35 @@ export function expandNextJsTemplate(content, template_path, next_package_dir_pa
286
251
  }
287
252
 
288
253
  /**
289
- * @param {string} s
254
+ * @param {any} s
290
255
  * @param {any} opts
291
256
  * @returns {Promise<any>}
292
257
  */
293
- export function parse(s, opts) {
294
- const ret = wasm.parse(s, opts);
258
+ export function transform(s, opts) {
259
+ const ret = wasm.transform(s, opts);
295
260
  return ret;
296
261
  }
297
262
 
263
+ /**
264
+ * @param {any} s
265
+ * @param {any} opts
266
+ * @returns {any}
267
+ */
268
+ export function transformSync(s, opts) {
269
+ const ret = wasm.transformSync(s, opts);
270
+ if (ret[2]) {
271
+ throw takeFromExternrefTable0(ret[1]);
272
+ }
273
+ return takeFromExternrefTable0(ret[0]);
274
+ }
275
+
298
276
  /**
299
277
  * @param {string} s
300
278
  * @param {any} opts
301
279
  * @returns {any}
302
280
  */
303
- export function minifySync(s, opts) {
304
- const ret = wasm.minifySync(s, opts);
281
+ export function parseSync(s, opts) {
282
+ const ret = wasm.parseSync(s, opts);
305
283
  if (ret[2]) {
306
284
  throw takeFromExternrefTable0(ret[1]);
307
285
  }
@@ -309,22 +287,35 @@ export function minifySync(s, opts) {
309
287
  }
310
288
 
311
289
  /**
312
- * @param {any} s
290
+ * @param {string} s
313
291
  * @param {any} opts
314
292
  * @returns {Promise<any>}
315
293
  */
316
- export function transform(s, opts) {
317
- const ret = wasm.transform(s, opts);
294
+ export function minify(s, opts) {
295
+ const ret = wasm.minify(s, opts);
318
296
  return ret;
319
297
  }
320
298
 
321
299
  /**
322
- * @param {string} value
300
+ * @param {string} s
301
+ * @param {any} opts
302
+ * @returns {any}
303
+ */
304
+ export function minifySync(s, opts) {
305
+ const ret = wasm.minifySync(s, opts);
306
+ if (ret[2]) {
307
+ throw takeFromExternrefTable0(ret[1]);
308
+ }
309
+ return takeFromExternrefTable0(ret[0]);
310
+ }
311
+
312
+ /**
313
+ * @param {string} s
323
314
  * @param {any} opts
324
315
  * @returns {Promise<any>}
325
316
  */
326
- export function mdxCompile(value, opts) {
327
- const ret = wasm.mdxCompile(value, opts);
317
+ export function parse(s, opts) {
318
+ const ret = wasm.parse(s, opts);
328
319
  return ret;
329
320
  }
330
321
 
@@ -341,12 +332,22 @@ export function mdxCompileSync(value, opts) {
341
332
  return takeFromExternrefTable0(ret[0]);
342
333
  }
343
334
 
335
+ /**
336
+ * @param {string} value
337
+ * @param {any} opts
338
+ * @returns {Promise<any>}
339
+ */
340
+ export function mdxCompile(value, opts) {
341
+ const ret = wasm.mdxCompile(value, opts);
342
+ return ret;
343
+ }
344
+
344
345
  function __wbg_adapter_50(arg0, arg1, arg2) {
345
- wasm.closure1163_externref_shim(arg0, arg1, arg2);
346
+ wasm.closure1165_externref_shim(arg0, arg1, arg2);
346
347
  }
347
348
 
348
349
  function __wbg_adapter_79(arg0, arg1, arg2, arg3) {
349
- wasm.closure124_externref_shim(arg0, arg1, arg2, arg3);
350
+ wasm.closure126_externref_shim(arg0, arg1, arg2, arg3);
350
351
  }
351
352
 
352
353
  async function __wbg_load(module, imports) {
@@ -533,13 +534,13 @@ function __wbg_get_imports() {
533
534
  const ret = arg0.next();
534
535
  return ret;
535
536
  }, arguments) };
536
- imports.wbg.__wbg_queueMicrotask_6c22d88054515cb4 = function(arg0) {
537
+ imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
538
+ queueMicrotask(arg0);
539
+ };
540
+ imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
537
541
  const ret = arg0.queueMicrotask;
538
542
  return ret;
539
543
  };
540
- imports.wbg.__wbg_queueMicrotask_b81e3a75ab81ca62 = function(arg0) {
541
- queueMicrotask(arg0);
542
- };
543
544
  imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
544
545
  const ret = Promise.resolve(arg0);
545
546
  return ret;
@@ -612,8 +613,8 @@ function __wbg_get_imports() {
612
613
  const ret = false;
613
614
  return ret;
614
615
  };
615
- imports.wbg.__wbindgen_closure_wrapper23888 = function(arg0, arg1, arg2) {
616
- const ret = makeMutClosure(arg0, arg1, 1164, __wbg_adapter_50);
616
+ imports.wbg.__wbindgen_closure_wrapper23640 = function(arg0, arg1, arg2) {
617
+ const ret = makeMutClosure(arg0, arg1, 1166, __wbg_adapter_50);
617
618
  return ret;
618
619
  };
619
620
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
package/wasm_bg.wasm CHANGED
Binary file