@pandacss/generator 0.0.0-dev-20231025145522 → 0.0.0-dev-20231026112944

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
@@ -299,6 +299,14 @@ function generateResetCss(ctx, scope = "") {
299
299
  background-image: none;
300
300
  }
301
301
 
302
+ ${selector}button,
303
+ ${selector}input,
304
+ ${selector}optgroup,
305
+ ${selector}select,
306
+ ${selector}textarea {
307
+ color: inherit;
308
+ }
309
+
302
310
  ${selector}button,
303
311
  ${selector}select {
304
312
  text-transform: none;
@@ -3122,8 +3130,19 @@ function getGeneratedTypes(ctx) {
3122
3130
 
3123
3131
  // src/artifacts/types/main.ts
3124
3132
  var import_outdent40 = require("outdent");
3125
- var generateTypesEntry = (ctx) => ({
3126
- global: import_outdent40.outdent`
3133
+ var generateTypesEntry = (ctx, isJsxRequired) => {
3134
+ const indexExports = [
3135
+ // 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'`
3136
+ `import '${ctx.file.extDts("./global")}'`,
3137
+ ctx.file.exportTypeStar("./conditions"),
3138
+ ctx.file.exportTypeStar("./pattern"),
3139
+ ctx.file.exportTypeStar("./recipe"),
3140
+ ctx.file.exportTypeStar("./system-types"),
3141
+ isJsxRequired && ctx.file.exportTypeStar("./jsx"),
3142
+ ctx.file.exportTypeStar("./style-props")
3143
+ ].filter(Boolean);
3144
+ return {
3145
+ global: import_outdent40.outdent`
3127
3146
  // @ts-nocheck
3128
3147
  import type * as Panda from '@pandacss/dev'
3129
3148
  ${ctx.file.importType("RecipeVariantRecord, RecipeConfig, SlotRecipeVariantRecord, SlotRecipeConfig", "./recipe")}
@@ -3143,21 +3162,14 @@ var generateTypesEntry = (ctx) => ({
3143
3162
  export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>
3144
3163
  }
3145
3164
  `,
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
-
3165
+ index: import_outdent40.outdent`
3166
+ ${indexExports.join("\n")}
3156
3167
  `,
3157
- helpers: import_outdent40.outdent`
3158
- export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3159
- `
3160
- });
3168
+ helpers: import_outdent40.outdent`
3169
+ export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3170
+ `
3171
+ };
3172
+ };
3161
3173
 
3162
3174
  // src/artifacts/types/prop-types.ts
3163
3175
  var import_outdent41 = require("outdent");
@@ -3311,7 +3323,7 @@ function setupTypes(ctx) {
3311
3323
  const gen = getGeneratedTypes(ctx);
3312
3324
  const conditions = generateConditions(ctx);
3313
3325
  const jsx = generateJsxTypes(ctx);
3314
- const entry = generateTypesEntry(ctx);
3326
+ const entry = generateTypesEntry(ctx, jsx != null);
3315
3327
  return {
3316
3328
  dir: ctx.paths.types,
3317
3329
  files: [
package/dist/index.mjs CHANGED
@@ -268,6 +268,14 @@ function generateResetCss(ctx, scope = "") {
268
268
  background-image: none;
269
269
  }
270
270
 
271
+ ${selector}button,
272
+ ${selector}input,
273
+ ${selector}optgroup,
274
+ ${selector}select,
275
+ ${selector}textarea {
276
+ color: inherit;
277
+ }
278
+
271
279
  ${selector}button,
272
280
  ${selector}select {
273
281
  text-transform: none;
@@ -3091,8 +3099,19 @@ function getGeneratedTypes(ctx) {
3091
3099
 
3092
3100
  // src/artifacts/types/main.ts
3093
3101
  import { outdent as outdent40 } from "outdent";
3094
- var generateTypesEntry = (ctx) => ({
3095
- global: outdent40`
3102
+ var generateTypesEntry = (ctx, isJsxRequired) => {
3103
+ const indexExports = [
3104
+ // 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'`
3105
+ `import '${ctx.file.extDts("./global")}'`,
3106
+ ctx.file.exportTypeStar("./conditions"),
3107
+ ctx.file.exportTypeStar("./pattern"),
3108
+ ctx.file.exportTypeStar("./recipe"),
3109
+ ctx.file.exportTypeStar("./system-types"),
3110
+ isJsxRequired && ctx.file.exportTypeStar("./jsx"),
3111
+ ctx.file.exportTypeStar("./style-props")
3112
+ ].filter(Boolean);
3113
+ return {
3114
+ global: outdent40`
3096
3115
  // @ts-nocheck
3097
3116
  import type * as Panda from '@pandacss/dev'
3098
3117
  ${ctx.file.importType("RecipeVariantRecord, RecipeConfig, SlotRecipeVariantRecord, SlotRecipeConfig", "./recipe")}
@@ -3112,21 +3131,14 @@ var generateTypesEntry = (ctx) => ({
3112
3131
  export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>
3113
3132
  }
3114
3133
  `,
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
-
3134
+ index: outdent40`
3135
+ ${indexExports.join("\n")}
3125
3136
  `,
3126
- helpers: outdent40`
3127
- export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3128
- `
3129
- });
3137
+ helpers: outdent40`
3138
+ export type Pretty<T> = T extends infer U ? { [K in keyof U]: U[K] } : never
3139
+ `
3140
+ };
3141
+ };
3130
3142
 
3131
3143
  // src/artifacts/types/prop-types.ts
3132
3144
  import { outdent as outdent41 } from "outdent";
@@ -3280,7 +3292,7 @@ function setupTypes(ctx) {
3280
3292
  const gen = getGeneratedTypes(ctx);
3281
3293
  const conditions = generateConditions(ctx);
3282
3294
  const jsx = generateJsxTypes(ctx);
3283
- const entry = generateTypesEntry(ctx);
3295
+ const entry = generateTypesEntry(ctx, jsx != null);
3284
3296
  return {
3285
3297
  dir: ctx.paths.types,
3286
3298
  files: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20231025145522",
3
+ "version": "0.0.0-dev-20231026112944",
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-20231025145522",
24
- "@pandacss/is-valid-prop": "0.0.0-dev-20231025145522",
25
- "@pandacss/logger": "0.0.0-dev-20231025145522",
26
- "@pandacss/shared": "0.0.0-dev-20231025145522",
27
- "@pandacss/token-dictionary": "0.0.0-dev-20231025145522",
28
- "@pandacss/types": "0.0.0-dev-20231025145522"
23
+ "@pandacss/core": "0.0.0-dev-20231026112944",
24
+ "@pandacss/is-valid-prop": "0.0.0-dev-20231026112944",
25
+ "@pandacss/logger": "0.0.0-dev-20231026112944",
26
+ "@pandacss/shared": "0.0.0-dev-20231026112944",
27
+ "@pandacss/token-dictionary": "0.0.0-dev-20231026112944",
28
+ "@pandacss/types": "0.0.0-dev-20231026112944"
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-20231025145522"
33
+ "@pandacss/fixture": "0.0.0-dev-20231026112944"
34
34
  },
35
35
  "scripts": {
36
36
  "prebuild": "tsx scripts/prebuild.ts",