@tbela99/css-parser 1.4.1 → 1.4.3

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.
Files changed (216) hide show
  1. package/.nyc_output/4874b20e-6f53-4d7a-be5a-cf68316925f2.json +1 -0
  2. package/.nyc_output/6193bc4c-6f5f-4898-8950-c628825e6342.json +1 -0
  3. package/.nyc_output/processinfo/4874b20e-6f53-4d7a-be5a-cf68316925f2.json +1 -0
  4. package/.nyc_output/processinfo/6193bc4c-6f5f-4898-8950-c628825e6342.json +1 -0
  5. package/.repl_history +4 -0
  6. package/CHANGELOG.md +168 -4
  7. package/README.md +82 -0
  8. package/badges/coverage.svg +20 -0
  9. package/deno.lock +2861 -0
  10. package/dist/config.json.js +33 -1
  11. package/dist/index-umd-web.js +24393 -18479
  12. package/dist/index.cjs +27430 -21519
  13. package/dist/index.d.ts +1403 -933
  14. package/dist/lib/ast/clone.d.ts +10 -0
  15. package/dist/lib/ast/clone.js +45 -0
  16. package/dist/lib/ast/expand.d.ts +14 -0
  17. package/dist/lib/ast/expand.js +89 -64
  18. package/dist/lib/ast/features/calc.d.ts +10 -0
  19. package/dist/lib/ast/features/calc.js +62 -24
  20. package/dist/lib/ast/features/if.d.ts +10 -0
  21. package/dist/lib/ast/features/if.js +215 -0
  22. package/dist/lib/ast/features/index.d.ts +6 -0
  23. package/dist/lib/ast/features/index.js +1 -0
  24. package/dist/lib/ast/features/inlinecssvariables.d.ts +15 -0
  25. package/dist/lib/ast/features/inlinecssvariables.js +32 -27
  26. package/dist/lib/ast/features/prefix.d.ts +8 -0
  27. package/dist/lib/ast/features/prefix.js +68 -43
  28. package/dist/lib/ast/features/shorthand.d.ts +12 -0
  29. package/dist/lib/ast/features/shorthand.js +6 -9
  30. package/dist/lib/ast/features/transform.d.ts +10 -0
  31. package/dist/lib/ast/features/transform.js +9 -13
  32. package/dist/lib/ast/features/type.d.ts +15 -0
  33. package/dist/lib/ast/find.d.ts +165 -0
  34. package/dist/lib/ast/find.js +175 -0
  35. package/dist/lib/ast/math/expression.d.ts +18 -0
  36. package/dist/lib/ast/math/expression.js +140 -98
  37. package/dist/lib/ast/math/math.d.ts +6 -0
  38. package/dist/lib/ast/math/math.js +30 -41
  39. package/dist/lib/ast/minify.d.ts +19 -0
  40. package/dist/lib/ast/minify.js +543 -215
  41. package/dist/lib/ast/transform/compute.d.ts +8 -0
  42. package/dist/lib/ast/transform/compute.js +82 -69
  43. package/dist/lib/ast/transform/matrix.d.ts +22 -0
  44. package/dist/lib/ast/transform/matrix.js +12 -26
  45. package/dist/lib/ast/transform/minify.d.ts +5 -0
  46. package/dist/lib/ast/transform/minify.js +20 -20
  47. package/dist/lib/ast/transform/perspective.d.ts +3 -0
  48. package/dist/lib/ast/transform/perspective.js +1 -1
  49. package/dist/lib/ast/transform/rotate.d.ts +12 -0
  50. package/dist/lib/ast/transform/rotate.js +1 -1
  51. package/dist/lib/ast/transform/scale.d.ts +6 -0
  52. package/dist/lib/ast/transform/scale.js +1 -1
  53. package/dist/lib/ast/transform/skew.d.ts +4 -0
  54. package/dist/lib/ast/transform/skew.js +1 -1
  55. package/dist/lib/ast/transform/translate.d.ts +6 -0
  56. package/dist/lib/ast/transform/translate.js +1 -1
  57. package/dist/lib/ast/transform/utils.d.ts +9 -0
  58. package/dist/lib/ast/types.d.ts +903 -0
  59. package/dist/lib/ast/types.js +277 -23
  60. package/dist/lib/ast/walk.d.ts +162 -0
  61. package/dist/lib/ast/walk.js +116 -60
  62. package/dist/lib/fs/resolve.d.ts +20 -0
  63. package/dist/lib/fs/resolve.js +37 -45
  64. package/dist/lib/parser/declaration/list.d.ts +16 -0
  65. package/dist/lib/parser/declaration/list.js +26 -24
  66. package/dist/lib/parser/declaration/map.d.ts +15 -0
  67. package/dist/lib/parser/declaration/map.js +140 -95
  68. package/dist/lib/parser/declaration/set.d.ts +9 -0
  69. package/dist/lib/parser/declaration/set.js +30 -25
  70. package/dist/lib/parser/node.d.ts +7 -0
  71. package/dist/lib/parser/parse.d.ts +107 -0
  72. package/dist/lib/parser/parse.js +1454 -1445
  73. package/dist/lib/parser/tokenize.d.ts +57 -0
  74. package/dist/lib/parser/tokenize.js +557 -404
  75. package/dist/lib/parser/utils/at-rule-container.d.ts +5 -0
  76. package/dist/lib/parser/utils/at-rule-container.js +486 -0
  77. package/dist/lib/parser/utils/at-rule-font-feature-values.d.ts +5 -0
  78. package/dist/lib/parser/utils/at-rule-font-feature-values.js +13 -0
  79. package/dist/lib/parser/utils/at-rule-generic.d.ts +5 -0
  80. package/dist/lib/parser/utils/at-rule-generic.js +118 -0
  81. package/dist/lib/parser/utils/at-rule-import.d.ts +5 -0
  82. package/dist/lib/parser/utils/at-rule-import.js +393 -0
  83. package/dist/lib/parser/utils/at-rule-media.d.ts +5 -0
  84. package/dist/lib/parser/utils/at-rule-media.js +603 -0
  85. package/dist/lib/parser/utils/at-rule-page.d.ts +5 -0
  86. package/dist/lib/parser/utils/at-rule-page.js +28 -0
  87. package/dist/lib/parser/utils/at-rule-support.d.ts +5 -0
  88. package/dist/lib/parser/utils/at-rule-support.js +366 -0
  89. package/dist/lib/parser/utils/at-rule-token.d.ts +1 -0
  90. package/dist/lib/parser/utils/at-rule-when-else.d.ts +5 -0
  91. package/dist/lib/parser/utils/at-rule-when-else.js +363 -0
  92. package/dist/lib/parser/utils/at-rule.d.ts +13 -0
  93. package/dist/lib/parser/utils/at-rule.js +37 -0
  94. package/dist/lib/parser/utils/cache.d.ts +6 -0
  95. package/dist/lib/parser/utils/cache.js +19 -0
  96. package/dist/lib/parser/utils/config.d.ts +2 -0
  97. package/dist/lib/parser/utils/config.js +1 -0
  98. package/dist/lib/parser/utils/declaration-list.d.ts +5 -0
  99. package/dist/lib/parser/utils/declaration.d.ts +18 -0
  100. package/dist/lib/parser/utils/declaration.js +569 -91
  101. package/dist/lib/parser/utils/eq.d.ts +1 -0
  102. package/dist/lib/parser/utils/hash.d.ts +21 -0
  103. package/dist/lib/parser/utils/hash.js +1 -1
  104. package/dist/lib/parser/utils/selector.d.ts +5 -0
  105. package/dist/lib/parser/utils/selector.js +476 -0
  106. package/dist/lib/parser/utils/text.d.ts +3 -0
  107. package/dist/lib/parser/utils/text.js +17 -1
  108. package/dist/lib/parser/utils/token.d.ts +14 -0
  109. package/dist/lib/parser/utils/token.js +102 -0
  110. package/dist/lib/parser/utils/type.d.ts +2 -0
  111. package/dist/lib/parser/utils/type.js +29 -18
  112. package/dist/lib/renderer/render.d.ts +28 -0
  113. package/dist/lib/renderer/render.js +421 -262
  114. package/dist/lib/renderer/sourcemap/lib/encode.d.ts +1 -0
  115. package/dist/lib/renderer/sourcemap/sourcemap.d.ts +26 -0
  116. package/dist/lib/renderer/sourcemap/sourcemap.js +17 -7
  117. package/dist/lib/syntax/color/a98rgb.d.ts +2 -0
  118. package/dist/lib/syntax/color/a98rgb.js +8 -12
  119. package/dist/lib/syntax/color/cmyk.d.ts +10 -0
  120. package/dist/lib/syntax/color/cmyk.js +23 -21
  121. package/dist/lib/syntax/color/color-mix.d.ts +2 -0
  122. package/dist/lib/syntax/color/color-mix.js +88 -77
  123. package/dist/lib/syntax/color/color.d.ts +42 -0
  124. package/dist/lib/syntax/color/color.js +65 -68
  125. package/dist/lib/syntax/color/hex.d.ts +16 -0
  126. package/dist/lib/syntax/color/hex.js +27 -31
  127. package/dist/lib/syntax/color/hsl.d.ts +20 -0
  128. package/dist/lib/syntax/color/hsl.js +5 -12
  129. package/dist/lib/syntax/color/hsv.d.ts +2 -0
  130. package/dist/lib/syntax/color/hwb.d.ts +21 -0
  131. package/dist/lib/syntax/color/hwb.js +8 -21
  132. package/dist/lib/syntax/color/lab.d.ts +25 -0
  133. package/dist/lib/syntax/color/lab.js +20 -21
  134. package/dist/lib/syntax/color/lch.d.ts +23 -0
  135. package/dist/lib/syntax/color/lch.js +13 -15
  136. package/dist/lib/syntax/color/oklab.d.ts +22 -0
  137. package/dist/lib/syntax/color/oklab.js +20 -39
  138. package/dist/lib/syntax/color/oklch.d.ts +20 -0
  139. package/dist/lib/syntax/color/oklch.js +14 -16
  140. package/dist/lib/syntax/color/p3.d.ts +6 -0
  141. package/dist/lib/syntax/color/p3.js +0 -8
  142. package/dist/lib/syntax/color/prophotorgb.d.ts +2 -0
  143. package/dist/lib/syntax/color/rec2020.d.ts +2 -0
  144. package/dist/lib/syntax/color/rec2020.js +9 -13
  145. package/dist/lib/syntax/color/relativecolor.d.ts +13 -0
  146. package/dist/lib/syntax/color/relativecolor.js +68 -41
  147. package/dist/lib/syntax/color/rgb.d.ts +20 -0
  148. package/dist/lib/syntax/color/rgb.js +14 -18
  149. package/dist/lib/syntax/color/srgb.d.ts +23 -0
  150. package/dist/lib/syntax/color/srgb.js +27 -26
  151. package/dist/lib/syntax/color/utils/components.d.ts +2 -0
  152. package/dist/lib/syntax/color/utils/components.js +30 -14
  153. package/dist/lib/syntax/color/utils/distance.d.ts +18 -0
  154. package/dist/lib/syntax/color/utils/distance.js +1 -8
  155. package/dist/lib/syntax/color/utils/matrix.d.ts +6 -0
  156. package/dist/lib/syntax/color/xyz.d.ts +5 -0
  157. package/dist/lib/syntax/color/xyz.js +8 -20
  158. package/dist/lib/syntax/color/xyzd50.d.ts +4 -0
  159. package/dist/lib/syntax/color/xyzd50.js +6 -20
  160. package/dist/lib/syntax/constants.d.ts +67 -0
  161. package/dist/lib/syntax/constants.js +436 -0
  162. package/dist/lib/syntax/syntax.d.ts +38 -0
  163. package/dist/lib/syntax/syntax.js +533 -568
  164. package/dist/lib/validation/config.d.ts +14 -0
  165. package/dist/lib/validation/config.js +72 -33
  166. package/dist/lib/validation/config.json.js +1159 -74
  167. package/dist/lib/validation/json.d.ts +2 -0
  168. package/dist/lib/validation/match.d.ts +38 -0
  169. package/dist/lib/validation/match.js +2985 -0
  170. package/dist/lib/validation/parser/parse.d.ts +8 -0
  171. package/dist/lib/validation/parser/parse.js +684 -935
  172. package/dist/lib/validation/parser/typedef.d.ts +95 -0
  173. package/dist/lib/validation/parser/typedef.js +100 -0
  174. package/dist/lib/validation/utils/list.d.ts +4 -0
  175. package/dist/lib/validation/utils/list.js +4 -11
  176. package/dist/lib/validation/utils/whitespace.d.ts +2 -0
  177. package/dist/lib/validation/utils/whitespace.js +2 -8
  178. package/dist/node.d.ts +207 -0
  179. package/dist/node.js +53 -47
  180. package/dist/web.d.ts +169 -0
  181. package/dist/web.js +50 -41
  182. package/package.json +18 -13
  183. package/playground/index.html +1328 -0
  184. package/playground/sw.js +55 -0
  185. package/playground/tree.js +176 -0
  186. package/dist/lib/syntax/color/utils/constants.js +0 -214
  187. package/dist/lib/syntax/utils.js +0 -70
  188. package/dist/lib/validation/at-rules/container.js +0 -342
  189. package/dist/lib/validation/at-rules/counter-style.js +0 -90
  190. package/dist/lib/validation/at-rules/custom-media.js +0 -50
  191. package/dist/lib/validation/at-rules/document.js +0 -89
  192. package/dist/lib/validation/at-rules/else.js +0 -5
  193. package/dist/lib/validation/at-rules/font-feature-values.js +0 -63
  194. package/dist/lib/validation/at-rules/import.js +0 -150
  195. package/dist/lib/validation/at-rules/keyframes.js +0 -67
  196. package/dist/lib/validation/at-rules/layer.js +0 -41
  197. package/dist/lib/validation/at-rules/media.js +0 -255
  198. package/dist/lib/validation/at-rules/namespace.js +0 -81
  199. package/dist/lib/validation/at-rules/page-margin-box.js +0 -64
  200. package/dist/lib/validation/at-rules/page.js +0 -100
  201. package/dist/lib/validation/at-rules/supports.js +0 -295
  202. package/dist/lib/validation/at-rules/when.js +0 -185
  203. package/dist/lib/validation/atrule.js +0 -184
  204. package/dist/lib/validation/selector.js +0 -36
  205. package/dist/lib/validation/syntax.js +0 -1073
  206. package/dist/lib/validation/syntaxes/complex-selector-list.js +0 -27
  207. package/dist/lib/validation/syntaxes/complex-selector.js +0 -52
  208. package/dist/lib/validation/syntaxes/compound-selector.js +0 -196
  209. package/dist/lib/validation/syntaxes/family-name.js +0 -57
  210. package/dist/lib/validation/syntaxes/keyframe-selector.js +0 -36
  211. package/dist/lib/validation/syntaxes/layer-name.js +0 -57
  212. package/dist/lib/validation/syntaxes/relative-selector-list.js +0 -31
  213. package/dist/lib/validation/syntaxes/relative-selector.js +0 -38
  214. package/dist/lib/validation/syntaxes/selector-list.js +0 -5
  215. package/dist/lib/validation/syntaxes/selector.js +0 -5
  216. package/dist/lib/validation/syntaxes/url.js +0 -40
