@pandacss/node 0.0.0-dev-20221219162854 → 0.0.0-dev-20221220144042

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
@@ -1,12 +1,13 @@
1
1
  import * as _pandacss_core from '@pandacss/core';
2
2
  import { StylesheetContext, Conditions, Utility } from '@pandacss/core';
3
3
  export { discardDuplicate } from '@pandacss/core';
4
- import * as _pandacss_types_dist_composition from '@pandacss/types/dist/composition';
5
- import * as _pandacss_types_dist_recipe from '@pandacss/types/dist/recipe';
6
4
  import * as _pandacss_types_dist_system_types from '@pandacss/types/dist/system-types';
7
5
  import * as ts_morph from 'ts-morph';
6
+ import * as _pandacss_types_dist_shared from '@pandacss/types/dist/shared';
7
+ import * as _pandacss_types_dist_recipe from '@pandacss/types/dist/recipe';
8
+ import * as _pandacss_types_dist_composition from '@pandacss/types/dist/composition';
8
9
  import * as _pandacss_types from '@pandacss/types';
9
- import { PatternConfig, RecipeConfig, Dict, Config } from '@pandacss/types';
10
+ import { Dict, RecipeConfig, PatternConfig, Config } from '@pandacss/types';
10
11
  import * as _pandacss_config from '@pandacss/config';
11
12
  import { LoadConfigResult } from '@pandacss/config';
12
13
  import * as _pandacss_parser from '@pandacss/parser';
@@ -30,7 +31,16 @@ type Output = {
30
31
  }>;
31
32
  };
32
33
  declare function createContext(conf: LoadConfigResult, io?: IO): {
33
- config: _pandacss_types.UserConfig;
34
+ theme: {
35
+ breakpoints?: Dict<any> | undefined;
36
+ keyframes?: _pandacss_types.CssKeyframes | undefined;
37
+ tokens?: _pandacss_types.Tokens | undefined;
38
+ semanticTokens?: _pandacss_types.SemanticTokens<string> | undefined;
39
+ textStyles?: _pandacss_types.TextStyles<_pandacss_types_dist_composition.TCondition> | undefined;
40
+ layerStyles?: _pandacss_types.LayerStyles<_pandacss_types_dist_composition.TCondition> | undefined;
41
+ recipes?: Record<string, RecipeConfig<_pandacss_types_dist_recipe.TVariants>> | undefined;
42
+ };
43
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config<_pandacss_types.Conditions, Dict<any>, _pandacss_types.Tokens>, "include" | "outdir" | "cwd">>;
34
44
  configPath: string;
35
45
  cwd: string;
36
46
  conf: LoadConfigResult;
@@ -120,11 +130,8 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
120
130
  file: string;
121
131
  } | undefined)[]>;
122
132
  hash?: boolean | undefined;
123
- semanticTokens?: _pandacss_types.SemanticTokens<string> | undefined;
124
133
  separator?: "-" | "_" | "=" | undefined;
125
134
  static?: _pandacss_types.StaticCssOptions | undefined;
126
- breakpoints?: Dict<any> | undefined;
127
- keyframes?: _pandacss_types.CssKeyframes | undefined;
128
135
  minify?: boolean | undefined;
129
136
  utilities?: _pandacss_types.UtilityConfig | undefined;
130
137
  logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
