@tbela99/css-parser 1.4.6 → 1.4.8

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 (55) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +1 -0
  3. package/dist/index-umd-web.js +6578 -6969
  4. package/dist/index.cjs +7808 -8197
  5. package/dist/index.d.ts +923 -51
  6. package/dist/lib/ast/clone.js +16 -23
  7. package/dist/lib/ast/expand.js +2 -2
  8. package/dist/lib/ast/features/if.js +88 -87
  9. package/dist/lib/ast/features/inlinecssvariables.js +2 -2
  10. package/dist/lib/ast/features/prefix.js +26 -22
  11. package/dist/lib/ast/features/transform.js +3 -3
  12. package/dist/lib/ast/find.js +17 -14
  13. package/dist/lib/ast/minify.js +97 -94
  14. package/dist/lib/ast/types.js +10 -2
  15. package/dist/lib/ast/walk.js +1 -1
  16. package/dist/lib/fs/resolve.js +47 -45
  17. package/dist/lib/parser/arena.js +206 -0
  18. package/dist/lib/parser/declaration/list.js +9 -10
  19. package/dist/lib/parser/declaration/map.js +13 -18
  20. package/dist/lib/parser/linemap.js +62 -0
  21. package/dist/lib/parser/parse.js +331 -504
  22. package/dist/lib/parser/source.js +72 -0
  23. package/dist/lib/parser/tokenize.js +39 -33
  24. package/dist/lib/parser/utils/at-rule-container.js +244 -247
  25. package/dist/lib/parser/utils/at-rule-generic.js +25 -25
  26. package/dist/lib/parser/utils/at-rule-import.js +194 -234
  27. package/dist/lib/parser/utils/at-rule-media.js +284 -283
  28. package/dist/lib/parser/utils/at-rule-support.js +279 -251
  29. package/dist/lib/parser/utils/at-rule-when-else.js +256 -259
  30. package/dist/lib/parser/utils/at-rule.js +19 -16
  31. package/dist/lib/parser/utils/cache.js +33 -5
  32. package/dist/lib/parser/utils/declaration.js +260 -298
  33. package/dist/lib/parser/utils/hash.js +15 -15
  34. package/dist/lib/parser/utils/selector.js +182 -222
  35. package/dist/lib/parser/utils/token.js +4 -7
  36. package/dist/lib/renderer/render.js +152 -121
  37. package/dist/lib/syntax/color/alpha.js +1 -4
  38. package/dist/lib/syntax/color/color-mix.js +8 -1
  39. package/dist/lib/syntax/color/color.js +17 -9
  40. package/dist/lib/syntax/color/hex.js +1 -1
  41. package/dist/lib/syntax/color/p3.js +9 -1
  42. package/dist/lib/syntax/color/utils/colorspace.js +3 -3
  43. package/dist/lib/syntax/color/utils/components.js +21 -22
  44. package/dist/lib/syntax/color/utils/distance.js +6 -1
  45. package/dist/lib/syntax/color/utils/matrix.js +12 -11
  46. package/dist/lib/syntax/constants.js +25 -3
  47. package/dist/lib/syntax/syntax.js +240 -311
  48. package/dist/lib/validation/config.js +16 -17
  49. package/dist/lib/validation/match.js +1118 -1131
  50. package/dist/lib/validation/parser/parse.js +130 -286
  51. package/dist/node.js +18 -14
  52. package/dist/web.js +12 -10
  53. package/package.json +4 -4
  54. package/dist/lib/validation/utils/whitespace.js +0 -17
  55. /package/dist/lib/syntax/color/{relativecolor.js → relative-color.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## v1.4.8
4
+
5
+ ### Improvements
6
+
7
+ - [x] support display-p3-linear color space.
8
+
9
+ ## v1.4.7
10
+
11
+ ### Improvements
12
+
13
+ - [x] Added support for parsing wrapped function arguments as defined in the CSS Values & Units Level 5 specification for component functions.
14
+
15
+ ```css
16
+ font-family: random-item(--x,{Times,serif},{Arial,sans-serif},{Courier,monospace})
17
+ ```
18
+ ### Fixes
19
+
20
+ - [x] Fixed a performance regression, resulting in approximately ***25%*** performance gain.
21
+ - [x] Fixed a `conic-gradient()` minification bug.
22
+ - [x] Fixed missing characters by the streaming tokenizer
23
+ - [x] `walk()` with reverse parameter enabled was reversing the node's children
24
+ - [x] merging nodes could introduce a null reference
25
+
3
26
  ## v1.4.6
4
27
 
5
28
  - [x] Fix if syntax expansion regression bug #134
package/README.md CHANGED
@@ -81,6 +81,7 @@ Try it [online](https://tbela99.github.io/css-parser/playground/)
81
81
  - [CSS Modules](https://tbela99.github.io/css-parser/docs/documents/Guide.CSS_Modules.html)
82
82
  - [Minification](https://tbela99.github.io/css-parser/docs/documents/Guide.Minification.html)
83
83
  - [Custom Transform](https://tbela99.github.io/css-parser/docs/documents/Guide.Custom_Transform.html)
84
+ - [Syntax Lowering](https://tbela99.github.io/css-parser/docs/documents/Guide.Syntax_Lowering.html)
84
85
  - [Ast Manipulation](https://tbela99.github.io/css-parser/docs/documents/Guide.Ast_Manipulation.html)
85
86
  - [Utility Functions](https://tbela99.github.io/css-parser/docs/documents/Guide.Utility_Functions.html)
86
87
  -