ferroreport 0.0.0-stage → 0.2.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.
@@ -0,0 +1,497 @@
1
+ /* @ts-self-types="./ferroreport.d.ts" */
2
+
3
+ /**
4
+ * Parses a template: `{ name, parameters, fields, warnings }`, where `warnings` lists what
5
+ * this engine does not support in it.
6
+ * @param {string} template
7
+ * @returns {any}
8
+ */
9
+ function inspect(template) {
10
+ const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
11
+ const len0 = WASM_VECTOR_LEN;
12
+ const ret = wasm.inspect(ptr0, len0);
13
+ if (ret[2]) {
14
+ throw takeFromExternrefTable0(ret[1]);
15
+ }
16
+ return takeFromExternrefTable0(ret[0]);
17
+ }
18
+ exports.inspect = inspect;
19
+
20
+ /**
21
+ * Renders a JRXML template to PDF.
22
+ *
23
+ * - `template`: the JRXML source.
24
+ * - `data`: rows (an array of objects) or JSON text.
25
+ * - `params`: report parameters (an object) or JSON text.
26
+ * - `options`: `{ locale?: string, now?: string | Date, resources?: { [path]: Uint8Array | string } }`.
27
+ * @param {string} template
28
+ * @param {any} data
29
+ * @param {any} params
30
+ * @param {any} options
31
+ * @returns {Uint8Array}
32
+ */
33
+ function render(template, data, params, options) {
34
+ const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
35
+ const len0 = WASM_VECTOR_LEN;
36
+ const ret = wasm.render(ptr0, len0, data, params, options);
37
+ if (ret[3]) {
38
+ throw takeFromExternrefTable0(ret[2]);
39
+ }
40
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
41
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
42
+ return v2;
43
+ }
44
+ exports.render = render;
45
+
46
+ /**
47
+ * Version of the engine.
48
+ * @returns {string}
49
+ */
50
+ function version() {
51
+ let deferred1_0;
52
+ let deferred1_1;
53
+ try {
54
+ const ret = wasm.version();
55
+ deferred1_0 = ret[0];
56
+ deferred1_1 = ret[1];
57
+ return getStringFromWasm0(ret[0], ret[1]);
58
+ } finally {
59
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
60
+ }
61
+ }
62
+ exports.version = version;
63
+ function __wbg_get_imports() {
64
+ const import0 = {
65
+ __proto__: null,
66
+ __wbg_Error_208446807d0d1e30: function(arg0, arg1) {
67
+ const ret = Error(getStringFromWasm0(arg0, arg1));
68
+ return ret;
69
+ },
70
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
71
+ const ret = String(arg1);
72
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
73
+ const len1 = WASM_VECTOR_LEN;
74
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
75
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
76
+ },
77
+ __wbg___wbindgen_bigint_get_as_i64_11da4b52cd0aedef: function(arg0, arg1) {
78
+ const v = arg1;
79
+ const ret = typeof(v) === 'bigint' ? v : undefined;
80
+ getDataViewMemory0().setBigInt64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
81
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
82
+ },
83
+ __wbg___wbindgen_boolean_get_4f1baf9a00be3c74: function(arg0) {
84
+ const v = arg0;
85
+ const ret = typeof(v) === 'boolean' ? v : undefined;
86
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
87
+ },
88
+ __wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
89
+ const ret = debugString(arg1);
90
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
91
+ const len1 = WASM_VECTOR_LEN;
92
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
93
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
94
+ },
95
+ __wbg___wbindgen_in_3f58a9d3b3a7eed2: function(arg0, arg1) {
96
+ const ret = arg0 in arg1;
97
+ return ret;
98
+ },
99
+ __wbg___wbindgen_is_bigint_5fa10641e039d3ef: function(arg0) {
100
+ const ret = typeof(arg0) === 'bigint';
101
+ return ret;
102
+ },
103
+ __wbg___wbindgen_is_function_741ff2bb612836f5: function(arg0) {
104
+ const ret = typeof(arg0) === 'function';
105
+ return ret;
106
+ },
107
+ __wbg___wbindgen_is_null_c22311b1cc228e3a: function(arg0) {
108
+ const ret = arg0 === null;
109
+ return ret;
110
+ },
111
+ __wbg___wbindgen_is_object_8b968c3ab8e96595: function(arg0) {
112
+ const val = arg0;
113
+ const ret = typeof(val) === 'object' && val !== null;
114
+ return ret;
115
+ },
116
+ __wbg___wbindgen_is_string_fc456fee5d3317de: function(arg0) {
117
+ const ret = typeof(arg0) === 'string';
118
+ return ret;
119
+ },
120
+ __wbg___wbindgen_is_undefined_be5b34249ff1fc15: function(arg0) {
121
+ const ret = arg0 === undefined;
122
+ return ret;
123
+ },
124
+ __wbg___wbindgen_jsval_eq_38d7bfbe4cc84039: function(arg0, arg1) {
125
+ const ret = arg0 === arg1;
126
+ return ret;
127
+ },
128
+ __wbg___wbindgen_jsval_loose_eq_b2f214e2e4b30e36: function(arg0, arg1) {
129
+ const ret = arg0 == arg1;
130
+ return ret;
131
+ },
132
+ __wbg___wbindgen_number_get_934b640d0889af78: function(arg0, arg1) {
133
+ const obj = arg1;
134
+ const ret = typeof(obj) === 'number' ? obj : undefined;
135
+ getDataViewMemory0().setFloat64((arg0 >>> 0) + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
136
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, !isLikeNone(ret), true);
137
+ },
138
+ __wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
139
+ const obj = arg1;
140
+ const ret = typeof(obj) === 'string' ? obj : undefined;
141
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
142
+ var len1 = WASM_VECTOR_LEN;
143
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
144
+ getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
145
+ },
146
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
147
+ throw new Error(getStringFromWasm0(arg0, arg1));
148
+ },
149
+ __wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
150
+ const ret = arg0.call(arg1);
151
+ return ret;
152
+ }, arguments); },
153
+ __wbg_done_57e08d0be6e30c02: function(arg0) {
154
+ const ret = arg0.done;
155
+ return ret;
156
+ },
157
+ __wbg_entries_7bb1459bd9b5c2b9: function(arg0) {
158
+ const ret = Object.entries(arg0);
159
+ return ret;
160
+ },
161
+ __wbg_from_eac91875c8a5ffa4: function(arg0) {
162
+ const ret = Array.from(arg0);
163
+ return ret;
164
+ },
165
+ __wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
166
+ const ret = Reflect.get(arg0, arg1);
167
+ return ret;
168
+ }, arguments); },
169
+ __wbg_get_635eea311fa1a291: function() { return handleError(function (arg0, arg1) {
170
+ const ret = Reflect.get(arg0, arg1);
171
+ return ret;
172
+ }, arguments); },
173
+ __wbg_get_d7176cfb76d71114: function(arg0, arg1) {
174
+ const ret = arg0[arg1 >>> 0];
175
+ return ret;
176
+ },
177
+ __wbg_get_unchecked_e6325ad374eff861: function(arg0, arg1) {
178
+ const ret = arg0[arg1 >>> 0];
179
+ return ret;
180
+ },
181
+ __wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
182
+ let result;
183
+ try {
184
+ result = arg0 instanceof ArrayBuffer;
185
+ } catch (_) {
186
+ result = false;
187
+ }
188
+ const ret = result;
189
+ return ret;
190
+ },
191
+ __wbg_instanceof_Date_99b6a345bf39e8f4: function(arg0) {
192
+ let result;
193
+ try {
194
+ result = arg0 instanceof Date;
195
+ } catch (_) {
196
+ result = false;
197
+ }
198
+ const ret = result;
199
+ return ret;
200
+ },
201
+ __wbg_instanceof_Map_0b4fc8b62e73f163: function(arg0) {
202
+ let result;
203
+ try {
204
+ result = arg0 instanceof Map;
205
+ } catch (_) {
206
+ result = false;
207
+ }
208
+ const ret = result;
209
+ return ret;
210
+ },
211
+ __wbg_instanceof_Uint8Array_d7aeb0dcb3108fea: function(arg0) {
212
+ let result;
213
+ try {
214
+ result = arg0 instanceof Uint8Array;
215
+ } catch (_) {
216
+ result = false;
217
+ }
218
+ const ret = result;
219
+ return ret;
220
+ },
221
+ __wbg_isArray_bcf1376d0d732d08: function(arg0) {
222
+ const ret = Array.isArray(arg0);
223
+ return ret;
224
+ },
225
+ __wbg_isSafeInteger_1a35ba4d31e71d38: function(arg0) {
226
+ const ret = Number.isSafeInteger(arg0);
227
+ return ret;
228
+ },
229
+ __wbg_iterator_e4c5e8f68ada7b58: function() {
230
+ const ret = Symbol.iterator;
231
+ return ret;
232
+ },
233
+ __wbg_length_186163212ffe79c3: function(arg0) {
234
+ const ret = arg0.length;
235
+ return ret;
236
+ },
237
+ __wbg_length_b03a0fabb109b1e9: function(arg0) {
238
+ const ret = arg0.length;
239
+ return ret;
240
+ },
241
+ __wbg_new_0_36d738a0c8cfac43: function() {
242
+ const ret = new Date();
243
+ return ret;
244
+ },
245
+ __wbg_new_13de428334042d26: function(arg0) {
246
+ const ret = new Uint8Array(arg0);
247
+ return ret;
248
+ },
249
+ __wbg_new_37eb45aaf5eeb820: function() {
250
+ const ret = new Array();
251
+ return ret;
252
+ },
253
+ __wbg_new_7075786089b89c5e: function() {
254
+ const ret = new Map();
255
+ return ret;
256
+ },
257
+ __wbg_new_cd4348290afae586: function() {
258
+ const ret = new Object();
259
+ return ret;
260
+ },
261
+ __wbg_next_178c1651c11432b3: function(arg0) {
262
+ const ret = arg0.next;
263
+ return ret;
264
+ },
265
+ __wbg_next_af5ac6a08bb0a717: function() { return handleError(function (arg0) {
266
+ const ret = arg0.next();
267
+ return ret;
268
+ }, arguments); },
269
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
270
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
271
+ },
272
+ __wbg_set_8282f7e0d2d01336: function(arg0, arg1, arg2) {
273
+ const ret = arg0.set(arg1, arg2);
274
+ return ret;
275
+ },
276
+ __wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
277
+ arg0[arg1 >>> 0] = arg2;
278
+ },
279
+ __wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
280
+ arg0[arg1] = arg2;
281
+ },
282
+ __wbg_toISOString_51ebc75332aba76a: function(arg0) {
283
+ const ret = arg0.toISOString();
284
+ return ret;
285
+ },
286
+ __wbg_value_e0f328965e184931: function(arg0) {
287
+ const ret = arg0.value;
288
+ return ret;
289
+ },
290
+ __wbindgen_generic_0000000000000001: function(arg0) {
291
+ // Cast intrinsic for `F64 -> Externref`.
292
+ const ret = arg0;
293
+ return ret;
294
+ },
295
+ __wbindgen_generic_0000000000000002: function(arg0) {
296
+ // Cast intrinsic for `I64 -> Externref`.
297
+ const ret = arg0;
298
+ return ret;
299
+ },
300
+ __wbindgen_generic_0000000000000003: function(arg0, arg1) {
301
+ // Cast intrinsic for `Ref(String) -> Externref`.
302
+ const ret = getStringFromWasm0(arg0, arg1);
303
+ return ret;
304
+ },
305
+ __wbindgen_generic_0000000000000004: function(arg0) {
306
+ // Cast intrinsic for `U64 -> Externref`.
307
+ const ret = BigInt.asUintN(64, arg0);
308
+ return ret;
309
+ },
310
+ __wbindgen_init_externref_table: function() {
311
+ const table = wasm.__wbindgen_externrefs;
312
+ table.set(0, undefined);
313
+ table.set(1024, undefined);
314
+ table.set(1025, null);
315
+ table.set(1026, true);
316
+ table.set(1027, false);
317
+ },
318
+ };
319
+ return {
320
+ __proto__: null,
321
+ "./ferroreport_bg.js": import0,
322
+ };
323
+ }
324
+
325
+ function addToExternrefTable0(obj) {
326
+ const idx = wasm.__externref_table_alloc();
327
+ wasm.__wbindgen_externrefs.set(idx, obj);
328
+ return idx;
329
+ }
330
+
331
+ function debugString(val) {
332
+ switch (typeof val) {
333
+ // primitive types
334
+ case 'number':
335
+ case 'boolean':
336
+ case 'undefined':
337
+ return `${val}`;
338
+ case 'string':
339
+ return JSON.stringify(val);
340
+ case 'bigint':
341
+ return `${val}n`;
342
+ case 'symbol':
343
+ return val.description !== undefined
344
+ ? `Symbol(${val.description})`
345
+ : 'Symbol';
346
+ case 'function':
347
+ return typeof val.name === 'string' && val.name !== ''
348
+ ? `Function(${val.name})`
349
+ : 'Function';
350
+ case 'object': {
351
+ if (val === null) {
352
+ return 'null';
353
+ }
354
+ // objects
355
+ if (Array.isArray(val)) {
356
+ return '[' + Array.from(val, debugString).join(', ') + ']';
357
+ }
358
+ // errors
359
+ if (val instanceof Error) {
360
+ return `${val.name}: ${val.message}\n${val.stack}`;
361
+ }
362
+
363
+ const toStringOutput = toString.call(val);
364
+ // Test for built-in
365
+ const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
366
+
367
+ // Failed to match the standard '[object ClassName]'
368
+ if (className === undefined) {
369
+ return toStringOutput;
370
+ }
371
+ if (className === 'Object') {
372
+ // we're a user defined class or Object
373
+ // JSON.stringify avoids problems with cycles, and is generally much
374
+ // easier than looping through ownProperties of `val`.
375
+ try {
376
+ return 'Object(' + JSON.stringify(val) + ')';
377
+ } catch (_) {
378
+ return 'Object';
379
+ }
380
+ }
381
+ // TODO we could test for more things here, like `Set`s and `Map`s.
382
+ return className;
383
+ }
384
+ // Per MDN: 'This list of values is exhaustive.'
385
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
386
+ }
387
+ }
388
+
389
+ function getArrayU8FromWasm0(ptr, len) {
390
+ ptr = ptr >>> 0;
391
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
392
+ }
393
+
394
+ let cachedDataViewMemory0 = null;
395
+ function getDataViewMemory0() {
396
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
397
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
398
+ }
399
+ return cachedDataViewMemory0;
400
+ }
401
+
402
+ function getStringFromWasm0(ptr, len) {
403
+ ptr = ptr >>> 0;
404
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
405
+ }
406
+
407
+ let cachedUint8ArrayMemory0 = null;
408
+ function getUint8ArrayMemory0() {
409
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
410
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
411
+ }
412
+ return cachedUint8ArrayMemory0;
413
+ }
414
+
415
+ function handleError(f, args) {
416
+ try {
417
+ return f.apply(this, args);
418
+ } catch (e) {
419
+ const idx = addToExternrefTable0(e);
420
+ wasm.__wbindgen_exn_store(idx);
421
+ }
422
+ }
423
+
424
+ function isLikeNone(x) {
425
+ return x === undefined || x === null;
426
+ }
427
+
428
+ function passStringToWasm0(arg, malloc, realloc) {
429
+ if (realloc === undefined) {
430
+ const buf = cachedTextEncoder.encode(arg);
431
+ const ptr = malloc(buf.length, 1) >>> 0;
432
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
433
+ WASM_VECTOR_LEN = buf.length;
434
+ return ptr;
435
+ }
436
+
437
+ let len = arg.length;
438
+ let ptr = malloc(len, 1) >>> 0;
439
+
440
+ const mem = getUint8ArrayMemory0();
441
+
442
+ let offset = 0;
443
+
444
+ for (; offset < len; offset++) {
445
+ const code = arg.charCodeAt(offset);
446
+ if (code > 0x7F) break;
447
+ mem[ptr + offset] = code;
448
+ }
449
+ if (offset !== len) {
450
+ if (offset !== 0) {
451
+ arg = arg.slice(offset);
452
+ }
453
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
454
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
455
+ const ret = cachedTextEncoder.encodeInto(arg, view);
456
+
457
+ offset += ret.written;
458
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
459
+ }
460
+
461
+ WASM_VECTOR_LEN = offset;
462
+ return ptr;
463
+ }
464
+
465
+ function takeFromExternrefTable0(idx) {
466
+ const value = wasm.__wbindgen_externrefs.get(idx);
467
+ wasm.__externref_table_dealloc(idx);
468
+ return value;
469
+ }
470
+
471
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
472
+ cachedTextDecoder.decode();
473
+ function decodeText(bytes) {
474
+ return cachedTextDecoder.decode(bytes);
475
+ }
476
+
477
+ const cachedTextEncoder = new TextEncoder();
478
+
479
+ if (!('encodeInto' in cachedTextEncoder)) {
480
+ cachedTextEncoder.encodeInto = function (arg, view) {
481
+ const buf = cachedTextEncoder.encode(arg);
482
+ view.set(buf);
483
+ return {
484
+ read: arg.length,
485
+ written: buf.length
486
+ };
487
+ };
488
+ }
489
+
490
+ let WASM_VECTOR_LEN = 0;
491
+
492
+ const wasmPath = `${__dirname}/ferroreport_bg.wasm`;
493
+ const wasmBytes = require('fs').readFileSync(wasmPath);
494
+ const wasmModule = new WebAssembly.Module(wasmBytes);
495
+ let wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
496
+ let wasm = wasmInstance.exports;
497
+ wasm.__wbindgen_start();
Binary file
@@ -0,0 +1,14 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const inspect: (a: number, b: number) => [number, number, number];
5
+ export const render: (a: number, b: number, c: any, d: any, e: any) => [number, number, number, number];
6
+ export const version: () => [number, number];
7
+ export const __wbindgen_malloc: (a: number, b: number) => number;
8
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
9
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
10
+ export const __wbindgen_exn_store: (a: number) => void;
11
+ export const __externref_table_alloc: () => number;
12
+ export const __wbindgen_externrefs: WebAssembly.Table;
13
+ export const __externref_table_dealloc: (a: number) => void;
14
+ export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "ferroreport",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "The fastest JasperReports engine: render JRXML templates to PDF in milliseconds from Node.js, Deno, Bun and browsers. No JVM, pixel-identical output, safe with untrusted templates.",
5
+ "license": "MIT OR Apache-2.0",
6
+ "author": "Cristian Encarnacion",
7
+ "homepage": "https://cristianencarnacion.github.io/ferroreport/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/cristianEncarnacion/ferroreport.git",
11
+ "directory": "bindings/wasm"
12
+ },
13
+ "bugs": "https://github.com/cristianEncarnacion/ferroreport/issues",
14
+ "keywords": ["jasperreports", "jrxml", "pdf", "report", "reporting", "invoice", "pdf-generation", "charts", "qrcode", "wasm", "fast"],
15
+ "main": "./node/ferroreport.js",
16
+ "types": "./node/ferroreport.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "node": {
20
+ "types": "./node/ferroreport.d.ts",
21
+ "default": "./node/ferroreport.js"
22
+ },
23
+ "default": {
24
+ "types": "./web/ferroreport.d.ts",
25
+ "default": "./web/ferroreport.js"
26
+ }
27
+ }
28
+ },
29
+ "files": ["node/", "web/", "README.md", "LICENSE-MIT", "LICENSE-APACHE"],
30
+ "sideEffects": false,
31
+ "engines": { "node": ">=18" }
32
+ }
@@ -0,0 +1,62 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Parses a template: `{ name, parameters, fields, warnings }`, where `warnings` lists what
6
+ * this engine does not support in it.
7
+ */
8
+ export function inspect(template: string): any;
9
+
10
+ /**
11
+ * Renders a JRXML template to PDF.
12
+ *
13
+ * - `template`: the JRXML source.
14
+ * - `data`: rows (an array of objects) or JSON text.
15
+ * - `params`: report parameters (an object) or JSON text.
16
+ * - `options`: `{ locale?: string, now?: string | Date, resources?: { [path]: Uint8Array | string } }`.
17
+ */
18
+ export function render(template: string, data: any, params: any, options: any): Uint8Array;
19
+
20
+ /**
21
+ * Version of the engine.
22
+ */
23
+ export function version(): string;
24
+
25
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
26
+
27
+ export interface InitOutput {
28
+ readonly memory: WebAssembly.Memory;
29
+ readonly inspect: (a: number, b: number) => [number, number, number];
30
+ readonly render: (a: number, b: number, c: any, d: any, e: any) => [number, number, number, number];
31
+ readonly version: () => [number, number];
32
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
33
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
34
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
35
+ readonly __wbindgen_exn_store: (a: number) => void;
36
+ readonly __externref_table_alloc: () => number;
37
+ readonly __wbindgen_externrefs: WebAssembly.Table;
38
+ readonly __externref_table_dealloc: (a: number) => void;
39
+ readonly __wbindgen_start: () => void;
40
+ }
41
+
42
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
43
+
44
+ /**
45
+ * Instantiates the given `module`, which can either be bytes or
46
+ * a precompiled `WebAssembly.Module`.
47
+ *
48
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
49
+ *
50
+ * @returns {InitOutput}
51
+ */
52
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
53
+
54
+ /**
55
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
56
+ * for everything else, calls `WebAssembly.instantiate` directly.
57
+ *
58
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
59
+ *
60
+ * @returns {Promise<InitOutput>}
61
+ */
62
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;