@pandacss/parser 0.34.1 → 0.34.3

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
@@ -68,7 +68,7 @@ function getImportDeclarations(context, sourceFile) {
68
68
  node.getNamedImports().forEach((specifier) => {
69
69
  const name = specifier.getNameNode().getText();
70
70
  const alias = specifier.getAliasNode()?.getText() || name;
71
- const result = { name, alias, mod };
71
+ const result = { name, alias, mod, kind: "named" };
72
72
  const found = imports.match(result, (mod2) => {
73
73
  if (!tsOptions?.pathMappings)
74
74
  return;
@@ -78,6 +78,19 @@ function getImportDeclarations(context, sourceFile) {
78
78
  return;
79
79
  importDeclarations.push(result);
80
80
  });
81
+ const namespace = node.getNamespaceImport();
82
+ if (namespace) {
83
+ const name = namespace.getText();
84
+ const result = { name, alias: name, mod, kind: "namespace" };
85
+ const found = imports.match(result, (mod2) => {
86
+ if (!tsOptions?.pathMappings)
87
+ return;
88
+ return (0, import_ts_path.resolveTsPathPattern)(tsOptions.pathMappings, mod2);
89
+ });
90
+ if (!found)
91
+ return;
92
+ importDeclarations.push(result);
93
+ }
81
94
  });
82
95
  return importDeclarations;
83
96
  }
package/dist/index.mjs CHANGED
@@ -34,7 +34,7 @@ function getImportDeclarations(context, sourceFile) {
34
34
  node.getNamedImports().forEach((specifier) => {
35
35
  const name = specifier.getNameNode().getText();
36
36
  const alias = specifier.getAliasNode()?.getText() || name;
37
- const result = { name, alias, mod };
37
+ const result = { name, alias, mod, kind: "named" };
38
38
  const found = imports.match(result, (mod2) => {
39
39
  if (!tsOptions?.pathMappings)
40
40
  return;
@@ -44,6 +44,19 @@ function getImportDeclarations(context, sourceFile) {
44
44
  return;
45
45
  importDeclarations.push(result);
46
46
  });
47
+ const namespace = node.getNamespaceImport();
48
+ if (namespace) {
49
+ const name = namespace.getText();
50
+ const result = { name, alias: name, mod, kind: "namespace" };
51
+ const found = imports.match(result, (mod2) => {
52
+ if (!tsOptions?.pathMappings)
53
+ return;
54
+ return resolveTsPathPattern(tsOptions.pathMappings, mod2);
55
+ });
56
+ if (!found)
57
+ return;
58
+ importDeclarations.push(result);
59
+ }
47
60
  });
48
61
  return importDeclarations;
49
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/parser",
3
- "version": "0.34.1",
3
+ "version": "0.34.3",
4
4
  "description": "The static parser for panda css",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -32,16 +32,16 @@
32
32
  "magic-string": "0.30.7",
33
33
  "ts-morph": "21.0.1",
34
34
  "ts-pattern": "5.0.8",
35
- "@pandacss/config": "^0.34.1",
36
- "@pandacss/core": "^0.34.1",
37
- "@pandacss/extractor": "0.34.1",
38
- "@pandacss/logger": "0.34.1",
39
- "@pandacss/shared": "0.34.1",
40
- "@pandacss/types": "0.34.1"
35
+ "@pandacss/config": "^0.34.3",
36
+ "@pandacss/core": "^0.34.3",
37
+ "@pandacss/extractor": "0.34.3",
38
+ "@pandacss/logger": "0.34.3",
39
+ "@pandacss/shared": "0.34.3",
40
+ "@pandacss/types": "0.34.3"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@vue/compiler-core": "3.4.19",
44
- "@pandacss/generator": "0.34.1"
44
+ "@pandacss/generator": "0.34.3"
45
45
  },
46
46
  "files": [
47
47
  "dist"