@devup-ui/wasm 1.0.48 → 1.0.51

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
@@ -17,7 +17,7 @@
17
17
  "react",
18
18
  "wasm"
19
19
  ],
20
- "version": "1.0.48",
20
+ "version": "1.0.51",
21
21
  "publishConfig": {
22
22
  "access": "public"
23
23
  },
package/pkg/index.d.ts CHANGED
@@ -1,18 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function importClassMap(sheet_object: any): void;
4
- export function isDebug(): boolean;
5
- export function importFileMap(sheet_object: any): void;
6
- export function getDefaultTheme(): string | undefined;
7
- export function getCss(file_num: number | null | undefined, import_main_css: boolean): string;
8
- export function exportFileMap(): string;
9
- export function setDebug(debug: boolean): void;
10
- export function exportSheet(): string;
11
- export function getThemeInterface(package_name: string, color_interface_name: string, typography_interface_name: string, theme_interface_name: string): string;
12
- export function codeExtract(filename: string, code: string, _package: string, css_dir: string, single_css: boolean, import_main_css_in_code: boolean, import_main_css_in_css: boolean): Output;
13
- export function importSheet(sheet_object: any): void;
14
- export function registerTheme(theme_object: any): void;
15
- export function exportClassMap(): string;
3
+
16
4
  export class Output {
17
5
  private constructor();
18
6
  free(): void;
@@ -29,3 +17,29 @@ export class Output {
29
17
  readonly code: string;
30
18
  readonly cssFile: string | undefined;
31
19
  }
20
+
21
+ export function codeExtract(filename: string, code: string, _package: string, css_dir: string, single_css: boolean, import_main_css_in_code: boolean, import_main_css_in_css: boolean): Output;
22
+
23
+ export function exportClassMap(): string;
24
+
25
+ export function exportFileMap(): string;
26
+
27
+ export function exportSheet(): string;
28
+
29
+ export function getCss(file_num: number | null | undefined, import_main_css: boolean): string;
30
+
31
+ export function getDefaultTheme(): string | undefined;
32
+
33
+ export function getThemeInterface(package_name: string, color_interface_name: string, typography_interface_name: string, theme_interface_name: string): string;
34
+
35
+ export function importClassMap(sheet_object: any): void;
36
+
37
+ export function importFileMap(sheet_object: any): void;
38
+
39
+ export function importSheet(sheet_object: any): void;
40
+
41
+ export function isDebug(): boolean;
42
+
43
+ export function registerTheme(theme_object: any): void;
44
+
45
+ export function setDebug(debug: boolean): void;
package/pkg/index.js CHANGED
@@ -2,93 +2,10 @@
2
2
  let imports = {};
3
3
  imports['__wbindgen_placeholder__'] = module.exports;
4
4
 
5
- let cachedUint8ArrayMemory0 = null;
6
-
7
- function getUint8ArrayMemory0() {
8
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
9
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
10
- }
11
- return cachedUint8ArrayMemory0;
12
- }
13
-
14
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
15
-
16
- cachedTextDecoder.decode();
17
-
18
- function decodeText(ptr, len) {
19
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
20
- }
21
-
22
- function getStringFromWasm0(ptr, len) {
23
- ptr = ptr >>> 0;
24
- return decodeText(ptr, len);
25
- }
26
-
27
- let WASM_VECTOR_LEN = 0;
28
-
29
- const cachedTextEncoder = new TextEncoder();
30
-
31
- if (!('encodeInto' in cachedTextEncoder)) {
32
- cachedTextEncoder.encodeInto = function (arg, view) {
33
- const buf = cachedTextEncoder.encode(arg);
34
- view.set(buf);
35
- return {
36
- read: arg.length,
37
- written: buf.length
38
- };
39
- }
40
- }
41
-
42
- function passStringToWasm0(arg, malloc, realloc) {
43
-
44
- if (realloc === undefined) {
45
- const buf = cachedTextEncoder.encode(arg);
46
- const ptr = malloc(buf.length, 1) >>> 0;
47
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
48
- WASM_VECTOR_LEN = buf.length;
49
- return ptr;
50
- }
51
-
52
- let len = arg.length;
53
- let ptr = malloc(len, 1) >>> 0;
54
-
55
- const mem = getUint8ArrayMemory0();
56
-
57
- let offset = 0;
58
-
59
- for (; offset < len; offset++) {
60
- const code = arg.charCodeAt(offset);
61
- if (code > 0x7F) break;
62
- mem[ptr + offset] = code;
63
- }
64
-
65
- if (offset !== len) {
66
- if (offset !== 0) {
67
- arg = arg.slice(offset);
68
- }
69
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
70
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
71
- const ret = cachedTextEncoder.encodeInto(arg, view);
72
-
73
- offset += ret.written;
74
- ptr = realloc(ptr, len, offset, 1) >>> 0;
75
- }
76
-
77
- WASM_VECTOR_LEN = offset;
78
- return ptr;
79
- }
80
-
81
- let cachedDataViewMemory0 = null;
82
-
83
- function getDataViewMemory0() {
84
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
85
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
86
- }
87
- return cachedDataViewMemory0;
88
- }
89
-
90
- function isLikeNone(x) {
91
- return x === undefined || x === null;
5
+ function addToExternrefTable0(obj) {
6
+ const idx = wasm.__externref_table_alloc();
7
+ wasm.__wbindgen_externrefs.set(idx, obj);
8
+ return idx;
92
9
  }
93
10
 
94
11
  function debugString(val) {
@@ -156,10 +73,30 @@ function debugString(val) {
156
73
  return className;
157
74
  }
158
75
 
159
- function addToExternrefTable0(obj) {
160
- const idx = wasm.__externref_table_alloc();
161
- wasm.__wbindgen_externrefs.set(idx, obj);
162
- return idx;
76
+ function getArrayU8FromWasm0(ptr, len) {
77
+ ptr = ptr >>> 0;
78
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
79
+ }
80
+
81
+ let cachedDataViewMemory0 = null;
82
+ function getDataViewMemory0() {
83
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
84
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
85
+ }
86
+ return cachedDataViewMemory0;
87
+ }
88
+
89
+ function getStringFromWasm0(ptr, len) {
90
+ ptr = ptr >>> 0;
91
+ return decodeText(ptr, len);
92
+ }
93
+
94
+ let cachedUint8ArrayMemory0 = null;
95
+ function getUint8ArrayMemory0() {
96
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
97
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
98
+ }
99
+ return cachedUint8ArrayMemory0;
163
100
  }
164
101
 
165
102
  function handleError(f, args) {
@@ -171,9 +108,45 @@ function handleError(f, args) {
171
108
  }
172
109
  }
173
110
 
174
- function getArrayU8FromWasm0(ptr, len) {
175
- ptr = ptr >>> 0;
176
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
111
+ function isLikeNone(x) {
112
+ return x === undefined || x === null;
113
+ }
114
+
115
+ function passStringToWasm0(arg, malloc, realloc) {
116
+ if (realloc === undefined) {
117
+ const buf = cachedTextEncoder.encode(arg);
118
+ const ptr = malloc(buf.length, 1) >>> 0;
119
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
120
+ WASM_VECTOR_LEN = buf.length;
121
+ return ptr;
122
+ }
123
+
124
+ let len = arg.length;
125
+ let ptr = malloc(len, 1) >>> 0;
126
+
127
+ const mem = getUint8ArrayMemory0();
128
+
129
+ let offset = 0;
130
+
131
+ for (; offset < len; offset++) {
132
+ const code = arg.charCodeAt(offset);
133
+ if (code > 0x7F) break;
134
+ mem[ptr + offset] = code;
135
+ }
136
+ if (offset !== len) {
137
+ if (offset !== 0) {
138
+ arg = arg.slice(offset);
139
+ }
140
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
141
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
142
+ const ret = cachedTextEncoder.encodeInto(arg, view);
143
+
144
+ offset += ret.written;
145
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
146
+ }
147
+
148
+ WASM_VECTOR_LEN = offset;
149
+ return ptr;
177
150
  }
178
151
 
179
152
  function takeFromExternrefTable0(idx) {
@@ -181,60 +154,149 @@ function takeFromExternrefTable0(idx) {
181
154
  wasm.__externref_table_dealloc(idx);
182
155
  return value;
183
156
  }
184
- /**
185
- * @param {any} sheet_object
186
- */
187
- exports.importClassMap = function(sheet_object) {
188
- const ret = wasm.importClassMap(sheet_object);
189
- if (ret[1]) {
190
- throw takeFromExternrefTable0(ret[0]);
157
+
158
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
159
+ cachedTextDecoder.decode();
160
+ function decodeText(ptr, len) {
161
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
162
+ }
163
+
164
+ const cachedTextEncoder = new TextEncoder();
165
+
166
+ if (!('encodeInto' in cachedTextEncoder)) {
167
+ cachedTextEncoder.encodeInto = function (arg, view) {
168
+ const buf = cachedTextEncoder.encode(arg);
169
+ view.set(buf);
170
+ return {
171
+ read: arg.length,
172
+ written: buf.length
173
+ };
191
174
  }
192
- };
175
+ }
193
176
 
194
- /**
195
- * @returns {boolean}
196
- */
197
- exports.isDebug = function() {
198
- const ret = wasm.isDebug();
199
- return ret !== 0;
200
- };
177
+ let WASM_VECTOR_LEN = 0;
201
178
 
202
- /**
203
- * @param {any} sheet_object
204
- */
205
- exports.importFileMap = function(sheet_object) {
206
- const ret = wasm.importFileMap(sheet_object);
207
- if (ret[1]) {
208
- throw takeFromExternrefTable0(ret[0]);
179
+ const OutputFinalization = (typeof FinalizationRegistry === 'undefined')
180
+ ? { register: () => {}, unregister: () => {} }
181
+ : new FinalizationRegistry(ptr => wasm.__wbg_output_free(ptr >>> 0, 1));
182
+
183
+ class Output {
184
+ static __wrap(ptr) {
185
+ ptr = ptr >>> 0;
186
+ const obj = Object.create(Output.prototype);
187
+ obj.__wbg_ptr = ptr;
188
+ OutputFinalization.register(obj, obj.__wbg_ptr, obj);
189
+ return obj;
190
+ }
191
+ __destroy_into_raw() {
192
+ const ptr = this.__wbg_ptr;
193
+ this.__wbg_ptr = 0;
194
+ OutputFinalization.unregister(this);
195
+ return ptr;
196
+ }
197
+ free() {
198
+ const ptr = this.__destroy_into_raw();
199
+ wasm.__wbg_output_free(ptr, 0);
200
+ }
201
+ /**
202
+ * @returns {boolean}
203
+ */
204
+ get updatedBaseStyle() {
205
+ const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
206
+ return ret !== 0;
207
+ }
208
+ /**
209
+ * Get the css
210
+ * @returns {string | undefined}
211
+ */
212
+ get css() {
213
+ const ret = wasm.output_css(this.__wbg_ptr);
214
+ let v1;
215
+ if (ret[0] !== 0) {
216
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
217
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
218
+ }
219
+ return v1;
220
+ }
221
+ /**
222
+ * @returns {string | undefined}
223
+ */
224
+ get map() {
225
+ const ret = wasm.output_map(this.__wbg_ptr);
226
+ let v1;
227
+ if (ret[0] !== 0) {
228
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
229
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
230
+ }
231
+ return v1;
232
+ }
233
+ /**
234
+ * Get the code
235
+ * @returns {string}
236
+ */
237
+ get code() {
238
+ let deferred1_0;
239
+ let deferred1_1;
240
+ try {
241
+ const ret = wasm.output_code(this.__wbg_ptr);
242
+ deferred1_0 = ret[0];
243
+ deferred1_1 = ret[1];
244
+ return getStringFromWasm0(ret[0], ret[1]);
245
+ } finally {
246
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
247
+ }
248
+ }
249
+ /**
250
+ * @returns {string | undefined}
251
+ */
252
+ get cssFile() {
253
+ const ret = wasm.output_cssFile(this.__wbg_ptr);
254
+ let v1;
255
+ if (ret[0] !== 0) {
256
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
257
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
258
+ }
259
+ return v1;
209
260
  }
210
- };
261
+ }
262
+ if (Symbol.dispose) Output.prototype[Symbol.dispose] = Output.prototype.free;
263
+ exports.Output = Output;
211
264
 
212
265
  /**
213
- * @returns {string | undefined}
266
+ * @param {string} filename
267
+ * @param {string} code
268
+ * @param {string} _package
269
+ * @param {string} css_dir
270
+ * @param {boolean} single_css
271
+ * @param {boolean} import_main_css_in_code
272
+ * @param {boolean} import_main_css_in_css
273
+ * @returns {Output}
214
274
  */
215
- exports.getDefaultTheme = function() {
216
- const ret = wasm.getDefaultTheme();
217
- if (ret[3]) {
218
- throw takeFromExternrefTable0(ret[2]);
219
- }
220
- let v1;
221
- if (ret[0] !== 0) {
222
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
223
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
275
+ function codeExtract(filename, code, _package, css_dir, single_css, import_main_css_in_code, import_main_css_in_css) {
276
+ const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
277
+ const len0 = WASM_VECTOR_LEN;
278
+ const ptr1 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
279
+ const len1 = WASM_VECTOR_LEN;
280
+ const ptr2 = passStringToWasm0(_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
281
+ const len2 = WASM_VECTOR_LEN;
282
+ const ptr3 = passStringToWasm0(css_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
283
+ const len3 = WASM_VECTOR_LEN;
284
+ const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, single_css, import_main_css_in_code, import_main_css_in_css);
285
+ if (ret[2]) {
286
+ throw takeFromExternrefTable0(ret[1]);
224
287
  }
225
- return v1;
226
- };
288
+ return Output.__wrap(ret[0]);
289
+ }
290
+ exports.codeExtract = codeExtract;
227
291
 
228
292
  /**
229
- * @param {number | null | undefined} file_num
230
- * @param {boolean} import_main_css
231
293
  * @returns {string}
232
294
  */
233
- exports.getCss = function(file_num, import_main_css) {
295
+ function exportClassMap() {
234
296
  let deferred2_0;
235
297
  let deferred2_1;
236
298
  try {
237
- const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0, import_main_css);
299
+ const ret = wasm.exportClassMap();
238
300
  var ptr1 = ret[0];
239
301
  var len1 = ret[1];
240
302
  if (ret[3]) {
@@ -247,12 +309,13 @@ exports.getCss = function(file_num, import_main_css) {
247
309
  } finally {
248
310
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
249
311
  }
250
- };
312
+ }
313
+ exports.exportClassMap = exportClassMap;
251
314
 
252
315
  /**
253
316
  * @returns {string}
254
317
  */
255
- exports.exportFileMap = function() {
318
+ function exportFileMap() {
256
319
  let deferred2_0;
257
320
  let deferred2_1;
258
321
  try {
@@ -269,23 +332,42 @@ exports.exportFileMap = function() {
269
332
  } finally {
270
333
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
271
334
  }
272
- };
335
+ }
336
+ exports.exportFileMap = exportFileMap;
273
337
 
274
338
  /**
275
- * @param {boolean} debug
339
+ * @returns {string}
276
340
  */
277
- exports.setDebug = function(debug) {
278
- wasm.setDebug(debug);
279
- };
341
+ function exportSheet() {
342
+ let deferred2_0;
343
+ let deferred2_1;
344
+ try {
345
+ const ret = wasm.exportSheet();
346
+ var ptr1 = ret[0];
347
+ var len1 = ret[1];
348
+ if (ret[3]) {
349
+ ptr1 = 0; len1 = 0;
350
+ throw takeFromExternrefTable0(ret[2]);
351
+ }
352
+ deferred2_0 = ptr1;
353
+ deferred2_1 = len1;
354
+ return getStringFromWasm0(ptr1, len1);
355
+ } finally {
356
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
357
+ }
358
+ }
359
+ exports.exportSheet = exportSheet;
280
360
 
281
361
  /**
362
+ * @param {number | null | undefined} file_num
363
+ * @param {boolean} import_main_css
282
364
  * @returns {string}
283
365
  */
284
- exports.exportSheet = function() {
366
+ function getCss(file_num, import_main_css) {
285
367
  let deferred2_0;
286
368
  let deferred2_1;
287
369
  try {
288
- const ret = wasm.exportSheet();
370
+ const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0, import_main_css);
289
371
  var ptr1 = ret[0];
290
372
  var len1 = ret[1];
291
373
  if (ret[3]) {
@@ -298,7 +380,25 @@ exports.exportSheet = function() {
298
380
  } finally {
299
381
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
300
382
  }
301
- };
383
+ }
384
+ exports.getCss = getCss;
385
+
386
+ /**
387
+ * @returns {string | undefined}
388
+ */
389
+ function getDefaultTheme() {
390
+ const ret = wasm.getDefaultTheme();
391
+ if (ret[3]) {
392
+ throw takeFromExternrefTable0(ret[2]);
393
+ }
394
+ let v1;
395
+ if (ret[0] !== 0) {
396
+ v1 = getStringFromWasm0(ret[0], ret[1]).slice();
397
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
398
+ }
399
+ return v1;
400
+ }
401
+ exports.getDefaultTheme = getDefaultTheme;
302
402
 
303
403
  /**
304
404
  * @param {string} package_name
@@ -307,7 +407,7 @@ exports.exportSheet = function() {
307
407
  * @param {string} theme_interface_name
308
408
  * @returns {string}
309
409
  */
310
- exports.getThemeInterface = function(package_name, color_interface_name, typography_interface_name, theme_interface_name) {
410
+ function getThemeInterface(package_name, color_interface_name, typography_interface_name, theme_interface_name) {
311
411
  let deferred5_0;
312
412
  let deferred5_1;
313
413
  try {
@@ -326,172 +426,76 @@ exports.getThemeInterface = function(package_name, color_interface_name, typogra
326
426
  } finally {
327
427
  wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
328
428
  }
329
- };
429
+ }
430
+ exports.getThemeInterface = getThemeInterface;
330
431
 
331
432
  /**
332
- * @param {string} filename
333
- * @param {string} code
334
- * @param {string} _package
335
- * @param {string} css_dir
336
- * @param {boolean} single_css
337
- * @param {boolean} import_main_css_in_code
338
- * @param {boolean} import_main_css_in_css
339
- * @returns {Output}
433
+ * @param {any} sheet_object
340
434
  */
341
- exports.codeExtract = function(filename, code, _package, css_dir, single_css, import_main_css_in_code, import_main_css_in_css) {
342
- const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
343
- const len0 = WASM_VECTOR_LEN;
344
- const ptr1 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
345
- const len1 = WASM_VECTOR_LEN;
346
- const ptr2 = passStringToWasm0(_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
347
- const len2 = WASM_VECTOR_LEN;
348
- const ptr3 = passStringToWasm0(css_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
349
- const len3 = WASM_VECTOR_LEN;
350
- const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, single_css, import_main_css_in_code, import_main_css_in_css);
351
- if (ret[2]) {
352
- throw takeFromExternrefTable0(ret[1]);
435
+ function importClassMap(sheet_object) {
436
+ const ret = wasm.importClassMap(sheet_object);
437
+ if (ret[1]) {
438
+ throw takeFromExternrefTable0(ret[0]);
353
439
  }
354
- return Output.__wrap(ret[0]);
355
- };
440
+ }
441
+ exports.importClassMap = importClassMap;
356
442
 
357
443
  /**
358
444
  * @param {any} sheet_object
359
445
  */
360
- exports.importSheet = function(sheet_object) {
361
- const ret = wasm.importSheet(sheet_object);
446
+ function importFileMap(sheet_object) {
447
+ const ret = wasm.importFileMap(sheet_object);
362
448
  if (ret[1]) {
363
449
  throw takeFromExternrefTable0(ret[0]);
364
450
  }
365
- };
451
+ }
452
+ exports.importFileMap = importFileMap;
366
453
 
367
454
  /**
368
- * @param {any} theme_object
455
+ * @param {any} sheet_object
369
456
  */
370
- exports.registerTheme = function(theme_object) {
371
- const ret = wasm.registerTheme(theme_object);
457
+ function importSheet(sheet_object) {
458
+ const ret = wasm.importSheet(sheet_object);
372
459
  if (ret[1]) {
373
460
  throw takeFromExternrefTable0(ret[0]);
374
461
  }
375
- };
462
+ }
463
+ exports.importSheet = importSheet;
376
464
 
377
465
  /**
378
- * @returns {string}
466
+ * @returns {boolean}
379
467
  */
380
- exports.exportClassMap = function() {
381
- let deferred2_0;
382
- let deferred2_1;
383
- try {
384
- const ret = wasm.exportClassMap();
385
- var ptr1 = ret[0];
386
- var len1 = ret[1];
387
- if (ret[3]) {
388
- ptr1 = 0; len1 = 0;
389
- throw takeFromExternrefTable0(ret[2]);
390
- }
391
- deferred2_0 = ptr1;
392
- deferred2_1 = len1;
393
- return getStringFromWasm0(ptr1, len1);
394
- } finally {
395
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
396
- }
397
- };
398
-
399
- const OutputFinalization = (typeof FinalizationRegistry === 'undefined')
400
- ? { register: () => {}, unregister: () => {} }
401
- : new FinalizationRegistry(ptr => wasm.__wbg_output_free(ptr >>> 0, 1));
402
-
403
- class Output {
404
-
405
- static __wrap(ptr) {
406
- ptr = ptr >>> 0;
407
- const obj = Object.create(Output.prototype);
408
- obj.__wbg_ptr = ptr;
409
- OutputFinalization.register(obj, obj.__wbg_ptr, obj);
410
- return obj;
411
- }
412
-
413
- __destroy_into_raw() {
414
- const ptr = this.__wbg_ptr;
415
- this.__wbg_ptr = 0;
416
- OutputFinalization.unregister(this);
417
- return ptr;
418
- }
468
+ function isDebug() {
469
+ const ret = wasm.isDebug();
470
+ return ret !== 0;
471
+ }
472
+ exports.isDebug = isDebug;
419
473
 
420
- free() {
421
- const ptr = this.__destroy_into_raw();
422
- wasm.__wbg_output_free(ptr, 0);
423
- }
424
- /**
425
- * @returns {boolean}
426
- */
427
- get updatedBaseStyle() {
428
- const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
429
- return ret !== 0;
430
- }
431
- /**
432
- * Get the css
433
- * @returns {string | undefined}
434
- */
435
- get css() {
436
- const ret = wasm.output_css(this.__wbg_ptr);
437
- let v1;
438
- if (ret[0] !== 0) {
439
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
440
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
441
- }
442
- return v1;
443
- }
444
- /**
445
- * @returns {string | undefined}
446
- */
447
- get map() {
448
- const ret = wasm.output_map(this.__wbg_ptr);
449
- let v1;
450
- if (ret[0] !== 0) {
451
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
452
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
453
- }
454
- return v1;
455
- }
456
- /**
457
- * Get the code
458
- * @returns {string}
459
- */
460
- get code() {
461
- let deferred1_0;
462
- let deferred1_1;
463
- try {
464
- const ret = wasm.output_code(this.__wbg_ptr);
465
- deferred1_0 = ret[0];
466
- deferred1_1 = ret[1];
467
- return getStringFromWasm0(ret[0], ret[1]);
468
- } finally {
469
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
470
- }
471
- }
472
- /**
473
- * @returns {string | undefined}
474
- */
475
- get cssFile() {
476
- const ret = wasm.output_cssFile(this.__wbg_ptr);
477
- let v1;
478
- if (ret[0] !== 0) {
479
- v1 = getStringFromWasm0(ret[0], ret[1]).slice();
480
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
481
- }
482
- return v1;
474
+ /**
475
+ * @param {any} theme_object
476
+ */
477
+ function registerTheme(theme_object) {
478
+ const ret = wasm.registerTheme(theme_object);
479
+ if (ret[1]) {
480
+ throw takeFromExternrefTable0(ret[0]);
483
481
  }
484
482
  }
485
- if (Symbol.dispose) Output.prototype[Symbol.dispose] = Output.prototype.free;
483
+ exports.registerTheme = registerTheme;
486
484
 
487
- exports.Output = Output;
485
+ /**
486
+ * @param {boolean} debug
487
+ */
488
+ function setDebug(debug) {
489
+ wasm.setDebug(debug);
490
+ }
491
+ exports.setDebug = setDebug;
488
492
 
489
- exports.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
493
+ exports.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
490
494
  const ret = Error(getStringFromWasm0(arg0, arg1));
491
495
  return ret;
492
496
  };
493
497
 
494
- exports.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
498
+ exports.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
495
499
  const ret = Number(arg0);
496
500
  return ret;
497
501
  };
@@ -504,20 +508,20 @@ exports.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
504
508
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
505
509
  };
506
510
 
507
- exports.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
511
+ exports.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
508
512
  const v = arg1;
509
513
  const ret = typeof(v) === 'bigint' ? v : undefined;
510
514
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
511
515
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
512
516
  };
513
517
 
514
- exports.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
518
+ exports.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
515
519
  const v = arg0;
516
520
  const ret = typeof(v) === 'boolean' ? v : undefined;
517
521
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
518
522
  };
519
523
 
520
- exports.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
524
+ exports.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
521
525
  const ret = debugString(arg1);
522
526
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
523
527
  const len1 = WASM_VECTOR_LEN;
@@ -525,55 +529,55 @@ exports.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
525
529
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
526
530
  };
527
531
 
528
- exports.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
532
+ exports.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
529
533
  const ret = arg0 in arg1;
530
534
  return ret;
531
535
  };
532
536
 
533
- exports.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
537
+ exports.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
534
538
  const ret = typeof(arg0) === 'bigint';
535
539
  return ret;
536
540
  };
537
541
 
538
- exports.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
542
+ exports.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
539
543
  const ret = typeof(arg0) === 'function';
540
544
  return ret;
541
545
  };
542
546
 
543
- exports.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
547
+ exports.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
544
548
  const val = arg0;
545
549
  const ret = typeof(val) === 'object' && val !== null;
546
550
  return ret;
547
551
  };
548
552
 
549
- exports.__wbg___wbindgen_is_string_fbb76cb2940daafd = function(arg0) {
553
+ exports.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
550
554
  const ret = typeof(arg0) === 'string';
551
555
  return ret;
552
556
  };
553
557
 
554
- exports.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
558
+ exports.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
555
559
  const ret = arg0 === undefined;
556
560
  return ret;
557
561
  };
558
562
 
559
- exports.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
563
+ exports.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
560
564
  const ret = arg0 === arg1;
561
565
  return ret;
562
566
  };
563
567
 
564
- exports.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
568
+ exports.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
565
569
  const ret = arg0 == arg1;
566
570
  return ret;
567
571
  };
568
572
 
569
- exports.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
573
+ exports.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
570
574
  const obj = arg1;
571
575
  const ret = typeof(obj) === 'number' ? obj : undefined;
572
576
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
573
577
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
574
578
  };
575
579
 
576
- exports.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
580
+ exports.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
577
581
  const obj = arg1;
578
582
  const ret = typeof(obj) === 'string' ? obj : undefined;
579
583
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -582,31 +586,31 @@ exports.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
582
586
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
583
587
  };
