@pandacss/node 0.0.0-dev-20221215141248 → 0.0.0-dev-20221216174419
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.d.ts +3 -3
- package/dist/index.js +12 -17
- package/dist/index.mjs +9 -14
- package/package.json +11 -11
package/dist/index.d.ts
CHANGED
|
@@ -100,7 +100,7 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
|
|
|
100
100
|
}[];
|
|
101
101
|
getPatternFnName: (jsx: string) => string;
|
|
102
102
|
recipes: Record<string, RecipeConfig<_pandacss_types_dist_recipe.TVariants>>;
|
|
103
|
-
getRecipe: (name: string) => RecipeConfig;
|
|
103
|
+
getRecipe: (name: string) => RecipeConfig | undefined;
|
|
104
104
|
hasRecipes: boolean;
|
|
105
105
|
jsxFramework: "solid" | "react" | "preact" | undefined;
|
|
106
106
|
jsxFactory: string;
|
|
@@ -223,7 +223,7 @@ declare class Builder {
|
|
|
223
223
|
}[];
|
|
224
224
|
getPatternFnName: (jsx: string) => string;
|
|
225
225
|
recipes: Record<string, _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants>>;
|
|
226
|
-
getRecipe: (name: string) => _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants
|
|
226
|
+
getRecipe: (name: string) => _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants> | undefined;
|
|
227
227
|
hasRecipes: boolean;
|
|
228
228
|
jsxFramework: "solid" | "react" | "preact" | undefined;
|
|
229
229
|
jsxFactory: string;
|
|
@@ -338,7 +338,7 @@ declare function loadConfigAndCreateContext(options?: {
|
|
|
338
338
|
}[];
|
|
339
339
|
getPatternFnName: (jsx: string) => string;
|
|
340
340
|
recipes: Record<string, _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants>>;
|
|
341
|
-
getRecipe: (name: string) => _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants
|
|
341
|
+
getRecipe: (name: string) => _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants> | undefined;
|
|
342
342
|
hasRecipes: boolean;
|
|
343
343
|
jsxFramework: "solid" | "react" | "preact" | undefined;
|
|
344
344
|
jsxFactory: string;
|
package/dist/index.js
CHANGED
|
@@ -40,7 +40,7 @@ __export(src_exports, {
|
|
|
40
40
|
});
|
|
41
41
|
module.exports = __toCommonJS(src_exports);
|
|
42
42
|
|
|
43
|
-
// ../../node_modules/.pnpm/tsup@6.5.0_typescript@4.9.
|
|
43
|
+
// ../../node_modules/.pnpm/tsup@6.5.0_typescript@4.9.4/node_modules/tsup/assets/cjs_shims.js
|
|
44
44
|
var getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
45
45
|
var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
46
46
|
|
|
@@ -1041,7 +1041,7 @@ function generateRecipes(ctx) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
${description ? `/** ${description} */` : ""}
|
|
1044
|
-
export declare function ${name}(value
|
|
1044
|
+
export declare function ${name}(value?: ${(0, import_shared9.capitalize)(name)}Variants): string
|
|
1045
1045
|
`);
|
|
1046
1046
|
});
|
|
1047
1047
|
return {
|
|
@@ -1577,7 +1577,7 @@ function getBaseCss(ctx) {
|
|
|
1577
1577
|
|
|
1578
1578
|
// src/builder.ts
|
|
1579
1579
|
var import_core4 = require("@pandacss/core");
|
|
1580
|
-
var
|
|
1580
|
+
var import_error = require("@pandacss/error");
|
|
1581
1581
|
var import_logger5 = require("@pandacss/logger");
|
|
1582
1582
|
var import_shared12 = require("@pandacss/shared");
|
|
1583
1583
|
var import_fs4 = require("fs");
|
|
@@ -1590,7 +1590,6 @@ var import_look_it_up = require("look-it-up");
|
|
|
1590
1590
|
|
|
1591
1591
|
// src/context.ts
|
|
1592
1592
|
var import_core3 = require("@pandacss/core");
|
|
1593
|
-
var import_error = require("@pandacss/error");
|
|
1594
1593
|
var import_is_valid_prop2 = require("@pandacss/is-valid-prop");
|
|
1595
1594
|
var import_logger4 = require("@pandacss/logger");
|
|
1596
1595
|
var import_parser = require("@pandacss/parser");
|
|
@@ -1686,13 +1685,8 @@ function createContext(conf, io = fileSystem) {
|
|
|
1686
1685
|
helpers,
|
|
1687
1686
|
utility
|
|
1688
1687
|
});
|
|
1689
|
-
const patternExclude = ["layoutGrid"];
|
|
1690
1688
|
function getPattern(name) {
|
|
1691
|
-
|
|
1692
|
-
if (!pattern && !patternExclude.includes(name)) {
|
|
1693
|
-
throw new import_error.NotFoundError({ type: "pattern", name });
|
|
1694
|
-
}
|
|
1695
|
-
return pattern;
|
|
1689
|
+
return patterns[name];
|
|
1696
1690
|
}
|
|
1697
1691
|
function execPattern(name, data) {
|
|
1698
1692
|
const pattern = getPattern(name);
|
|
@@ -1709,11 +1703,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
1709
1703
|
}
|
|
1710
1704
|
const hasPatterns = Object.keys(patterns).length > 0;
|
|
1711
1705
|
function getRecipe(name) {
|
|
1712
|
-
|
|
1713
|
-
if (!recipe) {
|
|
1714
|
-
throw new import_error.NotFoundError({ type: "recipe", name });
|
|
1715
|
-
}
|
|
1716
|
-
return recipe;
|
|
1706
|
+
return recipes[name];
|
|
1717
1707
|
}
|
|
1718
1708
|
const recipeNodes = Object.entries(recipes).map(([name, recipe]) => ({
|
|
1719
1709
|
type: "recipe",
|
|
@@ -1785,6 +1775,8 @@ function createContext(conf, io = fileSystem) {
|
|
|
1785
1775
|
return io.read(fileName);
|
|
1786
1776
|
},
|
|
1787
1777
|
getFiles() {
|
|
1778
|
+
if (!(0, import_fs_extra2.existsSync)(chunks.dir))
|
|
1779
|
+
return [];
|
|
1788
1780
|
return (0, import_fs3.readdirSync)(chunks.dir);
|
|
1789
1781
|
},
|
|
1790
1782
|
format(file) {
|
|
@@ -1889,7 +1881,10 @@ function createContext(conf, io = fileSystem) {
|
|
|
1889
1881
|
collector.recipe.forEach((result, name) => {
|
|
1890
1882
|
try {
|
|
1891
1883
|
for (const item of result) {
|
|
1892
|
-
|
|
1884
|
+
const recipe = getRecipe(name);
|
|
1885
|
+
if (!recipe)
|
|
1886
|
+
continue;
|
|
1887
|
+
sheet.processRecipe(recipe, item.data);
|
|
1893
1888
|
}
|
|
1894
1889
|
} catch (error) {
|
|
1895
1890
|
import_logger4.logger.error({ err: error });
|
|
@@ -2024,7 +2019,7 @@ var builderCache = /* @__PURE__ */ new WeakMap();
|
|
|
2024
2019
|
function getConfigHash() {
|
|
2025
2020
|
const file = findConfig();
|
|
2026
2021
|
if (!file) {
|
|
2027
|
-
throw new
|
|
2022
|
+
throw new import_error.ConfigNotFoundError();
|
|
2028
2023
|
}
|
|
2029
2024
|
return (0, import_shared12.toHash)((0, import_fs4.readFileSync)(file, "utf-8"));
|
|
2030
2025
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -995,7 +995,7 @@ function generateRecipes(ctx) {
|
|
|
995
995
|
}
|
|
996
996
|
|
|
997
997
|
${description ? `/** ${description} */` : ""}
|
|
998
|
-
export declare function ${name}(value
|
|
998
|
+
export declare function ${name}(value?: ${capitalize8(name)}Variants): string
|
|
999
999
|
`);
|
|
1000
1000
|
});
|
|
1001
1001
|
return {
|
|
@@ -1550,7 +1550,6 @@ import {
|
|
|
1550
1550
|
Stylesheet as Stylesheet2,
|
|
1551
1551
|
Utility
|
|
1552
1552
|
} from "@pandacss/core";
|
|
1553
|
-
import { NotFoundError } from "@pandacss/error";
|
|
1554
1553
|
import { isCssProperty } from "@pandacss/is-valid-prop";
|
|
1555
1554
|
import { logger as logger4 } from "@pandacss/logger";
|
|
1556
1555
|
import { createParser, createProject } from "@pandacss/parser";
|
|
@@ -1646,13 +1645,8 @@ function createContext(conf, io = fileSystem) {
|
|
|
1646
1645
|
helpers,
|
|
1647
1646
|
utility
|
|
1648
1647
|
});
|
|
1649
|
-
const patternExclude = ["layoutGrid"];
|
|
1650
1648
|
function getPattern(name) {
|
|
1651
|
-
|
|
1652
|
-
if (!pattern && !patternExclude.includes(name)) {
|
|
1653
|
-
throw new NotFoundError({ type: "pattern", name });
|
|
1654
|
-
}
|
|
1655
|
-
return pattern;
|
|
1649
|
+
return patterns[name];
|
|
1656
1650
|
}
|
|
1657
1651
|
function execPattern(name, data) {
|
|
1658
1652
|
const pattern = getPattern(name);
|
|
@@ -1669,11 +1663,7 @@ function createContext(conf, io = fileSystem) {
|
|
|
1669
1663
|
}
|
|
1670
1664
|
const hasPatterns = Object.keys(patterns).length > 0;
|
|
1671
1665
|
function getRecipe(name) {
|
|
1672
|
-
|
|
1673
|
-
if (!recipe) {
|
|
1674
|
-
throw new NotFoundError({ type: "recipe", name });
|
|
1675
|
-
}
|
|
1676
|
-
return recipe;
|
|
1666
|
+
return recipes[name];
|
|
1677
1667
|
}
|
|
1678
1668
|
const recipeNodes = Object.entries(recipes).map(([name, recipe]) => ({
|
|
1679
1669
|
type: "recipe",
|
|
@@ -1745,6 +1735,8 @@ function createContext(conf, io = fileSystem) {
|
|
|
1745
1735
|
return io.read(fileName);
|
|
1746
1736
|
},
|
|
1747
1737
|
getFiles() {
|
|
1738
|
+
if (!existsSync(chunks.dir))
|
|
1739
|
+
return [];
|
|
1748
1740
|
return readdirSync(chunks.dir);
|
|
1749
1741
|
},
|
|
1750
1742
|
format(file) {
|
|
@@ -1849,7 +1841,10 @@ function createContext(conf, io = fileSystem) {
|
|
|
1849
1841
|
collector.recipe.forEach((result, name) => {
|
|
1850
1842
|
try {
|
|
1851
1843
|
for (const item of result) {
|
|
1852
|
-
|
|
1844
|
+
const recipe = getRecipe(name);
|
|
1845
|
+
if (!recipe)
|
|
1846
|
+
continue;
|
|
1847
|
+
sheet.processRecipe(recipe, item.data);
|
|
1853
1848
|
}
|
|
1854
1849
|
} catch (error) {
|
|
1855
1850
|
logger4.error({ err: error });
|
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-20221216174419",
|
|
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": "7.0.4",
|
|
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-20221216174419",
|
|
34
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20221216174419",
|
|
35
|
+
"@pandacss/error": "0.0.0-dev-20221216174419",
|
|
36
|
+
"@pandacss/parser": "0.0.0-dev-20221216174419",
|
|
37
|
+
"@pandacss/shared": "0.0.0-dev-20221216174419",
|
|
38
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20221216174419",
|
|
39
|
+
"@pandacss/logger": "0.0.0-dev-20221216174419",
|
|
40
|
+
"@pandacss/core": "0.0.0-dev-20221216174419",
|
|
41
|
+
"@pandacss/config": "0.0.0-dev-20221216174419"
|
|
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-20221216174419"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|