@fontmin-rs/wasm 0.2.0 → 0.3.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.
|
@@ -5,9 +5,16 @@
|
|
|
5
5
|
* @returns {any}
|
|
6
6
|
*/
|
|
7
7
|
function generate_css(sources, options_value) {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
try {
|
|
9
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
10
|
+
wasm.generate_css(retptr, addHeapObject(sources), addHeapObject(options_value));
|
|
11
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 0, true);
|
|
12
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4, true);
|
|
13
|
+
if (getDataViewMemory0().getInt32(retptr + 8, true)) throw takeObject(r1);
|
|
14
|
+
return takeObject(r0);
|
|
15
|
+
} finally {
|
|
16
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
17
|
+
}
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
* @returns {string}
|
|
@@ -16,12 +23,16 @@ function runtime_name() {
|
|
|
16
23
|
let deferred1_0;
|
|
17
24
|
let deferred1_1;
|
|
18
25
|
try {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
26
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
27
|
+
wasm.runtime_name(retptr);
|
|
28
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 0, true);
|
|
29
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4, true);
|
|
30
|
+
deferred1_0 = r0;
|
|
31
|
+
deferred1_1 = r1;
|
|
32
|
+
return getStringFromWasm0(r0, r1);
|
|
23
33
|
} finally {
|
|
24
|
-
wasm.
|
|
34
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
35
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
25
36
|
}
|
|
26
37
|
}
|
|
27
38
|
/**
|
|
@@ -31,13 +42,20 @@ function runtime_name() {
|
|
|
31
42
|
* @returns {any}
|
|
32
43
|
*/
|
|
33
44
|
function transform(operation, input, options) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
try {
|
|
46
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
47
|
+
const ptr0 = passStringToWasm0(operation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
48
|
+
const len0 = WASM_VECTOR_LEN;
|
|
49
|
+
const ptr1 = passArray8ToWasm0(input, wasm.__wbindgen_export);
|
|
50
|
+
const len1 = WASM_VECTOR_LEN;
|
|
51
|
+
wasm.transform(retptr, ptr0, len0, ptr1, len1, addHeapObject(options));
|
|
52
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 0, true);
|
|
53
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4, true);
|
|
54
|
+
if (getDataViewMemory0().getInt32(retptr + 8, true)) throw takeObject(r1);
|
|
55
|
+
return takeObject(r0);
|
|
56
|
+
} finally {
|
|
57
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
58
|
+
}
|
|
41
59
|
}
|
|
42
60
|
/**
|
|
43
61
|
* @param {any} inputs
|
|
@@ -45,9 +63,16 @@ function transform(operation, input, options) {
|
|
|
45
63
|
* @returns {any}
|
|
46
64
|
*/
|
|
47
65
|
function transform_icons(inputs, options) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
try {
|
|
67
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
68
|
+
wasm.transform_icons(retptr, addHeapObject(inputs), addHeapObject(options));
|
|
69
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 0, true);
|
|
70
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4, true);
|
|
71
|
+
if (getDataViewMemory0().getInt32(retptr + 8, true)) throw takeObject(r1);
|
|
72
|
+
return takeObject(r0);
|
|
73
|
+
} finally {
|
|
74
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
75
|
+
}
|
|
51
76
|
}
|
|
52
77
|
/**
|
|
53
78
|
* @param {string} operation
|
|
@@ -56,13 +81,20 @@ function transform_icons(inputs, options) {
|
|
|
56
81
|
* @returns {any}
|
|
57
82
|
*/
|
|
58
83
|
function transform_text(operation, input, options) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
84
|
+
try {
|
|
85
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
86
|
+
const ptr0 = passStringToWasm0(operation, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
87
|
+
const len0 = WASM_VECTOR_LEN;
|
|
88
|
+
const ptr1 = passStringToWasm0(input, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
89
|
+
const len1 = WASM_VECTOR_LEN;
|
|
90
|
+
wasm.transform_text(retptr, ptr0, len0, ptr1, len1, addHeapObject(options));
|
|
91
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 0, true);
|
|
92
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4, true);
|
|
93
|
+
if (getDataViewMemory0().getInt32(retptr + 8, true)) throw takeObject(r1);
|
|
94
|
+
return takeObject(r0);
|
|
95
|
+
} finally {
|
|
96
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
97
|
+
}
|
|
66
98
|
}
|
|
67
99
|
function __wbg_get_imports() {
|
|
68
100
|
return {
|
|
@@ -70,69 +102,69 @@ function __wbg_get_imports() {
|
|
|
70
102
|
"./fontmin_wasm_core_bg.js": {
|
|
71
103
|
__proto__: null,
|
|
72
104
|
__wbg_Error_92b29b0548f8b746: function(arg0, arg1) {
|
|
73
|
-
return Error(getStringFromWasm0(arg0, arg1));
|
|
105
|
+
return addHeapObject(Error(getStringFromWasm0(arg0, arg1)));
|
|
74
106
|
},
|
|
75
107
|
__wbg_Number_9a4e0ecb0fa16705: function(arg0) {
|
|
76
|
-
return Number(arg0);
|
|
108
|
+
return Number(getObject(arg0));
|
|
77
109
|
},
|
|
78
110
|
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
79
|
-
const ptr1 = passStringToWasm0(String(arg1), wasm.
|
|
111
|
+
const ptr1 = passStringToWasm0(String(getObject(arg1)), wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
80
112
|
const len1 = WASM_VECTOR_LEN;
|
|
81
113
|
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
82
114
|
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
83
115
|
},
|
|
84
116
|
__wbg___wbindgen_bigint_get_as_i64_d968e41184ae354f: function(arg0, arg1) {
|
|
85
|
-
const v = arg1;
|
|
117
|
+
const v = getObject(arg1);
|
|
86
118
|
const ret = typeof v === "bigint" ? v : void 0;
|
|
87
119
|
getDataViewMemory0().setBigInt64(arg0 + 8, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
88
120
|
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
|
|
89
121
|
},
|
|
90
122
|
__wbg___wbindgen_boolean_get_fa956cfa2d1bd751: function(arg0) {
|
|
91
|
-
const v = arg0;
|
|
123
|
+
const v = getObject(arg0);
|
|
92
124
|
const ret = typeof v === "boolean" ? v : void 0;
|
|
93
125
|
return isLikeNone(ret) ? 16777215 : ret ? 1 : 0;
|
|
94
126
|
},
|
|
95
127
|
__wbg___wbindgen_debug_string_c25d447a39f5578f: function(arg0, arg1) {
|
|
96
|
-
const ptr1 = passStringToWasm0(debugString(arg1), wasm.
|
|
128
|
+
const ptr1 = passStringToWasm0(debugString(getObject(arg1)), wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
97
129
|
const len1 = WASM_VECTOR_LEN;
|
|
98
130
|
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
99
131
|
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
100
132
|
},
|
|
101
133
|
__wbg___wbindgen_in_aca499c5de7ff5e5: function(arg0, arg1) {
|
|
102
|
-
return arg0 in arg1;
|
|
134
|
+
return getObject(arg0) in getObject(arg1);
|
|
103
135
|
},
|
|
104
136
|
__wbg___wbindgen_is_bigint_2f76dc55065b4273: function(arg0) {
|
|
105
|
-
return typeof arg0 === "bigint";
|
|
137
|
+
return typeof getObject(arg0) === "bigint";
|
|
106
138
|
},
|
|
107
139
|
__wbg___wbindgen_is_function_1ff95bcc5517c252: function(arg0) {
|
|
108
|
-
return typeof arg0 === "function";
|
|
140
|
+
return typeof getObject(arg0) === "function";
|
|
109
141
|
},
|
|
110
142
|
__wbg___wbindgen_is_object_a27215656b807791: function(arg0) {
|
|
111
|
-
const val = arg0;
|
|
143
|
+
const val = getObject(arg0);
|
|
112
144
|
return typeof val === "object" && val !== null;
|
|
113
145
|
},
|
|
114
146
|
__wbg___wbindgen_is_string_ea5e6cc2e4141dfe: function(arg0) {
|
|
115
|
-
return typeof arg0 === "string";
|
|
147
|
+
return typeof getObject(arg0) === "string";
|
|
116
148
|
},
|
|
117
149
|
__wbg___wbindgen_is_undefined_c05833b95a3cf397: function(arg0) {
|
|
118
|
-
return arg0 === void 0;
|
|
150
|
+
return getObject(arg0) === void 0;
|
|
119
151
|
},
|
|
120
152
|
__wbg___wbindgen_jsval_eq_e659fcf7b0e32763: function(arg0, arg1) {
|
|
121
|
-
return arg0 === arg1;
|
|
153
|
+
return getObject(arg0) === getObject(arg1);
|
|
122
154
|
},
|
|
123
155
|
__wbg___wbindgen_jsval_loose_eq_db4c3b15f63fc170: function(arg0, arg1) {
|
|
124
|
-
return arg0 == arg1;
|
|
156
|
+
return getObject(arg0) == getObject(arg1);
|
|
125
157
|
},
|
|
126
158
|
__wbg___wbindgen_number_get_394265ed1e1b84ee: function(arg0, arg1) {
|
|
127
|
-
const obj = arg1;
|
|
159
|
+
const obj = getObject(arg1);
|
|
128
160
|
const ret = typeof obj === "number" ? obj : void 0;
|
|
129
161
|
getDataViewMemory0().setFloat64(arg0 + 8, isLikeNone(ret) ? 0 : ret, true);
|
|
130
162
|
getDataViewMemory0().setInt32(arg0 + 0, !isLikeNone(ret), true);
|
|
131
163
|
},
|
|
132
164
|
__wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
|
|
133
|
-
const obj = arg1;
|
|
165
|
+
const obj = getObject(arg1);
|
|
134
166
|
const ret = typeof obj === "string" ? obj : void 0;
|
|
135
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.
|
|
167
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
136
168
|
var len1 = WASM_VECTOR_LEN;
|
|
137
169
|
getDataViewMemory0().setInt32(arg0 + 4, len1, true);
|
|
138
170
|
getDataViewMemory0().setInt32(arg0 + 0, ptr1, true);
|
|
@@ -142,33 +174,36 @@ function __wbg_get_imports() {
|
|
|
142
174
|
},
|
|
143
175
|
__wbg_call_8a2dd23819f8a60a: function() {
|
|
144
176
|
return handleError(function(arg0, arg1) {
|
|
145
|
-
return arg0.call(arg1);
|
|
177
|
+
return addHeapObject(getObject(arg0).call(getObject(arg1)));
|
|
146
178
|
}, arguments);
|
|
147
179
|
},
|
|
148
180
|
__wbg_done_89b2b13e91a60321: function(arg0) {
|
|
149
|
-
return arg0.done;
|
|
181
|
+
return getObject(arg0).done;
|
|
150
182
|
},
|
|
151
183
|
__wbg_entries_015dc610cd81ede0: function(arg0) {
|
|
152
|
-
return Object.entries(arg0);
|
|
184
|
+
return addHeapObject(Object.entries(getObject(arg0)));
|
|
153
185
|
},
|
|
154
186
|
__wbg_get_507a50627bffa49b: function(arg0, arg1) {
|
|
155
|
-
|
|
187
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
188
|
+
return addHeapObject(ret);
|
|
156
189
|
},
|
|
157
190
|
__wbg_get_c7eb1f358a7654df: function() {
|
|
158
191
|
return handleError(function(arg0, arg1) {
|
|
159
|
-
return Reflect.get(arg0, arg1);
|
|
192
|
+
return addHeapObject(Reflect.get(getObject(arg0), getObject(arg1)));
|
|
160
193
|
}, arguments);
|
|
161
194
|
},
|
|
162
195
|
__wbg_get_unchecked_6e0ad6d2a41b06f6: function(arg0, arg1) {
|
|
163
|
-
|
|
196
|
+
const ret = getObject(arg0)[arg1 >>> 0];
|
|
197
|
+
return addHeapObject(ret);
|
|
164
198
|
},
|
|
165
199
|
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
166
|
-
|
|
200
|
+
const ret = getObject(arg0)[getObject(arg1)];
|
|
201
|
+
return addHeapObject(ret);
|
|
167
202
|
},
|
|
168
203
|
__wbg_instanceof_ArrayBuffer_4480b9e0068a8adb: function(arg0) {
|
|
169
204
|
let result;
|
|
170
205
|
try {
|
|
171
|
-
result = arg0 instanceof ArrayBuffer;
|
|
206
|
+
result = getObject(arg0) instanceof ArrayBuffer;
|
|
172
207
|
} catch (_) {
|
|
173
208
|
result = false;
|
|
174
209
|
}
|
|
@@ -177,7 +212,7 @@ function __wbg_get_imports() {
|
|
|
177
212
|
__wbg_instanceof_Map_e5b5e3db98422fcc: function(arg0) {
|
|
178
213
|
let result;
|
|
179
214
|
try {
|
|
180
|
-
result = arg0 instanceof Map;
|
|
215
|
+
result = getObject(arg0) instanceof Map;
|
|
181
216
|
} catch (_) {
|
|
182
217
|
result = false;
|
|
183
218
|
}
|
|
@@ -186,89 +221,91 @@ function __wbg_get_imports() {
|
|
|
186
221
|
__wbg_instanceof_Uint8Array_309b927aaf7a3fc7: function(arg0) {
|
|
187
222
|
let result;
|
|
188
223
|
try {
|
|
189
|
-
result = arg0 instanceof Uint8Array;
|
|
224
|
+
result = getObject(arg0) instanceof Uint8Array;
|
|
190
225
|
} catch (_) {
|
|
191
226
|
result = false;
|
|
192
227
|
}
|
|
193
228
|
return result;
|
|
194
229
|
},
|
|
195
230
|
__wbg_isArray_0677c962b281d01a: function(arg0) {
|
|
196
|
-
return Array.isArray(arg0);
|
|
231
|
+
return Array.isArray(getObject(arg0));
|
|
197
232
|
},
|
|
198
233
|
__wbg_isSafeInteger_04f36e4056f1b851: function(arg0) {
|
|
199
|
-
return Number.isSafeInteger(arg0);
|
|
234
|
+
return Number.isSafeInteger(getObject(arg0));
|
|
200
235
|
},
|
|
201
236
|
__wbg_iterator_6f722e4a93058b71: function() {
|
|
202
|
-
|
|
237
|
+
const ret = Symbol.iterator;
|
|
238
|
+
return addHeapObject(ret);
|
|
203
239
|
},
|
|
204
240
|
__wbg_length_1f0964f4a5e2c6d8: function(arg0) {
|
|
205
|
-
return arg0.length;
|
|
241
|
+
return getObject(arg0).length;
|
|
206
242
|
},
|
|
207
243
|
__wbg_length_370319915dc99107: function(arg0) {
|
|
208
|
-
return arg0.length;
|
|
244
|
+
return getObject(arg0).length;
|
|
209
245
|
},
|
|
210
246
|
__wbg_new_32b398fb48b6d94a: function() {
|
|
211
|
-
return new Array();
|
|
247
|
+
return addHeapObject(new Array());
|
|
212
248
|
},
|
|
213
249
|
__wbg_new_7796ffc7ed656783: function() {
|
|
214
|
-
return /* @__PURE__ */ new Map();
|
|
250
|
+
return addHeapObject(/* @__PURE__ */ new Map());
|
|
215
251
|
},
|
|
216
252
|
__wbg_new_cd45aabdf6073e84: function(arg0) {
|
|
217
|
-
return new Uint8Array(arg0);
|
|
253
|
+
return addHeapObject(new Uint8Array(getObject(arg0)));
|
|
218
254
|
},
|
|
219
255
|
__wbg_new_da52cf8fe3429cb2: function() {
|
|
220
|
-
return /* @__PURE__ */ new Object();
|
|
256
|
+
return addHeapObject(/* @__PURE__ */ new Object());
|
|
221
257
|
},
|
|
222
258
|
__wbg_next_6dbf2c0ac8cde20f: function(arg0) {
|
|
223
|
-
|
|
259
|
+
const ret = getObject(arg0).next;
|
|
260
|
+
return addHeapObject(ret);
|
|
224
261
|
},
|
|
225
262
|
__wbg_next_71f2aa1cb3d1e37e: function() {
|
|
226
263
|
return handleError(function(arg0) {
|
|
227
|
-
return arg0.next();
|
|
264
|
+
return addHeapObject(getObject(arg0).next());
|
|
228
265
|
}, arguments);
|
|
229
266
|
},
|
|
230
267
|
__wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
|
|
231
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
268
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
232
269
|
},
|
|
233
270
|
__wbg_set_575dd786d51585f8: function(arg0, arg1, arg2) {
|
|
234
|
-
return arg0.set(arg1, arg2);
|
|
271
|
+
return addHeapObject(getObject(arg0).set(getObject(arg1), getObject(arg2)));
|
|
235
272
|
},
|
|
236
273
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
237
|
-
arg0[arg1] = arg2;
|
|
274
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
238
275
|
},
|
|
239
276
|
__wbg_set_8a16b38e4805b298: function(arg0, arg1, arg2) {
|
|
240
|
-
arg0[arg1 >>> 0] = arg2;
|
|
277
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
241
278
|
},
|
|
242
279
|
__wbg_value_a5d5488a9589444a: function(arg0) {
|
|
243
|
-
|
|
280
|
+
const ret = getObject(arg0).value;
|
|
281
|
+
return addHeapObject(ret);
|
|
244
282
|
},
|
|
245
283
|
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
246
|
-
return arg0;
|
|
284
|
+
return addHeapObject(arg0);
|
|
247
285
|
},
|
|
248
286
|
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
249
|
-
return arg0;
|
|
287
|
+
return addHeapObject(arg0);
|
|
250
288
|
},
|
|
251
289
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
252
|
-
return getStringFromWasm0(arg0, arg1);
|
|
290
|
+
return addHeapObject(getStringFromWasm0(arg0, arg1));
|
|
253
291
|
},
|
|
254
292
|
__wbindgen_cast_0000000000000004: function(arg0) {
|
|
255
|
-
return BigInt.asUintN(64, arg0);
|
|
256
|
-
},
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
table.set(offset + 1, null);
|
|
263
|
-
table.set(offset + 2, true);
|
|
264
|
-
table.set(offset + 3, false);
|
|
293
|
+
return addHeapObject(BigInt.asUintN(64, arg0));
|
|
294
|
+
},
|
|
295
|
+
__wbindgen_object_clone_ref: function(arg0) {
|
|
296
|
+
return addHeapObject(getObject(arg0));
|
|
297
|
+
},
|
|
298
|
+
__wbindgen_object_drop_ref: function(arg0) {
|
|
299
|
+
takeObject(arg0);
|
|
265
300
|
}
|
|
266
301
|
}
|
|
267
302
|
};
|
|
268
303
|
}
|
|
269
|
-
function
|
|
270
|
-
|
|
271
|
-
|
|
304
|
+
function addHeapObject(obj) {
|
|
305
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
306
|
+
const idx = heap_next;
|
|
307
|
+
heap_next = heap[idx];
|
|
308
|
+
heap[idx] = obj;
|
|
272
309
|
return idx;
|
|
273
310
|
}
|
|
274
311
|
function debugString(val) {
|
|
@@ -305,6 +342,11 @@ function debugString(val) {
|
|
|
305
342
|
if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`;
|
|
306
343
|
return className;
|
|
307
344
|
}
|
|
345
|
+
function dropObject(idx) {
|
|
346
|
+
if (idx < 1028) return;
|
|
347
|
+
heap[idx] = heap_next;
|
|
348
|
+
heap_next = idx;
|
|
349
|
+
}
|
|
308
350
|
function getArrayU8FromWasm0(ptr, len) {
|
|
309
351
|
ptr = ptr >>> 0;
|
|
310
352
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -322,14 +364,19 @@ function getUint8ArrayMemory0() {
|
|
|
322
364
|
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
323
365
|
return cachedUint8ArrayMemory0;
|
|
324
366
|
}
|
|
367
|
+
function getObject(idx) {
|
|
368
|
+
return heap[idx];
|
|
369
|
+
}
|
|
325
370
|
function handleError(f, args) {
|
|
326
371
|
try {
|
|
327
372
|
return f.apply(this, args);
|
|
328
373
|
} catch (e) {
|
|
329
|
-
|
|
330
|
-
wasm.__wbindgen_exn_store(idx);
|
|
374
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
331
375
|
}
|
|
332
376
|
}
|
|
377
|
+
let heap = new Array(1024).fill(void 0);
|
|
378
|
+
heap.push(void 0, null, true, false);
|
|
379
|
+
let heap_next = heap.length;
|
|
333
380
|
function isLikeNone(x) {
|
|
334
381
|
return x === void 0 || x === null;
|
|
335
382
|
}
|
|
@@ -367,10 +414,10 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
367
414
|
WASM_VECTOR_LEN = offset;
|
|
368
415
|
return ptr;
|
|
369
416
|
}
|
|
370
|
-
function
|
|
371
|
-
const
|
|
372
|
-
|
|
373
|
-
return
|
|
417
|
+
function takeObject(idx) {
|
|
418
|
+
const ret = getObject(idx);
|
|
419
|
+
dropObject(idx);
|
|
420
|
+
return ret;
|
|
374
421
|
}
|
|
375
422
|
let cachedTextDecoder = new TextDecoder("utf-8", {
|
|
376
423
|
ignoreBOM: true,
|
|
@@ -406,7 +453,6 @@ function __wbg_finalize_init(instance, module) {
|
|
|
406
453
|
wasm = instance.exports;
|
|
407
454
|
cachedDataViewMemory0 = null;
|
|
408
455
|
cachedUint8ArrayMemory0 = null;
|
|
409
|
-
wasm.__wbindgen_start();
|
|
410
456
|
return wasm;
|
|
411
457
|
}
|
|
412
458
|
async function __wbg_load(module, imports) {
|
|
Binary file
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ async function initWasm(input) {
|
|
|
18
18
|
await initialization;
|
|
19
19
|
}
|
|
20
20
|
async function initializeWasm(input) {
|
|
21
|
-
const module = await import("./fontmin_wasm_core-
|
|
21
|
+
const module = await import("./fontmin_wasm_core-C2e3XISU.mjs");
|
|
22
22
|
await module.default(input === void 0 ? void 0 : { module_or_path: input });
|
|
23
23
|
if (module.runtime_name() !== "fontmin-rs") throw new Error("fontmin-rs WASM runtime did not initialize correctly");
|
|
24
24
|
initialized = true;
|