@pandacss/generator 0.0.0-dev-20230206074851
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/LICENSE.md +21 -0
- package/dist/index.d.ts +279 -0
- package/dist/index.js +2159 -0
- package/dist/index.mjs +2131 -0
- package/package.json +40 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Segun Adebayo
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
import * as _pandacss_token_dictionary from '@pandacss/token-dictionary';
|
|
2
|
+
import * as _pandacss_core from '@pandacss/core';
|
|
3
|
+
import * as _pandacss_types_dist_shared from '@pandacss/types/dist/shared';
|
|
4
|
+
import * as _pandacss_types from '@pandacss/types';
|
|
5
|
+
import { LoadConfigResult } from '@pandacss/types';
|
|
6
|
+
|
|
7
|
+
declare const getEngine: (conf: LoadConfigResult) => {
|
|
8
|
+
patterns: {
|
|
9
|
+
transform: (name: string, data: Record<string, any>) => _pandacss_types.SystemStyleObject;
|
|
10
|
+
nodes: {
|
|
11
|
+
type: "pattern";
|
|
12
|
+
name: string;
|
|
13
|
+
props: string[];
|
|
14
|
+
baseName: string;
|
|
15
|
+
}[];
|
|
16
|
+
patterns: Record<string, _pandacss_types.PatternConfig>;
|
|
17
|
+
getConfig: (name: string) => _pandacss_types.PatternConfig;
|
|
18
|
+
getNames: (name: string) => {
|
|
19
|
+
name: string;
|
|
20
|
+
upperName: string;
|
|
21
|
+
dashName: string;
|
|
22
|
+
styleFnName: string;
|
|
23
|
+
jsxName: string;
|
|
24
|
+
};
|
|
25
|
+
details: {
|
|
26
|
+
props: string[];
|
|
27
|
+
blocklistType: string;
|
|
28
|
+
config: _pandacss_types.PatternConfig;
|
|
29
|
+
name: string;
|
|
30
|
+
upperName: string;
|
|
31
|
+
dashName: string;
|
|
32
|
+
styleFnName: string;
|
|
33
|
+
jsxName: string;
|
|
34
|
+
}[];
|
|
35
|
+
getFnName: (jsx: string) => string;
|
|
36
|
+
isEmpty: () => boolean;
|
|
37
|
+
};
|
|
38
|
+
recipes: {
|
|
39
|
+
nodes: {
|
|
40
|
+
type: "recipe";
|
|
41
|
+
name: string;
|
|
42
|
+
props: string[];
|
|
43
|
+
baseName: string;
|
|
44
|
+
}[];
|
|
45
|
+
recipes: Record<string, _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>>;
|
|
46
|
+
getConfig: (name: string) => _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord> | undefined;
|
|
47
|
+
getNames: (name: string) => {
|
|
48
|
+
upperName: string;
|
|
49
|
+
dashName: string;
|
|
50
|
+
jsxName: string;
|
|
51
|
+
};
|
|
52
|
+
details: {
|
|
53
|
+
config: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
54
|
+
upperName: string;
|
|
55
|
+
dashName: string;
|
|
56
|
+
jsxName: string;
|
|
57
|
+
}[];
|
|
58
|
+
getFnName: (jsx: string) => string;
|
|
59
|
+
splitProps: (name: string, props: Record<string, any>) => {
|
|
60
|
+
[x: string]: unknown;
|
|
61
|
+
}[];
|
|
62
|
+
variantKeys: {
|
|
63
|
+
[x: string]: {
|
|
64
|
+
[x: string]: string[];
|
|
65
|
+
}[];
|
|
66
|
+
}[];
|
|
67
|
+
isEmpty: () => boolean;
|
|
68
|
+
};
|
|
69
|
+
jsx: {
|
|
70
|
+
factoryName: string;
|
|
71
|
+
upperName: string;
|
|
72
|
+
typeName: string;
|
|
73
|
+
componentName: string;
|
|
74
|
+
framework: "solid" | "react" | "preact" | undefined;
|
|
75
|
+
};
|
|
76
|
+
paths: {
|
|
77
|
+
get: (file?: string | undefined) => string[];
|
|
78
|
+
root: string[];
|
|
79
|
+
css: string[];
|
|
80
|
+
token: string[];
|
|
81
|
+
types: string[];
|
|
82
|
+
recipe: string[];
|
|
83
|
+
pattern: string[];
|
|
84
|
+
chunk: string[];
|
|
85
|
+
outCss: string[];
|
|
86
|
+
jsx: string[];
|
|
87
|
+
};
|
|
88
|
+
file: {
|
|
89
|
+
ext(file: string): string;
|
|
90
|
+
import(mod: string, file: string): string;
|
|
91
|
+
export(file: string): string;
|
|
92
|
+
};
|
|
93
|
+
config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "include" | "outdir" | "cwd">>;
|
|
94
|
+
utility: _pandacss_core.Utility;
|
|
95
|
+
conditions: _pandacss_core.Conditions;
|
|
96
|
+
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
97
|
+
path: string;
|
|
98
|
+
dependencies: string[];
|
|
99
|
+
createSheet: (options?: _pandacss_core.StylesheetOptions | undefined) => _pandacss_core.Stylesheet;
|
|
100
|
+
properties: string[];
|
|
101
|
+
isValidProperty: (key: string) => boolean;
|
|
102
|
+
};
|
|
103
|
+
type Context = ReturnType<typeof getEngine>;
|
|
104
|
+
|
|
105
|
+
declare const artifactsGenerated: (ctx: Context) => () => string;
|
|
106
|
+
declare const configExists: (cmd: string) => string;
|
|
107
|
+
declare const thankYou: () => string;
|
|
108
|
+
declare const codegenComplete: () => string;
|
|
109
|
+
declare const noExtract: () => string;
|
|
110
|
+
declare const watch: () => string;
|
|
111
|
+
declare const buildComplete: (count: number) => string;
|
|
112
|
+
declare const getMessages: (ctx: Context) => {
|
|
113
|
+
artifactsGenerated: () => string;
|
|
114
|
+
configExists: (cmd: string) => string;
|
|
115
|
+
thankYou: () => string;
|
|
116
|
+
codegenComplete: () => string;
|
|
117
|
+
noExtract: () => string;
|
|
118
|
+
watch: () => string;
|
|
119
|
+
buildComplete: (count: number) => string;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
declare const messages_artifactsGenerated: typeof artifactsGenerated;
|
|
123
|
+
declare const messages_configExists: typeof configExists;
|
|
124
|
+
declare const messages_thankYou: typeof thankYou;
|
|
125
|
+
declare const messages_codegenComplete: typeof codegenComplete;
|
|
126
|
+
declare const messages_noExtract: typeof noExtract;
|
|
127
|
+
declare const messages_watch: typeof watch;
|
|
128
|
+
declare const messages_buildComplete: typeof buildComplete;
|
|
129
|
+
declare const messages_getMessages: typeof getMessages;
|
|
130
|
+
declare namespace messages {
|
|
131
|
+
export {
|
|
132
|
+
messages_artifactsGenerated as artifactsGenerated,
|
|
133
|
+
messages_configExists as configExists,
|
|
134
|
+
messages_thankYou as thankYou,
|
|
135
|
+
messages_codegenComplete as codegenComplete,
|
|
136
|
+
messages_noExtract as noExtract,
|
|
137
|
+
messages_watch as watch,
|
|
138
|
+
messages_buildComplete as buildComplete,
|
|
139
|
+
messages_getMessages as getMessages,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare const createGenerator: (conf: LoadConfigResult) => {
|
|
144
|
+
config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "include" | "outdir" | "cwd">>;
|
|
145
|
+
utility: _pandacss_core.Utility;
|
|
146
|
+
conditions: _pandacss_core.Conditions;
|
|
147
|
+
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
148
|
+
path: string;
|
|
149
|
+
jsx: {
|
|
150
|
+
factoryName: string;
|
|
151
|
+
upperName: string;
|
|
152
|
+
typeName: string;
|
|
153
|
+
componentName: string;
|
|
154
|
+
framework: "solid" | "react" | "preact" | undefined;
|
|
155
|
+
};
|
|
156
|
+
recipes: {
|
|
157
|
+
nodes: {
|
|
158
|
+
type: "recipe";
|
|
159
|
+
name: string;
|
|
160
|
+
props: string[];
|
|
161
|
+
baseName: string;
|
|
162
|
+
}[];
|
|
163
|
+
recipes: Record<string, _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>>;
|
|
164
|
+
getConfig: (name: string) => _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord> | undefined;
|
|
165
|
+
getNames: (name: string) => {
|
|
166
|
+
upperName: string;
|
|
167
|
+
dashName: string;
|
|
168
|
+
jsxName: string;
|
|
169
|
+
};
|
|
170
|
+
details: {
|
|
171
|
+
config: _pandacss_types.RecipeConfig<_pandacss_types.RecipeVariantRecord>;
|
|
172
|
+
upperName: string;
|
|
173
|
+
dashName: string;
|
|
174
|
+
jsxName: string;
|
|
175
|
+
}[];
|
|
176
|
+
getFnName: (jsx: string) => string;
|
|
177
|
+
splitProps: (name: string, props: Record<string, any>) => {
|
|
178
|
+
[x: string]: unknown;
|
|
179
|
+
}[];
|
|
180
|
+
variantKeys: {
|
|
181
|
+
[x: string]: {
|
|
182
|
+
[x: string]: string[];
|
|
183
|
+
}[];
|
|
184
|
+
}[];
|
|
185
|
+
isEmpty: () => boolean;
|
|
186
|
+
};
|
|
187
|
+
patterns: {
|
|
188
|
+
transform: (name: string, data: Record<string, any>) => _pandacss_types.SystemStyleObject;
|
|
189
|
+
nodes: {
|
|
190
|
+
type: "pattern";
|
|
191
|
+
name: string;
|
|
192
|
+
props: string[];
|
|
193
|
+
baseName: string;
|
|
194
|
+
}[];
|
|
195
|
+
patterns: Record<string, _pandacss_types.PatternConfig>;
|
|
196
|
+
getConfig: (name: string) => _pandacss_types.PatternConfig;
|
|
197
|
+
getNames: (name: string) => {
|
|
198
|
+
name: string;
|
|
199
|
+
upperName: string;
|
|
200
|
+
dashName: string;
|
|
201
|
+
styleFnName: string;
|
|
202
|
+
jsxName: string;
|
|
203
|
+
};
|
|
204
|
+
details: {
|
|
205
|
+
props: string[];
|
|
206
|
+
blocklistType: string;
|
|
207
|
+
config: _pandacss_types.PatternConfig;
|
|
208
|
+
name: string;
|
|
209
|
+
upperName: string;
|
|
210
|
+
dashName: string;
|
|
211
|
+
styleFnName: string;
|
|
212
|
+
jsxName: string;
|
|
213
|
+
}[];
|
|
214
|
+
getFnName: (jsx: string) => string;
|
|
215
|
+
isEmpty: () => boolean;
|
|
216
|
+
};
|
|
217
|
+
dependencies: string[];
|
|
218
|
+
createSheet: (options?: _pandacss_core.StylesheetOptions | undefined) => _pandacss_core.Stylesheet;
|
|
219
|
+
properties: string[];
|
|
220
|
+
isValidProperty: (key: string) => boolean;
|
|
221
|
+
getArtifacts: () => _pandacss_types.Artifact[];
|
|
222
|
+
getCss: (options: {
|
|
223
|
+
files: string[];
|
|
224
|
+
resolve?: boolean | undefined;
|
|
225
|
+
}) => string;
|
|
226
|
+
getParserCss: (result: _pandacss_types.ParserResult) => string | undefined;
|
|
227
|
+
messages: {
|
|
228
|
+
artifactsGenerated: () => string;
|
|
229
|
+
configExists: (cmd: string) => string;
|
|
230
|
+
thankYou: () => string;
|
|
231
|
+
codegenComplete: () => string;
|
|
232
|
+
noExtract: () => string;
|
|
233
|
+
watch: () => string;
|
|
234
|
+
buildComplete: (count: number) => string;
|
|
235
|
+
};
|
|
236
|
+
paths: {
|
|
237
|
+
get: (file?: string | undefined) => string[];
|
|
238
|
+
root: string[];
|
|
239
|
+
css: string[];
|
|
240
|
+
token: string[];
|
|
241
|
+
types: string[];
|
|
242
|
+
recipe: string[];
|
|
243
|
+
pattern: string[];
|
|
244
|
+
chunk: string[];
|
|
245
|
+
outCss: string[];
|
|
246
|
+
jsx: string[];
|
|
247
|
+
};
|
|
248
|
+
file: {
|
|
249
|
+
ext(file: string): string;
|
|
250
|
+
import(mod: string, file: string): string;
|
|
251
|
+
export(file: string): string;
|
|
252
|
+
};
|
|
253
|
+
parserOptions: {
|
|
254
|
+
importMap: {
|
|
255
|
+
css: string;
|
|
256
|
+
recipe: string;
|
|
257
|
+
pattern: string;
|
|
258
|
+
jsx: string;
|
|
259
|
+
};
|
|
260
|
+
jsx: {
|
|
261
|
+
factory: string;
|
|
262
|
+
isStyleProp: (key: string) => boolean;
|
|
263
|
+
nodes: ({
|
|
264
|
+
type: "pattern";
|
|
265
|
+
name: string;
|
|
266
|
+
props: string[];
|
|
267
|
+
baseName: string;
|
|
268
|
+
} | {
|
|
269
|
+
type: "recipe";
|
|
270
|
+
name: string;
|
|
271
|
+
props: string[];
|
|
272
|
+
baseName: string;
|
|
273
|
+
})[];
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
type Generator = ReturnType<typeof createGenerator>;
|
|
278
|
+
|
|
279
|
+
export { Generator, createGenerator, messages };
|