@pandacss/generator 0.21.0 → 0.22.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 +61 -66
- package/dist/index.d.ts +61 -66
- package/dist/index.js +902 -977
- package/dist/index.mjs +900 -974
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
2
|
-
import {
|
|
3
|
-
import { Utility, Recipes, Conditions,
|
|
2
|
+
import { UserConfig, PatternConfig, Dict, ArtifactFilters, ConfigResultWithHooks, RequiredBy, StudioOptions, HashOptions, PrefixOptions, Theme, CascadeLayers, TSConfig, ArtifactId, ParserResultType } from '@pandacss/types';
|
|
3
|
+
import { Utility, Recipes, Conditions, Layers, Stylesheet, RecipeContext, RecipeNode } from '@pandacss/core';
|
|
4
4
|
import { TokenDictionary } from '@pandacss/token-dictionary';
|
|
5
5
|
|
|
6
|
-
declare class
|
|
7
|
-
|
|
8
|
-
details: PatternDetail[];
|
|
6
|
+
declare class FileEngine {
|
|
7
|
+
private config;
|
|
9
8
|
constructor(config: UserConfig);
|
|
10
|
-
private
|
|
11
|
-
get
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
interface PatternNames {
|
|
23
|
-
upperName: string;
|
|
24
|
-
baseName: string;
|
|
25
|
-
dashName: string;
|
|
26
|
-
styleFnName: string;
|
|
27
|
-
jsxName: string;
|
|
28
|
-
}
|
|
29
|
-
interface PatternDetail extends PatternNames {
|
|
30
|
-
props: string[];
|
|
31
|
-
blocklistType: string;
|
|
32
|
-
config: PatternConfig;
|
|
33
|
-
type: 'pattern';
|
|
34
|
-
match: RegExp;
|
|
35
|
-
jsx: NonNullable<PatternConfig['jsx']>;
|
|
9
|
+
private get forceConsistentTypeExtension();
|
|
10
|
+
private get outExtension();
|
|
11
|
+
ext(file: string): string;
|
|
12
|
+
extDts(file: string): string;
|
|
13
|
+
private __extDts;
|
|
14
|
+
import(mod: string, file: string): string;
|
|
15
|
+
importType(mod: string, file: string): string;
|
|
16
|
+
exportType(mod: string, file: string): string;
|
|
17
|
+
exportStar(file: string): string;
|
|
18
|
+
exportTypeStar(file: string): string;
|
|
19
|
+
isTypeFile(file: string): boolean;
|
|
36
20
|
}
|
|
37
21
|
|
|
38
22
|
declare class JsxEngine {
|
|
@@ -61,25 +45,40 @@ declare class PathEngine {
|
|
|
61
45
|
get types(): string[];
|
|
62
46
|
get recipe(): string[];
|
|
63
47
|
get pattern(): string[];
|
|
64
|
-
get chunk(): string[];
|
|
65
48
|
get outCss(): string[];
|
|
66
49
|
get jsx(): string[];
|
|
67
50
|
}
|
|
68
51
|
|
|
69
|
-
declare class
|
|
70
|
-
|
|
52
|
+
declare class Patterns {
|
|
53
|
+
patterns: Record<string, PatternConfig>;
|
|
54
|
+
details: PatternDetail[];
|
|
71
55
|
constructor(config: UserConfig);
|
|
72
|
-
private
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
56
|
+
private createDetail;
|
|
57
|
+
get keys(): string[];
|
|
58
|
+
getConfig(name: string): PatternConfig;
|
|
59
|
+
transform(name: string, data: Dict): Dict;
|
|
60
|
+
getNames(name: string): PatternNames;
|
|
61
|
+
find: (jsxName: string) => string;
|
|
62
|
+
filter: (jsxName: string) => PatternDetail[];
|
|
63
|
+
isEmpty(): boolean;
|
|
64
|
+
saveOne(name: string, pattern: PatternConfig): void;
|
|
65
|
+
remove(name: string): void;
|
|
66
|
+
filterDetails(filters?: ArtifactFilters): PatternDetail[];
|
|
67
|
+
}
|
|
68
|
+
interface PatternNames {
|
|
69
|
+
upperName: string;
|
|
70
|
+
baseName: string;
|
|
71
|
+
dashName: string;
|
|
72
|
+
styleFnName: string;
|
|
73
|
+
jsxName: string;
|
|
74
|
+
}
|
|
75
|
+
interface PatternDetail extends PatternNames {
|
|
76
|
+
props: string[];
|
|
77
|
+
blocklistType: string;
|
|
78
|
+
config: PatternConfig;
|
|
79
|
+
type: 'pattern';
|
|
80
|
+
match: RegExp;
|
|
81
|
+
jsx: NonNullable<PatternConfig['jsx']>;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
declare class Context {
|
|
@@ -90,15 +89,13 @@ declare class Context {
|
|
|
90
89
|
recipes: Recipes;
|
|
91
90
|
conditions: Conditions;
|
|
92
91
|
patterns: Patterns;
|
|
92
|
+
layers: Layers;
|
|
93
93
|
jsx: JsxEngine;
|
|
94
94
|
paths: PathEngine;
|
|
95
95
|
file: FileEngine;
|
|
96
|
+
stylesheet: Stylesheet;
|
|
96
97
|
properties: Set<string>;
|
|
97
98
|
isValidProperty: (key: string) => boolean;
|
|
98
|
-
layers: CascadeLayers;
|
|
99
|
-
isValidLayerRule: (layerRule: string) => boolean;
|
|
100
|
-
layerString: string;
|
|
101
|
-
layerNames: string[];
|
|
102
99
|
constructor(conf: ConfigResultWithHooks);
|
|
103
100
|
get config(): UserConfig;
|
|
104
101
|
get hooks(): _pandacss_types.PandaHookable;
|
|
@@ -108,12 +105,12 @@ declare class Context {
|
|
|
108
105
|
createTokenDictionary(theme: Theme): TokenDictionary;
|
|
109
106
|
createUtility(config: UserConfig): Utility;
|
|
110
107
|
createConditions(config: UserConfig): Conditions;
|
|
108
|
+
createLayers(layers: CascadeLayers): Layers;
|
|
111
109
|
setupCompositions(theme: Theme): void;
|
|
112
|
-
setupLayers(layers: CascadeLayers): void;
|
|
113
110
|
setupProperties(): void;
|
|
114
|
-
|
|
115
|
-
createSheet(
|
|
116
|
-
createRecipes(theme: Theme, context:
|
|
111
|
+
private get baseSheetContext();
|
|
112
|
+
createSheet(): Stylesheet;
|
|
113
|
+
createRecipes(theme: Theme, context: RecipeContext): Recipes;
|
|
117
114
|
}
|
|
118
115
|
|
|
119
116
|
declare const artifactsGenerated: (ctx: Context) => () => string;
|
|
@@ -124,6 +121,7 @@ declare const noExtract: () => string;
|
|
|
124
121
|
declare const watch: () => string;
|
|
125
122
|
declare const configWatch: () => string;
|
|
126
123
|
declare const buildComplete: (count: number) => string;
|
|
124
|
+
declare const cssArtifactComplete: (type: string) => string;
|
|
127
125
|
declare const getMessages: (ctx: Context) => {
|
|
128
126
|
artifactsGenerated: () => string;
|
|
129
127
|
configExists: (cmd: string) => string;
|
|
@@ -133,6 +131,7 @@ declare const getMessages: (ctx: Context) => {
|
|
|
133
131
|
watch: () => string;
|
|
134
132
|
buildComplete: (count: number) => string;
|
|
135
133
|
configWatch: () => string;
|
|
134
|
+
cssArtifactComplete: (type: string) => string;
|
|
136
135
|
};
|
|
137
136
|
|
|
138
137
|
declare const messages_artifactsGenerated: typeof artifactsGenerated;
|
|
@@ -140,6 +139,7 @@ declare const messages_buildComplete: typeof buildComplete;
|
|
|
140
139
|
declare const messages_codegenComplete: typeof codegenComplete;
|
|
141
140
|
declare const messages_configExists: typeof configExists;
|
|
142
141
|
declare const messages_configWatch: typeof configWatch;
|
|
142
|
+
declare const messages_cssArtifactComplete: typeof cssArtifactComplete;
|
|
143
143
|
declare const messages_getMessages: typeof getMessages;
|
|
144
144
|
declare const messages_noExtract: typeof noExtract;
|
|
145
145
|
declare const messages_thankYou: typeof thankYou;
|
|
@@ -151,6 +151,7 @@ declare namespace messages {
|
|
|
151
151
|
messages_codegenComplete as codegenComplete,
|
|
152
152
|
messages_configExists as configExists,
|
|
153
153
|
messages_configWatch as configWatch,
|
|
154
|
+
messages_cssArtifactComplete as cssArtifactComplete,
|
|
154
155
|
messages_getMessages as getMessages,
|
|
155
156
|
messages_noExtract as noExtract,
|
|
156
157
|
messages_thankYou as thankYou,
|
|
@@ -158,11 +159,6 @@ declare namespace messages {
|
|
|
158
159
|
};
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
interface FlattenedCssOptions {
|
|
162
|
-
files: string[];
|
|
163
|
-
resolve?: boolean;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
162
|
interface ParserImportMap {
|
|
167
163
|
css: string[];
|
|
168
164
|
recipe: string[];
|
|
@@ -187,18 +183,17 @@ interface ParserOptions {
|
|
|
187
183
|
tsOptions: ConfigResultWithHooks['tsOptions'];
|
|
188
184
|
}
|
|
189
185
|
|
|
186
|
+
type CssArtifactType = 'preflight' | 'tokens' | 'static' | 'global' | 'keyframes';
|
|
190
187
|
declare class Generator extends Context {
|
|
191
188
|
messages: ReturnType<typeof getMessages>;
|
|
192
189
|
parserOptions: ParserOptions;
|
|
193
190
|
constructor(conf: ConfigResultWithHooks);
|
|
194
191
|
getArtifacts(ids?: ArtifactId[] | undefined): _pandacss_types.Artifact[];
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
getCss(options: FlattenedCssOptions): string;
|
|
201
|
-
getParserCss(result: ParserResultType): string | undefined;
|
|
192
|
+
appendCss(type: CssArtifactType): void;
|
|
193
|
+
appendLayerParams(): void;
|
|
194
|
+
appendBaselineCss(): void;
|
|
195
|
+
appendParserCss(...results: Array<ParserResultType | undefined>): void;
|
|
196
|
+
getCss(): string;
|
|
202
197
|
}
|
|
203
198
|
|
|
204
|
-
export { Generator, messages };
|
|
199
|
+
export { CssArtifactType, Generator, messages };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,38 +1,22 @@
|
|
|
1
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
2
|
-
import {
|
|
3
|
-
import { Utility, Recipes, Conditions,
|
|
2
|
+
import { UserConfig, PatternConfig, Dict, ArtifactFilters, ConfigResultWithHooks, RequiredBy, StudioOptions, HashOptions, PrefixOptions, Theme, CascadeLayers, TSConfig, ArtifactId, ParserResultType } from '@pandacss/types';
|
|
3
|
+
import { Utility, Recipes, Conditions, Layers, Stylesheet, RecipeContext, RecipeNode } from '@pandacss/core';
|
|
4
4
|
import { TokenDictionary } from '@pandacss/token-dictionary';
|
|
5
5
|
|
|
6
|
-
declare class
|
|
7
|
-
|
|
8
|
-
details: PatternDetail[];
|
|
6
|
+
declare class FileEngine {
|
|
7
|
+
private config;
|
|
9
8
|
constructor(config: UserConfig);
|
|
10
|
-
private
|
|
11
|
-
get
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
interface PatternNames {
|
|
23
|
-
upperName: string;
|
|
24
|
-
baseName: string;
|
|
25
|
-
dashName: string;
|
|
26
|
-
styleFnName: string;
|
|
27
|
-
jsxName: string;
|
|
28
|
-
}
|
|
29
|
-
interface PatternDetail extends PatternNames {
|
|
30
|
-
props: string[];
|
|
31
|
-
blocklistType: string;
|
|
32
|
-
config: PatternConfig;
|
|
33
|
-
type: 'pattern';
|
|
34
|
-
match: RegExp;
|
|
35
|
-
jsx: NonNullable<PatternConfig['jsx']>;
|
|
9
|
+
private get forceConsistentTypeExtension();
|
|
10
|
+
private get outExtension();
|
|
11
|
+
ext(file: string): string;
|
|
12
|
+
extDts(file: string): string;
|
|
13
|
+
private __extDts;
|
|
14
|
+
import(mod: string, file: string): string;
|
|
15
|
+
importType(mod: string, file: string): string;
|
|
16
|
+
exportType(mod: string, file: string): string;
|
|
17
|
+
exportStar(file: string): string;
|
|
18
|
+
exportTypeStar(file: string): string;
|
|
19
|
+
isTypeFile(file: string): boolean;
|
|
36
20
|
}
|
|
37
21
|
|
|
38
22
|
declare class JsxEngine {
|
|
@@ -61,25 +45,40 @@ declare class PathEngine {
|
|
|
61
45
|
get types(): string[];
|
|
62
46
|
get recipe(): string[];
|
|
63
47
|
get pattern(): string[];
|
|
64
|
-
get chunk(): string[];
|
|
65
48
|
get outCss(): string[];
|
|
66
49
|
get jsx(): string[];
|
|
67
50
|
}
|
|
68
51
|
|
|
69
|
-
declare class
|
|
70
|
-
|
|
52
|
+
declare class Patterns {
|
|
53
|
+
patterns: Record<string, PatternConfig>;
|
|
54
|
+
details: PatternDetail[];
|
|
71
55
|
constructor(config: UserConfig);
|
|
72
|
-
private
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
56
|
+
private createDetail;
|
|
57
|
+
get keys(): string[];
|
|
58
|
+
getConfig(name: string): PatternConfig;
|
|
59
|
+
transform(name: string, data: Dict): Dict;
|
|
60
|
+
getNames(name: string): PatternNames;
|
|
61
|
+
find: (jsxName: string) => string;
|
|
62
|
+
filter: (jsxName: string) => PatternDetail[];
|
|
63
|
+
isEmpty(): boolean;
|
|
64
|
+
saveOne(name: string, pattern: PatternConfig): void;
|
|
65
|
+
remove(name: string): void;
|
|
66
|
+
filterDetails(filters?: ArtifactFilters): PatternDetail[];
|
|
67
|
+
}
|
|
68
|
+
interface PatternNames {
|
|
69
|
+
upperName: string;
|
|
70
|
+
baseName: string;
|
|
71
|
+
dashName: string;
|
|
72
|
+
styleFnName: string;
|
|
73
|
+
jsxName: string;
|
|
74
|
+
}
|
|
75
|
+
interface PatternDetail extends PatternNames {
|
|
76
|
+
props: string[];
|
|
77
|
+
blocklistType: string;
|
|
78
|
+
config: PatternConfig;
|
|
79
|
+
type: 'pattern';
|
|
80
|
+
match: RegExp;
|
|
81
|
+
jsx: NonNullable<PatternConfig['jsx']>;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
84
|
declare class Context {
|
|
@@ -90,15 +89,13 @@ declare class Context {
|
|
|
90
89
|
recipes: Recipes;
|
|
91
90
|
conditions: Conditions;
|
|
92
91
|
patterns: Patterns;
|
|
92
|
+
layers: Layers;
|
|
93
93
|
jsx: JsxEngine;
|
|
94
94
|
paths: PathEngine;
|
|
95
95
|
file: FileEngine;
|
|
96
|
+
stylesheet: Stylesheet;
|
|
96
97
|
properties: Set<string>;
|
|
97
98
|
isValidProperty: (key: string) => boolean;
|
|
98
|
-
layers: CascadeLayers;
|
|
99
|
-
isValidLayerRule: (layerRule: string) => boolean;
|
|
100
|
-
layerString: string;
|
|
101
|
-
layerNames: string[];
|
|
102
99
|
constructor(conf: ConfigResultWithHooks);
|
|
103
100
|
get config(): UserConfig;
|
|
104
101
|
get hooks(): _pandacss_types.PandaHookable;
|
|
@@ -108,12 +105,12 @@ declare class Context {
|
|
|
108
105
|
createTokenDictionary(theme: Theme): TokenDictionary;
|
|
109
106
|
createUtility(config: UserConfig): Utility;
|
|
110
107
|
createConditions(config: UserConfig): Conditions;
|
|
108
|
+
createLayers(layers: CascadeLayers): Layers;
|
|
111
109
|
setupCompositions(theme: Theme): void;
|
|
112
|
-
setupLayers(layers: CascadeLayers): void;
|
|
113
110
|
setupProperties(): void;
|
|
114
|
-
|
|
115
|
-
createSheet(
|
|
116
|
-
createRecipes(theme: Theme, context:
|
|
111
|
+
private get baseSheetContext();
|
|
112
|
+
createSheet(): Stylesheet;
|
|
113
|
+
createRecipes(theme: Theme, context: RecipeContext): Recipes;
|
|
117
114
|
}
|
|
118
115
|
|
|
119
116
|
declare const artifactsGenerated: (ctx: Context) => () => string;
|
|
@@ -124,6 +121,7 @@ declare const noExtract: () => string;
|
|
|
124
121
|
declare const watch: () => string;
|
|
125
122
|
declare const configWatch: () => string;
|
|
126
123
|
declare const buildComplete: (count: number) => string;
|
|
124
|
+
declare const cssArtifactComplete: (type: string) => string;
|
|
127
125
|
declare const getMessages: (ctx: Context) => {
|
|
128
126
|
artifactsGenerated: () => string;
|
|
129
127
|
configExists: (cmd: string) => string;
|
|
@@ -133,6 +131,7 @@ declare const getMessages: (ctx: Context) => {
|
|
|
133
131
|
watch: () => string;
|
|
134
132
|
buildComplete: (count: number) => string;
|
|
135
133
|
configWatch: () => string;
|
|
134
|
+
cssArtifactComplete: (type: string) => string;
|
|
136
135
|
};
|
|
137
136
|
|
|
138
137
|
declare const messages_artifactsGenerated: typeof artifactsGenerated;
|
|
@@ -140,6 +139,7 @@ declare const messages_buildComplete: typeof buildComplete;
|
|
|
140
139
|
declare const messages_codegenComplete: typeof codegenComplete;
|
|
141
140
|
declare const messages_configExists: typeof configExists;
|
|
142
141
|
declare const messages_configWatch: typeof configWatch;
|
|
142
|
+
declare const messages_cssArtifactComplete: typeof cssArtifactComplete;
|
|
143
143
|
declare const messages_getMessages: typeof getMessages;
|
|
144
144
|
declare const messages_noExtract: typeof noExtract;
|
|
145
145
|
declare const messages_thankYou: typeof thankYou;
|
|
@@ -151,6 +151,7 @@ declare namespace messages {
|
|
|
151
151
|
messages_codegenComplete as codegenComplete,
|
|
152
152
|
messages_configExists as configExists,
|
|
153
153
|
messages_configWatch as configWatch,
|
|
154
|
+
messages_cssArtifactComplete as cssArtifactComplete,
|
|
154
155
|
messages_getMessages as getMessages,
|
|
155
156
|
messages_noExtract as noExtract,
|
|
156
157
|
messages_thankYou as thankYou,
|
|
@@ -158,11 +159,6 @@ declare namespace messages {
|
|
|
158
159
|
};
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
interface FlattenedCssOptions {
|
|
162
|
-
files: string[];
|
|
163
|
-
resolve?: boolean;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
162
|
interface ParserImportMap {
|
|
167
163
|
css: string[];
|
|
168
164
|
recipe: string[];
|
|
@@ -187,18 +183,17 @@ interface ParserOptions {
|
|
|
187
183
|
tsOptions: ConfigResultWithHooks['tsOptions'];
|
|
188
184
|
}
|
|
189
185
|
|
|
186
|
+
type CssArtifactType = 'preflight' | 'tokens' | 'static' | 'global' | 'keyframes';
|
|
190
187
|
declare class Generator extends Context {
|
|
191
188
|
messages: ReturnType<typeof getMessages>;
|
|
192
189
|
parserOptions: ParserOptions;
|
|
193
190
|
constructor(conf: ConfigResultWithHooks);
|
|
194
191
|
getArtifacts(ids?: ArtifactId[] | undefined): _pandacss_types.Artifact[];
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
getCss(options: FlattenedCssOptions): string;
|
|
201
|
-
getParserCss(result: ParserResultType): string | undefined;
|
|
192
|
+
appendCss(type: CssArtifactType): void;
|
|
193
|
+
appendLayerParams(): void;
|
|
194
|
+
appendBaselineCss(): void;
|
|
195
|
+
appendParserCss(...results: Array<ParserResultType | undefined>): void;
|
|
196
|
+
getCss(): string;
|
|
202
197
|
}
|
|
203
198
|
|
|
204
|
-
export { Generator, messages };
|
|
199
|
+
export { CssArtifactType, Generator, messages };
|