@pandacss/generator 0.0.0-dev-20231024175638 → 0.0.0-dev-20231025190231

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/index.js CHANGED
@@ -3122,8 +3122,19 @@ function getGeneratedTypes(ctx) {
3122
3122
 
3123
3123
  // src/artifacts/types/main.ts
3124
3124
  var import_outdent40 = require("outdent");
3125
- var generateTypesEntry = (ctx) => ({
3126
- global: import_outdent40.outdent`
3125
+ var generateTypesEntry = (ctx, isJsxRequired) => {
3126
+ const indexExports = [
3127
+ // We need to export types used in the global.d.ts here to avoid TS errors such as `The inferred type of 'xxx' cannot be named without a reference to 'yyy'`
3128
+ `import '${ctx.file.extDts("./global")}'`,
3129
+ ctx.file.exportTypeStar("./conditions"),
3130
+ ctx.file.exportTypeStar("./pattern"),
3131
+ ctx.file.exportTypeStar("./recipe"),
3132
+ ctx.file.exportTypeStar("./system-types"),
3133
+ isJsxRequired && ctx.file.exportTypeStar("./jsx"),
3134
+ ctx.file.exportTypeStar("./style-props")
3135
+ ].filter(Boolean);
3136
+ return {
3137
+ global: import_outdent40.outdent`
3127
3138
  // @ts-nocheck
3128
3139
  import type * as Panda from '@pandacss/dev'
3129
3140
  ${ctx.file.importType("RecipeVariantRecord, RecipeConfig, SlotRecipeVariantRecord, SlotRecipeConfig", "./recipe")}
@@ -3143,21 +3154,14 @@ var generateTypesEntry = (ctx) => ({
3143
3154
  export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>
3144
3155
  }
3145
3156
  `,
3146
- // We need to export types used in the global.d.ts here to avoid TS errors such as `The inferred type of 'xxx' cannot be named without a reference to 'yyy'`
3147
- index: import_outdent40.outdent`
3148
- import '${ctx.file.extDts("./global")}'
3149
- ${ctx.file.exportTypeStar("./conditions")}
3150
- ${ctx.file.exportTypeStar("./pattern")}
3151
- ${ctx.file.exportTypeStar("./recipe")}
3152
- ${ctx.file.exportTypeStar("./system-types")}
3153
- ${ctx.file.exportTypeStar("./jsx")}
3154
- ${ctx.file.exportTypeStar("./style-props")}
3155
-
3157
+ index: import_outdent40.outdent`
3158
+ ${indexExports.join("\n")}
3156
3159
  `,
3157
- helpers: import_outdent40.outdent`
3158
- export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3159
- `
3160
- });
3160
+ helpers: import_outdent40.outdent`
3161
+ export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3162
+ `
3163
+ };
3164
+ };
3161
3165
 
3162
3166
  // src/artifacts/types/prop-types.ts
3163
3167
  var import_outdent41 = require("outdent");