@@ -0,0 +1,903 @@
1
+ import type { LengthToken, NumberToken } from "../../@types";
2
+ /**
3
+ * syntax validation enum
4
+ */
5
+ export declare enum SyntaxValidationResult {
6
+ /** valid syntax */
7
+ Valid = 0,
8
+ /** drop invalid syntax */
9
+ Drop = 1,
10
+ /** preserve unknown at-rules, declarations and pseudo-classes */
11
+ Lenient = 2
12
+ }
13
+ /**
14
+ * enum of validation levels
15
+ */
16
+ export declare enum ValidationLevel {
17
+ /**
18
+ * disable validation
19
+ */
20
+ None = 0,
21
+ /**
22
+ * validate selectors
23
+ */
24
+ Selector = 1,
25
+ /**
26
+ * validate at-rules
27
+ */
28
+ AtRule = 2,
29
+ /**
30
+ * validate declarations
31
+ */
32
+ Declaration = 4,
33
+ /**
34
+ * validate selectors and at-rules
35
+ */
36
+ Default = 3,// selectors + at-rules
37
+ /**
38
+ * validate selectors, at-rules and declarations
39
+ */
40
+ All = 7
41
+ }
42
+ /**
43
+ * enum of all token types
44
+ */
45
+ export declare enum EnumToken {
46
+ /**
47
+ * comment token
48
+ */
49
+ CommentTokenType = 0,
50
+ /**
51
+ * cdata section token
52
+ */
53
+ CDOCOMMTokenType = 1,
54
+ /**
55
+ * style sheet node type
56
+ */
57
+ StyleSheetNodeType = 2,
58
+ /**
59
+ * at-rule node type
60
+ */
61
+ AtRuleNodeType = 3,
62
+ /**
63
+ * rule node type
64
+ */
65
+ RuleNodeType = 4,
66
+ /**
67
+ * declaration node type
68
+ */
69
+ DeclarationNodeType = 5,
70
+ /**
71
+ * literal token type
72
+ */
73
+ LiteralTokenType = 6,
74
+ /**
75
+ * identifier token type
76
+ */
77
+ IdenTokenType = 7,
78
+ /**
79
+ * dashed identifier token type
80
+ */
81
+ DashedIdenTokenType = 8,
82
+ /**
83
+ * comma token type
84
+ */
85
+ CommaTokenType = 9,
86
+ /**
87
+ * colon token type
88
+ */
89
+ ColonTokenType = 10,
90
+ /**
91
+ * semicolon token type
92
+ */
93
+ SemiColonTokenType = 11,
94
+ /**
95
+ * number token type
96
+ */
97
+ NumberTokenType = 12,
98
+ /**
99
+ * at-rule token type
100
+ */
101
+ AtRuleTokenType = 13,
102
+ /**
103
+ * percentage token type
104
+ */
105
+ PercentageTokenType = 14,
106
+ /**
107
+ * function token type
108
+ */
109
+ FunctionTokenType = 15,
110
+ /**
111
+ * timeline function token type
112
+ */
113
+ TimelineFunctionTokenType = 16,
114
+ /**
115
+ * timing function token type
116
+ */
117
+ TimingFunctionTokenType = 17,
118
+ /**
119
+ * url function token type
120
+ */
121
+ UrlFunctionTokenType = 18,
122
+ /**
123
+ * image function token type
124
+ */
125
+ ImageFunctionTokenType = 19,
126
+ /**
127
+ * string token type
128
+ */
129
+ StringTokenType = 20,
130
+ /**
131
+ * unclosed string token type
132
+ */
133
+ UnclosedStringTokenType = 21,
134
+ /**
135
+ * dimension token type
136
+ */
137
+ DimensionTokenType = 22,
138
+ /**
139
+ * length token type
140
+ */
141
+ LengthTokenType = 23,
142
+ /**
143
+ * angle token type
144
+ */
145
+ AngleTokenType = 24,
146
+ /**
147
+ * time token type
148
+ */
149
+ TimeTokenType = 25,
150
+ /**
151
+ * frequency token type
152
+ */
153
+ FrequencyTokenType = 26,
154
+ /**
155
+ * resolution token type
156
+ */
157
+ ResolutionTokenType = 27,
158
+ /**
159
+ * hash token type
160
+ */
161
+ HashTokenType = 28,
162
+ /**
163
+ * block start token type
164
+ */
165
+ BlockStartTokenType = 29,
166
+ /**
167
+ * block end token type
168
+ */
169
+ BlockEndTokenType = 30,
170
+ /**
171
+ * attribute start token type
172
+ */
173
+ AttrStartTokenType = 31,
174
+ /**
175
+ * attribute end token type
176
+ */
177
+ AttrEndTokenType = 32,
178
+ /**
179
+ * start parentheses token type
180
+ */
181
+ StartParensTokenType = 33,
182
+ /**
183
+ * end parentheses token type
184
+ */
185
+ EndParensTokenType = 34,
186
+ /**
187
+ * parentheses token type
188
+ */
189
+ ParensTokenType = 35,
190
+ /**
191
+ * whitespace token type
192
+ */
193
+ WhitespaceTokenType = 36,
194
+ /**
195
+ * include match token type
196
+ */
197
+ IncludeMatchTokenType = 37,
198
+ /**
199
+ * dash match token type
200
+ */
201
+ DashMatchTokenType = 38,
202
+ /**
203
+ * equal match token type
204
+ */
205
+ EqualMatchTokenType = 39,
206
+ /**
207
+ * less than token type
208
+ */
209
+ LtTokenType = 40,
210
+ /**
211
+ * less than or equal to token type
212
+ */
213
+ LteTokenType = 41,
214
+ /**
215
+ * greater than token type
216
+ */
217
+ GtTokenType = 42,
218
+ /**
219
+ * greater than or equal to token type
220
+ */
221
+ GteTokenType = 43,
222
+ /**
223
+ * pseudo-class token type
224
+ */
225
+ PseudoClassTokenType = 44,
226
+ /**
227
+ * pseudo-class function token type
228
+ */
229
+ PseudoClassFuncTokenType = 45,
230
+ /**
231
+ * delimiter token type
232
+ */
233
+ DelimTokenType = 46,
234
+ /**
235
+ * URL token type
236
+ */
237
+ UrlTokenTokenType = 47,
238
+ /**
239
+ * end of file token type
240
+ */
241
+ EOFTokenType = 48,
242
+ /**
243
+ * important token type
244
+ */
245
+ ImportantTokenType = 49,
246
+ /**
247
+ * color token type
248
+ */
249
+ ColorTokenType = 50,
250
+ /**
251
+ * attribute token type
252
+ */
253
+ AttrTokenType = 51,
254
+ /**
255
+ * bad comment token type
256
+ */
257
+ BadCommentTokenType = 52,
258
+ /**
259
+ * bad cdo token type
260
+ */
261
+ BadCdoTokenType = 53,
262
+ /**
263
+ * bad URL token type
264
+ */
265
+ BadUrlTokenType = 54,
266
+ /**
267
+ * bad string token type
268
+ */
269
+ BadStringTokenType = 55,
270
+ /**
271
+ * binary expression token type
272
+ */
273
+ BinaryExpressionTokenType = 56,
274
+ /**
275
+ * unary expression token type
276
+ */
277
+ UnaryExpressionTokenType = 57,
278
+ /**
279
+ * flex token type
280
+ */
281
+ FlexTokenType = 58,
282
+ /**
283
+ * token list token type
284
+ */
285
+ ListToken = 59,
286
+ /**
287
+ * addition token type
288
+ */
289
+ Add = 60,
290
+ /**
291
+ * multiplication token type
292
+ */
293
+ Mul = 61,
294
+ /**
295
+ * division token type
296
+ */
297
+ Div = 62,
298
+ /**
299
+ * subtraction token type
300
+ */
301
+ Sub = 63,
302
+ /**
303
+ * column combinator token type
304
+ */
305
+ ColumnCombinatorTokenType = 64,
306
+ /**
307
+ * contain match token type
308
+ */
309
+ ContainMatchTokenType = 65,
310
+ /**
311
+ * start match token type
312
+ */
313
+ StartMatchTokenType = 66,
314
+ /**
315
+ * end match token type
316
+ */
317
+ EndMatchTokenType = 67,
318
+ /**
319
+ * match expression token type
320
+ */
321
+ MatchExpressionTokenType = 68,
322
+ /**
323
+ * namespace attribute token type
324
+ */
325
+ NameSpaceAttributeTokenType = 69,
326
+ /**
327
+ * fraction token type
328
+ */
329
+ FractionTokenType = 70,
330
+ /**
331
+ * identifier list token type
332
+ */
333
+ IdenListTokenType = 71,
334
+ /**
335
+ * grid template function token type
336
+ */
337
+ GridTemplateFuncTokenType = 72,
338
+ /**
339
+ * keyframe rule node type
340
+ */
341
+ KeyFramesRuleNodeType = 73,
342
+ /**
343
+ * class selector token type
344
+ */
345
+ ClassSelectorTokenType = 74,
346
+ /**
347
+ * universal selector token type
348
+ */
349
+ UniversalSelectorTokenType = 75,
350
+ /**
351
+ * child combinator token type
352
+ */
353
+ ChildCombinatorTokenType = 76,// >
354
+ /**
355
+ * descendant combinator token type
356
+ */
357
+ DescendantCombinatorTokenType = 77,// whitespace
358
+ /**
359
+ * next sibling combinator token type
360
+ */
361
+ NextSiblingCombinatorTokenType = 78,// +
362
+ /**
363
+ * subsequent sibling combinator token type
364
+ */
365
+ SubsequentSiblingCombinatorTokenType = 79,// ~
366
+ /**
367
+ * nesting selector token type
368
+ */
369
+ NestingSelectorTokenType = 80,// &
370
+ /**
371
+ * invalid rule token type
372
+ */
373
+ InvalidRuleNodeType = 81,
374
+ /**
375
+ * invalid class selector token type
376
+ */
377
+ InvalidClassSelectorTokenType = 82,
378
+ /**
379
+ * invalid attribute token type
380
+ */
381
+ InvalidAttrTokenType = 83,
382
+ /**
383
+ * invalid at rule token type
384
+ */
385
+ InvalidAtRuleNodeType = 84,
386
+ /**
387
+ * media query condition token type
388
+ */
389
+ MediaQueryConditionTokenType = 85,
390
+ /**
391
+ * media feature token type
392
+ */
393
+ MediaFeatureTokenType = 86,
394
+ /**
395
+ * media feature only token type
396
+ */
397
+ OnlyTokenType = 87,
398
+ /**
399
+ * media feature not token type
400
+ */
401
+ NotTokenType = 88,
402
+ /**
403
+ * media feature and token type
404
+ */
405
+ AndTokenType = 89,
406
+ /**
407
+ * media feature or token type
408
+ */
409
+ OrTokenType = 90,
410
+ /**
411
+ * pseudo page token type
412
+ */
413
+ PseudoPageTokenType = 91,
414
+ /**
415
+ * pseudo element token type
416
+ */
417
+ PseudoElementTokenType = 92,
418
+ /**
419
+ * keyframe at rule node type
420
+ */
421
+ KeyframesAtRuleNodeType = 93,
422
+ /**
423
+ * invalid declaration node type
424
+ */
425
+ InvalidDeclarationNodeType = 94,
426
+ /**
427
+ * composes token node type
428
+ */
429
+ ComposesSelectorNodeType = 95,
430
+ /**
431
+ * css variable token type
432
+ */
433
+ CssVariableTokenType = 96,
434
+ /**
435
+ * css variable import token type
436
+ */
437
+ CssVariableImportTokenType = 97,
438
+ /**
439
+ * css variable declaration map token type
440
+ */
441
+ CssVariableDeclarationMapTokenType = 98,
442
+ /**
443
+ * media range query token type
444
+ */
445
+ MediaRangeQueryTokenType = 99,
446
+ /**
447
+ * invalid media query token type
448
+ */
449
+ InvalidMediaQueryTokenType = 100,
450
+ /**
451
+ * supports query condition token type
452
+ */
453
+ SupportsQueryConditionTokenType = 101,
454
+ /**
455
+ * supports query unary condition token type
456
+ */
457
+ SupportsQueryUnaryConditionTokenType = 102,
458
+ /**
459
+ * when else query condition token type
460
+ */
461
+ WhenElseQueryConditionTokenType = 103,
462
+ /**
463
+ * when else query unary condition token type
464
+ */
465
+ WhenElseUnaryConditionTokenType = 104,
466
+ /**
467
+ * container style range token type
468
+ */
469
+ ContainerStyleRangeTokenType = 105,
470
+ /**
471
+ * '*'
472
+ */
473
+ Star = 106,
474
+ /**
475
+ * '+'
476
+ */
477
+ Plus = 107,
478
+ /**
479
+ * '~'
480
+ */
481
+ Tilda = 108,
482
+ /**
483
+ * '|'
484
+ */
485
+ Pipe = 109,
486
+ /**
487
+ * '::'
488
+ */
489
+ DoubleColonTokenType = 110,
490
+ /**
491
+ * math function token type such as'calc(' etc.
492
+ */
493
+ MathFunctionTokenType = 111,
494
+ /**
495
+ * transform function token type such as 'translate(' etc.
496
+ */
497
+ TransformFunctionTokenType = 112,
498
+ /**
499
+ * when function token type such as 'supports(' etc.
500
+ */
501
+ WhenElseFunctionTokenType = 113,
502
+ /**
503
+ * general enclosed function token type 'font-tech(' etc.
504
+ */
505
+ GeneralEnclosedFunctionTokenType = 114,
506
+ /**
507
+ * supports function token type such as 'at-rule('
508
+ */
509
+ SupportsFunctionTokenType = 115,
510
+ /**
511
+ * container function token type such as 'style(' or 'scroll-state('
512
+ */
513
+ ContainerFunctionTokenType = 116,
514
+ /**
515
+ * unrecognized node token type
516
+ */
517
+ RawNodeTokenType = 117,
518
+ /**
519
+ * media query boolean token type
520
+ * @media not ()
521
+ * @media only ()
522
+ */
523
+ MediaQueryUnaryFeatureTokenType = 118,
524
+ /**
525
+ * grid template function token type such as 'minmax('
526
+ */
527
+ GridTemplateFuncTokenDefType = 119,
528
+ /**
529
+ * image function token type such as 'image(' etc.
530
+ */
531
+ ImageFunctionTokenDefType = 120,
532
+ /**
533
+ * function token type such as 'view(' etc.
534
+ */
535
+ TimelineFunctionTokenDefType = 121,
536
+ /**
537
+ * function token type
538
+ */
539
+ FunctionTokenDefType = 122,
540
+ /**
541
+ * timing function token type such as 'linear(' etc.
542
+ */
543
+ TimingFunctionTokenDefType = 123,
544
+ /**
545
+ * color function token type such as 'rgb(' etc.
546
+ */
547
+ ColorFunctionTokenDefType = 124,
548
+ /**
549
+ * math function token type such as 'calc(' etc.
550
+ */
551
+ MathFunctionTokenDefType = 125,
552
+ /**
553
+ * container function token type such as 'style(' or 'scroll-state('
554
+ */
555
+ ContainerFunctionTokenDefType = 126,
556
+ /**
557
+ * url function token type 'url('
558
+ */
559
+ UrlFunctionTokenDefType = 127,
560
+ /**
561
+ * pseudo-class function token type
562
+ */
563
+ PseudoClassFunctionTokenDefType = 128,
564
+ /**
565
+ * transform function token type such as 'translate(' etc.
566
+ */
567
+ TransformFunctionTokenDefType = 129,
568
+ /**
569
+ * when function token type such as 'supports(' or 'media('
570
+ */
571
+ WhenElseFunctionTokenDefType = 130,
572
+ /**
573
+ * general enclosed function token type 'font-tech(' etc.
574
+ */
575
+ GeneralEnclosedFunctionTokenDefType = 131,
576
+ /**
577
+ * supports function token type 'font-tech('
578
+ */
579
+ SupportsFunctionTokenDefType = 132,
580
+ /**
581
+ * CDOCOMMTokenType not allowed in this context
582
+ */
583
+ InvalidCommentTokenType = 133,
584
+ /**
585
+ * custom function token type '--function-name('
586
+ */
587
+ CustomFunctionTokenDefType = 134,
588
+ /**
589
+ * custom function token type
590
+ */
591
+ CustomFunctionTokenType = 135,
592
+ /**
593
+ * function tokens such as 'var(', 'env(', 'if(')
594
+ */
595
+ WildCardFunctionTokenDefType = 136,
596
+ /**
597
+ * function such as 'var()', 'env()', 'if()'
598
+ */
599
+ WildCardFunctionTokenType = 137,
600
+ /**
601
+ * if condition token
602
+ */
603
+ IfConditionTokenType = 138,
604
+ /**
605
+ * if-Else condition token
606
+ */
607
+ IfElseConditionTokenType = 139,
608
+ /**
609
+ * alias for time token type
610
+ */
611
+ Time = 25,
612
+ /**
613
+ * alias for identifier token type
614
+ */
615
+ Iden = 7,
616
+ /**
617
+ * alias for end of file token type
618
+ */
619
+ EOF = 48,
620
+ /**
621
+ * alias for hash token type
622
+ */
623
+ Hash = 28,
624
+ /**
625
+ * alias for flex token type
626
+ */
627
+ Flex = 58,
628
+ /**
629
+ * alias for angle token type
630
+ */
631
+ Angle = 24,
632
+ /**
633
+ * alias for color token type
634
+ */
635
+ Color = 50,
636
+ /**
637
+ * alias for comma token type
638
+ */
639
+ Comma = 9,
640
+ /**
641
+ * alias for string token type
642
+ */
643
+ String = 20,
644
+ /**
645
+ * alias for length token type
646
+ */
647
+ Length = 23,
648
+ /**
649
+ * alias for number token type
650
+ */
651
+ Number = 12,
652
+ /**
653
+ * alias for percentage token type
654
+ */
655
+ Perc = 14,
656
+ /**
657
+ * alias for literal token type
658
+ */
659
+ Literal = 6,
660
+ /**
661
+ * alias for comment token type
662
+ */
663
+ Comment = 0,
664
+ /**
665
+ * alias for url function token type
666
+ */
667
+ UrlFunc = 18,
668
+ /**
669
+ * alias for dimension token type
670
+ */
671
+ Dimension = 22,
672
+ /**
673
+ * alias for frequency token type
674
+ */
675
+ Frequency = 26,
676
+ /**
677
+ * alias for resolution token type
678
+ */
679
+ Resolution = 27,
680
+ /**
681
+ * alias for whitespace token type
682
+ */
683
+ Whitespace = 36,
684
+ /**
685
+ * alias for identifier list token type
686
+ */
687
+ IdenList = 71,
688
+ /**
689
+ * alias for dashed identifier token type
690
+ */
691
+ DashedIden = 8,
692
+ /**
693
+ * alias for grid template function token type
694
+ */
695
+ GridTemplateFunc = 72,
696
+ /**
697
+ * alias for image function token type
698
+ */
699
+ ImageFunc = 19,
700
+ /**
701
+ * alias for comment node type
702
+ */
703
+ CommentNodeType = 0,
704
+ /**
705
+ * alias for cdata section node type
706
+ */
707
+ CDOCOMMNodeType = 1,
708
+ /**
709
+ * alias for timing function token type
710
+ */
711
+ TimingFunction = 17,
712
+ /**
713
+ * alias for timeline function token type
714
+ */
715
+ TimelineFunction = 16
716
+ }
717
+ /**
718
+ * supported color types enum
719
+ */
720
+ export declare enum ColorType {
721
+ /**
722
+ * deprecated system colors
723
+ */
724
+ SYS = 0,
725
+ /**
726
+ * deprecated system colors
727
+ */
728
+ DPSYS = 1,
729
+ /**
730
+ * named colors
731
+ */
732
+ LIT = 2,
733
+ /**
734
+ * colors as hex values
735
+ */
736
+ HEX = 3,
737
+ /**
738
+ * colors as rgb values
739
+ */
740
+ RGBA = 4,
741
+ /**
742
+ * colors using rgb
743
+ */
744
+ HSLA = 5,
745
+ /**
746
+ * colors using hwb
747
+ */
748
+ HWB = 6,
749
+ /**
750
+ * colors using cmyk
751
+ */
752
+ CMYK = 7,
753
+ /**
754
+ * colors using oklab
755
+ * */
756
+ OKLAB = 8,
757
+ /**
758
+ * colors using oklch
759
+ * */
760
+ OKLCH = 9,
761
+ /**
762
+ * colors using lab
763
+ */
764
+ LAB = 10,
765
+ /**
766
+ * colors using lch
767
+ */
768
+ LCH = 11,
769
+ /**
770
+ * colors using color() function
771
+ */
772
+ COLOR = 12,
773
+ /**
774
+ * color using srgb
775
+ */
776
+ SRGB = 13,
777
+ /**
778
+ * color using prophoto-rgb
779
+ */
780
+ PROPHOTO_RGB = 14,
781
+ /**
782
+ * color using a98-rgb
783
+ */
784
+ A98_RGB = 15,
785
+ /**
786
+ * color using rec2020
787
+ */
788
+ REC2020 = 16,
789
+ /**
790
+ * color using display-p3
791
+ */
792
+ DISPLAY_P3 = 17,
793
+ /**
794
+ * color using srgb-linear
795
+ */
796
+ SRGB_LINEAR = 18,
797
+ /**
798
+ * color using xyz-d50
799
+ */
800
+ XYZ_D50 = 19,
801
+ /**
802
+ * color using xyz-d65
803
+ */
804
+ XYZ_D65 = 20,
805
+ /**
806
+ * light-dark() color function
807
+ */
808
+ LIGHT_DARK = 21,
809
+ /**
810
+ * color-mix() color function
811
+ */
812
+ COLOR_MIX = 22,
813
+ /**
814
+ * non-standard color
815
+ */
816
+ NON_STD = 23,
817
+ /**
818
+ * custom color
819
+ */
820
+ CUSTOM_COLOR = 24,
821
+ /**
822
+ * alias for rgba
823
+ */
824
+ RGB = 4,
825
+ /**
826
+ * alias for hsl
827
+ */
828
+ HSL = 5,
829
+ /**
830
+ * alias for xyz-d65
831
+ */
832
+ XYZ = 20,
833
+ /**
834
+ * alias for cmyk
835
+ */
836
+ DEVICE_CMYK = 7
837
+ }
838
+ export declare enum ModuleCaseTransformEnum {
839
+ /**
840
+ * export class names as-is
841
+ */
842
+ IgnoreCase = 1,
843
+ /**
844
+ * transform mapping key name to camel case
845
+ */
846
+ CamelCase = 2,
847
+ /**
848
+ * transform class names and mapping key name to camel case
849
+ */
850
+ CamelCaseOnly = 4,
851
+ /**
852
+ * transform mapping key name to dash case
853
+ */
854
+ DashCase = 8,
855
+ /**
856
+ * transform class names and mapping key name to dash case
857
+ */
858
+ DashCaseOnly = 16
859
+ }
860
+ export declare enum ModuleScopeEnumOptions {
861
+ /**
862
+ * use the global scope
863
+ */
864
+ Global = 32,
865
+ /**
866
+ * use the local scope
867
+ */
868
+ Local = 64,
869
+ /**
870
+ * do not allow selector without an id or class
871
+ */
872
+ Pure = 128,
873
+ /**
874
+ * export using ICSS module format
875
+ */
876
+ ICSS = 256,
877
+ /**
878
+ * use the shortest name possible. pattern is ignored.
879
+ * it will produce names such as
880
+ *
881
+ * ```css
882
+ * .a {
883
+ * content: 'a';
884
+ * }
885
+ *
886
+ * .b {
887
+ * content: 'b';
888
+ * }
889
+ *
890
+ * .c {
891
+ * content: 'c';
892
+ * }
893
+ * ...
894
+ * ```
895
+ */
896
+ Shortest = 512
897
+ }
898
+ export declare function length2Px(value: LengthToken | NumberToken): number | null;
899
+ /**
900
+ * minify number
901
+ * @param val
902
+ */
903
+ export declare function minifyNumber(val: string | number): string;