@pandacss/config 0.33.0 → 0.34.1
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.js +21 -2
- package/dist/index.mjs +21 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -742,6 +742,9 @@ var validateTokens = (options) => {
|
|
|
742
742
|
tokenNames.add(path2);
|
|
743
743
|
tokenPaths.add(path2);
|
|
744
744
|
valueAtPath.set(path2, value);
|
|
745
|
+
if (path2.includes("DEFAULT")) {
|
|
746
|
+
valueAtPath.set(path2.replace("DEFAULT", ""), value);
|
|
747
|
+
}
|
|
745
748
|
},
|
|
746
749
|
{
|
|
747
750
|
stop: isValidToken
|
|
@@ -754,6 +757,10 @@ var validateTokens = (options) => {
|
|
|
754
757
|
addError("tokens", `Token must contain 'value': \`theme.tokens.${formattedPath}\``);
|
|
755
758
|
return;
|
|
756
759
|
}
|
|
760
|
+
if (path2.includes(" ")) {
|
|
761
|
+
addError("tokens", `Token key must not contain spaces: \`theme.tokens.${formattedPath}\``);
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
757
764
|
if (isTokenReference(value)) {
|
|
758
765
|
refsByPath.set(formattedPath, /* @__PURE__ */ new Set([]));
|
|
759
766
|
}
|
|
@@ -768,11 +775,19 @@ var validateTokens = (options) => {
|
|
|
768
775
|
semanticTokenNames.add(path2);
|
|
769
776
|
valueAtPath.set(path2, value);
|
|
770
777
|
tokenPaths.add(path2);
|
|
778
|
+
if (path2.includes("DEFAULT")) {
|
|
779
|
+
valueAtPath.set(path2.replace(SEP + "DEFAULT", ""), value);
|
|
780
|
+
}
|
|
771
781
|
if (!isValidToken(value))
|
|
772
782
|
return;
|
|
773
|
-
(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
|
+
}
|
|
774
790
|
if (isTokenReference(itemValue)) {
|
|
775
|
-
const formattedPath = formatPath(path2);
|
|
776
791
|
if (!refsByPath.has(formattedPath)) {
|
|
777
792
|
refsByPath.set(formattedPath, /* @__PURE__ */ new Set());
|
|
778
793
|
}
|
|
@@ -791,6 +806,10 @@ var validateTokens = (options) => {
|
|
|
791
806
|
tokenPaths.forEach((path2) => {
|
|
792
807
|
const formattedPath = formatPath(path2);
|
|
793
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
|
+
}
|
|
794
813
|
if (!(0, import_shared7.isObject)(value) && !path2.includes("value")) {
|
|
795
814
|
addError("tokens", `Token must contain 'value': \`theme.semanticTokens.${formattedPath}\``);
|
|
796
815
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -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.1",
|
|
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.1",
|
|
68
|
+
"@pandacss/preset-base": "0.34.1",
|
|
69
|
+
"@pandacss/preset-panda": "0.34.1",
|
|
70
|
+
"@pandacss/shared": "0.34.1",
|
|
71
|
+
"@pandacss/types": "0.34.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"pkg-types": "1.0.3"
|