@@ -3311,7 +3315,7 @@ function setupTypes(ctx) {
3311
3315
  const gen = getGeneratedTypes(ctx);
3312
3316
  const conditions = generateConditions(ctx);
3313
3317
  const jsx = generateJsxTypes(ctx);
3314
- const entry = generateTypesEntry(ctx);
3318
+ const entry = generateTypesEntry(ctx, jsx != null);
3315
3319
  return {
3316
3320
  dir: ctx.paths.types,
3317
3321
  files: [
package/dist/index.mjs CHANGED
@@ -3091,8 +3091,19 @@ function getGeneratedTypes(ctx) {
3091
3091
 
3092
3092
  // src/artifacts/types/main.ts
3093
3093
  import { outdent as outdent40 } from "outdent";
3094
- var generateTypesEntry = (ctx) => ({
3095
- global: outdent40`
3094
+ var generateTypesEntry = (ctx, isJsxRequired) => {
3095
+ const indexExports = [
3096
+ // We need to export types used in the global.d.ts here to avoid TS errors such as `The inferred type of 'xxx' cannot be named without a reference to 'yyy'`
3097
+ `import '${ctx.file.extDts("./global")}'`,
3098
+ ctx.file.exportTypeStar("./conditions"),
3099
+ ctx.file.exportTypeStar("./pattern"),
3100
+ ctx.file.exportTypeStar("./recipe"),
3101
+ ctx.file.exportTypeStar("./system-types"),
3102
+ isJsxRequired && ctx.file.exportTypeStar("./jsx"),
3103
+ ctx.file.exportTypeStar("./style-props")
3104
+ ].filter(Boolean);
3105
+ return {
3106
+ global: outdent40`
3096
3107
  // @ts-nocheck
3097
3108
  import type * as Panda from '@pandacss/dev'
3098
3109
  ${ctx.file.importType("RecipeVariantRecord, RecipeConfig, SlotRecipeVariantRecord, SlotRecipeConfig", "./recipe")}
@@ -3112,21 +3123,14 @@ var generateTypesEntry = (ctx) => ({
3112
3123
  export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>
3113
3124
  }
3114
3125
  `,
3115
- // We need to export types used in the global.d.ts here to avoid TS errors such as `The inferred type of 'xxx' cannot be named without a reference to 'yyy'`
3116
- index: outdent40`
3117
- import '${ctx.file.extDts("./global")}'
3118
- ${ctx.file.exportTypeStar("./conditions")}
3119
- ${ctx.file.exportTypeStar("./pattern")}
3120
- ${ctx.file.exportTypeStar("./recipe")}
3121
- ${ctx.file.exportTypeStar("./system-types")}
3122
- ${ctx.file.exportTypeStar("./jsx")}
3123
- ${ctx.file.exportTypeStar("./style-props")}
3124
-
3126
+ index: outdent40`
3127
+ ${indexExports.join("\n")}
3125
3128
  `,
3126
- helpers: outdent40`
3127
- export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3128
- `
3129
- });
3129
+ helpers: outdent40`
3130
+ export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3131
+ `
3132
+ };
3133
+ };
3130
3134
 
3131
3135
  // src/artifacts/types/prop-types.ts
3132
3136
  import { outdent as outdent41 } from "outdent";
@@ -3280,7 +3284,7 @@ function setupTypes(ctx) {
3280
3284
  const gen = getGeneratedTypes(ctx);
3281
3285
  const conditions = generateConditions(ctx);
3282
3286
  const jsx = generateJsxTypes(ctx);
3283
- const entry = generateTypesEntry(ctx);
3287
+ const entry = generateTypesEntry(ctx, jsx != null);
3284
3288
  return {
3285
3289
  dir: ctx.paths.types,
3286
3290
  files: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20231024175638",
3
+ "version": "0.0.0-dev-20231025190231",
4
4
  "description": "The css generator for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -20,17 +20,17 @@
20
20
  "pluralize": "8.0.0",
21
21
  "postcss": "^8.4.31",
22
22
  "ts-pattern": "5.0.5",
23
- "@pandacss/core": "0.0.0-dev-20231024175638",
24
- "@pandacss/is-valid-prop": "0.0.0-dev-20231024175638",
25
- "@pandacss/logger": "0.0.0-dev-20231024175638",
26
- "@pandacss/shared": "0.0.0-dev-20231024175638",
27
- "@pandacss/token-dictionary": "0.0.0-dev-20231024175638",
28
- "@pandacss/types": "0.0.0-dev-20231024175638"
23
+ "@pandacss/core": "0.0.0-dev-20231025190231",
24
+ "@pandacss/is-valid-prop": "0.0.0-dev-20231025190231",
25
+ "@pandacss/logger": "0.0.0-dev-20231025190231",
26
+ "@pandacss/shared": "0.0.0-dev-20231025190231",
27
+ "@pandacss/token-dictionary": "0.0.0-dev-20231025190231",
28
+ "@pandacss/types": "0.0.0-dev-20231025190231"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/pluralize": "0.0.30",
32
32
  "hookable": "5.5.3",
33
- "@pandacss/fixture": "0.0.0-dev-20231024175638"
33
+ "@pandacss/fixture": "0.0.0-dev-20231025190231"
34
34
  },
35
35
  "scripts": {
36
36
  "prebuild": "tsx scripts/prebuild.ts",