@pandacss/config 0.32.0 → 0.33.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-5YOGLJPA.mjs → chunk-XG53JPBE.mjs} +8 -1
- package/dist/diff-config.js +8 -1
- package/dist/diff-config.mjs +1 -1
- package/dist/index.js +29 -13
- package/dist/index.mjs +12 -3
- package/package.json +6 -6
|
@@ -37,6 +37,7 @@ var all = [
|
|
|
37
37
|
"emitPackage",
|
|
38
38
|
"emitTokensOnly",
|
|
39
39
|
"presets",
|
|
40
|
+
"plugins",
|
|
40
41
|
"hooks"
|
|
41
42
|
];
|
|
42
43
|
var format = [
|
|
@@ -79,7 +80,13 @@ var artifactConfigDeps = {
|
|
|
79
80
|
"jsx-patterns": jsx.concat("patterns"),
|
|
80
81
|
"jsx-patterns-index": jsx.concat("patterns"),
|
|
81
82
|
"css-index": ["syntax"],
|
|
82
|
-
"package.json": ["emitPackage", "forceConsistentTypeExtension", "outExtension"]
|
|
83
|
+
"package.json": ["emitPackage", "forceConsistentTypeExtension", "outExtension"],
|
|
84
|
+
"types-styles": ["shorthands"],
|
|
85
|
+
"types-conditions": ["conditions"],
|
|
86
|
+
"types-jsx": jsx,
|
|
87
|
+
"types-entry": [],
|
|
88
|
+
"types-gen": [],
|
|
89
|
+
"types-gen-system": []
|
|
83
90
|
};
|
|
84
91
|
var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) => {
|
|
85
92
|
if (!paths.length)
|
package/dist/diff-config.js
CHANGED
|
@@ -71,6 +71,7 @@ var all = [
|
|
|
71
71
|
"emitPackage",
|
|
72
72
|
"emitTokensOnly",
|
|
73
73
|
"presets",
|
|
74
|
+
"plugins",
|
|
74
75
|
"hooks"
|
|
75
76
|
];
|
|
76
77
|
var format = [
|
|
@@ -113,7 +114,13 @@ var artifactConfigDeps = {
|
|
|
113
114
|
"jsx-patterns": jsx.concat("patterns"),
|
|
114
115
|
"jsx-patterns-index": jsx.concat("patterns"),
|
|
115
116
|
"css-index": ["syntax"],
|
|
116
|
-
"package.json": ["emitPackage", "forceConsistentTypeExtension", "outExtension"]
|
|
117
|
+
"package.json": ["emitPackage", "forceConsistentTypeExtension", "outExtension"],
|
|
118
|
+
"types-styles": ["shorthands"],
|
|
119
|
+
"types-conditions": ["conditions"],
|
|
120
|
+
"types-jsx": jsx,
|
|
121
|
+
"types-entry": [],
|
|
122
|
+
"types-gen": [],
|
|
123
|
+
"types-gen-system": []
|
|
117
124
|
};
|
|
118
125
|
var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) => {
|
|
119
126
|
if (!paths.length)
|
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 = [
|
|
@@ -183,7 +184,13 @@ var artifactConfigDeps = {
|
|
|
183
184
|
"jsx-patterns": jsx.concat("patterns"),
|
|
184
185
|
"jsx-patterns-index": jsx.concat("patterns"),
|
|
185
186
|
"css-index": ["syntax"],
|
|
186
|
-
"package.json": ["emitPackage", "forceConsistentTypeExtension", "outExtension"]
|
|
187
|
+
"package.json": ["emitPackage", "forceConsistentTypeExtension", "outExtension"],
|
|
188
|
+
"types-styles": ["shorthands"],
|
|
189
|
+
"types-conditions": ["conditions"],
|
|
190
|
+
"types-jsx": jsx,
|
|
191
|
+
"types-entry": [],
|
|
192
|
+
"types-gen": [],
|
|
193
|
+
"types-gen-system": []
|
|
187
194
|
};
|
|
188
195
|
var artifactMatchers = Object.entries(artifactConfigDeps).map(([key, paths]) => {
|
|
189
196
|
if (!paths.length)
|
|
@@ -571,7 +578,7 @@ async function getResolvedConfig(config, cwd) {
|
|
|
571
578
|
|
|
572
579
|
// src/resolve-config.ts
|
|
573
580
|
var import_logger4 = require("@pandacss/logger");
|
|
574
|
-
var
|
|
581
|
+
var import_shared9 = require("@pandacss/shared");
|
|
575
582
|
|
|
576
583
|
// src/bundled-preset.ts
|
|
577
584
|
var import_preset_base = require("@pandacss/preset-base");
|
|
@@ -589,7 +596,7 @@ var getBundledPreset = (preset) => {
|
|
|
589
596
|
|
|
590
597
|
// src/validate-config.ts
|
|
591
598
|
var import_logger3 = require("@pandacss/logger");
|
|
592
|
-
var
|
|
599
|
+
var import_shared8 = require("@pandacss/shared");
|
|
593
600
|
|
|
594
601
|
// src/validation/validate-artifact.ts
|
|
595
602
|
var validateArtifactNames = (names, addError) => {
|
|
@@ -625,13 +632,22 @@ var validateBreakpoints = (breakpoints, addError) => {
|
|
|
625
632
|
};
|
|
626
633
|
|
|
627
634
|
// src/validation/validate-condition.ts
|
|
635
|
+
var import_shared6 = require("@pandacss/shared");
|
|
628
636
|
var validateConditions = (conditions, addError) => {
|
|
629
637
|
if (!conditions)
|
|
630
638
|
return;
|
|
631
639
|
Object.values(conditions).forEach((condition) => {
|
|
632
|
-
if (
|
|
633
|
-
|
|
640
|
+
if ((0, import_shared6.isString)(condition)) {
|
|
641
|
+
if (!condition.startsWith("@") && !condition.includes("&")) {
|
|
642
|
+
addError("conditions", `Selectors should contain the \`&\` character: \`${condition}\``);
|
|
643
|
+
}
|
|
644
|
+
return;
|
|
634
645
|
}
|
|
646
|
+
condition.forEach((c) => {
|
|
647
|
+
if (!c.startsWith("@") && !c.includes("&")) {
|
|
648
|
+
addError("conditions", `Selectors should contain the \`&\` character: \`${c}\``);
|
|
649
|
+
}
|
|
650
|
+
});
|
|
635
651
|
});
|
|
636
652
|
};
|
|
637
653
|
|
|
@@ -666,7 +682,7 @@ var validateRecipes = (options) => {
|
|
|
666
682
|
};
|
|
667
683
|
|
|
668
684
|
// src/validation/validate-tokens.ts
|
|
669
|
-
var
|
|
685
|
+
var import_shared7 = require("@pandacss/shared");
|
|
670
686
|
|
|
671
687
|
// src/validation/utils.ts
|
|
672
688
|
var isValidToken = (token) => Object.hasOwnProperty.call(token, "value");
|
|
@@ -719,7 +735,7 @@ var validateTokens = (options) => {
|
|
|
719
735
|
const { tokenNames, semanticTokenNames, valueAtPath, refsByPath } = tokens2;
|
|
720
736
|
if (theme.tokens) {
|
|
721
737
|
const tokenPaths = /* @__PURE__ */ new Set();
|
|
722
|
-
(0,
|
|
738
|
+
(0, import_shared7.walkObject)(
|
|
723
739
|
theme.tokens,
|
|
724
740
|
(value, paths) => {
|
|
725
741
|
const path2 = paths.join(SEP);
|
|
@@ -745,7 +761,7 @@ var validateTokens = (options) => {
|
|
|
745
761
|
}
|
|
746
762
|
if (theme.semanticTokens) {
|
|
747
763
|
const tokenPaths = /* @__PURE__ */ new Set();
|
|
748
|
-
(0,
|
|
764
|
+
(0, import_shared7.walkObject)(
|
|
749
765
|
theme.semanticTokens,
|
|
750
766
|
(value, paths) => {
|
|
751
767
|
const path2 = paths.join(SEP);
|
|
@@ -754,7 +770,7 @@ var validateTokens = (options) => {
|
|
|
754
770
|
tokenPaths.add(path2);
|
|
755
771
|
if (!isValidToken(value))
|
|
756
772
|
return;
|
|
757
|
-
(0,
|
|
773
|
+
(0, import_shared7.walkObject)(value, (itemValue) => {
|
|
758
774
|
if (isTokenReference(itemValue)) {
|
|
759
775
|
const formattedPath = formatPath(path2);
|
|
760
776
|
if (!refsByPath.has(formattedPath)) {
|
|
@@ -775,7 +791,7 @@ var validateTokens = (options) => {
|
|
|
775
791
|
tokenPaths.forEach((path2) => {
|
|
776
792
|
const formattedPath = formatPath(path2);
|
|
777
793
|
const value = valueAtPath.get(path2);
|
|
778
|
-
if (!(0,
|
|
794
|
+
if (!(0, import_shared7.isObject)(value) && !path2.includes("value")) {
|
|
779
795
|
addError("tokens", `Token must contain 'value': \`theme.semanticTokens.${formattedPath}\``);
|
|
780
796
|
}
|
|
781
797
|
});
|
|
@@ -815,7 +831,7 @@ var validateConfig = (config) => {
|
|
|
815
831
|
${Array.from(warnings).map((err) => "- " + err).join("\n")}
|
|
816
832
|
`;
|
|
817
833
|
if (config.validation === "error") {
|
|
818
|
-
throw new
|
|
834
|
+
throw new import_shared8.PandaError("CONFIG_ERROR", errors);
|
|
819
835
|
}
|
|
820
836
|
import_logger3.logger.warn("config", errors);
|
|
821
837
|
return warnings;
|
|
@@ -857,8 +873,8 @@ async function resolveConfig(result, cwd) {
|
|
|
857
873
|
loadConfigResult.config = result2;
|
|
858
874
|
}
|
|
859
875
|
}
|
|
860
|
-
const serialized = (0,
|
|
861
|
-
const deserialize = () => (0,
|
|
876
|
+
const serialized = (0, import_shared9.stringifyJson)(loadConfigResult.config);
|
|
877
|
+
const deserialize = () => (0, import_shared9.parseJson)(serialized);
|
|
862
878
|
return { ...loadConfigResult, serialized, deserialize, hooks };
|
|
863
879
|
}
|
|
864
880
|
|
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";
|
|
@@ -269,13 +269,22 @@ var validateBreakpoints = (breakpoints, addError) => {
|
|
|
269
269
|
};
|
|
270
270
|
|
|
271
271
|
// src/validation/validate-condition.ts
|
|
272
|
+
import { isString } from "@pandacss/shared";
|
|
272
273
|
var validateConditions = (conditions, addError) => {
|
|
273
274
|
if (!conditions)
|
|
274
275
|
return;
|
|
275
276
|
Object.values(conditions).forEach((condition) => {
|
|
276
|
-
if (
|
|
277
|
-
|
|
277
|
+
if (isString(condition)) {
|
|
278
|
+
if (!condition.startsWith("@") && !condition.includes("&")) {
|
|
279
|
+
addError("conditions", `Selectors should contain the \`&\` character: \`${condition}\``);
|
|
280
|
+
}
|
|
281
|
+
return;
|
|
278
282
|
}
|
|
283
|
+
condition.forEach((c) => {
|
|
284
|
+
if (!c.startsWith("@") && !c.includes("&")) {
|
|
285
|
+
addError("conditions", `Selectors should contain the \`&\` character: \`${c}\``);
|
|
286
|
+
}
|
|
287
|
+
});
|
|
279
288
|
});
|
|
280
289
|
};
|
|
281
290
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.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.33.0",
|
|
68
|
+
"@pandacss/preset-base": "0.33.0",
|
|
69
|
+
"@pandacss/preset-panda": "0.33.0",
|
|
70
|
+
"@pandacss/shared": "0.33.0",
|
|
71
|
+
"@pandacss/types": "0.33.0"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"pkg-types": "1.0.3"
|