@pandacss/parser 1.11.0 → 1.11.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/index.js +10 -2
- package/dist/index.mjs +10 -2
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -653,7 +653,12 @@ function createParser(context) {
|
|
|
653
653
|
matchTag: (prop) => {
|
|
654
654
|
if (options?.matchTag) {
|
|
655
655
|
const isPandaComponent = file.isPandaComponent(prop.tagName);
|
|
656
|
-
|
|
656
|
+
const matchTagMode = options.matchTagMode ?? "extend";
|
|
657
|
+
const isCustomMatch = options.matchTag(prop.tagName, isPandaComponent);
|
|
658
|
+
if (matchTagMode === "override") {
|
|
659
|
+
return isCustomMatch;
|
|
660
|
+
}
|
|
661
|
+
return isPandaComponent || isCustomMatch;
|
|
657
662
|
}
|
|
658
663
|
return !!file.matchTag(prop.tagName);
|
|
659
664
|
},
|
|
@@ -955,10 +960,13 @@ var Project = class {
|
|
|
955
960
|
filePath,
|
|
956
961
|
content: original,
|
|
957
962
|
configure(opts) {
|
|
958
|
-
const { matchTag, matchTagProp } = opts;
|
|
963
|
+
const { matchTag, matchTagMode, matchTagProp } = opts;
|
|
959
964
|
if (matchTag) {
|
|
960
965
|
options.matchTag = matchTag;
|
|
961
966
|
}
|
|
967
|
+
if (matchTagMode) {
|
|
968
|
+
options.matchTagMode = matchTagMode;
|
|
969
|
+
}
|
|
962
970
|
if (matchTagProp) {
|
|
963
971
|
options.matchTagProp = matchTagProp;
|
|
964
972
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -630,7 +630,12 @@ function createParser(context) {
|
|
|
630
630
|
matchTag: (prop) => {
|
|
631
631
|
if (options?.matchTag) {
|
|
632
632
|
const isPandaComponent = file.isPandaComponent(prop.tagName);
|
|
633
|
-
|
|
633
|
+
const matchTagMode = options.matchTagMode ?? "extend";
|
|
634
|
+
const isCustomMatch = options.matchTag(prop.tagName, isPandaComponent);
|
|
635
|
+
if (matchTagMode === "override") {
|
|
636
|
+
return isCustomMatch;
|
|
637
|
+
}
|
|
638
|
+
return isPandaComponent || isCustomMatch;
|
|
634
639
|
}
|
|
635
640
|
return !!file.matchTag(prop.tagName);
|
|
636
641
|
},
|
|
@@ -932,10 +937,13 @@ var Project = class {
|
|
|
932
937
|
filePath,
|
|
933
938
|
content: original,
|
|
934
939
|
configure(opts) {
|
|
935
|
-
const { matchTag, matchTagProp } = opts;
|
|
940
|
+
const { matchTag, matchTagMode, matchTagProp } = opts;
|
|
936
941
|
if (matchTag) {
|
|
937
942
|
options.matchTag = matchTag;
|
|
938
943
|
}
|
|
944
|
+
if (matchTagMode) {
|
|
945
|
+
options.matchTagMode = matchTagMode;
|
|
946
|
+
}
|
|
939
947
|
if (matchTagProp) {
|
|
940
948
|
options.matchTagProp = matchTagProp;
|
|
941
949
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/parser",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "The static parser for panda css",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"ts-morph": "28.0.0",
|
|
33
33
|
"ts-pattern": "5.9.0",
|
|
34
|
-
"@pandacss/config": "^1.11.
|
|
35
|
-
"@pandacss/core": "^1.11.
|
|
36
|
-
"@pandacss/extractor": "1.11.
|
|
37
|
-
"@pandacss/logger": "1.11.
|
|
38
|
-
"@pandacss/shared": "1.11.
|
|
39
|
-
"@pandacss/types": "1.11.
|
|
34
|
+
"@pandacss/config": "^1.11.1",
|
|
35
|
+
"@pandacss/core": "^1.11.1",
|
|
36
|
+
"@pandacss/extractor": "1.11.1",
|
|
37
|
+
"@pandacss/logger": "1.11.1",
|
|
38
|
+
"@pandacss/shared": "1.11.1",
|
|
39
|
+
"@pandacss/types": "1.11.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@pandacss/generator": "1.11.
|
|
43
|
-
"@pandacss/plugin-svelte": "1.11.
|
|
44
|
-
"@pandacss/plugin-vue": "1.11.
|
|
42
|
+
"@pandacss/generator": "1.11.1",
|
|
43
|
+
"@pandacss/plugin-svelte": "1.11.1",
|
|
44
|
+
"@pandacss/plugin-vue": "1.11.1"
|
|
45
45
|
},
|
|
46
46
|
"files": [
|
|
47
47
|
"dist"
|