@pandacss/parser 0.0.0-dev-20230417175154 → 0.0.0-dev-20230417181739
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 +16 -5
- package/dist/index.mjs +16 -5
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -79,27 +79,36 @@ function getImportDeclarations(file, options) {
|
|
|
79
79
|
|
|
80
80
|
// src/parser-result.ts
|
|
81
81
|
var createParserResult = () => ({
|
|
82
|
+
all: /* @__PURE__ */ new Set(),
|
|
82
83
|
jsx: /* @__PURE__ */ new Set(),
|
|
83
84
|
css: /* @__PURE__ */ new Set(),
|
|
84
85
|
cva: /* @__PURE__ */ new Set(),
|
|
85
86
|
recipe: /* @__PURE__ */ new Map(),
|
|
86
87
|
pattern: /* @__PURE__ */ new Map(),
|
|
87
88
|
set(name, result) {
|
|
88
|
-
|
|
89
|
+
const obj = { type: "object", ...result };
|
|
90
|
+
this[name].add(obj);
|
|
91
|
+
this.all.add(obj);
|
|
89
92
|
},
|
|
90
93
|
setCva(result) {
|
|
91
|
-
|
|
94
|
+
const cva = { type: "cva", ...result };
|
|
95
|
+
this.cva.add(cva);
|
|
96
|
+
this.all.add(cva);
|
|
92
97
|
},
|
|
93
98
|
setPattern(name, result) {
|
|
94
99
|
this.pattern.get(name) ?? this.pattern.set(name, /* @__PURE__ */ new Set());
|
|
95
|
-
|
|
100
|
+
const pattern = { type: "pattern", name, ...result };
|
|
101
|
+
this.pattern.get(name)?.add(pattern);
|
|
102
|
+
this.all.add(pattern);
|
|
96
103
|
},
|
|
97
104
|
setRecipe(name, result) {
|
|
98
105
|
this.recipe.get(name) ?? this.recipe.set(name, /* @__PURE__ */ new Set());
|
|
99
|
-
|
|
106
|
+
const recipe = { type: "recipe", ...result };
|
|
107
|
+
this.recipe.get(name)?.add(recipe);
|
|
108
|
+
this.all.add(recipe);
|
|
100
109
|
},
|
|
101
110
|
isEmpty() {
|
|
102
|
-
return this.
|
|
111
|
+
return this.all.size === 0;
|
|
103
112
|
}
|
|
104
113
|
});
|
|
105
114
|
|
|
@@ -118,6 +127,7 @@ function createImportMatcher(mod, values) {
|
|
|
118
127
|
var combineResult = (unboxed) => {
|
|
119
128
|
return [...unboxed.conditions, unboxed.raw, ...unboxed.spreadConditions];
|
|
120
129
|
};
|
|
130
|
+
var defaultEnv = { preset: "NONE" };
|
|
121
131
|
function createParser(options) {
|
|
122
132
|
return function parse(sourceFile, styleProperties) {
|
|
123
133
|
if (!sourceFile)
|
|
@@ -246,6 +256,7 @@ function createParser(options) {
|
|
|
246
256
|
return true;
|
|
247
257
|
}
|
|
248
258
|
},
|
|
259
|
+
getEvaluateOptions: (node) => ({ node, environment: defaultEnv }),
|
|
249
260
|
flags: { skipTraverseFiles: true }
|
|
250
261
|
});
|
|
251
262
|
measure();
|
package/dist/index.mjs
CHANGED
|
@@ -53,27 +53,36 @@ function getImportDeclarations(file, options) {
|
|
|
53
53
|
|
|
54
54
|
// src/parser-result.ts
|
|
55
55
|
var createParserResult = () => ({
|
|
56
|
+
all: /* @__PURE__ */ new Set(),
|
|
56
57
|
jsx: /* @__PURE__ */ new Set(),
|
|
57
58
|
css: /* @__PURE__ */ new Set(),
|
|
58
59
|
cva: /* @__PURE__ */ new Set(),
|
|
59
60
|
recipe: /* @__PURE__ */ new Map(),
|
|
60
61
|
pattern: /* @__PURE__ */ new Map(),
|
|
61
62
|
set(name, result) {
|
|
62
|
-
|
|
63
|
+
const obj = { type: "object", ...result };
|
|
64
|
+
this[name].add(obj);
|
|
65
|
+
this.all.add(obj);
|
|
63
66
|
},
|
|
64
67
|
setCva(result) {
|
|
65
|
-
|
|
68
|
+
const cva = { type: "cva", ...result };
|
|
69
|
+
this.cva.add(cva);
|
|
70
|
+
this.all.add(cva);
|
|
66
71
|
},
|
|
67
72
|
setPattern(name, result) {
|
|
68
73
|
this.pattern.get(name) ?? this.pattern.set(name, /* @__PURE__ */ new Set());
|
|
69
|
-
|
|
74
|
+
const pattern = { type: "pattern", name, ...result };
|
|
75
|
+
this.pattern.get(name)?.add(pattern);
|
|
76
|
+
this.all.add(pattern);
|
|
70
77
|
},
|
|
71
78
|
setRecipe(name, result) {
|
|
72
79
|
this.recipe.get(name) ?? this.recipe.set(name, /* @__PURE__ */ new Set());
|
|
73
|
-
|
|
80
|
+
const recipe = { type: "recipe", ...result };
|
|
81
|
+
this.recipe.get(name)?.add(recipe);
|
|
82
|
+
this.all.add(recipe);
|
|
74
83
|
},
|
|
75
84
|
isEmpty() {
|
|
76
|
-
return this.
|
|
85
|
+
return this.all.size === 0;
|
|
77
86
|
}
|
|
78
87
|
});
|
|
79
88
|
|
|
@@ -92,6 +101,7 @@ function createImportMatcher(mod, values) {
|
|
|
92
101
|
var combineResult = (unboxed) => {
|
|
93
102
|
return [...unboxed.conditions, unboxed.raw, ...unboxed.spreadConditions];
|
|
94
103
|
};
|
|
104
|
+
var defaultEnv = { preset: "NONE" };
|
|
95
105
|
function createParser(options) {
|
|
96
106
|
return function parse(sourceFile, styleProperties) {
|
|
97
107
|
if (!sourceFile)
|
|
@@ -220,6 +230,7 @@ function createParser(options) {
|
|
|
220
230
|
return true;
|
|
221
231
|
}
|
|
222
232
|
},
|
|
233
|
+
getEvaluateOptions: (node) => ({ node, environment: defaultEnv }),
|
|
223
234
|
flags: { skipTraverseFiles: true }
|
|
224
235
|
});
|
|
225
236
|
measure();
|
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-20230417181739",
|
|
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-20230417181739",
|
|
18
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230417181739",
|
|
19
|
+
"@pandacss/logger": "0.0.0-dev-20230417181739",
|
|
20
|
+
"@pandacss/shared": "0.0.0-dev-20230417181739",
|
|
21
|
+
"@pandacss/types": "0.0.0-dev-20230417181739"
|
|
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-20230417181739",
|
|
25
|
+
"@pandacss/generator": "0.0.0-dev-20230417181739"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|