@pandacss/token-dictionary 0.34.0 → 0.34.2
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 +17 -2
- package/dist/index.mjs +17 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -628,8 +628,23 @@ var addConditionalCssVariables = {
|
|
|
628
628
|
if (!refs.length)
|
|
629
629
|
return token.value;
|
|
630
630
|
refs.forEach((ref) => {
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
if (!ref.includes("/")) {
|
|
632
|
+
const variable = dictionary.formatCssVar(ref.split("."), { prefix, hash }).ref;
|
|
633
|
+
token.value = token.value.replace(`{${ref}}`, variable);
|
|
634
|
+
return;
|
|
635
|
+
}
|
|
636
|
+
const expanded = expandReferences(token.value, (path) => {
|
|
637
|
+
const tokenFn = (tokenPath) => {
|
|
638
|
+
const token2 = dictionary.getByName(tokenPath);
|
|
639
|
+
return token2?.extensions.varRef;
|
|
640
|
+
};
|
|
641
|
+
const mix = dictionary.colorMix(path, tokenFn);
|
|
642
|
+
if (mix.invalid) {
|
|
643
|
+
throw new Error("Invalid color mix at " + path + ": " + mix.value);
|
|
644
|
+
}
|
|
645
|
+
return mix.value;
|
|
646
|
+
});
|
|
647
|
+
token.value = token.value.replace(`{${ref}}`, expanded);
|
|
633
648
|
});
|
|
634
649
|
return token.value;
|
|
635
650
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -608,8 +608,23 @@ var addConditionalCssVariables = {
|
|
|
608
608
|
if (!refs.length)
|
|
609
609
|
return token.value;
|
|
610
610
|
refs.forEach((ref) => {
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
if (!ref.includes("/")) {
|
|
612
|
+
const variable = dictionary.formatCssVar(ref.split("."), { prefix, hash }).ref;
|
|
613
|
+
token.value = token.value.replace(`{${ref}}`, variable);
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
const expanded = expandReferences(token.value, (path) => {
|
|
617
|
+
const tokenFn = (tokenPath) => {
|
|
618
|
+
const token2 = dictionary.getByName(tokenPath);
|
|
619
|
+
return token2?.extensions.varRef;
|
|
620
|
+
};
|
|
621
|
+
const mix = dictionary.colorMix(path, tokenFn);
|
|
622
|
+
if (mix.invalid) {
|
|
623
|
+
throw new Error("Invalid color mix at " + path + ": " + mix.value);
|
|
624
|
+
}
|
|
625
|
+
return mix.value;
|
|
626
|
+
});
|
|
627
|
+
token.value = token.value.replace(`{${ref}}`, expanded);
|
|
613
628
|
});
|
|
614
629
|
return token.value;
|
|
615
630
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/token-dictionary",
|
|
3
|
-
"version": "0.34.
|
|
3
|
+
"version": "0.34.2",
|
|
4
4
|
"description": "Common error messages for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"ts-pattern": "5.0.8",
|
|
36
|
-
"@pandacss/logger": "^0.34.
|
|
37
|
-
"@pandacss/shared": "0.34.
|
|
38
|
-
"@pandacss/types": "0.34.
|
|
36
|
+
"@pandacss/logger": "^0.34.2",
|
|
37
|
+
"@pandacss/shared": "0.34.2",
|
|
38
|
+
"@pandacss/types": "0.34.2"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|