@pandacss/node 0.0.0-dev-20230122145009 → 0.0.0-dev-20230124104736
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 +27 -16
- package/dist/index.js +294 -209
- package/dist/index.mjs +293 -209
- 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;
|
|
@@ -70,9 +71,9 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
70
71
|
reloadSourceFile: (file: string) => void;
|
|
71
72
|
removeSourceFile: (file: string) => boolean | undefined;
|
|
72
73
|
parseSourceFile: (sourceFile: ts_morph.SourceFile | undefined) => Collector | undefined;
|
|
73
|
-
getPath: (
|
|
74
|
+
getPath: (pathLike?: string) => string;
|
|
74
75
|
paths: {
|
|
75
|
-
|
|
76
|
+
root: string;
|
|
76
77
|
css: string;
|
|
77
78
|
token: string;
|
|
78
79
|
types: string;
|
|
@@ -86,9 +87,11 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
86
87
|
file: string;
|
|
87
88
|
code: string | undefined;
|
|
88
89
|
}>) => Promise<void[]>;
|
|
89
|
-
writeOutput: (output: Output) => Promise<void[]
|
|
90
|
+
writeOutput: (output: Output) => Promise<void[]> | undefined;
|
|
90
91
|
cleanOutdir: () => Promise<void>;
|
|
91
|
-
|
|
92
|
+
getExt: (file: string) => string;
|
|
93
|
+
getImport: (items: string, mod: string) => string;
|
|
94
|
+
getExport: (mod: string) => string;
|
|
92
95
|
cssVarRoot: string;
|
|
93
96
|
tokens: TokenDictionary;
|
|
94
97
|
hasTokens: boolean;
|
|
@@ -148,6 +151,7 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
148
151
|
static?: _pandacss_types.StaticCssOptions | undefined;
|
|
149
152
|
minify?: boolean | undefined;
|
|
150
153
|
utilities?: _pandacss_types.UtilityConfig | undefined;
|
|
154
|
+
emitPackage?: boolean | undefined;
|
|
151
155
|
gitignore?: boolean | undefined;
|
|
152
156
|
studio?: Partial<_pandacss_types_dist_config.Studio> | undefined;
|
|
153
157
|
logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
|
|
@@ -167,7 +171,8 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
167
171
|
type PandaContext = ReturnType<typeof createContext>;
|
|
168
172
|
|
|
169
173
|
declare function emitArtifacts(ctx: PandaContext): Promise<string>;
|
|
170
|
-
declare function emitAndExtract(ctx: PandaContext): Promise<
|
|
174
|
+
declare function emitAndExtract(ctx: PandaContext): Promise<string>;
|
|
175
|
+
declare function extractCss(ctx: PandaContext): Promise<string>;
|
|
171
176
|
|
|
172
177
|
declare class Builder {
|
|
173
178
|
/**
|
|
@@ -224,9 +229,9 @@ declare class Builder {
|
|
|
224
229
|
reloadSourceFile: (file: string) => void;
|
|
225
230
|
removeSourceFile: (file: string) => boolean | undefined;
|
|
226
231
|
parseSourceFile: (sourceFile: ts_morph.SourceFile | undefined) => _pandacss_parser.Collector | undefined;
|
|
227
|
-
getPath: (
|
|
232
|
+
getPath: (pathLike?: string | undefined) => string;
|
|
228
233
|
paths: {
|
|
229
|
-
|
|
234
|
+
root: string;
|
|
230
235
|
css: string;
|
|
231
236
|
token: string;
|
|
232
237
|
types: string;
|
|
@@ -240,9 +245,11 @@ declare class Builder {
|
|
|
240
245
|
file: string;
|
|
241
246
|
code: string | undefined;
|
|
242
247
|
}[]) => Promise<void[]>;
|
|
243
|
-
writeOutput: (output: Output) => Promise<void[]
|
|
248
|
+
writeOutput: (output: Output) => Promise<void[]> | undefined;
|
|
244
249
|
cleanOutdir: () => Promise<void>;
|
|
245
|
-
|
|
250
|
+
getExt: (file: string) => string;
|
|
251
|
+
getImport: (items: string, mod: string) => string;
|
|
252
|
+
getExport: (mod: string) => string;
|
|
246
253
|
cssVarRoot: string;
|
|
247
254
|
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
248
255
|
hasTokens: boolean;
|
|
@@ -302,6 +309,7 @@ declare class Builder {
|
|
|
302
309
|
static?: _pandacss_types.StaticCssOptions | undefined;
|
|
303
310
|
minify?: boolean | undefined;
|
|
304
311
|
utilities?: _pandacss_types.UtilityConfig | undefined;
|
|
312
|
+
emitPackage?: boolean | undefined;
|
|
305
313
|
gitignore?: boolean | undefined;
|
|
306
314
|
studio?: Partial<_pandacss_types_dist_config.Studio> | undefined;
|
|
307
315
|
logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
|
|
@@ -371,9 +379,9 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
371
379
|
reloadSourceFile: (file: string) => void;
|
|
372
380
|
removeSourceFile: (file: string) => boolean | undefined;
|
|
373
381
|
parseSourceFile: (sourceFile: ts_morph.SourceFile | undefined) => _pandacss_parser.Collector | undefined;
|
|
374
|
-
getPath: (
|
|
382
|
+
getPath: (pathLike?: string | undefined) => string;
|
|
375
383
|
paths: {
|
|
376
|
-
|
|
384
|
+
root: string;
|
|
377
385
|
css: string;
|
|
378
386
|
token: string;
|
|
379
387
|
types: string;
|
|
@@ -387,9 +395,11 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
387
395
|
file: string;
|
|
388
396
|
code: string | undefined;
|
|
389
397
|
}[]) => Promise<void[]>;
|
|
390
|
-
writeOutput: (output: Output) => Promise<void[]
|
|
398
|
+
writeOutput: (output: Output) => Promise<void[]> | undefined;
|
|
391
399
|
cleanOutdir: () => Promise<void>;
|
|
392
|
-
|
|
400
|
+
getExt: (file: string) => string;
|
|
401
|
+
getImport: (items: string, mod: string) => string;
|
|
402
|
+
getExport: (mod: string) => string;
|
|
393
403
|
cssVarRoot: string;
|
|
394
404
|
tokens: _pandacss_token_dictionary.TokenDictionary;
|
|
395
405
|
hasTokens: boolean;
|
|
@@ -449,6 +459,7 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
449
459
|
static?: _pandacss_types.StaticCssOptions | undefined;
|
|
450
460
|
minify?: boolean | undefined;
|
|
451
461
|
utilities?: _pandacss_types.UtilityConfig | undefined;
|
|
462
|
+
emitPackage?: boolean | undefined;
|
|
452
463
|
gitignore?: boolean | undefined;
|
|
453
464
|
studio?: Partial<_pandacss_types_dist_config.Studio> | undefined;
|
|
454
465
|
logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
|
|
@@ -477,4 +488,4 @@ declare function setupConfig(cwd: string, { force }: {
|
|
|
477
488
|
}): Promise<void>;
|
|
478
489
|
declare function setupPostcss(cwd: string): Promise<void>;
|
|
479
490
|
|
|
480
|
-
export { Builder, createContext, emitAndExtract, emitArtifacts, execCommand, generate, loadConfigAndCreateContext, setupConfig, setupGitIgnore, setupPostcss };
|
|
491
|
+
export { Builder, createContext, emitAndExtract, emitArtifacts, execCommand, extractCss, generate, loadConfigAndCreateContext, setupConfig, setupGitIgnore, setupPostcss };
|