@pandacss/generator 0.0.0-dev-20230717175316 → 0.0.0-dev-20230718154004

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,18 +3,11 @@ 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';
7
6
 
8
7
  declare const getEngine: (conf: ConfigResultWithHooks) => {
9
8
  patterns: {
10
- transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
11
- nodes: {
12
- type: "pattern";
13
- name: string;
14
- props: string[];
15
- baseName: string;
16
- }[];
17
9
  patterns: Record<string, _pandacss_types.PatternConfig>;
10
+ transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
18
11
  getConfig: (name: string) => _pandacss_types.PatternConfig;
19
12
  getNames: (name: string) => {
20
13
  name: string;
@@ -33,6 +26,12 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
33
26
  styleFnName: string;
34
27
  jsxName: string;
35
28
  }[];
29
+ nodes: {
30
+ type: "pattern";
31
+ name: string;
32
+ props: string[];
33
+ baseName: string;
34
+ }[];
36
35
  getFnName: (jsx: string) => string;
37
36
  isEmpty: () => boolean;
38
37
  };
@@ -41,7 +40,7 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
41
40
  upperName: string;
42
41
  typeName: string;
43
42
  componentName: string;
44
- framework: ("solid" | "react" | "preact" | "vue" | "qwik") | undefined;
43
+ framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
45
44
  };
46
45
  paths: {
47
46
  get: (file?: string | undefined) => string[];
@@ -87,8 +86,9 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
87
86
  createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
88
87
  hooks: _pandacss_types.PandaHookable;
89
88
  path: string;
90
- config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "include" | "outdir" | "cwd">>;
89
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "outdir" | "cwd" | "include">>;
91
90
  tsconfig?: TSConfig | undefined;
91
+ tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
92
92
  tsconfigFile?: string | undefined;
93
93
  dependencies: string[];
94
94
  };
@@ -155,10 +155,10 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
155
155
  };
156
156
  parserOptions: {
157
157
  importMap: {
158
- css: string;
159
- recipe: string;
160
- pattern: string;
161
- jsx: string;
158
+ css: string[];
159
+ recipe: string[];
160
+ pattern: string[];
161
+ jsx: string[];
162
162
  };
163
163
  jsx: {
164
164
  factory: string;
@@ -177,17 +177,24 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
177
177
  match: RegExp;
178
178
  })[];
179
179
  };
180
- getRecipesByJsxName: (jsxName: string) => _pandacss_core_src_types.RecipeNode[];
181
- };
182
- patterns: {
183
- transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
184
- nodes: {
185
- type: "pattern";
180
+ getRecipesByJsxName: (jsxName: string) => {
186
181
  name: string;
187
- props: string[];
188
- baseName: string;
182
+ variantKeys: string[];
183
+ variantKeyMap: Record<string, string[]>;
184
+ jsx: (string | RegExp)[];
185
+ upperName: string;
186
+ dashName: string;
187
+ jsxName: string;
188
+ match: RegExp;
189
+ config: _pandacss_types.RecipeConfig;
190
+ splitProps: (props: _pandacss_types.Dict) => [_pandacss_types.Dict, _pandacss_types.Dict];
189
191
  }[];
192
+ compilerOptions: any;
193
+ tsOptions: _pandacss_types.ConfigTsOptions | undefined;
194
+ };
195
+ patterns: {
190
196
  patterns: Record<string, _pandacss_types.PatternConfig>;
197
+ transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
191
198
  getConfig: (name: string) => _pandacss_types.PatternConfig;
192
199
  getNames: (name: string) => {
193
200
  name: string;
@@ -206,6 +213,12 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
206
213
  styleFnName: string;
207
214
  jsxName: string;
208
215
  }[];
216
+ nodes: {
217
+ type: "pattern";
218
+ name: string;
219
+ props: string[];
220
+ baseName: string;
221
+ }[];
209
222
  getFnName: (jsx: string) => string;
210
223
  isEmpty: () => boolean;
211
224
  };
@@ -214,7 +227,7 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
214
227
  upperName: string;
215
228
  typeName: string;
216
229
  componentName: string;
217
- framework: ("solid" | "react" | "preact" | "vue" | "qwik") | undefined;
230
+ framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
218
231
  };
219
232
  paths: {
220
233
  get: (file?: string | undefined) => string[];
@@ -260,8 +273,9 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
260
273
  createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
261
274
  hooks: _pandacss_types.PandaHookable;
262
275
  path: string;
263
- config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "include" | "outdir" | "cwd">>;
276
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "outdir" | "cwd" | "include">>;
264
277
  tsconfig?: TSConfig | undefined;
278
+ tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
265
279
  tsconfigFile?: string | undefined;
266
280
  dependencies: string[];
267
281
  };
package/dist/index.d.ts CHANGED
@@ -3,18 +3,11 @@ 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';
7
6
 
