@pandacss/generator 0.0.0-dev-20230426200638 → 0.0.0-dev-20230426205911
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 +26 -3
- package/dist/index.mjs +26 -3
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1797,7 +1797,7 @@ var csstype_d_ts_default = {
|
|
|
1797
1797
|
|
|
1798
1798
|
// src/artifacts/generated/system-types.d.ts.json
|
|
1799
1799
|
var system_types_d_ts_default = {
|
|
1800
|
-
content: "import type { ConditionalValue, Conditions, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\
|
|
1800
|
+
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"
|
|
1801
1801
|
};
|
|
1802
1802
|
|
|
1803
1803
|
// src/artifacts/generated/composition.d.ts.json
|
|
@@ -1920,11 +1920,11 @@ function generateStyleProps(ctx) {
|
|
|
1920
1920
|
import { PropertyValue } from './prop-type'
|
|
1921
1921
|
import { Token } from './token'
|
|
1922
1922
|
|
|
1923
|
-
type CssVarProperties = {
|
|
1923
|
+
export type CssVarProperties = {
|
|
1924
1924
|
[key in \`--\${string}\`]?: Token | (string & {}) | (number & {})
|
|
1925
1925
|
}
|
|
1926
1926
|
|
|
1927
|
-
export type SystemProperties =
|
|
1927
|
+
export type SystemProperties = {
|
|
1928
1928
|
${Array.from(props).map((v) => ` ${v}?: PropertyValue<'${v}'>`).join("\n")}
|
|
1929
1929
|
}
|
|
1930
1930
|
`;
|
|
@@ -1934,6 +1934,28 @@ function generateStyleProps(ctx) {
|
|
|
1934
1934
|
var import_shared3 = require("@pandacss/shared");
|
|
1935
1935
|
var import_outdent29 = require("outdent");
|
|
1936
1936
|
var import_pluralize = __toESM(require("pluralize"));
|
|
1937
|
+
var categories = [
|
|
1938
|
+
"zIndex",
|
|
1939
|
+
"opacity",
|
|
1940
|
+
"colors",
|
|
1941
|
+
"fonts",
|
|
1942
|
+
"fontSizes",
|
|
1943
|
+
"fontWeights",
|
|
1944
|
+
"lineHeights",
|
|
1945
|
+
"letterSpacings",
|
|
1946
|
+
"sizes",
|
|
1947
|
+
"shadows",
|
|
1948
|
+
"spacing",
|
|
1949
|
+
"radii",
|
|
1950
|
+
"borders",
|
|
1951
|
+
"durations",
|
|
1952
|
+
"easings",
|
|
1953
|
+
"animations",
|
|
1954
|
+
"blurs",
|
|
1955
|
+
"gradients",
|
|
1956
|
+
"breakpoints",
|
|
1957
|
+
"assets"
|
|
1958
|
+
];
|
|
1937
1959
|
function generateTokenTypes(ctx) {
|
|
1938
1960
|
const { tokens } = ctx;
|
|
1939
1961
|
const set = /* @__PURE__ */ new Set();
|
|
@@ -1951,6 +1973,7 @@ function generateTokenTypes(ctx) {
|
|
|
1951
1973
|
}
|
|
1952
1974
|
result.add("} & { [token: string]: never }");
|
|
1953
1975
|
set.add(Array.from(result).join("\n"));
|
|
1976
|
+
set.add(`export type TokenCategory = ${(0, import_shared3.unionType)(categories)}`);
|
|
1954
1977
|
return import_outdent29.outdent.string(Array.from(set).join("\n\n"));
|
|
1955
1978
|
}
|
|
1956
1979
|
|
package/dist/index.mjs
CHANGED
|
@@ -1766,7 +1766,7 @@ var csstype_d_ts_default = {
|
|
|
1766
1766
|
|
|
1767
1767
|
// src/artifacts/generated/system-types.d.ts.json
|
|
1768
1768
|
var system_types_d_ts_default = {
|
|
1769
|
-
content: "import type { ConditionalValue, Conditions, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\
|
|
1769
|
+
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"
|
|
1770
1770
|
};
|
|
1771
1771
|
|
|
1772
1772
|
// src/artifacts/generated/composition.d.ts.json
|
|
@@ -1889,11 +1889,11 @@ function generateStyleProps(ctx) {
|
|
|
1889
1889
|
import { PropertyValue } from './prop-type'
|
|
1890
1890
|
import { Token } from './token'
|
|
1891
1891
|
|
|
1892
|
-
type CssVarProperties = {
|
|
1892
|
+
export type CssVarProperties = {
|
|
1893
1893
|
[key in \`--\${string}\`]?: Token | (string & {}) | (number & {})
|
|
1894
1894
|
}
|
|
1895
1895
|
|
|
1896
|
-
export type SystemProperties =
|
|
1896
|
+
export type SystemProperties = {
|
|
1897
1897
|
${Array.from(props).map((v) => ` ${v}?: PropertyValue<'${v}'>`).join("\n")}
|
|
1898
1898
|
}
|
|
1899
1899
|
`;
|
|
@@ -1903,6 +1903,28 @@ function generateStyleProps(ctx) {
|
|
|
1903
1903
|
import { capitalize, unionType as unionType3 } from "@pandacss/shared";
|
|
1904
1904
|
import { outdent as outdent29 } from "outdent";
|
|
1905
1905
|
import pluralize from "pluralize";
|
|
1906
|
+
var categories = [
|
|
1907
|
+
"zIndex",
|
|
1908
|
+
"opacity",
|
|
1909
|
+
"colors",
|
|
1910
|
+
"fonts",
|
|
1911
|
+
"fontSizes",
|
|
1912
|
+
"fontWeights",
|
|
1913
|
+
"lineHeights",
|
|
1914
|
+
"letterSpacings",
|
|
1915
|
+
"sizes",
|
|
1916
|
+
"shadows",
|
|
1917
|
+
"spacing",
|
|
1918
|
+
"radii",
|
|
1919
|
+
"borders",
|
|
1920
|
+
"durations",
|
|
1921
|
+
"easings",
|
|
1922
|
+
"animations",
|
|
1923
|
+
"blurs",
|
|
1924
|
+
"gradients",
|
|
1925
|
+
"breakpoints",
|
|
1926
|
+
"assets"
|
|
1927
|
+
];
|
|
1906
1928
|
function generateTokenTypes(ctx) {
|
|
1907
1929
|
const { tokens } = ctx;
|
|
1908
1930
|
const set = /* @__PURE__ */ new Set();
|
|
@@ -1920,6 +1942,7 @@ function generateTokenTypes(ctx) {
|
|
|
1920
1942
|
}
|
|
1921
1943
|
result.add("} & { [token: string]: never }");
|
|
1922
1944
|
set.add(Array.from(result).join("\n"));
|
|
1945
|
+
set.add(`export type TokenCategory = ${unionType3(categories)}`);
|
|
1923
1946
|
return outdent29.string(Array.from(set).join("\n\n"));
|
|
1924
1947
|
}
|
|
1925
1948
|
|
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-20230426205911",
|
|
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-
|
|
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-20230426205911",
|
|
24
|
+
"@pandacss/logger": "0.0.0-dev-20230426205911",
|
|
25
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230426205911",
|
|
26
|
+
"@pandacss/shared": "0.0.0-dev-20230426205911",
|
|
27
|
+
"@pandacss/types": "0.0.0-dev-20230426205911",
|
|
28
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230426205911"
|
|
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-20230426205911"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"prebuild": "tsx scripts/prebuild.ts",
|