584
588
 
585
- exports.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
589
+ exports.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
586
590
  throw new Error(getStringFromWasm0(arg0, arg1));
587
591
  };
588
592
 
589
- exports.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
593
+ exports.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
590
594
  const ret = arg0.call(arg1);
591
595
  return ret;
592
596
  }, arguments) };
593
597
 
594
- exports.__wbg_done_2042aa2670fb1db1 = function(arg0) {
598
+ exports.__wbg_done_62ea16af4ce34b24 = function(arg0) {
595
599
  const ret = arg0.done;
596
600
  return ret;
597
601
  };
598
602
 
599
- exports.__wbg_entries_e171b586f8f6bdbf = function(arg0) {
603
+ exports.__wbg_entries_83c79938054e065f = function(arg0) {
600
604
  const ret = Object.entries(arg0);
601
605
  return ret;
602
606
  };
603
607
 
604
- exports.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
608
+ exports.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
605
609
  const ret = arg0[arg1 >>> 0];
606
610
  return ret;
607
611
  };
608
612
 
609
- exports.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
613
+ exports.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
610
614
  const ret = Reflect.get(arg0, arg1);
611
615
  return ret;
612
616
  }, arguments) };
@@ -616,7 +620,7 @@ exports.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
616
620
  return ret;
617
621
  };
