@devup-ui/wasm 1.0.32 → 1.0.34
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 +6 -2
- package/pkg/index.js +62 -6
- package/pkg/index_bg.wasm +0 -0
- package/pkg/index_bg.wasm.d.ts +6 -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, import_main_css_in_code: boolean, import_main_css_in_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 | undefined, import_main_css: boolean): 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,7 +20,9 @@ export class Output {
|
|
|
18
20
|
* Get the code
|
|
19
21
|
*/
|
|
20
22
|
readonly code: string;
|
|
23
|
+
readonly cssFile: string | undefined;
|
|
21
24
|
readonly map: string | undefined;
|
|
25
|
+
readonly updatedBaseStyle: boolean;
|
|
22
26
|
/**
|
|
23
27
|
* Get the css
|
|
24
28
|
*/
|
package/pkg/index.js
CHANGED
|
@@ -254,23 +254,58 @@ 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
|
|
295
|
+
* @param {boolean} import_main_css_in_code
|
|
296
|
+
* @param {boolean} import_main_css_in_css
|
|
262
297
|
* @returns {Output}
|
|
263
298
|
*/
|
|
264
|
-
module.exports.codeExtract = function(filename, code, _package,
|
|
299
|
+
module.exports.codeExtract = function(filename, code, _package, css_dir, single_css, import_main_css_in_code, import_main_css_in_css) {
|
|
265
300
|
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
266
301
|
const len0 = WASM_VECTOR_LEN;
|
|
267
302
|
const ptr1 = passStringToWasm0(code, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
268
303
|
const len1 = WASM_VECTOR_LEN;
|
|
269
304
|
const ptr2 = passStringToWasm0(_package, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
270
305
|
const len2 = WASM_VECTOR_LEN;
|
|
271
|
-
const ptr3 = passStringToWasm0(
|
|
306
|
+
const ptr3 = passStringToWasm0(css_dir, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
272
307
|
const len3 = WASM_VECTOR_LEN;
|
|
273
|
-
const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
308
|
+
const ret = wasm.codeExtract(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, single_css, import_main_css_in_code, import_main_css_in_css);
|
|
274
309
|
if (ret[2]) {
|
|
275
310
|
throw takeFromExternrefTable0(ret[1]);
|
|
276
311
|
}
|
|
@@ -304,13 +339,15 @@ module.exports.getDefaultTheme = function() {
|
|
|
304
339
|
};
|
|
305
340
|
|
|
306
341
|
/**
|
|
342
|
+
* @param {number | null | undefined} file_num
|
|
343
|
+
* @param {boolean} import_main_css
|
|
307
344
|
* @returns {string}
|
|
308
345
|
*/
|
|
309
|
-
module.exports.getCss = function() {
|
|
346
|
+
module.exports.getCss = function(file_num, import_main_css) {
|
|
310
347
|
let deferred2_0;
|
|
311
348
|
let deferred2_1;
|
|
312
349
|
try {
|
|
313
|
-
const ret = wasm.getCss();
|
|
350
|
+
const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0, import_main_css);
|
|
314
351
|
var ptr1 = ret[0];
|
|
315
352
|
var len1 = ret[1];
|
|
316
353
|
if (ret[3]) {
|
|
@@ -394,6 +431,18 @@ class Output {
|
|
|
394
431
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
395
432
|
}
|
|
396
433
|
}
|
|
434
|
+
/**
|
|
435
|
+
* @returns {string | undefined}
|
|
436
|
+
*/
|
|
437
|
+
get cssFile() {
|
|
438
|
+
const ret = wasm.output_cssFile(this.__wbg_ptr);
|
|
439
|
+
let v1;
|
|
440
|
+
if (ret[0] !== 0) {
|
|
441
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
442
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
443
|
+
}
|
|
444
|
+
return v1;
|
|
445
|
+
}
|
|
397
446
|
/**
|
|
398
447
|
* @returns {string | undefined}
|
|
399
448
|
*/
|
|
@@ -406,6 +455,13 @@ class Output {
|
|
|
406
455
|
}
|
|
407
456
|
return v1;
|
|
408
457
|
}
|
|
458
|
+
/**
|
|
459
|
+
* @returns {boolean}
|
|
460
|
+
*/
|
|
461
|
+
get updatedBaseStyle() {
|
|
462
|
+
const ret = wasm.output_updatedBaseStyle(this.__wbg_ptr);
|
|
463
|
+
return ret !== 0;
|
|
464
|
+
}
|
|
409
465
|
/**
|
|
410
466
|
* Get the css
|
|
411
467
|
* @returns {string | undefined}
|
package/pkg/index_bg.wasm
CHANGED
|
Binary file
|
package/pkg/index_bg.wasm.d.ts
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
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_cssFile: (a: number) => [number, number];
|
|
6
7
|
export const output_map: (a: number) => [number, number];
|
|
8
|
+
export const output_updatedBaseStyle: (a: number) => number;
|
|
7
9
|
export const output_css: (a: number) => [number, number];
|
|
8
10
|
export const setDebug: (a: number) => void;
|
|
9
11
|
export const isDebug: () => number;
|
|
@@ -11,10 +13,12 @@ export const importSheet: (a: any) => [number, number];
|
|
|
11
13
|
export const exportSheet: () => [number, number, number, number];
|
|
12
14
|
export const importClassMap: (a: any) => [number, number];
|
|
13
15
|
export const exportClassMap: () => [number, number, number, number];
|
|
14
|
-
export const
|
|
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];
|
|
15
19
|
export const registerTheme: (a: any) => [number, number];
|
|
16
20
|
export const getDefaultTheme: () => [number, number, number, number];
|
|
17
|
-
export const getCss: () => [number, number, number, number];
|
|
21
|
+
export const getCss: (a: number, b: number) => [number, number, number, number];
|
|
18
22
|
export const getThemeInterface: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number];
|
|
19
23
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
20
24
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|