@pandacss/node 0.39.1 → 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 +41 -41
- package/dist/index.mjs +42 -42
- package/package.json +12 -12
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
|
@@ -763,8 +763,7 @@ var writeAnalyzeJSON = (filePath, result, ctx) => {
|
|
|
763
763
|
theme: ctx.config.theme,
|
|
764
764
|
utilities: ctx.config.utilities,
|
|
765
765
|
conditions: ctx.config.conditions,
|
|
766
|
-
shorthands: ctx.utility.shorthands
|
|
767
|
-
parserOptions: ctx.parserOptions
|
|
766
|
+
shorthands: ctx.utility.shorthands
|
|
768
767
|
}),
|
|
769
768
|
analyzeResultSerializer,
|
|
770
769
|
2
|
|
@@ -908,6 +907,39 @@ function pLimit(concurrency) {
|
|
|
908
907
|
return generator;
|
|
909
908
|
}
|
|
910
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
|
+
|
|
911
943
|
// src/cli-box.ts
|
|
912
944
|
init_cjs_shims();
|
|
913
945
|
|
|
@@ -2220,44 +2252,6 @@ var createBox = (options) => boxen(options.content, {
|
|
|
2220
2252
|
titleAlignment: "center"
|
|
2221
2253
|
});
|
|
2222
2254
|
|
|
2223
|
-
// src/codegen.ts
|
|
2224
|
-
var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
|
|
2225
|
-
var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
|
|
2226
|
-
var limit = pLimit(20);
|
|
2227
|
-
async function codegen(ctx, ids) {
|
|
2228
|
-
if (ctx.config.clean)
|
|
2229
|
-
ctx.output.empty();
|
|
2230
|
-
let artifacts = ctx.getArtifacts(ids);
|
|
2231
|
-
if (ctx.hooks["codegen:prepare"]) {
|
|
2232
|
-
const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
|
|
2233
|
-
if (results)
|
|
2234
|
-
artifacts = results;
|
|
2235
|
-
}
|
|
2236
|
-
const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
|
|
2237
|
-
await Promise.allSettled(promises);
|
|
2238
|
-
await ctx.hooks["codegen:done"]?.({ changed: ids });
|
|
2239
|
-
return {
|
|
2240
|
-
box: createBox({
|
|
2241
|
-
content: ctx.messages.codegenComplete(),
|
|
2242
|
-
title: `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
|
|
2243
|
-
}),
|
|
2244
|
-
msg: ctx.messages.artifactsGenerated()
|
|
2245
|
-
};
|
|
2246
|
-
}
|
|
2247
|
-
|
|
2248
|
-
// src/config.ts
|
|
2249
|
-
init_cjs_shims();
|
|
2250
|
-
var import_config3 = require("@pandacss/config");
|
|
2251
|
-
var import_browserslist = __toESM(require("browserslist"));
|
|
2252
|
-
|
|
2253
|
-
// src/create-context.ts
|
|
2254
|
-
init_cjs_shims();
|
|
2255
|
-
var import_generator2 = require("@pandacss/generator");
|
|
2256
|
-
var import_logger5 = require("@pandacss/logger");
|
|
2257
|
-
var import_parser = require("@pandacss/parser");
|
|
2258
|
-
var import_shared = require("@pandacss/shared");
|
|
2259
|
-
var import_perfect_debounce = require("perfect-debounce");
|
|
2260
|
-
|
|
2261
2255
|
// src/diff-engine.ts
|
|
2262
2256
|
init_cjs_shims();
|
|
2263
2257
|
var import_config = require("@pandacss/config");
|
|
@@ -2442,6 +2436,12 @@ var PandaContext = class extends import_generator2.Generator {
|
|
|
2442
2436
|
return [];
|
|
2443
2437
|
return this.runtime.fs.glob({ include: dependencies, cwd });
|
|
2444
2438
|
};
|
|
2439
|
+
initMessage = () => {
|
|
2440
|
+
return createBox({
|
|
2441
|
+
content: this.messages.codegenComplete(),
|
|
2442
|
+
title: this.messages.exclamation()
|
|
2443
|
+
});
|
|
2444
|
+
};
|
|
2445
2445
|
getFiles = () => {
|
|
2446
2446
|
const { include, exclude, cwd } = this.config;
|
|
2447
2447
|
return this.runtime.fs.glob({ include, exclude, cwd });
|
|
@@ -2619,7 +2619,7 @@ function parseDependency(fileOrGlob) {
|
|
|
2619
2619
|
}
|
|
2620
2620
|
|
|
2621
2621
|
// src/builder.ts
|
|
2622
|
-
var fileModifiedMap = new
|
|
2622
|
+
var fileModifiedMap = /* @__PURE__ */ new Map();
|
|
2623
2623
|
var Builder = class {
|
|
2624
2624
|
/**
|
|
2625
2625
|
* The current panda context
|
package/dist/index.mjs
CHANGED
|
@@ -737,8 +737,7 @@ var writeAnalyzeJSON = (filePath, result, ctx) => {
|
|
|
737
737
|
theme: ctx.config.theme,
|
|
738
738
|
utilities: ctx.config.utilities,
|
|
739
739
|
conditions: ctx.config.conditions,
|
|
740
|
-
shorthands: ctx.utility.shorthands
|
|
741
|
-
parserOptions: ctx.parserOptions
|
|
740
|
+
shorthands: ctx.utility.shorthands
|
|
742
741
|
}),
|
|
743
742
|
analyzeResultSerializer,
|
|
744
743
|
2
|
|
@@ -765,7 +764,7 @@ init_esm_shims();
|
|
|
765
764
|
import { findConfig, getConfigDependencies } from "@pandacss/config";
|
|
766
765
|
import { optimizeCss } from "@pandacss/core";
|
|
767
766
|
import { logger as logger6 } from "@pandacss/logger";
|
|
768
|
-
import {
|
|
767
|
+
import { PandaError, uniq as uniq2 } from "@pandacss/shared";
|
|
769
768
|
import { existsSync, statSync } from "fs";
|
|
770
769
|
import { normalize as normalize2, resolve as resolve3 } from "path";
|
|
771
770
|
|
|
@@ -882,6 +881,39 @@ function pLimit(concurrency) {
|
|
|
882
881
|
return generator;
|
|
883
882
|
}
|
|
884
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
|
+
|
|
885
917
|
// src/cli-box.ts
|
|
886
918
|
init_esm_shims();
|
|
887
919
|
|
|
@@ -2194,44 +2226,6 @@ var createBox = (options) => boxen(options.content, {
|
|
|
2194
2226
|
titleAlignment: "center"
|
|
2195
2227
|
});
|
|
2196
2228
|
|
|
2197
|
-
// src/codegen.ts
|
|
2198
|
-
var randomWords = ["Sweet", "Divine", "Pandalicious", "Super"];
|
|
2199
|
-
var pickRandom = (arr) => arr[Math.floor(Math.random() * arr.length)];
|
|
2200
|
-
var limit = pLimit(20);
|
|
2201
|
-
async function codegen(ctx, ids) {
|
|
2202
|
-
if (ctx.config.clean)
|
|
2203
|
-
ctx.output.empty();
|
|
2204
|
-
let artifacts = ctx.getArtifacts(ids);
|
|
2205
|
-
if (ctx.hooks["codegen:prepare"]) {
|
|
2206
|
-
const results = await ctx.hooks["codegen:prepare"]?.({ changed: ids, artifacts });
|
|
2207
|
-
if (results)
|
|
2208
|
-
artifacts = results;
|
|
2209
|
-
}
|
|
2210
|
-
const promises = artifacts.map((artifact) => limit(() => ctx.output.write(artifact)));
|
|
2211
|
-
await Promise.allSettled(promises);
|
|
2212
|
-
await ctx.hooks["codegen:done"]?.({ changed: ids });
|
|
2213
|
-
return {
|
|
2214
|
-
box: createBox({
|
|
2215
|
-
content: ctx.messages.codegenComplete(),
|
|
2216
|
-
title: `\u{1F43C} ${pickRandom(randomWords)}! \u2728`
|
|
2217
|
-
}),
|
|
2218
|
-
msg: ctx.messages.artifactsGenerated()
|
|
2219
|
-
};
|
|
2220
|
-
}
|
|
2221
|
-
|
|
2222
|
-
// src/config.ts
|
|
2223
|
-
init_esm_shims();
|
|
2224
|
-
import { loadConfig as loadConfig2 } from "@pandacss/config";
|
|
2225
|
-
import browserslist from "browserslist";
|
|
2226
|
-
|
|
2227
|
-
// src/create-context.ts
|
|
2228
|
-
init_esm_shims();
|
|
2229
|
-
import { Generator as Generator2 } from "@pandacss/generator";
|
|
2230
|
-
import { logger as logger5 } from "@pandacss/logger";
|
|
2231
|
-
import { Project } from "@pandacss/parser";
|
|
2232
|
-
import { uniq } from "@pandacss/shared";
|
|
2233
|
-
import { debounce } from "perfect-debounce";
|
|
2234
|
-
|
|
2235
2229
|
// src/diff-engine.ts
|
|
2236
2230
|
init_esm_shims();
|
|
2237
2231
|
import { diffConfigs, loadConfig } from "@pandacss/config";
|
|
@@ -2416,6 +2410,12 @@ var PandaContext = class extends Generator2 {
|
|
|
2416
2410
|
return [];
|
|
2417
2411
|
return this.runtime.fs.glob({ include: dependencies, cwd });
|
|
2418
2412
|
};
|
|
2413
|
+
initMessage = () => {
|
|
2414
|
+
return createBox({
|
|
2415
|
+
content: this.messages.codegenComplete(),
|
|
2416
|
+
title: this.messages.exclamation()
|
|
2417
|
+
});
|
|
2418
|
+
};
|
|
2419
2419
|
getFiles = () => {
|
|
2420
2420
|
const { include, exclude, cwd } = this.config;
|
|
2421
2421
|
return this.runtime.fs.glob({ include, exclude, cwd });
|
|
@@ -2593,7 +2593,7 @@ function parseDependency(fileOrGlob) {
|
|
|
2593
2593
|
}
|
|
2594
2594
|
|
|
2595
2595
|
// src/builder.ts
|
|
2596
|
-
var fileModifiedMap = new
|
|
2596
|
+
var fileModifiedMap = /* @__PURE__ */ new Map();
|
|
2597
2597
|
var Builder = class {
|
|
2598
2598
|
/**
|
|
2599
2599
|
* The current panda context
|
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",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"chokidar": "3.6.0",
|
|
37
37
|
"fast-glob": "3.3.2",
|
|
38
38
|
"file-size": "1.0.0",
|
|
39
|
-
"filesize": "10.1.
|
|
39
|
+
"filesize": "10.1.2",
|
|
40
40
|
"fs-extra": "11.2.0",
|
|
41
41
|
"glob-parent": "6.0.2",
|
|
42
42
|
"is-glob": "4.0.3",
|
|
@@ -46,21 +46,21 @@
|
|
|
46
46
|
"perfect-debounce": "1.0.0",
|
|
47
47
|
"pkg-types": "1.0.3",
|
|
48
48
|
"pluralize": "8.0.0",
|
|
49
|
-
"postcss": "8.4.
|
|
49
|
+
"postcss": "8.4.38",
|
|
50
50
|
"preferred-pm": "3.1.2",
|
|
51
51
|
"prettier": "3.2.5",
|
|
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",
|