@pandacss/generator 0.0.0-dev-20230621130013 → 0.0.0-dev-20230621224245

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
@@ -2066,7 +2066,7 @@ var recipe_d_ts_default = {
2066
2066
 
2067
2067
  // src/artifacts/generated/pattern.d.ts.json
2068
2068
  var pattern_d_ts_default = {
2069
- content: "import type { CssProperty, SystemStyleObject } from './system-types'\nimport type { TokenCategory } from '../tokens'\n\ntype Primitive = string | number | boolean | null | undefined\ntype LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)\n\nexport type PatternProperty =\n | { type: 'property'; value: CssProperty }\n | { type: 'enum'; value: string[] }\n | { type: 'token'; value: TokenCategory; property?: CssProperty }\n | { type: 'string' | 'boolean' | 'number' }\n\nexport type PatternHelpers = {\n map: (value: any, fn: (value: string) => string | undefined) => any\n}\n\ntype PatternProperties = Record<string, PatternProperty>\n\ntype Props<T> = Record<LiteralUnion<keyof T>, any>\n\nexport type PatternConfig<T extends PatternProperties = PatternProperties> = {\n /**\n * The description of the pattern. This will be used in the JSDoc comment.\n */\n description?: string\n /**\n * The JSX element rendered by the pattern\n * @default 'div'\n */\n jsxElement?: string\n /**\n * The properties of the pattern.\n */\n properties: T\n /**\n * The css object this pattern will generate.\n */\n transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject\n /**\n * The jsx element name this pattern will generate.\n */\n jsx?: string\n /**\n * Whether to only generate types for the specified properties.\n * This will disallow css properties\n */\n strict?: boolean\n /**\n * @experimental\n * Disallow certain css properties for this pattern\n */\n blocklist?: LiteralUnion<CssProperty>[]\n}\n"
2069
+ content: "import type { CssProperty, SystemStyleObject } from './system-types'\nimport type { TokenCategory } from '../tokens'\n\ntype Primitive = string | number | boolean | null | undefined\ntype LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)\n\nexport type PatternProperty =\n | { type: 'property'; value: CssProperty }\n | { type: 'enum'; value: string[] }\n | { type: 'token'; value: TokenCategory; property?: CssProperty }\n | { type: 'string' | 'boolean' | 'number' }\n\nexport type PatternHelpers = {\n map: (value: any, fn: (value: string) => string | undefined) => any\n}\n\ntype PatternProperties = Record<string, PatternProperty>\n\ntype Props<T> = Record<LiteralUnion<keyof T>, any>\n\nexport type PatternConfig<T extends PatternProperties = PatternProperties> = {\n /**\n * The description of the pattern. This will be used in the JSDoc comment.\n */\n description?: string\n /**\n * The JSX element rendered by the pattern\n * @default 'div'\n */\n jsxElement?: string\n /**\n * The properties of the pattern.\n */\n properties?: T\n /**\n * The css object this pattern will generate.\n */\n transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject\n /**\n * The jsx element name this pattern will generate.\n */\n jsx?: string\n /**\n * Whether to only generate types for the specified properties.\n * This will disallow css properties\n */\n strict?: boolean\n /**\n * @experimental\n * Disallow certain css properties for this pattern\n */\n blocklist?: LiteralUnion<CssProperty>[]\n}\n"
2070
2070
  };
2071
2071
 
2072
2072
  // src/artifacts/generated/parts.d.ts.json
@@ -2724,7 +2724,7 @@ var getPatternEngine = (config) => {
2724
2724
  return Object.entries(patterns).map(([name, pattern]) => ({
2725
2725
  type: "pattern",
2726
2726
  name: pattern.jsx ?? (0, import_shared7.capitalize)(name),
2727
- props: Object.keys(pattern.properties),
2727
+ props: Object.keys(pattern?.properties ?? {}),
2728
2728
  baseName: name
2729
2729
  }));
2730
2730
  }),
