@pandacss/compiler 2.0.0-beta.17 → 2.0.0-beta.19
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/binding.cjs +54 -54
- package/dist/{chunk-AN3VLJEN.js → chunk-QV5TB7QO.js} +116 -13
- package/dist/index.d.ts +8 -2
- package/dist/index.js +1 -1
- package/dist/loader.d.ts +1 -1
- package/dist/loader.js +1 -1
- package/dist/tooling/index.js +58 -9
- package/dist/{types-CsQTkng9.d.ts → types-BbuLq_c5.d.ts} +1 -1
- package/package.json +14 -14
package/binding.cjs
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('@pandacss/compiler-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('@pandacss/compiler-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
80
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('@pandacss/compiler-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('@pandacss/compiler-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
96
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('@pandacss/compiler-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('@pandacss/compiler-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
117
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('@pandacss/compiler-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('@pandacss/compiler-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
133
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@pandacss/compiler-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@pandacss/compiler-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
150
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('@pandacss/compiler-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('@pandacss/compiler-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
166
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('@pandacss/compiler-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('@pandacss/compiler-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
185
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('@pandacss/compiler-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('@pandacss/compiler-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
201
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('@pandacss/compiler-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('@pandacss/compiler-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
217
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('@pandacss/compiler-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('@pandacss/compiler-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
237
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('@pandacss/compiler-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('@pandacss/compiler-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
253
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('@pandacss/compiler-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('@pandacss/compiler-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
274
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('@pandacss/compiler-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('@pandacss/compiler-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
290
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('@pandacss/compiler-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('@pandacss/compiler-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
308
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('@pandacss/compiler-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('@pandacss/compiler-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
324
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('@pandacss/compiler-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('@pandacss/compiler-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
342
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('@pandacss/compiler-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('@pandacss/compiler-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
358
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('@pandacss/compiler-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('@pandacss/compiler-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
376
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('@pandacss/compiler-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('@pandacss/compiler-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
392
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('@pandacss/compiler-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('@pandacss/compiler-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
410
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('@pandacss/compiler-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('@pandacss/compiler-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
426
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@pandacss/compiler-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('@pandacss/compiler-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
443
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@pandacss/compiler-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@pandacss/compiler-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
459
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('@pandacss/compiler-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('@pandacss/compiler-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
479
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('@pandacss/compiler-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('@pandacss/compiler-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
495
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('@pandacss/compiler-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('@pandacss/compiler-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.
|
|
511
|
+
if (bindingPackageVersion !== '2.0.0-beta.19' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
@@ -648,8 +648,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
648
648
|
if (!candidateFailed) {
|
|
649
649
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
650
650
|
const bindingPackageVersion = require('@pandacss/compiler-wasm32-wasi/package.json').version
|
|
651
|
-
if (bindingPackageVersion !== '2.0.0-beta.
|
|
652
|
-
throw new Error(`WASI binding package version mismatch, expected 2.0.0-beta.
|
|
651
|
+
if (bindingPackageVersion !== '2.0.0-beta.19') {
|
|
652
|
+
throw new Error(`WASI binding package version mismatch, expected 2.0.0-beta.19 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
653
653
|
}
|
|
654
654
|
}
|
|
655
655
|
wasiBinding = require('@pandacss/compiler-wasm32-wasi')
|
|
@@ -375,10 +375,10 @@ function emptyWriteSplitCssResult(root) {
|
|
|
375
375
|
}
|
|
376
376
|
|
|
377
377
|
// src/load-binary.ts
|
|
378
|
-
import { execFileSync } from "child_process";
|
|
379
|
-
import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
|
380
|
-
import { createRequire } from "module";
|
|
381
|
-
import { dirname, join } from "path";
|
|
378
|
+
import { execFileSync } from "node:child_process";
|
|
379
|
+
import { existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
380
|
+
import { createRequire } from "node:module";
|
|
381
|
+
import { dirname, join } from "node:path";
|
|
382
382
|
var webContainerWasiPackage = "@pandacss/compiler-wasm32-wasi";
|
|
383
383
|
function loadNativeBinding() {
|
|
384
384
|
const bindingPath = resolveBindingPath();
|
|
@@ -498,8 +498,8 @@ import {
|
|
|
498
498
|
toPosixRelative,
|
|
499
499
|
toRelativeKey
|
|
500
500
|
} from "@pandacss/config";
|
|
501
|
-
import { statSync } from "fs";
|
|
502
|
-
import { dirname as dirname2, resolve as resolvePath } from "path";
|
|
501
|
+
import { statSync } from "node:fs";
|
|
502
|
+
import { dirname as dirname2, resolve as resolvePath } from "node:path";
|
|
503
503
|
|
|
504
504
|
// src/design-system.ts
|
|
505
505
|
import "@pandacss/compiler-shared";
|
|
@@ -528,7 +528,8 @@ function hydrateDesignSystem(compiler, options) {
|
|
|
528
528
|
}
|
|
529
529
|
const pandaVersion = readPandaVersion();
|
|
530
530
|
const diagnostics = [];
|
|
531
|
-
const
|
|
531
|
+
const appSelections = treeshake ? importSelections ?? collectImportSelections(compiler, chain) : void 0;
|
|
532
|
+
const selections = appSelections && withDependencyImports(compiler, chain, appSelections);
|
|
532
533
|
for (let i = 0; i < chain.length; i++) {
|
|
533
534
|
const ds = chain[i];
|
|
534
535
|
const imports = selections ? selections[i] ?? void 0 : void 0;
|
|
@@ -536,9 +537,64 @@ function hydrateDesignSystem(compiler, options) {
|
|
|
536
537
|
}
|
|
537
538
|
return {
|
|
538
539
|
diagnostics,
|
|
539
|
-
treeshakeKey: treeshakeKeyFromSelections(chain,
|
|
540
|
+
treeshakeKey: treeshakeKeyFromSelections(chain, appSelections)
|
|
540
541
|
};
|
|
541
542
|
}
|
|
543
|
+
var ALL_MODULES = { kind: "all" };
|
|
544
|
+
var NO_MODULES = { kind: "none" };
|
|
545
|
+
function withDependencyImports(compiler, chain, appSelections) {
|
|
546
|
+
const selections = appSelections.map(selectionFromScan);
|
|
547
|
+
for (let i = chain.length - 1; i > 0; i--) {
|
|
548
|
+
const selected = selections[i];
|
|
549
|
+
if (selected.kind === "none") continue;
|
|
550
|
+
const info = readBuildInfo(compiler, chain[i]);
|
|
551
|
+
for (let ancestorIndex = 0; ancestorIndex < i; ancestorIndex++) {
|
|
552
|
+
const imported = info ? compiler.designSystem.dependencyImports(info, selectionToImports(selected), chain[ancestorIndex].name) : void 0;
|
|
553
|
+
selections[ancestorIndex] = mergeSelection(selections[ancestorIndex], selectionFromImports(imported));
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
return selections.map(selectionToScan);
|
|
557
|
+
}
|
|
558
|
+
function selectionFromScan(selection) {
|
|
559
|
+
if (selection == null) return ALL_MODULES;
|
|
560
|
+
return selection.length === 0 ? NO_MODULES : { kind: "names", names: selection };
|
|
561
|
+
}
|
|
562
|
+
function selectionFromImports(imports) {
|
|
563
|
+
if (imports === void 0) return ALL_MODULES;
|
|
564
|
+
return imports.length === 0 ? NO_MODULES : { kind: "names", names: imports };
|
|
565
|
+
}
|
|
566
|
+
function selectionToImports(selection) {
|
|
567
|
+
if (selection.kind === "all") return void 0;
|
|
568
|
+
return selection.kind === "none" ? [] : selection.names;
|
|
569
|
+
}
|
|
570
|
+
function selectionToScan(selection) {
|
|
571
|
+
if (selection.kind === "all") return null;
|
|
572
|
+
return selection.kind === "none" ? [] : selection.names;
|
|
573
|
+
}
|
|
574
|
+
function mergeSelection(current, added) {
|
|
575
|
+
if (current.kind === "all" || added.kind === "all") return ALL_MODULES;
|
|
576
|
+
if (current.kind === "none") return added;
|
|
577
|
+
if (added.kind === "none") return current;
|
|
578
|
+
return { kind: "names", names: [.../* @__PURE__ */ new Set([...current.names, ...added.names])] };
|
|
579
|
+
}
|
|
580
|
+
function readBuildInfo(compiler, ds) {
|
|
581
|
+
if (ds.optionMismatch?.length) return void 0;
|
|
582
|
+
try {
|
|
583
|
+
const content = compiler.fs.readFile(ds.buildInfoPath);
|
|
584
|
+
if (content == null) return void 0;
|
|
585
|
+
const info = JSON.parse(content);
|
|
586
|
+
return compiler.buildInfo.validate(info).ok ? info : void 0;
|
|
587
|
+
} catch {
|
|
588
|
+
return void 0;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
function designSystemDependencies(chain) {
|
|
592
|
+
return (chain ?? []).map((ds) => ({
|
|
593
|
+
name: ds.name,
|
|
594
|
+
packageRoots: getPackageRoots(ds),
|
|
595
|
+
excludeModules: getExcludedModules(ds)
|
|
596
|
+
}));
|
|
597
|
+
}
|
|
542
598
|
function collectImportSelections(compiler, chain) {
|
|
543
599
|
return compiler.designSystemImportSelections(
|
|
544
600
|
chain.map((ds) => ({
|
|
@@ -770,7 +826,7 @@ function createProjectFromLoadedConfig(loaded) {
|
|
|
770
826
|
var DEFAULT_DESIGN_SYSTEM_LIB_OUTDIR = "dist";
|
|
771
827
|
var DEFAULT_DESIGN_SYSTEM_LIB_FILES = ["./**/*.{js,mjs}"];
|
|
772
828
|
async function createNodeDriver(options) {
|
|
773
|
-
const loaded = await loadConfig2({ cwd: options.cwd, file: options.configPath });
|
|
829
|
+
const loaded = await loadConfig2({ cwd: options.cwd, file: options.configPath, trackSources: options.trackSources });
|
|
774
830
|
if (options.include?.length) applyIncludeOverride(loaded, options.cwd, options.include);
|
|
775
831
|
return new NodeDriver(options, loaded);
|
|
776
832
|
}
|
|
@@ -810,6 +866,9 @@ var NodeDriver = class extends BaseDriver {
|
|
|
810
866
|
get designSystemDiagnostics() {
|
|
811
867
|
return this.#designSystemDiagnostics;
|
|
812
868
|
}
|
|
869
|
+
configSources() {
|
|
870
|
+
return this.#loaded.metadata?.sources;
|
|
871
|
+
}
|
|
813
872
|
codegenOverlay() {
|
|
814
873
|
if (!this.#codegenOverlayResolved) {
|
|
815
874
|
this.#codegenOverlay = buildCodegenOverlay(this.#loaded.metadata);
|
|
@@ -882,7 +941,11 @@ var NodeDriver = class extends BaseDriver {
|
|
|
882
941
|
return this.applyChanges(changes);
|
|
883
942
|
}
|
|
884
943
|
async reload() {
|
|
885
|
-
const next = await loadConfig2({
|
|
944
|
+
const next = await loadConfig2({
|
|
945
|
+
cwd: this.#options.cwd,
|
|
946
|
+
file: this.#options.configPath,
|
|
947
|
+
trackSources: this.#options.trackSources
|
|
948
|
+
});
|
|
886
949
|
if (this.#options.include?.length) applyIncludeOverride(next, this.#options.cwd, this.#options.include);
|
|
887
950
|
const diff = diffConfig(this.#loaded, next);
|
|
888
951
|
const nextDesignSystemArtifactSnapshot = designSystemArtifactSnapshot(next);
|
|
@@ -1101,7 +1164,10 @@ var NodeDriver = class extends BaseDriver {
|
|
|
1101
1164
|
const manifestPath = this.compiler.path.join([pandaDir, "lib.json"]);
|
|
1102
1165
|
const buildInfoPath = this.compiler.path.join([pandaDir, "buildinfo.json"]);
|
|
1103
1166
|
const presetPath = this.compiler.path.join([pandaDir, "preset.mjs"]);
|
|
1104
|
-
const info = this.compiler.buildInfo.create({
|
|
1167
|
+
const info = this.compiler.buildInfo.create({
|
|
1168
|
+
panda: pandaRange,
|
|
1169
|
+
designSystemDependencies: designSystemDependencies(this.#loaded.metadata?.designSystem)
|
|
1170
|
+
});
|
|
1105
1171
|
const buildInfo = this.compiler.buildInfo.normalize(info, {
|
|
1106
1172
|
mapModuleKey: (key) => toRelativeKey(key, this.#options.cwd)
|
|
1107
1173
|
});
|
|
@@ -1115,12 +1181,22 @@ var NodeDriver = class extends BaseDriver {
|
|
|
1115
1181
|
publishFiles: identity.publishFiles,
|
|
1116
1182
|
packageName: identity.name
|
|
1117
1183
|
});
|
|
1184
|
+
const { spec, diagnostics: specDiagnostics } = resolvePublishableSpec({
|
|
1185
|
+
spec: options.spec,
|
|
1186
|
+
compiler: this.compiler,
|
|
1187
|
+
outRoot,
|
|
1188
|
+
pandaDir,
|
|
1189
|
+
packageRoot: this.compiler.path.dirname(identity.packagePath),
|
|
1190
|
+
publishFiles: identity.publishFiles,
|
|
1191
|
+
packageName: identity.name
|
|
1192
|
+
});
|
|
1118
1193
|
const manifest = this.compiler.designSystem.create({
|
|
1119
1194
|
name: identity.name,
|
|
1120
1195
|
version: identity.version,
|
|
1121
1196
|
panda: pandaRange,
|
|
1122
1197
|
preset: "./preset.mjs",
|
|
1123
1198
|
buildInfo: "./buildinfo.json",
|
|
1199
|
+
spec,
|
|
1124
1200
|
importMap: defaultImportMap(identity.name),
|
|
1125
1201
|
designSystem: typeof this.config.designSystem === "string" ? this.config.designSystem : void 0,
|
|
1126
1202
|
files: libFiles
|
|
@@ -1162,10 +1238,37 @@ var NodeDriver = class extends BaseDriver {
|
|
|
1162
1238
|
presetPath,
|
|
1163
1239
|
exportsChanged,
|
|
1164
1240
|
parsedFileCount: parsed.parsedFileCount,
|
|
1165
|
-
diagnostics: [
|
|
1241
|
+
diagnostics: [
|
|
1242
|
+
...parsed.diagnostics,
|
|
1243
|
+
...filesDiagnostics,
|
|
1244
|
+
...specDiagnostics,
|
|
1245
|
+
...exportConflictDiagnostics(identity.name, conflicts)
|
|
1246
|
+
]
|
|
1166
1247
|
};
|
|
1167
1248
|
}
|
|
1168
1249
|
};
|
|
1250
|
+
function resolvePublishableSpec(options) {
|
|
1251
|
+
if (!options.spec) return { diagnostics: [] };
|
|
1252
|
+
const absolute = options.compiler.path.resolve(options.spec);
|
|
1253
|
+
const { unpublished } = filterPublishableLibFiles({
|
|
1254
|
+
files: [toPosixRelative(options.outRoot, absolute)],
|
|
1255
|
+
packageRoot: options.packageRoot,
|
|
1256
|
+
outRoot: options.outRoot,
|
|
1257
|
+
publishFiles: options.publishFiles
|
|
1258
|
+
});
|
|
1259
|
+
if (unpublished.length > 0) {
|
|
1260
|
+
return { diagnostics: [specNotPublishableDiagnostic(options.packageName, unpublished[0])] };
|
|
1261
|
+
}
|
|
1262
|
+
return { spec: toPosixRelative(options.pandaDir, absolute), diagnostics: [] };
|
|
1263
|
+
}
|
|
1264
|
+
function specNotPublishableDiagnostic(name, spec) {
|
|
1265
|
+
return {
|
|
1266
|
+
code: "design_system_spec_not_publishable",
|
|
1267
|
+
severity: "warning",
|
|
1268
|
+
category: "designSystem",
|
|
1269
|
+
message: `\`panda lib\` left the spec out of ${JSON.stringify(name)}'s manifest because package.json \`"files"\` would not publish ${JSON.stringify(spec)}. A bare \`--spec\` writes it beside preset.mjs, inside what you publish.`
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1169
1272
|
function resolveDesignSystemLibFiles(options) {
|
|
1170
1273
|
if (options.explicit) {
|
|
1171
1274
|
return { files: options.explicit, diagnostics: [] };
|
|
@@ -1382,7 +1485,7 @@ function build(config, callbacks, options) {
|
|
|
1382
1485
|
assertNativeBinding(callbacks, options?.hooks);
|
|
1383
1486
|
const prepared = prepareCompilerConfig(config);
|
|
1384
1487
|
const compiler = nativeCompilerFromConfig(prepared, toNativeOptions(options), createUtilityValuesCallbacks(callbacks));
|
|
1385
|
-
registerCallbacks(compiler, callbacks, options?.hooks, compiler.
|
|
1488
|
+
registerCallbacks(compiler, callbacks, options?.hooks, compiler.tokenDictionary?.());
|
|
1386
1489
|
attachFileSystem(compiler);
|
|
1387
1490
|
attachPathSystem(compiler);
|
|
1388
1491
|
attachBuildInfo(compiler);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import * as _pandacss_compiler_shared from '@pandacss/compiler-shared';
|
|
|
2
2
|
import { BaseDriver, Diagnostic, CodegenOverlay, DesignSystemWatchTarget, DesignSystemWatchFileKind, SourceChange, DiffConfigResult, CodegenOptions, CompileOptions, CompileOutput, WriteCssOptions, WriteCssResult, WriteLayerCssOptions, WriteSplitCssOptions, WriteSplitCssResult, SerializedConfig, CompilerOptions, ConfigSnapshot } from '@pandacss/compiler-shared';
|
|
3
3
|
export * from '@pandacss/compiler-shared';
|
|
4
4
|
export { NativeSourceTransformer, NativeTransformSourceInput, TransformSourceOptions, TransformSourceResult, createUsageReport } from '@pandacss/compiler-shared';
|
|
5
|
-
import { C as CompileInput, T as TraceOptions, N as NativeCompiler } from './types-
|
|
6
|
-
export { n as CompilerConstructor, i as ExtractDebugResult, E as ExtractedCallsResult, h as ExtractedJsxResult, j as ExtractorSession, k as ExtractorSessionConstructor, b as ImportKind, c as ImportRecord, d as ImportScanResult, a as ImportSpecifier, I as ImportSpecifierKind, J as JsxFramework, g as MatchedImport, M as Matcher, e as Matchers, o as NativeBinding, l as NativeCompilerOptions, m as RawCompiler, R as RawSourceTransformBinding, f as TokenDictionary } from './types-
|
|
5
|
+
import { C as CompileInput, T as TraceOptions, N as NativeCompiler } from './types-BbuLq_c5.js';
|
|
6
|
+
export { n as CompilerConstructor, i as ExtractDebugResult, E as ExtractedCallsResult, h as ExtractedJsxResult, j as ExtractorSession, k as ExtractorSessionConstructor, b as ImportKind, c as ImportRecord, d as ImportScanResult, a as ImportSpecifier, I as ImportSpecifierKind, J as JsxFramework, g as MatchedImport, M as Matcher, e as Matchers, o as NativeBinding, l as NativeCompilerOptions, m as RawCompiler, R as RawSourceTransformBinding, f as TokenDictionary } from './types-BbuLq_c5.js';
|
|
7
|
+
import * as _pandacss_config from '@pandacss/config';
|
|
7
8
|
import { LoadConfigResult } from '@pandacss/config';
|
|
8
9
|
|
|
9
10
|
interface NodeDriverOptions {
|
|
@@ -12,6 +13,8 @@ interface NodeDriverOptions {
|
|
|
12
13
|
configPath?: string;
|
|
13
14
|
/** Override the config's `include` globs (e.g. CLI `--include`). Empty/omitted keeps the config value. */
|
|
14
15
|
include?: string[];
|
|
16
|
+
/** Record which config or preset defined each entry, for `spec()` provenance. */
|
|
17
|
+
trackSources?: boolean;
|
|
15
18
|
}
|
|
16
19
|
interface WriteDesignSystemLibOptions {
|
|
17
20
|
outdir?: string;
|
|
@@ -19,6 +22,8 @@ interface WriteDesignSystemLibOptions {
|
|
|
19
22
|
panda?: string;
|
|
20
23
|
minify?: boolean;
|
|
21
24
|
maxWarnings?: number | string;
|
|
25
|
+
/** An already-written spec file; recorded in lib.json relative to the manifest. */
|
|
26
|
+
spec?: string;
|
|
22
27
|
}
|
|
23
28
|
interface WriteDesignSystemLibResult {
|
|
24
29
|
manifestPath: string;
|
|
@@ -37,6 +42,7 @@ declare class NodeDriver extends BaseDriver {
|
|
|
37
42
|
#private;
|
|
38
43
|
constructor(options: NodeDriverOptions, loaded: LoadConfigResult);
|
|
39
44
|
get designSystemDiagnostics(): Diagnostic[];
|
|
45
|
+
protected configSources(): _pandacss_config.ConfigSources | undefined;
|
|
40
46
|
protected codegenOverlay(): CodegenOverlay | undefined;
|
|
41
47
|
get config(): _pandacss_compiler_shared.SerializedConfig;
|
|
42
48
|
get configPath(): string;
|
package/dist/index.js
CHANGED
package/dist/loader.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CompilerOptions } from '@pandacss/compiler-shared';
|
|
2
2
|
import { LoadConfigOptions } from '@pandacss/config';
|
|
3
3
|
export { LoadConfigOptions, LoadConfigResult } from '@pandacss/config';
|
|
4
|
-
import { N as NativeCompiler } from './types-
|
|
4
|
+
import { N as NativeCompiler } from './types-BbuLq_c5.js';
|
|
5
5
|
|
|
6
6
|
interface LoadCompilerResult {
|
|
7
7
|
/** The compiler built from the loaded config snapshot. */
|
package/dist/loader.js
CHANGED
package/dist/tooling/index.js
CHANGED
|
@@ -33,7 +33,8 @@ function hydrateDesignSystem(compiler, options) {
|
|
|
33
33
|
}
|
|
34
34
|
const pandaVersion = readPandaVersion();
|
|
35
35
|
const diagnostics = [];
|
|
36
|
-
const
|
|
36
|
+
const appSelections = treeshake ? importSelections ?? collectImportSelections(compiler, chain) : void 0;
|
|
37
|
+
const selections = appSelections && withDependencyImports(compiler, chain, appSelections);
|
|
37
38
|
for (let i = 0; i < chain.length; i++) {
|
|
38
39
|
const ds = chain[i];
|
|
39
40
|
const imports = selections ? selections[i] ?? void 0 : void 0;
|
|
@@ -41,9 +42,57 @@ function hydrateDesignSystem(compiler, options) {
|
|
|
41
42
|
}
|
|
42
43
|
return {
|
|
43
44
|
diagnostics,
|
|
44
|
-
treeshakeKey: treeshakeKeyFromSelections(chain,
|
|
45
|
+
treeshakeKey: treeshakeKeyFromSelections(chain, appSelections)
|
|
45
46
|
};
|
|
46
47
|
}
|
|
48
|
+
var ALL_MODULES = { kind: "all" };
|
|
49
|
+
var NO_MODULES = { kind: "none" };
|
|
50
|
+
function withDependencyImports(compiler, chain, appSelections) {
|
|
51
|
+
const selections = appSelections.map(selectionFromScan);
|
|
52
|
+
for (let i = chain.length - 1; i > 0; i--) {
|
|
53
|
+
const selected = selections[i];
|
|
54
|
+
if (selected.kind === "none") continue;
|
|
55
|
+
const info = readBuildInfo(compiler, chain[i]);
|
|
56
|
+
for (let ancestorIndex = 0; ancestorIndex < i; ancestorIndex++) {
|
|
57
|
+
const imported = info ? compiler.designSystem.dependencyImports(info, selectionToImports(selected), chain[ancestorIndex].name) : void 0;
|
|
58
|
+
selections[ancestorIndex] = mergeSelection(selections[ancestorIndex], selectionFromImports(imported));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return selections.map(selectionToScan);
|
|
62
|
+
}
|
|
63
|
+
function selectionFromScan(selection) {
|
|
64
|
+
if (selection == null) return ALL_MODULES;
|
|
65
|
+
return selection.length === 0 ? NO_MODULES : { kind: "names", names: selection };
|
|
66
|
+
}
|
|
67
|
+
function selectionFromImports(imports) {
|
|
68
|
+
if (imports === void 0) return ALL_MODULES;
|
|
69
|
+
return imports.length === 0 ? NO_MODULES : { kind: "names", names: imports };
|
|
70
|
+
}
|
|
71
|
+
function selectionToImports(selection) {
|
|
72
|
+
if (selection.kind === "all") return void 0;
|
|
73
|
+
return selection.kind === "none" ? [] : selection.names;
|
|
74
|
+
}
|
|
75
|
+
function selectionToScan(selection) {
|
|
76
|
+
if (selection.kind === "all") return null;
|
|
77
|
+
return selection.kind === "none" ? [] : selection.names;
|
|
78
|
+
}
|
|
79
|
+
function mergeSelection(current, added) {
|
|
80
|
+
if (current.kind === "all" || added.kind === "all") return ALL_MODULES;
|
|
81
|
+
if (current.kind === "none") return added;
|
|
82
|
+
if (added.kind === "none") return current;
|
|
83
|
+
return { kind: "names", names: [.../* @__PURE__ */ new Set([...current.names, ...added.names])] };
|
|
84
|
+
}
|
|
85
|
+
function readBuildInfo(compiler, ds) {
|
|
86
|
+
if (ds.optionMismatch?.length) return void 0;
|
|
87
|
+
try {
|
|
88
|
+
const content = compiler.fs.readFile(ds.buildInfoPath);
|
|
89
|
+
if (content == null) return void 0;
|
|
90
|
+
const info = JSON.parse(content);
|
|
91
|
+
return compiler.buildInfo.validate(info).ok ? info : void 0;
|
|
92
|
+
} catch {
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
47
96
|
function collectImportSelections(compiler, chain) {
|
|
48
97
|
return compiler.designSystemImportSelections(
|
|
49
98
|
chain.map((ds) => ({
|
|
@@ -610,10 +659,10 @@ function emptyWriteSplitCssResult(root) {
|
|
|
610
659
|
}
|
|
611
660
|
|
|
612
661
|
// src/load-binary.ts
|
|
613
|
-
import { execFileSync } from "child_process";
|
|
614
|
-
import { existsSync, mkdirSync, readFileSync, rmSync } from "fs";
|
|
615
|
-
import { createRequire } from "module";
|
|
616
|
-
import { dirname, join } from "path";
|
|
662
|
+
import { execFileSync } from "node:child_process";
|
|
663
|
+
import { existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
664
|
+
import { createRequire } from "node:module";
|
|
665
|
+
import { dirname, join } from "node:path";
|
|
617
666
|
var webContainerWasiPackage = "@pandacss/compiler-wasm32-wasi";
|
|
618
667
|
function loadNativeBinding() {
|
|
619
668
|
const bindingPath = resolveBindingPath();
|
|
@@ -735,7 +784,7 @@ function build(config, callbacks, options) {
|
|
|
735
784
|
assertNativeBinding(callbacks, options?.hooks);
|
|
736
785
|
const prepared = prepareCompilerConfig(config);
|
|
737
786
|
const compiler = nativeCompilerFromConfig(prepared, toNativeOptions(options), createUtilityValuesCallbacks(callbacks));
|
|
738
|
-
registerCallbacks(compiler, callbacks, options?.hooks, compiler.
|
|
787
|
+
registerCallbacks(compiler, callbacks, options?.hooks, compiler.tokenDictionary?.());
|
|
739
788
|
attachFileSystem(compiler);
|
|
740
789
|
attachPathSystem(compiler);
|
|
741
790
|
attachBuildInfo(compiler);
|
|
@@ -893,8 +942,8 @@ function sourceCacheKey(source) {
|
|
|
893
942
|
}
|
|
894
943
|
|
|
895
944
|
// src/tooling/registry.ts
|
|
896
|
-
import { realpathSync, unwatchFile, watch, watchFile } from "fs";
|
|
897
|
-
import { dirname as dirname2, isAbsolute, join as join2, resolve } from "path";
|
|
945
|
+
import { realpathSync, unwatchFile, watch, watchFile } from "node:fs";
|
|
946
|
+
import { dirname as dirname2, isAbsolute, join as join2, resolve } from "node:path";
|
|
898
947
|
import { findConfig } from "@pandacss/config";
|
|
899
948
|
var FILE_POLL_INTERVAL_MS = 1e3;
|
|
900
949
|
var ProjectRegistry = class {
|
|
@@ -125,7 +125,7 @@ interface RawSourceTransformBinding {
|
|
|
125
125
|
* methods the facade hides. */
|
|
126
126
|
interface RawCompiler extends NativeCompiler, RawSourceTransformBinding, BuildInfoNative, RawDesignSystemBinding, RawFileSystemBinding, RawPathBinding {
|
|
127
127
|
inspectFileSource(path: string, source: string): Omit<FileInspectionResult, 'path'>;
|
|
128
|
-
|
|
128
|
+
tokenDictionary?(): TokenDictionary | undefined;
|
|
129
129
|
registerUtilityTransform?(id: string, callback: (resolved: unknown, original: unknown) => unknown): void;
|
|
130
130
|
registerPatternTransform?(id: string, callback: (props: unknown, helpers: Record<string, unknown>) => unknown): void;
|
|
131
131
|
registerSourceTransform?(id: string, filter: SerializedHookFilter | undefined, callback: (filePath: string, content: string) => string | undefined): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/compiler",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.19",
|
|
4
4
|
"description": "Native Rust binding for the Panda compiler engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@napi-rs/wasm-runtime": "^1.1.6",
|
|
59
|
-
"@pandacss/compiler-shared": "2.0.0-beta.
|
|
60
|
-
"@pandacss/config": "2.0.0-beta.
|
|
61
|
-
"@pandacss/types": "2.0.0-beta.
|
|
59
|
+
"@pandacss/compiler-shared": "2.0.0-beta.19",
|
|
60
|
+
"@pandacss/config": "2.0.0-beta.19",
|
|
61
|
+
"@pandacss/types": "2.0.0-beta.19"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@emnapi/core": "1.11.2",
|
|
65
65
|
"@emnapi/runtime": "1.11.2",
|
|
66
66
|
"@napi-rs/cli": "3.9.0",
|
|
67
|
-
"@pandacss/preset-base": "2.0.0-beta.
|
|
68
|
-
"@pandacss/preset-panda": "2.0.0-beta.
|
|
67
|
+
"@pandacss/preset-base": "2.0.0-beta.19",
|
|
68
|
+
"@pandacss/preset-panda": "2.0.0-beta.19",
|
|
69
69
|
"emnapi": "1.11.2",
|
|
70
70
|
"lightningcss": "1.33.0",
|
|
71
71
|
"rolldown": "1.2.7"
|
|
@@ -74,14 +74,14 @@
|
|
|
74
74
|
"node": ">=22"
|
|
75
75
|
},
|
|
76
76
|
"optionalDependencies": {
|
|
77
|
-
"@pandacss/compiler-darwin-arm64": "2.0.0-beta.
|
|
78
|
-
"@pandacss/compiler-darwin-x64": "2.0.0-beta.
|
|
79
|
-
"@pandacss/compiler-linux-x64-gnu": "2.0.0-beta.
|
|
80
|
-
"@pandacss/compiler-linux-arm64-gnu": "2.0.0-beta.
|
|
81
|
-
"@pandacss/compiler-linux-x64-musl": "2.0.0-beta.
|
|
82
|
-
"@pandacss/compiler-linux-arm64-musl": "2.0.0-beta.
|
|
83
|
-
"@pandacss/compiler-win32-x64-msvc": "2.0.0-beta.
|
|
84
|
-
"@pandacss/compiler-win32-arm64-msvc": "2.0.0-beta.
|
|
77
|
+
"@pandacss/compiler-darwin-arm64": "2.0.0-beta.19",
|
|
78
|
+
"@pandacss/compiler-darwin-x64": "2.0.0-beta.19",
|
|
79
|
+
"@pandacss/compiler-linux-x64-gnu": "2.0.0-beta.19",
|
|
80
|
+
"@pandacss/compiler-linux-arm64-gnu": "2.0.0-beta.19",
|
|
81
|
+
"@pandacss/compiler-linux-x64-musl": "2.0.0-beta.19",
|
|
82
|
+
"@pandacss/compiler-linux-arm64-musl": "2.0.0-beta.19",
|
|
83
|
+
"@pandacss/compiler-win32-x64-msvc": "2.0.0-beta.19",
|
|
84
|
+
"@pandacss/compiler-win32-arm64-msvc": "2.0.0-beta.19"
|
|
85
85
|
},
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "pnpm build:native && pnpm build:js",
|