@pandacss/node 0.0.0-dev-20231026112944 → 0.0.0-dev-20231027102248

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.mts CHANGED
@@ -1,14 +1,10 @@
1
1
  import * as _pandacss_types from '@pandacss/types';
2
- import { PandaHookable, Artifact, ConfigResultWithHooks, Runtime as Runtime$1, ParserResultType, Config } from '@pandacss/types';
2
+ import { Artifact, ConfigResultWithHooks, Runtime, PandaHookable, ParserResultType, Config } from '@pandacss/types';
3
3
  import { Generator } from '@pandacss/generator';
4
- import { Project } from '@pandacss/parser';
5
- import { Runtime } from '@pandacss/types/src/runtime';
4
+ import { PandaProject } from '@pandacss/parser';
6
5
  import { Root, Message } from 'postcss';
7
6
 
8
- declare const getChunkEngine: ({ paths, config, runtime: { path, fs }, }: Generator & {
9
- runtime: Runtime;
10
- hooks: PandaHookable;
11
- }) => {
7
+ interface PandaChunksEngine {
12
8
  dir: string;
13
9
  readFile(file: string): string;
14
10
  getFiles(): string[];
@@ -16,30 +12,27 @@ declare const getChunkEngine: ({ paths, config, runtime: { path, fs }, }: Genera
16
12
  getArtifact(file: string, css: string): Artifact;
17
13
  rm(file: string): void;
18
14
  empty(): void;
19
- readonly glob: string[];
20
- };
15
+ glob: string[];
16
+ }
21
17
 
22
- declare const getOutputEngine: ({ paths, runtime: { path, fs }, }: Generator & {
23
- runtime: Runtime;
24
- hooks: PandaHookable;
25
- }) => {
18
+ interface PandaOutputEngine {
26
19
  empty(): void;
27
20
  write(output: Artifact | undefined): Promise<PromiseSettledResult<void>[] | undefined>;
28
- };
21
+ }
29
22
 
30
23
  declare const createContext: (conf: ConfigResultWithHooks) => PandaContext;
31
- type PandaContext = Generator & {
32
- runtime: Runtime$1;
24
+ interface PandaContext extends Generator {
25
+ runtime: Runtime;
33
26
  hooks: PandaHookable;
34
- project: Project;
27
+ project: PandaProject;
35
28
  getFiles: () => string[];
36
- chunks: ReturnType<typeof getChunkEngine>;
37
- output: ReturnType<typeof getOutputEngine>;
38
- };
29
+ chunks: PandaChunksEngine;
30
+ output: PandaOutputEngine;
31
+ }
39
32
 
40
- type Options = {
33
+ interface Options {
41
34
  onResult?: (file: string, result: ParserResultType) => void;
42
- };
35
+ }
43
36
  declare function analyzeTokens(ctx: PandaContext, options?: Options): {
44
37
  duration: {
45
38
  extractTimeByFiles: {
@@ -179,10 +172,10 @@ declare function analyzeTokens(ctx: PandaContext, options?: Options): {
179
172
  };
180
173
  declare const writeAnalyzeJSON: (fileName: string, result: ReturnType<typeof analyzeTokens>, ctx: PandaContext) => Promise<void>;
181
174
 
182
- type ConfigDepsResult = {
175
+ interface ConfigDepsResult {
183
176
  modifiedMap: Map<string, number>;
184
177
  isModified: boolean;
185
- };
178
+ }
186
179
  declare class Builder {
187
180
  /**
188
181
  * The current panda context
package/dist/index.d.ts CHANGED
@@ -1,14 +1,10 @@
1
1
  import * as _pandacss_types from '@pandacss/types';
2
- import { PandaHookable, Artifact, ConfigResultWithHooks, Runtime as Runtime$1, ParserResultType, Config } from '@pandacss/types';
2
+ import { Artifact, ConfigResultWithHooks, Runtime, PandaHookable, ParserResultType, Config } from '@pandacss/types';
3
3
  import { Generator } from '@pandacss/generator';
4
- import { Project } from '@pandacss/parser';
5
- import { Runtime } from '@pandacss/types/src/runtime';
4
+ import { PandaProject } from '@pandacss/parser';
6
5
  import { Root, Message } from 'postcss';
7
6
 
8
- declare const getChunkEngine: ({ paths, config, runtime: { path, fs }, }: Generator & {
9
- runtime: Runtime;
10
- hooks: PandaHookable;
11
- }) => {
7
+ interface PandaChunksEngine {
12
8
  dir: string;
13
9
  readFile(file: string): string;
14
10
  getFiles(): string[];
@@ -16,30 +12,27 @@ declare const getChunkEngine: ({ paths, config, runtime: { path, fs }, }: Genera
16
12
  getArtifact(file: string, css: string): Artifact;
17
13
  rm(file: string): void;
18
14
  empty(): void;
19
- readonly glob: string[];
20
- };
15
+ glob: string[];
16
+ }
21
17
 
22
- declare const getOutputEngine: ({ paths, runtime: { path, fs }, }: Generator & {
23
- runtime: Runtime;
24
- hooks: PandaHookable;
25
- }) => {
18
+ interface PandaOutputEngine {
26
19
  empty(): void;
27
20
  write(output: Artifact | undefined): Promise<PromiseSettledResult<void>[] | undefined>;
28
- };
21
+ }
29
22
 
30
23
  declare const createContext: (conf: ConfigResultWithHooks) => PandaContext;
31
- type PandaContext = Generator & {
32
- runtime: Runtime$1;
24
+ interface PandaContext extends Generator {
25
+ runtime: Runtime;
33
26
  hooks: PandaHookable;
34
- project: Project;
27
+ project: PandaProject;
35
28
  getFiles: () => string[];
36
- chunks: ReturnType<typeof getChunkEngine>;
37
- output: ReturnType<typeof getOutputEngine>;
38
- };
29
+ chunks: PandaChunksEngine;
30
+ output: PandaOutputEngine;
31
+ }
39
32
 
40
- type Options = {
33
+ interface Options {
41
34
  onResult?: (file: string, result: ParserResultType) => void;
42
- };
35
+ }
43
36
  declare function analyzeTokens(ctx: PandaContext, options?: Options): {
44
37
  duration: {
45
38
  extractTimeByFiles: {
@@ -179,10 +172,10 @@ declare function analyzeTokens(ctx: PandaContext, options?: Options): {
179
172
  };
180
173
  declare const writeAnalyzeJSON: (fileName: string, result: ReturnType<typeof analyzeTokens>, ctx: PandaContext) => Promise<void>;
181
174
 
182
- type ConfigDepsResult = {
175
+ interface ConfigDepsResult {
183
176
  modifiedMap: Map<string, number>;
184
177
  isModified: boolean;
185
- };
178
+ }
186
179
  declare class Builder {
187
180
  /**
188
181
  * The current panda context
package/dist/index.js CHANGED
@@ -904,6 +904,7 @@ var import_tsconfck = require("tsconfck");
904
904
  // src/create-context.ts
905
905
  init_cjs_shims();
906
906
  var import_generator = require("@pandacss/generator");
907
+ var import_logger3 = require("@pandacss/logger");
907
908
  var import_parser = require("@pandacss/parser");
908
909
 
909
910
  // src/chunk-engine.ts
@@ -1048,7 +1049,6 @@ var getOutputEngine = ({
1048
1049
  });
1049
1050
 
1050
1051
  // src/create-context.ts
1051
- var import_logger3 = require("@pandacss/logger");
1052
1052
  var createContext = (conf) => {
1053
1053
  const generator = (0, import_generator.createGenerator)(conf);
1054
1054
  const config = conf.config;
@@ -1088,7 +1088,8 @@ function findConfig() {
1088
1088
  }
1089
1089
  async function loadConfigAndCreateContext(options = {}) {
1090
1090
  const hooks = (0, import_hookable.createHooks)();
1091
- const { cwd = process.cwd(), config, configPath } = options;
1091
+ const { config, configPath } = options;
1092
+ const cwd = options.cwd ?? options?.config?.cwd ?? process.cwd();
1092
1093
  const conf = await (0, import_config.loadConfigFile)({ cwd, file: configPath });
1093
1094
  if (config) {
1094
1095
  Object.assign(conf.config, config);
package/dist/index.mjs CHANGED
@@ -880,6 +880,7 @@ import { parse } from "tsconfck";
880
880
  // src/create-context.ts
881
881
  init_esm_shims();
882
882
  import { createGenerator } from "@pandacss/generator";
883
+ import { logger as logger3 } from "@pandacss/logger";
883
884
  import { createProject } from "@pandacss/parser";
884
885
 
885
886
  // src/chunk-engine.ts
@@ -1033,7 +1034,6 @@ var getOutputEngine = ({
1033
1034
  });
1034
1035
 
1035
1036
  // src/create-context.ts
1036
- import { logger as logger3 } from "@pandacss/logger";
1037
1037
  var createContext = (conf) => {
1038
1038
  const generator = createGenerator(conf);
1039
1039
  const config = conf.config;
@@ -1073,7 +1073,8 @@ function findConfig() {
1073
1073
  }
1074
1074
  async function loadConfigAndCreateContext(options = {}) {
1075
1075
  const hooks = createHooks();
1076
- const { cwd = process.cwd(), config, configPath } = options;
1076
+ const { config, configPath } = options;
1077
+ const cwd = options.cwd ?? options?.config?.cwd ?? process.cwd();
1077
1078
  const conf = await loadConfigFile({ cwd, file: configPath });
1078
1079
  if (config) {
1079
1080
  Object.assign(conf.config, config);
package/package.json CHANGED
@@ -1,11 +1,23 @@
1
1
  {
2
2
  "name": "@pandacss/node",
3
- "version": "0.0.0-dev-20231026112944",
3
+ "version": "0.0.0-dev-20231027102248",
4
4
  "description": "The core css panda library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "author": "Segun Adebayo <joseshegs@gmail.com>",
9
+ "exports": {
10
+ ".": {
11
+ "source": "./src/index.ts",
12
+ "types": "./dist/index.d.ts",
13
+ "require": "./dist/index.js",
14
+ "import": {
15
+ "types": "./dist/index.d.mts",
16
+ "default": "./dist/index.mjs"
17
+ }
18
+ },
19
+ "./package.json": "./package.json"
20
+ },
9
21
  "files": [
10
22
  "dist"
11
23
  ],
@@ -34,17 +46,17 @@
34
46
  "ts-morph": "19.0.0",
35
47
  "ts-pattern": "5.0.5",
36
48
  "tsconfck": "^2.1.2",
37
- "@pandacss/config": "0.0.0-dev-20231026112944",
38
- "@pandacss/core": "0.0.0-dev-20231026112944",
39
- "@pandacss/error": "0.0.0-dev-20231026112944",
40
- "@pandacss/extractor": "0.0.0-dev-20231026112944",
41
- "@pandacss/generator": "0.0.0-dev-20231026112944",
42
- "@pandacss/is-valid-prop": "0.0.0-dev-20231026112944",
43
- "@pandacss/logger": "0.0.0-dev-20231026112944",
44
- "@pandacss/parser": "0.0.0-dev-20231026112944",
45
- "@pandacss/shared": "0.0.0-dev-20231026112944",
46
- "@pandacss/token-dictionary": "0.0.0-dev-20231026112944",
47
- "@pandacss/types": "0.0.0-dev-20231026112944"
49
+ "@pandacss/config": "0.0.0-dev-20231027102248",
50
+ "@pandacss/core": "0.0.0-dev-20231027102248",
51
+ "@pandacss/error": "0.0.0-dev-20231027102248",
52
+ "@pandacss/extractor": "0.0.0-dev-20231027102248",
53
+ "@pandacss/generator": "0.0.0-dev-20231027102248",
54
+ "@pandacss/is-valid-prop": "0.0.0-dev-20231027102248",
55
+ "@pandacss/logger": "0.0.0-dev-20231027102248",
56
+ "@pandacss/parser": "0.0.0-dev-20231027102248",
57
+ "@pandacss/shared": "0.0.0-dev-20231027102248",
58
+ "@pandacss/token-dictionary": "0.0.0-dev-20231027102248",
59
+ "@pandacss/types": "0.0.0-dev-20231027102248"
48
60
  },
49
61
  "devDependencies": {
50
62
  "@types/fs-extra": "11.0.3",
@@ -54,7 +66,7 @@
54
66
  "@types/pluralize": "0.0.30",
55
67
  "boxen": "^7.1.1",
56
68
  "p-limit": "^4.0.0",
57
- "@pandacss/fixture": "0.0.0-dev-20231026112944"
69
+ "@pandacss/fixture": "0.0.0-dev-20231027102248"
58
70
  },
59
71
  "scripts": {
60
72
  "build": "tsup src/index.ts --format=cjs,esm --shims --dts",