@pandacss/types 0.0.0-dev-20240315122725 → 0.0.0-dev-20240315210222

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.
@@ -25,6 +25,7 @@ export type ArtifactId =
25
25
  | 'jsx-patterns'
26
26
  | 'jsx-patterns-index'
27
27
  | 'css-index'
28
+ | 'themes'
28
29
  | 'package.json'
29
30
  | 'types-jsx'
30
31
  | 'types-entry'
package/dist/config.d.ts CHANGED
@@ -69,9 +69,9 @@ export interface PresetCore {
69
69
  */
70
70
  patterns: Record<string, PatternConfig>
71
71
  /**
72
- * The css variables for your project.
72
+ * Multiple themes for your project.
73
73
  */
74
- globalVars: GlobalVarsDefinition
74
+ themes?: ThemeVariantsMap
75
75
  }
76
76
 
77
77
  interface ExtendablePatterns {
@@ -121,8 +121,27 @@ export interface GlobalVarsDefinition {
121
121
  }
122
122
 
123
123
  interface ExtendableGlobalVars {
124
- [key: string]: string | CssPropertyDefinition | ExtendableGlobalVars | undefined
125
- extend?: ExtendableGlobalVars
124
+ [key: string]: string | CssPropertyDefinition | GlobalVarsDefinition | undefined
125
+ extend?: GlobalVarsDefinition
126
+ }
127
+
128
+ export interface ThemeVariant extends Pick<Theme, 'tokens' | 'semanticTokens'> {
129
+ /**
130
+ * Selector attribute to use for the generated theme, can be any `data-*` attribute
131
+ * @default 'data-panda-theme'
132
+ * ```
133
+ *
134
+ */
135
+ attribute?: `data-${string}`
136
+ }
137
+
138
+ export interface ThemeVariantsMap {
139
+ [name: string]: ThemeVariant
140
+ }
141
+
142
+ interface ExtendableThemeVariantsMap {
143
+ [name: string]: ThemeVariantsMap | ThemeVariant | undefined
144
+ extend?: ThemeVariantsMap | undefined
126
145
  }
127
146
 
128
147
  export interface ExtendableOptions {
@@ -155,6 +174,10 @@ export interface ExtendableOptions {
155
174
  * The css variables for your project.
156
175
  */
157
176
  globalVars?: ExtendableGlobalVars
177
+ /**
178
+ * The theme variants for your project.
179
+ */
180
+ themes?: ExtendableThemeVariantsMap
158
181
  }
159
182
 
160
183
  export interface ImportMapInput {
@@ -43,4 +43,8 @@ export interface StaticCssOptions {
43
43
  patterns?: {
44
44
  [pattern: string]: PatternRule[]
45
45
  }
46
+ /**
47
+ * The CSS themes to generate
48
+ */
49
+ themes?: string[]
46
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.0.0-dev-20240315122725",
3
+ "version": "0.0.0-dev-20240315210222",
4
4
  "description": "The types for css panda",
5
5
  "main": "dist/index.d.ts",
6
6
  "author": "Segun Adebayo <joseshegs@gmail.com>",
@@ -31,7 +31,7 @@
31
31
  "ncp": "2.0.0",
32
32
  "pkg-types": "1.0.3",
33
33
  "ts-morph": "21.0.1",
34
- "@pandacss/extractor": "0.0.0-dev-20240315122725"
34
+ "@pandacss/extractor": "0.0.0-dev-20240315210222"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "tsx scripts/watch.ts",