@pandacss/token-dictionary 0.0.0-dev-20240227110217 → 0.0.0-dev-20240227214335
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 +22 -13
- package/dist/index.mjs +22 -13
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -633,17 +633,23 @@ var addColorPalette = {
|
|
|
633
633
|
if (tokenPathClone.length === 0) {
|
|
634
634
|
return {};
|
|
635
635
|
}
|
|
636
|
-
const colorPaletteRoots = tokenPathClone.reduce(
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
636
|
+
const colorPaletteRoots = tokenPathClone.reduce(
|
|
637
|
+
(acc, _, i, arr) => {
|
|
638
|
+
const next = arr.slice(0, i + 1);
|
|
639
|
+
acc.push(next);
|
|
640
|
+
return acc;
|
|
641
|
+
},
|
|
642
|
+
[]
|
|
643
|
+
);
|
|
641
644
|
const colorPaletteRoot = tokenPathClone[0];
|
|
642
645
|
const colorPalette = dict.formatTokenName(tokenPathClone);
|
|
643
|
-
const colorPaletteTokenKeys = token.path.slice(token.path.indexOf(colorPaletteRoot) + 1).reduce(
|
|
644
|
-
acc
|
|
645
|
-
|
|
646
|
-
|
|
646
|
+
const colorPaletteTokenKeys = token.path.slice(token.path.indexOf(colorPaletteRoot) + 1).reduce(
|
|
647
|
+
(acc, _, i, arr) => {
|
|
648
|
+
acc.push(arr.slice(i));
|
|
649
|
+
return acc;
|
|
650
|
+
},
|
|
651
|
+
[]
|
|
652
|
+
);
|
|
647
653
|
if (colorPaletteTokenKeys.length === 0) {
|
|
648
654
|
colorPaletteTokenKeys.push([""]);
|
|
649
655
|
}
|
|
@@ -858,10 +864,13 @@ var TokenDictionary = class {
|
|
|
858
864
|
return;
|
|
859
865
|
const references = this.getReferences(token.value);
|
|
860
866
|
token.setExtensions({
|
|
861
|
-
references: references.reduce(
|
|
862
|
-
object
|
|
863
|
-
|
|
864
|
-
|
|
867
|
+
references: references.reduce(
|
|
868
|
+
(object, reference) => {
|
|
869
|
+
object[reference.name] = reference;
|
|
870
|
+
return object;
|
|
871
|
+
},
|
|
872
|
+
{}
|
|
873
|
+
)
|
|
865
874
|
});
|
|
866
875
|
});
|
|
867
876
|
return this;
|
package/dist/index.mjs
CHANGED
|
@@ -613,17 +613,23 @@ var addColorPalette = {
|
|
|
613
613
|
if (tokenPathClone.length === 0) {
|
|
614
614
|
return {};
|
|
615
615
|
}
|
|
616
|
-
const colorPaletteRoots = tokenPathClone.reduce(
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
616
|
+
const colorPaletteRoots = tokenPathClone.reduce(
|
|
617
|
+
(acc, _, i, arr) => {
|
|
618
|
+
const next = arr.slice(0, i + 1);
|
|
619
|
+
acc.push(next);
|
|
620
|
+
return acc;
|
|
621
|
+
},
|
|
622
|
+
[]
|
|
623
|
+
);
|
|
621
624
|
const colorPaletteRoot = tokenPathClone[0];
|
|
622
625
|
const colorPalette = dict.formatTokenName(tokenPathClone);
|
|
623
|
-
const colorPaletteTokenKeys = token.path.slice(token.path.indexOf(colorPaletteRoot) + 1).reduce(
|
|
624
|
-
acc
|
|
625
|
-
|
|
626
|
-
|
|
626
|
+
const colorPaletteTokenKeys = token.path.slice(token.path.indexOf(colorPaletteRoot) + 1).reduce(
|
|
627
|
+
(acc, _, i, arr) => {
|
|
628
|
+
acc.push(arr.slice(i));
|
|
629
|
+
return acc;
|
|
630
|
+
},
|
|
631
|
+
[]
|
|
632
|
+
);
|
|
627
633
|
if (colorPaletteTokenKeys.length === 0) {
|
|
628
634
|
colorPaletteTokenKeys.push([""]);
|
|
629
635
|
}
|
|
@@ -838,10 +844,13 @@ var TokenDictionary = class {
|
|
|
838
844
|
return;
|
|
839
845
|
const references = this.getReferences(token.value);
|
|
840
846
|
token.setExtensions({
|
|
841
|
-
references: references.reduce(
|
|
842
|
-
object
|
|
843
|
-
|
|
844
|
-
|
|
847
|
+
references: references.reduce(
|
|
848
|
+
(object, reference) => {
|
|
849
|
+
object[reference.name] = reference;
|
|
850
|
+
return object;
|
|
851
|
+
},
|
|
852
|
+
{}
|
|
853
|
+
)
|
|
845
854
|
});
|
|
846
855
|
});
|
|
847
856
|
return this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/token-dictionary",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20240227214335",
|
|
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.0.0-dev-
|
|
37
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
38
|
-
"@pandacss/types": "0.0.0-dev-
|
|
36
|
+
"@pandacss/logger": "^0.0.0-dev-20240227214335",
|
|
37
|
+
"@pandacss/shared": "0.0.0-dev-20240227214335",
|
|
38
|
+
"@pandacss/types": "0.0.0-dev-20240227214335"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "tsup src/index.ts --format=esm,cjs --dts",
|