@pandacss/config 0.0.0-dev-20240228135438 → 0.0.0-dev-20240301001057

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 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
@@ -768,11 +771,19 @@ var validateTokens = (options) => {
768
771
  semanticTokenNames.add(path2);
769
772
  valueAtPath.set(path2, value);
770
773
  tokenPaths.add(path2);
774
+ if (path2.includes("DEFAULT")) {
775
+ valueAtPath.set(path2.replace(SEP + "DEFAULT", ""), value);
776
+ }
771
777
  if (!isValidToken(value))
772
778
  return;
773
- (0, import_shared7.walkObject)(value, (itemValue) => {
779
+ (0, import_shared7.walkObject)(value, (itemValue, paths2) => {
780
+ const valuePath = paths2.join(SEP);
781
+ const formattedPath = formatPath(path2);
782
+ const fullPath = formattedPath + "." + paths2.join(SEP);
783
+ if (valuePath.includes("value" + SEP + "value")) {
784
+ addError("tokens", `You used \`value\` twice resulting in an invalid token \`theme.tokens.${fullPath}\``);
785
+ }
774
786
  if (isTokenReference(itemValue)) {
775
- const formattedPath = formatPath(path2);
776
787
  if (!refsByPath.has(formattedPath)) {
777
788
  refsByPath.set(formattedPath, /* @__PURE__ */ new Set());
778
789
  }
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
@@ -405,11 +408,19 @@ var validateTokens = (options) => {
405
408
  semanticTokenNames.add(path2);
406
409
  valueAtPath.set(path2, value);
407
410
  tokenPaths.add(path2);
411
+ if (path2.includes("DEFAULT")) {
412
+ valueAtPath.set(path2.replace(SEP + "DEFAULT", ""), value);
413
+ }
408
414
  if (!isValidToken(value))
409
415
  return;
410
- walkObject(value, (itemValue) => {
416
+ walkObject(value, (itemValue, paths2) => {
417
+ const valuePath = paths2.join(SEP);
418
+ const formattedPath = formatPath(path2);
419
+ const fullPath = formattedPath + "." + paths2.join(SEP);
420
+ if (valuePath.includes("value" + SEP + "value")) {
421
+ addError("tokens", `You used \`value\` twice resulting in an invalid token \`theme.tokens.${fullPath}\``);
422
+ }
411
423
  if (isTokenReference(itemValue)) {
412
- const formattedPath = formatPath(path2);
413
424
  if (!refsByPath.has(formattedPath)) {
414
425
  refsByPath.set(formattedPath, /* @__PURE__ */ new Set());
415
426
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/config",
3
- "version": "0.0.0-dev-20240228135438",
3
+ "version": "0.0.0-dev-20240301001057",
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.0.0-dev-20240228135438",
68
- "@pandacss/preset-base": "0.0.0-dev-20240228135438",
69
- "@pandacss/preset-panda": "0.0.0-dev-20240228135438",
70
- "@pandacss/shared": "0.0.0-dev-20240228135438",
71
- "@pandacss/types": "0.0.0-dev-20240228135438"
67
+ "@pandacss/logger": "0.0.0-dev-20240301001057",
68
+ "@pandacss/preset-base": "0.0.0-dev-20240301001057",
69
+ "@pandacss/preset-panda": "0.0.0-dev-20240301001057",
70
+ "@pandacss/shared": "0.0.0-dev-20240301001057",
71
+ "@pandacss/types": "0.0.0-dev-20240301001057"
72
72
  },
73
73
  "devDependencies": {
74
74
  "pkg-types": "1.0.3"