@pandacss/node 0.0.0-dev-20230626075222 → 0.0.0-dev-20230626090506
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 +246 -0
- package/dist/index.js +4 -2
- package/dist/index.mjs +5 -3
- package/package.json +13 -13
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
export { discardDuplicate } from '@pandacss/core';
|
|
2
|
+
import * as _pandacss_types from '@pandacss/types';
|
|
3
|
+
import { PandaHookable, Artifact, ConfigResultWithHooks, ParserResultType, Config } from '@pandacss/types';
|
|
4
|
+
import { Generator } from '@pandacss/generator';
|
|
5
|
+
import { Project } from '@pandacss/parser';
|
|
6
|
+
import { Runtime } from '@pandacss/types/src/runtime';
|
|
7
|
+
import { Root, Message } from 'postcss';
|
|
8
|
+
|
|
9
|
+
declare const getChunkEngine: ({ paths, config, runtime: { path, fs }, }: Generator & {
|
|
10
|
+
runtime: Runtime;
|
|
11
|
+
hooks: PandaHookable;
|
|
12
|
+
}) => {
|
|
13
|
+
dir: string;
|
|
14
|
+
readFile(file: string): string;
|
|
15
|
+
getFiles(): string[];
|
|
16
|
+
format(file: string): string;
|
|
17
|
+
getArtifact(file: string, css: string): Artifact;
|
|
18
|
+
rm(file: string): void;
|
|
19
|
+
empty(): void;
|
|
20
|
+
readonly glob: string[];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare const getOutputEngine: ({ paths, runtime: { path, fs }, }: Generator & {
|
|
24
|
+
runtime: Runtime;
|
|
25
|
+
hooks: PandaHookable;
|
|
26
|
+
}) => {
|
|
27
|
+
empty(): void;
|
|
28
|
+
write(output: Artifact | undefined): Promise<void[] | undefined>;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare const createContext: (conf: ConfigResultWithHooks) => PandaContext;
|
|
32
|
+
type PandaContext = Generator & {
|
|
33
|
+
runtime: Runtime;
|
|
34
|
+
hooks: PandaHookable;
|
|
35
|
+
project: Project;
|
|
36
|
+
getFiles: () => string[];
|
|
37
|
+
chunks: ReturnType<typeof getChunkEngine>;
|
|
38
|
+
output: ReturnType<typeof getOutputEngine>;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
type Options = {
|
|
42
|
+
onResult?: (file: string, result: ParserResultType) => void;
|
|
43
|
+
};
|
|
44
|
+
declare function analyzeTokens(ctx: PandaContext, options?: Options): {
|
|
45
|
+
duration: {
|
|
46
|
+
extractTimeByFiles: {
|
|
47
|
+
[k: string]: number;
|
|
48
|
+
};
|
|
49
|
+
extractTotal: number;
|
|
50
|
+
classify: number;
|
|
51
|
+
};
|
|
52
|
+
fileSizes: {
|
|
53
|
+
lineCount: number;
|
|
54
|
+
normal: string | number | any[] | {
|
|
55
|
+
value: any;
|
|
56
|
+
symbol: any;
|
|
57
|
+
exponent: number;
|
|
58
|
+
unit: string;
|
|
59
|
+
};
|
|
60
|
+
minified: string | number | any[] | {
|
|
61
|
+
value: any;
|
|
62
|
+
symbol: any;
|
|
63
|
+
exponent: number;
|
|
64
|
+
unit: string;
|
|
65
|
+
};
|
|
66
|
+
gzip: {
|
|
67
|
+
normal: string | number | any[] | {
|
|
68
|
+
value: any;
|
|
69
|
+
symbol: any;
|
|
70
|
+
exponent: number;
|
|
71
|
+
unit: string;
|
|
72
|
+
};
|
|
73
|
+
minified: string | number | any[] | {
|
|
74
|
+
value: any;
|
|
75
|
+
symbol: any;
|
|
76
|
+
exponent: number;
|
|
77
|
+
unit: string;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
} & {
|
|
82
|
+
counts: {
|
|
83
|
+
filesWithTokens: number;
|
|
84
|
+
propNameUsed: number;
|
|
85
|
+
tokenUsed: number;
|
|
86
|
+
shorthandUsed: number;
|
|
87
|
+
propertyPathUsed: number;
|
|
88
|
+
typeUsed: number;
|
|
89
|
+
instanceNameUsed: number;
|
|
90
|
+
kindUsed: number;
|
|
91
|
+
instanceOfKindUsed: number;
|
|
92
|
+
colorsUsed: number;
|
|
93
|
+
};
|
|
94
|
+
stats: {
|
|
95
|
+
filesWithMostInstance: {
|
|
96
|
+
[k: string]: number;
|
|
97
|
+
};
|
|
98
|
+
filesWithMostPropValueCombinations: {
|
|
99
|
+
[k: string]: number;
|
|
100
|
+
};
|
|
101
|
+
mostUseds: {
|
|
102
|
+
propNames: {
|
|
103
|
+
key: string;
|
|
104
|
+
count: number;
|
|
105
|
+
}[];
|
|
106
|
+
tokens: {
|
|
107
|
+
key: string;
|
|
108
|
+
count: number;
|
|
109
|
+
}[];
|
|
110
|
+
shorthands: {
|
|
111
|
+
key: string;
|
|
112
|
+
count: number;
|
|
113
|
+
}[];
|
|
114
|
+
conditions: {
|
|
115
|
+
key: string;
|
|
116
|
+
count: number;
|
|
117
|
+
}[];
|
|
118
|
+
propertyPaths: {
|
|
119
|
+
key: string;
|
|
120
|
+
count: number;
|
|
121
|
+
}[];
|
|
122
|
+
categories: {
|
|
123
|
+
key: string;
|
|
124
|
+
count: number;
|
|
125
|
+
}[];
|
|
126
|
+
types: {
|
|
127
|
+
key: string;
|
|
128
|
+
count: number;
|
|
129
|
+
}[];
|
|
130
|
+
instanceNames: {
|
|
131
|
+
key: string;
|
|
132
|
+
count: number;
|
|
133
|
+
}[];
|
|
134
|
+
fromKinds: {
|
|
135
|
+
key: string;
|
|
136
|
+
count: number;
|
|
137
|
+
}[];
|
|
138
|
+
instanceOfKinds: {
|
|
139
|
+
key: string;
|
|
140
|
+
count: number;
|
|
141
|
+
}[];
|
|
142
|
+
colors: {
|
|
143
|
+
key: string;
|
|
144
|
+
count: number;
|
|
145
|
+
}[];
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
details: {
|
|
149
|
+
byId: Map<number, _pandacss_types.ReportItem>;
|
|
150
|
+
byInstanceId: Map<number, _pandacss_types.ReportInstanceItem>;
|
|
151
|
+
byFilepath: Map<string, Set<number>>;
|
|
152
|
+
byInstanceInFilepath: Map<string, Set<number>>;
|
|
153
|
+
globalMaps: {
|
|
154
|
+
byInstanceOfKind: Map<"function" | "component", Set<number>>;
|
|
155
|
+
byPropertyName: Map<string, Set<number>>;
|
|
156
|
+
byCategory: Map<string, Set<number>>;
|
|
157
|
+
byConditionName: Map<string, Set<number>>;
|
|
158
|
+
byShorthand: Map<string, Set<number>>;
|
|
159
|
+
byTokenName: Map<string, Set<number>>;
|
|
160
|
+
byPropertyPath: Map<string, Set<number>>;
|
|
161
|
+
fromKind: Map<"function" | "component", Set<number>>;
|
|
162
|
+
byType: Map<string, Set<number>>;
|
|
163
|
+
byInstanceName: Map<string, Set<number>>;
|
|
164
|
+
colorsUsed: Map<string, Set<number>>;
|
|
165
|
+
};
|
|
166
|
+
byFilePathMaps: Map<string, {
|
|
167
|
+
byInstanceOfKind: Map<"function" | "component", Set<number>>;
|
|
168
|
+
byPropertyName: Map<string, Set<number>>;
|
|
169
|
+
byCategory: Map<string, Set<number>>;
|
|
170
|
+
byConditionName: Map<string, Set<number>>;
|
|
171
|
+
byShorthand: Map<string, Set<number>>;
|
|
172
|
+
byTokenName: Map<string, Set<number>>;
|
|
173
|
+
byPropertyPath: Map<string, Set<number>>;
|
|
174
|
+
fromKind: Map<"function" | "component", Set<number>>;
|
|
175
|
+
byType: Map<string, Set<number>>;
|
|
176
|
+
byInstanceName: Map<string, Set<number>>;
|
|
177
|
+
colorsUsed: Map<string, Set<number>>;
|
|
178
|
+
}>;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
declare const writeAnalyzeJSON: (fileName: string, result: ReturnType<typeof analyzeTokens>, ctx: PandaContext) => Promise<void>;
|
|
182
|
+
|
|
183
|
+
type ConfigDepsResult = {
|
|
184
|
+
modifiedMap: Map<string, number>;
|
|
185
|
+
isModified: boolean;
|
|
186
|
+
};
|
|
187
|
+
declare class Builder {
|
|
188
|
+
/**
|
|
189
|
+
* The current panda context
|
|
190
|
+
*/
|
|
191
|
+
context: PandaContext | undefined;
|
|
192
|
+
writeFileCss(file: string, css: string): void;
|
|
193
|
+
checkConfigDeps(configPath: string, deps: Set<string>): ConfigDepsResult;
|
|
194
|
+
getConfigPath(): string;
|
|
195
|
+
setup(options?: {
|
|
196
|
+
configPath?: string;
|
|
197
|
+
}): Promise<void>;
|
|
198
|
+
setupContext(options: {
|
|
199
|
+
configPath: string;
|
|
200
|
+
depsModifiedMap: Map<string, number>;
|
|
201
|
+
}): Promise<void>;
|
|
202
|
+
getContextOrThrow(): PandaContext;
|
|
203
|
+
get fileModifiedMap(): Map<string, number>;
|
|
204
|
+
get fileCssMap(): Map<string, string>;
|
|
205
|
+
extractFile(ctx: PandaContext, file: string): Promise<string | undefined>;
|
|
206
|
+
extract(): Promise<void>;
|
|
207
|
+
toString(): string;
|
|
208
|
+
isValidRoot(root: Root): boolean;
|
|
209
|
+
write(root: Root): void;
|
|
210
|
+
registerDependency(fn: (dep: Message) => void): void;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
declare function findConfig(): string | undefined;
|
|
214
|
+
declare function loadConfigAndCreateContext(options?: {
|
|
215
|
+
cwd?: string;
|
|
216
|
+
config?: Config;
|
|
217
|
+
configPath?: string;
|
|
218
|
+
}): Promise<PandaContext>;
|
|
219
|
+
|
|
220
|
+
declare function debugFiles(ctx: PandaContext, options: {
|
|
221
|
+
outdir: string;
|
|
222
|
+
dry: boolean;
|
|
223
|
+
}): Promise<void>;
|
|
224
|
+
|
|
225
|
+
declare function execCommand(cmd: string, cwd: string): Promise<void>;
|
|
226
|
+
|
|
227
|
+
declare function extractFile(ctx: PandaContext, file: string): string | undefined;
|
|
228
|
+
declare function emitArtifacts(ctx: PandaContext): Promise<string>;
|
|
229
|
+
declare function emitAndExtract(ctx: PandaContext): Promise<string>;
|
|
230
|
+
declare function extractCss(ctx: PandaContext): Promise<string>;
|
|
231
|
+
|
|
232
|
+
declare function generate(config: Config, configPath?: string): Promise<void>;
|
|
233
|
+
|
|
234
|
+
declare function parseDependency(fileOrGlob: string): Message | null;
|
|
235
|
+
|
|
236
|
+
declare function setupGitIgnore(ctx: PandaContext): void;
|
|
237
|
+
|
|
238
|
+
type SetupOptions = Partial<Config> & {
|
|
239
|
+
force?: boolean;
|
|
240
|
+
};
|
|
241
|
+
declare function setupConfig(cwd: string, opts?: SetupOptions): Promise<void>;
|
|
242
|
+
declare function setupPostcss(cwd: string): Promise<void>;
|
|
243
|
+
|
|
244
|
+
declare function shipFiles(ctx: PandaContext, outfile: string): Promise<void>;
|
|
245
|
+
|
|
246
|
+
export { Builder, PandaContext, analyzeTokens, createContext, debugFiles, emitAndExtract, emitArtifacts, execCommand, extractCss, extractFile, findConfig, generate, loadConfigAndCreateContext, parseDependency, setupConfig, setupGitIgnore, setupPostcss, shipFiles, writeAnalyzeJSON };
|
package/dist/index.js
CHANGED
|
@@ -33,15 +33,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@
|
|
38
|
+
"../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
|
+
"use strict";
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
|
|
42
43
|
// ../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js
|
|
43
44
|
var require_eastasianwidth = __commonJS({
|
|
44
45
|
"../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(exports, module2) {
|
|
46
|
+
"use strict";
|
|
45
47
|
init_cjs_shims();
|
|
46
48
|
var eaw = {};
|
|
47
49
|
if ("undefined" == typeof module2) {
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
}) : x)(function(x) {
|
|
10
10
|
if (typeof require !== "undefined")
|
|
11
11
|
return require.apply(this, arguments);
|
|
12
|
-
throw
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __esm = (fn, res) => function __init() {
|
|
15
15
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
@@ -34,15 +34,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
mod
|
|
35
35
|
));
|
|
36
36
|
|
|
37
|
-
// ../../node_modules/.pnpm/tsup@
|
|
37
|
+
// ../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/esm_shims.js
|
|
38
38
|
var init_esm_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@
|
|
39
|
+
"../../node_modules/.pnpm/tsup@7.1.0_postcss@8.4.24_typescript@5.1.3/node_modules/tsup/assets/esm_shims.js"() {
|
|
40
|
+
"use strict";
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
43
|
|
|
43
44
|
// ../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js
|
|
44
45
|
var require_eastasianwidth = __commonJS({
|
|
45
46
|
"../../node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js"(exports, module) {
|
|
47
|
+
"use strict";
|
|
46
48
|
init_esm_shims();
|
|
47
49
|
var eaw = {};
|
|
48
50
|
if ("undefined" == typeof module) {
|
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-20230626090506",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -33,17 +33,17 @@
|
|
|
33
33
|
"preferred-pm": "^3.0.3",
|
|
34
34
|
"ts-morph": "18.0.0",
|
|
35
35
|
"ts-pattern": "4.3.0",
|
|
36
|
-
"@pandacss/config": "0.0.0-dev-
|
|
37
|
-
"@pandacss/core": "0.0.0-dev-
|
|
38
|
-
"@pandacss/error": "0.0.0-dev-
|
|
39
|
-
"@pandacss/extractor": "0.0.0-dev-
|
|
40
|
-
"@pandacss/generator": "0.0.0-dev-
|
|
41
|
-
"@pandacss/is-valid-prop": "0.0.0-dev-
|
|
42
|
-
"@pandacss/logger": "0.0.0-dev-
|
|
43
|
-
"@pandacss/parser": "0.0.0-dev-
|
|
44
|
-
"@pandacss/shared": "0.0.0-dev-
|
|
45
|
-
"@pandacss/token-dictionary": "0.0.0-dev-
|
|
46
|
-
"@pandacss/types": "0.0.0-dev-
|
|
36
|
+
"@pandacss/config": "0.0.0-dev-20230626090506",
|
|
37
|
+
"@pandacss/core": "0.0.0-dev-20230626090506",
|
|
38
|
+
"@pandacss/error": "0.0.0-dev-20230626090506",
|
|
39
|
+
"@pandacss/extractor": "0.0.0-dev-20230626090506",
|
|
40
|
+
"@pandacss/generator": "0.0.0-dev-20230626090506",
|
|
41
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20230626090506",
|
|
42
|
+
"@pandacss/logger": "0.0.0-dev-20230626090506",
|
|
43
|
+
"@pandacss/parser": "0.0.0-dev-20230626090506",
|
|
44
|
+
"@pandacss/shared": "0.0.0-dev-20230626090506",
|
|
45
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20230626090506",
|
|
46
|
+
"@pandacss/types": "0.0.0-dev-20230626090506"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/fs-extra": "11.0.1",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/lodash.merge": "4.6.7",
|
|
53
53
|
"@types/pluralize": "0.0.29",
|
|
54
54
|
"boxen": "^7.1.0",
|
|
55
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
55
|
+
"@pandacss/fixture": "0.0.0-dev-20230626090506"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|