@pandacss/types 1.0.1 → 1.2.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/hooks.d.ts CHANGED
@@ -10,6 +10,11 @@ export interface PandaHooks {
10
10
  * This is the first hook called, you can use it to tweak the config before the context is created.
11
11
  */
12
12
  'config:resolved': (args: ConfigResolvedHookArgs) => MaybeAsyncReturn<void | ConfigResolvedHookArgs['config']>
13
+ /**
14
+ * Called when each preset is resolved, allowing modification of individual presets.
15
+ * This hook is called for each preset during the resolution process, before they are merged together.
16
+ */
17
+ 'preset:resolved': (args: PresetResolvedHookArgs) => MaybeAsyncReturn<void | PresetResolvedHookArgs['preset']>
13
18
  /**
14
19
  * Called when the token engine has been created
15
20
  */
@@ -121,6 +126,7 @@ interface TraverseFn {
121
126
 
122
127
  interface ConfigResolvedHookUtils {
123
128
  omit: <T, K extends keyof T | (string & {})>(obj: T, paths: K[]) => Omit<T, K>
129
+ pick: <T, K extends keyof T | (string & {})>(obj: T, paths: K[]) => Partial<T>
124
130
  traverse: TraverseFn
125
131
  }
126
132
 
@@ -137,6 +143,13 @@ export interface ConfigChangeHookArgs {
137
143
  changes: DiffConfigResult
138
144
  }
139
145
 
146
+ export interface PresetResolvedHookArgs {
147
+ preset: LoadConfigResult['config']
148
+ name: string
149
+ utils: ConfigResolvedHookUtils
150
+ original?: LoadConfigResult['config']
151
+ }
152
+
140
153
  /* -----------------------------------------------------------------------------
141
154
  * Parser hooks
142
155
  * -----------------------------------------------------------------------------*/
@@ -90,19 +90,95 @@ type PositionTry =
90
90
  | DashedIdent
91
91
 
92
92
  export interface ModernCssProperties {
93
+ /**
94
+ * Defines a name for the anchor element that can be referenced by positioned elements.
95
+ */
93
96
  anchorName?: Globals | 'none' | DashedIdent | StringToMultiple<DashedIdent>
97
+
98
+ /**
99
+ * Defines the scope of anchor names within the element.
100
+ */
94
101
  anchorScope?: Globals | 'none' | 'all' | DashedIdent | StringToMultiple<DashedIdent>
102
+
103
+ /**
104
+ * Controls how form elements size themselves.
105
+ */
95
106
  fieldSizing?: Globals | 'fixed' | 'content'
107
+
108
+ /**
109
+ * Controls whether interpolation of size values should allow keywords.
110
+ */
96
111
  interpolateSize?: Globals | 'allow-keywords' | 'numeric-only'
112
+
113
+ /**
114
+ * Specifies the anchor element that this positioned element should be positioned relative to.
115
+ */
97
116
  positionAnchor?: Globals | 'auto' | DashedIdent
117
+
118
+ /**
119
+ * Specifies the area within the anchor element where this positioned element should be placed.
120
+ */
98
121
  positionArea?: Globals | 'auto' | PositionAreaAxis | `${PositionAreaAxis} ${PositionAreaAxis}` | String
122
+
123
+ /**
124
+ * Specifies the position try options for the element.
125
+ */
99
126
  positionTry?: Globals | StringToMultiple<PositionTry> | String
127
+
128
+ /**
129
+ * Specifies fallback position try options when the primary position fails.
130
+ */
100
131
  positionTryFallback?: Globals | 'none' | StringToMultiple<PositionTry> | String
132
+
133
+ /**
134
+ * Specifies the order in which position try options should be attempted.
135
+ */
101
136
  positionTryOrder?: Globals | 'normal' | 'most-width' | 'most-height' | 'most-block-size' | 'most-inline-size'
137
+
138
+ /**
139
+ * Controls when the positioned element should be visible.
140
+ */
102
141
  positionVisibility?: Globals | 'always' | 'anchors-visible' | 'no-overflow'
142
+
143
+ /**
144
+ * Controls whether text should wrap or not.
145
+ */
103
146
  textWrapMode?: Globals | 'wrap' | 'nowrap'
147
+
148
+ /**
149
+ * Controls trimming of spacing in text.
150
+ */
104
151
  textSpacingTrim?: Globals | 'normal' | 'space-all' | 'space-first' | 'trim-start'
152
+
153
+ /**
154
+ * Controls the style of text wrapping.
155
+ */
105
156
  textWrapStyle?: Globals | 'auto' | 'balance' | 'pretty' | 'stable'
157
+
158
+ /**
159
+ * Controls whether the entire element should be draggable instead of its contents.
160
+ */
161
+ WebkitUserDrag?: Globals | 'auto' | 'element' | 'none'
162
+
163
+ /**
164
+ * Specifies whether an element can be used to drag the entire app window (Electron).
165
+ */
166
+ WebkitAppRegion?: Globals | 'drag' | 'no-drag'
167
+
168
+ /**
169
+ * Sets the horizontal spacing between table borders.
170
+ */
171
+ WebkitBorderHorizontalSpacing?: Globals | String | Number
172
+
173
+ /**
174
+ * Sets the vertical spacing between table borders.
175
+ */
176
+ WebkitBorderVerticalSpacing?: Globals | String | Number
177
+
178
+ /**
179
+ * Controls the display of text content for security purposes (e.g., password fields).
180
+ */
181
+ WebkitTextSecurity?: Globals | 'none' | 'circle' | 'disc' | 'square'
106
182
  }
107
183
 
108
184
  export type CssProperty = keyof PropertiesFallback
package/dist/utility.d.ts CHANGED
@@ -79,6 +79,7 @@ export type CssSemanticGroup =
79
79
  | 'Color'
80
80
  | 'Container'
81
81
  | 'Display'
82
+ | 'Focus Ring'
82
83
  | 'Effect'
83
84
  | 'Flex Layout'
84
85
  | 'Grid Layout'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "1.0.1",
3
+ "version": "1.2.0",
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": "2.2.0",
33
33
  "ts-morph": "26.0.0",
34
- "@pandacss/extractor": "1.0.1"
34
+ "@pandacss/extractor": "1.2.0"
35
35
  },
36
36
  "scripts": {
37
37
  "dev": "tsx scripts/watch.ts",