8
7
  declare const getEngine: (conf: ConfigResultWithHooks) => {
9
8
  patterns: {
10
- transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
11
- nodes: {
12
- type: "pattern";
13
- name: string;
14
- props: string[];
15
- baseName: string;
16
- }[];
17
9
  patterns: Record<string, _pandacss_types.PatternConfig>;
10
+ transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
18
11
  getConfig: (name: string) => _pandacss_types.PatternConfig;
19
12
  getNames: (name: string) => {
20
13
  name: string;
@@ -33,6 +26,12 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
33
26
  styleFnName: string;
34
27
  jsxName: string;
35
28
  }[];
29
+ nodes: {
30
+ type: "pattern";
31
+ name: string;
32
+ props: string[];
33
+ baseName: string;
34
+ }[];
36
35
  getFnName: (jsx: string) => string;
37
36
  isEmpty: () => boolean;
38
37
  };
@@ -41,7 +40,7 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
41
40
  upperName: string;
42
41
  typeName: string;
43
42
  componentName: string;
44
- framework: ("solid" | "react" | "preact" | "vue" | "qwik") | undefined;
43
+ framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
45
44
  };
46
45
  paths: {
47
46
  get: (file?: string | undefined) => string[];
@@ -87,8 +86,9 @@ declare const getEngine: (conf: ConfigResultWithHooks) => {
87
86
  createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
88
87
  hooks: _pandacss_types.PandaHookable;
89
88
  path: string;
90
- config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "include" | "outdir" | "cwd">>;
89
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "outdir" | "cwd" | "include">>;
91
90
  tsconfig?: TSConfig | undefined;
91
+ tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
92
92
  tsconfigFile?: string | undefined;
93
93
  dependencies: string[];
94
94
  };
@@ -155,10 +155,10 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
155
155
  };
156
156
  parserOptions: {
157
157
  importMap: {
158
- css: string;
159
- recipe: string;
160
- pattern: string;
161
- jsx: string;
158
+ css: string[];
159
+ recipe: string[];
160
+ pattern: string[];
161
+ jsx: string[];
162
162
  };
163
163
  jsx: {
164
164
  factory: string;
@@ -177,17 +177,24 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
177
177
  match: RegExp;
178
178
  })[];
179
179
  };
180
- getRecipesByJsxName: (jsxName: string) => _pandacss_core_src_types.RecipeNode[];
181
- };
182
- patterns: {
183
- transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
184
- nodes: {
185
- type: "pattern";
180
+ getRecipesByJsxName: (jsxName: string) => {
186
181
  name: string;
187
- props: string[];
188
- baseName: string;
182
+ variantKeys: string[];
183
+ variantKeyMap: Record<string, string[]>;
184
+ jsx: (string | RegExp)[];
185
+ upperName: string;
186
+ dashName: string;
187
+ jsxName: string;
188
+ match: RegExp;
189
+ config: _pandacss_types.RecipeConfig;
190
+ splitProps: (props: _pandacss_types.Dict) => [_pandacss_types.Dict, _pandacss_types.Dict];
189
191
  }[];
192
+ compilerOptions: any;
193
+ tsOptions: _pandacss_types.ConfigTsOptions | undefined;
194
+ };
195
+ patterns: {
190
196
  patterns: Record<string, _pandacss_types.PatternConfig>;
197
+ transform: (name: string, data: _pandacss_types.Dict) => _pandacss_types.SystemStyleObject;
191
198
  getConfig: (name: string) => _pandacss_types.PatternConfig;
192
199
  getNames: (name: string) => {
193
200
  name: string;
@@ -206,6 +213,12 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
206
213
  styleFnName: string;
207
214
  jsxName: string;
208
215
  }[];
216
+ nodes: {
217
+ type: "pattern";
218
+ name: string;
219
+ props: string[];
220
+ baseName: string;
221
+ }[];
209
222
  getFnName: (jsx: string) => string;
210
223
  isEmpty: () => boolean;
211
224
  };
@@ -214,7 +227,7 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
214
227
  upperName: string;
215
228
  typeName: string;
216
229
  componentName: string;
217
- framework: ("solid" | "react" | "preact" | "vue" | "qwik") | undefined;
230
+ framework: ("react" | "solid" | "preact" | "vue" | "qwik") | undefined;
218
231
  };
219
232
  paths: {
220
233
  get: (file?: string | undefined) => string[];
@@ -260,8 +273,9 @@ declare const createGenerator: (conf: ConfigResultWithHooks) => {
260
273
  createSheet: (options?: Pick<_pandacss_core.StylesheetOptions, "content"> | undefined) => _pandacss_core.Stylesheet;
261
274
  hooks: _pandacss_types.PandaHookable;
262
275
  path: string;
263
- config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "include" | "outdir" | "cwd">>;
276
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config, "outdir" | "cwd" | "include">>;
264
277
  tsconfig?: TSConfig | undefined;
278
+ tsOptions?: _pandacss_types.ConfigTsOptions | undefined;
265
279
  tsconfigFile?: string | undefined;
266
280
  dependencies: string[];
267
281
  };
package/dist/index.js CHANGED
@@ -3442,10 +3442,10 @@ var defaults = (conf) => ({
3442
3442
  }
3443
3443
  });