package/dist/index.mjs CHANGED
@@ -2035,7 +2035,7 @@ var recipe_d_ts_default = {
2035
2035
 
2036
2036
  // src/artifacts/generated/pattern.d.ts.json
2037
2037
  var pattern_d_ts_default = {
2038
- content: "import type { CssProperty, SystemStyleObject } from './system-types'\nimport type { TokenCategory } from '../tokens'\n\ntype Primitive = string | number | boolean | null | undefined\ntype LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)\n\nexport type PatternProperty =\n | { type: 'property'; value: CssProperty }\n | { type: 'enum'; value: string[] }\n | { type: 'token'; value: TokenCategory; property?: CssProperty }\n | { type: 'string' | 'boolean' | 'number' }\n\nexport type PatternHelpers = {\n map: (value: any, fn: (value: string) => string | undefined) => any\n}\n\ntype PatternProperties = Record<string, PatternProperty>\n\ntype Props<T> = Record<LiteralUnion<keyof T>, any>\n\nexport type PatternConfig<T extends PatternProperties = PatternProperties> = {\n /**\n * The description of the pattern. This will be used in the JSDoc comment.\n */\n description?: string\n /**\n * The JSX element rendered by the pattern\n * @default 'div'\n */\n jsxElement?: string\n /**\n * The properties of the pattern.\n */\n properties: T\n /**\n * The css object this pattern will generate.\n */\n transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject\n /**\n * The jsx element name this pattern will generate.\n */\n jsx?: string\n /**\n * Whether to only generate types for the specified properties.\n * This will disallow css properties\n */\n strict?: boolean\n /**\n * @experimental\n * Disallow certain css properties for this pattern\n */\n blocklist?: LiteralUnion<CssProperty>[]\n}\n"
2038
+ content: "import type { CssProperty, SystemStyleObject } from './system-types'\nimport type { TokenCategory } from '../tokens'\n\ntype Primitive = string | number | boolean | null | undefined\ntype LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)\n\nexport type PatternProperty =\n | { type: 'property'; value: CssProperty }\n | { type: 'enum'; value: string[] }\n | { type: 'token'; value: TokenCategory; property?: CssProperty }\n | { type: 'string' | 'boolean' | 'number' }\n\nexport type PatternHelpers = {\n map: (value: any, fn: (value: string) => string | undefined) => any\n}\n\ntype PatternProperties = Record<string, PatternProperty>\n\ntype Props<T> = Record<LiteralUnion<keyof T>, any>\n\nexport type PatternConfig<T extends PatternProperties = PatternProperties> = {\n /**\n * The description of the pattern. This will be used in the JSDoc comment.\n */\n description?: string\n /**\n * The JSX element rendered by the pattern\n * @default 'div'\n */\n jsxElement?: string\n /**\n * The properties of the pattern.\n */\n properties?: T\n /**\n * The css object this pattern will generate.\n */\n transform?: (props: Props<T>, helpers: PatternHelpers) => SystemStyleObject\n /**\n * The jsx element name this pattern will generate.\n */\n jsx?: string\n /**\n * Whether to only generate types for the specified properties.\n * This will disallow css properties\n */\n strict?: boolean\n /**\n * @experimental\n * Disallow certain css properties for this pattern\n */\n blocklist?: LiteralUnion<CssProperty>[]\n}\n"
2039
2039
  };
2040
2040
 
2041
2041
  // src/artifacts/generated/parts.d.ts.json
@@ -2699,7 +2699,7 @@ var getPatternEngine = (config) => {
2699
2699
  return Object.entries(patterns).map(([name, pattern]) => ({
2700
2700
  type: "pattern",
2701
2701
  name: pattern.jsx ?? capitalize3(name),
2702
- props: Object.keys(pattern.properties),
2702
+ props: Object.keys(pattern?.properties ?? {}),
2703
2703
  baseName: name
2704
2704
  }));
2705
2705
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20230621130013",
3
+ "version": "0.0.0-dev-20230621224245",
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-20230621130013",
24
- "@pandacss/is-valid-prop": "0.0.0-dev-20230621130013",
25
- "@pandacss/logger": "0.0.0-dev-20230621130013",
26
- "@pandacss/shared": "0.0.0-dev-20230621130013",
27
- "@pandacss/token-dictionary": "0.0.0-dev-20230621130013",
28
- "@pandacss/types": "0.0.0-dev-20230621130013"
23
+ "@pandacss/core": "0.0.0-dev-20230621224245",
24
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230621224245",
25
+ "@pandacss/logger": "0.0.0-dev-20230621224245",
26
+ "@pandacss/token-dictionary": "0.0.0-dev-20230621224245",
27
+ "@pandacss/types": "0.0.0-dev-20230621224245",
28
+ "@pandacss/shared": "0.0.0-dev-20230621224245"
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-20230621130013"
33
+ "@pandacss/fixture": "0.0.0-dev-20230621224245"
34
34
  },
35
35
  "scripts": {
36
36
  "prebuild": "tsx scripts/prebuild.ts",