@pandacss/config 0.32.1 → 0.34.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.
- package/dist/{chunk-3MGBJU2R.mjs → chunk-XG53JPBE.mjs} +1 -0
- package/dist/diff-config.js +1 -0
- package/dist/diff-config.mjs +1 -1
- package/dist/index.js +22 -2
- package/dist/index.mjs +22 -3
- package/package.json +6 -6
package/dist/diff-config.js
CHANGED
package/dist/diff-config.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -141,6 +141,7 @@ var all = [
|
|
|
141
141
|
"emitPackage",
|
|
142
142
|
"emitTokensOnly",
|
|
143
143
|
"presets",
|
|
144
|
+
"plugins",
|
|
144
145
|
"hooks"
|
|
145
146
|
];
|
|
146
147
|
var format = [
|
|
@@ -741,6 +742,9 @@ var validateTokens = (options) => {
|
|
|
741
742
|
tokenNames.add(path2);
|
|
742
743
|
tokenPaths.add(path2);
|
|
743
744
|
valueAtPath.set(path2, value);
|
|
745
|
+
if (path2.includes("DEFAULT")) {
|
|
746
|
+
valueAtPath.set(path2.replace("DEFAULT", ""), value);
|
|
747
|
+
}
|
|
744
748
|
},
|
|
745
749
|
{
|
|
746
750
|
stop: isValidToken
|
|
@@ -753,6 +757,10 @@ var validateTokens = (options) => {
|
|
|
753
757
|
addError("tokens", `Token must contain 'value': \`theme.tokens.${formattedPath}\``);
|
|
754
758
|
return;
|
|
755
759
|
}
|
|
760
|
+
if (path2.includes(" ")) {
|
|
761
|
+
addError("tokens", `Token key must not contain spaces: \`theme.tokens.${formattedPath}\``);
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
756
764
|
if (isTokenReference(value)) {
|
|
757
765
|
refsByPath.set(formattedPath, /* @__PURE__ */ new Set([]));
|
|
758
766
|
}
|
|
@@ -767,11 +775,19 @@ var validateTokens = (options) => {
|
|
|
767
775
|
semanticTokenNames.add(path2);
|
|
768
776
|
valueAtPath.set(path2, value);
|
|
769
777
|
tokenPaths.add(path2);
|
|
778
|
+
if (path2.includes("DEFAULT")) {
|
|
779
|
+
valueAtPath.set(path2.replace(SEP + "DEFAULT", ""), value);
|
|
780
|
+
}
|
|
770
781
|
if (!isValidToken(value))
|
|
771
782
|
return;
|
|
772
|
-
(0, import_shared7.walkObject)(value, (itemValue) => {
|
|
783
|
+
(0, import_shared7.walkObject)(value, (itemValue, paths2) => {
|
|
784
|
+
const valuePath = paths2.join(SEP);
|
|
785
|
+
const formattedPath = formatPath(path2);
|
|
786
|
+
const fullPath = formattedPath + "." + paths2.join(SEP);
|
|
787
|
+
if (valuePath.includes("value" + SEP + "value")) {
|
|
788
|
+
addError("tokens", `You used \`value\` twice resulting in an invalid token \`theme.tokens.${fullPath}\``);
|
|
789
|
+
}
|
|
773
790
|
if (isTokenReference(itemValue)) {
|
|
774
|
-
const formattedPath = formatPath(path2);
|
|
775
791
|
if (!refsByPath.has(formattedPath)) {
|
|
776
792
|
refsByPath.set(formattedPath, /* @__PURE__ */ new Set());
|
|
777
793
|
}
|
|
@@ -790,6 +806,10 @@ var validateTokens = (options) => {
|
|
|
790
806
|
tokenPaths.forEach((path2) => {
|
|
791
807
|
const formattedPath = formatPath(path2);
|
|
792
808
|
const value = valueAtPath.get(path2);
|
|
809
|
+
if (path2.includes(" ")) {
|
|
810
|
+
addError("tokens", `Token key must not contain spaces: \`theme.tokens.${formattedPath}\``);
|
|
811
|
+
return;
|
|
812
|
+
}
|
|
793
813
|
if (!(0, import_shared7.isObject)(value) && !path2.includes("value")) {
|
|
794
814
|
addError("tokens", `Token must contain 'value': \`theme.semanticTokens.${formattedPath}\``);
|
|
795
815
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-MT2A5AKG.mjs";
|
|
5
5
|
import {
|
|
6
6
|
diffConfigs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XG53JPBE.mjs";
|
|
8
8
|
import {
|
|
9
9
|
resolveTsPathPattern
|
|
10
10
|
} from "./chunk-RPIVZP2I.mjs";
|
|
@@ -379,6 +379,9 @@ var validateTokens = (options) => {
|
|
|
379
379
|
tokenNames.add(path2);
|
|
380
380
|
tokenPaths.add(path2);
|
|
381
381
|
valueAtPath.set(path2, value);
|
|
382
|
+
if (path2.includes("DEFAULT")) {
|
|
383
|
+
valueAtPath.set(path2.replace("DEFAULT", ""), value);
|
|
384
|
+
}
|
|
382
385
|
},
|
|
383
386
|
{
|
|
384
387
|
stop: isValidToken
|
|
@@ -391,6 +394,10 @@ var validateTokens = (options) => {
|
|
|
391
394
|
addError("tokens", `Token must contain 'value': \`theme.tokens.${formattedPath}\``);
|
|
392
395
|
return;
|
|
393
396
|
}
|
|
397
|
+
if (path2.includes(" ")) {
|
|
398
|
+
addError("tokens", `Token key must not contain spaces: \`theme.tokens.${formattedPath}\``);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
394
401
|
if (isTokenReference(value)) {
|
|
395
402
|
refsByPath.set(formattedPath, /* @__PURE__ */ new Set([]));
|
|
396
403
|
}
|
|
@@ -405,11 +412,19 @@ var validateTokens = (options) => {
|
|
|
405
412
|
semanticTokenNames.add(path2);
|
|
406
413
|
valueAtPath.set(path2, value);
|
|
407
414
|
tokenPaths.add(path2);
|
|
415
|
+
if (path2.includes("DEFAULT")) {
|
|
416
|
+
valueAtPath.set(path2.replace(SEP + "DEFAULT", ""), value);
|
|
417
|
+
}
|
|
408
418
|
if (!isValidToken(value))
|
|
409
419
|
return;
|
|
410
|
-
walkObject(value, (itemValue) => {
|
|
420
|
+
walkObject(value, (itemValue, paths2) => {
|
|
421
|
+
const valuePath = paths2.join(SEP);
|
|
422
|
+
const formattedPath = formatPath(path2);
|
|
423
|
+
const fullPath = formattedPath + "." + paths2.join(SEP);
|
|
424
|
+
if (valuePath.includes("value" + SEP + "value")) {
|
|
425
|
+
addError("tokens", `You used \`value\` twice resulting in an invalid token \`theme.tokens.${fullPath}\``);
|
|
426
|
+
}
|
|
411
427
|
if (isTokenReference(itemValue)) {
|
|
412
|
-
const formattedPath = formatPath(path2);
|
|
413
428
|
if (!refsByPath.has(formattedPath)) {
|
|
414
429
|
refsByPath.set(formattedPath, /* @__PURE__ */ new Set());
|
|
415
430
|
}
|
|
@@ -428,6 +443,10 @@ var validateTokens = (options) => {
|
|
|
428
443
|
tokenPaths.forEach((path2) => {
|
|
429
444
|
const formattedPath = formatPath(path2);
|
|
430
445
|
const value = valueAtPath.get(path2);
|
|
446
|
+
if (path2.includes(" ")) {
|
|
447
|
+
addError("tokens", `Token key must not contain spaces: \`theme.tokens.${formattedPath}\``);
|
|
448
|
+
return;
|
|
449
|
+
}
|
|
431
450
|
if (!isObject(value) && !path2.includes("value")) {
|
|
432
451
|
addError("tokens", `Token must contain 'value': \`theme.semanticTokens.${formattedPath}\``);
|
|
433
452
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Find and load panda config",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"merge-anything": "5.1.7",
|
|
65
65
|
"microdiff": "1.3.2",
|
|
66
66
|
"typescript": "5.3.3",
|
|
67
|
-
"@pandacss/logger": "0.
|
|
68
|
-
"@pandacss/preset-base": "0.
|
|
69
|
-
"@pandacss/preset-panda": "0.
|
|
70
|
-
"@pandacss/shared": "0.
|
|
71
|
-
"@pandacss/types": "0.
|
|
67
|
+
"@pandacss/logger": "0.34.0",
|
|
68
|
+
"@pandacss/preset-base": "0.34.0",
|
|
69
|
+
"@pandacss/preset-panda": "0.34.0",
|
|
70
|
+
"@pandacss/shared": "0.34.0",
|
|
71
|
+
"@pandacss/types": "0.34.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"pkg-types": "1.0.3"
|