@pandacss/node 0.0.0-dev-20231010202758 → 0.0.0-dev-20231018132058
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 +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +10 -9
- package/dist/index.mjs +9 -7
- package/package.json +13 -13
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { discardDuplicate } from '@pandacss/core';
|
|
2
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
3
2
|
import { PandaHookable, Artifact, ConfigResultWithHooks, Runtime as Runtime$1, ParserResultType, Config } from '@pandacss/types';
|
|
4
3
|
import { Generator } from '@pandacss/generator';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { discardDuplicate } from '@pandacss/core';
|
|
2
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
3
2
|
import { PandaHookable, Artifact, ConfigResultWithHooks, Runtime as Runtime$1, ParserResultType, Config } from '@pandacss/types';
|
|
4
3
|
import { Generator } from '@pandacss/generator';
|
package/dist/index.js
CHANGED
|
@@ -409,7 +409,6 @@ __export(src_exports, {
|
|
|
409
409
|
bundleMinimalFilesCss: () => bundleMinimalFilesCss,
|
|
410
410
|
createContext: () => createContext,
|
|
411
411
|
debugFiles: () => debugFiles,
|
|
412
|
-
discardDuplicate: () => import_core3.discardDuplicate,
|
|
413
412
|
emitArtfifactsAndCssChunks: () => emitArtfifactsAndCssChunks,
|
|
414
413
|
emitArtifacts: () => emitArtifacts,
|
|
415
414
|
execCommand: () => execCommand,
|
|
@@ -428,7 +427,6 @@ __export(src_exports, {
|
|
|
428
427
|
});
|
|
429
428
|
module.exports = __toCommonJS(src_exports);
|
|
430
429
|
init_cjs_shims();
|
|
431
|
-
var import_core3 = require("@pandacss/core");
|
|
432
430
|
|
|
433
431
|
// src/analyze-tokens.ts
|
|
434
432
|
init_cjs_shims();
|
|
@@ -782,7 +780,7 @@ var writeAnalyzeJSON = (fileName, result, ctx) => {
|
|
|
782
780
|
// src/builder.ts
|
|
783
781
|
init_cjs_shims();
|
|
784
782
|
var import_config2 = require("@pandacss/config");
|
|
785
|
-
var
|
|
783
|
+
var import_core3 = require("@pandacss/core");
|
|
786
784
|
var import_error = require("@pandacss/error");
|
|
787
785
|
var import_logger4 = require("@pandacss/logger");
|
|
788
786
|
var import_fs = require("fs");
|
|
@@ -2326,6 +2324,7 @@ var createBox = (options) => boxen(options.content, {
|
|
|
2326
2324
|
var import_promises2 = require("fs/promises");
|
|
2327
2325
|
var import_parser2 = require("@pandacss/parser");
|
|
2328
2326
|
var import_ts_pattern = require("ts-pattern");
|
|
2327
|
+
var import_core2 = require("@pandacss/core");
|
|
2329
2328
|
async function bundleStyleChunksWithImports(ctx) {
|
|
2330
2329
|
const files = ctx.chunks.getFiles();
|
|
2331
2330
|
await ctx.output.write({
|
|
@@ -2397,7 +2396,8 @@ async function writeAndBundleCssChunks(ctx) {
|
|
|
2397
2396
|
async function bundleCss(ctx, outfile) {
|
|
2398
2397
|
const extracted = await writeChunks(ctx);
|
|
2399
2398
|
const files = ctx.chunks.getFiles();
|
|
2400
|
-
|
|
2399
|
+
const minify = ctx.config.minify;
|
|
2400
|
+
await (0, import_promises2.writeFile)(outfile, (0, import_core2.optimizeCss)(ctx.getCss({ files, resolve: true }), { minify }));
|
|
2401
2401
|
return { files, msg: ctx.messages.buildComplete(extracted.length) };
|
|
2402
2402
|
}
|
|
2403
2403
|
async function bundleMinimalFilesCss(ctx, outfile) {
|
|
@@ -2416,7 +2416,8 @@ async function bundleMinimalFilesCss(ctx, outfile) {
|
|
|
2416
2416
|
const css = ctx.getParserCss(collector);
|
|
2417
2417
|
if (!css)
|
|
2418
2418
|
return { files, msg: ctx.messages.buildComplete(files.length) };
|
|
2419
|
-
|
|
2419
|
+
const minify = ctx.config.minify;
|
|
2420
|
+
await (0, import_promises2.writeFile)(outfile, (0, import_core2.optimizeCss)(css, { minify }));
|
|
2420
2421
|
return { files, msg: ctx.messages.buildComplete(files.length) };
|
|
2421
2422
|
}
|
|
2422
2423
|
async function generateCssArtifactOfType(ctx, cssType, outfile) {
|
|
@@ -2428,7 +2429,8 @@ async function generateCssArtifactOfType(ctx, cssType, outfile) {
|
|
|
2428
2429
|
return { msg: `No css artifact of type <${cssType}> was found` };
|
|
2429
2430
|
if (!css)
|
|
2430
2431
|
return { msg: `No css to generate for type <${cssType}>` };
|
|
2431
|
-
|
|
2432
|
+
const minify = ctx.config.minify;
|
|
2433
|
+
await (0, import_promises2.writeFile)(outfile, (0, import_core2.optimizeCss)(css, { minify }));
|
|
2432
2434
|
return { msg: `Successfully generated ${cssType} css artifact \u2728` };
|
|
2433
2435
|
}
|
|
2434
2436
|
|
|
@@ -2488,7 +2490,7 @@ var Builder = class {
|
|
|
2488
2490
|
configDependencies = /* @__PURE__ */ new Set();
|
|
2489
2491
|
writeFileCss = (file, css) => {
|
|
2490
2492
|
const oldCss = this.fileCssMap?.get(file) ?? "";
|
|
2491
|
-
const newCss = (0,
|
|
2493
|
+
const newCss = (0, import_core3.mergeCss)(oldCss, css);
|
|
2492
2494
|
this.fileCssMap?.set(file, newCss);
|
|
2493
2495
|
};
|
|
2494
2496
|
checkConfigDeps = (configPath, deps) => {
|
|
@@ -2622,7 +2624,7 @@ var Builder = class {
|
|
|
2622
2624
|
const rootCssContent = root.toString();
|
|
2623
2625
|
root.removeAll();
|
|
2624
2626
|
root.append(
|
|
2625
|
-
(0,
|
|
2627
|
+
(0, import_core3.optimizeCss)(`
|
|
2626
2628
|
${rootCssContent}
|
|
2627
2629
|
${this.toString()}
|
|
2628
2630
|
`)
|
|
@@ -2899,7 +2901,6 @@ async function shipFiles(ctx, outfile) {
|
|
|
2899
2901
|
bundleMinimalFilesCss,
|
|
2900
2902
|
createContext,
|
|
2901
2903
|
debugFiles,
|
|
2902
|
-
discardDuplicate,
|
|
2903
2904
|
emitArtfifactsAndCssChunks,
|
|
2904
2905
|
emitArtifacts,
|
|
2905
2906
|
execCommand,
|
package/dist/index.mjs
CHANGED
|
@@ -403,7 +403,6 @@ var require_ansi_align = __commonJS({
|
|
|
403
403
|
|
|
404
404
|
// src/index.ts
|
|
405
405
|
init_esm_shims();
|
|
406
|
-
import { discardDuplicate as discardDuplicate2 } from "@pandacss/core";
|
|
407
406
|
|
|
408
407
|
// src/analyze-tokens.ts
|
|
409
408
|
init_esm_shims();
|
|
@@ -757,7 +756,7 @@ var writeAnalyzeJSON = (fileName, result, ctx) => {
|
|
|
757
756
|
// src/builder.ts
|
|
758
757
|
init_esm_shims();
|
|
759
758
|
import { getConfigDependencies } from "@pandacss/config";
|
|
760
|
-
import {
|
|
759
|
+
import { optimizeCss as optimizeCss2, mergeCss as mergeCss2 } from "@pandacss/core";
|
|
761
760
|
import { ConfigNotFoundError } from "@pandacss/error";
|
|
762
761
|
import { logger as logger4 } from "@pandacss/logger";
|
|
763
762
|
import { existsSync as existsSync2 } from "fs";
|
|
@@ -2310,6 +2309,7 @@ var createBox = (options) => boxen(options.content, {
|
|
|
2310
2309
|
import { writeFile as writeFile3 } from "fs/promises";
|
|
2311
2310
|
import { createParserResult } from "@pandacss/parser";
|
|
2312
2311
|
import { match } from "ts-pattern";
|
|
2312
|
+
import { optimizeCss } from "@pandacss/core";
|
|
2313
2313
|
async function bundleStyleChunksWithImports(ctx) {
|
|
2314
2314
|
const files = ctx.chunks.getFiles();
|
|
2315
2315
|
await ctx.output.write({
|
|
@@ -2381,7 +2381,8 @@ async function writeAndBundleCssChunks(ctx) {
|
|
|
2381
2381
|
async function bundleCss(ctx, outfile) {
|
|
2382
2382
|
const extracted = await writeChunks(ctx);
|
|
2383
2383
|
const files = ctx.chunks.getFiles();
|
|
2384
|
-
|
|
2384
|
+
const minify = ctx.config.minify;
|
|
2385
|
+
await writeFile3(outfile, optimizeCss(ctx.getCss({ files, resolve: true }), { minify }));
|
|
2385
2386
|
return { files, msg: ctx.messages.buildComplete(extracted.length) };
|
|
2386
2387
|
}
|
|
2387
2388
|
async function bundleMinimalFilesCss(ctx, outfile) {
|
|
@@ -2400,7 +2401,8 @@ async function bundleMinimalFilesCss(ctx, outfile) {
|
|
|
2400
2401
|
const css = ctx.getParserCss(collector);
|
|
2401
2402
|
if (!css)
|
|
2402
2403
|
return { files, msg: ctx.messages.buildComplete(files.length) };
|
|
2403
|
-
|
|
2404
|
+
const minify = ctx.config.minify;
|
|
2405
|
+
await writeFile3(outfile, optimizeCss(css, { minify }));
|
|
2404
2406
|
return { files, msg: ctx.messages.buildComplete(files.length) };
|
|
2405
2407
|
}
|
|
2406
2408
|
async function generateCssArtifactOfType(ctx, cssType, outfile) {
|
|
@@ -2412,7 +2414,8 @@ async function generateCssArtifactOfType(ctx, cssType, outfile) {
|
|
|
2412
2414
|
return { msg: `No css artifact of type <${cssType}> was found` };
|
|
2413
2415
|
if (!css)
|
|
2414
2416
|
return { msg: `No css to generate for type <${cssType}>` };
|
|
2415
|
-
|
|
2417
|
+
const minify = ctx.config.minify;
|
|
2418
|
+
await writeFile3(outfile, optimizeCss(css, { minify }));
|
|
2416
2419
|
return { msg: `Successfully generated ${cssType} css artifact \u2728` };
|
|
2417
2420
|
}
|
|
2418
2421
|
|
|
@@ -2606,7 +2609,7 @@ var Builder = class {
|
|
|
2606
2609
|
const rootCssContent = root.toString();
|
|
2607
2610
|
root.removeAll();
|
|
2608
2611
|
root.append(
|
|
2609
|
-
|
|
2612
|
+
optimizeCss2(`
|
|
2610
2613
|
${rootCssContent}
|
|
2611
2614
|
${this.toString()}
|
|
2612
2615
|
`)
|
|
@@ -2882,7 +2885,6 @@ export {
|
|
|
2882
2885
|
bundleMinimalFilesCss,
|
|
2883
2886
|
createContext,
|
|
2884
2887
|
debugFiles,
|
|
2885
|
-
discardDuplicate2 as discardDuplicate,
|
|
2886
2888
|
emitArtfifactsAndCssChunks,
|
|
2887
2889
|
emitArtifacts,
|
|
2888
2890
|
execCommand,
|
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-20231018132058",
|
|
4
4
|
"description": "The core css panda library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"ts-morph": "19.0.0",
|
|
35
35
|
"ts-pattern": "5.0.5",
|
|
36
36
|
"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-
|
|
37
|
+
"@pandacss/config": "0.0.0-dev-20231018132058",
|
|
38
|
+
"@pandacss/core": "0.0.0-dev-20231018132058",
|
|
39
|
+
"@pandacss/error": "0.0.0-dev-20231018132058",
|
|
40
|
+
"@pandacss/extractor": "0.0.0-dev-20231018132058",
|
|
41
|
+
"@pandacss/generator": "0.0.0-dev-20231018132058",
|
|
42
|
+
"@pandacss/is-valid-prop": "0.0.0-dev-20231018132058",
|
|
43
|
+
"@pandacss/logger": "0.0.0-dev-20231018132058",
|
|
44
|
+
"@pandacss/parser": "0.0.0-dev-20231018132058",
|
|
45
|
+
"@pandacss/shared": "0.0.0-dev-20231018132058",
|
|
46
|
+
"@pandacss/token-dictionary": "0.0.0-dev-20231018132058",
|
|
47
|
+
"@pandacss/types": "0.0.0-dev-20231018132058"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/fs-extra": "11.0.2",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@types/lodash.merge": "4.6.7",
|
|
54
54
|
"@types/pluralize": "0.0.30",
|
|
55
55
|
"boxen": "^7.1.1",
|
|
56
|
-
"@pandacss/fixture": "0.0.0-dev-
|
|
56
|
+
"@pandacss/fixture": "0.0.0-dev-20231018132058"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"build": "tsup src/index.ts --format=cjs,esm --shims --dts",
|