@pandacss/generator 1.7.3 → 1.8.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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27 -0
- package/dist/index.mjs +27 -0
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
2
|
-
import { LoadConfigResult, ArtifactId, CssArtifactType, SpecFile } from '@pandacss/types';
|
|
2
|
+
import { LoadConfigResult, ArtifactId, CssArtifactType, SpecFile, SpecType, SpecTypeMap } from '@pandacss/types';
|
|
3
3
|
import { Context, Stylesheet, StyleDecoder } from '@pandacss/core';
|
|
4
4
|
|
|
5
5
|
interface SplitCssArtifact {
|
|
@@ -49,6 +49,7 @@ declare class Generator extends Context {
|
|
|
49
49
|
*/
|
|
50
50
|
getSplitCssArtifacts: (sheet: Stylesheet) => SplitCssResult;
|
|
51
51
|
getSpec: () => SpecFile[];
|
|
52
|
+
getSpecOfType: <T extends SpecType>(type: T) => T extends "color-palette" ? SpecTypeMap[T] | undefined : SpecTypeMap[T];
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _pandacss_types from '@pandacss/types';
|
|
2
|
-
import { LoadConfigResult, ArtifactId, CssArtifactType, SpecFile } from '@pandacss/types';
|
|
2
|
+
import { LoadConfigResult, ArtifactId, CssArtifactType, SpecFile, SpecType, SpecTypeMap } from '@pandacss/types';
|
|
3
3
|
import { Context, Stylesheet, StyleDecoder } from '@pandacss/core';
|
|
4
4
|
|
|
5
5
|
interface SplitCssArtifact {
|
|
@@ -49,6 +49,7 @@ declare class Generator extends Context {
|
|
|
49
49
|
*/
|
|
50
50
|
getSplitCssArtifacts: (sheet: Stylesheet) => SplitCssResult;
|
|
51
51
|
getSpec: () => SpecFile[];
|
|
52
|
+
getSpecOfType: <T extends SpecType>(type: T) => T extends "color-palette" ? SpecTypeMap[T] | undefined : SpecTypeMap[T];
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/**
|
package/dist/index.js
CHANGED
|
@@ -6299,6 +6299,33 @@ ${css}
|
|
|
6299
6299
|
}
|
|
6300
6300
|
return specs;
|
|
6301
6301
|
};
|
|
6302
|
+
getSpecOfType = (type) => {
|
|
6303
|
+
const spec = (() => {
|
|
6304
|
+
switch (type) {
|
|
6305
|
+
case "tokens":
|
|
6306
|
+
return generateTokensSpec(this);
|
|
6307
|
+
case "semantic-tokens":
|
|
6308
|
+
return generateSemanticTokensSpec(this);
|
|
6309
|
+
case "recipes":
|
|
6310
|
+
return generateRecipesSpec(this);
|
|
6311
|
+
case "patterns":
|
|
6312
|
+
return generatePatternsSpec(this);
|
|
6313
|
+
case "conditions":
|
|
6314
|
+
return generateConditionsSpec(this);
|
|
6315
|
+
case "keyframes":
|
|
6316
|
+
return generateKeyframesSpec(this);
|
|
6317
|
+
case "text-styles":
|
|
6318
|
+
return generateTextStylesSpec(this);
|
|
6319
|
+
case "layer-styles":
|
|
6320
|
+
return generateLayerStylesSpec(this);
|
|
6321
|
+
case "animation-styles":
|
|
6322
|
+
return generateAnimationStylesSpec(this);
|
|
6323
|
+
case "color-palette":
|
|
6324
|
+
return generateColorPaletteSpec(this) ?? void 0;
|
|
6325
|
+
}
|
|
6326
|
+
})();
|
|
6327
|
+
return spec;
|
|
6328
|
+
};
|
|
6302
6329
|
};
|
|
6303
6330
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6304
6331
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -6262,6 +6262,33 @@ ${css}
|
|
|
6262
6262
|
}
|
|
6263
6263
|
return specs;
|
|
6264
6264
|
};
|
|
6265
|
+
getSpecOfType = (type) => {
|
|
6266
|
+
const spec = (() => {
|
|
6267
|
+
switch (type) {
|
|
6268
|
+
case "tokens":
|
|
6269
|
+
return generateTokensSpec(this);
|
|
6270
|
+
case "semantic-tokens":
|
|
6271
|
+
return generateSemanticTokensSpec(this);
|
|
6272
|
+
case "recipes":
|
|
6273
|
+
return generateRecipesSpec(this);
|
|
6274
|
+
case "patterns":
|
|
6275
|
+
return generatePatternsSpec(this);
|
|
6276
|
+
case "conditions":
|
|
6277
|
+
return generateConditionsSpec(this);
|
|
6278
|
+
case "keyframes":
|
|
6279
|
+
return generateKeyframesSpec(this);
|
|
6280
|
+
case "text-styles":
|
|
6281
|
+
return generateTextStylesSpec(this);
|
|
6282
|
+
case "layer-styles":
|
|
6283
|
+
return generateLayerStylesSpec(this);
|
|
6284
|
+
case "animation-styles":
|
|
6285
|
+
return generateAnimationStylesSpec(this);
|
|
6286
|
+
case "color-palette":
|
|
6287
|
+
return generateColorPaletteSpec(this) ?? void 0;
|
|
6288
|
+
}
|
|
6289
|
+
})();
|
|
6290
|
+
return spec;
|
|
6291
|
+
};
|
|
6265
6292
|
};
|
|
6266
6293
|
export {
|
|
6267
6294
|
Generator,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/generator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "The css generator for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"pluralize": "8.0.0",
|
|
39
39
|
"postcss": "8.5.6",
|
|
40
40
|
"ts-pattern": "5.9.0",
|
|
41
|
-
"@pandacss/core": "1.
|
|
42
|
-
"@pandacss/is-valid-prop": "^1.
|
|
43
|
-
"@pandacss/logger": "1.
|
|
44
|
-
"@pandacss/shared": "1.
|
|
45
|
-
"@pandacss/token-dictionary": "1.
|
|
46
|
-
"@pandacss/types": "1.
|
|
41
|
+
"@pandacss/core": "1.8.0",
|
|
42
|
+
"@pandacss/is-valid-prop": "^1.8.0",
|
|
43
|
+
"@pandacss/logger": "1.8.0",
|
|
44
|
+
"@pandacss/shared": "1.8.0",
|
|
45
|
+
"@pandacss/token-dictionary": "1.8.0",
|
|
46
|
+
"@pandacss/types": "1.8.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/pluralize": "0.0.33"
|