@pandacss/generator 0.0.0-dev-20230511105643 → 0.0.0-dev-20230511141116
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 +7 -5
- package/dist/index.mjs +7 -5
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -626,7 +626,7 @@ function generatePattern(ctx) {
|
|
|
626
626
|
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
627
627
|
import type { PropertyValue } from '../types/prop-type'
|
|
628
628
|
import type { Properties } from '../types/csstype'
|
|
629
|
-
import type { Tokens } from '../tokens
|
|
629
|
+
import type { Tokens } from '../tokens'
|
|
630
630
|
|
|
631
631
|
export type ${upperName}Properties = {
|
|
632
632
|
${Object.keys(properties ?? {}).map((key) => {
|
|
@@ -807,6 +807,8 @@ function generateTokenJs(ctx) {
|
|
|
807
807
|
(path: Token, fallback?: string): string
|
|
808
808
|
var: (path: Token, fallback?: string) => string
|
|
809
809
|
}
|
|
810
|
+
|
|
811
|
+
export * from './tokens'
|
|
810
812
|
`
|
|
811
813
|
};
|
|
812
814
|
}
|
|
@@ -1625,7 +1627,7 @@ function generatePropTypes(ctx) {
|
|
|
1625
1627
|
import_outdent22.outdent`
|
|
1626
1628
|
import type { ConditionalValue } from './conditions';
|
|
1627
1629
|
import type { CssProperties } from './system-types'
|
|
1628
|
-
import type { Tokens } from '
|
|
1630
|
+
import type { Tokens } from '../tokens'
|
|
1629
1631
|
|
|
1630
1632
|
type PropertyValueTypes = {`
|
|
1631
1633
|
];
|
|
@@ -1664,7 +1666,7 @@ function generateStyleProps(ctx) {
|
|
|
1664
1666
|
return import_outdent23.default`
|
|
1665
1667
|
import { ConditionalValue } from './conditions'
|
|
1666
1668
|
import { PropertyValue } from './prop-type'
|
|
1667
|
-
import { Token } from '
|
|
1669
|
+
import { Token } from '../tokens'
|
|
1668
1670
|
|
|
1669
1671
|
export type CssVarProperties = {
|
|
1670
1672
|
[key in \`--\${string}\`]?: ConditionalValue<Token | (string & {}) | (number & {})>
|
|
@@ -1712,9 +1714,9 @@ function generateTokenTypes(ctx) {
|
|
|
1712
1714
|
} else {
|
|
1713
1715
|
for (const [key, value] of tokens.categoryMap.entries()) {
|
|
1714
1716
|
const typeName = (0, import_shared3.capitalize)(import_pluralize.default.singular(key));
|
|
1715
|
-
set.add(`export type ${typeName} = ${(0, import_shared3.unionType)(value.keys())}`);
|
|
1717
|
+
set.add(`export type ${typeName}Token = ${(0, import_shared3.unionType)(value.keys())}`);
|
|
1716
1718
|
set.add(`export type ColorPalette = ${(0, import_shared3.unionType)(Object.keys(tokens.colorPalettes))}`);
|
|
1717
|
-
result.add(` ${key}: ${typeName}`);
|
|
1719
|
+
result.add(` ${key}: ${typeName}Token`);
|
|
1718
1720
|
}
|
|
1719
1721
|
}
|
|
1720
1722
|
result.add("} & { [token: string]: never }");
|
package/dist/index.mjs
CHANGED
|
@@ -595,7 +595,7 @@ function generatePattern(ctx) {
|
|
|
595
595
|
import type { SystemStyleObject, ConditionalValue } from '../types'
|
|
596
596
|
import type { PropertyValue } from '../types/prop-type'
|
|
597
597
|
import type { Properties } from '../types/csstype'
|
|
598
|
-
import type { Tokens } from '../tokens
|
|
598
|
+
import type { Tokens } from '../tokens'
|
|
599
599
|
|
|
600
600
|
export type ${upperName}Properties = {
|
|
601
601
|
${Object.keys(properties ?? {}).map((key) => {
|
|
@@ -776,6 +776,8 @@ function generateTokenJs(ctx) {
|
|
|
776
776
|
(path: Token, fallback?: string): string
|
|
777
777
|
var: (path: Token, fallback?: string) => string
|
|
778
778
|
}
|
|
779
|
+
|
|
780
|
+
export * from './tokens'
|
|
779
781
|
`
|
|
780
782
|
};
|
|
781
783
|
}
|
|
@@ -1594,7 +1596,7 @@ function generatePropTypes(ctx) {
|
|
|
1594
1596
|
outdent22`
|
|
1595
1597
|
import type { ConditionalValue } from './conditions';
|
|
1596
1598
|
import type { CssProperties } from './system-types'
|
|
1597
|
-
import type { Tokens } from '
|
|
1599
|
+
import type { Tokens } from '../tokens'
|
|
1598
1600
|
|
|
1599
1601
|
type PropertyValueTypes = {`
|
|
1600
1602
|
];
|
|
@@ -1633,7 +1635,7 @@ function generateStyleProps(ctx) {
|
|
|
1633
1635
|
return outdent23`
|
|
1634
1636
|
import { ConditionalValue } from './conditions'
|
|
1635
1637
|
import { PropertyValue } from './prop-type'
|
|
1636
|
-
import { Token } from '
|
|
1638
|
+
import { Token } from '../tokens'
|
|
1637
1639
|
|
|
1638
1640
|
export type CssVarProperties = {
|
|
1639
1641
|
[key in \`--\${string}\`]?: ConditionalValue<Token | (string & {}) | (number & {})>
|
|
@@ -1681,9 +1683,9 @@ function generateTokenTypes(ctx) {
|
|
|
1681
1683
|
} else {
|
|
1682
1684
|
for (const [key, value] of tokens.categoryMap.entries()) {
|
|
1683
1685
|
const typeName = capitalize(pluralize.singular(key));
|
|
1684
|
-
set.add(`export type ${typeName} = ${unionType3(value.keys())}`);
|
|
1686
|
+
set.add(`export type ${typeName}Token = ${unionType3(value.keys())}`);
|
|
1685
1687
|
set.add(`export type ColorPalette = ${unionType3(Object.keys(tokens.colorPalettes))}`);
|
|
1686
|
-
result.add(` ${key}: ${typeName}`);
|
|
1688
|
+
result.add(` ${key}: ${typeName}Token`);
|
|
1687
1689
|
}
|
|
1688
1690
|
}
|
|
1689
1691
|
result.add("} & { [token: string]: never }");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/generator",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20230511141116",
|
|
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.3.0",
|
|
23
|
-
"@pandacss/core": "0.0.0-dev-
|
|
24
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
25
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
26
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
27
|
-
"@pandacss/types": "0.0.0-dev-
|
|
28
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
23
|
+
"@pandacss/core": "0.0.0-dev-20230511141116",
|
|
24
|
+
"@pandacss/logger": "0.0.0-dev-20230511141116",
|
|
25
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230511141116",
|
|
26
|
+
"@pandacss/shared": "0.0.0-dev-20230511141116",
|
|
27
|
+
"@pandacss/types": "0.0.0-dev-20230511141116",
|
|
28
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230511141116"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/pluralize": "0.0.29",
|
|
32
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
32
|
+
"@pandacss/fixture": "0.0.0-dev-20230511141116"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"prebuild": "tsx scripts/prebuild.ts",
|