@pandacss/node 0.0.0-dev-20221127205826 → 0.0.0-dev-20221128065048

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.
Files changed (3) hide show
  1. package/dist/index.js +13 -10
  2. package/dist/index.mjs +13 -10
  3. package/package.json +11 -11
package/dist/index.js CHANGED
@@ -242,7 +242,7 @@ function generateCx() {
242
242
  i = 0,
243
243
  arg
244
244
 
245
- while (i < arguments.length) {
245
+ for (; i < arguments.length; ) {
246
246
  if ((arg = arguments[i++]) && typeof arg === 'string') {
247
247
  str && (str += ' ')
248
248
  str += arg
@@ -255,6 +255,8 @@ function generateCx() {
255
255
  `,
256
256
  dts: import_outdent4.default`
257
257
  type Argument = string | boolean | null | undefined
258
+
259
+ /** Conditionally join classNames into a single string */
258
260
  export declare function cx(...args: Argument[]): string
259
261
  `
260
262
  };
@@ -479,7 +481,7 @@ function generate(name, pattern, jsxFactory) {
479
481
  `,
480
482
  dts: import_outdent8.outdent`
481
483
  import { ComponentProps, JSX, ComponentChildren } from 'preact';
482
- import { ${upperName}Options } from '../patterns/${(0, import_shared3.dashCase)(name)}'
484
+ import { ${upperName}Properties } from '../patterns/${(0, import_shared3.dashCase)(name)}'
483
485
  import { JSXStyleProperties, Assign } from '../types'
484
486
 
485
487
  type ElementType = keyof JSX.IntrinsicElements
@@ -490,7 +492,7 @@ function generate(name, pattern, jsxFactory) {
490
492
  type Polymorphic<C extends ElementType = 'div', P = {}> = JSXStyleProperties &
491
493
  Assign<Omit<PropsOf<C>, 'color'>, P & { as?: C }>
492
494
 
493
- type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Options>
495
+ type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Properties>
494
496
 
495
497
  export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
496
498
  `
@@ -670,7 +672,7 @@ function generate2(name, pattern, jsxFactory) {
670
672
  `,
671
673
  dts: import_outdent11.outdent`
672
674
  import { ComponentProps, ElementType, PropsWithChildren } from 'react'
673
- import { ${upperName}Options } from '../patterns/${(0, import_shared5.dashCase)(name)}'
675
+ import { ${upperName}Properties } from '../patterns/${(0, import_shared5.dashCase)(name)}'
674
676
  import { JSXStyleProperties, Assign } from '../types'
675
677
 
676
678
  type PropsOf<C extends ElementType> = ComponentProps<C>
@@ -678,7 +680,7 @@ function generate2(name, pattern, jsxFactory) {
678
680
  type Polymorphic<C extends ElementType = 'div', P = {}> = JSXStyleProperties &
679
681
  Assign<Omit<PropsOf<C>, 'color'>, P & { as?: C }>
680
682
 
681
- export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Options>
683
+ export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Properties>
682
684
 
683
685
  export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
684
686
  `
@@ -842,7 +844,7 @@ function generate3(name, pattern, jsxFactory) {
842
844
  `,
843
845
  dts: import_outdent14.outdent`
844
846
  import { ComponentProps, JSX } from 'solid-js'
845
- import { ${upperName}Options } from '../patterns/${(0, import_shared7.dashCase)(name)}'
847
+ import { ${upperName}Properties } from '../patterns/${(0, import_shared7.dashCase)(name)}'
846
848
  import { Assign, JSXStyleProperties } from '../types'
847
849
 
848
850
  type ElementType = keyof JSX.IntrinsicElements
@@ -851,7 +853,7 @@ function generate3(name, pattern, jsxFactory) {
851
853
  type Polymorphic<C extends ElementType = 'div', P = {}> = JSXStyleProperties &
852
854
  Assign<Omit<PropsOf<C>, 'color'>, P & { as?: C }>
853
855
 
854
- export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Options>
856
+ export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Properties>
855
857
 
856
858
  export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
857
859
  `
@@ -903,7 +905,7 @@ function generate4(name, pattern) {
903
905
  import { Properties } from "../types/csstype"
904
906
  import { Tokens } from "../types/token"
905
907
 
906
- export type ${(0, import_shared8.capitalize)(name)}Options = {
908
+ export type ${(0, import_shared8.capitalize)(name)}Properties = {
907
909
  ${Object.keys(properties ?? {}).map((key) => {
908
910
  const value = properties[key];
909
911
  return (0, import_ts_pattern4.match)(value).with({ type: "property" }, (value2) => {
@@ -921,10 +923,11 @@ function generate4(name, pattern) {
921
923
  }).join("\n ")}
922
924
  }
923
925
 
924
- ${strict ? import_outdent15.outdent`export declare function ${name}(options: ${(0, import_shared8.capitalize)(name)}Options): string` : import_outdent15.outdent`
926
+ ${strict ? import_outdent15.outdent`export declare function ${name}(options: ${(0, import_shared8.capitalize)(name)}Properties): string` : import_outdent15.outdent`
925
927
  type Merge<T> = Omit<SystemStyleObject, keyof T> & T
928
+
926
929
  ${description ? `/** ${description} */` : ""}
927
- export declare function ${name}(options: Merge<${(0, import_shared8.capitalize)(name)}Options>): string
930
+ export declare function ${name}(options: Merge<${(0, import_shared8.capitalize)(name)}Properties>): string
928
931
  `}
929
932
 
930
933
  `,
package/dist/index.mjs CHANGED
@@ -197,7 +197,7 @@ function generateCx() {
197
197
  i = 0,
198
198
  arg
199
199
 
200
- while (i < arguments.length) {
200
+ for (; i < arguments.length; ) {
201
201
  if ((arg = arguments[i++]) && typeof arg === 'string') {
202
202
  str && (str += ' ')
203
203
  str += arg
@@ -210,6 +210,8 @@ function generateCx() {
210
210
  `,
211
211
  dts: outdent4`
212
212
  type Argument = string | boolean | null | undefined
213
+
214
+ /** Conditionally join classNames into a single string */
213
215
  export declare function cx(...args: Argument[]): string
214
216
  `
215
217
  };
@@ -434,7 +436,7 @@ function generate(name, pattern, jsxFactory) {
434
436
  `,
435
437
  dts: outdent8`
436
438
  import { ComponentProps, JSX, ComponentChildren } from 'preact';
437
- import { ${upperName}Options } from '../patterns/${dashCase(name)}'
439
+ import { ${upperName}Properties } from '../patterns/${dashCase(name)}'
438
440
  import { JSXStyleProperties, Assign } from '../types'
439
441
 
440
442
  type ElementType = keyof JSX.IntrinsicElements
@@ -445,7 +447,7 @@ function generate(name, pattern, jsxFactory) {
445
447
  type Polymorphic<C extends ElementType = 'div', P = {}> = JSXStyleProperties &
446
448
  Assign<Omit<PropsOf<C>, 'color'>, P & { as?: C }>
447
449
 
448
- type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Options>
450
+ type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Properties>
449
451
 
450
452
  export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
451
453
  `
@@ -625,7 +627,7 @@ function generate2(name, pattern, jsxFactory) {
625
627
  `,
626
628
  dts: outdent11`
627
629
  import { ComponentProps, ElementType, PropsWithChildren } from 'react'
628
- import { ${upperName}Options } from '../patterns/${dashCase2(name)}'
630
+ import { ${upperName}Properties } from '../patterns/${dashCase2(name)}'
629
631
  import { JSXStyleProperties, Assign } from '../types'
630
632
 
631
633
  type PropsOf<C extends ElementType> = ComponentProps<C>
@@ -633,7 +635,7 @@ function generate2(name, pattern, jsxFactory) {
633
635
  type Polymorphic<C extends ElementType = 'div', P = {}> = JSXStyleProperties &
634
636
  Assign<Omit<PropsOf<C>, 'color'>, P & { as?: C }>
635
637
 
636
- export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Options>
638
+ export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Properties>
637
639
 
638
640
  export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
639
641
  `
@@ -797,7 +799,7 @@ function generate3(name, pattern, jsxFactory) {
797
799
  `,
798
800
  dts: outdent14`
799
801
  import { ComponentProps, JSX } from 'solid-js'
800
- import { ${upperName}Options } from '../patterns/${dashCase3(name)}'
802
+ import { ${upperName}Properties } from '../patterns/${dashCase3(name)}'
801
803
  import { Assign, JSXStyleProperties } from '../types'
802
804
 
803
805
  type ElementType = keyof JSX.IntrinsicElements
@@ -806,7 +808,7 @@ function generate3(name, pattern, jsxFactory) {
806
808
  type Polymorphic<C extends ElementType = 'div', P = {}> = JSXStyleProperties &
807
809
  Assign<Omit<PropsOf<C>, 'color'>, P & { as?: C }>
808
810
 
809
- export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Options>
811
+ export type ${jsxName}Props<C extends ElementType = 'div'> = Polymorphic<C, ${upperName}Properties>
810
812
 
811
813
  export declare function ${jsxName}<V extends ElementType>(props: ${jsxName}Props<V>): JSX.Element
812
814
  `
@@ -858,7 +860,7 @@ function generate4(name, pattern) {
858
860
  import { Properties } from "../types/csstype"
859
861
  import { Tokens } from "../types/token"
860
862
 
861
- export type ${capitalize7(name)}Options = {
863
+ export type ${capitalize7(name)}Properties = {
862
864
  ${Object.keys(properties ?? {}).map((key) => {
863
865
  const value = properties[key];
864
866
  return match4(value).with({ type: "property" }, (value2) => {
@@ -876,10 +878,11 @@ function generate4(name, pattern) {
876
878
  }).join("\n ")}
877
879
  }
878
880
 
879
- ${strict ? outdent15`export declare function ${name}(options: ${capitalize7(name)}Options): string` : outdent15`
881
+ ${strict ? outdent15`export declare function ${name}(options: ${capitalize7(name)}Properties): string` : outdent15`
880
882
  type Merge<T> = Omit<SystemStyleObject, keyof T> & T
883
+
881
884
  ${description ? `/** ${description} */` : ""}
882
- export declare function ${name}(options: Merge<${capitalize7(name)}Options>): string
885
+ export declare function ${name}(options: Merge<${capitalize7(name)}Properties>): string
883
886
  `}
884
887
 
885
888
  `,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20221127205826",
3
+ "version": "0.0.0-dev-20221128065048",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -30,15 +30,15 @@
30
30
  "telejson": "6.0.8",
31
31
  "ts-pattern": "4.0.6",
32
32
  "ts-morph": "17.0.1",
33
- "@pandacss/types": "0.0.0-dev-20221127205826",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20221127205826",
35
- "@pandacss/error": "0.0.0-dev-20221127205826",
36
- "@pandacss/parser": "0.0.0-dev-20221127205826",
37
- "@pandacss/shared": "0.0.0-dev-20221127205826",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20221127205826",
39
- "@pandacss/logger": "0.0.0-dev-20221127205826",
40
- "@pandacss/core": "0.0.0-dev-20221127205826",
41
- "@pandacss/config": "0.0.0-dev-20221127205826"
33
+ "@pandacss/types": "0.0.0-dev-20221128065048",
34
+ "@pandacss/is-valid-prop": "0.0.0-dev-20221128065048",
35
+ "@pandacss/error": "0.0.0-dev-20221128065048",
36
+ "@pandacss/parser": "0.0.0-dev-20221128065048",
37
+ "@pandacss/shared": "0.0.0-dev-20221128065048",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20221128065048",
39
+ "@pandacss/logger": "0.0.0-dev-20221128065048",
40
+ "@pandacss/core": "0.0.0-dev-20221128065048",
41
+ "@pandacss/config": "0.0.0-dev-20221128065048"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/fs-extra": "9.0.13",
@@ -46,7 +46,7 @@
46
46
  "@types/glob-parent": "^5.1.1",
47
47
  "@types/pluralize": "0.0.29",
48
48
  "@types/lodash.merge": "4.6.7",
49
- "@pandacss/fixture": "0.0.0-dev-20221127205826"
49
+ "@pandacss/fixture": "0.0.0-dev-20221128065048"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",