618
622
 
619
- exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
623
+ exports.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
620
624
  let result;
621
625
  try {
622
626
  result = arg0 instanceof ArrayBuffer;
@@ -627,7 +631,7 @@ exports.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
627
631
  return ret;
628
632
  };
629
633
 
630
- exports.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
634
+ exports.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
631
635
  let result;
632
636
  try {
633
637
  result = arg0 instanceof Map;
@@ -638,7 +642,7 @@ exports.__wbg_instanceof_Map_8579b5e2ab5437c7 = function(arg0) {
638
642
  return ret;
639
643
  };
640
644
 
641
- exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
645
+ exports.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
642
646
  let result;
643
647
  try {
644
648
  result = arg0 instanceof Uint8Array;
@@ -649,51 +653,51 @@ exports.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
649
653
  return ret;
650
654
  };
651
655
 
652
- exports.__wbg_isArray_96e0af9891d0945d = function(arg0) {
656
+ exports.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
653
657
  const ret = Array.isArray(arg0);
654
658
  return ret;
655
659
  };
656
660
 
657
- exports.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
661
+ exports.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
658
662
  const ret = Number.isSafeInteger(arg0);
659
663
  return ret;
660
664
  };
661
665
 
662
- exports.__wbg_iterator_e5822695327a3c39 = function() {
666
+ exports.__wbg_iterator_27b7c8b35ab3e86b = function() {
663
667
  const ret = Symbol.iterator;
664
668
  return ret;
665
669
  };
666
670
 
667
- exports.__wbg_length_69bca3cb64fc8748 = function(arg0) {
671
+ exports.__wbg_length_22ac23eaec9d8053 = function(arg0) {
668
672
  const ret = arg0.length;
669
673
  return ret;
670
674
  };
671
675
 
672
- exports.__wbg_length_cdd215e10d9dd507 = function(arg0) {
676
+ exports.__wbg_length_d45040a40c570362 = function(arg0) {
673
677
  const ret = arg0.length;
674
678
  return ret;
675
679
  };
676
680
 
677
- exports.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
681
+ exports.__wbg_new_6421f6084cc5bc5a = function(arg0) {
678
682
  const ret = new Uint8Array(arg0);
679
683
  return ret;
680
684
  };
681
685
 
682
- exports.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
683
- const ret = arg0.next();
684
- return ret;
685
- }, arguments) };
686
-
687
- exports.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
686
+ exports.__wbg_next_138a17bbf04e926c = function(arg0) {
688
687
  const ret = arg0.next;
689
688
  return ret;
690
689
  };
