@pandacss/generator 0.0.0-dev-20230505100426 → 0.0.0-dev-20230505184831

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
@@ -1801,7 +1801,7 @@ var csstype_d_ts_default = {
1801
1801
 
1802
1802
  // src/artifacts/generated/system-types.d.ts.json
1803
1803
  var system_types_d_ts_default = {
1804
- content: "import type { ConditionalValue, Conditions, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type NativeCssProperties = PropertiesFallback<String | Number>\n\nexport type NativeCssProperty = keyof NativeCssProperties\n\nexport type CssProperties = NativeCssProperties & CssVarProperties\n\nexport type CssKeyframes = {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ntype MinimalNested<P> = {\n [K in keyof Conditions]?: Nested<P>\n}\n\ntype GenericProperties = {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<(SystemProperties | GenericProperties) & CssVarProperties>\n\nexport type GlobalStyleObject = {\n [selector: string]: SystemStyleObject\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<{\n [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}>\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\n\nexport type JsxStyleProps = SystemProperties &\n MinimalNested<SystemStyleObject> & {\n css?: SystemStyleObject\n }\n\ntype Assign<T, U> = Omit<T, keyof U> & U\n\ntype HTMLProps = {\n htmlSize?: string | number\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n}\n\ntype WithHTMLProps<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
1804
+ content: "import type { ConditionalValue, Conditions, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type CssProperty = keyof PropertiesFallback\n\nexport type CssProperties = PropertiesFallback<String | Number> & CssVarProperties\n\nexport type CssKeyframes = {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ntype MinimalNested<P> = {\n [K in keyof Conditions]?: Nested<P>\n}\n\ntype GenericProperties = {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<(SystemProperties | GenericProperties) & CssVarProperties>\n\nexport type GlobalStyleObject = {\n [selector: string]: SystemStyleObject\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<{\n [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}>\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\n\nexport type JsxStyleProps = SystemProperties &\n MinimalNested<SystemStyleObject> & {\n css?: SystemStyleObject\n }\n\ntype Assign<T, U> = Omit<T, keyof U> & U\n\ntype HTMLProps = {\n htmlSize?: string | number\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n}\n\ntype WithHTMLProps<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
1805
1805
  };
1806
1806
 
1807
1807
  // src/artifacts/generated/composition.d.ts.json
@@ -1879,11 +1879,11 @@ function generatePropTypes(ctx) {
1879
1879
  config: { strictTokens },
1880
1880
  utility
1881
1881
  } = ctx;
1882
- const strictText = `${strictTokens ? "" : " | NativeValue<T>"}`;
1882
+ const strictText = `${strictTokens ? "" : " | CssValue<T>"}`;
1883
1883
  const result = [
1884
1884
  import_outdent27.outdent`
1885
1885
  import type { ConditionalValue } from './conditions';
1886
- import type { Properties as CSSProperties } from './csstype'
1886
+ import type { CssProperties } from './system-types'
1887
1887
  import type { Tokens } from './tokens'
1888
1888
 
1889
1889
  type PropertyValueTypes = {`
@@ -1894,9 +1894,9 @@ function generatePropTypes(ctx) {
1894
1894
  }
1895
1895
  result.push("}", "\n");
1896
1896
  result.push(`
1897
- type NativeValue<T> = T extends keyof CSSProperties ? CSSProperties[T] : never
1897
+ type CssValue<T> = T extends keyof CssProperties ? CssProperties[T] : never
1898
1898
 
1899
- type Shorthand<T> = T extends keyof PropertyValueTypes ? PropertyValueTypes[T]${strictText} : NativeValue<T>
1899
+ type Shorthand<T> = T extends keyof PropertyValueTypes ? PropertyValueTypes[T]${strictText} : CssValue<T>
1900
1900
 
1901
1901
  export type PropertyTypes = PropertyValueTypes & {
1902
1902
  `);
@@ -1909,8 +1909,8 @@ function generatePropTypes(ctx) {
1909
1909
 
1910
1910
  export type PropertyValue<T extends string> = T extends keyof PropertyTypes
1911
1911
  ? ConditionalValue<PropertyTypes[T]${strictText}>
1912
- : T extends keyof CSSProperties
1913
- ? ConditionalValue<CSSProperties[T]>
1912
+ : T extends keyof CssProperties
1913
+ ? ConditionalValue<CssProperties[T]>
1914
1914
  : ConditionalValue<string | number>
1915
1915
  `;
1916
1916
  }
package/dist/index.mjs CHANGED
@@ -1770,7 +1770,7 @@ var csstype_d_ts_default = {
1770
1770
 
1771
1771
  // src/artifacts/generated/system-types.d.ts.json
1772
1772
  var system_types_d_ts_default = {
1773
- content: "import type { ConditionalValue, Conditions, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type NativeCssProperties = PropertiesFallback<String | Number>\n\nexport type NativeCssProperty = keyof NativeCssProperties\n\nexport type CssProperties = NativeCssProperties & CssVarProperties\n\nexport type CssKeyframes = {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ntype MinimalNested<P> = {\n [K in keyof Conditions]?: Nested<P>\n}\n\ntype GenericProperties = {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<(SystemProperties | GenericProperties) & CssVarProperties>\n\nexport type GlobalStyleObject = {\n [selector: string]: SystemStyleObject\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<{\n [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}>\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\n\nexport type JsxStyleProps = SystemProperties &\n MinimalNested<SystemStyleObject> & {\n css?: SystemStyleObject\n }\n\ntype Assign<T, U> = Omit<T, keyof U> & U\n\ntype HTMLProps = {\n htmlSize?: string | number\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n}\n\ntype WithHTMLProps<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
1773
+ content: "import type { ConditionalValue, Conditions, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type CssProperty = keyof PropertiesFallback\n\nexport type CssProperties = PropertiesFallback<String | Number> & CssVarProperties\n\nexport type CssKeyframes = {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ntype MinimalNested<P> = {\n [K in keyof Conditions]?: Nested<P>\n}\n\ntype GenericProperties = {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<(SystemProperties | GenericProperties) & CssVarProperties>\n\nexport type GlobalStyleObject = {\n [selector: string]: SystemStyleObject\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<{\n [K in Property]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}>\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\n\nexport type JsxStyleProps = SystemProperties &\n MinimalNested<SystemStyleObject> & {\n css?: SystemStyleObject\n }\n\ntype Assign<T, U> = Omit<T, keyof U> & U\n\ntype HTMLProps = {\n htmlSize?: string | number\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n}\n\ntype WithHTMLProps<T> = Omit<T, 'color' | 'translate' | 'transition' | 'width' | 'height' | 'size'> & HTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
1774
1774
  };
1775
1775
 
1776
1776
  // src/artifacts/generated/composition.d.ts.json
@@ -1848,11 +1848,11 @@ function generatePropTypes(ctx) {
1848
1848
  config: { strictTokens },
1849
1849
  utility
1850
1850
  } = ctx;
1851
- const strictText = `${strictTokens ? "" : " | NativeValue<T>"}`;
1851
+ const strictText = `${strictTokens ? "" : " | CssValue<T>"}`;
1852
1852
  const result = [
1853
1853
  outdent27`
1854
1854
  import type { ConditionalValue } from './conditions';
1855
- import type { Properties as CSSProperties } from './csstype'
1855
+ import type { CssProperties } from './system-types'
1856
1856
  import type { Tokens } from './tokens'
1857
1857
 
1858
1858
  type PropertyValueTypes = {`
@@ -1863,9 +1863,9 @@ function generatePropTypes(ctx) {
1863
1863
  }
1864
1864
  result.push("}", "\n");
1865
1865
  result.push(`
1866
- type NativeValue<T> = T extends keyof CSSProperties ? CSSProperties[T] : never
1866
+ type CssValue<T> = T extends keyof CssProperties ? CssProperties[T] : never
1867
1867
 
1868
- type Shorthand<T> = T extends keyof PropertyValueTypes ? PropertyValueTypes[T]${strictText} : NativeValue<T>
1868
+ type Shorthand<T> = T extends keyof PropertyValueTypes ? PropertyValueTypes[T]${strictText} : CssValue<T>
1869
1869
 
1870
1870
  export type PropertyTypes = PropertyValueTypes & {
1871
1871
  `);
@@ -1878,8 +1878,8 @@ function generatePropTypes(ctx) {
1878
1878
 
1879
1879
  export type PropertyValue<T extends string> = T extends keyof PropertyTypes
1880
1880
  ? ConditionalValue<PropertyTypes[T]${strictText}>
1881
- : T extends keyof CSSProperties
1882
- ? ConditionalValue<CSSProperties[T]>
1881
+ : T extends keyof CssProperties
1882
+ ? ConditionalValue<CssProperties[T]>
1883
1883
  : ConditionalValue<string | number>
1884
1884
  `;
1885
1885
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/generator",
3
- "version": "0.0.0-dev-20230505100426",
3
+ "version": "0.0.0-dev-20230505184831",
4
4
  "description": "The css generator for css panda",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -20,16 +20,16 @@
20
20
  "pluralize": "8.0.0",
21
21
  "postcss": "8.4.23",
22
22
  "ts-pattern": "4.2.2",
23
- "@pandacss/core": "0.0.0-dev-20230505100426",
24
- "@pandacss/logger": "0.0.0-dev-20230505100426",
25
- "@pandacss/is-valid-prop": "0.0.0-dev-20230505100426",
26
- "@pandacss/shared": "0.0.0-dev-20230505100426",
27
- "@pandacss/types": "0.0.0-dev-20230505100426",
28
- "@pandacss/token-dictionary": "0.0.0-dev-20230505100426"
23
+ "@pandacss/core": "0.0.0-dev-20230505184831",
24
+ "@pandacss/logger": "0.0.0-dev-20230505184831",
25
+ "@pandacss/is-valid-prop": "0.0.0-dev-20230505184831",
26
+ "@pandacss/shared": "0.0.0-dev-20230505184831",
27
+ "@pandacss/types": "0.0.0-dev-20230505184831",
28
+ "@pandacss/token-dictionary": "0.0.0-dev-20230505184831"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/pluralize": "0.0.29",
32
- "@pandacss/fixture": "0.0.0-dev-20230505100426"
32
+ "@pandacss/fixture": "0.0.0-dev-20230505184831"
33
33
  },
34
34
  "scripts": {
35
35
  "prebuild": "tsx scripts/prebuild.ts",