@pandacss/types 0.32.1 → 0.34.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/config.d.ts CHANGED
@@ -230,9 +230,9 @@ interface JsxOptions {
230
230
  interface CssgenOptions {
231
231
  /**
232
232
  * Whether to include css reset styles in the generated css.
233
- * @default true
233
+ * @default false
234
234
  */
235
- preflight?: boolean | { scope: string }
235
+ preflight?: boolean | { scope: string; level?: 'element' | 'parent' }
236
236
  /**
237
237
  * The namespace prefix for the generated css classes and css variables.
238
238
  * @default ''
@@ -290,6 +290,17 @@ interface CodegenOptions {
290
290
  /**
291
291
  * Whether to emit the artifacts to `node_modules` as a package.
292
292
  * @default false
293
+ * @deprecated `emitPackage` is deprecated, it's known for causing several issues:
294
+ * - bundlers sometimes eagerly cache the `node_modules`, leading to `panda codegen` updates to the `styled-system` not visible in the browser
295
+ * - auto-imports are not suggested in your IDE.
296
+ * - in some IDE the typings are not always reflected properly
297
+ *
298
+ * As alternatives, you can use:
299
+ * - relative paths instead of absolute paths (e.g. `../styled-system/css` instead of `styled-system/css`)
300
+ * - use package.json #imports and/or tsconfig path aliases (prefer package.json#imports when possible, TS 5.4 supports them by default) like `#styled-system/css` instead of `styled-system/css`
301
+ * @see https://nodejs.org/api/packages.html#subpath-imports
302
+ * - for a component library, use a dedicated workspace package (e.g. `@acme/styled-system`) and use `importMap: "@acme/styled-system"` so that Panda knows which entrypoint to extract, e.g. `import { css } from '@acme/styled-system/css'`
303
+ * @see https://panda-css.com/docs/guides/component-library
293
304
  */
294
305
  emitPackage?: boolean
295
306
  /**
@@ -10,5 +10,5 @@ export interface PropertyTypes {}
10
10
  export type PropertyValue<K extends string> = K extends keyof PropertyTypes
11
11
  ? ConditionalValue<PropertyTypes[K]>
12
12
  : K extends keyof CssProperties
13
- ? ConditionalValue<CssProperties[K]>
14
- : never
13
+ ? ConditionalValue<CssProperties[K]>
14
+ : never
package/dist/shared.d.ts CHANGED
@@ -26,12 +26,12 @@ type Paths<T, Prefix extends string = '', Depth extends number = 0> = {
26
26
  [K in keyof T]: Depth extends 0
27
27
  ? never
28
28
  : T[K] extends object
29
- ? K extends string
30
- ? `${Prefix}${K}` | Paths<T[K], `${Prefix}${K}.`, Depth extends 1 ? 0 : Subtract<Depth, 1>>
31
- : never
32
- : K extends string | number
33
- ? `${Prefix}${K}`
34
- : never
29
+ ? K extends string
30
+ ? `${Prefix}${K}` | Paths<T[K], `${Prefix}${K}.`, Depth extends 1 ? 0 : Subtract<Depth, 1>>
31
+ : never
32
+ : K extends string | number
33
+ ? `${Prefix}${K}`
34
+ : never
35
35
  }[keyof T]
36
36
 
37
37
  export type PathIn<T, Key extends keyof T> = Key extends string ? Paths<T[Key], `${Key}.`, 1> : never
package/dist/utility.d.ts CHANGED
@@ -60,8 +60,40 @@ export interface PropertyConfig {
60
60
  * The shorthand of the property.
61
61
  */
62
62
  shorthand?: string | string[]
63
+ /**
64
+ * The CSS semantic group this property belongs
65
+ */
66
+ group?: CssSemanticGroup
63
67
  }
64
68
 
69
+ export type CssSemanticGroup =
70
+ | 'System'
71
+ | 'Container'
72
+ | 'Display'
73
+ | 'Visibility'
74
+ | 'Position'
75
+ | 'Transform'
76
+ | 'Flex Layout'
77
+ | 'Grid Layout'
78
+ | 'Layout'
79
+ | 'Border'
80
+ | 'Border Radius'
81
+ | 'Width'
82
+ | 'Height'
83
+ | 'Margin'
84
+ | 'Padding'
85
+ | 'Color'
86
+ | 'Typography'
87
+ | 'Background'
88
+ | 'Shadow'
89
+ | 'Table'
90
+ | 'List'
91
+ | 'Scroll'
92
+ | 'Interactivity'
93
+ | 'Transition'
94
+ | 'Effect'
95
+ | 'Other'
96
+
65
97
  export type UtilityConfig = {
66
98
  [property in LiteralUnion<CssProperty>]?: PropertyConfig
67
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.32.1",
3
+ "version": "0.34.0",
4
4
  "description": "The types for css panda",
5
5
  "main": "dist/index.d.ts",
6
6
  "author": "Segun Adebayo <joseshegs@gmail.com>",
@@ -30,7 +30,7 @@
30
30
  "microdiff": "1.3.2",
31
31
  "ncp": "2.0.0",
32
32
  "pkg-types": "1.0.3",
33
- "@pandacss/extractor": "0.32.1"
33
+ "@pandacss/extractor": "0.34.0"
34
34
  },
35
35
  "scripts": {
36
36
  "dev": "tsx scripts/watch.ts",