@pandacss/compiler-wasm 2.0.0-beta.8 → 2.0.0

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.
@@ -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
@@ -166,7 +184,7 @@ class WasmCompiler {
166
184
  }
167
185
  }
168
186
  /**
169
- * Build a `panda.lib.json` value from host-supplied fields, stamping the
187
+ * Build a `panda/lib.json` value from host-supplied fields, stamping the
170
188
  * engine-owned schema version. Backs the `designSystem.create` JS namespace.
171
189
  *
172
190
  * # Errors
@@ -189,6 +207,30 @@ class WasmCompiler {
189
207
  wasm.__wbindgen_add_to_stack_pointer(16);
190
208
  }
191
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
+ }
192
234
  /**
193
235
  * The manifest wire-format version this binding reads/writes.
194
236
  * @returns {number}
@@ -344,9 +386,6 @@ class WasmCompiler {
344
386
  }
345
387
  /**
346
388
  * Generate artifacts affected by the provided config dependency names.
347
- *
348
- * # Errors
349
- * Returns a JS error if dependencies/options are invalid or serializing fails.
350
389
  * @param {any} dependencies
351
390
  * @param {any} options
352
391
  * @returns {any}
@@ -369,9 +408,6 @@ class WasmCompiler {
369
408
  }
370
409
  /**
371
410
  * Generate one codegen artifact by id.
372
- *
373
- * # Errors
374
- * Returns a JS error if the id/options are invalid or serializing fails.
375
411
  * @param {string} id
376
412
  * @param {any} options
377
413
  * @returns {any}
@@ -396,9 +432,6 @@ class WasmCompiler {
396
432
  }
397
433
  /**
398
434
  * Generate every codegen artifact from the resolved project state.
399
- *
400
- * # Errors
401
- * Returns a JS error if options are invalid or serializing fails.
402
435
  * @param {any} options
403
436
  * @returns {any}
404
437
  */
@@ -443,6 +476,26 @@ class WasmCompiler {
443
476
  wasm.__wbindgen_add_to_stack_pointer(16);
444
477
  }
445
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
+ }
446
499
  /**
447
500
  * CSS for the named cascade layers, concatenated in order. Sliced in Rust
448
501
  * (byte offsets stay valid); unknown layer names are skipped.
@@ -654,8 +707,8 @@ class WasmCompiler {
654
707
  }
655
708
  }
656
709
  /**
657
- * Read + parse source paths returned from `scan()`. Returns one report per
658
- * successfully parsed path.
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.
659
712
  *
660
713
  * # Errors
661
714
  * Returns a JS error when `paths` is malformed or serializing the report fails.
@@ -813,31 +866,6 @@ class WasmCompiler {
813
866
  const ret = wasm.wasmcompiler_removeFile(this.__wbg_ptr, ptr0, len0);
814
867
  return ret !== 0;
815
868
  }
816
- /**
817
- * Order already-read manifests by their `designSystem` parent links into a
818
- * root-first hydrate/merge plan (or report a cycle). Backs the
819
- * `designSystem.resolveChain` JS namespace. Pure — the host did the reads.
820
- *
821
- * # Errors
822
- * Returns a JS error if `manifests` is invalid or the plan fails to serialize.
823
- * @param {any} manifests
824
- * @returns {any}
825
- */
826
- resolveDesignSystemChain(manifests) {
827
- try {
828
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
829
- wasm.wasmcompiler_resolveDesignSystemChain(retptr, this.__wbg_ptr, addHeapObject(manifests));
830
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
831
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
832
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
833
- if (r2) {
834
- throw takeObject(r1);
835
- }
836
- return takeObject(r0);
837
- } finally {
838
- wasm.__wbindgen_add_to_stack_pointer(16);
839
- }
840
- }
841
869
  /**
842
870
  * @param {string} path
843
871
  * @param {string | null} [cwd]
@@ -919,14 +947,15 @@ class WasmCompiler {
919
947
  * # Errors
920
948
  * Returns a JS error if serializing the build info fails.
921
949
  * @param {string} panda
950
+ * @param {any} dependencies
922
951
  * @returns {any}
923
952
  */
