@pandacss/node 0.0.0-dev-20221128124624 → 0.0.0-dev-20221128134624

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 CHANGED
@@ -106,7 +106,6 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
106
106
  jsxFactory: string;
107
107
  cssVarRoot: string;
108
108
  properties: string[];
109
- isProperty: (prop: string) => boolean;
110
109
  extract: (fn: (file: string) => Promise<{
111
110
  css: string;
112
111
  file: string;
@@ -224,7 +223,6 @@ declare class Builder {
224
223
  jsxFactory: string;
225
224
  cssVarRoot: string;
226
225
  properties: string[];
227
- isProperty: (prop: string) => boolean;
228
226
  extract: (fn: (file: string) => Promise<{
229
227
  css: string;
230
228
  file: string;
@@ -340,7 +338,6 @@ declare function loadConfigAndCreateContext(options?: {
340
338
  jsxFactory: string;
341
339
  cssVarRoot: string;
342
340
  properties: string[];
343
- isProperty: (prop: string) => boolean;
344
341
  extract: (fn: (file: string) => Promise<{
345
342
  css: string;
346
343
  file: string;
package/dist/index.js CHANGED
@@ -1599,6 +1599,7 @@ var import_look_it_up2 = require("look-it-up");
1599
1599
  // src/context.ts
1600
1600
  var import_core3 = require("@pandacss/core");
1601
1601
  var import_error = require("@pandacss/error");
1602
+ var import_is_valid_prop2 = require("@pandacss/is-valid-prop");
1602
1603
  var import_logger4 = require("@pandacss/logger");
1603
1604
  var import_parser = require("@pandacss/parser");
1604
1605
  var import_shared11 = require("@pandacss/shared");
@@ -1667,6 +1668,7 @@ function createContext(conf, io = fileSystem) {
1667
1668
  semanticTokens,
1668
1669
  prefix: cssVarPrefix
1669
1670
  });
1671
+ const hasTokens = !tokens.isEmpty;
1670
1672
  import_logger4.logger.debug({ type: "ctx:token", msg: tokens.allNames });
1671
1673
  const utility = new import_core3.Utility({
1672
1674
  tokens,
@@ -1738,10 +1740,13 @@ function createContext(conf, io = fileSystem) {
1738
1740
  }
1739
1741
  const hasRecipes = Object.keys(recipes).length > 0;
1740
1742
  const properties = Array.from(/* @__PURE__ */ new Set(["css", ...utility.keys(), ...conditions.keys()]));
1741
- function isProperty(prop) {
1743
+ function isCustomCssProperty(prop) {
1742
1744
  const regex = new RegExp("^(?:" + properties.join("|") + ")$");
1743
1745
  return regex.test(prop);
1744
1746
  }
1747
+ function isStyleProp(prop) {
1748
+ return (0, import_is_valid_prop2.isCssProperty)(prop) || isCustomCssProperty(prop);
1749
+ }
1745
1750
  function getPath(str) {
1746
1751
  return (0, import_path3.join)(cwd, outdir, str);
1747
1752
  }
@@ -1855,7 +1860,7 @@ function createContext(conf, io = fileSystem) {
1855
1860
  importMap,
1856
1861
  jsx: {
1857
1862
  factory: jsxFactory,
1858
- isStyleProp: isProperty,
1863
+ isStyleProp,
1859
1864
  nodes: [...patternNodes, ...recipeNodes]
1860
1865
  }
1861
1866
  });
@@ -1944,7 +1949,7 @@ function createContext(conf, io = fileSystem) {
1944
1949
  writeOutput,
1945
1950
  cleanOutdir,
1946
1951
  tokens,
1947
- hasTokens: !tokens.isEmpty,
1952
+ hasTokens,
1948
1953
  utility,
1949
1954
  collectStyles,
1950
1955
  patterns,
@@ -1960,7 +1965,6 @@ function createContext(conf, io = fileSystem) {
1960
1965
  jsxFactory,
1961
1966
  cssVarRoot,
1962
1967
  properties,
1963
- isProperty,
1964
1968
  extract
1965
1969
  };
1966
1970
  }
package/dist/index.mjs CHANGED
@@ -1560,6 +1560,7 @@ import {
1560
1560
  Utility
1561
1561
  } from "@pandacss/core";
1562
1562
  import { NotFoundError } from "@pandacss/error";
1563
+ import { isCssProperty } from "@pandacss/is-valid-prop";
1563
1564
  import { logger as logger4 } from "@pandacss/logger";
1564
1565
  import { createParser, createProject } from "@pandacss/parser";
1565
1566
  import { capitalize as capitalize10, compact, mapObject, uncapitalize } from "@pandacss/shared";
@@ -1628,6 +1629,7 @@ function createContext(conf, io = fileSystem) {
1628
1629
  semanticTokens,
1629
1630
  prefix: cssVarPrefix
1630
1631
  });
1632
+ const hasTokens = !tokens.isEmpty;
1631
1633
  logger4.debug({ type: "ctx:token", msg: tokens.allNames });
1632
1634
  const utility = new Utility({
1633
1635
  tokens,
@@ -1699,10 +1701,13 @@ function createContext(conf, io = fileSystem) {
1699
1701
  }
1700
1702
  const hasRecipes = Object.keys(recipes).length > 0;
1701
1703
  const properties = Array.from(/* @__PURE__ */ new Set(["css", ...utility.keys(), ...conditions.keys()]));
1702
- function isProperty(prop) {
1704
+ function isCustomCssProperty(prop) {
1703
1705
  const regex = new RegExp("^(?:" + properties.join("|") + ")$");
1704
1706
  return regex.test(prop);
1705
1707
  }
1708
+ function isStyleProp(prop) {
1709
+ return isCssProperty(prop) || isCustomCssProperty(prop);
1710
+ }
1706
1711
  function getPath(str) {
1707
1712
  return join2(cwd, outdir, str);
1708
1713
  }
@@ -1816,7 +1821,7 @@ function createContext(conf, io = fileSystem) {
1816
1821
  importMap,
1817
1822
  jsx: {
1818
1823
  factory: jsxFactory,
1819
- isStyleProp: isProperty,
1824
+ isStyleProp,
1820
1825
  nodes: [...patternNodes, ...recipeNodes]
1821
1826
  }
1822
1827
  });
@@ -1905,7 +1910,7 @@ function createContext(conf, io = fileSystem) {
1905
1910
  writeOutput,
1906
1911
  cleanOutdir,
1907
1912
  tokens,
1908
- hasTokens: !tokens.isEmpty,
1913
+ hasTokens,
1909
1914
  utility,
1910
1915
  collectStyles,
1911
1916
  patterns,
@@ -1921,7 +1926,6 @@ function createContext(conf, io = fileSystem) {
1921
1926
  jsxFactory,
1922
1927
  cssVarRoot,
1923
1928
  properties,
1924
- isProperty,
1925
1929
  extract
1926
1930
  };
1927
1931
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20221128124624",
3
+ "version": "0.0.0-dev-20221128134624",
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-20221128124624",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20221128124624",
35
- "@pandacss/error": "0.0.0-dev-20221128124624",
36
- "@pandacss/parser": "0.0.0-dev-20221128124624",
37
- "@pandacss/shared": "0.0.0-dev-20221128124624",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20221128124624",
39
- "@pandacss/logger": "0.0.0-dev-20221128124624",
40
- "@pandacss/core": "0.0.0-dev-20221128124624",
41
- "@pandacss/config": "0.0.0-dev-20221128124624"
33
+ "@pandacss/types": "0.0.0-dev-20221128134624",
34
+ "@pandacss/is-valid-prop": "0.0.0-dev-20221128134624",
35
+ "@pandacss/error": "0.0.0-dev-20221128134624",
36
+ "@pandacss/parser": "0.0.0-dev-20221128134624",
37
+ "@pandacss/shared": "0.0.0-dev-20221128134624",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20221128134624",
39
+ "@pandacss/logger": "0.0.0-dev-20221128134624",
40
+ "@pandacss/core": "0.0.0-dev-20221128134624",
41
+ "@pandacss/config": "0.0.0-dev-20221128134624"
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-20221128124624"
49
+ "@pandacss/fixture": "0.0.0-dev-20221128134624"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",