@pandacss/generator 0.0.0-dev-20230825140913 → 0.0.0-dev-20230825154511

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
@@ -28,7 +28,7 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
28
28
  styleFnName: string;
29
29
  jsxName: string;
30
30
  }[];
31
- getFnName: (jsxName: string) => string;
31
+ find: (jsxName: string) => string;
32
32
  filter: (jsxName: string) => {
33
33
  props: string[];
34
34
  blocklistType: string;
@@ -258,7 +258,7 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
258
258
  styleFnName: string;
259
259
  jsxName: string;
260
260
  }[];
261
- getFnName: (jsxName: string) => string;
261
+ find: (jsxName: string) => string;
262
262
  filter: (jsxName: string) => {
263
263
  props: string[];
264
264
  blocklistType: string;
package/dist/index.d.ts CHANGED
@@ -28,7 +28,7 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
28
28
  styleFnName: string;
29
29
  jsxName: string;
30
30
  }[];
31
- getFnName: (jsxName: string) => string;
31
+ find: (jsxName: string) => string;
32
32
  filter: (jsxName: string) => {
33
33
  props: string[];
34
34
  blocklistType: string;
@@ -258,7 +258,7 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
258
258
  styleFnName: string;
259
259
  jsxName: string;
260
260
  }[];
261
- getFnName: (jsxName: string) => string;
261
+ find: (jsxName: string) => string;
262
262
  filter: (jsxName: string) => {
263
263
  props: string[];
264
264
  blocklistType: string;
package/dist/index.js CHANGED
@@ -3414,7 +3414,7 @@ var generateParserCss = (ctx) => (result) => (0, import_func.pipe)(
3414
3414
  for (const pattern of patternSet) {
3415
3415
  (0, import_ts_pattern10.match)(pattern).with({ type: "jsx-pattern", name: import_ts_pattern10.P.string }, ({ name: jsxName }) => {
3416
3416
  pattern.data.forEach((data) => {
3417
- const fnName = patterns.getFnName(jsxName);
3417
+ const fnName = patterns.find(jsxName);
3418
3418
  const styleProps = patterns.transform(fnName, data);
3419
3419
  sheet.processStyleProps(styleProps);
3420
3420
  });
@@ -3613,8 +3613,8 @@ var getPatternEngine = (config) => {
3613
3613
  },
3614
3614
  getNames,
3615
3615
  details,
3616
- getFnName: (0, import_shared7.memo)((jsxName) => {
3617
- return details.find((node) => node.jsxName === jsxName)?.baseName ?? (0, import_shared7.uncapitalize)(jsxName);
3616
+ find: (0, import_shared7.memo)((jsxName) => {
3617
+ return details.find((node) => node.match.test(jsxName))?.baseName ?? (0, import_shared7.uncapitalize)(jsxName);
3618
3618
  }),
3619
3619
  filter: (0, import_shared7.memo)((jsxName) => {
3620
3620
  return details.filter((node) => node.match.test(jsxName));
package/dist/index.mjs CHANGED
@@ -3383,7 +3383,7 @@ var generateParserCss = (ctx) => (result) => pipe(
3383
3383
  for (const pattern of patternSet) {
3384
3384
  match10(pattern).with({ type: "jsx-pattern", name: P.string }, ({ name: jsxName }) => {
3385
3385
  pattern.data.forEach((data) => {
3386
- const fnName = patterns.getFnName(jsxName);
3386
+ const fnName = patterns.find(jsxName);
3387
3387
  const styleProps = patterns.transform(fnName, data);
3388
3388
  sheet.processStyleProps(styleProps);
3389
3389
  });
@@ -3554,7 +3554,7 @@ var getPathEngine = ({ cwd, emitPackage, outdir }) => {
3554
3554
  };
3555
3555
 
3556
3556
  // src/engines/pattern.ts
3557
- import { capitalize as capitalize3, dashCase, mapObject as mapObject2, memo as memo2, uncapitalize, createRegex } from "@pandacss/shared";
3557
+ import { capitalize as capitalize3, dashCase, mapObject as mapObject2, memo as memo2, createRegex, uncapitalize } from "@pandacss/shared";
3558
3558
  var helpers2 = { map: mapObject2 };
3559
3559
  var getPatternEngine = (config) => {
3560
3560
  const patterns = config.patterns ?? {};
@@ -3588,8 +3588,8 @@ var getPatternEngine = (config) => {
3588
3588
  },
3589
3589
  getNames,
3590
3590
  details,
3591
- getFnName: memo2((jsxName) => {
3592
- return details.find((node) => node.jsxName === jsxName)?.baseName ?? uncapitalize(jsxName);
3591
+ find: memo2((jsxName) => {
3592
+ return details.find((node) => node.match.test(jsxName))?.baseName ?? uncapitalize(jsxName);
3593
3593
  }),
3594
3594
  filter: memo2((jsxName) => {
3595
3595
  return details.filter((node) => node.match.test(jsxName));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20230825140913",
3
+ "version": "0.0.0-dev-20230825154511",
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.27",
22
22
  "ts-pattern": "5.0.4",
23
- "@pandacss/core": "0.0.0-dev-20230825140913",
24
- "@pandacss/is-valid-prop": "0.0.0-dev-20230825140913",
25
- "@pandacss/logger": "0.0.0-dev-20230825140913",
26
- "@pandacss/shared": "0.0.0-dev-20230825140913",
27
- "@pandacss/token-dictionary": "0.0.0-dev-20230825140913",
28
- "@pandacss/types": "0.0.0-dev-20230825140913"
23
+ "@pandacss/core": "0.0.0-dev-20230825154511",
24
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230825154511",
25
+ "@pandacss/logger": "0.0.0-dev-20230825154511",
26
+ "@pandacss/shared": "0.0.0-dev-20230825154511",
27
+ "@pandacss/token-dictionary": "0.0.0-dev-20230825154511",
28
+ "@pandacss/types": "0.0.0-dev-20230825154511"
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-20230825140913"
33
+ "@pandacss/fixture": "0.0.0-dev-20230825154511"
34
34
  },
35
35
  "scripts": {
36
36
  "prebuild": "tsx scripts/prebuild.ts",