691
690
 
692
- exports.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
691
+ exports.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
692
+ const ret = arg0.next();
693
+ return ret;
694
+ }, arguments) };
695
+
696
+ exports.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
693
697
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
694
698
  };
695
699
 
696
- exports.__wbg_value_692627309814bb8c = function(arg0) {
700
+ exports.__wbg_value_57b7b035e117f7ee = function(arg0) {
697
701
  const ret = arg0.value;
698
702
  return ret;
699
703
  };
@@ -724,7 +728,6 @@ exports.__wbindgen_init_externref_table = function() {
724
728
  table.set(offset + 1, null);
725
729
  table.set(offset + 2, true);
726
730
  table.set(offset + 3, false);
727
- ;
728
731
  };
729
732
 
730
733
  const wasmPath = `${__dirname}/index_bg.wasm`;
@@ -733,4 +736,3 @@ const wasmModule = new WebAssembly.Module(wasmBytes);
733
736
  const wasm = exports.__wasm = new WebAssembly.Instance(wasmModule, imports).exports;
734
737
 
735
738
  wasm.__wbindgen_start();
736
-
package/pkg/index_bg.wasm CHANGED
Binary file
@@ -25,6 +25,6 @@ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) =>
25
25
  export const __wbindgen_exn_store: (a: number) => void;
26
26
  export const __externref_table_alloc: () => number;
27
27
  export const __wbindgen_externrefs: WebAssembly.Table;
28
- export const __externref_table_dealloc: (a: number) => void;
29
28
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
29
+ export const __externref_table_dealloc: (a: number) => void;
30
30
  export const __wbindgen_start: () => void;