@pandacss/node 0.0.0-dev-20230122145009 → 0.0.0-dev-20230125073613
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.ts +33 -19
- package/dist/index.js +357 -263
- package/dist/index.mjs +356 -263
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -21,13 +21,14 @@ type IO = {
|
|
|
21
21
|
write(id: string, content: string): Promise<void>;
|
|
22
22
|
rm(id: string): Promise<void>;
|
|
23
23
|
};
|
|
24
|
-
type
|
|
24
|
+
type Nullable<T> = T | null | undefined;
|
|
25
|
+
type Output = Nullable<{
|
|
25
26
|
dir?: string;
|
|
26
27
|
files: Array<{
|
|
27
28
|
file: string;
|
|
28
29
|
code: string | undefined;
|
|
29
30
|
}>;
|
|
30
|
-
}
|
|
31
|
+
}>;
|
|
31
32
|
declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
32
33
|
theme: {
|
|
33
34
|
breakpoints?: Dict<any> | undefined;
|
|
@@ -49,6 +50,7 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
49
50
|
format(file: string): string;
|
|
50
51
|
write(file: string, css: string): Promise<void[]>;
|
|
51
52
|
rm(file: string): Promise<void>;
|
|
53
|
+
empty(): Promise<void>;
|
|
52
54
|
glob: string[];
|
|
53
55
|
};
|
|
54
56
|
files: string[];
|
|
@@ -70,9 +72,9 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
70
72
|
reloadSourceFile: (file: string) => void;
|
|
71
73
|
removeSourceFile: (file: string) => boolean | undefined;
|
|
72
74
|
parseSourceFile: (sourceFile: ts_morph.SourceFile | undefined) => Collector | undefined;
|
|
73
|
-
getPath: (
|
|
75
|
+
getPath: (pathLike?: string) => string;
|
|
74
76
|
paths: {
|
|
75
|
-
|
|
77
|
+
root: string;
|
|
76
78
|
css: string;
|
|
77
79
|
token: string;
|
|
78
80
|
types: string;
|
|
@@ -86,9 +88,11 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
86
88
|
file: string;
|
|
87
89
|
code: string | undefined;
|
|
88
90
|
}>) => Promise<void[]>;
|
|
89
|
-
writeOutput: (output: Output) => Promise<void[]
|
|
91
|
+
writeOutput: (output: Output) => Promise<void[]> | undefined;
|
|
90
92
|
cleanOutdir: () => Promise<void>;
|
|
91
|
-
|
|
93
|
+
getExt: (file: string) => string;
|
|
94
|
+
getImport: (items: string, mod: string) => string;
|
|
95
|
+
getExport: (mod: string) => string;
|
|
92
96
|
cssVarRoot: string;
|
|
93
97
|
tokens: TokenDictionary;
|
|
94
98
|
hasTokens: boolean;
|
|
@@ -144,17 +148,18 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
144
148
|
file: string;
|
|
145
149
|
} | undefined)[]>;
|
|
146
150
|
hash?: boolean | undefined;
|
|
151
|
+
prefix?: string | undefined;
|
|
147
152
|
separator?: "-" | "_" | "=" | undefined;
|
|
148
153
|
static?: _pandacss_types.StaticCssOptions | undefined;
|
|
149
154
|
minify?: boolean | undefined;
|
|
150
155
|
utilities?: _pandacss_types.UtilityConfig | undefined;
|
|
156
|
+
emitPackage?: boolean | undefined;
|
|
151
157
|
gitignore?: boolean | undefined;
|
|
152
158
|
studio?: Partial<_pandacss_types_dist_config.Studio> | undefined;
|
|
153
159
|
logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
|
|
154
160
|
presets?: string[] | undefined;
|
|
155
161
|
preflight?: boolean | undefined;
|
|
156
162
|
clean?: boolean | undefined;
|
|
157
|
-
cssVarPrefix?: string | undefined;
|
|
158
163
|
watch?: boolean | undefined;
|
|
159
164
|
poll?: boolean | undefined;
|
|
160
165
|
globalCss?: _pandacss_types.GlobalStyleObject | undefined;
|
|
@@ -167,7 +172,8 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
167
172
|
type PandaContext = ReturnType<typeof createContext>;
|
|
168
173
|
|
|
169
174
|
declare function emitArtifacts(ctx: PandaContext): Promise<string>;
|
|
170
|
-
declare function emitAndExtract(ctx: PandaContext): Promise<
|
|
175
|
+
declare function emitAndExtract(ctx: PandaContext): Promise<string>;
|
|
176
|
+
declare function extractCss(ctx: PandaContext): Promise<string>;
|
|
171
177
|
|
|
172
178
|
declare class Builder {
|
|
173
179
|
/**
|
|
@@ -203,6 +209,7 @@ declare class Builder {
|
|
|
203
209
|
format(file: string): string;
|
|
204
210
|
write(file: string, css: string): Promise<void[]>;
|
|
205
211
|
rm(file: string): Promise<void>;
|
|
212
|
+
empty(): Promise<void>;
|
|
206
213
|
glob: string[];
|
|
207
214
|
};
|
|
208
215
|
files: string[];
|
|
@@ -224,9 +231,9 @@ declare class Builder {
|
|
|
224
231
|
reloadSourceFile: (file: string) => void;
|
|
225
232
|
removeSourceFile: (file: string) => boolean | undefined;
|
|
226
233
|
parseSourceFile: (sourceFile: ts_morph.SourceFile | undefined) => _pandacss_parser.Collector | undefined;
|
|
227
|
-
getPath: (
|
|
234
|
+
getPath: (pathLike?: string | undefined) => string;
|
|
228
235
|
paths: {
|
|
229
|
-
|
|
236
|
+
root: string;
|
|
230
237
|
css: string;
|
|
231
238
|
token: string;
|
|
232
239
|
types: string;
|
|
@@ -240,9 +247,11 @@ declare class Builder {
|
|
|
240
247
|
file: string;
|
|
241
248
|
code: string | undefined;
|
|
242
249
|
}[]) => Promise<void[]>;
|
|
243
|
-
writeOutput: (output: Output) => Promise<void[]
|
|
250
|
+
writeOutput: (output: Output) => Promise<void[]> | undefined;
|
|
244
251
|
cleanOutdir: () => Promise<void>;
|
|
245
|
-
|
|
252
|
+
getExt: (file: string) => string;
|
|
253
|
+
getImport: (items: string, mod: string) => string;
|
|
254
|
+
getExport: (mod: string) => string;
|
|
246
255
|
cssVarRoot: string;
|
|
247
256
|
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
248
257
|
hasTokens: boolean;
|
|
@@ -298,17 +307,18 @@ declare class Builder {
|
|
|
298
307
|
file: string;
|
|
299
308
|
} | undefined)[]>;
|
|
300
309
|
hash?: boolean | undefined;
|
|
310
|
+
prefix?: string | undefined;
|
|
301
311
|
separator?: "-" | "_" | "=" | undefined;
|
|
302
312
|
static?: _pandacss_types.StaticCssOptions | undefined;
|
|
303
313
|
minify?: boolean | undefined;
|
|
304
314
|
utilities?: _pandacss_types.UtilityConfig | undefined;
|
|
315
|
+
emitPackage?: boolean | undefined;
|
|
305
316
|
gitignore?: boolean | undefined;
|
|
306
317
|
studio?: Partial<_pandacss_types_dist_config.Studio> | undefined;
|
|
307
318
|
logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
|
|
308
319
|
presets?: string[] | undefined;
|
|
309
320
|
preflight?: boolean | undefined;
|
|
310
321
|
clean?: boolean | undefined;
|
|
311
|
-
cssVarPrefix?: string | undefined;
|
|
312
322
|
watch?: boolean | undefined;
|
|
313
323
|
poll?: boolean | undefined;
|
|
314
324
|
globalCss?: _pandacss_types.GlobalStyleObject | undefined;
|
|
@@ -350,6 +360,7 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
350
360
|
format(file: string): string;
|
|
351
361
|
write(file: string, css: string): Promise<void[]>;
|
|
352
362
|
rm(file: string): Promise<void>;
|
|
363
|
+
empty(): Promise<void>;
|
|
353
364
|
glob: string[];
|
|
354
365
|
};
|
|
355
366
|
files: string[];
|
|
@@ -371,9 +382,9 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
371
382
|
reloadSourceFile: (file: string) => void;
|
|
372
383
|
removeSourceFile: (file: string) => boolean | undefined;
|
|
373
384
|
parseSourceFile: (sourceFile: ts_morph.SourceFile | undefined) => _pandacss_parser.Collector | undefined;
|
|
374
|
-
getPath: (
|
|
385
|
+
getPath: (pathLike?: string | undefined) => string;
|
|
375
386
|
paths: {
|
|
376
|
-
|
|
387
|
+
root: string;
|
|
377
388
|
css: string;
|
|
378
389
|
token: string;
|
|
379
390
|
types: string;
|
|
@@ -387,9 +398,11 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
387
398
|
file: string;
|
|
388
399
|
code: string | undefined;
|
|
389
400
|
}[]) => Promise<void[]>;
|
|
390
|
-
writeOutput: (output: Output) => Promise<void[]
|
|
401
|
+
writeOutput: (output: Output) => Promise<void[]> | undefined;
|
|
391
402
|
cleanOutdir: () => Promise<void>;
|
|
392
|
-
|
|
403
|
+
getExt: (file: string) => string;
|
|
404
|
+
getImport: (items: string, mod: string) => string;
|
|
405
|
+
getExport: (mod: string) => string;
|
|
393
406
|
cssVarRoot: string;
|
|
394
407
|
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
395
408
|
hasTokens: boolean;
|
|
@@ -445,17 +458,18 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
445
458
|
file: string;
|
|
446
459
|
} | undefined)[]>;
|
|
447
460
|
hash?: boolean | undefined;
|
|
461
|
+
prefix?: string | undefined;
|
|
448
462
|
separator?: "-" | "_" | "=" | undefined;
|
|
449
463
|
static?: _pandacss_types.StaticCssOptions | undefined;
|
|
450
464
|
minify?: boolean | undefined;
|
|
451
465
|
utilities?: _pandacss_types.UtilityConfig | undefined;
|
|
466
|
+
emitPackage?: boolean | undefined;
|
|
452
467
|
gitignore?: boolean | undefined;
|
|
453
468
|
studio?: Partial<_pandacss_types_dist_config.Studio> | undefined;
|
|
454
469
|
logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
|
|
455
470
|
presets?: string[] | undefined;
|
|
456
471
|
preflight?: boolean | undefined;
|
|
457
472
|
clean?: boolean | undefined;
|
|
458
|
-
cssVarPrefix?: string | undefined;
|
|
459
473
|
watch?: boolean | undefined;
|
|
460
474
|
poll?: boolean | undefined;
|
|
461
475
|
globalCss?: _pandacss_types.GlobalStyleObject | undefined;
|
|
@@ -477,4 +491,4 @@ declare function setupConfig(cwd: string, { force }: {
|
|
|
477
491
|
}): Promise<void>;
|
|
478
492
|
declare function setupPostcss(cwd: string): Promise<void>;
|
|
479
493
|
|
|
480
|
-
export { Builder, createContext, emitAndExtract, emitArtifacts, execCommand, generate, loadConfigAndCreateContext, setupConfig, setupGitIgnore, setupPostcss };
|
|
494
|
+
export { Builder, createContext, emitAndExtract, emitArtifacts, execCommand, extractCss, generate, loadConfigAndCreateContext, setupConfig, setupGitIgnore, setupPostcss };
|