@pandacss/generator 0.41.0 → 0.43.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.js +6 -68
- package/dist/index.mjs +6 -68
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -2791,56 +2791,6 @@ function generateJsxPatterns(ctx, filters) {
|
|
|
2791
2791
|
return patternMap[ctx.jsx.framework](ctx, filters);
|
|
2792
2792
|
}
|
|
2793
2793
|
|
|
2794
|
-
// src/artifacts/pkg-json.ts
|
|
2795
|
-
function generatePackageJson(ctx) {
|
|
2796
|
-
const {
|
|
2797
|
-
config: { outdir }
|
|
2798
|
-
} = ctx;
|
|
2799
|
-
const pkg = {
|
|
2800
|
-
name: outdir,
|
|
2801
|
-
description: "This package is auto-generated by Panda CSS",
|
|
2802
|
-
version: `0.0.0-${performance.now()}`,
|
|
2803
|
-
type: "module",
|
|
2804
|
-
exports: {
|
|
2805
|
-
"./css": {
|
|
2806
|
-
types: ctx.file.extDts("./css/index"),
|
|
2807
|
-
require: ctx.file.ext(`./css/index`),
|
|
2808
|
-
import: ctx.file.ext(`./css/index`)
|
|
2809
|
-
},
|
|
2810
|
-
"./jsx": {
|
|
2811
|
-
types: ctx.file.extDts("./jsx/index"),
|
|
2812
|
-
require: ctx.file.ext(`./jsx/index`),
|
|
2813
|
-
import: ctx.file.ext(`./jsx/index`)
|
|
2814
|
-
},
|
|
2815
|
-
"./patterns": {
|
|
2816
|
-
types: ctx.file.extDts("./patterns/index"),
|
|
2817
|
-
require: ctx.file.ext(`./patterns/index`),
|
|
2818
|
-
import: ctx.file.ext(`./patterns/index`)
|
|
2819
|
-
},
|
|
2820
|
-
"./recipes": {
|
|
2821
|
-
types: ctx.file.extDts("./recipes/index"),
|
|
2822
|
-
require: ctx.file.ext(`./recipes/index`),
|
|
2823
|
-
import: ctx.file.ext(`./recipes/index`)
|
|
2824
|
-
},
|
|
2825
|
-
"./themes": {
|
|
2826
|
-
types: ctx.file.extDts("./themes/index"),
|
|
2827
|
-
require: ctx.file.ext(`./themes/index`),
|
|
2828
|
-
import: ctx.file.ext(`./themes/index`)
|
|
2829
|
-
},
|
|
2830
|
-
"./tokens": {
|
|
2831
|
-
types: ctx.file.extDts("./tokens/index"),
|
|
2832
|
-
require: ctx.file.ext(`./tokens/index`),
|
|
2833
|
-
import: ctx.file.ext(`./tokens/index`)
|
|
2834
|
-
},
|
|
2835
|
-
"./types": {
|
|
2836
|
-
types: ctx.file.extDts("./types/index")
|
|
2837
|
-
},
|
|
2838
|
-
"./styles.css": "./styles.css"
|
|
2839
|
-
}
|
|
2840
|
-
};
|
|
2841
|
-
return JSON.stringify(pkg, null, 2);
|
|
2842
|
-
}
|
|
2843
|
-
|
|
2844
2794
|
// src/artifacts/types/generated.ts
|
|
2845
2795
|
var import_ts_pattern10 = require("ts-pattern");
|
|
2846
2796
|
|
|
@@ -3571,7 +3521,7 @@ var static_css_d_ts_default = {
|
|
|
3571
3521
|
|
|
3572
3522
|
// src/artifacts/generated/system-types.d.ts.json
|
|
3573
3523
|
var system_types_d_ts_default = {
|
|
3574
|
-
content: "import type { ConditionalValue, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\nexport type Pretty<T> = { [K in keyof T]: T[K] } & {}\n\nexport type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never\n\nexport type DistributiveUnion<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]\n} & DistributiveOmit<U, keyof T>\n\nexport type Assign<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] : T[K]\n} & U\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type CssProperty = keyof PropertiesFallback\n\nexport interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}\n\nexport interface CssKeyframes {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ninterface GenericProperties {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<SystemProperties & CssVarProperties>\n\nexport interface GlobalStyleObject {\n [selector: string]: SystemStyleObject\n}\nexport interface ExtendableGlobalStyleObject {\n [selector: string]: SystemStyleObject | undefined\n extend?: GlobalStyleObject | undefined\n}\n\ntype FilterStyleObject<P extends string> = {\n [K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\ninterface WithCss {\n css?: SystemStyleObject | SystemStyleObject[]\n}\n\nexport type JsxStyleProps = SystemStyleObject & WithCss\n\nexport interface PatchedHTMLProps {\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n htmlContent?: string\n}\n\nexport type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'\n\ntype WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
|
|
3524
|
+
content: "import type { ConditionalValue, Nested } from './conditions'\nimport type { AtRule, PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\nexport type Pretty<T> = { [K in keyof T]: T[K] } & {}\n\nexport type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never\n\nexport type DistributiveUnion<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]\n} & DistributiveOmit<U, keyof T>\n\nexport type Assign<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] : T[K]\n} & U\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type CssProperty = keyof PropertiesFallback\n\nexport interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}\n\nexport interface CssKeyframes {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ninterface GenericProperties {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<SystemProperties & CssVarProperties>\n\nexport interface GlobalStyleObject {\n [selector: string]: SystemStyleObject\n}\nexport interface ExtendableGlobalStyleObject {\n [selector: string]: SystemStyleObject | undefined\n extend?: GlobalStyleObject | undefined\n}\n\n/* -----------------------------------------------------------------------------\n * Composition (text styles, layer styles)\n * -----------------------------------------------------------------------------*/\n\ntype FilterStyleObject<P extends string> = {\n [K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>\n\n/* -----------------------------------------------------------------------------\n * Font face\n * -----------------------------------------------------------------------------*/\n\nexport type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>\n\nexport type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>\n\nexport interface GlobalFontface {\n [name: string]: FontfaceRule | FontfaceRule[]\n}\n\nexport interface ExtendableGlobalFontface {\n [name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined\n extend?: GlobalFontface | undefined\n}\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\ninterface WithCss {\n css?: SystemStyleObject | SystemStyleObject[]\n}\n\nexport type JsxStyleProps = SystemStyleObject & WithCss\n\nexport interface PatchedHTMLProps {\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n htmlContent?: string\n}\n\nexport type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'\n\ntype WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
|
|
3575
3525
|
};
|
|
3576
3526
|
|
|
3577
3527
|
// src/artifacts/types/generated.ts
|
|
@@ -4430,14 +4380,6 @@ function setupCssIndex(ctx) {
|
|
|
4430
4380
|
]
|
|
4431
4381
|
};
|
|
4432
4382
|
}
|
|
4433
|
-
function setupPackageJson(ctx) {
|
|
4434
|
-
if (!ctx.config.emitPackage)
|
|
4435
|
-
return;
|
|
4436
|
-
return {
|
|
4437
|
-
id: "package.json",
|
|
4438
|
-
files: [{ file: "package.json", code: generatePackageJson(ctx) }]
|
|
4439
|
-
};
|
|
4440
|
-
}
|
|
4441
4383
|
function setupThemes(ctx) {
|
|
4442
4384
|
const { themes } = ctx.config;
|
|
4443
4385
|
if (!themes)
|
|
@@ -4519,7 +4461,6 @@ var entries = [
|
|
|
4519
4461
|
["jsx-patterns", setupJsxPatterns],
|
|
4520
4462
|
["jsx-patterns-index", setupJsxPatternsIndex],
|
|
4521
4463
|
["css-index", setupCssIndex],
|
|
4522
|
-
["package.json", setupPackageJson],
|
|
4523
4464
|
["themes", setupThemes]
|
|
4524
4465
|
];
|
|
4525
4466
|
var getMatchingArtifacts = (ctx, filters) => {
|
|
@@ -4583,10 +4524,10 @@ var generateParserCss = (ctx, decoder) => {
|
|
|
4583
4524
|
if (!decoder)
|
|
4584
4525
|
return "";
|
|
4585
4526
|
const sheet = ctx.createSheet();
|
|
4586
|
-
const { minify
|
|
4527
|
+
const { minify } = ctx.config;
|
|
4587
4528
|
sheet.processDecoder(decoder);
|
|
4588
4529
|
try {
|
|
4589
|
-
const css = sheet.toCss({ minify
|
|
4530
|
+
const css = sheet.toCss({ minify });
|
|
4590
4531
|
return css;
|
|
4591
4532
|
} catch (err) {
|
|
4592
4533
|
import_logger2.logger.error("serializer:css", "Failed to serialize CSS: " + err);
|
|
@@ -4756,8 +4697,8 @@ var generateStaticCss = (ctx, sheet) => {
|
|
|
4756
4697
|
const { config, staticCss } = ctx;
|
|
4757
4698
|
const engine = staticCss.process(ctx.config.staticCss ?? {}, sheet);
|
|
4758
4699
|
if (!sheet) {
|
|
4759
|
-
const {
|
|
4760
|
-
let css = engine.sheet.toCss({
|
|
4700
|
+
const { minify } = config;
|
|
4701
|
+
let css = engine.sheet.toCss({ minify });
|
|
4761
4702
|
if (ctx.hooks["cssgen:done"]) {
|
|
4762
4703
|
css = ctx.hooks["cssgen:done"]({ artifact: "static", content: css }) ?? css;
|
|
4763
4704
|
}
|
|
@@ -4800,10 +4741,7 @@ var Generator = class extends import_core5.Context {
|
|
|
4800
4741
|
};
|
|
4801
4742
|
getCss = (stylesheet) => {
|
|
4802
4743
|
const sheet = stylesheet ?? this.createSheet();
|
|
4803
|
-
let css = sheet.toCss({
|
|
4804
|
-
optimize: true,
|
|
4805
|
-
minify: this.config.minify
|
|
4806
|
-
});
|
|
4744
|
+
let css = sheet.toCss({ minify: this.config.minify });
|
|
4807
4745
|
if (this.hooks["cssgen:done"]) {
|
|
4808
4746
|
css = this.hooks["cssgen:done"]({ artifact: "styles.css", content: css }) ?? css;
|
|
4809
4747
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2755,56 +2755,6 @@ function generateJsxPatterns(ctx, filters) {
|
|
|
2755
2755
|
return patternMap[ctx.jsx.framework](ctx, filters);
|
|
2756
2756
|
}
|
|
2757
2757
|
|
|
2758
|
-
// src/artifacts/pkg-json.ts
|
|
2759
|
-
function generatePackageJson(ctx) {
|
|
2760
|
-
const {
|
|
2761
|
-
config: { outdir }
|
|
2762
|
-
} = ctx;
|
|
2763
|
-
const pkg = {
|
|
2764
|
-
name: outdir,
|
|
2765
|
-
description: "This package is auto-generated by Panda CSS",
|
|
2766
|
-
version: `0.0.0-${performance.now()}`,
|
|
2767
|
-
type: "module",
|
|
2768
|
-
exports: {
|
|
2769
|
-
"./css": {
|
|
2770
|
-
types: ctx.file.extDts("./css/index"),
|
|
2771
|
-
require: ctx.file.ext(`./css/index`),
|
|
2772
|
-
import: ctx.file.ext(`./css/index`)
|
|
2773
|
-
},
|
|
2774
|
-
"./jsx": {
|
|
2775
|
-
types: ctx.file.extDts("./jsx/index"),
|
|
2776
|
-
require: ctx.file.ext(`./jsx/index`),
|
|
2777
|
-
import: ctx.file.ext(`./jsx/index`)
|
|
2778
|
-
},
|
|
2779
|
-
"./patterns": {
|
|
2780
|
-
types: ctx.file.extDts("./patterns/index"),
|
|
2781
|
-
require: ctx.file.ext(`./patterns/index`),
|
|
2782
|
-
import: ctx.file.ext(`./patterns/index`)
|
|
2783
|
-
},
|
|
2784
|
-
"./recipes": {
|
|
2785
|
-
types: ctx.file.extDts("./recipes/index"),
|
|
2786
|
-
require: ctx.file.ext(`./recipes/index`),
|
|
2787
|
-
import: ctx.file.ext(`./recipes/index`)
|
|
2788
|
-
},
|
|
2789
|
-
"./themes": {
|
|
2790
|
-
types: ctx.file.extDts("./themes/index"),
|
|
2791
|
-
require: ctx.file.ext(`./themes/index`),
|
|
2792
|
-
import: ctx.file.ext(`./themes/index`)
|
|
2793
|
-
},
|
|
2794
|
-
"./tokens": {
|
|
2795
|
-
types: ctx.file.extDts("./tokens/index"),
|
|
2796
|
-
require: ctx.file.ext(`./tokens/index`),
|
|
2797
|
-
import: ctx.file.ext(`./tokens/index`)
|
|
2798
|
-
},
|
|
2799
|
-
"./types": {
|
|
2800
|
-
types: ctx.file.extDts("./types/index")
|
|
2801
|
-
},
|
|
2802
|
-
"./styles.css": "./styles.css"
|
|
2803
|
-
}
|
|
2804
|
-
};
|
|
2805
|
-
return JSON.stringify(pkg, null, 2);
|
|
2806
|
-
}
|
|
2807
|
-
|
|
2808
2758
|
// src/artifacts/types/generated.ts
|
|
2809
2759
|
import { match as match10 } from "ts-pattern";
|
|
2810
2760
|
|
|
@@ -3535,7 +3485,7 @@ var static_css_d_ts_default = {
|
|
|
3535
3485
|
|
|
3536
3486
|
// src/artifacts/generated/system-types.d.ts.json
|
|
3537
3487
|
var system_types_d_ts_default = {
|
|
3538
|
-
content: "import type { ConditionalValue, Nested } from './conditions'\nimport type { PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\nexport type Pretty<T> = { [K in keyof T]: T[K] } & {}\n\nexport type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never\n\nexport type DistributiveUnion<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]\n} & DistributiveOmit<U, keyof T>\n\nexport type Assign<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] : T[K]\n} & U\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type CssProperty = keyof PropertiesFallback\n\nexport interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}\n\nexport interface CssKeyframes {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ninterface GenericProperties {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<SystemProperties & CssVarProperties>\n\nexport interface GlobalStyleObject {\n [selector: string]: SystemStyleObject\n}\nexport interface ExtendableGlobalStyleObject {\n [selector: string]: SystemStyleObject | undefined\n extend?: GlobalStyleObject | undefined\n}\n\ntype FilterStyleObject<P extends string> = {\n [K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\ninterface WithCss {\n css?: SystemStyleObject | SystemStyleObject[]\n}\n\nexport type JsxStyleProps = SystemStyleObject & WithCss\n\nexport interface PatchedHTMLProps {\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n htmlContent?: string\n}\n\nexport type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'\n\ntype WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
|
|
3488
|
+
content: "import type { ConditionalValue, Nested } from './conditions'\nimport type { AtRule, PropertiesFallback } from './csstype'\nimport type { SystemProperties, CssVarProperties } from './style-props'\n\ntype String = string & {}\ntype Number = number & {}\n\nexport type Pretty<T> = { [K in keyof T]: T[K] } & {}\n\nexport type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never\n\nexport type DistributiveUnion<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]\n} & DistributiveOmit<U, keyof T>\n\nexport type Assign<T, U> = {\n [K in keyof T]: K extends keyof U ? U[K] : T[K]\n} & U\n\n/* -----------------------------------------------------------------------------\n * Native css properties\n * -----------------------------------------------------------------------------*/\n\nexport type CssProperty = keyof PropertiesFallback\n\nexport interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties {}\n\nexport interface CssKeyframes {\n [name: string]: {\n [time: string]: CssProperties\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Conditional css properties\n * -----------------------------------------------------------------------------*/\n\ninterface GenericProperties {\n [key: string]: ConditionalValue<String | Number | boolean>\n}\n\n/* -----------------------------------------------------------------------------\n * Native css props\n * -----------------------------------------------------------------------------*/\n\nexport type NestedCssProperties = Nested<CssProperties>\n\nexport type SystemStyleObject = Nested<SystemProperties & CssVarProperties>\n\nexport interface GlobalStyleObject {\n [selector: string]: SystemStyleObject\n}\nexport interface ExtendableGlobalStyleObject {\n [selector: string]: SystemStyleObject | undefined\n extend?: GlobalStyleObject | undefined\n}\n\n/* -----------------------------------------------------------------------------\n * Composition (text styles, layer styles)\n * -----------------------------------------------------------------------------*/\n\ntype FilterStyleObject<P extends string> = {\n [K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown\n}\n\nexport type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>\n\n/* -----------------------------------------------------------------------------\n * Font face\n * -----------------------------------------------------------------------------*/\n\nexport type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>\n\nexport type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>\n\nexport interface GlobalFontface {\n [name: string]: FontfaceRule | FontfaceRule[]\n}\n\nexport interface ExtendableGlobalFontface {\n [name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined\n extend?: GlobalFontface | undefined\n}\n\n/* -----------------------------------------------------------------------------\n * Jsx style props\n * -----------------------------------------------------------------------------*/\ninterface WithCss {\n css?: SystemStyleObject | SystemStyleObject[]\n}\n\nexport type JsxStyleProps = SystemStyleObject & WithCss\n\nexport interface PatchedHTMLProps {\n htmlWidth?: string | number\n htmlHeight?: string | number\n htmlTranslate?: 'yes' | 'no' | undefined\n htmlContent?: string\n}\n\nexport type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'\n\ntype WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps\n\nexport type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<\n WithHTMLProps<T>,\n P\n>\n"
|
|
3539
3489
|
};
|
|
3540
3490
|
|
|
3541
3491
|
// src/artifacts/types/generated.ts
|
|
@@ -4394,14 +4344,6 @@ function setupCssIndex(ctx) {
|
|
|
4394
4344
|
]
|
|
4395
4345
|
};
|
|
4396
4346
|
}
|
|
4397
|
-
function setupPackageJson(ctx) {
|
|
4398
|
-
if (!ctx.config.emitPackage)
|
|
4399
|
-
return;
|
|
4400
|
-
return {
|
|
4401
|
-
id: "package.json",
|
|
4402
|
-
files: [{ file: "package.json", code: generatePackageJson(ctx) }]
|
|
4403
|
-
};
|
|
4404
|
-
}
|
|
4405
4347
|
function setupThemes(ctx) {
|
|
4406
4348
|
const { themes } = ctx.config;
|
|
4407
4349
|
if (!themes)
|
|
@@ -4483,7 +4425,6 @@ var entries = [
|
|
|
4483
4425
|
["jsx-patterns", setupJsxPatterns],
|
|
4484
4426
|
["jsx-patterns-index", setupJsxPatternsIndex],
|
|
4485
4427
|
["css-index", setupCssIndex],
|
|
4486
|
-
["package.json", setupPackageJson],
|
|
4487
4428
|
["themes", setupThemes]
|
|
4488
4429
|
];
|
|
4489
4430
|
var getMatchingArtifacts = (ctx, filters) => {
|
|
@@ -4547,10 +4488,10 @@ var generateParserCss = (ctx, decoder) => {
|
|
|
4547
4488
|
if (!decoder)
|
|
4548
4489
|
return "";
|
|
4549
4490
|
const sheet = ctx.createSheet();
|
|
4550
|
-
const { minify
|
|
4491
|
+
const { minify } = ctx.config;
|
|
4551
4492
|
sheet.processDecoder(decoder);
|
|
4552
4493
|
try {
|
|
4553
|
-
const css = sheet.toCss({ minify
|
|
4494
|
+
const css = sheet.toCss({ minify });
|
|
4554
4495
|
return css;
|
|
4555
4496
|
} catch (err) {
|
|
4556
4497
|
logger2.error("serializer:css", "Failed to serialize CSS: " + err);
|
|
@@ -4720,8 +4661,8 @@ var generateStaticCss = (ctx, sheet) => {
|
|
|
4720
4661
|
const { config, staticCss } = ctx;
|
|
4721
4662
|
const engine = staticCss.process(ctx.config.staticCss ?? {}, sheet);
|
|
4722
4663
|
if (!sheet) {
|
|
4723
|
-
const {
|
|
4724
|
-
let css = engine.sheet.toCss({
|
|
4664
|
+
const { minify } = config;
|
|
4665
|
+
let css = engine.sheet.toCss({ minify });
|
|
4725
4666
|
if (ctx.hooks["cssgen:done"]) {
|
|
4726
4667
|
css = ctx.hooks["cssgen:done"]({ artifact: "static", content: css }) ?? css;
|
|
4727
4668
|
}
|
|
@@ -4764,10 +4705,7 @@ var Generator = class extends Context2 {
|
|
|
4764
4705
|
};
|
|
4765
4706
|
getCss = (stylesheet) => {
|
|
4766
4707
|
const sheet = stylesheet ?? this.createSheet();
|
|
4767
|
-
let css = sheet.toCss({
|
|
4768
|
-
optimize: true,
|
|
4769
|
-
minify: this.config.minify
|
|
4770
|
-
});
|
|
4708
|
+
let css = sheet.toCss({ minify: this.config.minify });
|
|
4771
4709
|
if (this.hooks["cssgen:done"]) {
|
|
4772
4710
|
css = this.hooks["cssgen:done"]({ artifact: "styles.css", content: css }) ?? css;
|
|
4773
4711
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/generator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "The css generator for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"javascript-stringify": "2.1.0",
|
|
36
36
|
"outdent": " ^0.8.0",
|
|
37
37
|
"pluralize": "8.0.0",
|
|
38
|
-
"postcss": "8.4.
|
|
38
|
+
"postcss": "8.4.39",
|
|
39
39
|
"ts-pattern": "5.0.8",
|
|
40
|
-
"@pandacss/core": "0.
|
|
41
|
-
"@pandacss/is-valid-prop": "^0.
|
|
42
|
-
"@pandacss/logger": "0.
|
|
43
|
-
"@pandacss/shared": "0.
|
|
44
|
-
"@pandacss/token-dictionary": "0.
|
|
45
|
-
"@pandacss/types": "0.
|
|
40
|
+
"@pandacss/core": "0.43.0",
|
|
41
|
+
"@pandacss/is-valid-prop": "^0.43.0",
|
|
42
|
+
"@pandacss/logger": "0.43.0",
|
|
43
|
+
"@pandacss/shared": "0.43.0",
|
|
44
|
+
"@pandacss/token-dictionary": "0.43.0",
|
|
45
|
+
"@pandacss/types": "0.43.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/pluralize": "0.0.33"
|