@pandacss/token-dictionary 1.7.3 → 1.8.1
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 +27 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.js +10 -4
- package/dist/index.mjs +9 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -85,6 +85,32 @@ declare class Token {
|
|
|
85
85
|
setExtensions(extensions: TokenExtensions): this;
|
|
86
86
|
setType(): void;
|
|
87
87
|
}
|
|
88
|
+
declare const TOKEN_TYPES: {
|
|
89
|
+
readonly colors: "color";
|
|
90
|
+
readonly spacing: "dimension";
|
|
91
|
+
readonly sizes: "dimension";
|
|
92
|
+
readonly shadows: "shadow";
|
|
93
|
+
readonly fonts: "fontFamily";
|
|
94
|
+
readonly fontSizes: "fontSize";
|
|
95
|
+
readonly fontWeights: "fontWeight";
|
|
96
|
+
readonly letterSpacings: "letterSpacing";
|
|
97
|
+
readonly lineHeights: "lineHeight";
|
|
98
|
+
readonly durations: "duration";
|
|
99
|
+
readonly transitions: "transition";
|
|
100
|
+
readonly radii: "borderRadius";
|
|
101
|
+
readonly gradients: "gradient";
|
|
102
|
+
readonly easings: "cubicBezier";
|
|
103
|
+
readonly borders: "border";
|
|
104
|
+
readonly borderWidths: "borderWidth";
|
|
105
|
+
readonly zIndex: "zIndex";
|
|
106
|
+
readonly opacity: "opacity";
|
|
107
|
+
readonly blurs: "blur";
|
|
108
|
+
readonly aspectRatios: "aspectRatio";
|
|
109
|
+
readonly cursor: "cursor";
|
|
110
|
+
readonly assets: "asset";
|
|
111
|
+
};
|
|
112
|
+
type TokenCategory = keyof typeof TOKEN_TYPES;
|
|
113
|
+
declare const TOKEN_CATEGORIES: TokenCategory[];
|
|
88
114
|
|
|
89
115
|
type EnforcePhase = 'pre' | 'post';
|
|
90
116
|
interface TokenTransformer {
|
|
@@ -204,4 +230,4 @@ declare function mapToJson(map: Map<string, any>): Record<string, unknown>;
|
|
|
204
230
|
declare const isToken: (value: any) => value is Token$1;
|
|
205
231
|
declare function assertTokenFormat(token: any): asserts token is Token$1;
|
|
206
232
|
|
|
207
|
-
export { Token, TokenDictionary, type TokenExtensions, assertTokenFormat, expandReferences, getReferences, hasReference, isToken, mapToJson };
|
|
233
|
+
export { TOKEN_CATEGORIES, Token, type TokenCategory, TokenDictionary, type TokenExtensions, assertTokenFormat, expandReferences, getReferences, hasReference, isToken, mapToJson };
|
package/dist/index.d.ts
CHANGED
|
@@ -85,6 +85,32 @@ declare class Token {
|
|
|
85
85
|
setExtensions(extensions: TokenExtensions): this;
|
|
86
86
|
setType(): void;
|
|
87
87
|
}
|
|
88
|
+
declare const TOKEN_TYPES: {
|
|
89
|
+
readonly colors: "color";
|
|
90
|
+
readonly spacing: "dimension";
|
|
91
|
+
readonly sizes: "dimension";
|
|
92
|
+
readonly shadows: "shadow";
|
|
93
|
+
readonly fonts: "fontFamily";
|
|
94
|
+
readonly fontSizes: "fontSize";
|
|
95
|
+
readonly fontWeights: "fontWeight";
|
|
96
|
+
readonly letterSpacings: "letterSpacing";
|
|
97
|
+
readonly lineHeights: "lineHeight";
|
|
98
|
+
readonly durations: "duration";
|
|
99
|
+
readonly transitions: "transition";
|
|
100
|
+
readonly radii: "borderRadius";
|
|
101
|
+
readonly gradients: "gradient";
|
|
102
|
+
readonly easings: "cubicBezier";
|
|
103
|
+
readonly borders: "border";
|
|
104
|
+
readonly borderWidths: "borderWidth";
|
|
105
|
+
readonly zIndex: "zIndex";
|
|
106
|
+
readonly opacity: "opacity";
|
|
107
|
+
readonly blurs: "blur";
|
|
108
|
+
readonly aspectRatios: "aspectRatio";
|
|
109
|
+
readonly cursor: "cursor";
|
|
110
|
+
readonly assets: "asset";
|
|
111
|
+
};
|
|
112
|
+
type TokenCategory = keyof typeof TOKEN_TYPES;
|
|
113
|
+
declare const TOKEN_CATEGORIES: TokenCategory[];
|
|
88
114
|
|
|
89
115
|
type EnforcePhase = 'pre' | 'post';
|
|
90
116
|
interface TokenTransformer {
|
|
@@ -204,4 +230,4 @@ declare function mapToJson(map: Map<string, any>): Record<string, unknown>;
|
|
|
204
230
|
declare const isToken: (value: any) => value is Token$1;
|
|
205
231
|
declare function assertTokenFormat(token: any): asserts token is Token$1;
|
|
206
232
|
|
|
207
|
-
export { Token, TokenDictionary, type TokenExtensions, assertTokenFormat, expandReferences, getReferences, hasReference, isToken, mapToJson };
|
|
233
|
+
export { TOKEN_CATEGORIES, Token, type TokenCategory, TokenDictionary, type TokenExtensions, assertTokenFormat, expandReferences, getReferences, hasReference, isToken, mapToJson };
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
TOKEN_CATEGORIES: () => TOKEN_CATEGORIES,
|
|
33
34
|
Token: () => Token,
|
|
34
35
|
TokenDictionary: () => TokenDictionary,
|
|
35
36
|
assertTokenFormat: () => assertTokenFormat,
|
|
@@ -293,12 +294,13 @@ function cloneDeep(value) {
|
|
|
293
294
|
var TOKEN_TYPES = {
|
|
294
295
|
colors: "color",
|
|
295
296
|
spacing: "dimension",
|
|
296
|
-
|
|
297
|
+
sizes: "dimension",
|
|
297
298
|
shadows: "shadow",
|
|
298
299
|
fonts: "fontFamily",
|
|
299
300
|
fontSizes: "fontSize",
|
|
300
301
|
fontWeights: "fontWeight",
|
|
301
302
|
letterSpacings: "letterSpacing",
|
|
303
|
+
lineHeights: "lineHeight",
|
|
302
304
|
durations: "duration",
|
|
303
305
|
transitions: "transition",
|
|
304
306
|
radii: "borderRadius",
|
|
@@ -306,11 +308,14 @@ var TOKEN_TYPES = {
|
|
|
306
308
|
easings: "cubicBezier",
|
|
307
309
|
borders: "border",
|
|
308
310
|
borderWidths: "borderWidth",
|
|
309
|
-
|
|
310
|
-
|
|
311
|
+
zIndex: "zIndex",
|
|
312
|
+
opacity: "opacity",
|
|
313
|
+
blurs: "blur",
|
|
311
314
|
aspectRatios: "aspectRatio",
|
|
312
|
-
cursor: "cursor"
|
|
315
|
+
cursor: "cursor",
|
|
316
|
+
assets: "asset"
|
|
313
317
|
};
|
|
318
|
+
var TOKEN_CATEGORIES = Object.keys(TOKEN_TYPES);
|
|
314
319
|
|
|
315
320
|
// src/middleware.ts
|
|
316
321
|
var addNegativeTokens = {
|
|
@@ -1342,6 +1347,7 @@ function replaceRootWithColorPalette(path, colorPaletteRoot) {
|
|
|
1342
1347
|
var tokenPathRegex = /\w+\.\w+/;
|
|
1343
1348
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1344
1349
|
0 && (module.exports = {
|
|
1350
|
+
TOKEN_CATEGORIES,
|
|
1345
1351
|
Token,
|
|
1346
1352
|
TokenDictionary,
|
|
1347
1353
|
assertTokenFormat,
|
package/dist/index.mjs
CHANGED
|
@@ -260,12 +260,13 @@ function cloneDeep(value) {
|
|
|
260
260
|
var TOKEN_TYPES = {
|
|
261
261
|
colors: "color",
|
|
262
262
|
spacing: "dimension",
|
|
263
|
-
|
|
263
|
+
sizes: "dimension",
|
|
264
264
|
shadows: "shadow",
|
|
265
265
|
fonts: "fontFamily",
|
|
266
266
|
fontSizes: "fontSize",
|
|
267
267
|
fontWeights: "fontWeight",
|
|
268
268
|
letterSpacings: "letterSpacing",
|
|
269
|
+
lineHeights: "lineHeight",
|
|
269
270
|
durations: "duration",
|
|
270
271
|
transitions: "transition",
|
|
271
272
|
radii: "borderRadius",
|
|
@@ -273,11 +274,14 @@ var TOKEN_TYPES = {
|
|
|
273
274
|
easings: "cubicBezier",
|
|
274
275
|
borders: "border",
|
|
275
276
|
borderWidths: "borderWidth",
|
|
276
|
-
|
|
277
|
-
|
|
277
|
+
zIndex: "zIndex",
|
|
278
|
+
opacity: "opacity",
|
|
279
|
+
blurs: "blur",
|
|
278
280
|
aspectRatios: "aspectRatio",
|
|
279
|
-
cursor: "cursor"
|
|
281
|
+
cursor: "cursor",
|
|
282
|
+
assets: "asset"
|
|
280
283
|
};
|
|
284
|
+
var TOKEN_CATEGORIES = Object.keys(TOKEN_TYPES);
|
|
281
285
|
|
|
282
286
|
// src/middleware.ts
|
|
283
287
|
var addNegativeTokens = {
|
|
@@ -1308,6 +1312,7 @@ function replaceRootWithColorPalette(path, colorPaletteRoot) {
|
|
|
1308
1312
|
}
|
|
1309
1313
|
var tokenPathRegex = /\w+\.\w+/;
|
|
1310
1314
|
export {
|
|
1315
|
+
TOKEN_CATEGORIES,
|
|
1311
1316
|
Token,
|
|
1312
1317
|
TokenDictionary,
|
|
1313
1318
|
assertTokenFormat,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/token-dictionary",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "Common error messages for css panda",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"picomatch": "^4.0.0",
|
|
37
37
|
"ts-pattern": "5.9.0",
|
|
38
|
-
"@pandacss/
|
|
39
|
-
"@pandacss/
|
|
40
|
-
"@pandacss/
|
|
38
|
+
"@pandacss/shared": "1.8.1",
|
|
39
|
+
"@pandacss/types": "1.8.1",
|
|
40
|
+
"@pandacss/logger": "^1.8.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/picomatch": "4.0.2"
|