@pandacss/types 0.17.0 → 0.17.2

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/config.d.ts DELETED
@@ -1,345 +0,0 @@
1
- import type { TSConfig } from 'pkg-types'
2
- import type { Conditions, ExtendableConditions } from './conditions'
3
- import type { PandaHooks } from './hooks'
4
- import type { PatternConfig } from './pattern'
5
- import type { RequiredBy } from './shared'
6
- import type { StaticCssOptions } from './static-css'
7
- import type { ExtendableGlobalStyleObject, GlobalStyleObject } from './system-types'
8
- import type { ExtendableTheme, Theme } from './theme'
9
- import type { ExtendableUtilityConfig, UtilityConfig } from './utility'
10
-
11
- export type { TSConfig }
12
-
13
- export type CascadeLayer = 'reset' | 'base' | 'tokens' | 'recipes' | 'utilities'
14
-
15
- export type CascadeLayers = Record<CascadeLayer, string>
16
-
17
- interface StudioOptions {
18
- /**
19
- * Used to customize the design system studio
20
- * @default { title: 'Panda', logo: '🐼' }
21
- */
22
- studio?: {
23
- /**
24
- * The output directory for the design system studio when the build command is run.
25
- */
26
- outdir?: string
27
- /**
28
- * The logo url for the design system studio.
29
- */
30
- logo?: string
31
- /**
32
- * Used to inject custom html into the head or body of the studio
33
- */
34
- inject?: {
35
- head?: string
36
- body?: string
37
- }
38
- }
39
- }
40
-
41
- interface Patterns {
42
- [pattern: string]: PatternConfig
43
- }
44
-
45
- interface PresetCore {
46
- /**
47
- * The css selectors or media queries shortcuts.
48
- * @example `{ hover: "&:hover" }`
49
- */
50
- conditions: Conditions
51
- /**
52
- * The global styles for your project.
53
- */
54
- globalCss: GlobalStyleObject
55
- /**
56
- * The theme configuration for your project.
57
- */
58
- theme: Theme
59
- /**
60
- * The css utility definitions.
61
- */
62
- utilities: UtilityConfig
63
- /**
64
- * Common styling or layout patterns for your project.
65
- */
66
- patterns: Record<string, PatternConfig>
67
- }
68
-
69
- interface ExtendablePatterns {
70
- [pattern: string]: PatternConfig | Patterns | undefined
71
- extend?: Patterns | undefined
72
- }
73
-
74
- export interface ExtendableOptions {
75
- /**
76
- * The css selectors or media queries shortcuts.
77
- * @example `{ hover: "&:hover" }`
78
- */
79
- conditions?: ExtendableConditions
80
- /**
81
- * The global styles for your project.
82
- */
83
- globalCss?: ExtendableGlobalStyleObject
84
- /**
85
- * The theme configuration for your project.
86
- */
87
- theme?: ExtendableTheme
88
- /**
89
- * The css utility definitions.
90
- */
91
- utilities?: ExtendableUtilityConfig
92
- /**
93
- * Common styling or layout patterns for your project.
94
- */
95
- patterns?: ExtendablePatterns
96
- }
97
-
98
- export interface OutdirImportMap {
99
- css: string
100
- recipes: string
101
- patterns: string
102
- jsx?: string
103
- }
104
-
105
- interface FileSystemOptions {
106
- /**
107
- * Whether to clean the output directory before generating the css.
108
- * @default false
109
- */
110
- clean?: boolean
111
- /**
112
- * The output directory.
113
- * @default 'styled-system'
114
- */
115
- outdir?: string
116
- /**
117
- * Allows you to customize the import paths for the generated outdir.
118
- * @default
119
- * ```js
120
- * {
121
- * css: 'styled-system/css',
122
- * recipes: 'styled-system/recipes',
123
- * patterns: 'styled-system/patterns',
124
- * jsx: 'styled-system/jsx',
125
- * }
126
- * ```
127
- */
128
- importMap?: OutdirImportMap
129
- /**
130
- * List of files glob to watch for changes.
131
- * @default []
132
- */
133
- include?: string[]
134
- /**
135
- * List of files glob to ignore.
136
- * @default []
137
- */
138
- exclude?: string[]
139
- /**
140
- * Whether to watch for changes and regenerate the css.
141
- * @default false
142
- */
143
- watch?: boolean
144
- /**
145
- * Whether to use polling instead of filesystem events when watching.
146
- * @default false
147
- */
148
- poll?: boolean
149
- /**
150
- * The current working directory.
151
- * @default 'process.cwd()'
152
- */
153
- cwd?: string
154
- /**
155
- * The log level for the built-in logger.
156
- * @default 'info'
157
- */
158
- logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'silent'
159
- }
160
-
161
- type JsxFramework = 'react' | 'solid' | 'preact' | 'vue' | 'qwik'
162
-
163
- interface JsxOptions {
164
- /**
165
- * The framework to use for generating supercharged elements.
166
- */
167
- jsxFramework?: JsxFramework
168
- /**
169
- * The factory name of the element
170
- * @default 'styled'
171
- *
172
- * @example
173
- * ```jsx
174
- * <styled.button marginTop="40px">Click me</styled.button>
175
- * ```
176
- */
177
- jsxFactory?: string
178
- /**
179
- * The style props allowed on generated JSX components
180
- * - When set to 'all', all style props are allowed.
181
- * - When set to 'minimal', only the `css` prop is allowed.
182
- * - When set to 'none', no style props are allowed and therefore the jsxFactory will not be importable.
183
- *
184
- * @default 'all'
185
- *
186
- * @example with 'all':
187
- * ```jsx
188
- * <styled.button marginTop="40px">Click me</styled.button>
189
- * ```
190
- *
191
- * @example with 'minimal':
192
- * ```jsx
193
- * <styled.button css={{ marginTop: "40px" }}>Click me</styled.button>
194
- * ```
195
- *
196
- * @example with 'none':
197
- * ```jsx
198
- * <button className={css({ marginTop: "40px" })}>Click me</button>
199
- * ```
200
- */
201
- jsxStyleProps?: 'all' | 'minimal' | 'none'
202
- }
203
-
204
- interface CssgenOptions {
205
- /**
206
- * Whether to include css reset styles in the generated css.
207
- * @default true
208
- */
209
- preflight?: boolean | { scope: string }
210
- /**
211
- * The namespace prefix for the generated css classes and css variables.
212
- * @default ''
213
- */
214
- prefix?: string | { cssVar?: string; className?: string }
215
- /**
216
- * The value separator used in the generated class names.
217
- * @default '_'
218
- */
219
- separator?: '_' | '=' | '-'
220
- /**
221
- * Whether to optimize the generated css.
222
- * @default true
223
- */
224
- optimize?: boolean
225
- /**
226
- * Whether to minify the generated css.
227
- * @default false
228
- */
229
- minify?: boolean
230
- /**
231
- * The root selector for the css variables.
232
- * @default ':where(:host, :root)'
233
- */
234
- cssVarRoot?: string
235
- /**
236
- * @experimental
237
- * Used to generate css utility classes for your project.
238
- */
239
- staticCss?: StaticCssOptions
240
- /**
241
- * The css syntax kind to use
242
- * @default 'object-literal'
243
- */
244
- syntax?: 'template-literal' | 'object-literal'
245
- }
246
-
247
- interface CodegenOptions {
248
- /**
249
- * Whether to emit the artifacts to `node_modules` as a package.
250
- * @default false
251
- */
252
- emitPackage?: boolean
253
- /**
254
- * Whether to only emit the `tokens` directory
255
- * @default false
256
- */
257
- emitTokensOnly?: boolean
258
- /**
259
- * Whether to hash the generated class names / css variables.
260
- * This is useful if want to shorten the class names or css variables.
261
- * @default false
262
- */
263
- hash?: boolean | { cssVar: boolean; className: boolean }
264
- /**
265
- * Options for the generated typescript definitions.
266
- */
267
- strictTokens?: boolean
268
- /**
269
- * Whether to update the .gitignore file.
270
- * @default 'true'
271
- */
272
- gitignore?: boolean
273
- /**
274
- * Whether to allow shorthand properties
275
- * @default 'true'
276
- */
277
- shorthands?: boolean
278
- /**
279
- * Layer mappings used in the generated css.
280
- * @default 'true'
281
- */
282
- layers?: Partial<CascadeLayers>
283
- /**
284
- * File extension for generated javascript files.
285
- * @default 'mjs'
286
- */
287
- outExtension?: 'mjs' | 'js'
288
- /**
289
- * Whether to force consistent type extensions for generated typescript .d.ts files.
290
- * If set to `true` and `outExtension` is set to `mjs`, the generated typescript .d.ts files will have the extension `.d.mts`.
291
- * @default false
292
- */
293
- forceConsistentTypeExtension?: boolean
294
- }
295
-
296
- interface PresetOptions {
297
- /**
298
- * Used to create reusable config presets for your project or team.
299
- */
300
- presets?: (string | Preset | Promise<Preset>)[]
301
- /**
302
- * Whether to opt-out of the defaults config presets: [`@pandacss/preset-base`, `@pandacss/preset-panda`]
303
- * @default 'false'
304
- */
305
- eject?: boolean
306
- }
307
-
308
- interface HooksOptions {
309
- hooks?: Partial<PandaHooks>
310
- }
311
-
312
- export interface Config
313
- extends StudioOptions,
314
- ExtendableOptions,
315
- CssgenOptions,
316
- CodegenOptions,
317
- FileSystemOptions,
318
- JsxOptions,
319
- PresetOptions,
320
- HooksOptions {}
321
-
322
- export interface Preset extends ExtendableOptions, PresetOptions {}
323
-
324
- export interface UserConfig
325
- extends Partial<PresetCore>,
326
- RequiredBy<Omit<Config, keyof PresetCore>, 'outdir' | 'cwd' | 'include'> {}
327
-
328
- export interface PathMapping {
329
- pattern: RegExp
330
- paths: string[]
331
- }
332
-
333
- export interface ConfigTsOptions {
334
- baseUrl?: string | undefined
335
- pathMappings: PathMapping[]
336
- }
337
-
338
- export interface LoadConfigResult {
339
- path: string
340
- config: UserConfig
341
- tsconfig?: TSConfig
342
- tsOptions?: ConfigTsOptions
343
- tsconfigFile?: string
344
- dependencies: string[]
345
- }