@pandacss/parser 0.0.0-dev-20221130173625 → 0.0.0-dev-20221130183053
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 +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -62,7 +62,9 @@ function isPrimitiveLiteral(node) {
|
|
|
62
62
|
return import_ts_morph.Node.isStringLiteral(node) || import_ts_morph.Node.isNumericLiteral(node) || import_ts_morph.Node.isTrueLiteral(node) || import_ts_morph.Node.isFalseLiteral(node);
|
|
63
63
|
}
|
|
64
64
|
function extractValue(value) {
|
|
65
|
-
return (0, import_ts_pattern.match)(value).when(
|
|
65
|
+
return (0, import_ts_pattern.match)(value).when(import_ts_morph.Node.isStringLiteral, (value2) => {
|
|
66
|
+
return value2.getLiteralValue().replaceAll(/[\n\s]+/g, " ");
|
|
67
|
+
}).when(isPrimitiveLiteral, (value2) => {
|
|
66
68
|
return value2.getLiteralValue();
|
|
67
69
|
}).when(import_ts_morph.Node.isNullLiteral, () => {
|
|
68
70
|
return null;
|
|
@@ -223,7 +225,7 @@ function visitJsxElement(file, options) {
|
|
|
223
225
|
continue;
|
|
224
226
|
}
|
|
225
227
|
(0, import_ts_pattern2.match)(value).when(import_ts_morph3.Node.isStringLiteral, (value2) => {
|
|
226
|
-
data[name] = value2.getLiteralValue();
|
|
228
|
+
data[name] = value2.getLiteralValue().replaceAll(/[\n\s]+/g, " ");
|
|
227
229
|
}).when(import_ts_morph3.Node.isJsxExpression, (value2) => {
|
|
228
230
|
const expr = value2.getExpression();
|
|
229
231
|
const returnValue = extractValue(expr);
|
package/dist/index.mjs
CHANGED
|
@@ -37,7 +37,9 @@ function isPrimitiveLiteral(node) {
|
|
|
37
37
|
return Node.isStringLiteral(node) || Node.isNumericLiteral(node) || Node.isTrueLiteral(node) || Node.isFalseLiteral(node);
|
|
38
38
|
}
|
|
39
39
|
function extractValue(value) {
|
|
40
|
-
return match(value).when(
|
|
40
|
+
return match(value).when(Node.isStringLiteral, (value2) => {
|
|
41
|
+
return value2.getLiteralValue().replaceAll(/[\n\s]+/g, " ");
|
|
42
|
+
}).when(isPrimitiveLiteral, (value2) => {
|
|
41
43
|
return value2.getLiteralValue();
|
|
42
44
|
}).when(Node.isNullLiteral, () => {
|
|
43
45
|
return null;
|
|
@@ -198,7 +200,7 @@ function visitJsxElement(file, options) {
|
|
|
198
200
|
continue;
|
|
199
201
|
}
|
|
200
202
|
match2(value).when(Node3.isStringLiteral, (value2) => {
|
|
201
|
-
data[name] = value2.getLiteralValue();
|
|
203
|
+
data[name] = value2.getLiteralValue().replaceAll(/[\n\s]+/g, " ");
|
|
202
204
|
}).when(Node3.isJsxExpression, (value2) => {
|
|
203
205
|
const expr = value2.getExpression();
|
|
204
206
|
const returnValue = extractValue(expr);
|
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-20221130183053",
|
|
4
4
|
"description": "The static parser for panda css",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"ts-pattern": "4.0.6",
|
|
15
15
|
"ts-morph": "17.0.1",
|
|
16
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
17
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
18
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
19
|
-
"@pandacss/types": "0.0.0-dev-
|
|
16
|
+
"@pandacss/logger": "0.0.0-dev-20221130183053",
|
|
17
|
+
"@pandacss/shared": "0.0.0-dev-20221130183053",
|
|
18
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20221130183053",
|
|
19
|
+
"@pandacss/types": "0.0.0-dev-20221130183053"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
22
|
+
"@pandacss/fixture": "0.0.0-dev-20221130183053"
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist"
|