@pandacss/parser 0.0.0-dev-20221128124624 → 0.0.0-dev-20221128130912

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 CHANGED
@@ -208,17 +208,20 @@ function visitJsxElement(file, options) {
208
208
  ];
209
209
  for (const node of elements) {
210
210
  const tag = node.getTagNameNode().getText();
211
- if (!matchProp.tag(tag))
211
+ if (!tag || !matchProp.tag(tag)) {
212
212
  continue;
213
+ }
213
214
  const props = node.getAttributes();
214
215
  const data = {};
215
216
  for (const prop of props) {
216
- if (!import_ts_morph3.Node.isJsxAttribute(prop))
217
+ if (!import_ts_morph3.Node.isJsxAttribute(prop)) {
217
218
  continue;
219
+ }
218
220
  const name = prop.getName();
219
221
  const value = prop.getInitializer();
220
- if (!matchProp.prop({ tag, name }))
222
+ if (!tag || !matchProp.prop({ tag, name })) {
221
223
  continue;
224
+ }
222
225
  (0, import_ts_pattern2.match)(value).when(import_ts_morph3.Node.isStringLiteral, (value2) => {
223
226
  data[name] = value2.getLiteralValue();
224
227
  }).when(import_ts_morph3.Node.isJsxExpression, (value2) => {
package/dist/index.mjs CHANGED
@@ -183,17 +183,20 @@ function visitJsxElement(file, options) {
183
183
  ];
184
184
  for (const node of elements) {
185
185
  const tag = node.getTagNameNode().getText();
186
- if (!matchProp.tag(tag))
186
+ if (!tag || !matchProp.tag(tag)) {
187
187
  continue;
188
+ }
188
189
  const props = node.getAttributes();
189
190
  const data = {};
190
191
  for (const prop of props) {
191
- if (!Node3.isJsxAttribute(prop))
192
+ if (!Node3.isJsxAttribute(prop)) {
192
193
  continue;
194
+ }
193
195
  const name = prop.getName();
194
196
  const value = prop.getInitializer();
195
- if (!matchProp.prop({ tag, name }))
197
+ if (!tag || !matchProp.prop({ tag, name })) {
196
198
  continue;
199
+ }
197
200
  match2(value).when(Node3.isStringLiteral, (value2) => {
198
201
  data[name] = value2.getLiteralValue();
199
202
  }).when(Node3.isJsxExpression, (value2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/parser",
3
- "version": "0.0.0-dev-20221128124624",
3
+ "version": "0.0.0-dev-20221128130912",
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-20221128124624",
17
- "@pandacss/shared": "0.0.0-dev-20221128124624",
18
- "@pandacss/is-valid-prop": "0.0.0-dev-20221128124624",
19
- "@pandacss/types": "0.0.0-dev-20221128124624"
16
+ "@pandacss/logger": "0.0.0-dev-20221128130912",
17
+ "@pandacss/shared": "0.0.0-dev-20221128130912",
18
+ "@pandacss/is-valid-prop": "0.0.0-dev-20221128130912",
19
+ "@pandacss/types": "0.0.0-dev-20221128130912"
20
20
  },
21
21
  "devDependencies": {
22
- "@pandacss/fixture": "0.0.0-dev-20221128124624"
22
+ "@pandacss/fixture": "0.0.0-dev-20221128130912"
23
23
  },
24
24
  "files": [
25
25
  "dist"