@tbela99/css-parser 2.3.0 → 2.3.2

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 (115) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README.md +66 -21
  3. package/architecture.png +0 -0
  4. package/dist/ast/arena-node.js +32 -3
  5. package/dist/ast/arena.js +88 -10
  6. package/dist/ast/cache.js +1 -1
  7. package/dist/ast/features/calc.js +1 -1
  8. package/dist/ast/features/if.js +1 -1
  9. package/dist/ast/features/index.js +1 -1
  10. package/dist/ast/features/inlinecssvariables.js +1 -1
  11. package/dist/ast/features/mixin.js +1 -1
  12. package/dist/ast/features/prefix.js +1 -1
  13. package/dist/ast/features/shorthand.js +1 -1
  14. package/dist/ast/features/transform.js +1 -1
  15. package/dist/ast/features/type.js +1 -1
  16. package/dist/ast/math/expression.js +1 -1
  17. package/dist/ast/math/math.js +1 -1
  18. package/dist/ast/minify.js +131 -36
  19. package/dist/ast/mixins/custom-function.js +1 -1
  20. package/dist/ast/mixins/utils.js +1 -1
  21. package/dist/ast/mixins/variables.js +1 -1
  22. package/dist/ast/strings.js +26 -1
  23. package/dist/ast/transform/compute.js +6 -2
  24. package/dist/ast/transform/matrix.js +1 -1
  25. package/dist/ast/transform/minify.js +1 -1
  26. package/dist/ast/transform/perspective.js +1 -1
  27. package/dist/ast/transform/rotate.js +1 -1
  28. package/dist/ast/transform/scale.js +1 -1
  29. package/dist/ast/transform/skew.js +1 -1
  30. package/dist/ast/transform/translate.js +1 -1
  31. package/dist/ast/transform/utils.js +1 -1
  32. package/dist/ast/types.js +22 -2
  33. package/dist/ast/walk.js +1 -1
  34. package/dist/data/properties.json.js +1 -1
  35. package/dist/data/validation.json.js +1 -1
  36. package/dist/fs/resolve.js +1 -1
  37. package/dist/index-umd-web.js +1099 -295
  38. package/dist/index.d.ts +612 -688
  39. package/dist/node.js +14 -8
  40. package/dist/parser/declaration/list.js +8 -5
  41. package/dist/parser/declaration/map.js +1 -1
  42. package/dist/parser/declaration/set.js +1 -1
  43. package/dist/parser/input.js +62 -4
  44. package/dist/parser/linesmap.js +1 -1
  45. package/dist/parser/parse.js +121 -13
  46. package/dist/parser/source.js +1 -1
  47. package/dist/parser/tokenize.js +161 -19
  48. package/dist/parser/utils/angle.js +1 -1
  49. package/dist/parser/utils/at-rule-container.js +1 -1
  50. package/dist/parser/utils/at-rule-font-feature-values.js +1 -1
  51. package/dist/parser/utils/at-rule-generic.js +1 -1
  52. package/dist/parser/utils/at-rule-import.js +1 -1
  53. package/dist/parser/utils/at-rule-media.js +42 -2
  54. package/dist/parser/utils/at-rule-support.js +1 -1
  55. package/dist/parser/utils/at-rule-when-else.js +1 -1
  56. package/dist/parser/utils/at-rule.js +1 -1
  57. package/dist/parser/utils/base64.js +1 -1
  58. package/dist/parser/utils/cache.js +1 -1
  59. package/dist/parser/utils/canonical.js +1 -1
  60. package/dist/parser/utils/codes.js +1 -1
  61. package/dist/parser/utils/config.js +1 -1
  62. package/dist/parser/utils/declaration.js +1 -1
  63. package/dist/parser/utils/eq.js +1 -1
  64. package/dist/parser/utils/hash.js +1 -1
  65. package/dist/parser/utils/selector.js +98 -6
  66. package/dist/parser/utils/text.js +1 -1
  67. package/dist/parser/utils/token.js +1 -1
  68. package/dist/parser/utils/type.js +1 -1
  69. package/dist/printer/lib/codec.js +1 -1
  70. package/dist/printer/render.js +5 -7
  71. package/dist/printer/result.js +18 -3
  72. package/dist/printer/sourcemap.js +1 -1
  73. package/dist/printer/writer.js +1 -1
  74. package/dist/syntax/color/a98rgb.js +1 -1
  75. package/dist/syntax/color/alpha.js +1 -1
  76. package/dist/syntax/color/cmyk.js +1 -1
  77. package/dist/syntax/color/color-mix.js +1 -1
  78. package/dist/syntax/color/color.js +1 -1
  79. package/dist/syntax/color/hex.js +1 -1
  80. package/dist/syntax/color/hsl.js +12 -4
  81. package/dist/syntax/color/hwb.js +9 -3
  82. package/dist/syntax/color/lab.js +1 -1
  83. package/dist/syntax/color/lch.js +1 -1
  84. package/dist/syntax/color/oklab.js +1 -1
  85. package/dist/syntax/color/oklch.js +2 -2
  86. package/dist/syntax/color/p3.js +1 -1
  87. package/dist/syntax/color/prophotorgb.js +1 -1
  88. package/dist/syntax/color/rec2020.js +1 -1
  89. package/dist/syntax/color/relative-color.js +1 -1
  90. package/dist/syntax/color/rgb.js +1 -1
  91. package/dist/syntax/color/srgb.js +3 -2
  92. package/dist/syntax/color/utils/color-type.js +1 -1
  93. package/dist/syntax/color/utils/colorspace.js +1 -1
  94. package/dist/syntax/color/utils/components.js +1 -1
  95. package/dist/syntax/color/utils/distance.js +1 -1
  96. package/dist/syntax/color/utils/make-color.js +1 -1
  97. package/dist/syntax/color/utils/matrix.js +1 -1
  98. package/dist/syntax/color/xyz.js +1 -1
  99. package/dist/syntax/color/xyzd50.js +1 -1
  100. package/dist/syntax/constants.js +2 -2
  101. package/dist/syntax/syntax.js +1 -1
  102. package/dist/types.js +1 -1
  103. package/dist/utils/sync.js +1 -1
  104. package/dist/validation/compiled/builtins.js +1 -1
  105. package/dist/validation/compiled/runtime.js +1 -1
  106. package/dist/validation/compiled/syntaxes.js +1 -1
  107. package/dist/validation/config.js +1 -1
  108. package/dist/validation/first.js +1 -1
  109. package/dist/validation/match.js +77 -4
  110. package/dist/validation/parser/parse.js +1 -1
  111. package/dist/validation/parser/typedef.js +4 -1
  112. package/dist/validation/utils/list.js +1 -1
  113. package/dist/version.js +2 -2
  114. package/dist/web.js +13 -6
  115. package/package.json +15 -6
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { getAngle, convertColor } from '../syntax/color/color.js';
@@ -1734,7 +1734,8 @@ function renderToken(arena, token, options, cache, reducer, errors) {
1734
1734
  key === "0 0" ||
1735
1735
  key === "top left" ||
1736
1736
  key === "left top") {
1737
- positions.splice(0, positions.length, arena.createToken(EnumToken.PercentageTokenType, 0));
1737
+ // a single value is centered vertically: both values are kept
1738
+ positions.splice(0, positions.length, arena.createToken(EnumToken.PercentageTokenType, 0), arena.createToken(EnumToken.WhitespaceTokenType), arena.createToken(EnumToken.PercentageTokenType, 0));
1738
1739
  }
