@pandacss/generator 0.0.0-dev-20230705181803 → 0.0.0-dev-20230706142515

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.d.mts CHANGED
@@ -3,6 +3,7 @@ import * as _pandacss_core from '@pandacss/core';
3
3
  import * as _pandacss_token_dictionary from '@pandacss/token-dictionary';
4
4
  import * as _pandacss_types from '@pandacss/types';
5
5
  import { ConfigResultWithHooks, TSConfig } from '@pandacss/types';
6
+ import * as _pandacss_core_src_types from '@pandacss/core/src/types';
6
7
 
7
8
  declare const getEngine: (conf: ConfigResultWithHooks) => {
8
9
  patterns: {
@@ -176,8 +177,7 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
176
177
  match: RegExp;
177
178
  })[];
178
179
  };
179
- getRecipeName: (jsxName: string) => string;
180
- getRecipeByName: (name: string) => _pandacss_types.RecipeConfig | undefined;
180
+ getRecipesByJsxName: (jsxName: string) => _pandacss_core_src_types.RecipeNode[];
181
181
  };
182
182
  patterns: {
183
183
  transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import * as _pandacss_core from '@pandacss/core';
3
3
  import * as _pandacss_token_dictionary from '@pandacss/token-dictionary';
4
4
  import * as _pandacss_types from '@pandacss/types';
5
5
  import { ConfigResultWithHooks, TSConfig } from '@pandacss/types';
6
+ import * as _pandacss_core_src_types from '@pandacss/core/src/types';
6
7
 
7
8
  declare const getEngine: (conf: ConfigResultWithHooks) => {
8
9
  patterns: {
@@ -176,8 +177,7 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
176
177
  match: RegExp;
177
178
  })[];
178
179
  };
179
- getRecipeName: (jsxName: string) => string;
180
- getRecipeByName: (name: string) => _pandacss_types.RecipeConfig | undefined;
180
+ getRecipesByJsxName: (jsxName: string) => _pandacss_core_src_types.RecipeNode[];
181
181
  };
182
182
  patterns: {
183
183
  transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
package/dist/index.js CHANGED
@@ -412,7 +412,15 @@ var generateStaticCss = (ctx) => {
412
412
  const fn = (0, import_core2.getStaticCss)(staticCss);
413
413
  const results = fn({
414
414
  breakpoints: Object.keys(theme.breakpoints ?? {}),
415
- getPropertyKeys: (prop) => utility.getPropertyKeys(prop).filter((key) => !key.startsWith("type:") && !key.startsWith("CssProperties:")),
415
+ getPropertyKeys: (prop) => {
416
+ const propConfig = utility.config[prop];
417
+ if (!propConfig)
418
+ return [];
419
+ const values = utility.getPropertyValues(propConfig);
420
+ if (!values)
421
+ return [];
422
+ return Object.keys(values);
423
+ },
416
424
  getRecipeKeys: (recipe) => recipes.details.find((detail) => detail.config.name === recipe)?.variantKeyMap ?? {}
417
425
  });
418
426
  results.css.forEach((css2) => {
@@ -3456,8 +3464,7 @@ var createGenerator = (conf) => {
3456
3464
  isStyleProp: isValidProperty,
3457
3465
  nodes: [...patterns.nodes, ...recipes.nodes]
3458
3466
  },
3459
- getRecipeName: recipes.getFnName,
3460
- getRecipeByName: recipes.getConfig
3467
+ getRecipesByJsxName: recipes.filter
3461
3468
  }
3462
3469
  };
3463
3470
  };
package/dist/index.mjs CHANGED
@@ -381,7 +381,15 @@ var generateStaticCss = (ctx) => {
381
381
  const fn = getStaticCss(staticCss);
382
382
  const results = fn({
383
383
  breakpoints: Object.keys(theme.breakpoints ?? {}),
384
- getPropertyKeys: (prop) => utility.getPropertyKeys(prop).filter((key) => !key.startsWith("type:") && !key.startsWith("CssProperties:")),
384
+ getPropertyKeys: (prop) => {
385
+ const propConfig = utility.config[prop];
386
+ if (!propConfig)
387
+ return [];
388
+ const values = utility.getPropertyValues(propConfig);
389
+ if (!values)
390
+ return [];
391
+ return Object.keys(values);
392
+ },
385
393
  getRecipeKeys: (recipe) => recipes.details.find((detail) => detail.config.name === recipe)?.variantKeyMap ?? {}
386
394
  });
387
395
  results.css.forEach((css2) => {
@@ -3431,8 +3439,7 @@ var createGenerator = (conf) => {
3431
3439
  isStyleProp: isValidProperty,
3432
3440
  nodes: [...patterns.nodes, ...recipes.nodes]
3433
3441
  },
3434
- getRecipeName: recipes.getFnName,
3435
- getRecipeByName: recipes.getConfig
3442
+ getRecipesByJsxName: recipes.filter
3436
3443
  }
3437
3444
  };
3438
3445
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20230705181803",
3
+ "version": "0.0.0-dev-20230706142515",
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.24",
22
22
  "ts-pattern": "4.3.0",
23
- "@pandacss/core": "0.0.0-dev-20230705181803",
24
- "@pandacss/is-valid-prop": "0.0.0-dev-20230705181803",
25
- "@pandacss/logger": "0.0.0-dev-20230705181803",
26
- "@pandacss/shared": "0.0.0-dev-20230705181803",
27
- "@pandacss/token-dictionary": "0.0.0-dev-20230705181803",
28
- "@pandacss/types": "0.0.0-dev-20230705181803"
23
+ "@pandacss/core": "0.0.0-dev-20230706142515",
24
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230706142515",
25
+ "@pandacss/logger": "0.0.0-dev-20230706142515",
26
+ "@pandacss/shared": "0.0.0-dev-20230706142515",
27
+ "@pandacss/token-dictionary": "0.0.0-dev-20230706142515",
28
+ "@pandacss/types": "0.0.0-dev-20230706142515"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/pluralize": "0.0.29",
32
32
  "hookable": "5.5.3",
33
- "@pandacss/fixture": "0.0.0-dev-20230705181803"
33
+ "@pandacss/fixture": "0.0.0-dev-20230706142515"
34
34
  },
35
35
  "scripts": {
36
36
  "prebuild": "tsx scripts/prebuild.ts",