3444
3444
  var getImportMap = (outdir) => ({
3445
- css: `${outdir}/css`,
3446
- recipe: `${outdir}/recipes`,
3447
- pattern: `${outdir}/patterns`,
3448
- jsx: `${outdir}/jsx`
3445
+ css: [outdir, "css"],
3446
+ recipe: [outdir, "recipes"],
3447
+ pattern: [outdir, "patterns"],
3448
+ jsx: [outdir, "jsx"]
3449
3449
  });
3450
3450
  var createGenerator = (conf) => {
3451
3451
  const ctx = getEngine(defaults(conf));
@@ -3453,7 +3453,7 @@ var createGenerator = (conf) => {
3453
3453
  const compilerOptions = conf.tsconfig?.compilerOptions ?? {};
3454
3454
  const baseUrl = compilerOptions.baseUrl ?? "";
3455
3455
  const cwd = conf.config.cwd;
3456
- const relativeBaseUrl = baseUrl ? baseUrl.replace(cwd, "").slice(1) + "/" : cwd;
3456
+ const relativeBaseUrl = baseUrl !== cwd ? baseUrl.replace(cwd, "").slice(1) : cwd;
3457
3457
  return {
3458
3458
  ...ctx,
3459
3459
  getArtifacts: generateArtifacts(ctx),
@@ -3467,7 +3467,9 @@ var createGenerator = (conf) => {
3467
3467
  isStyleProp: isValidProperty,
3468
3468
  nodes: [...patterns.nodes, ...recipes.nodes]
3469
3469
  },
3470
- getRecipesByJsxName: recipes.filter
3470
+ getRecipesByJsxName: recipes.filter,
3471
+ compilerOptions,
3472
+ tsOptions: conf.tsOptions
3471
3473
  }
3472
3474
  };
3473
3475
  };
package/dist/index.mjs CHANGED
@@ -3417,10 +3417,10 @@ var defaults = (conf) => ({
3417
3417
  }
3418
3418
  });
3419
3419
  var getImportMap = (outdir) => ({
3420
- css: `${outdir}/css`,
3421
- recipe: `${outdir}/recipes`,
3422
- pattern: `${outdir}/patterns`,
3423
- jsx: `${outdir}/jsx`
3420
+ css: [outdir, "css"],
3421
+ recipe: [outdir, "recipes"],
3422
+ pattern: [outdir, "patterns"],
3423
+ jsx: [outdir, "jsx"]
3424
3424
  });
3425
3425
  var createGenerator = (conf) => {
3426
3426
  const ctx = getEngine(defaults(conf));
@@ -3428,7 +3428,7 @@ var createGenerator = (conf) => {
3428
3428
  const compilerOptions = conf.tsconfig?.compilerOptions ?? {};
3429
3429
  const baseUrl = compilerOptions.baseUrl ?? "";
3430
3430
  const cwd = conf.config.cwd;
3431
- const relativeBaseUrl = baseUrl ? baseUrl.replace(cwd, "").slice(1) + "/" : cwd;
3431
+ const relativeBaseUrl = baseUrl !== cwd ? baseUrl.replace(cwd, "").slice(1) : cwd;
3432
3432
  return {
3433
3433
  ...ctx,
3434
3434
  getArtifacts: generateArtifacts(ctx),
@@ -3442,7 +3442,9 @@ var createGenerator = (conf) => {
3442
3442
  isStyleProp: isValidProperty,
3443
3443
  nodes: [...patterns.nodes, ...recipes.nodes]
3444
3444
  },
3445
- getRecipesByJsxName: recipes.filter
3445
+ getRecipesByJsxName: recipes.filter,
3446
+ compilerOptions,
3447
+ tsOptions: conf.tsOptions
3446
3448
  }
3447
3449
  };
3448
3450
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20230717175316",
3
+ "version": "0.0.0-dev-20230718154004",
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.25",
22
22
  "ts-pattern": "5.0.1",
23
- "@pandacss/core": "0.0.0-dev-20230717175316",
24
- "@pandacss/is-valid-prop": "0.0.0-dev-20230717175316",
25
- "@pandacss/logger": "0.0.0-dev-20230717175316",
26
- "@pandacss/shared": "0.0.0-dev-20230717175316",
27
- "@pandacss/token-dictionary": "0.0.0-dev-20230717175316",
28
- "@pandacss/types": "0.0.0-dev-20230717175316"
23
+ "@pandacss/core": "0.0.0-dev-20230718154004",
24
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230718154004",
25
+ "@pandacss/logger": "0.0.0-dev-20230718154004",
26
+ "@pandacss/shared": "0.0.0-dev-20230718154004",
27
+ "@pandacss/token-dictionary": "0.0.0-dev-20230718154004",
28
+ "@pandacss/types": "0.0.0-dev-20230718154004"
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-20230717175316"
33
+ "@pandacss/fixture": "0.0.0-dev-20230718154004"
34
34
  },
35
35
  "scripts": {
36
36
  "prebuild": "tsx scripts/prebuild.ts",