@tbela99/css-parser 0.0.1 → 0.1.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.ts CHANGED
@@ -1,477 +1,815 @@
1
- interface LiteralToken {
2
- typ: 'Literal';
1
+ declare const enum NodeType {
2
+ CommentNodeType = 0,
3
+ CDOCOMMNodeType = 1,
4
+ StyleSheetNodeType = 2,
5
+ AtRuleNodeType = 3,
6
+ RuleNodeType = 4,
7
+ DeclarationNodeType = 5
8
+ }
9
+ declare enum EnumToken$1 {
10
+ CommentTokenType = 0,
11
+ CDOCOMMTokenType = 1,
12
+ LiteralTokenType = 2,
13
+ IdenTokenType = 3,
14
+ CommaTokenType = 4,
15
+ ColonTokenType = 5,
16
+ SemiColonTokenType = 6,
17
+ NumberTokenType = 7,
18
+ AtRuleTokenType = 8,
19
+ PercentageTokenType = 9,
20
+ FunctionTokenType = 10,
21
+ UrlFunctionTokenType = 11,
22
+ StringTokenType = 12,
23
+ UnclosedStringTokenType = 13,
24
+ DimensionTokenType = 14,
25
+ LengthTokenType = 15,
26
+ AngleTokenType = 16,
27
+ TimeTokenType = 17,
28
+ FrequencyTokenType = 18,
29
+ ResolutionTokenType = 19,
30
+ HashTokenType = 20,
31
+ BlockStartTokenType = 21,
32
+ BlockEndTokenType = 22,
33
+ AttrStartTokenType = 23,
34
+ AttrEndTokenType = 24,
35
+ StartParensTokenType = 25,
36
+ EndParensTokenType = 26,
37
+ ParensTokenType = 27,
38
+ WhitespaceTokenType = 28,
39
+ IncludesTokenType = 29,
40
+ DashMatchTokenType = 30,
41
+ LtTokenType = 31,
42
+ LteTokenType = 32,
43
+ GtTokenType = 33,
44
+ GteTokenType = 34,
45
+ PseudoClassTokenType = 35,
46
+ PseudoClassFuncTokenType = 36,
47
+ DelimTokenType = 37,
48
+ UrlTokenTokenType = 38,
49
+ EOFTokenType = 39,
50
+ ImportantTokenType = 40,
51
+ ColorTokenType = 41,
52
+ AttrTokenType = 42,
53
+ BadCommentTokenType = 43,
54
+ BadCdoTokenType = 44,
55
+ BadUrlTokenType = 45,
56
+ BadStringTokenType = 46,
57
+ BinaryExpressionTokenType = 47,
58
+ UnaryExpressionTokenType = 48,
59
+ ListToken = 49,
60
+ Add = 50,
61
+ Mul = 51,
62
+ Div = 52,
63
+ Sub = 53,
64
+ Time = 17,
65
+ Iden = 3,
66
+ Hash = 20,
67
+ Angle = 16,
68
+ Color = 41,
69
+ Comma = 4,
70
+ String = 12,
71
+ Length = 15,
72
+ Number = 7,
73
+ Perc = 9,
74
+ Literal = 2,
75
+ Comment = 0,
76
+ UrlFunc = 11,
77
+ Dimension = 14,
78
+ Frequency = 18,
79
+ Resolution = 19,
80
+ Whitespace = 28
81
+ }
82
+
83
+ declare const combinators: string[];
84
+ declare function minify(ast: AstNode, options?: ParserOptions | MinifyOptions, recursive?: boolean, errors?: ErrorDescription[], nestingContent?: boolean, context?: {
85
+ [key: string]: any;
86
+ }): AstNode;
87
+ declare function reduceSelector(selector: string[][]): {
88
+ match: boolean;
89
+ optimized: string[];
90
+ selector: string[][];
91
+ reducible: boolean;
92
+ } | null;
93
+ declare function hasDeclaration(node: AstRule): boolean;
94
+ declare function splitRule(buffer: string): string[][];
95
+
96
+ declare function walk(node: AstNode): Generator<WalkResult>;
97
+ declare function walkValues(values: Token[]): Generator<WalkAttributesResult>;
98
+
99
+ declare function expand(ast: AstNode): AstNode;
100
+ declare function replaceCompound(input: string, replace: string): string;
101
+
102
+ declare const colorsFunc: string[];
103
+ declare function reduceNumber(val: string | number): string;
104
+ declare function doRender(data: AstNode, options?: RenderOptions): RenderResult;
105
+ declare function renderToken(token: Token, options?: RenderOptions, cache?: {
106
+ [key: string]: any;
107
+ }, reducer?: (acc: string, curr: Token) => string, errors?: ErrorDescription[]): string;
108
+
109
+ declare const urlTokenMatcher: RegExp;
110
+ declare function doParse(iterator: string, options?: ParserOptions): Promise<ParseResult>;
111
+ declare function parseString(src: string, options?: {
112
+ location: boolean;
113
+ }): Token[];
114
+ declare function parseTokens(tokens: Token[], options?: ParseTokenOptions): Token[];
115
+
116
+ declare function tokenize(stream: string): Generator<TokenizeResult>;
117
+
118
+ declare function isLength(dimension: DimensionToken): boolean;
119
+ declare function isResolution(dimension: DimensionToken): boolean;
120
+ declare function isAngle(dimension: DimensionToken): boolean;
121
+ declare function isTime(dimension: DimensionToken): boolean;
122
+ declare function isFrequency(dimension: DimensionToken): boolean;
123
+ declare function isColor(token: Token): boolean;
124
+ declare function isIdentStart(codepoint: number): boolean;
125
+ declare function isDigit(codepoint: number): boolean;
126
+ declare function isIdentCodepoint(codepoint: number): boolean;
127
+ declare function isIdent(name: string): boolean;
128
+ declare function isNonPrintable(codepoint: number): boolean;
129
+ declare function isPseudo(name: string): boolean;
130
+ declare function isHash(name: string): boolean;
131
+ declare function isNumber(name: string): boolean;
132
+ declare function isDimension(name: string): boolean;
133
+ declare function isPercentage(name: string): boolean;
134
+ declare function parseDimension(name: string): DimensionToken | LengthToken | AngleToken;
135
+ declare function isHexColor(name: string): boolean;
136
+ declare function isFunction(name: string): boolean;
137
+ declare function isAtKeyword(name: string): boolean;
138
+ declare function isNewLine(codepoint: number): boolean;
139
+ declare function isWhiteSpace(codepoint: number): boolean;
140
+
141
+ declare const getConfig: () => PropertiesConfig;
142
+
143
+ declare const funcList: string[];
144
+ declare function matchType(val: Token, properties: PropertyMapType): boolean;
145
+
146
+ interface BaseToken {
147
+
148
+ typ: EnumToken$1;
149
+ loc?: Location;
150
+ }
151
+
152
+ interface LiteralToken extends BaseToken {
153
+
154
+ typ: EnumToken$1.LiteralTokenType;
3
155
  val: string;
4
156
  }
5
- interface IdentToken {
6
- typ: 'Iden';
157
+
158
+ interface IdentToken extends BaseToken {
159
+
160
+ typ: EnumToken$1.IdenTokenType,
7
161
  val: string;
8
162
  }
9
- interface CommaToken {
10
- typ: 'Comma';
163
+
164
+ interface CommaToken extends BaseToken {
165
+
166
+ typ: EnumToken$1.CommaTokenType
11
167
  }
12
- interface ColonToken {
13
- typ: 'Colon';
168
+
169
+ interface ColonToken extends BaseToken {
170
+
171
+ typ: EnumToken$1.ColonTokenType
14
172
  }
15
- interface SemiColonToken {
16
- typ: 'Semi-colon';
173
+
174
+ interface SemiColonToken extends BaseToken {
175
+
176
+ typ: EnumToken$1.SemiColonTokenType
17
177
  }
18
- interface NumberToken {
19
- typ: 'Number';
178
+
179
+ interface NumberToken extends BaseToken {
180
+
181
+ typ: EnumToken$1.NumberTokenType,
20
182
  val: string;
21
183
  }
22
- interface AtRuleToken {
23
- typ: 'At-rule';
184
+
185
+ interface AtRuleToken extends BaseToken {
186
+
187
+ typ: EnumToken$1.AtRuleTokenType,
24
188
  val: string;
25
189
  }
26
- interface PercentageToken {
27
- typ: 'Perc';
190
+
191
+ interface PercentageToken extends BaseToken {
192
+
193
+ typ: EnumToken$1.PercentageTokenType,
28
194
  val: string;
29
195
  }
30
- interface FunctionToken {
31
- typ: 'Func';
196
+
197
+ interface FunctionToken extends BaseToken {
198
+
199
+ typ: EnumToken$1.FunctionTokenType,
32
200
  val: string;
33
201
  chi: Token[];
34
202
  }
35
- interface FunctionURLToken {
36
- typ: 'UrlFunc';
203
+
204
+ interface FunctionURLToken extends BaseToken {
205
+
206
+ typ: EnumToken$1.UrlFunctionTokenType,
37
207
  val: 'url';
38
208
  chi: Array<UrlToken | CommentToken>;
39
209
  }
40
- interface StringToken {
41
- typ: 'String';
210
+
211
+ interface StringToken extends BaseToken {
212
+
213
+ typ: EnumToken$1.StringTokenType;
42
214
  val: string;
43
215
  }
44
- interface BadStringToken {
45
- typ: 'Bad-string';
216
+
217
+ interface BadStringToken extends BaseToken {
218
+
219
+ typ: EnumToken$1.BadStringTokenType;
46
220
  val: string;
47
221
  }
48
- interface UnclosedStringToken {
49
- typ: 'Unclosed-string';
222
+
223
+ interface UnclosedStringToken extends BaseToken {
224
+
225
+ typ: EnumToken$1.UnclosedStringTokenType;
50
226
  val: string;
51
227
  }
52
- interface DimensionToken {
53
- typ: 'Dimension';
54
- val: string;
228
+
229
+ interface DimensionToken extends BaseToken {
230
+
231
+ typ: EnumToken$1.DimensionTokenType;
232
+ val: string | BinaryExpressionToken;
55
233
  unit: string;
56
234
  }
57
- interface LengthToken {
58
- typ: 'Length';
59
- val: string;
235
+
236
+ interface LengthToken extends BaseToken {
237
+
238
+ typ: EnumToken$1.LengthTokenType;
239
+ val: string | BinaryExpressionToken;
60
240
  unit: string;
61
241
  }
62
- interface AngleToken {
63
- typ: 'Angle';
64
- val: string;
242
+
243
+ interface AngleToken extends BaseToken {
244
+
245
+ typ: EnumToken$1.AngleTokenType;
246
+ val: string | BinaryExpressionToken;
65
247
  unit: string;
66
248
  }
67
- interface TimeToken {
68
- typ: 'Time';
69
- val: string;
249
+
250
+ interface TimeToken extends BaseToken {
251
+
252
+ typ: EnumToken$1.TimeTokenType;
253
+ val: string | BinaryExpressionToken;
70
254
  unit: 'ms' | 's';
71
255
  }
72
- interface FrequencyToken {
73
- typ: 'Frequency';
74
- val: string;
256
+
257
+ interface FrequencyToken extends BaseToken {
258
+
259
+ typ: EnumToken$1.FrequencyTokenType;
260
+ val: string | BinaryExpressionToken;
75
261
  unit: 'Hz' | 'Khz';
76
262
  }
77
- interface ResolutionToken {
78
- typ: 'Resolution';
79
- val: string;
263
+
264
+ interface ResolutionToken extends BaseToken {
265
+
266
+ typ: EnumToken$1.ResolutionTokenType;
267
+ val: string | BinaryExpressionToken;
80
268
  unit: 'dpi' | 'dpcm' | 'dppx' | 'x';
81
269
  }
82
- interface HashToken {
83
- typ: 'Hash';
270
+
271
+ interface HashToken extends BaseToken {
272
+
273
+ typ: EnumToken$1.HashTokenType;
84
274
  val: string;
85
275
  }
86
- interface BlockStartToken {
87
- typ: 'Block-start';
276
+
277
+ interface BlockStartToken extends BaseToken {
278
+
279
+ typ: EnumToken$1.BlockStartTokenType
88
280
  }
89
- interface BlockEndToken {
90
- typ: 'Block-end';
281
+
282
+ interface BlockEndToken extends BaseToken {
283
+
284
+ typ: EnumToken$1.BlockEndTokenType
91
285
  }
92
- interface AttrStartToken {
93
- typ: 'Attr-start';
286
+
287
+ interface AttrStartToken extends BaseToken {
288
+
289
+ typ: EnumToken$1.AttrStartTokenType;
94
290
  chi?: Token[];
95
291
  }
96
- interface AttrEndToken {
97
- typ: 'Attr-end';
292
+
293
+ interface AttrEndToken extends BaseToken {
294
+
295
+ typ: EnumToken$1.AttrEndTokenType
98
296
  }
99
- interface ParensStartToken {
100
- typ: 'Start-parens';
101
- chi?: Token[];
297
+
298
+ interface ParensStartToken extends BaseToken {
299
+
300
+ typ: EnumToken$1.StartParensTokenType;
102
301
  }
103
- interface ParensEndToken {
104
- typ: 'End-parens';
302
+
303
+ interface ParensEndToken extends BaseToken {
304
+
305
+ typ: EnumToken$1.EndParensTokenType
105
306
  }
106
- interface WhitespaceToken {
107
- typ: 'Whitespace';
307
+
308
+ interface ParensToken extends BaseToken {
309
+
310
+ typ: EnumToken$1.ParensTokenType;
311
+ chi: Token[];
108
312
  }
109
- interface CommentToken {
110
- typ: 'Comment';
313
+
314
+ interface WhitespaceToken extends BaseToken {
315
+
316
+ typ: EnumToken$1.WhitespaceTokenType
317
+ }
318
+
319
+ interface CommentToken extends BaseToken {
320
+
321
+ typ: EnumToken$1.CommentTokenType;
111
322
  val: string;
112
323
  }
113
- interface BadCommentToken {
114
- typ: 'Bad-comment';
324
+
325
+ interface BadCommentToken extends BaseToken {
326
+
327
+ typ: EnumToken$1.BadCommentTokenType;
115
328
  val: string;
116
329
  }
117
- interface CDOCommentToken {
118
- typ: 'CDOCOMM';
330
+
331
+ interface CDOCommentToken extends BaseToken {
332
+
333
+ typ: EnumToken$1.CDOCOMMTokenType;
119
334
  val: string;
120
335
  }
121
- interface BadCDOCommentToken {
122
- typ: 'Bad-cdo';
336
+
337
+ interface BadCDOCommentToken extends BaseToken {
338
+
339
+ typ: EnumToken$1.BadCdoTokenType;
123
340
  val: string;
124
341
  }
125
- interface IncludesToken {
126
- typ: 'Includes';
342
+
343
+ interface IncludesToken extends BaseToken {
344
+
345
+ typ: EnumToken$1.IncludesTokenType;
127
346
  val: '~=';
128
347
  }
129
- interface DashMatchToken {
130
- typ: 'Dash-match';
348
+
349
+ interface DashMatchToken extends BaseToken {
350
+
351
+ typ: EnumToken$1.DashMatchTokenType;
131
352
  val: '|=';
132
353
  }
133
- interface LessThanToken {
134
- typ: 'Lt';
354
+
355
+ interface LessThanToken extends BaseToken {
356
+
357
+ typ: EnumToken$1.LtTokenType;
135
358
  }
136
- interface LessThanOrEqualToken {
137
- typ: 'Lte';
359
+
360
+ interface LessThanOrEqualToken extends BaseToken {
361
+
362
+ typ: EnumToken$1.LteTokenType;
138
363
  }
139
- interface GreaterThanToken {
140
- typ: 'Gt';
364
+
365
+ interface GreaterThanToken extends BaseToken {
366
+
367
+ typ: EnumToken$1.GtTokenType;
141
368
  }
142
- interface GreaterThanOrEqualToken {
143
- typ: 'Gte';
369
+
370
+ interface GreaterThanOrEqualToken extends BaseToken {
371
+
372
+ typ: EnumToken$1.GteTokenType;
144
373
  }
145
- interface PseudoClassToken {
146
- typ: 'Pseudo-class';
374
+
375
+ interface PseudoClassToken extends BaseToken {
376
+
377
+ typ: EnumToken$1.PseudoClassTokenType;
147
378
  val: string;
148
379
  }
149
- interface PseudoClassFunctionToken {
150
- typ: 'Pseudo-class-func';
380
+
381
+ interface PseudoClassFunctionToken extends BaseToken {
382
+
383
+ typ: EnumToken$1.PseudoClassFuncTokenType;
151
384
  val: string;
152
385
  chi: Token[];
153
386
  }
154
- interface DelimToken {
155
- typ: 'Delim';
387
+
388
+ interface DelimToken extends BaseToken {
389
+
390
+ typ: EnumToken$1.DelimTokenType;
156
391
  val: '=';
157
392
  }
158
- interface BadUrlToken {
159
- typ: 'Bad-url-token';
393
+
394
+ interface BadUrlToken extends BaseToken {
395
+
396
+ typ: EnumToken$1.BadUrlTokenType,
160
397
  val: string;
161
398
  }
162
- interface UrlToken {
163
- typ: 'Url-token';
399
+
400
+ interface UrlToken extends BaseToken {
401
+
402
+ typ: EnumToken$1.UrlTokenTokenType,
164
403
  val: string;
165
404
  }
166
- interface EOFToken {
167
- typ: 'EOF';
405
+
406
+ interface EOFToken extends BaseToken {
407
+
408
+ typ: EnumToken$1.EOFTokenType;
168
409
  }
169
- interface ImportantToken {
170
- typ: 'Important';
410
+
411
+ interface ImportantToken extends BaseToken {
412
+
413
+ typ: EnumToken$1.ImportantTokenType;
171
414
  }
172
- interface ColorToken {
173
- typ: 'Color';
415
+
416
+ interface ColorToken extends BaseToken {
417
+
418
+ typ: EnumToken$1.ColorTokenType;
174
419
  val: string;
175
420
  kin: 'lit' | 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'hwb' | 'device-cmyk';
176
421
  chi?: Token[];
177
422
  }
178
- interface AttrToken {
179
- typ: 'Attr';
423
+
424
+ interface AttrToken extends BaseToken {
425
+
426
+ typ: EnumToken$1.AttrTokenType,
427
+ chi: Token[]
428
+ }
429
+
430
+ interface AddToken extends BaseToken {
431
+
432
+ typ: EnumToken$1.Add;
433
+ }
434
+
435
+ interface SubToken extends BaseToken {
436
+
437
+ typ: EnumToken$1.Sub;
438
+ }
439
+
440
+ interface DivToken extends BaseToken {
441
+
442
+ typ: EnumToken$1.Div;
443
+ }
444
+
445
+ interface MulToken extends BaseToken {
446
+
447
+ typ: EnumToken$1.Mul;
448
+ }
449
+
450
+ interface UnaryExpression extends BaseToken {
451
+
452
+ typ: EnumToken$1.UnaryExpressionTokenType
453
+ sign: EnumToken$1.Add | EnumToken$1.Sub ;
454
+ val: UnaryExpressionNode;
455
+ }
456
+
457
+ interface BinaryExpressionToken extends BaseToken {
458
+
459
+ typ: EnumToken$1.BinaryExpressionTokenType
460
+ op: EnumToken$1.Add | EnumToken$1.Sub | EnumToken$1.Div | EnumToken$1.Mul;
461
+ l: BinaryExpressionNode;
462
+ r: BinaryExpressionNode;
463
+ }
464
+
465
+ interface ListToken extends BaseToken {
466
+
467
+ typ: EnumToken$1.ListToken
180
468
  chi: Token[];
181
469
  }
182
- declare type Token = LiteralToken | IdentToken | CommaToken | ColonToken | SemiColonToken | NumberToken | AtRuleToken | PercentageToken | FunctionURLToken | FunctionToken | DimensionToken | LengthToken | AngleToken | StringToken | TimeToken | FrequencyToken | ResolutionToken | UnclosedStringToken | HashToken | BadStringToken | BlockStartToken | BlockEndToken | AttrStartToken | AttrEndToken | ParensStartToken | ParensEndToken | CDOCommentToken | BadCDOCommentToken | CommentToken | BadCommentToken | WhitespaceToken | IncludesToken | DashMatchToken | LessThanToken | LessThanOrEqualToken | GreaterThanToken | GreaterThanOrEqualToken | PseudoClassToken | PseudoClassFunctionToken | DelimToken | BadUrlToken | UrlToken | ImportantToken | ColorToken | AttrToken | EOFToken;
470
+
471
+ declare type UnaryExpressionNode = BinaryExpressionNode | NumberToken | DimensionToken | TimeToken | LengthToken | AngleToken | FrequencyToken;
472
+
473
+ declare type BinaryExpressionNode = NumberToken | DimensionToken | PercentageToken |
474
+ AngleToken | LengthToken | FrequencyToken | BinaryExpressionToken | FunctionToken | ParensToken;
475
+ declare type Token = LiteralToken | IdentToken | CommaToken | ColonToken | SemiColonToken |
476
+ NumberToken | AtRuleToken | PercentageToken | FunctionURLToken | FunctionToken | DimensionToken | LengthToken |
477
+ AngleToken | StringToken | TimeToken | FrequencyToken | ResolutionToken |
478
+ UnclosedStringToken | HashToken | BadStringToken | BlockStartToken | BlockEndToken |
479
+ AttrStartToken | AttrEndToken | ParensStartToken | ParensEndToken | ParensToken | CDOCommentToken |
480
+ BadCDOCommentToken | CommentToken | BadCommentToken | WhitespaceToken | IncludesToken |
481
+ DashMatchToken | LessThanToken | LessThanOrEqualToken | GreaterThanToken | GreaterThanOrEqualToken |
482
+ ListToken | PseudoClassToken | PseudoClassFunctionToken | DelimToken | BinaryExpressionToken | UnaryExpression |
483
+ AddToken | SubToken | DivToken | MulToken |
484
+ BadUrlToken | UrlToken | ImportantToken | ColorToken | AttrToken | EOFToken;
183
485
 
184
486
  interface PropertyMapType {
487
+
185
488
  default: string[];
186
489
  types: string[];
187
490
  keywords: string[];
188
491
  required?: boolean;
189
492
  multiple?: boolean;
190
493
  prefix?: {
191
- typ: 'Literal';
192
- val: string;
494
+ typ: 'Literal',
495
+ val: string
193
496
  };
194
497
  previous?: string;
195
498
  separator?: {
196
- typ: 'Comma';
499
+
500
+ typ: 'Comma'
197
501
  };
198
502
  constraints?: {
199
503
  [key: string]: {
200
504
  [key: string]: any;
201
- };
505
+ }
202
506
  };
203
507
  mapping?: {
204
- [key: string]: any;
205
- };
508
+ [key: string]: any
509
+ }
206
510
  }
207
511
 
512
+ // generated from config.json at https://app.quicktype.io/?l=ts
513
+
208
514
  interface PropertiesConfig {
209
515
  properties: PropertiesConfigProperties;
210
- map: Map;
516
+ map: Map;
211
517
  }
518
+
212
519
  interface Map {
213
- border: Border;
214
- "border-color": BackgroundPositionClass;
215
- "border-style": BackgroundPositionClass;
216
- "border-width": BackgroundPositionClass;
217
- outline: Outline;
218
- "outline-color": BackgroundPositionClass;
219
- "outline-style": BackgroundPositionClass;
220
- "outline-width": BackgroundPositionClass;
221
- font: Font;
222
- "font-weight": BackgroundPositionClass;
223
- "font-style": BackgroundPositionClass;
224
- "font-size": BackgroundPositionClass;
225
- "line-height": BackgroundPositionClass;
226
- "font-stretch": BackgroundPositionClass;
227
- "font-variant": BackgroundPositionClass;
228
- "font-family": BackgroundPositionClass;
229
- background: Background;
230
- "background-repeat": BackgroundPositionClass;
231
- "background-color": BackgroundPositionClass;
232
- "background-image": BackgroundPositionClass;
520
+ border: Border;
521
+ "border-color": BackgroundPositionClass;
522
+ "border-style": BackgroundPositionClass;
523
+ "border-width": BackgroundPositionClass;
524
+ outline: Outline;
525
+ "outline-color": BackgroundPositionClass;
526
+ "outline-style": BackgroundPositionClass;
527
+ "outline-width": BackgroundPositionClass;
528
+ font: Font;
529
+ "font-weight": BackgroundPositionClass;
530
+ "font-style": BackgroundPositionClass;
531
+ "font-size": BackgroundPositionClass;
532
+ "line-height": BackgroundPositionClass;
533
+ "font-stretch": BackgroundPositionClass;
534
+ "font-variant": BackgroundPositionClass;
535
+ "font-family": BackgroundPositionClass;
536
+ background: Background;
537
+ "background-repeat": BackgroundPositionClass;
538
+ "background-color": BackgroundPositionClass;
539
+ "background-image": BackgroundPositionClass;
233
540
  "background-attachment": BackgroundPositionClass;
234
- "background-clip": BackgroundPositionClass;
235
- "background-origin": BackgroundPositionClass;
236
- "background-position": BackgroundPositionClass;
237
- "background-size": BackgroundPositionClass;
541
+ "background-clip": BackgroundPositionClass;
542
+ "background-origin": BackgroundPositionClass;
543
+ "background-position": BackgroundPositionClass;
544
+ "background-size": BackgroundPositionClass;
238
545
  }
546
+
239
547
  interface Background {
240
- shorthand: string;
241
- pattern: string;
242
- keywords: string[];
243
- default: any[];
244
- multiple: boolean;
245
- separator: Separator;
548
+ shorthand: string;
549
+ pattern: string;
550
+ keywords: string[];
551
+ default: any[];
552
+ multiple: boolean;
553
+ separator: Separator;
246
554
  properties: BackgroundProperties;
247
555
  }
556
+
248
557
  interface BackgroundProperties {
249
- "background-repeat": BackgroundRepeat;
250
- "background-color": PurpleBackgroundAttachment;
251
- "background-image": PurpleBackgroundAttachment;
558
+ "background-repeat": BackgroundRepeat;
559
+ "background-color": PurpleBackgroundAttachment;
560
+ "background-image": PurpleBackgroundAttachment;
252
561
  "background-attachment": PurpleBackgroundAttachment;
253
- "background-clip": PurpleBackgroundAttachment;
254
- "background-origin": PurpleBackgroundAttachment;
255
- "background-position": BackgroundPosition;
256
- "background-size": BackgroundSize;
562
+ "background-clip": PurpleBackgroundAttachment;
563
+ "background-origin": PurpleBackgroundAttachment;
564
+ "background-position": BackgroundPosition;
565
+ "background-size": BackgroundSize;
257
566
  }
567
+
258
568
  interface PurpleBackgroundAttachment {
259
- types: string[];
260
- default: string[];
261
- keywords: string[];
569
+ types: string[];
570
+ default: string[];
571
+ keywords: string[];
262
572
  required?: boolean;
263
- mapping?: BackgroundAttachmentMapping;
573
+ mapping?: BackgroundAttachmentMapping;
264
574
  }
575
+
265
576
  interface BackgroundAttachmentMapping {
266
577
  "ultra-condensed": string;
267
578
  "extra-condensed": string;
268
- condensed: string;
269
- "semi-condensed": string;
270
- normal: string;
271
- "semi-expanded": string;
272
- expanded: string;
273
- "extra-expanded": string;
274
- "ultra-expanded": string;
579
+ condensed: string;
580
+ "semi-condensed": string;
581
+ normal: string;
582
+ "semi-expanded": string;
583
+ expanded: string;
584
+ "extra-expanded": string;
585
+ "ultra-expanded": string;
275
586
  }
587
+
276
588
  interface BackgroundPosition {
277
- multiple: boolean;
278
- types: string[];
279
- default: string[];
280
- keywords: string[];
281
- mapping: BackgroundPositionMapping;
589
+ multiple: boolean;
590
+ types: string[];
591
+ default: string[];
592
+ keywords: string[];
593
+ mapping: BackgroundPositionMapping;
282
594
  constraints: BackgroundPositionConstraints;
283
595
  }
596
+
284
597
  interface BackgroundPositionConstraints {
285
598
  mapping: ConstraintsMapping;
286
599
  }
600
+
287
601
  interface ConstraintsMapping {
288
602
  max: number;
289
603
  }
604
+
290
605
  interface BackgroundPositionMapping {
291
- left: string;
292
- top: string;
606
+ left: string;
607
+ top: string;
293
608
  center: string;
294
609
  bottom: string;
295
- right: string;
610
+ right: string;
296
611
  }
612
+
297
613
  interface BackgroundRepeat {
298
- types: any[];
299
- default: string[];
614
+ types: any[];
615
+ default: string[];
300
616
  multiple: boolean;
301
617
  keywords: string[];
302
- mapping: BackgroundRepeatMapping;
618
+ mapping: BackgroundRepeatMapping;
303
619
  }
620
+
304
621
  interface BackgroundRepeatMapping {
305
- "repeat no-repeat": string;
306
- "no-repeat repeat": string;
307
- "repeat repeat": string;
308
- "space space": string;
309
- "round round": string;
622
+ "repeat no-repeat": string;
623
+ "no-repeat repeat": string;
624
+ "repeat repeat": string;
625
+ "space space": string;
626
+ "round round": string;
310
627
  "no-repeat no-repeat": string;
311
628
  }
629
+
312
630
  interface BackgroundSize {
313
631
  multiple: boolean;
314
632
  previous: string;
315
- prefix: Prefix;
316
- types: string[];
317
- default: string[];
633
+ prefix: Prefix;
634
+ types: string[];
635
+ default: string[];
318
636
  keywords: string[];
319
- mapping: BackgroundSizeMapping;
637
+ mapping: BackgroundSizeMapping;
320
638
  }
639
+
321
640
  interface BackgroundSizeMapping {
322
641
  "auto auto": string;
323
642
  }
643
+
324
644
  interface Prefix {
325
645
  typ: string;
326
646
  val: string;
327
647
  }
648
+
328
649
  interface Separator {
329
650
  typ: string;
330
651
  }
652
+
331
653
  interface BackgroundPositionClass {
332
654
  shorthand: string;
333
655
  }
656
+
334
657
  interface Border {
335
- shorthand: string;
336
- pattern: string;
337
- keywords: string[];
338
- default: string[];
658
+ shorthand: string;
659
+ pattern: string;
660
+ keywords: string[];
661
+ default: string[];
339
662
  properties: BorderProperties;
340
663
  }
664
+
341
665
  interface BorderProperties {
342
666
  "border-color": BorderColorClass;
343
667
  "border-style": BorderColorClass;
344
668
  "border-width": BorderColorClass;
345
669
  }
670
+
346
671
  interface BorderColorClass {
347
672
  }
673
+
348
674
  interface Font {
349
- shorthand: string;
350
- pattern: string;
351
- keywords: string[];
352
- default: any[];
675
+ shorthand: string;
676
+ pattern: string;
677
+ keywords: string[];
678
+ default: any[];
353
679
  properties: FontProperties;
354
680
  }
681
+
355
682
  interface FontProperties {
356
- "font-weight": FontWeight;
357
- "font-style": PurpleBackgroundAttachment;
358
- "font-size": PurpleBackgroundAttachment;
359
- "line-height": LineHeight;
683
+ "font-weight": FontWeight;
684
+ "font-style": PurpleBackgroundAttachment;
685
+ "font-size": PurpleBackgroundAttachment;
686
+ "line-height": LineHeight;
360
687
  "font-stretch": PurpleBackgroundAttachment;
361
688
  "font-variant": PurpleBackgroundAttachment;
362
- "font-family": FontFamily;
689
+ "font-family": FontFamily;
363
690
  }
691
+
364
692
  interface FontFamily {
365
- types: string[];
366
- default: any[];
367
- keywords: string[];
368
- required: boolean;
369
- multiple: boolean;
693
+ types: string[];
694
+ default: any[];
695
+ keywords: string[];
696
+ required: boolean;
697
+ multiple: boolean;
370
698
  separator: Separator;
371
699
  }
700
+
372
701
  interface FontWeight {
373
- types: string[];
374
- default: string[];
375
- keywords: string[];
702
+ types: string[];
703
+ default: string[];
704
+ keywords: string[];
376
705
  constraints: FontWeightConstraints;
377
- mapping: FontWeightMapping;
706
+ mapping: FontWeightMapping;
378
707
  }
708
+
379
709
  interface FontWeightConstraints {
380
710
  value: Value;
381
711
  }
712
+
382
713
  interface Value {
383
714
  min: string;
384
715
  max: string;
385
716
  }
717
+
386
718
  interface FontWeightMapping {
387
- thin: string;
388
- hairline: string;
719
+ thin: string;
720
+ hairline: string;
389
721
  "extra light": string;
390
722
  "ultra light": string;
391
- light: string;
392
- normal: string;
393
- regular: string;
394
- medium: string;
395
- "semi bold": string;
396
- "demi bold": string;
397
- bold: string;
398
- "extra bold": string;
399
- "ultra bold": string;
400
- black: string;
401
- heavy: string;
723
+ light: string;
724
+ normal: string;
725
+ regular: string;
726
+ medium: string;
727
+ "semi bold": string;
728
+ "demi bold": string;
729
+ bold: string;
730
+ "extra bold": string;
731
+ "ultra bold": string;
732
+ black: string;
733
+ heavy: string;
402
734
  "extra black": string;
403
735
  "ultra black": string;
404
736
  }
737
+
405
738
  interface LineHeight {
406
- types: string[];
407
- default: string[];
739
+ types: string[];
740
+ default: string[];
408
741
  keywords: string[];
409
742
  previous: string;
410
- prefix: Prefix;
743
+ prefix: Prefix;
411
744
  }
745
+
412
746
  interface Outline {
413
- shorthand: string;
414
- pattern: string;
415
- keywords: string[];
416
- default: string[];
747
+ shorthand: string;
748
+ pattern: string;
749
+ keywords: string[];
750
+ default: string[];
417
751
  properties: OutlineProperties;
418
752
  }
753
+
419
754
  interface OutlineProperties {
420
755
  "outline-color": PurpleBackgroundAttachment;
421
756
  "outline-style": PurpleBackgroundAttachment;
422
757
  "outline-width": PurpleBackgroundAttachment;
423
758
  }
759
+
424
760
  interface PropertiesConfigProperties {
425
- inset: BorderRadius;
426
- top: BackgroundPositionClass;
427
- right: BackgroundPositionClass;
428
- bottom: BackgroundPositionClass;
429
- left: BackgroundPositionClass;
430
- margin: BorderRadius;
431
- "margin-top": BackgroundPositionClass;
432
- "margin-right": BackgroundPositionClass;
433
- "margin-bottom": BackgroundPositionClass;
434
- "margin-left": BackgroundPositionClass;
435
- padding: BorderColor;
436
- "padding-top": BackgroundPositionClass;
437
- "padding-right": BackgroundPositionClass;
438
- "padding-bottom": BackgroundPositionClass;
439
- "padding-left": BackgroundPositionClass;
440
- "border-radius": BorderRadius;
441
- "border-top-left-radius": BackgroundPositionClass;
442
- "border-top-right-radius": BackgroundPositionClass;
761
+ inset: BorderRadius;
762
+ top: BackgroundPositionClass;
763
+ right: BackgroundPositionClass;
764
+ bottom: BackgroundPositionClass;
765
+ left: BackgroundPositionClass;
766
+ margin: BorderRadius;
767
+ "margin-top": BackgroundPositionClass;
768
+ "margin-right": BackgroundPositionClass;
769
+ "margin-bottom": BackgroundPositionClass;
770
+ "margin-left": BackgroundPositionClass;
771
+ padding: BorderColor;
772
+ "padding-top": BackgroundPositionClass;
773
+ "padding-right": BackgroundPositionClass;
774
+ "padding-bottom": BackgroundPositionClass;
775
+ "padding-left": BackgroundPositionClass;
776
+ "border-radius": BorderRadius;
777
+ "border-top-left-radius": BackgroundPositionClass;
778
+ "border-top-right-radius": BackgroundPositionClass;
443
779
  "border-bottom-right-radius": BackgroundPositionClass;
444
- "border-bottom-left-radius": BackgroundPositionClass;
445
- "border-width": BorderColor;
446
- "border-top-width": BackgroundPositionClass;
447
- "border-right-width": BackgroundPositionClass;
448
- "border-bottom-width": BackgroundPositionClass;
449
- "border-left-width": BackgroundPositionClass;
450
- "border-style": BorderColor;
451
- "border-top-style": BackgroundPositionClass;
452
- "border-right-style": BackgroundPositionClass;
453
- "border-bottom-style": BackgroundPositionClass;
454
- "border-left-style": BackgroundPositionClass;
455
- "border-color": BorderColor;
456
- "border-top-color": BackgroundPositionClass;
457
- "border-right-color": BackgroundPositionClass;
458
- "border-bottom-color": BackgroundPositionClass;
459
- "border-left-color": BackgroundPositionClass;
780
+ "border-bottom-left-radius": BackgroundPositionClass;
781
+ "border-width": BorderColor;
782
+ "border-top-width": BackgroundPositionClass;
783
+ "border-right-width": BackgroundPositionClass;
784
+ "border-bottom-width": BackgroundPositionClass;
785
+ "border-left-width": BackgroundPositionClass;
786
+ "border-style": BorderColor;
787
+ "border-top-style": BackgroundPositionClass;
788
+ "border-right-style": BackgroundPositionClass;
789
+ "border-bottom-style": BackgroundPositionClass;
790
+ "border-left-style": BackgroundPositionClass;
791
+ "border-color": BorderColor;
792
+ "border-top-color": BackgroundPositionClass;
793
+ "border-right-color": BackgroundPositionClass;
794
+ "border-bottom-color": BackgroundPositionClass;
795
+ "border-left-color": BackgroundPositionClass;
460
796
  }
797
+
461
798
  interface BorderColor {
462
- shorthand: string;
463
- map?: string;
799
+ shorthand: string;
800
+ map?: string;
464
801
  properties: string[];
465
- types: string[];
466
- keywords: string[];
802
+ types: string[];
803
+ keywords: string[];
467
804
  }
805
+
468
806
  interface BorderRadius {
469
- shorthand: string;
807
+ shorthand: string;
470
808
  properties: string[];
471
- types: string[];
472
- multiple: boolean;
473
- separator: null | string;
474
- keywords: string[];
809
+ types: string[];
810
+ multiple: boolean;
811
+ separator: null | string;
812
+ keywords: string[];
475
813
  }
476
814
 
477
815
  interface ErrorDescription {
@@ -487,30 +825,73 @@ interface ErrorDescription {
487
825
  error?: Error;
488
826
  }
489
827
 
490
- interface ParserOptions {
828
+ interface PropertyListOptions {
829
+
830
+ removeDuplicateDeclarations?: boolean;
831
+ computeShorthand?: boolean;
832
+ }
833
+
834
+ interface MinifyFeature {
835
+
836
+ ordering: number;
837
+
838
+ register: (options: MinifyOptions | ParserOptions) => void;
839
+ run: (ast: AstRule | AstAtRule, options: ParserOptions = {}, parent: AstRule | AstAtRule | AstRuleStyleSheet, context: {
840
+ [key: string]: any
841
+ }) => void;
842
+ cleanup?: (ast: AstRuleStyleSheet, options: ParserOptions = {}, context: { [key: string]: any }) => void;
843
+ }
844
+
845
+ interface ParserOptions extends PropertyListOptions {
491
846
 
847
+ minify?: boolean;
492
848
  src?: string;
493
849
  sourcemap?: boolean;
494
- minify?: boolean;
495
850
  nestingRules?: boolean;
851
+ expandNestingRules?: boolean;
852
+ removeCharset?: boolean;
496
853
  removeEmpty?: boolean;
497
854
  resolveUrls?: boolean;
498
855
  resolveImport?: boolean;
499
856
  cwd?: string;
857
+ removeDuplicateDeclarations?: boolean;
858
+ computeShorthand?: boolean;
859
+ inlineCssVariables?: boolean;
860
+ computeCalcExpression?: boolean;
500
861
  load?: (url: string, currentUrl: string) => Promise<string>;
501
- resolve?: (url: string, currentUrl: string, currentWorkingDirectory?: string) => { absolute: string, relative: string };
862
+ dirname?: (path: string) => string;
863
+ resolve?: (url: string, currentUrl: string, currentWorkingDirectory?: string) => {
864
+ absolute: string,
865
+ relative: string
866
+ };
502
867
  nodeEventFilter?: NodeType[]
503
868
  }
504
869
 
870
+ interface MinifyOptions extends ParserOptions {
871
+
872
+ features: MinifyFeature[];
873
+ }
874
+
875
+ interface ResoledPath {
876
+ absolute: string;
877
+ relative: string;
878
+ }
879
+
505
880
  interface RenderOptions {
506
881
 
507
882
  minify?: boolean;
508
883
  expandNestingRules?: boolean;
509
884
  preserveLicense?: boolean;
885
+ sourcemap?: boolean;
510
886
  indent?: string;
511
887
  newLine?: string;
512
888
  removeComments?: boolean;
513
889
  colorConvert?: boolean;
890
+ output?: string;
891
+ cwd?: string;
892
+ load?: (url: string, currentUrl: string) => Promise<string>;
893
+ resolve?: (url: string, currentUrl: string, currentWorkingDirectory?: string) => ResoledPath;
894
+
514
895
  }
515
896
 
516
897
  interface TransformOptions extends ParserOptions, RenderOptions {
@@ -529,11 +910,12 @@ interface ParseResult {
529
910
  }
530
911
 
531
912
  interface RenderResult {
532
- code: string ;
913
+ code: string;
533
914
  errors: ErrorDescription[];
534
915
  stats: {
535
916
  total: string;
536
- }
917
+ },
918
+ map?: SourceMapObject
537
919
  }
538
920
 
539
921
  interface TransformResult extends ParseResult, RenderResult {
@@ -548,9 +930,13 @@ interface TransformResult extends ParseResult, RenderResult {
548
930
  }
549
931
  }
550
932
 
933
+ interface ParseTokenOptions extends ParserOptions {
934
+ parseColor?: boolean;
935
+ }
936
+
551
937
  interface TokenizeResult {
552
938
  token: string;
553
- hint?: string;
939
+ hint?: EnumToken;
554
940
  position: Position;
555
941
  bytesIn: number;
556
942
  }
@@ -569,8 +955,6 @@ interface Location {
569
955
  src: string;
570
956
  }
571
957
 
572
- declare type NodeType = 'StyleSheet' | 'InvalidComment' | 'Comment' | 'Declaration' | 'InvalidAtRule' | 'AtRule' | 'Rule';
573
-
574
958
  interface Node {
575
959
 
576
960
  typ: NodeType;
@@ -579,26 +963,27 @@ interface Node {
579
963
 
580
964
  interface AstComment extends Node {
581
965
 
582
- typ: 'Comment' | 'CDOCOMM',
966
+ typ: NodeType.CommentNodeType | NodeType.CDOCOMMNodeType,
583
967
  val: string;
584
968
  }
969
+
585
970
  interface AstDeclaration extends Node {
586
971
 
587
972
  nam: string,
588
973
  val: Token[];
589
- typ: 'Declaration'
974
+ typ: NodeType.DeclarationNodeType
590
975
  }
591
976
 
592
977
  interface AstRule extends Node {
593
978
 
594
- typ: 'Rule';
979
+ typ: NodeType.RuleNodeType;
595
980
  sel: string;
596
981
  chi: Array<AstDeclaration | AstComment | AstRuleList>;
597
982
  optimized?: OptimizedSelector;
598
983
  raw?: RawSelectorTokens;
599
984
  }
600
985
 
601
- declare type RawSelectorTokens = string[][];
986
+ declare type RawSelectorTokens = string[][];
602
987
 
603
988
  interface OptimizedSelector {
604
989
  match: boolean;
@@ -609,6 +994,7 @@ interface OptimizedSelector {
609
994
 
610
995
  interface AstAtRule extends Node {
611
996
 
997
+ typ: AtRuleNodeType,
612
998
  nam: string;
613
999
  val: string;
614
1000
  chi?: Array<AstDeclaration | AstComment> | Array<AstRule | AstComment>
@@ -616,11 +1002,12 @@ interface AstAtRule extends Node {
616
1002
 
617
1003
  interface AstRuleList extends Node {
618
1004
 
1005
+ typ: StyleSheetNodeType | RuleNodeType | AtRuleNodeType,
619
1006
  chi: Array<Node | AstComment>
620
1007
  }
621
1008
 
622
1009
  interface AstRuleStyleSheet extends AstRuleList {
623
- typ: 'StyleSheet',
1010
+ typ: StyleSheetNodeType,
624
1011
  chi: Array<AstRuleList | AstComment>
625
1012
  }
626
1013
 
@@ -632,69 +1019,26 @@ type AstNode =
632
1019
  | AstRule
633
1020
  | AstDeclaration;
634
1021
 
635
- declare const combinators: string[];
636
- declare function minify(ast: AstNode, options?: ParserOptions, recursive?: boolean, errors?: ErrorDescription[], nestingContent?: boolean): AstNode;
637
- declare function reduceSelector(selector: string[][]): {
638
- match: boolean;
639
- optimized: string[];
640
- selector: string[][];
641
- reducible: boolean;
642
- } | null;
643
- declare function hasDeclaration(node: AstRule): boolean;
644
- declare function minifyRule(ast: AstRule | AstAtRule): AstRule | AstAtRule;
645
- declare function splitRule(buffer: string): string[][];
646
-
647
- declare function walk(node: AstNode, parent?: AstRuleList, root?: AstRuleList): Generator<{
1022
+ interface WalkResult {
648
1023
  node: AstNode;
649
1024
  parent?: AstRuleList;
650
1025
  root?: AstRuleList;
651
- }>;
652
- declare function walkValues(values: Token[], parent?: Token): Generator<{
653
- value: Token;
654
- parent: Token | null;
655
- }>;
656
-
657
- declare function expand(ast: AstNode): AstNode;
658
- declare function replaceCompound(input: string, replace: string): string;
659
-
660
- declare const colorsFunc: string[];
661
- declare function render(data: AstNode, opt?: RenderOptions): RenderResult;
662
- declare function renderToken(token: Token, options?: RenderOptions, reducer?: (acc: string, curr: Token) => string, errors?: ErrorDescription[]): string;
663
-
664
- declare const urlTokenMatcher: RegExp;
665
- declare function parseString(src: string, options?: {
666
- location: boolean;
667
- }): Token[];
668
-
669
- declare function tokenize(iterator: string): Generator<TokenizeResult>;
670
-
671
- declare function isLength(dimension: DimensionToken): boolean;
672
- declare function isResolution(dimension: DimensionToken): boolean;
673
- declare function isAngle(dimension: DimensionToken): boolean;
674
- declare function isTime(dimension: DimensionToken): boolean;
675
- declare function isFrequency(dimension: DimensionToken): boolean;
676
- declare function isColor(token: Token): boolean;
677
- declare function isIdentStart(codepoint: number): boolean;
678
- declare function isDigit(codepoint: number): boolean;
679
- declare function isIdentCodepoint(codepoint: number): boolean;
680
- declare function isIdent(name: string): boolean;
681
- declare function isNonPrintable(codepoint: number): boolean;
682
- declare function isPseudo(name: string): boolean;
683
- declare function isHash(name: string): boolean;
684
- declare function isNumber(name: string): boolean;
685
- declare function isDimension(name: string): boolean;
686
- declare function isPercentage(name: string): boolean;
687
- declare function parseDimension(name: string): DimensionToken | LengthToken | AngleToken;
688
- declare function isHexColor(name: string): boolean;
689
- declare function isFunction(name: string): boolean;
690
- declare function isAtKeyword(name: string): boolean;
691
- declare function isNewLine(codepoint: number): boolean;
692
- declare function isWhiteSpace(codepoint: number): boolean;
1026
+ }
693
1027
 
694
- declare const getConfig: () => PropertiesConfig;
1028
+ interface WalkAttributesResult {
1029
+ value: Token;
1030
+ parent: FunctionToken | ParensToken | null;
1031
+ }
695
1032
 
696
- declare const funcList: string[];
697
- declare function matchType(val: Token, properties: PropertyMapType): boolean;
1033
+ interface SourceMapObject {
1034
+ version: number;
1035
+ file?: string;
1036
+ sourceRoot?: string;
1037
+ sources?: string[];
1038
+ sourcesContent?: Array<string | null>;
1039
+ names?: string[];
1040
+ mappings: string;
1041
+ }
698
1042
 
699
1043
  declare function load(url: string, currentFile: string): Promise<string>;
700
1044
 
@@ -705,7 +1049,8 @@ declare function resolve(url: string, currentDirectory: string, cwd?: string): {
705
1049
  relative: string;
706
1050
  };
707
1051
 
1052
+ declare function render(data: AstNode, options?: RenderOptions): RenderResult;
708
1053
  declare function parse(iterator: string, opt?: ParserOptions): Promise<ParseResult>;
709
1054
  declare function transform(css: string, options?: TransformOptions): Promise<TransformResult>;
710
1055
 
711
- export { colorsFunc, combinators, dirname, expand, funcList, getConfig, hasDeclaration, isAngle, isAtKeyword, isColor, isDigit, isDimension, isFrequency, isFunction, isHash, isHexColor, isIdent, isIdentCodepoint, isIdentStart, isLength, isNewLine, isNonPrintable, isNumber, isPercentage, isPseudo, isResolution, isTime, isWhiteSpace, load, matchType, matchUrl, minify, minifyRule, parse, parseDimension, parseString, reduceSelector, render, renderToken, replaceCompound, resolve, splitRule, tokenize, transform, urlTokenMatcher, walk, walkValues };
1056
+ export { EnumToken$1 as EnumToken, NodeType, colorsFunc, combinators, dirname, doParse, doRender, expand, funcList, getConfig, hasDeclaration, isAngle, isAtKeyword, isColor, isDigit, isDimension, isFrequency, isFunction, isHash, isHexColor, isIdent, isIdentCodepoint, isIdentStart, isLength, isNewLine, isNonPrintable, isNumber, isPercentage, isPseudo, isResolution, isTime, isWhiteSpace, load, matchType, matchUrl, minify, parse, parseDimension, parseString, parseTokens, reduceNumber, reduceSelector, render, renderToken, replaceCompound, resolve, splitRule, tokenize, transform, urlTokenMatcher, walk, walkValues };