@devup-ui/wasm 1.0.44 → 1.0.45

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.44",
20
+ "version": "1.0.45",
21
21
  "publishConfig": {
22
22
  "access": "public"
23
23
  },
package/pkg/index.d.ts CHANGED
@@ -1,31 +1,31 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function setDebug(debug: boolean): void;
4
- export function isDebug(): boolean;
5
4
  export function importSheet(sheet_object: any): void;
6
- export function exportSheet(): string;
7
- export function importClassMap(sheet_object: any): void;
8
5
  export function exportClassMap(): string;
9
- export function importFileMap(sheet_object: any): void;
10
- export function exportFileMap(): string;
11
6
  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;
7
+ export function exportFileMap(): string;
8
+ export function isDebug(): boolean;
12
9
  export function registerTheme(theme_object: any): void;
13
- export function getDefaultTheme(): string | undefined;
14
- export function getCss(file_num: number | null | undefined, import_main_css: boolean): string;
15
10
  export function getThemeInterface(package_name: string, color_interface_name: string, typography_interface_name: string, theme_interface_name: string): string;
11
+ export function getCss(file_num: number | null | undefined, import_main_css: boolean): string;
12
+ export function importClassMap(sheet_object: any): void;
13
+ export function importFileMap(sheet_object: any): void;
14
+ export function getDefaultTheme(): string | undefined;
15
+ export function exportSheet(): string;
16
16
  export class Output {
17
17
  private constructor();
18
18
  free(): void;
19
19
  [Symbol.dispose](): void;
20
- /**
21
- * Get the code
22
- */
23
- readonly code: string;
24
- readonly cssFile: string | undefined;
25
- readonly map: string | undefined;
26
20
  readonly updatedBaseStyle: boolean;
27
21
  /**
28
22
  * Get the css
29
23
  */
30
24
  readonly css: string | undefined;
25
+ readonly map: string | undefined;
26
+ /**
27
+ * Get the code
28
+ */
29
+ readonly code: string;
30
+ readonly cssFile: string | undefined;
31
31
  }
package/pkg/index.js CHANGED
@@ -182,14 +182,6 @@ exports.setDebug = function(debug) {
182
182
  wasm.setDebug(debug);
183
183
  };
184
184
 
