@pandacss/compiler-wasm 2.0.0-beta.2 → 2.0.0-beta.4
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/index.d.ts +3 -3
- package/dist/web.d.ts +3 -3
- package/package.json +3 -3
- package/pkg-node/compiler_wasm.d.ts +13 -13
- package/pkg-node/compiler_wasm.js +45 -57
- package/pkg-node/compiler_wasm_bg.wasm +0 -0
- package/pkg-node/compiler_wasm_bg.wasm.d.ts +2 -2
- package/pkg-web/compiler_wasm.d.ts +15 -15
- package/pkg-web/compiler_wasm.js +45 -57
- package/pkg-web/compiler_wasm_bg.wasm +0 -0
- package/pkg-web/compiler_wasm_bg.wasm.d.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParseFileReport, ScanOptions, LayerNames, Spec, SourceEntry, FileInspectionResult, ResolveUtilityValueInput, ResolvedUtilityValue, WriteArtifactsOptions, WriteCssOptions, WriteCssResult, WriteSplitCssOptions, WriteFilesResult, SerializedHookFilter, Atom, RecipeEntry, EncodedRecipeStyles, ProjectSummary, CompileOptions, CompileOutput,
|
|
1
|
+
import { ParseFileReport, ScanOptions, LayerNames, Spec, SourceEntry, FileInspectionResult, ResolveUtilityValueInput, ResolvedUtilityValue, WriteArtifactsOptions, WriteCssOptions, WriteCssResult, WriteSplitCssOptions, WriteFilesResult, SerializedHookFilter, Atom, RecipeEntry, EncodedRecipeStyles, ProjectSummary, CompileOptions, CompileOutput, LayerCssOptions, SplitCssOptions, CssFile, GenerateArtifactOptions, CodegenArtifact, CodegenArtifactId, CodegenDependency, Diagnostic, CompileFileManifest, ParsedFileView, StaticPatternResult, BuildInfo, SerializedConfig, CompilerOptions, Compiler, ProjectCallbacks, ProjectHooks, ConfigSnapshot, Driver } from '@pandacss/compiler-shared';
|
|
2
2
|
export * from '@pandacss/compiler-shared';
|
|
3
3
|
export { PatternHelpers, mergeCallbacks } from '@pandacss/compiler-shared';
|
|
4
4
|
|
|
@@ -101,8 +101,8 @@ declare class WasmCompiler {
|
|
|
101
101
|
encodedRecipes(): EncodedRecipeStyles;
|
|
102
102
|
summary(): ProjectSummary;
|
|
103
103
|
compile(options?: CompileOptions): CompileOutput;
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
getLayerCss(options: LayerCssOptions): CompileOutput;
|
|
105
|
+
getSplitCss(options?: SplitCssOptions): CssFile[];
|
|
106
106
|
generateArtifacts(options?: GenerateArtifactOptions): CodegenArtifact[];
|
|
107
107
|
generateArtifact(id: CodegenArtifactId, options?: GenerateArtifactOptions): CodegenArtifact | undefined;
|
|
108
108
|
generateAffectedArtifacts(dependencies: CodegenDependency[], options?: GenerateArtifactOptions): CodegenArtifact[];
|
package/dist/web.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ParseFileReport, ScanOptions, LayerNames, Spec, SourceEntry, FileInspectionResult, ResolveUtilityValueInput, ResolvedUtilityValue, WriteArtifactsOptions, WriteCssOptions, WriteCssResult, WriteSplitCssOptions, WriteFilesResult, SerializedHookFilter, Atom, RecipeEntry, EncodedRecipeStyles, ProjectSummary, CompileOptions, CompileOutput,
|
|
1
|
+
import { ParseFileReport, ScanOptions, LayerNames, Spec, SourceEntry, FileInspectionResult, ResolveUtilityValueInput, ResolvedUtilityValue, WriteArtifactsOptions, WriteCssOptions, WriteCssResult, WriteSplitCssOptions, WriteFilesResult, SerializedHookFilter, Atom, RecipeEntry, EncodedRecipeStyles, ProjectSummary, CompileOptions, CompileOutput, LayerCssOptions, SplitCssOptions, CssFile, GenerateArtifactOptions, CodegenArtifact, CodegenArtifactId, CodegenDependency, Diagnostic, CompileFileManifest, ParsedFileView, StaticPatternResult, BuildInfo, SerializedConfig, CompilerOptions, Compiler, ProjectCallbacks, ProjectHooks } from '@pandacss/compiler-shared';
|
|
2
2
|
export * from '@pandacss/compiler-shared';
|
|
3
3
|
export { PatternHelpers, mergeCallbacks } from '@pandacss/compiler-shared';
|
|
4
4
|
|
|
@@ -101,8 +101,8 @@ declare class WasmCompiler {
|
|
|
101
101
|
encodedRecipes(): EncodedRecipeStyles;
|
|
102
102
|
summary(): ProjectSummary;
|
|
103
103
|
compile(options?: CompileOptions): CompileOutput;
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
getLayerCss(options: LayerCssOptions): CompileOutput;
|
|
105
|
+
getSplitCss(options?: SplitCssOptions): CssFile[];
|
|
106
106
|
generateArtifacts(options?: GenerateArtifactOptions): CodegenArtifact[];
|
|
107
107
|
generateArtifact(id: CodegenArtifactId, options?: GenerateArtifactOptions): CodegenArtifact | undefined;
|
|
108
108
|
generateAffectedArtifacts(dependencies: CodegenDependency[], options?: GenerateArtifactOptions): CodegenArtifact[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/compiler-wasm",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.4",
|
|
4
4
|
"description": "WebAssembly binding for the Panda compiler engine (browser/playground target)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"pkg-web"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@pandacss/compiler-shared": "2.0.0-beta.
|
|
41
|
+
"@pandacss/compiler-shared": "2.0.0-beta.4"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@pandacss/config": "2.0.0-beta.
|
|
44
|
+
"@pandacss/config": "2.0.0-beta.4"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
47
|
"node": ">=22"
|
|
@@ -131,6 +131,19 @@ export class WasmCompiler {
|
|
|
131
131
|
* Returns a JS error if serializing fails.
|
|
132
132
|
*/
|
|
133
133
|
getFile(path: string): any;
|
|
134
|
+
/**
|
|
135
|
+
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
136
|
+
* (byte offsets stay valid); unknown layer names are skipped.
|
|
137
|
+
*/
|
|
138
|
+
getLayerCss(options: any): any;
|
|
139
|
+
/**
|
|
140
|
+
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
141
|
+
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
142
|
+
*
|
|
143
|
+
* # Errors
|
|
144
|
+
* Returns a JS error if serializing fails.
|
|
145
|
+
*/
|
|
146
|
+
getSplitCss(options?: any | null): any;
|
|
134
147
|
/**
|
|
135
148
|
* Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
|
|
136
149
|
* marking it as the stylesheet root to inject the compiled CSS into.
|
|
@@ -154,11 +167,6 @@ export class WasmCompiler {
|
|
|
154
167
|
*/
|
|
155
168
|
isSourceFile(path: string): boolean;
|
|
156
169
|
joinPath(parts: any): string;
|
|
157
|
-
/**
|
|
158
|
-
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
159
|
-
* (byte offsets stay valid); unknown layer names are skipped.
|
|
160
|
-
*/
|
|
161
|
-
layerCss(layers: string[]): string;
|
|
162
170
|
/**
|
|
163
171
|
* The resolved cascade-layer names (config overrides merged over defaults).
|
|
164
172
|
*
|
|
@@ -277,14 +285,6 @@ export class WasmCompiler {
|
|
|
277
285
|
* Returns a JS error if the snapshot fails to serialize.
|
|
278
286
|
*/
|
|
279
287
|
spec(): any;
|
|
280
|
-
/**
|
|
281
|
-
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
282
|
-
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
283
|
-
*
|
|
284
|
-
* # Errors
|
|
285
|
-
* Returns a JS error if serializing fails.
|
|
286
|
-
*/
|
|
287
|
-
splitCss(): any;
|
|
288
288
|
/**
|
|
289
289
|
* `staticCss.patterns` expansion as raw atoms, without compiling.
|
|
290
290
|
*
|
|
@@ -411,6 +411,51 @@ class WasmCompiler {
|
|
|
411
411
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
416
|
+
* (byte offsets stay valid); unknown layer names are skipped.
|
|
417
|
+
* @param {any} options
|
|
418
|
+
* @returns {any}
|
|
419
|
+
*/
|
|
420
|
+
getLayerCss(options) {
|
|
421
|
+
try {
|
|
422
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
423
|
+
wasm.wasmcompiler_getLayerCss(retptr, this.__wbg_ptr, addHeapObject(options));
|
|
424
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
425
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
426
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
427
|
+
if (r2) {
|
|
428
|
+
throw takeObject(r1);
|
|
429
|
+
}
|
|
430
|
+
return takeObject(r0);
|
|
431
|
+
} finally {
|
|
432
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
437
|
+
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
438
|
+
*
|
|
439
|
+
* # Errors
|
|
440
|
+
* Returns a JS error if serializing fails.
|
|
441
|
+
* @param {any | null} [options]
|
|
442
|
+
* @returns {any}
|
|
443
|
+
*/
|
|
444
|
+
getSplitCss(options) {
|
|
445
|
+
try {
|
|
446
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
447
|
+
wasm.wasmcompiler_getSplitCss(retptr, this.__wbg_ptr, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
448
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
449
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
450
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
451
|
+
if (r2) {
|
|
452
|
+
throw takeObject(r1);
|
|
453
|
+
}
|
|
454
|
+
return takeObject(r0);
|
|
455
|
+
} finally {
|
|
456
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
414
459
|
/**
|
|
415
460
|
* Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
|
|
416
461
|
* marking it as the stylesheet root to inject the compiled CSS into.
|
|
@@ -500,30 +545,6 @@ class WasmCompiler {
|
|
|
500
545
|
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
501
546
|
}
|
|
502
547
|
}
|
|
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
548
|
/**
|
|
528
549
|
* The resolved cascade-layer names (config overrides merged over defaults).
|
|
529
550
|
*
|
|
@@ -929,29 +950,6 @@ class WasmCompiler {
|
|
|
929
950
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
930
951
|
}
|
|
931
952
|
}
|
|
932
|
-
/**
|
|
933
|
-
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
934
|
-
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
935
|
-
*
|
|
936
|
-
* # Errors
|
|
937
|
-
* Returns a JS error if serializing fails.
|
|
938
|
-
* @returns {any}
|
|
939
|
-
*/
|
|
940
|
-
splitCss() {
|
|
941
|
-
try {
|
|
942
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
943
|
-
wasm.wasmcompiler_splitCss(retptr, this.__wbg_ptr);
|
|
944
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
945
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
946
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
947
|
-
if (r2) {
|
|
948
|
-
throw takeObject(r1);
|
|
949
|
-
}
|
|
950
|
-
return takeObject(r0);
|
|
951
|
-
} finally {
|
|
952
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
953
|
/**
|
|
956
954
|
* `staticCss.patterns` expansion as raw atoms, without compiling.
|
|
957
955
|
*
|
|
@@ -1710,16 +1708,6 @@ function isLikeNone(x) {
|
|
|
1710
1708
|
return x === undefined || x === null;
|
|
1711
1709
|
}
|
|
1712
1710
|
|
|
1713
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
1714
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
1715
|
-
const mem = getDataViewMemory0();
|
|
1716
|
-
for (let i = 0; i < array.length; i++) {
|
|
1717
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
1718
|
-
}
|
|
1719
|
-
WASM_VECTOR_LEN = array.length;
|
|
1720
|
-
return ptr;
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
1711
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
1724
1712
|
if (realloc === undefined) {
|
|
1725
1713
|
const buf = cachedTextEncoder.encode(arg);
|
|
Binary file
|
|
@@ -21,12 +21,13 @@ export const wasmcompiler_generateAffectedArtifacts: (a: number, b: number, c: n
|
|
|
21
21
|
export const wasmcompiler_generateArtifact: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
22
|
export const wasmcompiler_generateArtifacts: (a: number, b: number, c: number) => void;
|
|
23
23
|
export const wasmcompiler_getFile: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
+
export const wasmcompiler_getLayerCss: (a: number, b: number, c: number) => void;
|
|
25
|
+
export const wasmcompiler_getSplitCss: (a: number, b: number, c: number) => void;
|
|
24
26
|
export const wasmcompiler_hasLayerDeclaration: (a: number, b: number, c: number) => number;
|
|
25
27
|
export const wasmcompiler_inspectFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
26
28
|
export const wasmcompiler_isEmpty: (a: number) => number;
|
|
27
29
|
export const wasmcompiler_isSourceFile: (a: number, b: number, c: number) => number;
|
|
28
30
|
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
31
|
export const wasmcompiler_layers: (a: number, b: number) => void;
|
|
31
32
|
export const wasmcompiler_parseFile: (a: number, b: number, c: number, d: number) => void;
|
|
32
33
|
export const wasmcompiler_parseFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -46,7 +47,6 @@ export const wasmcompiler_serializeBuildInfo: (a: number, b: number, c: number,
|
|
|
46
47
|
export const wasmcompiler_slotRecipes: (a: number, b: number) => void;
|
|
47
48
|
export const wasmcompiler_sources: (a: number, b: number) => void;
|
|
48
49
|
export const wasmcompiler_spec: (a: number, b: number) => void;
|
|
49
|
-
export const wasmcompiler_splitCss: (a: number, b: number) => void;
|
|
50
50
|
export const wasmcompiler_staticPatternAtoms: (a: number, b: number) => void;
|
|
51
51
|
export const wasmcompiler_summary: (a: number, b: number) => void;
|
|
52
52
|
export const wasmcompiler_token_dictionary: (a: number, b: number) => void;
|
|
@@ -131,6 +131,19 @@ export class WasmCompiler {
|
|
|
131
131
|
* Returns a JS error if serializing fails.
|
|
132
132
|
*/
|
|
133
133
|
getFile(path: string): any;
|
|
134
|
+
/**
|
|
135
|
+
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
136
|
+
* (byte offsets stay valid); unknown layer names are skipped.
|
|
137
|
+
*/
|
|
138
|
+
getLayerCss(options: any): any;
|
|
139
|
+
/**
|
|
140
|
+
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
141
|
+
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
142
|
+
*
|
|
143
|
+
* # Errors
|
|
144
|
+
* Returns a JS error if serializing fails.
|
|
145
|
+
*/
|
|
146
|
+
getSplitCss(options?: any | null): any;
|
|
134
147
|
/**
|
|
135
148
|
* Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
|
|
136
149
|
* marking it as the stylesheet root to inject the compiled CSS into.
|
|
@@ -154,11 +167,6 @@ export class WasmCompiler {
|
|
|
154
167
|
*/
|
|
155
168
|
isSourceFile(path: string): boolean;
|
|
156
169
|
joinPath(parts: any): string;
|
|
157
|
-
/**
|
|
158
|
-
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
159
|
-
* (byte offsets stay valid); unknown layer names are skipped.
|
|
160
|
-
*/
|
|
161
|
-
layerCss(layers: string[]): string;
|
|
162
170
|
/**
|
|
163
171
|
* The resolved cascade-layer names (config overrides merged over defaults).
|
|
164
172
|
*
|
|
@@ -277,14 +285,6 @@ export class WasmCompiler {
|
|
|
277
285
|
* Returns a JS error if the snapshot fails to serialize.
|
|
278
286
|
*/
|
|
279
287
|
spec(): any;
|
|
280
|
-
/**
|
|
281
|
-
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
282
|
-
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
283
|
-
*
|
|
284
|
-
* # Errors
|
|
285
|
-
* Returns a JS error if serializing fails.
|
|
286
|
-
*/
|
|
287
|
-
splitCss(): any;
|
|
288
288
|
/**
|
|
289
289
|
* `staticCss.patterns` expansion as raw atoms, without compiling.
|
|
290
290
|
*
|
|
@@ -411,12 +411,13 @@ export interface InitOutput {
|
|
|
411
411
|
readonly wasmcompiler_generateArtifact: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
412
412
|
readonly wasmcompiler_generateArtifacts: (a: number, b: number, c: number) => void;
|
|
413
413
|
readonly wasmcompiler_getFile: (a: number, b: number, c: number, d: number) => void;
|
|
414
|
+
readonly wasmcompiler_getLayerCss: (a: number, b: number, c: number) => void;
|
|
415
|
+
readonly wasmcompiler_getSplitCss: (a: number, b: number, c: number) => void;
|
|
414
416
|
readonly wasmcompiler_hasLayerDeclaration: (a: number, b: number, c: number) => number;
|
|
415
417
|
readonly wasmcompiler_inspectFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
416
418
|
readonly wasmcompiler_isEmpty: (a: number) => number;
|
|
417
419
|
readonly wasmcompiler_isSourceFile: (a: number, b: number, c: number) => number;
|
|
418
420
|
readonly wasmcompiler_joinPath: (a: number, b: number, c: number) => void;
|
|
419
|
-
readonly wasmcompiler_layerCss: (a: number, b: number, c: number, d: number) => void;
|
|
420
421
|
readonly wasmcompiler_layers: (a: number, b: number) => void;
|
|
421
422
|
readonly wasmcompiler_parseFile: (a: number, b: number, c: number, d: number) => void;
|
|
422
423
|
readonly wasmcompiler_parseFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -436,7 +437,6 @@ export interface InitOutput {
|
|
|
436
437
|
readonly wasmcompiler_slotRecipes: (a: number, b: number) => void;
|
|
437
438
|
readonly wasmcompiler_sources: (a: number, b: number) => void;
|
|
438
439
|
readonly wasmcompiler_spec: (a: number, b: number) => void;
|
|
439
|
-
readonly wasmcompiler_splitCss: (a: number, b: number) => void;
|
|
440
440
|
readonly wasmcompiler_staticPatternAtoms: (a: number, b: number) => void;
|
|
441
441
|
readonly wasmcompiler_summary: (a: number, b: number) => void;
|
|
442
442
|
readonly wasmcompiler_token_dictionary: (a: number, b: number) => void;
|
package/pkg-web/compiler_wasm.js
CHANGED
|
@@ -411,6 +411,51 @@ export class WasmCompiler {
|
|
|
411
411
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
+
/**
|
|
415
|
+
* CSS for the named cascade layers, concatenated in order. Sliced in Rust
|
|
416
|
+
* (byte offsets stay valid); unknown layer names are skipped.
|
|
417
|
+
* @param {any} options
|
|
418
|
+
* @returns {any}
|
|
419
|
+
*/
|
|
420
|
+
getLayerCss(options) {
|
|
421
|
+
try {
|
|
422
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
423
|
+
wasm.wasmcompiler_getLayerCss(retptr, this.__wbg_ptr, addHeapObject(options));
|
|
424
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
425
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
426
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
427
|
+
if (r2) {
|
|
428
|
+
throw takeObject(r1);
|
|
429
|
+
}
|
|
430
|
+
return takeObject(r0);
|
|
431
|
+
} finally {
|
|
432
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
437
|
+
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
438
|
+
*
|
|
439
|
+
* # Errors
|
|
440
|
+
* Returns a JS error if serializing fails.
|
|
441
|
+
* @param {any | null} [options]
|
|
442
|
+
* @returns {any}
|
|
443
|
+
*/
|
|
444
|
+
getSplitCss(options) {
|
|
445
|
+
try {
|
|
446
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
447
|
+
wasm.wasmcompiler_getSplitCss(retptr, this.__wbg_ptr, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
448
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
449
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
450
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
451
|
+
if (r2) {
|
|
452
|
+
throw takeObject(r1);
|
|
453
|
+
}
|
|
454
|
+
return takeObject(r0);
|
|
455
|
+
} finally {
|
|
456
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
414
459
|
/**
|
|
415
460
|
* Whether `css` declares Panda's cascade layers (`@layer reset, base, …;`),
|
|
416
461
|
* marking it as the stylesheet root to inject the compiled CSS into.
|
|
@@ -500,30 +545,6 @@ export class WasmCompiler {
|
|
|
500
545
|
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
501
546
|
}
|
|
502
547
|
}
|
|
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
548
|
/**
|
|
528
549
|
* The resolved cascade-layer names (config overrides merged over defaults).
|
|
529
550
|
*
|
|
@@ -929,29 +950,6 @@ export class WasmCompiler {
|
|
|
929
950
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
930
951
|
}
|
|
931
952
|
}
|
|
932
|
-
/**
|
|
933
|
-
* Split the stylesheet into per-file outputs (one per layer + per recipe,
|
|
934
|
-
* plus `recipes.css` / `styles.css` index files) for `--splitting`.
|
|
935
|
-
*
|
|
936
|
-
* # Errors
|
|
937
|
-
* Returns a JS error if serializing fails.
|
|
938
|
-
* @returns {any}
|
|
939
|
-
*/
|
|
940
|
-
splitCss() {
|
|
941
|
-
try {
|
|
942
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
943
|
-
wasm.wasmcompiler_splitCss(retptr, this.__wbg_ptr);
|
|
944
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
945
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
946
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
947
|
-
if (r2) {
|
|
948
|
-
throw takeObject(r1);
|
|
949
|
-
}
|
|
950
|
-
return takeObject(r0);
|
|
951
|
-
} finally {
|
|
952
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
953
|
/**
|
|
956
954
|
* `staticCss.patterns` expansion as raw atoms, without compiling.
|
|
957
955
|
*
|
|
@@ -1706,16 +1704,6 @@ function isLikeNone(x) {
|
|
|
1706
1704
|
return x === undefined || x === null;
|
|
1707
1705
|
}
|
|
1708
1706
|
|
|
1709
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
1710
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
1711
|
-
const mem = getDataViewMemory0();
|
|
1712
|
-
for (let i = 0; i < array.length; i++) {
|
|
1713
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
1714
|
-
}
|
|
1715
|
-
WASM_VECTOR_LEN = array.length;
|
|
1716
|
-
return ptr;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
1707
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
1720
1708
|
if (realloc === undefined) {
|
|
1721
1709
|
const buf = cachedTextEncoder.encode(arg);
|
|
Binary file
|
|
@@ -21,12 +21,13 @@ export const wasmcompiler_generateAffectedArtifacts: (a: number, b: number, c: n
|
|
|
21
21
|
export const wasmcompiler_generateArtifact: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
22
22
|
export const wasmcompiler_generateArtifacts: (a: number, b: number, c: number) => void;
|
|
23
23
|
export const wasmcompiler_getFile: (a: number, b: number, c: number, d: number) => void;
|
|
24
|
+
export const wasmcompiler_getLayerCss: (a: number, b: number, c: number) => void;
|
|
25
|
+
export const wasmcompiler_getSplitCss: (a: number, b: number, c: number) => void;
|
|
24
26
|
export const wasmcompiler_hasLayerDeclaration: (a: number, b: number, c: number) => number;
|
|
25
27
|
export const wasmcompiler_inspectFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
26
28
|
export const wasmcompiler_isEmpty: (a: number) => number;
|
|
27
29
|
export const wasmcompiler_isSourceFile: (a: number, b: number, c: number) => number;
|
|
28
30
|
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
31
|
export const wasmcompiler_layers: (a: number, b: number) => void;
|
|
31
32
|
export const wasmcompiler_parseFile: (a: number, b: number, c: number, d: number) => void;
|
|
32
33
|
export const wasmcompiler_parseFileSource: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
@@ -46,7 +47,6 @@ export const wasmcompiler_serializeBuildInfo: (a: number, b: number, c: number,
|
|
|
46
47
|
export const wasmcompiler_slotRecipes: (a: number, b: number) => void;
|
|
47
48
|
export const wasmcompiler_sources: (a: number, b: number) => void;
|
|
48
49
|
export const wasmcompiler_spec: (a: number, b: number) => void;
|
|
49
|
-
export const wasmcompiler_splitCss: (a: number, b: number) => void;
|
|
50
50
|
export const wasmcompiler_staticPatternAtoms: (a: number, b: number) => void;
|
|
51
51
|
export const wasmcompiler_summary: (a: number, b: number) => void;
|
|
52
52
|
export const wasmcompiler_token_dictionary: (a: number, b: number) => void;
|