@wasm-fmt/web_fmt 0.1.12 → 0.1.14
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/jsr.jsonc +1 -1
- package/package.json +1 -1
- package/wasm-fmt-web_fmt-0.1.14.tgz +0 -0
- package/web_fmt.d.ts +22 -51
- package/web_fmt.js +208 -208
- package/web_fmt_bg.wasm +0 -0
- package/web_fmt_bg.wasm.d.ts +10 -10
- package/web_fmt_node.js +1 -1
- package/web_fmt_vite.js +1 -1
- package/wasm-fmt-web_fmt-0.1.12.tgz +0 -0
package/jsr.jsonc
CHANGED
package/package.json
CHANGED
|
Binary file
|
package/web_fmt.d.ts
CHANGED
|
@@ -1,58 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* @param {string} src
|
|
5
|
-
* @param {JsonConfig | undefined} [config]
|
|
6
|
-
* @returns {string}
|
|
7
|
-
*/
|
|
8
3
|
export function format_json(src: string, config?: JsonConfig): string;
|
|
9
|
-
/**
|
|
10
|
-
* @param {string} src
|
|
11
|
-
* @param {string} filename
|
|
12
|
-
* @param {StyleConfig | undefined} [config]
|
|
13
|
-
* @returns {string}
|
|
14
|
-
*/
|
|
15
|
-
export function format_style(src: string, filename: string, config?: StyleConfig): string;
|
|
16
|
-
/**
|
|
17
|
-
* @param {string} src
|
|
18
|
-
* @param {string} filename
|
|
19
|
-
* @param {Config | undefined} [config]
|
|
20
|
-
* @returns {string}
|
|
21
|
-
*/
|
|
22
|
-
export function format(src: string, filename: string, config?: Config): string;
|
|
23
|
-
/**
|
|
24
|
-
* @param {string} src
|
|
25
|
-
* @param {string} filename
|
|
26
|
-
* @param {MarkupConfig | undefined} [config]
|
|
27
|
-
* @returns {string}
|
|
28
|
-
*/
|
|
29
4
|
export function format_markup(src: string, filename: string, config?: MarkupConfig): string;
|
|
30
|
-
/**
|
|
31
|
-
* @param {string} src
|
|
32
|
-
* @param {string} filename
|
|
33
|
-
* @param {ScriptConfig | undefined} [config]
|
|
34
|
-
* @returns {string}
|
|
35
|
-
*/
|
|
36
5
|
export function format_script(src: string, filename: string, config?: ScriptConfig): string;
|
|
6
|
+
export function format_style(src: string, filename: string, config?: StyleConfig): string;
|
|
7
|
+
export function format(src: string, filename: string, config?: Config): string;
|
|
37
8
|
export type JsonConfig = LayoutConfig;
|
|
38
9
|
|
|
39
10
|
|
|
40
|
-
export interface StyleConfig extends LayoutConfig {
|
|
41
|
-
/**
|
|
42
|
-
* See {@link https://github.com/g-plane/malva/blob/main/docs/config.md}
|
|
43
|
-
*/
|
|
44
|
-
[other: string]: any;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
export interface Config extends LayoutConfig {
|
|
49
|
-
markup?: MarkupConfig;
|
|
50
|
-
script?: ScriptConfig;
|
|
51
|
-
style?: StyleConfig;
|
|
52
|
-
json?: JsonConfig;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
11
|
export interface MarkupConfig extends LayoutConfig {
|
|
57
12
|
/**
|
|
58
13
|
* See {@link https://github.com/g-plane/markup_fmt/blob/main/docs/config.md}
|
|
@@ -73,6 +28,22 @@ export interface ScriptConfig extends LayoutConfig {
|
|
|
73
28
|
}
|
|
74
29
|
|
|
75
30
|
|
|
31
|
+
export interface StyleConfig extends LayoutConfig {
|
|
32
|
+
/**
|
|
33
|
+
* See {@link https://github.com/g-plane/malva/blob/main/docs/config.md}
|
|
34
|
+
*/
|
|
35
|
+
[other: string]: any;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export interface Config extends LayoutConfig {
|
|
40
|
+
markup?: MarkupConfig;
|
|
41
|
+
script?: ScriptConfig;
|
|
42
|
+
style?: StyleConfig;
|
|
43
|
+
json?: JsonConfig;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
76
47
|
interface LayoutConfig {
|
|
77
48
|
indent_style?: "tab" | "space";
|
|
78
49
|
indent_width?: number;
|
|
@@ -86,15 +57,15 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
86
57
|
export interface InitOutput {
|
|
87
58
|
readonly memory: WebAssembly.Memory;
|
|
88
59
|
readonly format_json: (a: number, b: number, c: number, d: number) => void;
|
|
89
|
-
readonly format_style: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
90
|
-
readonly format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
91
60
|
readonly format_markup: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
92
61
|
readonly format_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
62
|
+
readonly format_style: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
63
|
+
readonly format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
93
64
|
readonly __wbindgen_export_0: (a: number, b: number) => number;
|
|
94
65
|
readonly __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
66
|
+
readonly __wbindgen_export_2: (a: number) => void;
|
|
95
67
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
96
|
-
readonly
|
|
97
|
-
readonly __wbindgen_export_3: (a: number) => void;
|
|
68
|
+
readonly __wbindgen_export_3: (a: number, b: number, c: number) => void;
|
|
98
69
|
}
|
|
99
70
|
|
|
100
71
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
package/web_fmt.js
CHANGED
|
@@ -1,67 +1,22 @@
|
|
|
1
1
|
let wasm;
|
|
2
2
|
|
|
3
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
4
|
-
|
|
5
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
6
|
-
|
|
7
|
-
let cachedUint8ArrayMemory0 = null;
|
|
8
|
-
|
|
9
|
-
function getUint8ArrayMemory0() {
|
|
10
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
11
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
12
|
-
}
|
|
13
|
-
return cachedUint8ArrayMemory0;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function getStringFromWasm0(ptr, len) {
|
|
17
|
-
ptr = ptr >>> 0;
|
|
18
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
19
|
-
}
|
|
20
|
-
|
|
21
3
|
const heap = new Array(128).fill(undefined);
|
|
22
4
|
|
|
23
5
|
heap.push(undefined, null, true, false);
|
|
24
6
|
|
|
25
|
-
let heap_next = heap.length;
|
|
26
|
-
|
|
27
|
-
function addHeapObject(obj) {
|
|
28
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
29
|
-
const idx = heap_next;
|
|
30
|
-
heap_next = heap[idx];
|
|
31
|
-
|
|
32
|
-
heap[idx] = obj;
|
|
33
|
-
return idx;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
7
|
function getObject(idx) { return heap[idx]; }
|
|
37
8
|
|
|
38
|
-
|
|
39
|
-
if (idx < 132) return;
|
|
40
|
-
heap[idx] = heap_next;
|
|
41
|
-
heap_next = idx;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function takeObject(idx) {
|
|
45
|
-
const ret = getObject(idx);
|
|
46
|
-
dropObject(idx);
|
|
47
|
-
return ret;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function isLikeNone(x) {
|
|
51
|
-
return x === undefined || x === null;
|
|
52
|
-
}
|
|
9
|
+
let WASM_VECTOR_LEN = 0;
|
|
53
10
|
|
|
54
|
-
let
|
|
11
|
+
let cachedUint8ArrayMemory0 = null;
|
|
55
12
|
|
|
56
|
-
function
|
|
57
|
-
if (
|
|
58
|
-
|
|
13
|
+
function getUint8ArrayMemory0() {
|
|
14
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
15
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
59
16
|
}
|
|
60
|
-
return
|
|
17
|
+
return cachedUint8ArrayMemory0;
|
|
61
18
|
}
|
|
62
19
|
|
|
63
|
-
let WASM_VECTOR_LEN = 0;
|
|
64
|
-
|
|
65
20
|
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
66
21
|
|
|
67
22
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -116,6 +71,38 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
116
71
|
return ptr;
|
|
117
72
|
}
|
|
118
73
|
|
|
74
|
+
let cachedDataViewMemory0 = null;
|
|
75
|
+
|
|
76
|
+
function getDataViewMemory0() {
|
|
77
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
78
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
79
|
+
}
|
|
80
|
+
return cachedDataViewMemory0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
let heap_next = heap.length;
|
|
84
|
+
|
|
85
|
+
function addHeapObject(obj) {
|
|
86
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
87
|
+
const idx = heap_next;
|
|
88
|
+
heap_next = heap[idx];
|
|
89
|
+
|
|
90
|
+
heap[idx] = obj;
|
|
91
|
+
return idx;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function handleError(f, args) {
|
|
95
|
+
try {
|
|
96
|
+
return f.apply(this, args);
|
|
97
|
+
} catch (e) {
|
|
98
|
+
wasm.__wbindgen_export_2(addHeapObject(e));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function isLikeNone(x) {
|
|
103
|
+
return x === undefined || x === null;
|
|
104
|
+
}
|
|
105
|
+
|
|
119
106
|
function debugString(val) {
|
|
120
107
|
// primitive types
|
|
121
108
|
const type = typeof val;
|
|
@@ -157,7 +144,7 @@ function debugString(val) {
|
|
|
157
144
|
// Test for built-in
|
|
158
145
|
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
159
146
|
let className;
|
|
160
|
-
if (builtInMatches.length > 1) {
|
|
147
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
161
148
|
className = builtInMatches[1];
|
|
162
149
|
} else {
|
|
163
150
|
// Failed to match the standard '[object ClassName]'
|
|
@@ -180,6 +167,27 @@ function debugString(val) {
|
|
|
180
167
|
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
181
168
|
return className;
|
|
182
169
|
}
|
|
170
|
+
|
|
171
|
+
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
172
|
+
|
|
173
|
+
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
174
|
+
|
|
175
|
+
function getStringFromWasm0(ptr, len) {
|
|
176
|
+
ptr = ptr >>> 0;
|
|
177
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function dropObject(idx) {
|
|
181
|
+
if (idx < 132) return;
|
|
182
|
+
heap[idx] = heap_next;
|
|
183
|
+
heap_next = idx;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function takeObject(idx) {
|
|
187
|
+
const ret = getObject(idx);
|
|
188
|
+
dropObject(idx);
|
|
189
|
+
return ret;
|
|
190
|
+
}
|
|
183
191
|
/**
|
|
184
192
|
* @param {string} src
|
|
185
193
|
* @param {JsonConfig | undefined} [config]
|
|
@@ -208,17 +216,17 @@ export function format_json(src, config) {
|
|
|
208
216
|
return getStringFromWasm0(ptr2, len2);
|
|
209
217
|
} finally {
|
|
210
218
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
211
|
-
wasm.
|
|
219
|
+
wasm.__wbindgen_export_3(deferred3_0, deferred3_1, 1);
|
|
212
220
|
}
|
|
213
221
|
}
|
|
214
222
|
|
|
215
223
|
/**
|
|
216
224
|
* @param {string} src
|
|
217
225
|
* @param {string} filename
|
|
218
|
-
* @param {
|
|
226
|
+
* @param {MarkupConfig | undefined} [config]
|
|
219
227
|
* @returns {string}
|
|
220
228
|
*/
|
|
221
|
-
export function
|
|
229
|
+
export function format_markup(src, filename, config) {
|
|
222
230
|
let deferred4_0;
|
|
223
231
|
let deferred4_1;
|
|
224
232
|
try {
|
|
@@ -227,7 +235,7 @@ export function format_style(src, filename, config) {
|
|
|
227
235
|
const len0 = WASM_VECTOR_LEN;
|
|
228
236
|
const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
229
237
|
const len1 = WASM_VECTOR_LEN;
|
|
230
|
-
wasm.
|
|
238
|
+
wasm.format_markup(retptr, ptr0, len0, ptr1, len1, isLikeNone(config) ? 0 : addHeapObject(config));
|
|
231
239
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
232
240
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
233
241
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -243,17 +251,17 @@ export function format_style(src, filename, config) {
|
|
|
243
251
|
return getStringFromWasm0(ptr3, len3);
|
|
244
252
|
} finally {
|
|
245
253
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
246
|
-
wasm.
|
|
254
|
+
wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
|
|
247
255
|
}
|
|
248
256
|
}
|
|
249
257
|
|
|
250
258
|
/**
|
|
251
259
|
* @param {string} src
|
|
252
260
|
* @param {string} filename
|
|
253
|
-
* @param {
|
|
261
|
+
* @param {ScriptConfig | undefined} [config]
|
|
254
262
|
* @returns {string}
|
|
255
263
|
*/
|
|
256
|
-
export function
|
|
264
|
+
export function format_script(src, filename, config) {
|
|
257
265
|
let deferred4_0;
|
|
258
266
|
let deferred4_1;
|
|
259
267
|
try {
|
|
@@ -262,7 +270,7 @@ export function format(src, filename, config) {
|
|
|
262
270
|
const len0 = WASM_VECTOR_LEN;
|
|
263
271
|
const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
264
272
|
const len1 = WASM_VECTOR_LEN;
|
|
265
|
-
wasm.
|
|
273
|
+
wasm.format_script(retptr, ptr0, len0, ptr1, len1, isLikeNone(config) ? 0 : addHeapObject(config));
|
|
266
274
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
267
275
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
268
276
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -278,17 +286,17 @@ export function format(src, filename, config) {
|
|
|
278
286
|
return getStringFromWasm0(ptr3, len3);
|
|
279
287
|
} finally {
|
|
280
288
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
281
|
-
wasm.
|
|
289
|
+
wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
|
|
282
290
|
}
|
|
283
291
|
}
|
|
284
292
|
|
|
285
293
|
/**
|
|
286
294
|
* @param {string} src
|
|
287
295
|
* @param {string} filename
|
|
288
|
-
* @param {
|
|
296
|
+
* @param {StyleConfig | undefined} [config]
|
|
289
297
|
* @returns {string}
|
|
290
298
|
*/
|
|
291
|
-
export function
|
|
299
|
+
export function format_style(src, filename, config) {
|
|
292
300
|
let deferred4_0;
|
|
293
301
|
let deferred4_1;
|
|
294
302
|
try {
|
|
@@ -297,7 +305,7 @@ export function format_markup(src, filename, config) {
|
|
|
297
305
|
const len0 = WASM_VECTOR_LEN;
|
|
298
306
|
const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
299
307
|
const len1 = WASM_VECTOR_LEN;
|
|
300
|
-
wasm.
|
|
308
|
+
wasm.format_style(retptr, ptr0, len0, ptr1, len1, isLikeNone(config) ? 0 : addHeapObject(config));
|
|
301
309
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
302
310
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
303
311
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -313,17 +321,17 @@ export function format_markup(src, filename, config) {
|
|
|
313
321
|
return getStringFromWasm0(ptr3, len3);
|
|
314
322
|
} finally {
|
|
315
323
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
316
|
-
wasm.
|
|
324
|
+
wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
|
|
317
325
|
}
|
|
318
326
|
}
|
|
319
327
|
|
|
320
328
|
/**
|
|
321
329
|
* @param {string} src
|
|
322
330
|
* @param {string} filename
|
|
323
|
-
* @param {
|
|
331
|
+
* @param {Config | undefined} [config]
|
|
324
332
|
* @returns {string}
|
|
325
333
|
*/
|
|
326
|
-
export function
|
|
334
|
+
export function format(src, filename, config) {
|
|
327
335
|
let deferred4_0;
|
|
328
336
|
let deferred4_1;
|
|
329
337
|
try {
|
|
@@ -332,7 +340,7 @@ export function format_script(src, filename, config) {
|
|
|
332
340
|
const len0 = WASM_VECTOR_LEN;
|
|
333
341
|
const ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
334
342
|
const len1 = WASM_VECTOR_LEN;
|
|
335
|
-
wasm.
|
|
343
|
+
wasm.format(retptr, ptr0, len0, ptr1, len1, isLikeNone(config) ? 0 : addHeapObject(config));
|
|
336
344
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
337
345
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
338
346
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -348,15 +356,7 @@ export function format_script(src, filename, config) {
|
|
|
348
356
|
return getStringFromWasm0(ptr3, len3);
|
|
349
357
|
} finally {
|
|
350
358
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
351
|
-
wasm.
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
function handleError(f, args) {
|
|
356
|
-
try {
|
|
357
|
-
return f.apply(this, args);
|
|
358
|
-
} catch (e) {
|
|
359
|
-
wasm.__wbindgen_export_3(addHeapObject(e));
|
|
359
|
+
wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
|
|
@@ -394,137 +394,42 @@ async function __wbg_load(module, imports) {
|
|
|
394
394
|
function __wbg_get_imports() {
|
|
395
395
|
const imports = {};
|
|
396
396
|
imports.wbg = {};
|
|
397
|
-
imports.wbg.
|
|
398
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
399
|
-
return addHeapObject(ret);
|
|
400
|
-
};
|
|
401
|
-
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
402
|
-
takeObject(arg0);
|
|
403
|
-
};
|
|
404
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
405
|
-
const ret = getObject(arg0) === undefined;
|
|
406
|
-
return ret;
|
|
407
|
-
};
|
|
408
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
409
|
-
const ret = getObject(arg0) in getObject(arg1);
|
|
410
|
-
return ret;
|
|
411
|
-
};
|
|
412
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
413
|
-
const v = getObject(arg0);
|
|
414
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
415
|
-
return ret;
|
|
416
|
-
};
|
|
417
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
418
|
-
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
419
|
-
return ret;
|
|
420
|
-
};
|
|
421
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
422
|
-
const obj = getObject(arg1);
|
|
423
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
424
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
425
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
426
|
-
};
|
|
427
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
428
|
-
const ret = arg0;
|
|
429
|
-
return addHeapObject(ret);
|
|
430
|
-
};
|
|
431
|
-
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
432
|
-
const ret = getObject(arg0) === getObject(arg1);
|
|
433
|
-
return ret;
|
|
434
|
-
};
|
|
435
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
436
|
-
const obj = getObject(arg1);
|
|
437
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
438
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
439
|
-
var len1 = WASM_VECTOR_LEN;
|
|
440
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
441
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
442
|
-
};
|
|
443
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
444
|
-
const val = getObject(arg0);
|
|
445
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
446
|
-
return ret;
|
|
447
|
-
};
|
|
448
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
449
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
450
|
-
return addHeapObject(ret);
|
|
451
|
-
};
|
|
452
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
453
|
-
const ret = typeof(getObject(arg0)) === 'string';
|
|
454
|
-
return ret;
|
|
455
|
-
};
|
|
456
|
-
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
457
|
-
const ret = getObject(arg0);
|
|
458
|
-
return addHeapObject(ret);
|
|
459
|
-
};
|
|
460
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
461
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
462
|
-
return addHeapObject(ret);
|
|
463
|
-
};
|
|
464
|
-
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
465
|
-
const ret = getObject(arg0) == getObject(arg1);
|
|
466
|
-
return ret;
|
|
467
|
-
};
|
|
468
|
-
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
469
|
-
const ret = +getObject(arg0);
|
|
470
|
-
return ret;
|
|
471
|
-
};
|
|
472
|
-
imports.wbg.__wbg_String_b9412f8799faab3e = function(arg0, arg1) {
|
|
397
|
+
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
473
398
|
const ret = String(getObject(arg1));
|
|
474
399
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
475
400
|
const len1 = WASM_VECTOR_LEN;
|
|
476
401
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
477
402
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
478
403
|
};
|
|
479
|
-
imports.wbg.
|
|
480
|
-
const ret = getObject(arg0)
|
|
481
|
-
return addHeapObject(ret);
|
|
482
|
-
};
|
|
483
|
-
imports.wbg.__wbg_get_5419cf6b954aa11d = function(arg0, arg1) {
|
|
484
|
-
const ret = getObject(arg0)[arg1 >>> 0];
|
|
485
|
-
return addHeapObject(ret);
|
|
486
|
-
};
|
|
487
|
-
imports.wbg.__wbg_length_f217bbbf7e8e4df4 = function(arg0) {
|
|
488
|
-
const ret = getObject(arg0).length;
|
|
489
|
-
return ret;
|
|
490
|
-
};
|
|
491
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
492
|
-
const ret = typeof(getObject(arg0)) === 'function';
|
|
493
|
-
return ret;
|
|
494
|
-
};
|
|
495
|
-
imports.wbg.__wbg_next_13b477da1eaa3897 = function(arg0) {
|
|
496
|
-
const ret = getObject(arg0).next;
|
|
404
|
+
imports.wbg.__wbg_buffer_61b7ce01341d7f88 = function(arg0) {
|
|
405
|
+
const ret = getObject(arg0).buffer;
|
|
497
406
|
return addHeapObject(ret);
|
|
498
407
|
};
|
|
499
|
-
imports.wbg.
|
|
500
|
-
const ret = getObject(arg0).
|
|
408
|
+
imports.wbg.__wbg_call_b0d8e36992d9900d = function() { return handleError(function (arg0, arg1) {
|
|
409
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
501
410
|
return addHeapObject(ret);
|
|
502
411
|
}, arguments) };
|
|
503
|
-
imports.wbg.
|
|
412
|
+
imports.wbg.__wbg_done_f22c1561fa919baa = function(arg0) {
|
|
504
413
|
const ret = getObject(arg0).done;
|
|
505
414
|
return ret;
|
|
506
415
|
};
|
|
507
|
-
imports.wbg.
|
|
508
|
-
const ret = getObject(arg0)
|
|
416
|
+
imports.wbg.__wbg_entries_4f2bb9b0d701c0f6 = function(arg0) {
|
|
417
|
+
const ret = Object.entries(getObject(arg0));
|
|
509
418
|
return addHeapObject(ret);
|
|
510
419
|
};
|
|
511
|
-
imports.wbg.
|
|
512
|
-
const ret =
|
|
420
|
+
imports.wbg.__wbg_get_9aa3dff3f0266054 = function(arg0, arg1) {
|
|
421
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
513
422
|
return addHeapObject(ret);
|
|
514
423
|
};
|
|
515
|
-
imports.wbg.
|
|
424
|
+
imports.wbg.__wbg_get_bbccf8970793c087 = function() { return handleError(function (arg0, arg1) {
|
|
516
425
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
517
426
|
return addHeapObject(ret);
|
|
518
427
|
}, arguments) };
|
|
519
|
-
imports.wbg.
|
|
520
|
-
const ret = getObject(arg0)
|
|
428
|
+
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
429
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
521
430
|
return addHeapObject(ret);
|
|
522
|
-
}, arguments) };
|
|
523
|
-
imports.wbg.__wbg_isArray_6f3b47f09adb61b5 = function(arg0) {
|
|
524
|
-
const ret = Array.isArray(getObject(arg0));
|
|
525
|
-
return ret;
|
|
526
431
|
};
|
|
527
|
-
imports.wbg.
|
|
432
|
+
imports.wbg.__wbg_instanceof_ArrayBuffer_670ddde44cdb2602 = function(arg0) {
|
|
528
433
|
let result;
|
|
529
434
|
try {
|
|
530
435
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -534,7 +439,7 @@ function __wbg_get_imports() {
|
|
|
534
439
|
const ret = result;
|
|
535
440
|
return ret;
|
|
536
441
|
};
|
|
537
|
-
imports.wbg.
|
|
442
|
+
imports.wbg.__wbg_instanceof_Map_98ecb30afec5acdb = function(arg0) {
|
|
538
443
|
let result;
|
|
539
444
|
try {
|
|
540
445
|
result = getObject(arg0) instanceof Map;
|
|
@@ -544,45 +449,78 @@ function __wbg_get_imports() {
|
|
|
544
449
|
const ret = result;
|
|
545
450
|
return ret;
|
|
546
451
|
};
|
|
547
|
-
imports.wbg.
|
|
452
|
+
imports.wbg.__wbg_instanceof_Uint8Array_28af5bc19d6acad8 = function(arg0) {
|
|
453
|
+
let result;
|
|
454
|
+
try {
|
|
455
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
456
|
+
} catch (_) {
|
|
457
|
+
result = false;
|
|
458
|
+
}
|
|
459
|
+
const ret = result;
|
|
460
|
+
return ret;
|
|
461
|
+
};
|
|
462
|
+
imports.wbg.__wbg_isArray_1ba11a930108ec51 = function(arg0) {
|
|
463
|
+
const ret = Array.isArray(getObject(arg0));
|
|
464
|
+
return ret;
|
|
465
|
+
};
|
|
466
|
+
imports.wbg.__wbg_isSafeInteger_12f5549b2fca23f4 = function(arg0) {
|
|
548
467
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
549
468
|
return ret;
|
|
550
469
|
};
|
|
551
|
-
imports.wbg.
|
|
552
|
-
const ret =
|
|
470
|
+
imports.wbg.__wbg_iterator_23604bb983791576 = function() {
|
|
471
|
+
const ret = Symbol.iterator;
|
|
553
472
|
return addHeapObject(ret);
|
|
554
473
|
};
|
|
555
|
-
imports.wbg.
|
|
556
|
-
const ret = getObject(arg0).
|
|
557
|
-
return
|
|
474
|
+
imports.wbg.__wbg_length_65d1cd11729ced11 = function(arg0) {
|
|
475
|
+
const ret = getObject(arg0).length;
|
|
476
|
+
return ret;
|
|
558
477
|
};
|
|
559
|
-
imports.wbg.
|
|
478
|
+
imports.wbg.__wbg_length_d65cf0786bfc5739 = function(arg0) {
|
|
479
|
+
const ret = getObject(arg0).length;
|
|
480
|
+
return ret;
|
|
481
|
+
};
|
|
482
|
+
imports.wbg.__wbg_new_3ff5b33b1ce712df = function(arg0) {
|
|
560
483
|
const ret = new Uint8Array(getObject(arg0));
|
|
561
484
|
return addHeapObject(ret);
|
|
562
485
|
};
|
|
563
|
-
imports.wbg.
|
|
486
|
+
imports.wbg.__wbg_next_01dd9234a5bf6d05 = function() { return handleError(function (arg0) {
|
|
487
|
+
const ret = getObject(arg0).next();
|
|
488
|
+
return addHeapObject(ret);
|
|
489
|
+
}, arguments) };
|
|
490
|
+
imports.wbg.__wbg_next_137428deb98342b0 = function(arg0) {
|
|
491
|
+
const ret = getObject(arg0).next;
|
|
492
|
+
return addHeapObject(ret);
|
|
493
|
+
};
|
|
494
|
+
imports.wbg.__wbg_set_23d69db4e5c66a6e = function(arg0, arg1, arg2) {
|
|
564
495
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
565
496
|
};
|
|
566
|
-
imports.wbg.
|
|
567
|
-
const ret = getObject(arg0).
|
|
568
|
-
return ret;
|
|
497
|
+
imports.wbg.__wbg_value_4c32fd138a88eee2 = function(arg0) {
|
|
498
|
+
const ret = getObject(arg0).value;
|
|
499
|
+
return addHeapObject(ret);
|
|
569
500
|
};
|
|
570
|
-
imports.wbg.
|
|
571
|
-
|
|
572
|
-
try {
|
|
573
|
-
result = getObject(arg0) instanceof Uint8Array;
|
|
574
|
-
} catch (_) {
|
|
575
|
-
result = false;
|
|
576
|
-
}
|
|
577
|
-
const ret = result;
|
|
501
|
+
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
502
|
+
const ret = +getObject(arg0);
|
|
578
503
|
return ret;
|
|
579
504
|
};
|
|
505
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
506
|
+
const ret = arg0;
|
|
507
|
+
return addHeapObject(ret);
|
|
508
|
+
};
|
|
509
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
510
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
511
|
+
return addHeapObject(ret);
|
|
512
|
+
};
|
|
580
513
|
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
581
514
|
const v = getObject(arg1);
|
|
582
515
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
583
516
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
584
517
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
585
518
|
};
|
|
519
|
+
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
520
|
+
const v = getObject(arg0);
|
|
521
|
+
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
522
|
+
return ret;
|
|
523
|
+
};
|
|
586
524
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
587
525
|
const ret = debugString(getObject(arg1));
|
|
588
526
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
@@ -590,13 +528,75 @@ function __wbg_get_imports() {
|
|
|
590
528
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
591
529
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
592
530
|
};
|
|
593
|
-
imports.wbg.
|
|
594
|
-
|
|
531
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
532
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
533
|
+
return addHeapObject(ret);
|
|
534
|
+
};
|
|
535
|
+
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
536
|
+
const ret = getObject(arg0) in getObject(arg1);
|
|
537
|
+
return ret;
|
|
538
|
+
};
|
|
539
|
+
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
540
|
+
const ret = typeof(getObject(arg0)) === 'bigint';
|
|
541
|
+
return ret;
|
|
542
|
+
};
|
|
543
|
+
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
544
|
+
const ret = typeof(getObject(arg0)) === 'function';
|
|
545
|
+
return ret;
|
|
546
|
+
};
|
|
547
|
+
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
548
|
+
const val = getObject(arg0);
|
|
549
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
550
|
+
return ret;
|
|
551
|
+
};
|
|
552
|
+
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
553
|
+
const ret = typeof(getObject(arg0)) === 'string';
|
|
554
|
+
return ret;
|
|
555
|
+
};
|
|
556
|
+
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
557
|
+
const ret = getObject(arg0) === undefined;
|
|
558
|
+
return ret;
|
|
559
|
+
};
|
|
560
|
+
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
561
|
+
const ret = getObject(arg0) === getObject(arg1);
|
|
562
|
+
return ret;
|
|
563
|
+
};
|
|
564
|
+
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
565
|
+
const ret = getObject(arg0) == getObject(arg1);
|
|
566
|
+
return ret;
|
|
595
567
|
};
|
|
596
568
|
imports.wbg.__wbindgen_memory = function() {
|
|
597
569
|
const ret = wasm.memory;
|
|
598
570
|
return addHeapObject(ret);
|
|
599
571
|
};
|
|
572
|
+
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
573
|
+
const obj = getObject(arg1);
|
|
574
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
575
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
576
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
577
|
+
};
|
|
578
|
+
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
579
|
+
const ret = getObject(arg0);
|
|
580
|
+
return addHeapObject(ret);
|
|
581
|
+
};
|
|
582
|
+
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
583
|
+
takeObject(arg0);
|
|
584
|
+
};
|
|
585
|
+
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
586
|
+
const obj = getObject(arg1);
|
|
587
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
588
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
589
|
+
var len1 = WASM_VECTOR_LEN;
|
|
590
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
591
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
592
|
+
};
|
|
593
|
+
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
594
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
595
|
+
return addHeapObject(ret);
|
|
596
|
+
};
|
|
597
|
+
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
598
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
599
|
+
};
|
|
600
600
|
|
|
601
601
|
return imports;
|
|
602
602
|
}
|
package/web_fmt_bg.wasm
CHANGED
|
Binary file
|
package/web_fmt_bg.wasm.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
4
|
+
export const format_json: (a: number, b: number, c: number, d: number) => void;
|
|
5
|
+
export const format_markup: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
6
|
+
export const format_script: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
7
|
+
export const format_style: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
|
+
export const format: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
9
|
+
export const __wbindgen_export_0: (a: number, b: number) => number;
|
|
10
|
+
export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
|
|
11
|
+
export const __wbindgen_export_2: (a: number) => void;
|
|
12
|
+
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
13
|
+
export const __wbindgen_export_3: (a: number, b: number, c: number) => void;
|
package/web_fmt_node.js
CHANGED
|
@@ -3,7 +3,7 @@ import initAsync from "./web_fmt.js";
|
|
|
3
3
|
|
|
4
4
|
const wasm = new URL("./web_fmt_bg.wasm", import.meta.url);
|
|
5
5
|
|
|
6
|
-
export default function __wbg_init(init = fs.readFile(wasm)) {
|
|
6
|
+
export default function __wbg_init(init = { module_or_path: fs.readFile(wasm) }) {
|
|
7
7
|
return initAsync(init);
|
|
8
8
|
}
|
|
9
9
|
|
package/web_fmt_vite.js
CHANGED
|
Binary file
|