@@ -135,8 +142,6 @@ declare function createContext(conf: LoadConfigResult, io?: IO): {
135
142
  watch?: boolean | undefined;
136
143
  poll?: boolean | undefined;
137
144
  globalCss?: _pandacss_types_dist_system_types.GlobalStyleObject<_pandacss_types_dist_system_types.TCondition, _pandacss_types_dist_system_types.NeverType, false> | undefined;
138
- textStyles?: _pandacss_types.TextStyles<_pandacss_types_dist_composition.TCondition> | undefined;
139
- layerStyles?: _pandacss_types.LayerStyles<_pandacss_types_dist_composition.TCondition> | undefined;
140
145
  strictTokens?: boolean | undefined;
141
146
  include: string[];
142
147
  outdir: string;
@@ -160,7 +165,16 @@ declare class Builder {
160
165
  updateFile(file: string, css: string): void;
161
166
  setup(): Promise<void>;
162
167
  ensure(): {
163
- config: _pandacss_types.UserConfig;
168
+ theme: {
169
+ breakpoints?: _pandacss_types.Dict<any> | undefined;
170
+ keyframes?: _pandacss_types.CssKeyframes | undefined;
171
+ tokens?: _pandacss_types.Tokens | undefined;
172
+ semanticTokens?: _pandacss_types.SemanticTokens<string> | undefined;
173
+ textStyles?: _pandacss_types.TextStyles<_pandacss_types_dist_composition.TCondition> | undefined;
174
+ layerStyles?: _pandacss_types.LayerStyles<_pandacss_types_dist_composition.TCondition> | undefined;
175
+ recipes?: Record<string, _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants>> | undefined;
176
+ };
177
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<_pandacss_types.Config<_pandacss_types.Conditions, _pandacss_types.Dict<any>, _pandacss_types.Tokens>, "include" | "outdir" | "cwd">>;
164
178
  configPath: string;
165
179
  cwd: string;
166
180
  conf: _pandacss_config.LoadConfigResult;
@@ -250,11 +264,8 @@ declare class Builder {
250
264
  file: string;
251
265
  } | undefined)[]>;
252
266
  hash?: boolean | undefined;
253
- semanticTokens?: _pandacss_types.SemanticTokens<string> | undefined;
254
267
  separator?: "-" | "_" | "=" | undefined;
255
268
  static?: _pandacss_types.StaticCssOptions | undefined;
256
- breakpoints?: _pandacss_types.Dict<any> | undefined;
257
- keyframes?: _pandacss_types.CssKeyframes | undefined;
258
269
  minify?: boolean | undefined;
259
270
  utilities?: _pandacss_types.UtilityConfig | undefined;
260
271
  logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
@@ -265,8 +276,6 @@ declare class Builder {
265
276
  watch?: boolean | undefined;
266
277
  poll?: boolean | undefined;
267
278
  globalCss?: _pandacss_types_dist_system_types.GlobalStyleObject<_pandacss_types_dist_system_types.TCondition, _pandacss_types_dist_system_types.NeverType, false> | undefined;
268
- textStyles?: _pandacss_types.TextStyles<_pandacss_types_dist_composition.TCondition> | undefined;
269
- layerStyles?: _pandacss_types.LayerStyles<_pandacss_types_dist_composition.TCondition> | undefined;
270
279
  strictTokens?: boolean | undefined;
271
280
  include: string[];
272
281
  outdir: string;
@@ -282,7 +291,16 @@ declare function loadConfigAndCreateContext(options?: {
282
291
  config?: Config;
283
292
  configPath?: string;
284
293
  }): Promise<{
285
- config: _pandacss_types.UserConfig;
294
+ theme: {
295
+ breakpoints?: _pandacss_types.Dict<any> | undefined;
296
+ keyframes?: _pandacss_types.CssKeyframes | undefined;
297
+ tokens?: _pandacss_types.Tokens | undefined;
298
+ semanticTokens?: _pandacss_types.SemanticTokens<string> | undefined;
299
+ textStyles?: _pandacss_types.TextStyles<_pandacss_types_dist_composition.TCondition> | undefined;
300
+ layerStyles?: _pandacss_types.LayerStyles<_pandacss_types_dist_composition.TCondition> | undefined;
301
+ recipes?: Record<string, _pandacss_types.RecipeConfig<_pandacss_types_dist_recipe.TVariants>> | undefined;
302
+ };
303
+ config: _pandacss_types_dist_shared.UnwrapExtend<_pandacss_types.RequiredBy<Config<_pandacss_types.Conditions, _pandacss_types.Dict<any>, _pandacss_types.Tokens>, "include" | "outdir" | "cwd">>;
286
304
  configPath: string;
287
305
  cwd: string;
288
306
  conf: _pandacss_config.LoadConfigResult;
@@ -372,11 +390,8 @@ declare function loadConfigAndCreateContext(options?: {
372
390
  file: string;
373
391
  } | undefined)[]>;
374
392
  hash?: boolean | undefined;
375
- semanticTokens?: _pandacss_types.SemanticTokens<string> | undefined;
376
393
  separator?: "-" | "_" | "=" | undefined;
377
394
  static?: _pandacss_types.StaticCssOptions | undefined;
378
- breakpoints?: _pandacss_types.Dict<any> | undefined;
379
- keyframes?: _pandacss_types.CssKeyframes | undefined;
380
395
  minify?: boolean | undefined;
381
396
  utilities?: _pandacss_types.UtilityConfig | undefined;
382
397
  logLevel?: "debug" | "info" | "warn" | "error" | "silent" | undefined;
@@ -387,8 +402,6 @@ declare function loadConfigAndCreateContext(options?: {
387
402
  watch?: boolean | undefined;
388
403
  poll?: boolean | undefined;
389
404
  globalCss?: _pandacss_types_dist_system_types.GlobalStyleObject<_pandacss_types_dist_system_types.TCondition, _pandacss_types_dist_system_types.NeverType, false> | undefined;
390
- textStyles?: _pandacss_types.TextStyles<_pandacss_types_dist_composition.TCondition> | undefined;
391
- layerStyles?: _pandacss_types.LayerStyles<_pandacss_types_dist_composition.TCondition> | undefined;
392
405
  strictTokens?: boolean | undefined;
393
406
  include: string[];
394
407
  outdir: string;
package/dist/index.js CHANGED
@@ -101,7 +101,7 @@ async function extractChunks(ctx) {
101
101
  "@layer reset, base, tokens, recipes, utilities;",
102
102
  ctx.preflight && "@import './reset.css';",
103
103
  !ctx.tokens.isEmpty && "@import './tokens/index.css';",
104
- ctx.keyframes && "@import './tokens/keyframes.css';"
104
+ ctx.theme.keyframes && "@import './tokens/keyframes.css';"
105
105
  ].filter(Boolean).join("\n\n")
106
106
  });
107
107
  const files = ctx.chunks.getFiles();
@@ -1324,7 +1324,7 @@ function setupHelpers(ctx) {
1324
1324
  };
1325
1325
  }
1326
1326
  function setupKeyframes(ctx) {
1327
- const code = generateKeyframes(ctx.keyframes);
1327
+ const code = generateKeyframes(ctx.theme.keyframes);
1328
1328
  return {
1329
1329
  dir: ctx.paths.token,
1330
1330
  files: [{ file: "keyframes.css", code }]
@@ -1588,7 +1588,7 @@ function getBaseCss(ctx) {
1588
1588
  const css2 = [
1589
1589
  generateReset(),
1590
1590
  generateTokenCss(ctx),
1591
- generateKeyframes(ctx.keyframes),
1591
+ generateKeyframes(ctx.theme.keyframes),
1592
1592
  ctx.getGlobalCss(),
1593
1593
  ctx.getStaticCss()
1594
1594
  ];
@@ -1653,19 +1653,14 @@ function createContext(conf, io = fileSystem) {
1653
1653
  const { config } = conf;
1654
1654
  const {
1655
1655
  cwd: cwdProp = process.cwd(),
1656
- breakpoints = {},
1657
1656
  conditions: conditionsProp = {},
1658
- tokens: tokensProp = {},
1659
- semanticTokens = {},
1660
1657
  cssVarPrefix,
1661
1658
  cssVarRoot = ":where(:root, :host)",
1662
1659
  outdir,
1663
1660
  exclude: excludeProp = [],
1664
1661
  patterns = {},
1665
- recipes = {},
1662
+ theme = {},
1666
1663
  utilities = {},
1667
- textStyles,
1668
- layerStyles,
1669
1664
  hash,
1670
1665
  jsxFactory = "panda",
1671
1666
  jsxFramework,
@@ -1673,6 +1668,14 @@ function createContext(conf, io = fileSystem) {
1673
1668
  separator,
1674
1669
  static: staticCss
1675
1670
  } = config;
1671
+ const {
1672
+ breakpoints = {},
1673
+ tokens: tokensProp = {},
1674
+ semanticTokens = {},
1675
+ recipes = {},
1676
+ textStyles,
1677
+ layerStyles
1678
+ } = theme;
1676
1679
  const cwd = (0, import_path2.resolve)(cwdProp);
1677
1680
  const exclude = [".git", "node_modules", "test-results"].concat(excludeProp);
1678
1681
  const tokens = new import_token_dictionary.TokenDictionary({
@@ -1973,6 +1976,7 @@ function createContext(conf, io = fileSystem) {
1973
1976
  }
1974
1977
  return {
1975
1978
  ...config,
1979
+ theme,
1976
1980
  config,
1977
1981
  configPath: conf.path,
1978
1982
  cwd,
package/dist/index.mjs CHANGED
@@ -55,7 +55,7 @@ async function extractChunks(ctx) {
55
55
  "@layer reset, base, tokens, recipes, utilities;",
56
56
  ctx.preflight && "@import './reset.css';",
57
57
  !ctx.tokens.isEmpty && "@import './tokens/index.css';",
58
- ctx.keyframes && "@import './tokens/keyframes.css';"
58
+ ctx.theme.keyframes && "@import './tokens/keyframes.css';"
59
59
  ].filter(Boolean).join("\n\n")
60
60
  });
61
61
  const files = ctx.chunks.getFiles();
@@ -1278,7 +1278,7 @@ function setupHelpers(ctx) {
1278
1278
  };
1279
1279
  }
1280
1280
  function setupKeyframes(ctx) {
1281
- const code = generateKeyframes(ctx.keyframes);
1281
+ const code = generateKeyframes(ctx.theme.keyframes);
1282
1282
  return {
1283
1283
  dir: ctx.paths.token,
1284
1284
  files: [{ file: "keyframes.css", code }]
@@ -1542,7 +1542,7 @@ function getBaseCss(ctx) {
1542
1542
  const css2 = [
1543
1543
  generateReset(),
1544
1544
  generateTokenCss(ctx),
1545
- generateKeyframes(ctx.keyframes),
1545
+ generateKeyframes(ctx.theme.keyframes),
1546
1546
  ctx.getGlobalCss(),
1547
1547
  ctx.getStaticCss()
1548
1548
  ];
@@ -1614,19 +1614,14 @@ function createContext(conf, io = fileSystem) {
1614
1614
  const { config } = conf;
1615
1615
  const {
1616
1616
  cwd: cwdProp = process.cwd(),
1617
- breakpoints = {},
1618
1617
  conditions: conditionsProp = {},
1619
- tokens: tokensProp = {},
1620
- semanticTokens = {},
1621
1618
  cssVarPrefix,
1622
1619
  cssVarRoot = ":where(:root, :host)",
1623
1620
  outdir,
1624
1621
  exclude: excludeProp = [],
1625
1622
  patterns = {},
1626
- recipes = {},
1623
+ theme = {},
1627
1624
  utilities = {},
1628
- textStyles,
1629
- layerStyles,
1630
1625
  hash,
1631
1626
  jsxFactory = "panda",
1632
1627
  jsxFramework,
@@ -1634,6 +1629,14 @@ function createContext(conf, io = fileSystem) {
1634
1629
  separator,
1635
1630
  static: staticCss
1636
1631
  } = config;
1632
+ const {
1633
+ breakpoints = {},
1634
+ tokens: tokensProp = {},
1635
+ semanticTokens = {},
1636
+ recipes = {},
1637
+ textStyles,
1638
+ layerStyles
1639
+ } = theme;
1637
1640
  const cwd = resolve(cwdProp);
1638
1641
  const exclude = [".git", "node_modules", "test-results"].concat(excludeProp);
1639
1642
  const tokens = new TokenDictionary({
@@ -1934,6 +1937,7 @@ function createContext(conf, io = fileSystem) {
1934
1937
  }
1935
1938
  return {
1936
1939
  ...config,
1940
+ theme,
1937
1941
  config,
1938
1942
  configPath: conf.path,
1939
1943
  cwd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20221219162854",
3
+ "version": "0.0.0-dev-20221220144042",
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-20221219162854",
34
- "@pandacss/is-valid-prop": "0.0.0-dev-20221219162854",
35
- "@pandacss/error": "0.0.0-dev-20221219162854",
36
- "@pandacss/parser": "0.0.0-dev-20221219162854",
37
- "@pandacss/shared": "0.0.0-dev-20221219162854",
38
- "@pandacss/token-dictionary": "0.0.0-dev-20221219162854",
39
- "@pandacss/logger": "0.0.0-dev-20221219162854",
40
- "@pandacss/core": "0.0.0-dev-20221219162854",
41
- "@pandacss/config": "0.0.0-dev-20221219162854"
33
+ "@pandacss/types": "0.0.0-dev-20221220144042",
34
+ "@pandacss/is-valid-prop": "0.0.0-dev-20221220144042",
35
+ "@pandacss/error": "0.0.0-dev-20221220144042",
36
+ "@pandacss/parser": "0.0.0-dev-20221220144042",
37
+ "@pandacss/shared": "0.0.0-dev-20221220144042",
38
+ "@pandacss/token-dictionary": "0.0.0-dev-20221220144042",
39
+ "@pandacss/logger": "0.0.0-dev-20221220144042",
40
+ "@pandacss/core": "0.0.0-dev-20221220144042",
41
+ "@pandacss/config": "0.0.0-dev-20221220144042"
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-20221219162854"
49
+ "@pandacss/fixture": "0.0.0-dev-20221220144042"
50
50
  },
51
51
  "scripts": {
52
52
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",