@pandacss/node 0.39.2 → 0.40.0
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +39 -38
- package/dist/index.mjs +39 -38
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -44,6 +44,7 @@ declare class PandaContext extends Generator {
|
|
|
44
44
|
explicitDeps: string[];
|
|
45
45
|
constructor(conf: LoadConfigResult);
|
|
46
46
|
private getExplicitDependencies;
|
|
47
|
+
initMessage: () => string;
|
|
47
48
|
getFiles: () => string[];
|
|
48
49
|
parseFile: (filePath: string, styleEncoder?: StyleEncoder) => ParserResult | undefined;
|
|
49
50
|
parseFiles: (styleEncoder?: StyleEncoder) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ declare class PandaContext extends Generator {
|
|
|
44
44
|
explicitDeps: string[];
|
|
45
45
|
constructor(conf: LoadConfigResult);
|
|
46
46
|
private getExplicitDependencies;
|
|
47
|
+
initMessage: () => string;
|
|
47
48
|
getFiles: () => string[];
|
|
48
49
|
parseFile: (filePath: string, styleEncoder?: StyleEncoder) => ParserResult | undefined;
|
|
49
50
|
parseFiles: (styleEncoder?: StyleEncoder) => {
|
package/dist/index.js
CHANGED
|
@@ -907,6 +907,39 @@ function pLimit(concurrency) {
|
|
|
907
907
|
return generator;
|
|
908
908
|
}
|
|
909
909
|
|
|
910
|
+
// src/codegen.ts
|
|
911
|
+
var limit = pLimit(20);
|
|
912
|
+
async function codegen(ctx, ids) {
|
|
913
|
+
if (ctx.config.clean)
|
|
914
|
+
ctx.output.empty();
|
|
915
|
+
let artifacts = ctx.getArtifacts(ids);
|
|
916
|
+
if (ctx.hooks["codegen:prepare"]) {
|
|
917
|
+
const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
|
|
918
|
+
if (results)
|
|
919
|
+
artifacts = results;
|
|
920
|
+
}
|
|
921
|
+
const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
|
|
922
|
+
await Promise.allSettled(promises);
|
|
923
|
+
await ctx.hooks["codegen:done"]?.({ changed: ids });
|
|
924
|
+
return {
|
|
925
|
+
box: ctx.initMessage(),
|
|
926
|
+
msg: ctx.messages.artifactsGenerated()
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
// src/config.ts
|
|
931
|
+
init_cjs_shims();
|
|
932
|
+
var import_config3 = require("@pandacss/config");
|
|
933
|
+
var import_browserslist = __toESM(require("browserslist"));
|
|
934
|
+
|
|
935
|
+
// src/create-context.ts
|
|
936
|
+
init_cjs_shims();
|
|
937
|
+
var import_generator2 = require("@pandacss/generator");
|
|
938
|
+
var import_logger5 = require("@pandacss/logger");
|
|
939
|
+
var import_parser = require("@pandacss/parser");
|
|
940
|
+
var import_shared = require("@pandacss/shared");
|
|
941
|
+
var import_perfect_debounce = require("perfect-debounce");
|
|
942
|
+
|
|
910
943
|
// src/cli-box.ts
|
|
911
944
|
init_cjs_shims();
|
|
912
945
|
|
|
@@ -2219,44 +2252,6 @@ var createBox = (options) => boxen(options.content, {
|
|
|
2219
2252
|
titleAlignment: "center"
|
|
2220
2253
|
});
|
|
2221
2254
|
|
|
2222
|
-
// src/codegen.ts
|
|
2223
|
-
var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
|
|
2224
|
-
var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
|
|
2225
|
-
var limit = pLimit(20);
|
|
2226
|
-
async function codegen(ctx, ids) {
|
|
2227
|
-
if (ctx.config.clean)
|
|
2228
|
-
ctx.output.empty();
|
|
2229
|
-
let artifacts = ctx.getArtifacts(ids);
|
|
2230
|
-
if (ctx.hooks["codegen:prepare"]) {
|
|
2231
|
-
const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
|
|
2232
|
-
if (results)
|
|
2233
|
-
artifacts = results;
|
|
2234
|
-
}
|
|
2235
|
-
const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
|
|
2236
|
-
await Promise.allSettled(promises);
|
|
2237
|
-
await ctx.hooks["codegen:done"]?.({ changed: ids });
|
|
2238
|
-
return {
|
|
2239
|
-
box: createBox({
|
|
2240
|
-
content: ctx.messages.codegenComplete(),
|
|
2241
|
-
title: `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
|
|
2242
|
-
}),
|
|
2243
|
-
msg: ctx.messages.artifactsGenerated()
|
|
2244
|
-
};
|
|
2245
|
-
}
|
|
2246
|
-
|
|
2247
|
-
// src/config.ts
|
|
2248
|
-
init_cjs_shims();
|
|
2249
|
-
var import_config3 = require("@pandacss/config");
|
|
2250
|
-
var import_browserslist = __toESM(require("browserslist"));
|
|
2251
|
-
|
|
2252
|
-
// src/create-context.ts
|
|
2253
|
-
init_cjs_shims();
|
|
2254
|
-
var import_generator2 = require("@pandacss/generator");
|
|
2255
|
-
var import_logger5 = require("@pandacss/logger");
|
|
2256
|
-
var import_parser = require("@pandacss/parser");
|
|
2257
|
-
var import_shared = require("@pandacss/shared");
|
|
2258
|
-
var import_perfect_debounce = require("perfect-debounce");
|
|
2259
|
-
|
|
2260
2255
|
// src/diff-engine.ts
|
|
2261
2256
|
init_cjs_shims();
|
|
2262
2257
|
var import_config = require("@pandacss/config");
|
|
@@ -2441,6 +2436,12 @@ var PandaContext = class extends import_generator2.Generator {
|
|
|
2441
2436
|
return [];
|
|
2442
2437
|
return this.runtime.fs.glob({ include: dependencies, cwd });
|
|
2443
2438
|
};
|
|
2439
|
+
initMessage = () => {
|
|
2440
|
+
return createBox({
|
|
2441
|
+
content: this.messages.codegenComplete(),
|
|
2442
|
+
title: this.messages.exclamation()
|
|
2443
|
+
});
|
|
2444
|
+
};
|
|
2444
2445
|
getFiles = () => {
|
|
2445
2446
|
const { include, exclude, cwd } = this.config;
|
|
2446
2447
|
return this.runtime.fs.glob({ include, exclude, cwd });
|
package/dist/index.mjs
CHANGED
|
@@ -881,6 +881,39 @@ function pLimit(concurrency) {
|
|
|
881
881
|
return generator;
|
|
882
882
|
}
|
|
883
883
|
|
|
884
|
+
// src/codegen.ts
|
|
885
|
+
var limit = pLimit(20);
|
|
886
|
+
async function codegen(ctx, ids) {
|
|
887
|
+
if (ctx.config.clean)
|
|
888
|
+
ctx.output.empty();
|
|
889
|
+
let artifacts = ctx.getArtifacts(ids);
|
|
890
|
+
if (ctx.hooks["codegen:prepare"]) {
|
|
891
|
+
const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
|
|
892
|
+
if (results)
|
|
893
|
+
artifacts = results;
|
|
894
|
+
}
|
|
895
|
+
const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
|
|
896
|
+
await Promise.allSettled(promises);
|
|
897
|
+
await ctx.hooks["codegen:done"]?.({ changed: ids });
|
|
898
|
+
return {
|
|
899
|
+
box: ctx.initMessage(),
|
|
900
|
+
msg: ctx.messages.artifactsGenerated()
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
// src/config.ts
|
|
905
|
+
init_esm_shims();
|
|
906
|
+
import { loadConfig as loadConfig2 } from "@pandacss/config";
|
|
907
|
+
import browserslist from "browserslist";
|
|
908
|
+
|
|
909
|
+
// src/create-context.ts
|
|
910
|
+
init_esm_shims();
|
|
911
|
+
import { Generator as Generator2 } from "@pandacss/generator";
|
|
912
|
+
import { logger as logger5 } from "@pandacss/logger";
|
|
913
|
+
import { Project } from "@pandacss/parser";
|
|
914
|
+
import { uniq } from "@pandacss/shared";
|
|
915
|
+
import { debounce } from "perfect-debounce";
|
|
916
|
+
|
|
884
917
|
// src/cli-box.ts
|
|
885
918
|
init_esm_shims();
|
|
886
919
|
|
|
@@ -2193,44 +2226,6 @@ var createBox = (options) => boxen(options.content, {
|
|
|
2193
2226
|
titleAlignment: "center"
|
|
2194
2227
|
});
|
|
2195
2228
|
|
|
2196
|
-
// src/codegen.ts
|
|
2197
|
-
var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
|
|
2198
|
-
var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
|
|
2199
|
-
var limit = pLimit(20);
|
|
2200
|
-
async function codegen(ctx, ids) {
|
|
2201
|
-
if (ctx.config.clean)
|
|
2202
|
-
ctx.output.empty();
|
|
2203
|
-
let artifacts = ctx.getArtifacts(ids);
|
|
2204
|
-
if (ctx.hooks["codegen:prepare"]) {
|
|
2205
|
-
const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
|
|
2206
|
-
if (results)
|
|
2207
|
-
artifacts = results;
|
|
2208
|
-
}
|
|
2209
|
-
const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
|
|
2210
|
-
await Promise.allSettled(promises);
|
|
2211
|
-
await ctx.hooks["codegen:done"]?.({ changed: ids });
|
|
2212
|
-
return {
|
|
2213
|
-
box: createBox({
|
|
2214
|
-
content: ctx.messages.codegenComplete(),
|
|
2215
|
-
title: `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
|
|
2216
|
-
}),
|
|
2217
|
-
msg: ctx.messages.artifactsGenerated()
|
|
2218
|
-
};
|
|
2219
|
-
}
|
|
2220
|
-
|
|
2221
|
-
// src/config.ts
|
|
2222
|
-
init_esm_shims();
|
|
2223
|
-
import { loadConfig as loadConfig2 } from "@pandacss/config";
|
|
2224
|
-
import browserslist from "browserslist";
|
|
2225
|
-
|
|
2226
|
-
// src/create-context.ts
|
|
2227
|
-
init_esm_shims();
|
|
2228
|
-
import { Generator as Generator2 } from "@pandacss/generator";
|
|
2229
|
-
import { logger as logger5 } from "@pandacss/logger";
|
|
2230
|
-
import { Project } from "@pandacss/parser";
|
|
2231
|
-
import { uniq } from "@pandacss/shared";
|
|
2232
|
-
import { debounce } from "perfect-debounce";
|
|
2233
|
-
|
|
2234
2229
|
// src/diff-engine.ts
|
|
2235
2230
|
init_esm_shims();
|
|
2236
2231
|
import { diffConfigs, loadConfig } from "@pandacss/config";
|
|
@@ -2415,6 +2410,12 @@ var PandaContext = class extends Generator2 {
|
|
|
2415
2410
|
return [];
|
|
2416
2411
|
return this.runtime.fs.glob({ include: dependencies, cwd });
|
|
2417
2412
|
};
|
|
2413
|
+
initMessage = () => {
|
|
2414
|
+
return createBox({
|
|
2415
|
+
content: this.messages.codegenComplete(),
|
|
2416
|
+
title: this.messages.exclamation()
|
|
2417
|
+
});
|
|
2418
|
+
};
|
|
2418
2419
|
getFiles = () => {
|
|
2419
2420
|
const { include, exclude, cwd } = this.config;
|
|
2420
2421
|
return this.runtime.fs.glob({ include, exclude, cwd });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
"ts-morph": "21.0.1",
|
|
53
53
|
"ts-pattern": "5.0.8",
|
|
54
54
|
"tsconfck": "3.0.2",
|
|
55
|
-
"@pandacss/config": "0.
|
|
56
|
-
"@pandacss/core": "0.
|
|
57
|
-
"@pandacss/extractor": "0.
|
|
58
|
-
"@pandacss/generator": "0.
|
|
59
|
-
"@pandacss/logger": "0.
|
|
60
|
-
"@pandacss/parser": "0.
|
|
61
|
-
"@pandacss/shared": "0.
|
|
62
|
-
"@pandacss/token-dictionary": "0.
|
|
63
|
-
"@pandacss/types": "0.
|
|
55
|
+
"@pandacss/config": "0.40.0",
|
|
56
|
+
"@pandacss/core": "0.40.0",
|
|
57
|
+
"@pandacss/extractor": "0.40.0",
|
|
58
|
+
"@pandacss/generator": "0.40.0",
|
|
59
|
+
"@pandacss/logger": "0.40.0",
|
|
60
|
+
"@pandacss/parser": "0.40.0",
|
|
61
|
+
"@pandacss/shared": "0.40.0",
|
|
62
|
+
"@pandacss/token-dictionary": "0.40.0",
|
|
63
|
+
"@pandacss/types": "0.40.0"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/fs-extra": "11.0.4",
|