@pandacss/types 0.0.0-dev-20240214214337 → 0.0.0-dev-20240216221415

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
@@ -341,10 +341,18 @@ interface PresetOptions {
341
341
  presets?: (string | Preset | Promise<Preset>)[]
342
342
  }
343
343
 
344
- interface HooksOptions {
344
+ export interface HooksOptions {
345
345
  hooks?: Partial<PandaHooks>
346
346
  }
347
347
 
348
+ export interface PandaPlugin extends HooksOptions {
349
+ name: string
350
+ }
351
+
352
+ export interface PluginsOptions {
353
+ plugins?: PandaPlugin[]
354
+ }
355
+
348
356
  export interface Config
349
357
  extends StudioOptions,
350
358
  ExtendableOptions,
@@ -353,7 +361,8 @@ export interface Config
353
361
  FileSystemOptions,
354
362
  JsxOptions,
355
363
  PresetOptions,
356
- HooksOptions {
364
+ HooksOptions,
365
+ PluginsOptions {
357
366
  /**
358
367
  * Whether to opt-out of the defaults config presets: [`@pandacss/preset-base`, `@pandacss/preset-panda`]
359
368
  * @default 'false'
package/dist/hooks.d.ts CHANGED
@@ -41,7 +41,14 @@ export interface PandaHooks {
41
41
  * Called right before writing the codegen files to disk.
42
42
  * You can use this hook to tweak the codegen files before they are written to disk.
43
43
  */
44
- 'codegen:prepare': (args: CodegenPrepareHookArgs) => MaybeAsyncReturn
44
+ 'codegen:prepare': (args: {
45
+ artifacts: Artifact[]
46
+ /**
47
+ * The original state of the artifacts, as it was generated by Panda, without any modification from other preset hooks
48
+ */
49
+ original?: Artifact[]
50
+ changed: ArtifactId[] | undefined
51
+ }) => MaybeAsyncReturn<Artifact[]>
45
52
  /**
46
53
  * Called after the codegen is completed
47
54
  */
@@ -173,7 +180,14 @@ type CssgenArtifact = 'global' | 'static' | 'reset' | 'tokens' | 'keyframes' | '
173
180
 
174
181
  export interface CssgenDoneHookArgs {
175
182
  artifact: CssgenArtifact
183
+ /**
184
+ * The current state of the CSS, if any other preset hook has modified the CSS, this will be the modified state
185
+ */
176
186
  content: string
187
+ /**
188
+ * The original state of the CSS, as it was generated by Panda, without any modification from other preset hooks
189
+ */
190
+ original?: string
177
191
  }
178
192
 
179
193
  /* -----------------------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/types",
3
- "version": "0.0.0-dev-20240214214337",
3
+ "version": "0.0.0-dev-20240216221415",
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.0.0-dev-20240214214337"
33
+ "@pandacss/extractor": "0.0.0-dev-20240216221415"
34
34
  },
35
35
  "scripts": {
36
36
  "dev": "tsx scripts/watch.ts",