@pandacss/node 0.0.0-dev-20231026112944 → 0.0.0-dev-20231027144841
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 +17 -24
- package/dist/index.d.ts +17 -24
- package/dist/index.js +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +25 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
2
|
-
import {
|
|
2
|
+
import { Artifact, ConfigResultWithHooks, Runtime, PandaHookable, ParserResultType, Config } from '@pandacss/types';
|
|
3
3
|
import { Generator } from '@pandacss/generator';
|
|
4
|
-
import {
|
|
5
|
-
import { Runtime } from '@pandacss/types/src/runtime';
|
|
4
|
+
import { PandaProject } from '@pandacss/parser';
|
|
6
5
|
import { Root, Message } from 'postcss';
|
|
7
6
|
|
|
8
|
-
|
|
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
|
-
|
|
20
|
-
}
|
|
15
|
+
glob: string[];
|
|
16
|
+
}
|
|
21
17
|
|
|
22
|
-
|
|
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
|
-
|
|
32
|
-
runtime: Runtime
|
|
24
|
+
interface PandaContext extends Generator {
|
|
25
|
+
runtime: Runtime;
|
|
33
26
|
hooks: PandaHookable;
|
|
34
|
-
project:
|
|
27
|
+
project: PandaProject;
|
|
35
28
|
getFiles: () => string[];
|
|
36
|
-
chunks:
|
|
37
|
-
output:
|
|
38
|
-
}
|
|
29
|
+
chunks: PandaChunksEngine;
|
|
30
|
+
output: PandaOutputEngine;
|
|
31
|
+
}
|
|
39
32
|
|
|
40
|
-
|
|
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
|
-
|
|
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 {
|
|
2
|
+
import { Artifact, ConfigResultWithHooks, Runtime, PandaHookable, ParserResultType, Config } from '@pandacss/types';
|
|
3
3
|
import { Generator } from '@pandacss/generator';
|
|
4
|
-
import {
|
|
5
|
-
import { Runtime } from '@pandacss/types/src/runtime';
|
|
4
|
+
import { PandaProject } from '@pandacss/parser';
|
|
6
5
|
import { Root, Message } from 'postcss';
|
|
7
6
|
|
|
8
|
-
|
|
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
|
-
|
|
20
|
-
}
|
|
15
|
+
glob: string[];
|
|
16
|
+
}
|
|
21
17
|
|
|
22
|
-
|
|
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
|
-
|
|
32
|
-
runtime: Runtime
|
|
24
|
+
interface PandaContext extends Generator {
|
|
25
|
+
runtime: Runtime;
|
|
33
26
|
hooks: PandaHookable;
|
|
34
|
-
project:
|
|
27
|
+
project: PandaProject;
|
|
35
28
|
getFiles: () => string[];
|
|
36
|
-
chunks:
|
|
37
|
-
output:
|
|
38
|
-
}
|
|
29
|
+
chunks: PandaChunksEngine;
|
|
30
|
+
output: PandaOutputEngine;
|
|
31
|
+
}
|
|
39
32
|
|
|
40
|
-
|
|
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
|
-
|
|
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 {
|
|
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);
|
|
@@ -2620,12 +2621,12 @@ var Builder = class {
|
|
|
2620
2621
|
continue;
|
|
2621
2622
|
const time = stats.mtimeMs;
|
|
2622
2623
|
newModified.set(file, time);
|
|
2623
|
-
if (
|
|
2624
|
+
if (prevModified && (!prevModified.has(file) || time > prevModified.get(file))) {
|
|
2624
2625
|
modified = true;
|
|
2625
2626
|
}
|
|
2626
2627
|
}
|
|
2627
2628
|
if (!modified) {
|
|
2628
|
-
return { isModified: false, modifiedMap: prevModified };
|
|
2629
|
+
return { isModified: false, modifiedMap: prevModified || /* @__PURE__ */ new Map() };
|
|
2629
2630
|
}
|
|
2630
2631
|
for (const file of deps) {
|
|
2631
2632
|
delete require.cache[file];
|
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 {
|
|
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);
|
|
@@ -2605,12 +2606,12 @@ var Builder = class {
|
|
|
2605
2606
|
continue;
|
|
2606
2607
|
const time = stats.mtimeMs;
|
|
2607
2608
|
newModified.set(file, time);
|
|
2608
|
-
if (
|
|
2609
|
+
if (prevModified && (!prevModified.has(file) || time > prevModified.get(file))) {
|
|
2609
2610
|
modified = true;
|
|
2610
2611
|
}
|
|
2611
2612
|
}
|
|
2612
2613
|
if (!modified) {
|
|
2613
|
-
return { isModified: false, modifiedMap: prevModified };
|
|
2614
|
+
return { isModified: false, modifiedMap: prevModified || /* @__PURE__ */ new Map() };
|
|
2614
2615
|
}
|
|
2615
2616
|
for (const file of deps) {
|
|
2616
2617
|
delete __require.cache[file];
|
package/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20231027144841",
|
|
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-
|
|
38
|
-
"@pandacss/core": "0.0.0-dev-
|
|
39
|
-
"@pandacss/error": "0.0.0-dev-
|
|
40
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
41
|
-
"@pandacss/generator": "0.0.0-dev-
|
|
42
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
43
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
44
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
45
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
46
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
47
|
-
"@pandacss/types": "0.0.0-dev-
|
|
49
|
+
"@pandacss/config": "0.0.0-dev-20231027144841",
|
|
50
|
+
"@pandacss/core": "0.0.0-dev-20231027144841",
|
|
51
|
+
"@pandacss/error": "0.0.0-dev-20231027144841",
|
|
52
|
+
"@pandacss/extractor": "0.0.0-dev-20231027144841",
|
|
53
|
+
"@pandacss/generator": "0.0.0-dev-20231027144841",
|
|
54
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20231027144841",
|
|
55
|
+
"@pandacss/logger": "0.0.0-dev-20231027144841",
|
|
56
|
+
"@pandacss/parser": "0.0.0-dev-20231027144841",
|
|
57
|
+
"@pandacss/shared": "0.0.0-dev-20231027144841",
|
|
58
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20231027144841",
|
|
59
|
+
"@pandacss/types": "0.0.0-dev-20231027144841"
|
|
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-
|
|
69
|
+
"@pandacss/fixture": "0.0.0-dev-20231027144841"
|
|
58
70
|
},
|
|
59
71
|
"scripts": {
|
|
60
72
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|