@pandacss/parser 0.13.1 → 0.15.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/index.js +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -265,7 +265,7 @@ function createParser(options) {
|
|
|
265
265
|
pattern.jsx?.forEach((jsx2) => {
|
|
266
266
|
if (typeof jsx2 === "string") {
|
|
267
267
|
acc.string.add(jsx2);
|
|
268
|
-
} else {
|
|
268
|
+
} else if (jsx2) {
|
|
269
269
|
acc.regex.push(jsx2);
|
|
270
270
|
}
|
|
271
271
|
});
|
|
@@ -473,14 +473,14 @@ function createParser(options) {
|
|
|
473
473
|
} else if (result.kind === "component") {
|
|
474
474
|
result.queryList.forEach((query) => {
|
|
475
475
|
const data = combineResult((0, import_extractor.unbox)(query.box));
|
|
476
|
-
(0, import_ts_pattern.match)(name).when(isFactory, (
|
|
477
|
-
collector.setJsx({ name:
|
|
478
|
-
}).when(isJsxTagPattern, (
|
|
479
|
-
collector.setPattern(
|
|
480
|
-
}).when(isJsxTagRecipe, (
|
|
481
|
-
const recipeList = getRecipesByJsxName(
|
|
476
|
+
(0, import_ts_pattern.match)(name).when(isFactory, (jsxName) => {
|
|
477
|
+
collector.setJsx({ name: jsxName, box: query.box, type: "jsx-factory", data });
|
|
478
|
+
}).when(isJsxTagPattern, (jsxName) => {
|
|
479
|
+
collector.setPattern(jsxName, { type: "jsx-pattern", name: jsxName, box: query.box, data });
|
|
480
|
+
}).when(isJsxTagRecipe, (jsxName) => {
|
|
481
|
+
const recipeList = getRecipesByJsxName(jsxName);
|
|
482
482
|
recipeList.map((recipe) => {
|
|
483
|
-
collector.setRecipe(recipe.baseName, { type: "jsx-recipe", name:
|
|
483
|
+
collector.setRecipe(recipe.baseName, { type: "jsx-recipe", name: jsxName, box: query.box, data });
|
|
484
484
|
});
|
|
485
485
|
}).otherwise(() => {
|
|
486
486
|
collector.setJsx({ name, box: query.box, type: "jsx", data });
|
package/dist/index.mjs
CHANGED
|
@@ -227,7 +227,7 @@ function createParser(options) {
|
|
|
227
227
|
pattern.jsx?.forEach((jsx2) => {
|
|
228
228
|
if (typeof jsx2 === "string") {
|
|
229
229
|
acc.string.add(jsx2);
|
|
230
|
-
} else {
|
|
230
|
+
} else if (jsx2) {
|
|
231
231
|
acc.regex.push(jsx2);
|
|
232
232
|
}
|
|
233
233
|
});
|
|
@@ -435,14 +435,14 @@ function createParser(options) {
|
|
|
435
435
|
} else if (result.kind === "component") {
|
|
436
436
|
result.queryList.forEach((query) => {
|
|
437
437
|
const data = combineResult(unbox(query.box));
|
|
438
|
-
match(name).when(isFactory, (
|
|
439
|
-
collector.setJsx({ name:
|
|
440
|
-
}).when(isJsxTagPattern, (
|
|
441
|
-
collector.setPattern(
|
|
442
|
-
}).when(isJsxTagRecipe, (
|
|
443
|
-
const recipeList = getRecipesByJsxName(
|
|
438
|
+
match(name).when(isFactory, (jsxName) => {
|
|
439
|
+
collector.setJsx({ name: jsxName, box: query.box, type: "jsx-factory", data });
|
|
440
|
+
}).when(isJsxTagPattern, (jsxName) => {
|
|
441
|
+
collector.setPattern(jsxName, { type: "jsx-pattern", name: jsxName, box: query.box, data });
|
|
442
|
+
}).when(isJsxTagRecipe, (jsxName) => {
|
|
443
|
+
const recipeList = getRecipesByJsxName(jsxName);
|
|
444
444
|
recipeList.map((recipe) => {
|
|
445
|
-
collector.setRecipe(recipe.baseName, { type: "jsx-recipe", name:
|
|
445
|
+
collector.setRecipe(recipe.baseName, { type: "jsx-recipe", name: jsxName, box: query.box, data });
|
|
446
446
|
});
|
|
447
447
|
}).otherwise(() => {
|
|
448
448
|
collector.setJsx({ name, box: query.box, type: "jsx", data });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/parser",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "The static parser for panda css",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
"magic-string": "^0.30.2",
|
|
17
17
|
"ts-morph": "19.0.0",
|
|
18
18
|
"ts-pattern": "5.0.4",
|
|
19
|
-
"@pandacss/config": "^0.
|
|
20
|
-
"@pandacss/extractor": "0.
|
|
21
|
-
"@pandacss/is-valid-prop": "0.
|
|
22
|
-
"@pandacss/logger": "0.
|
|
23
|
-
"@pandacss/shared": "0.
|
|
24
|
-
"@pandacss/types": "0.
|
|
19
|
+
"@pandacss/config": "^0.15.0",
|
|
20
|
+
"@pandacss/extractor": "0.15.0",
|
|
21
|
+
"@pandacss/is-valid-prop": "0.15.0",
|
|
22
|
+
"@pandacss/logger": "0.15.0",
|
|
23
|
+
"@pandacss/shared": "0.15.0",
|
|
24
|
+
"@pandacss/types": "0.15.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"hookable": "5.5.3",
|
|
28
|
-
"@pandacss/fixture": "0.
|
|
29
|
-
"@pandacss/generator": "0.
|
|
28
|
+
"@pandacss/fixture": "0.15.0",
|
|
29
|
+
"@pandacss/generator": "0.15.0"
|
|
30
30
|
},
|
|
31
31
|
"files": [
|
|
32
32
|
"dist"
|