@devup-ui/wasm 1.0.32 → 1.0.33
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 +1 -1
- package/pkg/index.d.ts +5 -2
- package/pkg/index.js +55 -6
- package/pkg/index_bg.wasm +0 -0
- package/pkg/index_bg.wasm.d.ts +5 -2
package/package.json
CHANGED
package/pkg/index.d.ts
CHANGED
|
@@ -6,10 +6,12 @@ export function importSheet(sheet_object: any): void;
|
|
|
6
6
|
export function exportSheet(): string;
|
|
7
7
|
export function importClassMap(sheet_object: any): void;
|
|
8
8
|
export function exportClassMap(): string;
|
|
9
|
-
export function
|
|
9
|
+
export function importFileMap(sheet_object: any): void;
|
|
10
|
+
export function exportFileMap(): string;
|
|
11
|
+
export function codeExtract(filename: string, code: string, _package: string, css_dir: string, single_css: boolean): Output;
|
|
10
12
|
export function registerTheme(theme_object: any): void;
|
|
11
13
|
export function getDefaultTheme(): string | undefined;
|
|
12
|
-
export function getCss(): string;
|
|
14
|
+
export function getCss(file_num?: number | null): string;
|
|
13
15
|
export function getThemeInterface(package_name: string, color_interface_name: string, typography_interface_name: string, theme_interface_name: string): string;
|
|
14
16
|
export class Output {
|
|
15
17
|
private constructor();
|
|
@@ -18,6 +20,7 @@ export class Output {
|
|
|
18
20
|
* Get the code
|
|
19
21
|
*/
|
|
20
22
|
readonly code: string;
|
|
23
|
+
readonly css_file: string;
|
|
21
24
|
readonly map: string | undefined;
|
|
22
25
|
/**
|
|
23
26
|
* Get the css
|
package/pkg/index.js
CHANGED
|
@@ -254,23 +254,56 @@ module.exports.exportClassMap = function() {
|
|
|
254
254
|
}
|
|
255
255
|
};
|
|
256
256
|
|
|
257
|
+
/**
|
|
258
|
+
* @param {any} sheet_object
|
|
259
|
+
*/
|
|
260
|
+
module.exports.importFileMap = function(sheet_object) {
|
|
261
|
+
const ret = wasm.importFileMap(sheet_object);
|
|
262
|
+
if (ret[1]) {
|
|
263
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @returns {string}
|
|
269
|
+
*/
|
|
270
|
+
module.exports.exportFileMap = function() {
|
|
271
|
+
let deferred2_0;
|
|
272
|
+
let deferred2_1;
|
|
273
|
+
try {
|
|
274
|
+
const ret = wasm.exportFileMap();
|
|
275
|
+
var ptr1 = ret[0];
|
|
276
|
+
var len1 = ret[1];
|
|
277
|
+
if (ret[3]) {
|
|
278
|
+
ptr1 = 0; len1 = 0;
|
|
279
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
280
|
+
}
|
|
281
|
+
deferred2_0 = ptr1;
|
|
282
|
+
deferred2_1 = len1;
|
|
283
|
+
return getStringFromWasm0(ptr1, len1);
|
|
284
|
+
} finally {
|
|
285
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
257
289
|
/**
|
|
258
290
|
* @param {string} filename
|
|
259
291
|
* @param {string} code
|
|
260
292
|
* @param {string} _package
|
|
261
|
-
* @param {string}
|
|
293
|
+
* @param {string} css_dir
|
|
294
|
+
* @param {boolean} single_css
|
|
262
295
|
* @returns {Output}
|
|
263
296
|
*/
|
|
264
|
-
module.exports.codeExtract = function(filename, code, _package,
|
|
297
|
+
module.exports.codeExtract = function(filename, code, _package, css_dir, single_css) {
|
|
265
298
|
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
299
|
const len0 = WASM_VECTOR_LEN;
|
|
267
300
|
const ptr1 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
301
|
const len1 = WASM_VECTOR_LEN;
|
|
269
302
|
const ptr2 = passStringToWasm0(_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
270
303
|
const len2 = WASM_VECTOR_LEN;
|
|
271
|
-
const ptr3 = passStringToWasm0(
|
|
304
|
+
const ptr3 = passStringToWasm0(css_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
272
305
|
const len3 = WASM_VECTOR_LEN;
|
|
273
|
-
const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
306
|
+
const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, single_css);
|
|
274
307
|
if (ret[2]) {
|
|
275
308
|
throw takeFromExternrefTable0(ret[1]);
|
|
276
309
|
}
|
|
@@ -304,13 +337,14 @@ module.exports.getDefaultTheme = function() {
|
|
|
304
337
|
};
|
|
305
338
|
|
|
306
339
|
/**
|
|
340
|
+
* @param {number | null} [file_num]
|
|
307
341
|
* @returns {string}
|
|
308
342
|
*/
|
|
309
|
-
module.exports.getCss = function() {
|
|
343
|
+
module.exports.getCss = function(file_num) {
|
|
310
344
|
let deferred2_0;
|
|
311
345
|
let deferred2_1;
|
|
312
346
|
try {
|
|
313
|
-
const ret = wasm.getCss();
|
|
347
|
+
const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0);
|
|
314
348
|
var ptr1 = ret[0];
|
|
315
349
|
var len1 = ret[1];
|
|
316
350
|
if (ret[3]) {
|
|
@@ -394,6 +428,21 @@ class Output {
|
|
|
394
428
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
395
429
|
}
|
|
396
430
|
}
|
|
431
|
+
/**
|
|
432
|
+
* @returns {string}
|
|
433
|
+
*/
|
|
434
|
+
get css_file() {
|
|
435
|
+
let deferred1_0;
|
|
436
|
+
let deferred1_1;
|
|
437
|
+
try {
|
|
438
|
+
const ret = wasm.output_css_file(this.__wbg_ptr);
|
|
439
|
+
deferred1_0 = ret[0];
|
|
440
|
+
deferred1_1 = ret[1];
|
|
441
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
442
|
+
} finally {
|
|
443
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
397
446
|
/**
|
|
398
447
|
* @returns {string | undefined}
|
|
399
448
|
*/
|
package/pkg/index_bg.wasm
CHANGED
|
Binary file
|
package/pkg/index_bg.wasm.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_output_free: (a: number, b: number) => void;
|
|
5
5
|
export const output_code: (a: number) => [number, number];
|
|
6
|
+
export const output_css_file: (a: number) => [number, number];
|
|
6
7
|
export const output_map: (a: number) => [number, number];
|
|
7
8
|
export const output_css: (a: number) => [number, number];
|
|
8
9
|
export const setDebug: (a: number) => void;
|
|
@@ -11,10 +12,12 @@ export const importSheet: (a: any) => [number, number];
|
|
|
11
12
|
export const exportSheet: () => [number, number, number, number];
|
|
12
13
|
export const importClassMap: (a: any) => [number, number];
|
|
13
14
|
export const exportClassMap: () => [number, number, number, number];
|
|
14
|
-
export const
|
|
15
|
+
export const importFileMap: (a: any) => [number, number];
|
|
16
|
+
export const exportFileMap: () => [number, number, number, number];
|
|
17
|
+
export const codeExtract: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
15
18
|
export const registerTheme: (a: any) => [number, number];
|
|
16
19
|
export const getDefaultTheme: () => [number, number, number, number];
|
|
17
|
-
export const getCss: () => [number, number, number, number];
|
|
20
|
+
export const getCss: (a: number) => [number, number, number, number];
|
|
18
21
|
export const getThemeInterface: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
19
22
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
20
23
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|