924
- serializeBuildInfo(panda) {
953
+ serializeBuildInfo(panda, dependencies) {
925
954
  try {
926
955
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
927
956
  const ptr0 = passStringToWasm0(panda, wasm.__wbindgen_export, wasm.__wbindgen_export2);
928
957
  const len0 = WASM_VECTOR_LEN;
929
- wasm.wasmcompiler_serializeBuildInfo(retptr, this.__wbg_ptr, ptr0, len0);
958
+ wasm.wasmcompiler_serializeBuildInfo(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(dependencies));
930
959
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
931
960
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
932
961
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1026,6 +1055,54 @@ class WasmCompiler {
1026
1055
  wasm.__wbindgen_add_to_stack_pointer(16);
1027
1056
  }
1028
1057
  }
1058
+ /**
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.
1083
+ *
1084
+ * # Errors
1085
+ * Returns a JS error if serialization fails.
1086
+ * @param {string} path
1087
+ * @returns {any}
1088
+ */
1089
+ suggestSemanticTokens(path) {
1090
+ try {
1091
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
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
+ }
1029
1106
  /**
1030
1107
  * Tokens that carry a hardcoded value, ranked (safe equivalents first).
1031
1108
  *
@@ -1080,10 +1157,10 @@ class WasmCompiler {
1080
1157
  * Rust-built token dictionary projected into the small JS interop shape.
1081
1158
  * @returns {any}
1082
1159
  */
1083
- token_dictionary() {
1160
+ tokenDictionary() {
1084
1161
  try {
1085
1162
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1086
- wasm.wasmcompiler_token_dictionary(retptr, this.__wbg_ptr);
1163
+ wasm.wasmcompiler_tokenDictionary(retptr, this.__wbg_ptr);
1087
1164
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1088
1165
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1089
1166
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -1097,9 +1174,6 @@ class WasmCompiler {
1097
1174
  }
1098
1175
  /**
1099
1176
  * Generate artifacts and write them under `outdir`.
1100
- *
1101
- * # Errors
1102
- * Returns a JS error if writing or serializing fails.
1103
1177
  * @param {any} options
1104
1178
  * @returns {any}
1105
1179
  */
@@ -1453,6 +1527,9 @@ function __wbg_get_imports() {
1453
1527
  __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
1454
1528
  throw new Error(getStringFromWasm0(arg0, arg1));
1455
1529
  },
1530
+ __wbg__wbg_cb_unref_3fa391f3fcdb55f8: function(arg0) {
1531
+ getObject(arg0)._wbg_cb_unref();
1532
+ },
1456
1533
  __wbg_call_13665d9f14390edc: function() { return handleError(function (arg0, arg1) {
1457
1534
  const ret = getObject(arg0).call(getObject(arg1));
1458
1535
  return addHeapObject(ret);
@@ -1600,10 +1677,6 @@ function __wbg_get_imports() {
1600
1677
  const ret = getObject(arg0).next();
1601
1678
  return addHeapObject(ret);
1602
1679
  }, arguments); },
1603
- __wbg_parse_2c1cad6215e84999: function() { return handleError(function (arg0, arg1) {
1604
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
1605
- return addHeapObject(ret);
1606
- }, arguments); },
1607
1680
  __wbg_prototypesetcall_5f9bdc8d75e07276: function(arg0, arg1, arg2) {
1608
1681
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
1609
1682
  },
@@ -1613,6 +1686,10 @@ function __wbg_get_imports() {
1613
1686
  __wbg_set_78ea6a19f4818587: function(arg0, arg1, arg2) {
1614
1687
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1615
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); },
1616
1693
  __wbg_set_facb7a5914e0fa39: function(arg0, arg1, arg2) {
1617
1694
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1618
1695
  return addHeapObject(ret);
@@ -1628,22 +1705,27 @@ function __wbg_get_imports() {
1628
1705
  const ret = getObject(arg0).value;
1629
1706
  return addHeapObject(ret);
1630
1707
  },
1631
- __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) {
1632
1714
  // Cast intrinsic for `F64 -> Externref`.
1633
1715
  const ret = arg0;
1634
1716
  return addHeapObject(ret);
1635
1717
  },
1636
- __wbindgen_cast_0000000000000002: function(arg0) {
1718
+ __wbindgen_cast_0000000000000003: function(arg0) {
1637
1719
  // Cast intrinsic for `I64 -> Externref`.
1638
1720
  const ret = arg0;
1639
1721
  return addHeapObject(ret);
1640
1722
  },
1641
- __wbindgen_cast_0000000000000003: function(arg0, arg1) {
1723
+ __wbindgen_cast_0000000000000004: function(arg0, arg1) {
1642
1724
  // Cast intrinsic for `Ref(String) -> Externref`.
1643
1725
  const ret = getStringFromWasm0(arg0, arg1);
1644
1726
  return addHeapObject(ret);
1645
1727
  },
1646
- __wbindgen_cast_0000000000000004: function(arg0) {
1728
+ __wbindgen_cast_0000000000000005: function(arg0) {
1647
1729
  // Cast intrinsic for `U64 -> Externref`.
1648
1730
  const ret = BigInt.asUintN(64, arg0);
1649
1731
  return addHeapObject(ret);
@@ -1662,6 +1744,13 @@ function __wbg_get_imports() {
1662
1744
  };
1663
1745
  }
1664
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
+
1665
1754
  const WasmCompilerFinalization = (typeof FinalizationRegistry === 'undefined')
1666
1755
  ? { register: () => {}, unregister: () => {} }
1667
1756
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmcompiler_free(ptr, 1));
@@ -1693,6 +1782,10 @@ function addBorrowedObject(obj) {
1693
1782
  return stack_pointer;
1694
1783
  }
1695
1784
 
1785
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
1786
+ ? { register: () => {}, unregister: () => {} }
1787
+ : new FinalizationRegistry(state => wasm.__wbindgen_export5(state.a, state.b));
1788
+
1696
1789
  function debugString(val) {
1697
1790
  // primitive types
1698
1791
  const type = typeof val;
@@ -1764,6 +1857,16 @@ function dropObject(idx) {
1764
1857
  heap_next = idx;
1765
1858
  }
1766
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
+
1767
1870
  function getArrayU8FromWasm0(ptr, len) {
1768
1871
  ptr = ptr >>> 0;
1769
1872
  return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
@@ -1808,6 +1911,31 @@ function isLikeNone(x) {
1808
1911
  return x === undefined || x === null;
1809
1912
  }
1810
1913
 
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;
1937
+ }
1938
+
1811
1939
  function passStringToWasm0(arg, malloc, realloc) {
1812
1940
  if (realloc === undefined) {
1813
1941
  const buf = cachedTextEncoder.encode(arg);
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;
@@ -12,6 +13,7 @@ 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;
14
15
  export const wasmcompiler_createDesignSystemManifest: (a: number, b: number, c: number) => void;
16
+ export const wasmcompiler_designSystemImportSelections: (a: number, b: number, c: number) => void;
15
17
  export const wasmcompiler_designSystemManifestSchemaVersion: (a: number) => number;
16
18
  export const wasmcompiler_diagnostics: (a: number, b: number) => void;
17
19
  export const wasmcompiler_dirname: (a: number, b: number, c: number, d: number) => void;
@@ -23,6 +25,7 @@ export const wasmcompiler_generateAffectedArtifacts: (a: number, b: number, c: n
23
25
  export const wasmcompiler_generateArtifact: (a: number, b: number, c: number, d: number, e: number) => void;
24
26
  export const wasmcompiler_generateArtifacts: (a: number, b: number, c: number) => void;
25
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;
26
29
  export const wasmcompiler_getLayerCss: (a: number, b: number, c: number) => void;
27
30
  export const wasmcompiler_getSplitCss: (a: number, b: number, c: number) => void;
28
31
  export const wasmcompiler_hasLayerDeclaration: (a: number, b: number, c: number) => number;
@@ -42,18 +45,19 @@ export const wasmcompiler_registerPatternTransform: (a: number, b: number, c: nu
42
45
  export const wasmcompiler_registerSourceTransform: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
43
46
  export const wasmcompiler_registerUtilityTransform: (a: number, b: number, c: number, d: number) => void;
44
47
  export const wasmcompiler_removeFile: (a: number, b: number, c: number) => number;
45
- export const wasmcompiler_resolveDesignSystemChain: (a: number, b: number, c: number) => void;
46
48
  export const wasmcompiler_resolvePath: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
47
49
  export const wasmcompiler_resolveUtilityValue: (a: number, b: number, c: number) => void;
48
50
  export const wasmcompiler_scan: (a: number, b: number, c: number) => void;
49
- 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;
50
52
  export const wasmcompiler_slotRecipes: (a: number, b: number) => void;
51
53
  export const wasmcompiler_sources: (a: number, b: number) => void;
52
54
  export const wasmcompiler_spec: (a: number, b: number) => void;
53
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;
54
58
  export const wasmcompiler_suggestTokens: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
55
59
  export const wasmcompiler_summary: (a: number, b: number) => void;
56
- export const wasmcompiler_token_dictionary: (a: number, b: number) => void;
60
+ export const wasmcompiler_tokenDictionary: (a: number, b: number) => void;
57
61
  export const wasmcompiler_writeArtifacts: (a: number, b: number, c: number) => void;
58
62
  export const wasmcompiler_writeCss: (a: number, b: number, c: number) => void;
59
63
  export const wasmcompiler_writeLayerCss: (a: number, b: number, c: number) => void;
@@ -67,8 +71,10 @@ export const wasmfilesystem_new: () => number;
67
71
  export const wasmfilesystem_readFile: (a: number, b: number, c: number, d: number) => void;
68
72
  export const wasmfilesystem_removeFile: (a: number, b: number, c: number) => number;
69
73
  export const installPanicHook: () => void;
74
+ export const __wasm_bindgen_func_elem_504: (a: number, b: number, c: number, d: number) => number;
70
75
  export const __wbindgen_export: (a: number, b: number) => number;
71
76
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
72
77
  export const __wbindgen_export3: (a: number) => void;
73
78
  export const __wbindgen_export4: (a: number, b: number, c: number) => void;
79
+ export const __wbindgen_export5: (a: number, b: number) => void;
74
80
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
@@ -19,6 +19,11 @@ export class WasmCompiler {
19
19
  private constructor();
20
20
  free(): void;
21
21
  [Symbol.dispose](): void;
22
+ /**
23
+ * Files whose folded imports changed since the last call. Clears on read.
24
+ * Re-parse each via `refreshFile`, then call again until empty.
25
+ */
26
+ affectedFiles(): string[];
22
27
  /**
23
28
  * Hydrate an external build info into this project (additive), optionally
24
29
  * restricted to imported modules (tree-shaking). Returns `false` on a
@@ -66,13 +71,21 @@ export class WasmCompiler {
66
71
  */
67
72
  configFingerprint(): string;
68
73
  /**
69
- * Build a `panda.lib.json` value from host-supplied fields, stamping the
74
+ * Build a `panda/lib.json` value from host-supplied fields, stamping the
70
75
  * engine-owned schema version. Backs the `designSystem.create` JS namespace.
71
76
  *
72
77
  * # Errors
73
78
  * Returns a JS error if `input` is invalid or the manifest fails to serialize.
74
79
  */
75
80
  createDesignSystemManifest(input: any): any;
81
+ /**
82
+ * Per-package import selections from one scan. Each entry is `null` = all,
83
+ * or export names to narrow.
84
+ *
85
+ * # Errors
86
+ * Returns a JS error when the scan fails or serialization fails.
87
+ */
88
+ designSystemImportSelections(packages: any): any;
76
89
  /**
77
90
  * The manifest wire-format version this binding reads/writes.
78
91
  */
@@ -117,23 +130,14 @@ export class WasmCompiler {
117
130
  static fromConfig(fs: WasmFileSystem, config: any, options: any): WasmCompiler;
118
131
  /**
119
132
  * Generate artifacts affected by the provided config dependency names.
120
- *
121
- * # Errors
122
- * Returns a JS error if dependencies/options are invalid or serializing fails.
123
133
  */
124
134
  generateAffectedArtifacts(dependencies: any, options: any): any;
125
135
  /**
126
136
  * Generate one codegen artifact by id.
127
- *
128
- * # Errors
129
- * Returns a JS error if the id/options are invalid or serializing fails.
130
137
  */
131
138
  generateArtifact(id: string, options: any): any;
132
139
  /**
133
140
  * Generate every codegen artifact from the resolved project state.
134
- *
135
- * # Errors
136
- * Returns a JS error if options are invalid or serializing fails.
137
141
  */
138
142
  generateArtifacts(options: any): any;
139
143
  /**
@@ -143,6 +147,10 @@ export class WasmCompiler {
143
147
  * Returns a JS error if serializing fails.
144
148
  */
145
149
  getFile(path: string): any;
150
+ /**
151
+ * Theme `@keyframes` CSS only (no token vars or other layers).
152
+ */
153
+ getKeyframeCss(options?: any | null): any;
146
154
  /**
147
155
  * CSS for the named cascade layers, concatenated in order. Sliced in Rust
148
156
  * (byte offsets stay valid); unknown layer names are skipped.
@@ -202,8 +210,8 @@ export class WasmCompiler {
202
210
  */
203
211
  parseFileSource(path: string, source: string): any;
204
212
  /**
205
- * Read + parse source paths returned from `scan()`. Returns one report per
206
- * successfully parsed path.
213
+ * Read + parse source paths from `scan()`. One report per requested path;
214
+ * a read miss keeps last-good state and reports a warning diagnostic.
207
215
  *
208
216
  * # Errors
209
217
  * Returns a JS error when `paths` is malformed or serializing the report fails.
@@ -247,15 +255,6 @@ export class WasmCompiler {
247
255
  * Drop a file's contribution. Returns `true` if the path was known.
248
256
  */
249
257
  removeFile(path: string): boolean;
250
- /**
251
- * Order already-read manifests by their `designSystem` parent links into a
252
- * root-first hydrate/merge plan (or report a cycle). Backs the
253
- * `designSystem.resolveChain` JS namespace. Pure — the host did the reads.
254
- *
255
- * # Errors
256
- * Returns a JS error if `manifests` is invalid or the plan fails to serialize.
257
- */
258
- resolveDesignSystemChain(manifests: any): any;
259
258
  resolvePath(path: string, cwd?: string | null): string;
260
259
  /**
261
260
  * Resolve selector and CSS metadata for one utility value.
@@ -281,7 +280,7 @@ export class WasmCompiler {
281
280
  * # Errors
282
281
  * Returns a JS error if serializing the build info fails.
283
282
  */
284
- serializeBuildInfo(panda: string): any;
283
+ serializeBuildInfo(panda: string, dependencies: any): any;
285
284
  /**
286
285
  * Every `sva()` slot-recipe entry.
287
286
  *
@@ -310,6 +309,17 @@ export class WasmCompiler {
310
309
  * Returns a JS error if serializing fails.
311
310
  */
312
311
  staticPatternAtoms(): any;
312
+ /**
313
+ * Remove Panda `@layer a, b;` order statements; leave unrelated ones.
314
+ */
315
+ stripLayerOrderStatements(css: string): string;
316
+ /**
317
+ * Semantic tokens that carry the same value as a token path.
318
+ *
319
+ * # Errors
320
+ * Returns a JS error if serialization fails.
321
+ */
322
+ suggestSemanticTokens(path: string): any;
313
323
  /**
314
324
  * Tokens that carry a hardcoded value, ranked (safe equivalents first).
315
325
  *
@@ -327,12 +337,9 @@ export class WasmCompiler {
327
337
  /**
328
338
  * Rust-built token dictionary projected into the small JS interop shape.
329
339
  */
330
- token_dictionary(): any;
340
+ tokenDictionary(): any;
331
341
  /**
332
342
  * Generate artifacts and write them under `outdir`.
333
- *
334
- * # Errors
335
- * Returns a JS error if writing or serializing fails.
336
343
  */
337
344
  writeArtifacts(options: any): any;
338
345
  writeCss(options: any): any;
@@ -419,6 +426,7 @@ export interface InitOutput {
419
426
  readonly __wbg_wasmcompiler_free: (a: number, b: number) => void;
420
427
  readonly __wbg_wasmextractor_free: (a: number, b: number) => void;
421
428
  readonly __wbg_wasmfilesystem_free: (a: number, b: number) => void;
429
+ readonly wasmcompiler_affectedFiles: (a: number, b: number) => void;
422
430
  readonly wasmcompiler_applyBuildInfo: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
423
431
  readonly wasmcompiler_atoms: (a: number, b: number) => void;
424
432
  readonly wasmcompiler_buildInfoSchemaVersion: (a: number) => number;
@@ -427,6 +435,7 @@ export interface InitOutput {
427
435
  readonly wasmcompiler_config: (a: number, b: number) => void;
428
436
  readonly wasmcompiler_configFingerprint: (a: number, b: number) => void;
429
437
  readonly wasmcompiler_createDesignSystemManifest: (a: number, b: number, c: number) => void;
438
+ readonly wasmcompiler_designSystemImportSelections: (a: number, b: number, c: number) => void;
430
439
  readonly wasmcompiler_designSystemManifestSchemaVersion: (a: number) => number;
431
440
  readonly wasmcompiler_diagnostics: (a: number, b: number) => void;
432
441
  readonly wasmcompiler_dirname: (a: number, b: number, c: number, d: number) => void;
@@ -438,6 +447,7 @@ export interface InitOutput {
438
447
  readonly wasmcompiler_generateArtifact: (a: number, b: number, c: number, d: number, e: number) => void;
439
448
  readonly wasmcompiler_generateArtifacts: (a: number, b: number, c: number) => void;
440
449
  readonly wasmcompiler_getFile: (a: number, b: number, c: number, d: number) => void;
450
+ readonly wasmcompiler_getKeyframeCss: (a: number, b: number, c: number) => void;
441
451
  readonly wasmcompiler_getLayerCss: (a: number, b: number, c: number) => void;
442
452
  readonly wasmcompiler_getSplitCss: (a: number, b: number, c: number) => void;
443
453
  readonly wasmcompiler_hasLayerDeclaration: (a: number, b: number, c: number) => number;
@@ -457,18 +467,19 @@ export interface InitOutput {
457
467
  readonly wasmcompiler_registerSourceTransform: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
458
468
  readonly wasmcompiler_registerUtilityTransform: (a: number, b: number, c: number, d: number) => void;
459
469
  readonly wasmcompiler_removeFile: (a: number, b: number, c: number) => number;
460
- readonly wasmcompiler_resolveDesignSystemChain: (a: number, b: number, c: number) => void;
461
470
  readonly wasmcompiler_resolvePath: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
462
471
  readonly wasmcompiler_resolveUtilityValue: (a: number, b: number, c: number) => void;
463
472
  readonly wasmcompiler_scan: (a: number, b: number, c: number) => void;
464
- readonly wasmcompiler_serializeBuildInfo: (a: number, b: number, c: number, d: number) => void;
473
+ readonly wasmcompiler_serializeBuildInfo: (a: number, b: number, c: number, d: number, e: number) => void;
465
474
  readonly wasmcompiler_slotRecipes: (a: number, b: number) => void;
466
475
  readonly wasmcompiler_sources: (a: number, b: number) => void;
467
476
  readonly wasmcompiler_spec: (a: number, b: number) => void;
468
477
  readonly wasmcompiler_staticPatternAtoms: (a: number, b: number) => void;
478
+ readonly wasmcompiler_stripLayerOrderStatements: (a: number, b: number, c: number, d: number) => void;
479
+ readonly wasmcompiler_suggestSemanticTokens: (a: number, b: number, c: number, d: number) => void;
469
480
  readonly wasmcompiler_suggestTokens: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
470
481
  readonly wasmcompiler_summary: (a: number, b: number) => void;
471
- readonly wasmcompiler_token_dictionary: (a: number, b: number) => void;
482
+ readonly wasmcompiler_tokenDictionary: (a: number, b: number) => void;
472
483
  readonly wasmcompiler_writeArtifacts: (a: number, b: number, c: number) => void;
473
484
  readonly wasmcompiler_writeCss: (a: number, b: number, c: number) => void;
474
485
  readonly wasmcompiler_writeLayerCss: (a: number, b: number, c: number) => void;
@@ -482,10 +493,12 @@ export interface InitOutput {
482
493
  readonly wasmfilesystem_readFile: (a: number, b: number, c: number, d: number) => void;
483
494
  readonly wasmfilesystem_removeFile: (a: number, b: number, c: number) => number;
484
495
  readonly installPanicHook: () => void;
496
+ readonly __wasm_bindgen_func_elem_504: (a: number, b: number, c: number, d: number) => number;
485
497
  readonly __wbindgen_export: (a: number, b: number) => number;
486
498
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
487
499
  readonly __wbindgen_export3: (a: number) => void;
488
500
  readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
501
+ readonly __wbindgen_export5: (a: number, b: number) => void;
489
502
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
490
503
  }
491
504