185
- /**
186
- * @returns {boolean}
187
- */
188
- exports.isDebug = function() {
189
- const ret = wasm.isDebug();
190
- return ret !== 0;
191
- };
192
-
193
185
  function takeFromExternrefTable0(idx) {
194
186
  const value = wasm.__wbindgen_externrefs.get(idx);
195
187
  wasm.__externref_table_dealloc(idx);
@@ -208,11 +200,11 @@ exports.importSheet = function(sheet_object) {
208
200
  /**
209
201
  * @returns {string}
210
202
  */
211
- exports.exportSheet = function() {
203
+ exports.exportClassMap = function() {
212
204
  let deferred2_0;
213
205
  let deferred2_1;
214
206
  try {
215
- const ret = wasm.exportSheet();
207
+ const ret = wasm.exportClassMap();
216
208
  var ptr1 = ret[0];
217
209
  var len1 = ret[1];
218
210
  if (ret[3]) {
@@ -228,23 +220,39 @@ exports.exportSheet = function() {
228
220
  };
229
221
 
230
222
  /**
231
- * @param {any} sheet_object
223
+ * @param {string} filename
224
+ * @param {string} code
225
+ * @param {string} _package
226
+ * @param {string} css_dir
227
+ * @param {boolean} single_css
228
+ * @param {boolean} import_main_css_in_code
229
+ * @param {boolean} import_main_css_in_css
230
+ * @returns {Output}
232
231
  */
233
- exports.importClassMap = function(sheet_object) {
234
- const ret = wasm.importClassMap(sheet_object);
235
- if (ret[1]) {
236
- throw takeFromExternrefTable0(ret[0]);
232
+ exports.codeExtract = function(filename, code, _package, css_dir, single_css, import_main_css_in_code, import_main_css_in_css) {
233
+ const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
234
+ const len0 = WASM_VECTOR_LEN;
235
+ const ptr1 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
236
+ const len1 = WASM_VECTOR_LEN;
237
+ const ptr2 = passStringToWasm0(_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
238
+ const len2 = WASM_VECTOR_LEN;
239
+ const ptr3 = passStringToWasm0(css_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
240
+ const len3 = WASM_VECTOR_LEN;
241
+ const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, single_css, import_main_css_in_code, import_main_css_in_css);
242
+ if (ret[2]) {
243
+ throw takeFromExternrefTable0(ret[1]);
237
244
  }
245
+ return Output.__wrap(ret[0]);
238
246
  };
239
247
 
240
248
  /**
241
249
  * @returns {string}
242
250
  */
243
- exports.exportClassMap = function() {
251
+ exports.exportFileMap = function() {
244
252
  let deferred2_0;
245
253
  let deferred2_1;
246
254
  try {
247
- const ret = wasm.exportClassMap();
255
+ const ret = wasm.exportFileMap();
248
256
  var ptr1 = ret[0];
249
257
  var len1 = ret[1];
250
258
  if (ret[3]) {
@@ -260,23 +268,61 @@ exports.exportClassMap = function() {
260
268
  };
261
269
 
262
270
  /**
263
- * @param {any} sheet_object
271
+ * @returns {boolean}
264
272
  */
265
- exports.importFileMap = function(sheet_object) {
266
- const ret = wasm.importFileMap(sheet_object);
273
+ exports.isDebug = function() {
274
+ const ret = wasm.isDebug();
275
+ return ret !== 0;
276
+ };
277
+
278
+ /**
279
+ * @param {any} theme_object
280
+ */
281
+ exports.registerTheme = function(theme_object) {
282
+ const ret = wasm.registerTheme(theme_object);
267
283
  if (ret[1]) {
268
284
  throw takeFromExternrefTable0(ret[0]);
269
285
  }
270
286
  };
271
287
 
272
288
  /**
289
+ * @param {string} package_name
290
+ * @param {string} color_interface_name
291
+ * @param {string} typography_interface_name
292
+ * @param {string} theme_interface_name
273
293
  * @returns {string}
274
294
  */
275
- exports.exportFileMap = function() {
295
+ exports.getThemeInterface = function(package_name, color_interface_name, typography_interface_name, theme_interface_name) {
296
+ let deferred5_0;
297
+ let deferred5_1;
298
+ try {
299
+ const ptr0 = passStringToWasm0(package_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
300
+ const len0 = WASM_VECTOR_LEN;
301
+ const ptr1 = passStringToWasm0(color_interface_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
302
+ const len1 = WASM_VECTOR_LEN;
303
+ const ptr2 = passStringToWasm0(typography_interface_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
304
+ const len2 = WASM_VECTOR_LEN;
305
+ const ptr3 = passStringToWasm0(theme_interface_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
+ const len3 = WASM_VECTOR_LEN;
307
+ const ret = wasm.getThemeInterface(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
308
+ deferred5_0 = ret[0];
309
+ deferred5_1 = ret[1];
310
+ return getStringFromWasm0(ret[0], ret[1]);
311
+ } finally {
312
+ wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
313
+ }
314
+ };
315
+
316
+ /**
317
+ * @param {number | null | undefined} file_num
318
+ * @param {boolean} import_main_css
319
+ * @returns {string}
320
+ */
321
+ exports.getCss = function(file_num, import_main_css) {
276
322
  let deferred2_0;
277
323
  let deferred2_1;
278
324
  try {
279
- const ret = wasm.exportFileMap();
325
+ const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0, import_main_css);
280
326
  var ptr1 = ret[0];
281
327
  var len1 = ret[1];
282
328
  if (ret[3]) {
@@ -292,36 +338,20 @@ exports.exportFileMap = function() {
292
338
  };
293
339
 
294
340
  /**
295
- * @param {string} filename
296
- * @param {string} code
297
- * @param {string} _package
298
- * @param {string} css_dir
299
- * @param {boolean} single_css
300
- * @param {boolean} import_main_css_in_code
301
- * @param {boolean} import_main_css_in_css
302
- * @returns {Output}
341
+ * @param {any} sheet_object
303
342
  */
304
- exports.codeExtract = function(filename, code, _package, css_dir, single_css, import_main_css_in_code, import_main_css_in_css) {
305
- const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
306
- const len0 = WASM_VECTOR_LEN;
307
- const ptr1 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
308
- const len1 = WASM_VECTOR_LEN;
309
- const ptr2 = passStringToWasm0(_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
310
- const len2 = WASM_VECTOR_LEN;
311
- const ptr3 = passStringToWasm0(css_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
312
- const len3 = WASM_VECTOR_LEN;
313
- const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, single_css, import_main_css_in_code, import_main_css_in_css);
314
- if (ret[2]) {
315
- throw takeFromExternrefTable0(ret[1]);
343
+ exports.importClassMap = function(sheet_object) {
344
+ const ret = wasm.importClassMap(sheet_object);
345
+ if (ret[1]) {
346
+ throw takeFromExternrefTable0(ret[0]);
316
347
  }
317
- return Output.__wrap(ret[0]);
318
348
  };
319
349
 
320
350
  /**
321
- * @param {any} theme_object
351
+ * @param {any} sheet_object
322
352
  */
323
- exports.registerTheme = function(theme_object) {
324
- const ret = wasm.registerTheme(theme_object);
353
+ exports.importFileMap = function(sheet_object) {
354
+ const ret = wasm.importFileMap(sheet_object);
325
355
  if (ret[1]) {
326
356
  throw takeFromExternrefTable0(ret[0]);
327
357
  }
@@ -344,15 +374,13 @@ exports.getDefaultTheme = function() {
344
374
  };
345
375
 
346
376
  /**
347
- * @param {number | null | undefined} file_num
348
- * @param {boolean} import_main_css
349
377
  * @returns {string}
350
378
  */
351
- exports.getCss = function(file_num, import_main_css) {
379
+ exports.exportSheet = function() {
352
380
  let deferred2_0;
353
381
  let deferred2_1;
354
382
  try {
355
- const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0, import_main_css);
383
+ const ret = wasm.exportSheet();
356
384
  var ptr1 = ret[0];
357
385
  var len1 = ret[1];
358
386
  if (ret[3]) {
@@ -367,34 +395,6 @@ exports.getCss = function(file_num, import_main_css) {
367
395
  }
368
396
  };
369
397
 
370
- /**
371
- * @param {string} package_name
372
- * @param {string} color_interface_name
373
- * @param {string} typography_interface_name
374
- * @param {string} theme_interface_name
375
- * @returns {string}
376
- */
377
- exports.getThemeInterface = function(package_name, color_interface_name, typography_interface_name, theme_interface_name) {
378
- let deferred5_0;
379
- let deferred5_1;
380
- try {
381
- const ptr0 = passStringToWasm0(package_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
382
- const len0 = WASM_VECTOR_LEN;
383
- const ptr1 = passStringToWasm0(color_interface_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
384
- const len1 = WASM_VECTOR_LEN;
385
- const ptr2 = passStringToWasm0(typography_interface_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
386
- const len2 = WASM_VECTOR_LEN;
387
- const ptr3 = passStringToWasm0(theme_interface_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
388
- const len3 = WASM_VECTOR_LEN;
389
- const ret = wasm.getThemeInterface(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
390
- deferred5_0 = ret[0];
391
- deferred5_1 = ret[1];
392
- return getStringFromWasm0(ret[0], ret[1]);
393
- } finally {
394
- wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
395
- }
396
- };
397
-
398
398
  const OutputFinalization = (typeof FinalizationRegistry === 'undefined')
399
399
  ? { register: () => {}, unregister: () => {} }
400
400
  : new FinalizationRegistry(ptr => wasm.__wbg_output_free(ptr >>> 0, 1));
@@ -421,26 +421,18 @@ class Output {
421
421
  wasm.__wbg_output_free(ptr, 0);
422
422
  }
423
423
  /**
424
- * Get the code
425
- * @returns {string}
424
+ * @returns {boolean}
426
425
  */
427
- get code() {
428
- let deferred1_0;
429
- let deferred1_1;
430
- try {
431
- const ret = wasm.output_code(this.__wbg_ptr);
432
- deferred1_0 = ret[0];
433
- deferred1_1 = ret[1];
434
- return getStringFromWasm0(ret[0], ret[1]);
435
- } finally {
436
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
437
- }
426
+ get updatedBaseStyle() {
427
+ const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
428
+ return ret !== 0;
438
429
  }
439
430
  /**
431
+ * Get the css
440
432
  * @returns {string | undefined}
441
433
  */
442
- get cssFile() {
443
- const ret = wasm.output_cssFile(this.__wbg_ptr);
434
+ get css() {
435
+ const ret = wasm.output_css(this.__wbg_ptr);
444
436
  let v1;
445
437
  if (ret[0] !== 0) {
446
438
  v1 = getStringFromWasm0(ret[0], ret[1]).slice();
@@ -461,18 +453,26 @@ class Output {
461
453
  return v1;
462
454
  }
463
455
  /**
464
- * @returns {boolean}
456
+ * Get the code
457
+ * @returns {string}
465
458
  */
466
- get updatedBaseStyle() {
467
- const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
468
- return ret !== 0;
459
+ get code() {
460
+ let deferred1_0;
461
+ let deferred1_1;
462
+ try {
463
+ const ret = wasm.output_code(this.__wbg_ptr);
464
+ deferred1_0 = ret[0];
465
+ deferred1_1 = ret[1];
466
+ return getStringFromWasm0(ret[0], ret[1]);
467
+ } finally {
468
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
469
+ }
469
470
  }
470
471
  /**
471
- * Get the css
472
472
  * @returns {string | undefined}
473
473
  */
474
- get css() {
475
- const ret = wasm.output_css(this.__wbg_ptr);
474
+ get cssFile() {
475
+ const ret = wasm.output_cssFile(this.__wbg_ptr);
476
476
  let v1;
477
477
  if (ret[0] !== 0) {
478
478
  v1 = getStringFromWasm0(ret[0], ret[1]).slice();
package/pkg/index_bg.wasm CHANGED
Binary file
@@ -2,29 +2,29 @@
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
4
  export const __wbg_output_free: (a: number, b: number) => void;
5
+ export const codeExtract: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number, number];
6
+ export const exportClassMap: () => [number, number, number, number];
7
+ export const exportFileMap: () => [number, number, number, number];
8
+ export const exportSheet: () => [number, number, number, number];
9
+ export const getCss: (a: number, b: number) => [number, number, number, number];
10
+ export const getDefaultTheme: () => [number, number, number, number];
11
+ export const getThemeInterface: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
12
+ export const importClassMap: (a: any) => [number, number];
13
+ export const importFileMap: (a: any) => [number, number];
14
+ export const importSheet: (a: any) => [number, number];
15
+ export const isDebug: () => number;
5
16
  export const output_code: (a: number) => [number, number];
17
+ export const output_css: (a: number) => [number, number];
6
18
  export const output_cssFile: (a: number) => [number, number];
7
19
  export const output_map: (a: number) => [number, number];
8
20
  export const output_updatedBaseStyle: (a: number) => number;
9
- export const output_css: (a: number) => [number, number];
10
- export const setDebug: (a: number) => void;
11
- export const isDebug: () => number;
12
- export const importSheet: (a: any) => [number, number];
13
- export const exportSheet: () => [number, number, number, number];
14
- export const importClassMap: (a: any) => [number, number];
15
- export const exportClassMap: () => [number, number, number, number];
16
- export const importFileMap: (a: any) => [number, number];
17
- export const exportFileMap: () => [number, number, number, number];
18
- export const codeExtract: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => [number, number, number];
19
21
  export const registerTheme: (a: any) => [number, number];
20
- export const getDefaultTheme: () => [number, number, number, number];
21
- export const getCss: (a: number, b: number) => [number, number, number, number];
22
- export const getThemeInterface: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
22
+ export const setDebug: (a: number) => void;
23
23
  export const __wbindgen_malloc: (a: number, b: number) => number;
24
24
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => 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 __wbindgen_free: (a: number, b: number, c: number) => void;
29
28
  export const __externref_table_dealloc: (a: number) => void;
29
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
30
30
  export const __wbindgen_start: () => void;