@pandacss/generator 0.15.4 → 0.16.0
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.d.mts +227 -0
- package/dist/index.d.ts +227 -0
- package/dist/index.js +27 -17
- package/dist/index.mjs +27 -17
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -157,8 +157,235 @@ declare namespace messages {
|
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
declare function generateResetCss(ctx: Context, scope?: string): string;
|
|
161
|
+
|
|
162
|
+
declare function generateTokenCss(ctx: Context): string;
|
|
163
|
+
|
|
164
|
+
declare function generateKeyframeCss(ctx: Context): string;
|
|
165
|
+
|
|
160
166
|
declare const createGenerator: (conf: ConfigResultWithHooks) => {
|
|
161
167
|
getArtifacts: () => _pandacss_types.Artifact[];
|
|
168
|
+
getStaticCss: (ctx: {
|
|
169
|
+
patterns: {
|
|
170
|
+
keys: string[];
|
|
171
|
+
getConfig: (name: string) => _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
172
|
+
transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
|
|
173
|
+
getNames: (name: string) => {
|
|
174
|
+
upperName: string;
|
|
175
|
+
baseName: string;
|
|
176
|
+
dashName: string;
|
|
177
|
+
styleFnName: string;
|
|
178
|
+
jsxName: string;
|
|
179
|
+
};
|
|
180
|
+
details: {
|
|
181
|
+
props: string[];
|
|
182
|
+
blocklistType: string;
|
|
183
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
184
|
+
type: "pattern";
|
|
185
|
+
match: RegExp;
|
|
186
|
+
jsx: (string | RegExp)[];
|
|
187
|
+
upperName: string;
|
|
188
|
+
baseName: string;
|
|
189
|
+
dashName: string;
|
|
190
|
+
styleFnName: string;
|
|
191
|
+
jsxName: string;
|
|
192
|
+
}[];
|
|
193
|
+
find: (jsxName: string) => string;
|
|
194
|
+
filter: (jsxName: string) => {
|
|
195
|
+
props: string[];
|
|
196
|
+
blocklistType: string;
|
|
197
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
198
|
+
type: "pattern";
|
|
199
|
+
match: RegExp;
|
|
200
|
+
jsx: (string | RegExp)[];
|
|
201
|
+
upperName: string;
|
|
202
|
+
baseName: string;
|
|
203
|
+
dashName: string;
|
|
204
|
+
styleFnName: string;
|
|
205
|
+
jsxName: string;
|
|
206
|
+
}[];
|
|
207
|
+
isEmpty: () => boolean;
|
|
208
|
+
};
|
|
209
|
+
jsx: {
|
|
210
|
+
factoryName: string;
|
|
211
|
+
upperName: string;
|
|
212
|
+
typeName: string;
|
|
213
|
+
componentName: string;
|
|
214
|
+
framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
|
|
215
|
+
styleProps: "all" | "minimal" | "none";
|
|
216
|
+
};
|
|
217
|
+
paths: {
|
|
218
|
+
get: (file?: string | undefined) => string[];
|
|
219
|
+
root: string[];
|
|
220
|
+
css: string[];
|
|
221
|
+
token: string[];
|
|
222
|
+
types: string[];
|
|
223
|
+
recipe: string[];
|
|
224
|
+
pattern: string[];
|
|
225
|
+
chunk: string[];
|
|
226
|
+
outCss: string[];
|
|
227
|
+
jsx: string[];
|
|
228
|
+
};
|
|
229
|
+
file: {
|
|
230
|
+
ext(file: string): string;
|
|
231
|
+
extDts(file: string): string;
|
|
232
|
+
__extDts(file: string): string;
|
|
233
|
+
import(mod: string, file: string): string;
|
|
234
|
+
importType(mod: string, file: string): string;
|
|
235
|
+
exportType(mod: string, file: string): string;
|
|
236
|
+
exportStar(file: string): string;
|
|
237
|
+
exportTypeStar(file: string): string;
|
|
238
|
+
isTypeFile(file: string): boolean;
|
|
239
|
+
};
|
|
240
|
+
isTemplateLiteralSyntax: boolean;
|
|
241
|
+
studio: {
|
|
242
|
+
outdir: string;
|
|
243
|
+
logo?: string | undefined;
|
|
244
|
+
inject?: {
|
|
245
|
+
head?: string | undefined;
|
|
246
|
+
body?: string | undefined;
|
|
247
|
+
} | undefined;
|
|
248
|
+
};
|
|
249
|
+
hash: {
|
|
250
|
+
tokens: boolean | undefined;
|
|
251
|
+
className: boolean | undefined;
|
|
252
|
+
};
|
|
253
|
+
prefix: {
|
|
254
|
+
tokens: string | undefined;
|
|
255
|
+
className: string | undefined;
|
|
256
|
+
};
|
|
257
|
+
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
258
|
+
utility: _pandacss_core.Utility;
|
|
259
|
+
properties: string[];
|
|
260
|
+
isValidProperty: (key: string) => boolean;
|
|
261
|
+
recipes: _pandacss_core.Recipes;
|
|
262
|
+
conditions: _pandacss_core.Conditions;
|
|
263
|
+
createSheetContext: () => _pandacss_core.StylesheetContext;
|
|
264
|
+
createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
|
|
265
|
+
layers: _pandacss_types.CascadeLayers;
|
|
266
|
+
isValidLayerRule: (layerRule: string) => boolean;
|
|
267
|
+
layerString: string;
|
|
268
|
+
layerNames: string[];
|
|
269
|
+
hooks: _pandacss_types.PandaHookable;
|
|
270
|
+
path: string;
|
|
271
|
+
config: _pandacss_types.UserConfig;
|
|
272
|
+
tsconfig?: TSConfig | undefined;
|
|
273
|
+
tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
|
|
274
|
+
tsconfigFile?: string | undefined;
|
|
275
|
+
dependencies: string[];
|
|
276
|
+
}) => string;
|
|
277
|
+
getResetCss: typeof generateResetCss;
|
|
278
|
+
getTokenCss: typeof generateTokenCss;
|
|
279
|
+
getKeyframeCss: typeof generateKeyframeCss;
|
|
280
|
+
getGlobalCss: (ctx: {
|
|
281
|
+
patterns: {
|
|
282
|
+
keys: string[];
|
|
283
|
+
getConfig: (name: string) => _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
284
|
+
transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
|
|
285
|
+
getNames: (name: string) => {
|
|
286
|
+
upperName: string;
|
|
287
|
+
baseName: string;
|
|
288
|
+
dashName: string;
|
|
289
|
+
styleFnName: string;
|
|
290
|
+
jsxName: string;
|
|
291
|
+
};
|
|
292
|
+
details: {
|
|
293
|
+
props: string[];
|
|
294
|
+
blocklistType: string;
|
|
295
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
296
|
+
type: "pattern";
|
|
297
|
+
match: RegExp;
|
|
298
|
+
jsx: (string | RegExp)[];
|
|
299
|
+
upperName: string;
|
|
300
|
+
baseName: string;
|
|
301
|
+
dashName: string;
|
|
302
|
+
styleFnName: string;
|
|
303
|
+
jsxName: string;
|
|
304
|
+
}[];
|
|
305
|
+
find: (jsxName: string) => string;
|
|
306
|
+
filter: (jsxName: string) => {
|
|
307
|
+
props: string[];
|
|
308
|
+
blocklistType: string;
|
|
309
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
310
|
+
type: "pattern";
|
|
311
|
+
match: RegExp;
|
|
312
|
+
jsx: (string | RegExp)[];
|
|
313
|
+
upperName: string;
|
|
314
|
+
baseName: string;
|
|
315
|
+
dashName: string;
|
|
316
|
+
styleFnName: string;
|
|
317
|
+
jsxName: string;
|
|
318
|
+
}[];
|
|
319
|
+
isEmpty: () => boolean;
|
|
320
|
+
};
|
|
321
|
+
jsx: {
|
|
322
|
+
factoryName: string;
|
|
323
|
+
upperName: string;
|
|
324
|
+
typeName: string;
|
|
325
|
+
componentName: string;
|
|
326
|
+
framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
|
|
327
|
+
styleProps: "all" | "minimal" | "none";
|
|
328
|
+
};
|
|
329
|
+
paths: {
|
|
330
|
+
get: (file?: string | undefined) => string[];
|
|
331
|
+
root: string[];
|
|
332
|
+
css: string[];
|
|
333
|
+
token: string[];
|
|
334
|
+
types: string[];
|
|
335
|
+
recipe: string[];
|
|
336
|
+
pattern: string[];
|
|
337
|
+
chunk: string[];
|
|
338
|
+
outCss: string[];
|
|
339
|
+
jsx: string[];
|
|
340
|
+
};
|
|
341
|
+
file: {
|
|
342
|
+
ext(file: string): string;
|
|
343
|
+
extDts(file: string): string;
|
|
344
|
+
__extDts(file: string): string;
|
|
345
|
+
import(mod: string, file: string): string;
|
|
346
|
+
importType(mod: string, file: string): string;
|
|
347
|
+
exportType(mod: string, file: string): string;
|
|
348
|
+
exportStar(file: string): string;
|
|
349
|
+
exportTypeStar(file: string): string;
|
|
350
|
+
isTypeFile(file: string): boolean;
|
|
351
|
+
};
|
|
352
|
+
isTemplateLiteralSyntax: boolean;
|
|
353
|
+
studio: {
|
|
354
|
+
outdir: string;
|
|
355
|
+
logo?: string | undefined;
|
|
356
|
+
inject?: {
|
|
357
|
+
head?: string | undefined;
|
|
358
|
+
body?: string | undefined;
|
|
359
|
+
} | undefined;
|
|
360
|
+
};
|
|
361
|
+
hash: {
|
|
362
|
+
tokens: boolean | undefined;
|
|
363
|
+
className: boolean | undefined;
|
|
364
|
+
};
|
|
365
|
+
prefix: {
|
|
366
|
+
tokens: string | undefined;
|
|
367
|
+
className: string | undefined;
|
|
368
|
+
};
|
|
369
|
+
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
370
|
+
utility: _pandacss_core.Utility;
|
|
371
|
+
properties: string[];
|
|
372
|
+
isValidProperty: (key: string) => boolean;
|
|
373
|
+
recipes: _pandacss_core.Recipes;
|
|
374
|
+
conditions: _pandacss_core.Conditions;
|
|
375
|
+
createSheetContext: () => _pandacss_core.StylesheetContext;
|
|
376
|
+
createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
|
|
377
|
+
layers: _pandacss_types.CascadeLayers;
|
|
378
|
+
isValidLayerRule: (layerRule: string) => boolean;
|
|
379
|
+
layerString: string;
|
|
380
|
+
layerNames: string[];
|
|
381
|
+
hooks: _pandacss_types.PandaHookable;
|
|
382
|
+
path: string;
|
|
383
|
+
config: _pandacss_types.UserConfig;
|
|
384
|
+
tsconfig?: TSConfig | undefined;
|
|
385
|
+
tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
|
|
386
|
+
tsconfigFile?: string | undefined;
|
|
387
|
+
dependencies: string[];
|
|
388
|
+
}) => string;
|
|
162
389
|
getCss: (options: {
|
|
163
390
|
files: string[];
|
|
164
391
|
resolve?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -157,8 +157,235 @@ declare namespace messages {
|
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
declare function generateResetCss(ctx: Context, scope?: string): string;
|
|
161
|
+
|
|
162
|
+
declare function generateTokenCss(ctx: Context): string;
|
|
163
|
+
|
|
164
|
+
declare function generateKeyframeCss(ctx: Context): string;
|
|
165
|
+
|
|
160
166
|
declare const createGenerator: (conf: ConfigResultWithHooks) => {
|
|
161
167
|
getArtifacts: () => _pandacss_types.Artifact[];
|
|
168
|
+
getStaticCss: (ctx: {
|
|
169
|
+
patterns: {
|
|
170
|
+
keys: string[];
|
|
171
|
+
getConfig: (name: string) => _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
172
|
+
transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
|
|
173
|
+
getNames: (name: string) => {
|
|
174
|
+
upperName: string;
|
|
175
|
+
baseName: string;
|
|
176
|
+
dashName: string;
|
|
177
|
+
styleFnName: string;
|
|
178
|
+
jsxName: string;
|
|
179
|
+
};
|
|
180
|
+
details: {
|
|
181
|
+
props: string[];
|
|
182
|
+
blocklistType: string;
|
|
183
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
184
|
+
type: "pattern";
|
|
185
|
+
match: RegExp;
|
|
186
|
+
jsx: (string | RegExp)[];
|
|
187
|
+
upperName: string;
|
|
188
|
+
baseName: string;
|
|
189
|
+
dashName: string;
|
|
190
|
+
styleFnName: string;
|
|
191
|
+
jsxName: string;
|
|
192
|
+
}[];
|
|
193
|
+
find: (jsxName: string) => string;
|
|
194
|
+
filter: (jsxName: string) => {
|
|
195
|
+
props: string[];
|
|
196
|
+
blocklistType: string;
|
|
197
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
198
|
+
type: "pattern";
|
|
199
|
+
match: RegExp;
|
|
200
|
+
jsx: (string | RegExp)[];
|
|
201
|
+
upperName: string;
|
|
202
|
+
baseName: string;
|
|
203
|
+
dashName: string;
|
|
204
|
+
styleFnName: string;
|
|
205
|
+
jsxName: string;
|
|
206
|
+
}[];
|
|
207
|
+
isEmpty: () => boolean;
|
|
208
|
+
};
|
|
209
|
+
jsx: {
|
|
210
|
+
factoryName: string;
|
|
211
|
+
upperName: string;
|
|
212
|
+
typeName: string;
|
|
213
|
+
componentName: string;
|
|
214
|
+
framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
|
|
215
|
+
styleProps: "all" | "minimal" | "none";
|
|
216
|
+
};
|
|
217
|
+
paths: {
|
|
218
|
+
get: (file?: string | undefined) => string[];
|
|
219
|
+
root: string[];
|
|
220
|
+
css: string[];
|
|
221
|
+
token: string[];
|
|
222
|
+
types: string[];
|
|
223
|
+
recipe: string[];
|
|
224
|
+
pattern: string[];
|
|
225
|
+
chunk: string[];
|
|
226
|
+
outCss: string[];
|
|
227
|
+
jsx: string[];
|
|
228
|
+
};
|
|
229
|
+
file: {
|
|
230
|
+
ext(file: string): string;
|
|
231
|
+
extDts(file: string): string;
|
|
232
|
+
__extDts(file: string): string;
|
|
233
|
+
import(mod: string, file: string): string;
|
|
234
|
+
importType(mod: string, file: string): string;
|
|
235
|
+
exportType(mod: string, file: string): string;
|
|
236
|
+
exportStar(file: string): string;
|
|
237
|
+
exportTypeStar(file: string): string;
|
|
238
|
+
isTypeFile(file: string): boolean;
|
|
239
|
+
};
|
|
240
|
+
isTemplateLiteralSyntax: boolean;
|
|
241
|
+
studio: {
|
|
242
|
+
outdir: string;
|
|
243
|
+
logo?: string | undefined;
|
|
244
|
+
inject?: {
|
|
245
|
+
head?: string | undefined;
|
|
246
|
+
body?: string | undefined;
|
|
247
|
+
} | undefined;
|
|
248
|
+
};
|
|
249
|
+
hash: {
|
|
250
|
+
tokens: boolean | undefined;
|
|
251
|
+
className: boolean | undefined;
|
|
252
|
+
};
|
|
253
|
+
prefix: {
|
|
254
|
+
tokens: string | undefined;
|
|
255
|
+
className: string | undefined;
|
|
256
|
+
};
|
|
257
|
+
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
258
|
+
utility: _pandacss_core.Utility;
|
|
259
|
+
properties: string[];
|
|
260
|
+
isValidProperty: (key: string) => boolean;
|
|
261
|
+
recipes: _pandacss_core.Recipes;
|
|
262
|
+
conditions: _pandacss_core.Conditions;
|
|
263
|
+
createSheetContext: () => _pandacss_core.StylesheetContext;
|
|
264
|
+
createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
|
|
265
|
+
layers: _pandacss_types.CascadeLayers;
|
|
266
|
+
isValidLayerRule: (layerRule: string) => boolean;
|
|
267
|
+
layerString: string;
|
|
268
|
+
layerNames: string[];
|
|
269
|
+
hooks: _pandacss_types.PandaHookable;
|
|
270
|
+
path: string;
|
|
271
|
+
config: _pandacss_types.UserConfig;
|
|
272
|
+
tsconfig?: TSConfig | undefined;
|
|
273
|
+
tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
|
|
274
|
+
tsconfigFile?: string | undefined;
|
|
275
|
+
dependencies: string[];
|
|
276
|
+
}) => string;
|
|
277
|
+
getResetCss: typeof generateResetCss;
|
|
278
|
+
getTokenCss: typeof generateTokenCss;
|
|
279
|
+
getKeyframeCss: typeof generateKeyframeCss;
|
|
280
|
+
getGlobalCss: (ctx: {
|
|
281
|
+
patterns: {
|
|
282
|
+
keys: string[];
|
|
283
|
+
getConfig: (name: string) => _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
284
|
+
transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
|
|
285
|
+
getNames: (name: string) => {
|
|
286
|
+
upperName: string;
|
|
287
|
+
baseName: string;
|
|
288
|
+
dashName: string;
|
|
289
|
+
styleFnName: string;
|
|
290
|
+
jsxName: string;
|
|
291
|
+
};
|
|
292
|
+
details: {
|
|
293
|
+
props: string[];
|
|
294
|
+
blocklistType: string;
|
|
295
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
296
|
+
type: "pattern";
|
|
297
|
+
match: RegExp;
|
|
298
|
+
jsx: (string | RegExp)[];
|
|
299
|
+
upperName: string;
|
|
300
|
+
baseName: string;
|
|
301
|
+
dashName: string;
|
|
302
|
+
styleFnName: string;
|
|
303
|
+
jsxName: string;
|
|
304
|
+
}[];
|
|
305
|
+
find: (jsxName: string) => string;
|
|
306
|
+
filter: (jsxName: string) => {
|
|
307
|
+
props: string[];
|
|
308
|
+
blocklistType: string;
|
|
309
|
+
config: _pandacss_types.PatternConfig<_pandacss_types_dist_pattern.PatternProperties>;
|
|
310
|
+
type: "pattern";
|
|
311
|
+
match: RegExp;
|
|
312
|
+
jsx: (string | RegExp)[];
|
|
313
|
+
upperName: string;
|
|
314
|
+
baseName: string;
|
|
315
|
+
dashName: string;
|
|
316
|
+
styleFnName: string;
|
|
317
|
+
jsxName: string;
|
|
318
|
+
}[];
|
|
319
|
+
isEmpty: () => boolean;
|
|
320
|
+
};
|
|
321
|
+
jsx: {
|
|
322
|
+
factoryName: string;
|
|
323
|
+
upperName: string;
|
|
324
|
+
typeName: string;
|
|
325
|
+
componentName: string;
|
|
326
|
+
framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
|
|
327
|
+
styleProps: "all" | "minimal" | "none";
|
|
328
|
+
};
|
|
329
|
+
paths: {
|
|
330
|
+
get: (file?: string | undefined) => string[];
|
|
331
|
+
root: string[];
|
|
332
|
+
css: string[];
|
|
333
|
+
token: string[];
|
|
334
|
+
types: string[];
|
|
335
|
+
recipe: string[];
|
|
336
|
+
pattern: string[];
|
|
337
|
+
chunk: string[];
|
|
338
|
+
outCss: string[];
|
|
339
|
+
jsx: string[];
|
|
340
|
+
};
|
|
341
|
+
file: {
|
|
342
|
+
ext(file: string): string;
|
|
343
|
+
extDts(file: string): string;
|
|
344
|
+
__extDts(file: string): string;
|
|
345
|
+
import(mod: string, file: string): string;
|
|
346
|
+
importType(mod: string, file: string): string;
|
|
347
|
+
exportType(mod: string, file: string): string;
|
|
348
|
+
exportStar(file: string): string;
|
|
349
|
+
exportTypeStar(file: string): string;
|
|
350
|
+
isTypeFile(file: string): boolean;
|
|
351
|
+
};
|
|
352
|
+
isTemplateLiteralSyntax: boolean;
|
|
353
|
+
studio: {
|
|
354
|
+
outdir: string;
|
|
355
|
+
logo?: string | undefined;
|
|
356
|
+
inject?: {
|
|
357
|
+
head?: string | undefined;
|
|
358
|
+
body?: string | undefined;
|
|
359
|
+
} | undefined;
|
|
360
|
+
};
|
|
361
|
+
hash: {
|
|
362
|
+
tokens: boolean | undefined;
|
|
363
|
+
className: boolean | undefined;
|
|
364
|
+
};
|
|
365
|
+
prefix: {
|
|
366
|
+
tokens: string | undefined;
|
|
367
|
+
className: string | undefined;
|
|
368
|
+
};
|
|
369
|
+
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
370
|
+
utility: _pandacss_core.Utility;
|
|
371
|
+
properties: string[];
|
|
372
|
+
isValidProperty: (key: string) => boolean;
|
|
373
|
+
recipes: _pandacss_core.Recipes;
|
|
374
|
+
conditions: _pandacss_core.Conditions;
|
|
375
|
+
createSheetContext: () => _pandacss_core.StylesheetContext;
|
|
376
|
+
createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
|
|
377
|
+
layers: _pandacss_types.CascadeLayers;
|
|
378
|
+
isValidLayerRule: (layerRule: string) => boolean;
|
|
379
|
+
layerString: string;
|
|
380
|
+
layerNames: string[];
|
|
381
|
+
hooks: _pandacss_types.PandaHookable;
|
|
382
|
+
path: string;
|
|
383
|
+
config: _pandacss_types.UserConfig;
|
|
384
|
+
tsconfig?: TSConfig | undefined;
|
|
385
|
+
tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
|
|
386
|
+
tsconfigFile?: string | undefined;
|
|
387
|
+
dependencies: string[];
|
|
388
|
+
}) => string;
|
|
162
389
|
getCss: (options: {
|
|
163
390
|
files: string[];
|
|
164
391
|
resolve?: boolean | undefined;
|
package/dist/index.js
CHANGED
|
@@ -173,7 +173,7 @@ var generateGlobalCss = (ctx) => {
|
|
|
173
173
|
});
|
|
174
174
|
sheet.processGlobalCss(globalCss);
|
|
175
175
|
const output = sheet.toCss({ optimize });
|
|
176
|
-
ctx.hooks.callHook("generator:css", "global.css", output);
|
|
176
|
+
void ctx.hooks.callHook("generator:css", "global.css", output);
|
|
177
177
|
return output;
|
|
178
178
|
};
|
|
179
179
|
|
|
@@ -198,7 +198,7 @@ function generateKeyframeCss(ctx) {
|
|
|
198
198
|
nodes: root.nodes
|
|
199
199
|
});
|
|
200
200
|
const output = rule.toString();
|
|
201
|
-
ctx.hooks.callHook("generator:css", "keyframes.css", output);
|
|
201
|
+
void ctx.hooks.callHook("generator:css", "keyframes.css", output);
|
|
202
202
|
return output;
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -412,7 +412,7 @@ function generateResetCss(ctx, scope = "") {
|
|
|
412
412
|
outline: auto;
|
|
413
413
|
}
|
|
414
414
|
}`;
|
|
415
|
-
ctx.hooks.callHook("generator:css", "reset.css", output);
|
|
415
|
+
void ctx.hooks.callHook("generator:css", "reset.css", output);
|
|
416
416
|
return output;
|
|
417
417
|
}
|
|
418
418
|
|
|
@@ -451,7 +451,7 @@ var generateStaticCss = (ctx) => {
|
|
|
451
451
|
});
|
|
452
452
|
});
|
|
453
453
|
const output = sheet.toCss({ optimize });
|
|
454
|
-
ctx.hooks.callHook("generator:css", "static.css", output);
|
|
454
|
+
void ctx.hooks.callHook("generator:css", "static.css", output);
|
|
455
455
|
return output;
|
|
456
456
|
};
|
|
457
457
|
|
|
@@ -492,7 +492,7 @@ function generateTokenCss(ctx) {
|
|
|
492
492
|
${(0, import_core3.prettifyCss)(cleanupSelectors(css2, root))}
|
|
493
493
|
}
|
|
494
494
|
`;
|
|
495
|
-
ctx.hooks.callHook("generator:css", "tokens.css", output);
|
|
495
|
+
void ctx.hooks.callHook("generator:css", "tokens.css", output);
|
|
496
496
|
return output;
|
|
497
497
|
}
|
|
498
498
|
function getDeepestRule(root, selectors) {
|
|
@@ -1115,7 +1115,7 @@ function generateRecipes(ctx) {
|
|
|
1115
1115
|
const ${baseName}CompoundVariants = ${stringify2(compoundVariants ?? [])}
|
|
1116
1116
|
|
|
1117
1117
|
const ${baseName}SlotNames = ${stringify2(config2.slots.map((slot) => [slot, `${config2.className}__${slot}`]))}
|
|
1118
|
-
const ${baseName}SlotFns = ${baseName}SlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, ${baseName}DefaultVariants, getSlotCompoundVariant(${baseName}CompoundVariants, slotName))])
|
|
1118
|
+
const ${baseName}SlotFns = /* @__PURE__ */ ${baseName}SlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, ${baseName}DefaultVariants, getSlotCompoundVariant(${baseName}CompoundVariants, slotName))])
|
|
1119
1119
|
|
|
1120
1120
|
const ${baseName}Fn = (props = {}) => {
|
|
1121
1121
|
return Object.fromEntries(${baseName}SlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
@@ -1123,7 +1123,7 @@ function generateRecipes(ctx) {
|
|
|
1123
1123
|
|
|
1124
1124
|
const ${baseName}VariantKeys = ${stringify2(Object.keys(variantKeyMap))}
|
|
1125
1125
|
|
|
1126
|
-
export const ${baseName} = Object.assign(${baseName}Fn, {
|
|
1126
|
+
export const ${baseName} = /* @__PURE__ */ Object.assign(${baseName}Fn, {
|
|
1127
1127
|
__recipe__: false,
|
|
1128
1128
|
__name__: '${baseName}',
|
|
1129
1129
|
raw: (props) => props,
|
|
@@ -1139,13 +1139,15 @@ function generateRecipes(ctx) {
|
|
|
1139
1139
|
${ctx.file.import("splitProps", "../helpers")}
|
|
1140
1140
|
${ctx.file.import("createRecipe", "./create-recipe")}
|
|
1141
1141
|
|
|
1142
|
-
const ${baseName}Fn = createRecipe('${config2.className}', ${stringify2(
|
|
1143
|
-
|
|
1144
|
-
)})
|
|
1142
|
+
const ${baseName}Fn = /* @__PURE__ */ createRecipe('${config2.className}', ${stringify2(
|
|
1143
|
+
defaultVariants ?? {}
|
|
1144
|
+
)}, ${stringify2(compoundVariants ?? [])})
|
|
1145
1145
|
|
|
1146
1146
|
const ${baseName}VariantMap = ${stringify2(variantKeyMap)}
|
|
1147
|
+
|
|
1147
1148
|
const ${baseName}VariantKeys = Object.keys(${baseName}VariantMap)
|
|
1148
|
-
|
|
1149
|
+
|
|
1150
|
+
export const ${baseName} = /* @__PURE__ */ Object.assign(${baseName}Fn, {
|
|
1149
1151
|
__recipe__: true,
|
|
1150
1152
|
__name__: '${baseName}',
|
|
1151
1153
|
raw: (props) => props,
|
|
@@ -1441,7 +1443,7 @@ export interface ${componentName}<T extends ElementType, P extends Dict = {}> {
|
|
|
1441
1443
|
displayName?: string
|
|
1442
1444
|
}
|
|
1443
1445
|
|
|
1444
|
-
interface RecipeFn
|
|
1446
|
+
interface RecipeFn { __type: any }
|
|
1445
1447
|
|
|
1446
1448
|
interface JsxFactoryOptions<TProps extends Dict> {
|
|
1447
1449
|
dataAttr?: boolean
|
|
@@ -1706,7 +1708,7 @@ export type ComponentProps<T extends ElementType> = T extends keyof QwikIntrinsi
|
|
|
1706
1708
|
|
|
1707
1709
|
type Dict = Record<string, unknown>
|
|
1708
1710
|
|
|
1709
|
-
export interface ${componentName}<T extends ElementType, P extends Dict = {}> extends Component<Assign<ComponentProps<T>, PatchedHTMLProps, Assign<JsxStyleProps, P
|
|
1711
|
+
export interface ${componentName}<T extends ElementType, P extends Dict = {}> extends Component<Assign<ComponentProps<T>, Assign<PatchedHTMLProps, Assign<JsxStyleProps, P>>>> {}
|
|
1710
1712
|
|
|
1711
1713
|
interface RecipeFn { __type: any }
|
|
1712
1714
|
|
|
@@ -2439,7 +2441,7 @@ function generateVueJsxFactory(ctx) {
|
|
|
2439
2441
|
return h(
|
|
2440
2442
|
props.as,
|
|
2441
2443
|
{
|
|
2442
|
-
...forwardedProps
|
|
2444
|
+
...forwardedProps,
|
|
2443
2445
|
...elementProps,
|
|
2444
2446
|
...normalizeHTMLProps(htmlProps),
|
|
2445
2447
|
class: classes.value,
|
|
@@ -2596,7 +2598,7 @@ export type ComponentProps<T extends ElementType> = T extends IntrinsicElement
|
|
|
2596
2598
|
JsxHTMLProps<ComponentProps<T>, Assign<JsxStyleProps, P>>
|
|
2597
2599
|
> {}
|
|
2598
2600
|
|
|
2599
|
-
interface RecipeFn
|
|
2601
|
+
interface RecipeFn { __type: any }
|
|
2600
2602
|
|
|
2601
2603
|
interface JsxFactoryOptions<TProps extends Dict> {
|
|
2602
2604
|
dataAttr?: boolean
|
|
@@ -3252,7 +3254,7 @@ var generateFlattenedCss = (ctx) => (options) => {
|
|
|
3252
3254
|
});
|
|
3253
3255
|
sheet.append(...files);
|
|
3254
3256
|
const output = sheet.toCss({ optimize: true, minify });
|
|
3255
|
-
ctx.hooks.callHook("generator:css", "styles.css", output);
|
|
3257
|
+
void ctx.hooks.callHook("generator:css", "styles.css", output);
|
|
3256
3258
|
return output;
|
|
3257
3259
|
};
|
|
3258
3260
|
|
|
@@ -3329,7 +3331,7 @@ var generateParserCss = (ctx) => (result) => (0, import_func.pipe)(
|
|
|
3329
3331
|
(0, import_func.tryCatch)(
|
|
3330
3332
|
({ sheet, result: result2, config: { minify, optimize } }) => {
|
|
3331
3333
|
const css2 = !result2.isEmpty() ? sheet.toCss({ minify, optimize }) : void 0;
|
|
3332
|
-
ctx.hooks.callHook("parser:css", result2.filePath ?? "", css2);
|
|
3334
|
+
void ctx.hooks.callHook("parser:css", result2.filePath ?? "", css2);
|
|
3333
3335
|
return css2;
|
|
3334
3336
|
},
|
|
3335
3337
|
(err) => {
|
|
@@ -3609,8 +3611,16 @@ var createGenerator = (conf) => {
|
|
|
3609
3611
|
return {
|
|
3610
3612
|
...ctx,
|
|
3611
3613
|
getArtifacts: generateArtifacts(ctx),
|
|
3614
|
+
//
|
|
3615
|
+
getStaticCss: generateStaticCss,
|
|
3616
|
+
getResetCss: generateResetCss,
|
|
3617
|
+
getTokenCss: generateTokenCss,
|
|
3618
|
+
getKeyframeCss: generateKeyframeCss,
|
|
3619
|
+
getGlobalCss: generateGlobalCss,
|
|
3620
|
+
//
|
|
3612
3621
|
getCss: generateFlattenedCss(ctx),
|
|
3613
3622
|
getParserCss: generateParserCss(ctx),
|
|
3623
|
+
//
|
|
3614
3624
|
messages: getMessages(ctx),
|
|
3615
3625
|
parserOptions: {
|
|
3616
3626
|
importMap: getImportMap(config.outdir.replace(relativeBaseUrl, ""), config.importMap),
|
package/dist/index.mjs
CHANGED
|
@@ -142,7 +142,7 @@ var generateGlobalCss = (ctx) => {
|
|
|
142
142
|
});
|
|
143
143
|
sheet.processGlobalCss(globalCss);
|
|
144
144
|
const output = sheet.toCss({ optimize });
|
|
145
|
-
ctx.hooks.callHook("generator:css", "global.css", output);
|
|
145
|
+
void ctx.hooks.callHook("generator:css", "global.css", output);
|
|
146
146
|
return output;
|
|
147
147
|
};
|
|
148
148
|
|
|
@@ -167,7 +167,7 @@ function generateKeyframeCss(ctx) {
|
|
|
167
167
|
nodes: root.nodes
|
|
168
168
|
});
|
|
169
169
|
const output = rule.toString();
|
|
170
|
-
ctx.hooks.callHook("generator:css", "keyframes.css", output);
|
|
170
|
+
void ctx.hooks.callHook("generator:css", "keyframes.css", output);
|
|
171
171
|
return output;
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -381,7 +381,7 @@ function generateResetCss(ctx, scope = "") {
|
|
|
381
381
|
outline: auto;
|
|
382
382
|
}
|
|
383
383
|
}`;
|
|
384
|
-
ctx.hooks.callHook("generator:css", "reset.css", output);
|
|
384
|
+
void ctx.hooks.callHook("generator:css", "reset.css", output);
|
|
385
385
|
return output;
|
|
386
386
|
}
|
|
387
387
|
|
|
@@ -420,7 +420,7 @@ var generateStaticCss = (ctx) => {
|
|
|
420
420
|
});
|
|
421
421
|
});
|
|
422
422
|
const output = sheet.toCss({ optimize });
|
|
423
|
-
ctx.hooks.callHook("generator:css", "static.css", output);
|
|
423
|
+
void ctx.hooks.callHook("generator:css", "static.css", output);
|
|
424
424
|
return output;
|
|
425
425
|
};
|
|
426
426
|
|
|
@@ -461,7 +461,7 @@ function generateTokenCss(ctx) {
|
|
|
461
461
|
${prettifyCss(cleanupSelectors(css2, root))}
|
|
462
462
|
}
|
|
463
463
|
`;
|
|
464
|
-
ctx.hooks.callHook("generator:css", "tokens.css", output);
|
|
464
|
+
void ctx.hooks.callHook("generator:css", "tokens.css", output);
|
|
465
465
|
return output;
|
|
466
466
|
}
|
|
467
467
|
function getDeepestRule(root, selectors) {
|
|
@@ -1084,7 +1084,7 @@ function generateRecipes(ctx) {
|
|
|
1084
1084
|
const ${baseName}CompoundVariants = ${stringify2(compoundVariants ?? [])}
|
|
1085
1085
|
|
|
1086
1086
|
const ${baseName}SlotNames = ${stringify2(config2.slots.map((slot) => [slot, `${config2.className}__${slot}`]))}
|
|
1087
|
-
const ${baseName}SlotFns = ${baseName}SlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, ${baseName}DefaultVariants, getSlotCompoundVariant(${baseName}CompoundVariants, slotName))])
|
|
1087
|
+
const ${baseName}SlotFns = /* @__PURE__ */ ${baseName}SlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, ${baseName}DefaultVariants, getSlotCompoundVariant(${baseName}CompoundVariants, slotName))])
|
|
1088
1088
|
|
|
1089
1089
|
const ${baseName}Fn = (props = {}) => {
|
|
1090
1090
|
return Object.fromEntries(${baseName}SlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
@@ -1092,7 +1092,7 @@ function generateRecipes(ctx) {
|
|
|
1092
1092
|
|
|
1093
1093
|
const ${baseName}VariantKeys = ${stringify2(Object.keys(variantKeyMap))}
|
|
1094
1094
|
|
|
1095
|
-
export const ${baseName} = Object.assign(${baseName}Fn, {
|
|
1095
|
+
export const ${baseName} = /* @__PURE__ */ Object.assign(${baseName}Fn, {
|
|
1096
1096
|
__recipe__: false,
|
|
1097
1097
|
__name__: '${baseName}',
|
|
1098
1098
|
raw: (props) => props,
|
|
@@ -1108,13 +1108,15 @@ function generateRecipes(ctx) {
|
|
|
1108
1108
|
${ctx.file.import("splitProps", "../helpers")}
|
|
1109
1109
|
${ctx.file.import("createRecipe", "./create-recipe")}
|
|
1110
1110
|
|
|
1111
|
-
const ${baseName}Fn = createRecipe('${config2.className}', ${stringify2(
|
|
1112
|
-
|
|
1113
|
-
)})
|
|
1111
|
+
const ${baseName}Fn = /* @__PURE__ */ createRecipe('${config2.className}', ${stringify2(
|
|
1112
|
+
defaultVariants ?? {}
|
|
1113
|
+
)}, ${stringify2(compoundVariants ?? [])})
|
|
1114
1114
|
|
|
1115
1115
|
const ${baseName}VariantMap = ${stringify2(variantKeyMap)}
|
|
1116
|
+
|
|
1116
1117
|
const ${baseName}VariantKeys = Object.keys(${baseName}VariantMap)
|
|
1117
|
-
|
|
1118
|
+
|
|
1119
|
+
export const ${baseName} = /* @__PURE__ */ Object.assign(${baseName}Fn, {
|
|
1118
1120
|
__recipe__: true,
|
|
1119
1121
|
__name__: '${baseName}',
|
|
1120
1122
|
raw: (props) => props,
|
|
@@ -1410,7 +1412,7 @@ export interface ${componentName}<T extends ElementType, P extends Dict = {}> {
|
|
|
1410
1412
|
displayName?: string
|
|
1411
1413
|
}
|
|
1412
1414
|
|
|
1413
|
-
interface RecipeFn
|
|
1415
|
+
interface RecipeFn { __type: any }
|
|
1414
1416
|
|
|
1415
1417
|
interface JsxFactoryOptions<TProps extends Dict> {
|
|
1416
1418
|
dataAttr?: boolean
|
|
@@ -1675,7 +1677,7 @@ export type ComponentProps<T extends ElementType> = T extends keyof QwikIntrinsi
|
|
|
1675
1677
|
|
|
1676
1678
|
type Dict = Record<string, unknown>
|
|
1677
1679
|
|
|
1678
|
-
export interface ${componentName}<T extends ElementType, P extends Dict = {}> extends Component<Assign<ComponentProps<T>, PatchedHTMLProps, Assign<JsxStyleProps, P
|
|
1680
|
+
export interface ${componentName}<T extends ElementType, P extends Dict = {}> extends Component<Assign<ComponentProps<T>, Assign<PatchedHTMLProps, Assign<JsxStyleProps, P>>>> {}
|
|
1679
1681
|
|
|
1680
1682
|
interface RecipeFn { __type: any }
|
|
1681
1683
|
|
|
@@ -2408,7 +2410,7 @@ function generateVueJsxFactory(ctx) {
|
|
|
2408
2410
|
return h(
|
|
2409
2411
|
props.as,
|
|
2410
2412
|
{
|
|
2411
|
-
...forwardedProps
|
|
2413
|
+
...forwardedProps,
|
|
2412
2414
|
...elementProps,
|
|
2413
2415
|
...normalizeHTMLProps(htmlProps),
|
|
2414
2416
|
class: classes.value,
|
|
@@ -2565,7 +2567,7 @@ export type ComponentProps<T extends ElementType> = T extends IntrinsicElement
|
|
|
2565
2567
|
JsxHTMLProps<ComponentProps<T>, Assign<JsxStyleProps, P>>
|
|
2566
2568
|
> {}
|
|
2567
2569
|
|
|
2568
|
-
interface RecipeFn
|
|
2570
|
+
interface RecipeFn { __type: any }
|
|
2569
2571
|
|
|
2570
2572
|
interface JsxFactoryOptions<TProps extends Dict> {
|
|
2571
2573
|
dataAttr?: boolean
|
|
@@ -3221,7 +3223,7 @@ var generateFlattenedCss = (ctx) => (options) => {
|
|
|
3221
3223
|
});
|
|
3222
3224
|
sheet.append(...files);
|
|
3223
3225
|
const output = sheet.toCss({ optimize: true, minify });
|
|
3224
|
-
ctx.hooks.callHook("generator:css", "styles.css", output);
|
|
3226
|
+
void ctx.hooks.callHook("generator:css", "styles.css", output);
|
|
3225
3227
|
return output;
|
|
3226
3228
|
};
|
|
3227
3229
|
|
|
@@ -3298,7 +3300,7 @@ var generateParserCss = (ctx) => (result) => pipe(
|
|
|
3298
3300
|
tryCatch(
|
|
3299
3301
|
({ sheet, result: result2, config: { minify, optimize } }) => {
|
|
3300
3302
|
const css2 = !result2.isEmpty() ? sheet.toCss({ minify, optimize }) : void 0;
|
|
3301
|
-
ctx.hooks.callHook("parser:css", result2.filePath ?? "", css2);
|
|
3303
|
+
void ctx.hooks.callHook("parser:css", result2.filePath ?? "", css2);
|
|
3302
3304
|
return css2;
|
|
3303
3305
|
},
|
|
3304
3306
|
(err) => {
|
|
@@ -3584,8 +3586,16 @@ var createGenerator = (conf) => {
|
|
|
3584
3586
|
return {
|
|
3585
3587
|
...ctx,
|
|
3586
3588
|
getArtifacts: generateArtifacts(ctx),
|
|
3589
|
+
//
|
|
3590
|
+
getStaticCss: generateStaticCss,
|
|
3591
|
+
getResetCss: generateResetCss,
|
|
3592
|
+
getTokenCss: generateTokenCss,
|
|
3593
|
+
getKeyframeCss: generateKeyframeCss,
|
|
3594
|
+
getGlobalCss: generateGlobalCss,
|
|
3595
|
+
//
|
|
3587
3596
|
getCss: generateFlattenedCss(ctx),
|
|
3588
3597
|
getParserCss: generateParserCss(ctx),
|
|
3598
|
+
//
|
|
3589
3599
|
messages: getMessages(ctx),
|
|
3590
3600
|
parserOptions: {
|
|
3591
3601
|
importMap: getImportMap(config.outdir.replace(relativeBaseUrl, ""), config.importMap),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/generator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "The css generator for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"pluralize": "8.0.0",
|
|
21
21
|
"postcss": "8.4.27",
|
|
22
22
|
"ts-pattern": "5.0.5",
|
|
23
|
-
"@pandacss/core": "0.
|
|
24
|
-
"@pandacss/is-valid-prop": "0.
|
|
25
|
-
"@pandacss/logger": "0.
|
|
26
|
-
"@pandacss/shared": "0.
|
|
27
|
-
"@pandacss/token-dictionary": "0.
|
|
28
|
-
"@pandacss/types": "0.
|
|
23
|
+
"@pandacss/core": "0.16.0",
|
|
24
|
+
"@pandacss/is-valid-prop": "0.16.0",
|
|
25
|
+
"@pandacss/logger": "0.16.0",
|
|
26
|
+
"@pandacss/shared": "0.16.0",
|
|
27
|
+
"@pandacss/token-dictionary": "0.16.0",
|
|
28
|
+
"@pandacss/types": "0.16.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/pluralize": "0.0.30",
|
|
32
32
|
"hookable": "5.5.3",
|
|
33
|
-
"@pandacss/fixture": "0.
|
|
33
|
+
"@pandacss/fixture": "0.16.0"
|
|
34
34
|
},
|
|
35
35
|
"scripts": {
|
|
36
36
|
"prebuild": "tsx scripts/prebuild.ts",
|