@devup-ui/wasm 1.0.45 → 1.0.47
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 +9 -9
- package/pkg/index.js +88 -87
- package/pkg/index_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/index.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function setDebug(debug: boolean): void;
|
|
4
|
-
export function importSheet(sheet_object: any): void;
|
|
5
|
-
export function exportClassMap(): string;
|
|
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;
|
|
9
|
-
export function registerTheme(theme_object: any): void;
|
|
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
3
|
export function importClassMap(sheet_object: any): void;
|
|
4
|
+
export function isDebug(): boolean;
|
|
13
5
|
export function importFileMap(sheet_object: any): void;
|
|
14
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;
|
|
15
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;
|
|
16
16
|
export class Output {
|
|
17
17
|
private constructor();
|
|
18
18
|
free(): void;
|
package/pkg/index.js
CHANGED
|
@@ -175,12 +175,6 @@ function getArrayU8FromWasm0(ptr, len) {
|
|
|
175
175
|
ptr = ptr >>> 0;
|
|
176
176
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
177
177
|
}
|
|
178
|
-
/**
|
|
179
|
-
* @param {boolean} debug
|
|
180
|
-
*/
|
|
181
|
-
exports.setDebug = function(debug) {
|
|
182
|
-
wasm.setDebug(debug);
|
|
183
|
-
};
|
|
184
178
|
|
|
185
179
|
function takeFromExternrefTable0(idx) {
|
|
186
180
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
@@ -190,21 +184,57 @@ function takeFromExternrefTable0(idx) {
|
|
|
190
184
|
/**
|
|
191
185
|
* @param {any} sheet_object
|
|
192
186
|
*/
|
|
193
|
-
exports.
|
|
194
|
-
const ret = wasm.
|
|
187
|
+
exports.importClassMap = function(sheet_object) {
|
|
188
|
+
const ret = wasm.importClassMap(sheet_object);
|
|
189
|
+
if (ret[1]) {
|
|
190
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @returns {boolean}
|
|
196
|
+
*/
|
|
197
|
+
exports.isDebug = function() {
|
|
198
|
+
const ret = wasm.isDebug();
|
|
199
|
+
return ret !== 0;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @param {any} sheet_object
|
|
204
|
+
*/
|
|
205
|
+
exports.importFileMap = function(sheet_object) {
|
|
206
|
+
const ret = wasm.importFileMap(sheet_object);
|
|
195
207
|
if (ret[1]) {
|
|
196
208
|
throw takeFromExternrefTable0(ret[0]);
|
|
197
209
|
}
|
|
198
210
|
};
|
|
199
211
|
|
|
200
212
|
/**
|
|
213
|
+
* @returns {string | undefined}
|
|
214
|
+
*/
|
|
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);
|
|
224
|
+
}
|
|
225
|
+
return v1;
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @param {number | null | undefined} file_num
|
|
230
|
+
* @param {boolean} import_main_css
|
|
201
231
|
* @returns {string}
|
|
202
232
|
*/
|
|
203
|
-
exports.
|
|
233
|
+
exports.getCss = function(file_num, import_main_css) {
|
|
204
234
|
let deferred2_0;
|
|
205
235
|
let deferred2_1;
|
|
206
236
|
try {
|
|
207
|
-
const ret = wasm.
|
|
237
|
+
const ret = wasm.getCss(isLikeNone(file_num) ? 0x100000001 : (file_num) >>> 0, import_main_css);
|
|
208
238
|
var ptr1 = ret[0];
|
|
209
239
|
var len1 = ret[1];
|
|
210
240
|
if (ret[3]) {
|
|
@@ -219,32 +249,6 @@ exports.exportClassMap = function() {
|
|
|
219
249
|
}
|
|
220
250
|
};
|
|
221
251
|
|
|
222
|
-
/**
|
|
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}
|
|
231
|
-
*/
|
|
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]);
|
|
244
|
-
}
|
|
245
|
-
return Output.__wrap(ret[0]);
|
|
246
|
-
};
|
|
247
|
-
|
|
248
252
|
/**
|
|
249
253
|
* @returns {string}
|
|
250
254
|
*/
|
|
@@ -268,20 +272,31 @@ exports.exportFileMap = function() {
|
|
|
268
272
|
};
|
|
269
273
|
|
|
270
274
|
/**
|
|
271
|
-
* @
|
|
275
|
+
* @param {boolean} debug
|
|
272
276
|
*/
|
|
273
|
-
exports.
|
|
274
|
-
|
|
275
|
-
return ret !== 0;
|
|
277
|
+
exports.setDebug = function(debug) {
|
|
278
|
+
wasm.setDebug(debug);
|
|
276
279
|
};
|
|
277
280
|
|
|
278
281
|
/**
|
|
279
|
-
* @
|
|
282
|
+
* @returns {string}
|
|
280
283
|
*/
|
|
281
|
-
exports.
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
284
|
+
exports.exportSheet = function() {
|
|
285
|
+
let deferred2_0;
|
|
286
|
+
let deferred2_1;
|
|
287
|
+
try {
|
|
288
|
+
const ret = wasm.exportSheet();
|
|
289
|
+
var ptr1 = ret[0];
|
|
290
|
+
var len1 = ret[1];
|
|
291
|
+
if (ret[3]) {
|
|
292
|
+
ptr1 = 0; len1 = 0;
|
|
293
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
294
|
+
}
|
|
295
|
+
deferred2_0 = ptr1;
|
|
296
|
+
deferred2_1 = len1;
|
|
297
|
+
return getStringFromWasm0(ptr1, len1);
|
|
298
|
+
} finally {
|
|
299
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
285
300
|
}
|
|
286
301
|
};
|
|
287
302
|
|
|
@@ -314,73 +329,59 @@ exports.getThemeInterface = function(package_name, color_interface_name, typogra
|
|
|
314
329
|
};
|
|
315
330
|
|
|
316
331
|
/**
|
|
317
|
-
* @param {
|
|
318
|
-
* @param {
|
|
319
|
-
* @
|
|
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}
|
|
320
340
|
*/
|
|
321
|
-
exports.
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
deferred2_1 = len1;
|
|
334
|
-
return getStringFromWasm0(ptr1, len1);
|
|
335
|
-
} finally {
|
|
336
|
-
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
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]);
|
|
337
353
|
}
|
|
354
|
+
return Output.__wrap(ret[0]);
|
|
338
355
|
};
|
|
339
356
|
|
|
340
357
|
/**
|
|
341
358
|
* @param {any} sheet_object
|
|
342
359
|
*/
|
|
343
|
-
exports.
|
|
344
|
-
const ret = wasm.
|
|
360
|
+
exports.importSheet = function(sheet_object) {
|
|
361
|
+
const ret = wasm.importSheet(sheet_object);
|
|
345
362
|
if (ret[1]) {
|
|
346
363
|
throw takeFromExternrefTable0(ret[0]);
|
|
347
364
|
}
|
|
348
365
|
};
|
|
349
366
|
|
|
350
367
|
/**
|
|
351
|
-
* @param {any}
|
|
368
|
+
* @param {any} theme_object
|
|
352
369
|
*/
|
|
353
|
-
exports.
|
|
354
|
-
const ret = wasm.
|
|
370
|
+
exports.registerTheme = function(theme_object) {
|
|
371
|
+
const ret = wasm.registerTheme(theme_object);
|
|
355
372
|
if (ret[1]) {
|
|
356
373
|
throw takeFromExternrefTable0(ret[0]);
|
|
357
374
|
}
|
|
358
375
|
};
|
|
359
376
|
|
|
360
|
-
/**
|
|
361
|
-
* @returns {string | undefined}
|
|
362
|
-
*/
|
|
363
|
-
exports.getDefaultTheme = function() {
|
|
364
|
-
const ret = wasm.getDefaultTheme();
|
|
365
|
-
if (ret[3]) {
|
|
366
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
367
|
-
}
|
|
368
|
-
let v1;
|
|
369
|
-
if (ret[0] !== 0) {
|
|
370
|
-
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
371
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
372
|
-
}
|
|
373
|
-
return v1;
|
|
374
|
-
};
|
|
375
|
-
|
|
376
377
|
/**
|
|
377
378
|
* @returns {string}
|
|
378
379
|
*/
|
|
379
|
-
exports.
|
|
380
|
+
exports.exportClassMap = function() {
|
|
380
381
|
let deferred2_0;
|
|
381
382
|
let deferred2_1;
|
|
382
383
|
try {
|
|
383
|
-
const ret = wasm.
|
|
384
|
+
const ret = wasm.exportClassMap();
|
|
384
385
|
var ptr1 = ret[0];
|
|
385
386
|
var len1 = ret[1];
|
|
386
387
|
if (ret[3]) {
|
package/pkg/index_bg.wasm
CHANGED
|
Binary file
|