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