@pandacss/parser 0.0.0-dev-20230415084325 → 0.0.0-dev-20230415104220
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 +17 -8
- package/dist/index.mjs +17 -8
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -291,15 +291,24 @@ function createParser(options) {
|
|
|
291
291
|
result.queryList.forEach((query) => {
|
|
292
292
|
const data = combineResult((0, import_extractor.unbox)(query.box));
|
|
293
293
|
import_logger.logger.debug(`ast:jsx:${name}`, { filePath, result: data });
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
294
|
+
(0, import_ts_pattern.match)(name).when(
|
|
295
|
+
(name2) => jsx && name2.startsWith(jsxFactoryAlias),
|
|
296
|
+
(name2) => {
|
|
297
|
+
collector.jsx.add({ name: name2, box: query.box, type: "jsx-factory", data });
|
|
298
|
+
}
|
|
299
|
+
).when(
|
|
300
|
+
(name2) => jsxPatternNodes.test(name2),
|
|
301
|
+
(name2) => {
|
|
302
|
+
collector.setPattern(name2, { type: "jsx-pattern", name: name2, box: query.box, data });
|
|
303
|
+
}
|
|
304
|
+
).when(
|
|
305
|
+
(name2) => recipeJsxLists.string.has(name2) || recipeJsxLists.regex.some((regex) => regex.test(name2)),
|
|
306
|
+
(name2) => {
|
|
307
|
+
collector.setRecipe(getRecipeName(name2), { type: "jsx-recipe", name: name2, box: query.box, data });
|
|
308
|
+
}
|
|
309
|
+
).otherwise(() => {
|
|
301
310
|
collector.jsx.add({ name, box: query.box, type: "jsx", data });
|
|
302
|
-
}
|
|
311
|
+
});
|
|
303
312
|
});
|
|
304
313
|
}
|
|
305
314
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -265,15 +265,24 @@ function createParser(options) {
|
|
|
265
265
|
result.queryList.forEach((query) => {
|
|
266
266
|
const data = combineResult(unbox(query.box));
|
|
267
267
|
logger.debug(`ast:jsx:${name}`, { filePath, result: data });
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
268
|
+
match(name).when(
|
|
269
|
+
(name2) => jsx && name2.startsWith(jsxFactoryAlias),
|
|
270
|
+
(name2) => {
|
|
271
|
+
collector.jsx.add({ name: name2, box: query.box, type: "jsx-factory", data });
|
|
272
|
+
}
|
|
273
|
+
).when(
|
|
274
|
+
(name2) => jsxPatternNodes.test(name2),
|
|
275
|
+
(name2) => {
|
|
276
|
+
collector.setPattern(name2, { type: "jsx-pattern", name: name2, box: query.box, data });
|
|
277
|
+
}
|
|
278
|
+
).when(
|
|
279
|
+
(name2) => recipeJsxLists.string.has(name2) || recipeJsxLists.regex.some((regex) => regex.test(name2)),
|
|
280
|
+
(name2) => {
|
|
281
|
+
collector.setRecipe(getRecipeName(name2), { type: "jsx-recipe", name: name2, box: query.box, data });
|
|
282
|
+
}
|
|
283
|
+
).otherwise(() => {
|
|
275
284
|
collector.jsx.add({ name, box: query.box, type: "jsx", data });
|
|
276
|
-
}
|
|
285
|
+
});
|
|
277
286
|
});
|
|
278
287
|
}
|
|
279
288
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/parser",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230415104220",
|
|
4
4
|
"description": "The static parser for panda css",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
"lil-fp": "1.4.5",
|
|
15
15
|
"ts-morph": "18.0.0",
|
|
16
16
|
"ts-pattern": "4.2.2",
|
|
17
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
18
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
19
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
20
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
21
|
-
"@pandacss/types": "0.0.0-dev-
|
|
17
|
+
"@pandacss/extractor": "0.0.0-dev-20230415104220",
|
|
18
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230415104220",
|
|
19
|
+
"@pandacss/logger": "0.0.0-dev-20230415104220",
|
|
20
|
+
"@pandacss/shared": "0.0.0-dev-20230415104220",
|
|
21
|
+
"@pandacss/types": "0.0.0-dev-20230415104220"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
25
|
-
"@pandacss/generator": "0.0.0-dev-
|
|
24
|
+
"@pandacss/fixture": "0.0.0-dev-20230415104220",
|
|
25
|
+
"@pandacss/generator": "0.0.0-dev-20230415104220"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|