@pandacss/compiler-wasm 2.0.0-beta.2 → 2.0.0-beta.20
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/dist/{chunk-R2J25HLY.js → chunk-ZARW4JPN.js} +43 -17
- package/dist/index.d.ts +26 -17
- package/dist/index.js +16 -7
- package/dist/{web-Z44NGLTK.js → web-JSAD2QZX.js} +3 -1
- package/dist/web.d.ts +26 -17
- package/dist/web.js +43 -17
- package/package.json +5 -3
- package/pkg-node/compiler_wasm.d.ts +67 -35
- package/pkg-node/compiler_wasm.js +290 -74
- package/pkg-node/compiler_wasm_bg.wasm +0 -0
- package/pkg-node/compiler_wasm_bg.wasm.d.ts +15 -4
- package/pkg-web/compiler_wasm.d.ts +82 -39
- package/pkg-web/compiler_wasm.js +290 -74
- package/pkg-web/compiler_wasm_bg.wasm +0 -0
- package/pkg-web/compiler_wasm_bg.wasm.d.ts +15 -4
|
@@ -31,6 +31,24 @@ class WasmCompiler {
|
|
|
31
31
|
const ptr = this.__destroy_into_raw();
|
|
32
32
|
wasm.__wbg_wasmcompiler_free(ptr, 0);
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* Files whose folded imports changed since the last call. Clears on read.
|
|
36
|
+
* Re-parse each via `refreshFile`, then call again until empty.
|
|
37
|
+
* @returns {string[]}
|
|
38
|
+
*/
|
|
39
|
+
affectedFiles() {
|
|
40
|
+
try {
|
|
41
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
42
|
+
wasm.wasmcompiler_affectedFiles(retptr, this.__wbg_ptr);
|
|
43
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
44
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
45
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
46
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
47
|
+
return v1;
|
|
48
|
+
} finally {
|
|
49
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
34
52
|
/**
|
|
35
53
|
* Hydrate an external build info into this project (additive), optionally
|
|
36
54
|
* restricted to imported modules (tree-shaking). Returns `false` on a
|
|
@@ -165,6 +183,62 @@ class WasmCompiler {
|
|
|
165
183
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
166
184
|
}
|
|
167
185
|
}
|
|
186
|
+
/**
|
|
187
|
+
* Build a `panda/lib.json` value from host-supplied fields, stamping the
|
|
188
|
+
* engine-owned schema version. Backs the `designSystem.create` JS namespace.
|
|
189
|
+
*
|
|
190
|
+
* # Errors
|
|
191
|
+
* Returns a JS error if `input` is invalid or the manifest fails to serialize.
|
|
192
|
+
* @param {any} input
|
|
193
|
+
* @returns {any}
|
|
194
|
+
*/
|
|
195
|
+
createDesignSystemManifest(input) {
|
|
196
|
+
try {
|
|
197
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
198
|
+
wasm.wasmcompiler_createDesignSystemManifest(retptr, this.__wbg_ptr, addHeapObject(input));
|
|
199
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
200
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
201
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
202
|
+
if (r2) {
|
|
203
|
+
throw takeObject(r1);
|
|
204
|
+
}
|
|
205
|
+
return takeObject(r0);
|
|
206
|
+
} finally {
|
|
207
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Per-package import selections from one scan. Each entry is `null` = all,
|
|
212
|
+
* or export names to narrow.
|
|
213
|
+
*
|
|
214
|
+
* # Errors
|
|
215
|
+
* Returns a JS error when the scan fails or serialization fails.
|
|
216
|
+
* @param {any} packages
|
|
217
|
+
* @returns {any}
|
|
218
|
+
*/
|
|
219
|
+
designSystemImportSelections(packages) {
|
|
220
|
+
try {
|
|
221
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
222
|
+
wasm.wasmcompiler_designSystemImportSelections(retptr, this.__wbg_ptr, addHeapObject(packages));
|
|
223
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
224
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
225
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
226
|
+
if (r2) {
|
|
227
|
+
throw takeObject(r1);
|
|
228
|
+
}
|
|
229
|
+
return takeObject(r0);
|
|
230
|
+
} finally {
|
|
231
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* The manifest wire-format version this binding reads/writes.
|
|
236
|
+
* @returns {number}
|
|
237
|
+
*/
|
|
238
|
+
designSystemManifestSchemaVersion() {
|
|
239
|
+
const ret = wasm.wasmcompiler_designSystemManifestSchemaVersion(this.__wbg_ptr);
|
|
240
|
+
return ret >>> 0;
|
|
241
|
+
}
|
|
168
242
|
/**
|
|
169
243
|
* Config validation diagnostics from construction.
|
|
170
244
|
*
|
|
@@ -312,9 +386,6 @@ class WasmCompiler {
|
|
|
312
386
|
}
|
|
313
387
|
/**
|
|
314
388
|
* Generate artifacts affected by the provided config dependency names.
|
|
315
|
-
*
|
|
316
|
-
* # Errors
|
|
317
|
-
* Returns a JS error if dependencies/options are invalid or serializing fails.
|
|
318
389
|
* @param {any} dependencies
|
|
319
390
|
* @param {any} options
|
|
320
391
|
* @returns {any}
|
|
@@ -337,9 +408,6 @@ class WasmCompiler {
|
|
|
337
408
|
}
|
|
338
409
|
/**
|
|
339
410
|
* Generate one codegen artifact by id.
|
|
340
|
-
*
|
|
341
|
-
* # Errors
|
|
342
|
-
* Returns a JS error if the id/options are invalid or serializing fails.
|
|
343
411
|
* @param {string} id
|
|
344
412
|
* @param {any} options
|
|
345
413
|
* @returns {any}
|
|
@@ -364,9 +432,6 @@ class WasmCompiler {
|
|
|
364
432
|
}
|
|
365
433
|
/**
|
|
366
434
|
* Generate every codegen artifact from the resolved project state.
|
|
367
|
-
*
|
|
368
|
-
* # Errors
|
|
369
|
-
* Returns a JS error if options are invalid or serializing fails.
|
|
370
435
|
* @param {any} options
|
|
371
436
|
* @returns {any}
|
|
372
437
|
*/
|
|
@@ -411,6 +476,71 @@ class WasmCompiler {
|
|
|
411
476
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
412
477
|
}
|
|
413
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* Theme `@keyframes` CSS only (no token vars or other layers).
|
|
481
|
+
* @param {any | null} [options]
|
|
482
|
+
* @returns {any}
|
|
483
|
+
*/
|
|
484
|
+
getKeyframeCss(options) {
|
|
485
|
+
try {
|
|
486
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
487
|
+
wasm.wasmcompiler_getKeyframeCss(retptr, this.__wbg_ptr, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
488
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
489
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
490
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
491
|
+
if (r2) {
|
|
492
|
+
throw takeObject(r1);
|
|
493
|
+
}
|
|
494
|
+
return takeObject(r0);
|
|
495
|
+
} finally {
|
|
496
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
/**
|
|
500
|
+
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
501
|
+
* (byte offsets stay valid); unknown layer names are skipped.
|
|
502
|
+
* @param {any} options
|
|
503
|
+
* @returns {any}
|
|
504
|
+
*/
|
|
505
|
+
getLayerCss(options) {
|
|
506
|
+
try {
|
|
507
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
508
|
+
wasm.wasmcompiler_getLayerCss(retptr, this.__wbg_ptr, addHeapObject(options));
|
|
509
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
510
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
511
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
512
|
+
if (r2) {
|
|
513
|
+
throw takeObject(r1);
|
|
514
|
+
}
|
|
515
|
+
return takeObject(r0);
|
|
516
|
+
} finally {
|
|
517
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
522
|
+
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
523
|
+
*
|
|
524
|
+
* # Errors
|
|
525
|
+
* Returns a JS error if serializing fails.
|
|
526
|
+
* @param {any | null} [options]
|
|
527
|
+
* @returns {any}
|
|
528
|
+
*/
|
|
529
|
+
getSplitCss(options) {
|
|
530
|
+
try {
|
|
531
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
532
|
+
wasm.wasmcompiler_getSplitCss(retptr, this.__wbg_ptr, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
533
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
534
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
535
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
536
|
+
if (r2) {
|
|
537
|
+
throw takeObject(r1);
|
|
538
|
+
}
|
|
539
|
+
return takeObject(r0);
|
|
540
|
+
} finally {
|
|
541
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
542
|
+
}
|
|
543
|
+
}
|
|
414
544
|
/**
|
|
415
545
|
* Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
|
|
416
546
|
* marking it as the stylesheet root to inject the compiled CSS into.
|
|
@@ -500,30 +630,6 @@ class WasmCompiler {
|
|
|
500
630
|
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
501
631
|
}
|
|
502
632
|
}
|
|
503
|
-
/**
|
|
504
|
-
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
505
|
-
* (byte offsets stay valid); unknown layer names are skipped.
|
|
506
|
-
* @param {string[]} layers
|
|
507
|
-
* @returns {string}
|
|
508
|
-
*/
|
|
509
|
-
layerCss(layers) {
|
|
510
|
-
let deferred2_0;
|
|
511
|
-
let deferred2_1;
|
|
512
|
-
try {
|
|
513
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
514
|
-
const ptr0 = passArrayJsValueToWasm0(layers, wasm.__wbindgen_export);
|
|
515
|
-
const len0 = WASM_VECTOR_LEN;
|
|
516
|
-
wasm.wasmcompiler_layerCss(retptr, this.__wbg_ptr, ptr0, len0);
|
|
517
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
518
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
519
|
-
deferred2_0 = r0;
|
|
520
|
-
deferred2_1 = r1;
|
|
521
|
-
return getStringFromWasm0(r0, r1);
|
|
522
|
-
} finally {
|
|
523
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
524
|
-
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
633
|
/**
|
|
528
634
|
* The resolved cascade-layer names (config overrides merged over defaults).
|
|
529
635
|
*
|
|
@@ -601,8 +707,8 @@ class WasmCompiler {
|
|
|
601
707
|
}
|
|
602
708
|
}
|
|
603
709
|
/**
|
|
604
|
-
* Read + parse source paths
|
|
605
|
-
*
|
|
710
|
+
* Read + parse source paths from `scan()`. One report per requested path;
|
|
711
|
+
* a read miss keeps last-good state and reports a warning diagnostic.
|
|
606
712
|
*
|
|
607
713
|
* # Errors
|
|
608
714
|
* Returns a JS error when `paths` is malformed or serializing the report fails.
|
|
@@ -709,8 +815,7 @@ class WasmCompiler {
|
|
|
709
815
|
return ret !== 0;
|
|
710
816
|
}
|
|
711
817
|
/**
|
|
712
|
-
* Register a JS-backed pattern transform callback.
|
|
713
|
-
* installs callbacks referenced by the serialized config snapshot.
|
|
818
|
+
* Register a JS-backed pattern transform callback.
|
|
714
819
|
* @param {string} id
|
|
715
820
|
* @param {Function} callback
|
|
716
821
|
*/
|
|
@@ -720,8 +825,7 @@ class WasmCompiler {
|
|
|
720
825
|
wasm.wasmcompiler_registerPatternTransform(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
|
|
721
826
|
}
|
|
722
827
|
/**
|
|
723
|
-
* Register a JS-backed `parser:before` source transform
|
|
724
|
-
* filter. The filter is evaluated before calling into JS.
|
|
828
|
+
* Register a JS-backed `parser:before` source transform.
|
|
725
829
|
* @param {string} id
|
|
726
830
|
* @param {any} filter
|
|
727
831
|
* @param {Function} callback
|
|
@@ -742,8 +846,7 @@ class WasmCompiler {
|
|
|
742
846
|
}
|
|
743
847
|
}
|
|
744
848
|
/**
|
|
745
|
-
* Register a JS-backed utility transform callback.
|
|
746
|
-
* the user callback so Rust only has to pass the raw value.
|
|
849
|
+
* Register a JS-backed utility transform callback.
|
|
747
850
|
* @param {string} id
|
|
748
851
|
* @param {Function} callback
|
|
749
852
|
*/
|
|
@@ -844,14 +947,15 @@ class WasmCompiler {
|
|
|
844
947
|
* # Errors
|
|
845
948
|
* Returns a JS error if serializing the build info fails.
|
|
846
949
|
* @param {string} panda
|
|
950
|
+
* @param {any} dependencies
|
|
847
951
|
* @returns {any}
|
|
848
952
|
*/
|
|
849
|
-
serializeBuildInfo(panda) {
|
|
953
|
+
serializeBuildInfo(panda, dependencies) {
|
|
850
954
|
try {
|
|
851
955
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
852
956
|
const ptr0 = passStringToWasm0(panda, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
853
957
|
const len0 = WASM_VECTOR_LEN;
|
|
854
|
-
wasm.wasmcompiler_serializeBuildInfo(retptr, this.__wbg_ptr, ptr0, len0);
|
|
958
|
+
wasm.wasmcompiler_serializeBuildInfo(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(dependencies));
|
|
855
959
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
856
960
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
857
961
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -930,17 +1034,16 @@ class WasmCompiler {
|
|
|
930
1034
|
}
|
|
931
1035
|
}
|
|
932
1036
|
/**
|
|
933
|
-
*
|
|
934
|
-
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
1037
|
+
* `staticCss.patterns` expansion as raw atoms, without compiling.
|
|
935
1038
|
*
|
|
936
1039
|
* # Errors
|
|
937
1040
|
* Returns a JS error if serializing fails.
|
|
938
1041
|
* @returns {any}
|
|
939
1042
|
*/
|
|
940
|
-
|
|
1043
|
+
staticPatternAtoms() {
|
|
941
1044
|
try {
|
|
942
1045
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
943
|
-
wasm.
|
|
1046
|
+
wasm.wasmcompiler_staticPatternAtoms(retptr, this.__wbg_ptr);
|
|
944
1047
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
945
1048
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
946
1049
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -953,16 +1056,70 @@ class WasmCompiler {
|
|
|
953
1056
|
}
|
|
954
1057
|
}
|
|
955
1058
|
/**
|
|
956
|
-
*
|
|
1059
|
+
* Remove Panda `@layer a, b;` order statements; leave unrelated ones.
|
|
1060
|
+
* @param {string} css
|
|
1061
|
+
* @returns {string}
|
|
1062
|
+
*/
|
|
1063
|
+
stripLayerOrderStatements(css) {
|
|
1064
|
+
let deferred2_0;
|
|
1065
|
+
let deferred2_1;
|
|
1066
|
+
try {
|
|
1067
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1068
|
+
const ptr0 = passStringToWasm0(css, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1069
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1070
|
+
wasm.wasmcompiler_stripLayerOrderStatements(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1071
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1072
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1073
|
+
deferred2_0 = r0;
|
|
1074
|
+
deferred2_1 = r1;
|
|
1075
|
+
return getStringFromWasm0(r0, r1);
|
|
1076
|
+
} finally {
|
|
1077
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1078
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Semantic tokens that carry the same value as a token path.
|
|
957
1083
|
*
|
|
958
1084
|
* # Errors
|
|
959
|
-
* Returns a JS error if
|
|
1085
|
+
* Returns a JS error if serialization fails.
|
|
1086
|
+
* @param {string} path
|
|
960
1087
|
* @returns {any}
|
|
961
1088
|
*/
|
|
962
|
-
|
|
1089
|
+
suggestSemanticTokens(path) {
|
|
963
1090
|
try {
|
|
964
1091
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
965
|
-
wasm.
|
|
1092
|
+
const ptr0 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1093
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1094
|
+
wasm.wasmcompiler_suggestSemanticTokens(retptr, this.__wbg_ptr, ptr0, len0);
|
|
1095
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1096
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1097
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1098
|
+
if (r2) {
|
|
1099
|
+
throw takeObject(r1);
|
|
1100
|
+
}
|
|
1101
|
+
return takeObject(r0);
|
|
1102
|
+
} finally {
|
|
1103
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
/**
|
|
1107
|
+
* Tokens that carry a hardcoded value, ranked (safe equivalents first).
|
|
1108
|
+
*
|
|
1109
|
+
* # Errors
|
|
1110
|
+
* Returns a JS error if serialization fails.
|
|
1111
|
+
* @param {string} prop
|
|
1112
|
+
* @param {string} value
|
|
1113
|
+
* @returns {any}
|
|
1114
|
+
*/
|
|
1115
|
+
suggestTokens(prop, value) {
|
|
1116
|
+
try {
|
|
1117
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1118
|
+
const ptr0 = passStringToWasm0(prop, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1119
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1120
|
+
const ptr1 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1121
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1122
|
+
wasm.wasmcompiler_suggestTokens(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
966
1123
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
967
1124
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
968
1125
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1000,10 +1157,10 @@ class WasmCompiler {
|
|
|
1000
1157
|
* Rust-built token dictionary projected into the small JS interop shape.
|
|
1001
1158
|
* @returns {any}
|
|
1002
1159
|
*/
|
|
1003
|
-
|
|
1160
|
+
tokenDictionary() {
|
|
1004
1161
|
try {
|
|
1005
1162
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1006
|
-
wasm.
|
|
1163
|
+
wasm.wasmcompiler_tokenDictionary(retptr, this.__wbg_ptr);
|
|
1007
1164
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1008
1165
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1009
1166
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -1016,11 +1173,7 @@ class WasmCompiler {
|
|
|
1016
1173
|
}
|
|
1017
1174
|
}
|
|
1018
1175
|
/**
|
|
1019
|
-
* Generate artifacts and write them under `outdir
|
|
1020
|
-
* Returns the written paths.
|
|
1021
|
-
*
|
|
1022
|
-
* # Errors
|
|
1023
|
-
* Returns a JS error if a file fails to write or results fail to serialize.
|
|
1176
|
+
* Generate artifacts and write them under `outdir`.
|
|
1024
1177
|
* @param {any} options
|
|
1025
1178
|
* @returns {any}
|
|
1026
1179
|
*/
|
|
@@ -1058,6 +1211,25 @@ class WasmCompiler {
|
|
|
1058
1211
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1059
1212
|
}
|
|
1060
1213
|
}
|
|
1214
|
+
/**
|
|
1215
|
+
* @param {any} options
|
|
1216
|
+
* @returns {any}
|
|
1217
|
+
*/
|
|
1218
|
+
writeLayerCss(options) {
|
|
1219
|
+
try {
|
|
1220
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1221
|
+
wasm.wasmcompiler_writeLayerCss(retptr, this.__wbg_ptr, addHeapObject(options));
|
|
1222
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1223
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1224
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1225
|
+
if (r2) {
|
|
1226
|
+
throw takeObject(r1);
|
|
1227
|
+
}
|
|
1228
|
+
return takeObject(r0);
|
|
1229
|
+
} finally {
|
|
1230
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1061
1233
|
/**
|
|
1062
1234
|
* @param {any} options
|
|
1063
1235
|
* @returns {any}
|
|
@@ -1355,6 +1527,9 @@ function __wbg_get_imports() {
|
|
|
1355
1527
|
__wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
|
|
1356
1528
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1357
1529
|
},
|
|
1530
|
+
__wbg__wbg_cb_unref_3fa391f3fcdb55f8: function(arg0) {
|
|
1531
|
+
getObject(arg0)._wbg_cb_unref();
|
|
1532
|
+
},
|
|
1358
1533
|
__wbg_call_13665d9f14390edc: function() { return handleError(function (arg0, arg1) {
|
|
1359
1534
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1360
1535
|
return addHeapObject(ret);
|
|
@@ -1502,10 +1677,6 @@ function __wbg_get_imports() {
|
|
|
1502
1677
|
const ret = getObject(arg0).next();
|
|
1503
1678
|
return addHeapObject(ret);
|
|
1504
1679
|
}, arguments); },
|
|
1505
|
-
__wbg_parse_2c1cad6215e84999: function() { return handleError(function (arg0, arg1) {
|
|
1506
|
-
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
1507
|
-
return addHeapObject(ret);
|
|
1508
|
-
}, arguments); },
|
|
1509
1680
|
__wbg_prototypesetcall_5f9bdc8d75e07276: function(arg0, arg1, arg2) {
|
|
1510
1681
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1511
1682
|
},
|
|
@@ -1515,6 +1686,10 @@ function __wbg_get_imports() {
|
|
|
1515
1686
|
__wbg_set_78ea6a19f4818587: function(arg0, arg1, arg2) {
|
|
1516
1687
|
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1517
1688
|
},
|
|
1689
|
+
__wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1690
|
+
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
1691
|
+
return ret;
|
|
1692
|
+
}, arguments); },
|
|
1518
1693
|
__wbg_set_facb7a5914e0fa39: function(arg0, arg1, arg2) {
|
|
1519
1694
|
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
1520
1695
|
return addHeapObject(ret);
|
|
@@ -1530,22 +1705,27 @@ function __wbg_get_imports() {
|
|
|
1530
1705
|
const ret = getObject(arg0).value;
|
|
1531
1706
|
return addHeapObject(ret);
|
|
1532
1707
|
},
|
|
1533
|
-
__wbindgen_cast_0000000000000001: function(arg0) {
|
|
1708
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
1709
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [String], shim_idx: 12, ret: Externref, inner_ret: Some(Externref) }, mutable: false }) -> Externref`.
|
|
1710
|
+
const ret = makeClosure(arg0, arg1, __wasm_bindgen_func_elem_504);
|
|
1711
|
+
return addHeapObject(ret);
|
|
1712
|
+
},
|
|
1713
|
+
__wbindgen_cast_0000000000000002: function(arg0) {
|
|
1534
1714
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1535
1715
|
const ret = arg0;
|
|
1536
1716
|
return addHeapObject(ret);
|
|
1537
1717
|
},
|
|
1538
|
-
|
|
1718
|
+
__wbindgen_cast_0000000000000003: function(arg0) {
|
|
1539
1719
|
// Cast intrinsic for `I64 -> Externref`.
|
|
1540
1720
|
const ret = arg0;
|
|
1541
1721
|
return addHeapObject(ret);
|
|
1542
1722
|
},
|
|
1543
|
-
|
|
1723
|
+
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
1544
1724
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1545
1725
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1546
1726
|
return addHeapObject(ret);
|
|
1547
1727
|
},
|
|
1548
|
-
|
|
1728
|
+
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
1549
1729
|
// Cast intrinsic for `U64 -> Externref`.
|
|
1550
1730
|
const ret = BigInt.asUintN(64, arg0);
|
|
1551
1731
|
return addHeapObject(ret);
|
|
@@ -1564,6 +1744,13 @@ function __wbg_get_imports() {
|
|
|
1564
1744
|
};
|
|
1565
1745
|
}
|
|
1566
1746
|
|
|
1747
|
+
function __wasm_bindgen_func_elem_504(arg0, arg1, arg2) {
|
|
1748
|
+
const ptr0 = passStringToWasm0(arg2, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1749
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1750
|
+
const ret = wasm.__wasm_bindgen_func_elem_504(arg0, arg1, ptr0, len0);
|
|
1751
|
+
return takeObject(ret);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1567
1754
|
const WasmCompilerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1568
1755
|
? { register: () => {}, unregister: () => {} }
|
|
1569
1756
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmcompiler_free(ptr, 1));
|
|
@@ -1595,6 +1782,10 @@ function addBorrowedObject(obj) {
|
|
|
1595
1782
|
return stack_pointer;
|
|
1596
1783
|
}
|
|
1597
1784
|
|
|
1785
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
1786
|
+
? { register: () => {}, unregister: () => {} }
|
|
1787
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
|
|
1788
|
+
|
|
1598
1789
|
function debugString(val) {
|
|
1599
1790
|
// primitive types
|
|
1600
1791
|
const type = typeof val;
|
|
@@ -1666,6 +1857,16 @@ function dropObject(idx) {
|
|
|
1666
1857
|
heap_next = idx;
|
|
1667
1858
|
}
|
|
1668
1859
|
|
|
1860
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1861
|
+
ptr = ptr >>> 0;
|
|
1862
|
+
const mem = getDataViewMemory0();
|
|
1863
|
+
const result = [];
|
|
1864
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
1865
|
+
result.push(takeObject(mem.getUint32(i, true)));
|
|
1866
|
+
}
|
|
1867
|
+
return result;
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1669
1870
|
function getArrayU8FromWasm0(ptr, len) {
|
|
1670
1871
|
ptr = ptr >>> 0;
|
|
1671
1872
|
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -1710,14 +1911,29 @@ function isLikeNone(x) {
|
|
|
1710
1911
|
return x === undefined || x === null;
|
|
1711
1912
|
}
|
|
1712
1913
|
|
|
1713
|
-
function
|
|
1714
|
-
const
|
|
1715
|
-
const
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1914
|
+
function makeClosure(arg0, arg1, f) {
|
|
1915
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
1916
|
+
const real = (...args) => {
|
|
1917
|
+
|
|
1918
|
+
// First up with a closure we increment the internal reference
|
|
1919
|
+
// count. This ensures that the Rust closure environment won't
|
|
1920
|
+
// be deallocated while we're invoking it.
|
|
1921
|
+
state.cnt++;
|
|
1922
|
+
try {
|
|
1923
|
+
return f(state.a, state.b, ...args);
|
|
1924
|
+
} finally {
|
|
1925
|
+
real._wbg_cb_unref();
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
real._wbg_cb_unref = () => {
|
|
1929
|
+
if (--state.cnt === 0) {
|
|
1930
|
+
wasm.__wbindgen_export5(state.a, state.b);
|
|
1931
|
+
state.a = 0;
|
|
1932
|
+
CLOSURE_DTORS.unregister(state);
|
|
1933
|
+
}
|
|
1934
|
+
};
|
|
1935
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
1936
|
+
return real;
|
|
1721
1937
|
}
|
|
1722
1938
|
|
|
1723
1939
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
Binary file
|
|
@@ -4,6 +4,7 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export const __wbg_wasmcompiler_free: (a: number, b: number) => void;
|
|
5
5
|
export const __wbg_wasmextractor_free: (a: number, b: number) => void;
|
|
6
6
|
export const __wbg_wasmfilesystem_free: (a: number, b: number) => void;
|
|
7
|
+
export const wasmcompiler_affectedFiles: (a: number, b: number) => void;
|
|
7
8
|
export const wasmcompiler_applyBuildInfo: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
8
9
|
export const wasmcompiler_atoms: (a: number, b: number) => void;
|
|
9
10
|
export const wasmcompiler_buildInfoSchemaVersion: (a: number) => number;
|
|
@@ -11,6 +12,9 @@ export const wasmcompiler_clear: (a: number) => void;
|
|
|
11
12
|
export const wasmcompiler_compile: (a: number, b: number, c: number) => void;
|
|
12
13
|
export const wasmcompiler_config: (a: number, b: number) => void;
|
|
13
14
|
export const wasmcompiler_configFingerprint: (a: number, b: number) => void;
|
|
15
|
+
export const wasmcompiler_createDesignSystemManifest: (a: number, b: number, c: number) => void;
|
|
16
|
+
export const wasmcompiler_designSystemImportSelections: (a: number, b: number, c: number) => void;
|
|
17
|
+
export const wasmcompiler_designSystemManifestSchemaVersion: (a: number) => number;
|
|
14
18
|
export const wasmcompiler_diagnostics: (a: number, b: number) => void;
|
|
15
19
|
export const wasmcompiler_dirname: (a: number, b: number, c: number, d: number) => void;
|
|
16
20
|
export const wasmcompiler_encodedRecipes: (a: number, b: number) => void;
|
|
@@ -21,12 +25,14 @@ export const wasmcompiler_generateAffectedArtifacts: (a: number, b: number, c: n
|
|
|
21
25
|
export const wasmcompiler_generateArtifact: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
26
|
export const wasmcompiler_generateArtifacts: (a: number, b: number, c: number) => void;
|
|
23
27
|
export const wasmcompiler_getFile: (a: number, b: number, c: number, d: number) => void;
|
|
28
|
+
export const wasmcompiler_getKeyframeCss: (a: number, b: number, c: number) => void;
|
|
29
|
+
export const wasmcompiler_getLayerCss: (a: number, b: number, c: number) => void;
|
|
30
|
+
export const wasmcompiler_getSplitCss: (a: number, b: number, c: number) => void;
|
|
24
31
|
export const wasmcompiler_hasLayerDeclaration: (a: number, b: number, c: number) => number;
|
|
25
32
|
export const wasmcompiler_inspectFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
26
33
|
export const wasmcompiler_isEmpty: (a: number) => number;
|
|
27
34
|
export const wasmcompiler_isSourceFile: (a: number, b: number, c: number) => number;
|
|
28
35
|
export const wasmcompiler_joinPath: (a: number, b: number, c: number) => void;
|
|
29
|
-
export const wasmcompiler_layerCss: (a: number, b: number, c: number, d: number) => void;
|
|
30
36
|
export const wasmcompiler_layers: (a: number, b: number) => void;
|
|
31
37
|
export const wasmcompiler_parseFile: (a: number, b: number, c: number, d: number) => void;
|
|
32
38
|
export const wasmcompiler_parseFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -42,16 +48,19 @@ export const wasmcompiler_removeFile: (a: number, b: number, c: number) => numbe
|
|
|
42
48
|
export const wasmcompiler_resolvePath: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
43
49
|
export const wasmcompiler_resolveUtilityValue: (a: number, b: number, c: number) => void;
|
|
44
50
|
export const wasmcompiler_scan: (a: number, b: number, c: number) => void;
|
|
45
|
-
export const wasmcompiler_serializeBuildInfo: (a: number, b: number, c: number, d: number) => void;
|
|
51
|
+
export const wasmcompiler_serializeBuildInfo: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
46
52
|
export const wasmcompiler_slotRecipes: (a: number, b: number) => void;
|
|
47
53
|
export const wasmcompiler_sources: (a: number, b: number) => void;
|
|
48
54
|
export const wasmcompiler_spec: (a: number, b: number) => void;
|
|
49
|
-
export const wasmcompiler_splitCss: (a: number, b: number) => void;
|
|
50
55
|
export const wasmcompiler_staticPatternAtoms: (a: number, b: number) => void;
|
|
56
|
+
export const wasmcompiler_stripLayerOrderStatements: (a: number, b: number, c: number, d: number) => void;
|
|
57
|
+
export const wasmcompiler_suggestSemanticTokens: (a: number, b: number, c: number, d: number) => void;
|
|
58
|
+
export const wasmcompiler_suggestTokens: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
51
59
|
export const wasmcompiler_summary: (a: number, b: number) => void;
|
|
52
|
-
export const
|
|
60
|
+
export const wasmcompiler_tokenDictionary: (a: number, b: number) => void;
|
|
53
61
|
export const wasmcompiler_writeArtifacts: (a: number, b: number, c: number) => void;
|
|
54
62
|
export const wasmcompiler_writeCss: (a: number, b: number, c: number) => void;
|
|
63
|
+
export const wasmcompiler_writeLayerCss: (a: number, b: number, c: number) => void;
|
|
55
64
|
export const wasmcompiler_writeSplitCss: (a: number, b: number, c: number) => void;
|
|
56
65
|
export const wasmextractor_new: (a: number, b: number, c: number) => void;
|
|
57
66
|
export const wasmextractor_parseFile: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -62,8 +71,10 @@ export const wasmfilesystem_new: () => number;
|
|
|
62
71
|
export const wasmfilesystem_readFile: (a: number, b: number, c: number, d: number) => void;
|
|
63
72
|
export const wasmfilesystem_removeFile: (a: number, b: number, c: number) => number;
|
|
64
73
|
export const installPanicHook: () => void;
|
|
74
|
+
export const __wasm_bindgen_func_elem_504: (a: number, b: number, c: number, d: number) => number;
|
|
65
75
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
66
76
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
67
77
|
export const __wbindgen_export3: (a: number) => void;
|
|
68
78
|
export const __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
79
|
+
export const __wbindgen_export5: (a: number, b: number) => void;
|
|
69
80
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|