@pandacss/node 0.0.0-dev-20221127080731 → 0.0.0-dev-20221127082405
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 +9 -6
- package/dist/index.mjs +9 -6
- package/package.json +11 -11
package/dist/index.js
CHANGED
|
@@ -895,7 +895,7 @@ var import_outdent15 = require("outdent");
|
|
|
895
895
|
var import_telejson = require("telejson");
|
|
896
896
|
var import_ts_pattern4 = require("ts-pattern");
|
|
897
897
|
function generate4(name, pattern) {
|
|
898
|
-
const { properties, transform, strict } = pattern;
|
|
898
|
+
const { properties, transform, strict, description } = pattern;
|
|
899
899
|
return {
|
|
900
900
|
name: (0, import_shared8.dashCase)(name),
|
|
901
901
|
dts: import_outdent15.outdent`
|
|
@@ -923,6 +923,7 @@ function generate4(name, pattern) {
|
|
|
923
923
|
|
|
924
924
|
${strict ? import_outdent15.outdent`export declare function ${name}(options: ${(0, import_shared8.capitalize)(name)}Options): string` : import_outdent15.outdent`
|
|
925
925
|
type Merge<T> = Omit<SystemStyleObject, keyof T> & T
|
|
926
|
+
${description ? `/** ${description} */` : ""}
|
|
926
927
|
export declare function ${name}(options: Merge<${(0, import_shared8.capitalize)(name)}Options>): string
|
|
927
928
|
`}
|
|
928
929
|
|
|
@@ -1016,21 +1017,23 @@ function generateRecipes(ctx) {
|
|
|
1016
1017
|
];
|
|
1017
1018
|
const dts = [""];
|
|
1018
1019
|
Object.values(recipes).forEach((recipe) => {
|
|
1020
|
+
const { name, description, defaultVariants, variants } = recipe;
|
|
1019
1021
|
js.push(import_outdent17.outdent`
|
|
1020
|
-
export const ${
|
|
1022
|
+
export const ${name} = createRecipe('${name}', ${JSON.stringify(defaultVariants ?? {})})
|
|
1021
1023
|
`);
|
|
1022
1024
|
dts.push(import_outdent17.outdent`
|
|
1023
1025
|
import { ConditionalValue } from "../types"
|
|
1024
1026
|
|
|
1025
|
-
export type ${(0, import_shared9.capitalize)(
|
|
1026
|
-
${Object.keys(
|
|
1027
|
-
const value =
|
|
1027
|
+
export type ${(0, import_shared9.capitalize)(name)}Value = {
|
|
1028
|
+
${Object.keys(variants ?? {}).map((key) => {
|
|
1029
|
+
const value = variants[key];
|
|
1028
1030
|
const keys = Object.keys(value);
|
|
1029
1031
|
return `${key}?: ConditionalValue<${(0, import_shared9.unionType)(keys)}>`;
|
|
1030
1032
|
}).join("\n")}
|
|
1031
1033
|
}
|
|
1032
1034
|
|
|
1033
|
-
|
|
1035
|
+
${description ? `/** ${description} */` : ""}
|
|
1036
|
+
export declare function ${name}(value: ${(0, import_shared9.capitalize)(name)}Value): string
|
|
1034
1037
|
`);
|
|
1035
1038
|
});
|
|
1036
1039
|
return {
|
package/dist/index.mjs
CHANGED
|
@@ -850,7 +850,7 @@ import { outdent as outdent15 } from "outdent";
|
|
|
850
850
|
import { stringify as stringify2 } from "telejson";
|
|
851
851
|
import { match as match4 } from "ts-pattern";
|
|
852
852
|
function generate4(name, pattern) {
|
|
853
|
-
const { properties, transform, strict } = pattern;
|
|
853
|
+
const { properties, transform, strict, description } = pattern;
|
|
854
854
|
return {
|
|
855
855
|
name: dashCase4(name),
|
|
856
856
|
dts: outdent15`
|
|
@@ -878,6 +878,7 @@ function generate4(name, pattern) {
|
|
|
878
878
|
|
|
879
879
|
${strict ? outdent15`export declare function ${name}(options: ${capitalize7(name)}Options): string` : outdent15`
|
|
880
880
|
type Merge<T> = Omit<SystemStyleObject, keyof T> & T
|
|
881
|
+
${description ? `/** ${description} */` : ""}
|
|
881
882
|
export declare function ${name}(options: Merge<${capitalize7(name)}Options>): string
|
|
882
883
|
`}
|
|
883
884
|
|
|
@@ -971,21 +972,23 @@ function generateRecipes(ctx) {
|
|
|
971
972
|
];
|
|
972
973
|
const dts = [""];
|
|
973
974
|
Object.values(recipes).forEach((recipe) => {
|
|
975
|
+
const { name, description, defaultVariants, variants } = recipe;
|
|
974
976
|
js.push(outdent17`
|
|
975
|
-
export const ${
|
|
977
|
+
export const ${name} = createRecipe('${name}', ${JSON.stringify(defaultVariants ?? {})})
|
|
976
978
|
`);
|
|
977
979
|
dts.push(outdent17`
|
|
978
980
|
import { ConditionalValue } from "../types"
|
|
979
981
|
|
|
980
|
-
export type ${capitalize8(
|
|
981
|
-
${Object.keys(
|
|
982
|
-
const value =
|
|
982
|
+
export type ${capitalize8(name)}Value = {
|
|
983
|
+
${Object.keys(variants ?? {}).map((key) => {
|
|
984
|
+
const value = variants[key];
|
|
983
985
|
const keys = Object.keys(value);
|
|
984
986
|
return `${key}?: ConditionalValue<${unionType3(keys)}>`;
|
|
985
987
|
}).join("\n")}
|
|
986
988
|
}
|
|
987
989
|
|
|
988
|
-
|
|
990
|
+
${description ? `/** ${description} */` : ""}
|
|
991
|
+
export declare function ${name}(value: ${capitalize8(name)}Value): string
|
|
989
992
|
`);
|
|
990
993
|
});
|
|
991
994
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20221127082405",
|
|
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-
|
|
34
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
35
|
-
"@pandacss/error": "0.0.0-dev-
|
|
36
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
37
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
38
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
39
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
40
|
-
"@pandacss/core": "0.0.0-dev-
|
|
41
|
-
"@pandacss/config": "0.0.0-dev-
|
|
33
|
+
"@pandacss/types": "0.0.0-dev-20221127082405",
|
|
34
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20221127082405",
|
|
35
|
+
"@pandacss/error": "0.0.0-dev-20221127082405",
|
|
36
|
+
"@pandacss/parser": "0.0.0-dev-20221127082405",
|
|
37
|
+
"@pandacss/shared": "0.0.0-dev-20221127082405",
|
|
38
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20221127082405",
|
|
39
|
+
"@pandacss/logger": "0.0.0-dev-20221127082405",
|
|
40
|
+
"@pandacss/core": "0.0.0-dev-20221127082405",
|
|
41
|
+
"@pandacss/config": "0.0.0-dev-20221127082405"
|
|
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-
|
|
49
|
+
"@pandacss/fixture": "0.0.0-dev-20221127082405"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|