1739
1740
  else if (key === "50% 0%" ||
1740
1741
  key === "50% 0" ||
@@ -1758,7 +1759,7 @@ function renderToken(arena, token, options, cache, reducer, errors) {
1758
1759
  key === "0% 100%" ||
1759
1760
  key === "left bottom" ||
1760
1761
  key === "bottom left") {
1761
- positions.splice(0, positions.length, arena.createToken(EnumToken.IdenTokenType, "bottom"));
1762
+ positions.splice(0, positions.length, arena.createToken(EnumToken.PercentageTokenType, 0), arena.createToken(EnumToken.WhitespaceTokenType), arena.createToken(EnumToken.PercentageTokenType, 100));
1762
1763
  }
1763
1764
  else if (key === "50% 100%" ||
1764
1765
  key === "center bottom" ||
@@ -1768,10 +1769,7 @@ function renderToken(arena, token, options, cache, reducer, errors) {
1768
1769
  else if (key === "100% 100%" ||
1769
1770
  key === "right bottom" ||
1770
1771
  key === "bottom right") {
1771
- positions.splice(0, positions.length, arena.createToken(EnumToken.PercentageTokenType, 100));
1772
- }
1773
- else if (position1 === position2) {
1774
- positions.splice(0, positions.length, positions[k]);
1772
+ positions.splice(0, positions.length, arena.createToken(EnumToken.PercentageTokenType, 100), arena.createToken(EnumToken.WhitespaceTokenType), arena.createToken(EnumToken.PercentageTokenType, 100));
1775
1773
  }
1776
1774
  }
1777
1775
  }
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -37,7 +37,16 @@ class RenderResult {
37
37
  */
38
38
  static shape = new RenderResult(new Uint8Array(0), [], { total: "0ms" });
39
39
  /**
40
- * Rendered CSS, encoded as UTF-8
40
+ * Rendered CSS, encoded as UTF-8: the output of the render, no conversion. Use it to write the css to a file or to
41
+ * the network, or to send it to another thread without a copy:
42
+ *
43
+ * ```ts
44
+ * self.postMessage(result.write, [result.write.buffer]);
45
+ * ```
46
+ *
47
+ * It is a view of the first bytes of a larger buffer (`write.buffer`): without a transfer, `postMessage()` copies
48
+ * the whole buffer, send `write.slice()` to copy only the css. See
49
+ * [Zero copy between threads](../../files/usage.md#zero-copy-between-threads).
41
50
  */
42
51
  write;
43
52
  /**
@@ -61,6 +70,7 @@ class RenderResult {
61
70
  */
62
71
  #codeLength;
63
72
  /**
73
+ * create a render result
64
74
  * @param write rendered css, encoded as UTF-8
65
75
  * @param errors
66
76
  * @param stats
@@ -84,7 +94,11 @@ class RenderResult {
84
94
  return result.#codeLength >= 0 ? result.#codeLength : result.code.length;
85
95
  }
86
96
  /**
87
- * Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read
97
+ * Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read, the
98
+ * string is kept for the next reads: no string is created when it is not read.
99
+ *
100
+ * It is a getter, not a property of the object: `postMessage()` and `structuredClone()` do not send it, and it is
101
+ * an empty string when it is read for the first time after {@link RenderResult.write} was transferred.
88
102
  */
89
103
  get code() {
90
104
  if (this.#code === null) {
@@ -121,6 +135,7 @@ class TransformResult extends RenderResult {
121
135
  */
122
136
  arena;
123
137
  /**
138
+ * create a transform result from the parse result and the render result
124
139
  * @param parseResult
125
140
  * @param renderResult
126
141
  * @param stats
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { toBase64 } from '../parser/utils/base64.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { xyz2srgb } from './srgb.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { ColorType, EnumToken } from '../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, ColorType } from '../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, ColorType, EnumAstNodeStatus } from '../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { ColorType, EnumToken } from '../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, ColorType } from '../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { color2srgbvalues, getNumber } from './color.js';
@@ -93,6 +93,14 @@ function hslToken(arena, values) {
93
93
  }
94
94
  return arena.createColor("hsl", ColorType.HSL, chi);
95
95
  }
96
+ /**
97
+ * value of a red, green or blue component of an `rgb()` color, from 0 to 255: `100%` is 255
98
+ * @param arena
99
+ * @param token
100
+ */
101
+ function rgbChannel(arena, token) {
102
+ return (arena.dataTypes[token] === EnumToken.PercentageTokenType ? 255 : 1) * getNumber(arena, token);
103
+ }
96
104
  function rgb2hslvalues(arena, token) {
97
105
  const chi = getColorComponents(arena, token);
98
106
  if (chi == null || chi.length < 3) {
@@ -101,15 +109,15 @@ function rgb2hslvalues(arena, token) {
101
109
  // @ts-ignore
102
110
  let t = chi[0];
103
111
  // @ts-ignore
104
- let r = getNumber(arena, t);
112
+ let r = rgbChannel(arena, t);
105
113
  // @ts-ignore
106
114
  t = chi[1];
107
115
  // @ts-ignore
108
- let g = getNumber(arena, t);
116
+ let g = rgbChannel(arena, t);
109
117
  // @ts-ignore
110
118
  t = chi[2];
111
119
  // @ts-ignore
112
- let b = getNumber(arena, t);
120
+ let b = rgbChannel(arena, t);
113
121
  // @ts-ignore
114
122
  let a = null;
115
123
  if (chi.length === 4) {
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { getColorComponents } from './utils/components.js';
@@ -78,11 +78,17 @@ function hwbToken(arena, values) {
78
78
  return arena.createColor("hwb", ColorType.HWB, chi);
79
79
  }
80
80
  function rgb2hwbvalues(arena, token) {
81
- const values = getColorComponents(arena, token).map((t, index) => {
81
+ const components = getColorComponents(arena, token);
82
+ // the components cannot be computed: var(), ...
83
+ if (components == null) {
84
+ return null;
85
+ }
86
+ const values = components.map((t, index) => {
82
87
  if (index === 3) {
83
88
  return getNumber(arena, t);
84
89
  }
85
- return getNumber(arena, t) / 255;
90
+ // the components are from 0 to 255: 100% is 255
91
+ return ((arena.dataTypes[t] === EnumToken.PercentageTokenType ? 255 : 1) * getNumber(arena, t)) / 255;
86
92
  });
87
93
  // @ts-ignore
88
94
  return srgb2hwb(values[0], values[1], values[2], values[3]);
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { e, k, D50 } from '../constants.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { getColorComponents } from './utils/components.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { getColorComponents } from './utils/components.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { getColorComponents } from './utils/components.js';
@@ -100,7 +100,7 @@ function hsl2oklchvalues(arena, token) {
100
100
  }
101
101
  function hwb2oklchvalues(arena, token) {
102
102
  const values = hwb2oklabvalues(arena, token);
103
- return labvalues2lchvalues(values[0], values[1], values[2], values[3]);
103
+ return values == null ? null : labvalues2lchvalues(values[0], values[1], values[2], values[3]);
104
104
  }
105
105
  function cmyk2oklchvalues(arena, token) {
106
106
  const values = cmyk2srgbvalues(arena, token);
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { lsrgb2srgbvalues, xyz2srgb, srgb2lsrgbvalues } from './srgb.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { XYZ_D65_to_D50, xyzd502srgb } from './xyzd50.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { xyz2srgb } from './srgb.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { convertColor, getNumber } from './color.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { color2srgbvalues, minmax } from './color.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { getColorComponents } from './utils/components.js';
@@ -94,8 +94,9 @@ function xyz2srgb(x, y, z, alpha = null) {
94
94
  }
95
95
  function hwb2srgbvalues(arena, token) {
96
96
  const { h, w, b, a } = hwbvalues(arena, token) ?? {};
97
+ // the components cannot be computed: var(), ...
97
98
  if (h == null || w == null || b == null) {
98
- return [];
99
+ return null;
99
100
  }
100
101
  const rgb = hwb2srgb(h, w, b);
101
102
  if (a != null && a !== 1) {
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { ColorType } from '../../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { equalsIgnoreCase } from '../../../parser/utils/text.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { ColorType, EnumToken } from '../../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { convertColor } from '../color.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, ColorType } from '../../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  // from https://www.w3.org/TR/css-color-4/multiply-matrices.js
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { multiplyMatrices } from './utils/matrix.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { lsrgb2srgbvalues } from './srgb.js';
@@ -2,14 +2,14 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../ast/types.js';
9
9
  import config from '../data/validation.json.js';
10
10
 
11
11
  /**
12
- * Used by the validation parser
12
+ * key of the position of a validation token in the syntax, see {@link ValidationToken}
13
13
  */
14
14
  const LOC = Symbol.for("loc");
15
15
  /**
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { TokenField } from '../ast/arena.js';
package/dist/types.js CHANGED
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../../ast/types.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { interpreted, seq, kws, alt, leaf, kw, rep, list, unordered, fn, comma, occ, opt, rng, ref, slash, fndef, num, optGroup, closeParens, str, colon, openParens, optList, empty } from './runtime.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import config from '../data/validation.json.js';
@@ -2,7 +2,7 @@
2
2
  CSS parser, minifier and validator for node, deno, bun and the browser
3
3
 
4
4
  Author(s): Thierry Bela
5
- Version: 2.3.0
5
+ Version: 2.3.2
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../ast/types.js';