@tbela99/css-parser 1.4.8 → 1.4.9

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 (53) hide show
  1. package/CHANGELOG.md +28 -3
  2. package/dist/index-umd-web.js +12897 -13217
  3. package/dist/index.cjs +10394 -10716
  4. package/dist/index.d.ts +816 -89
  5. package/dist/lib/ast/features/calc.js +3 -1
  6. package/dist/lib/ast/features/if.js +2 -96
  7. package/dist/lib/ast/features/prefix.js +7 -2
  8. package/dist/lib/ast/features/shorthand.js +1 -1
  9. package/dist/lib/ast/features/transform.js +1 -1
  10. package/dist/lib/ast/find.js +6 -6
  11. package/dist/lib/ast/math/expression.js +30 -12
  12. package/dist/lib/ast/minify.js +34 -5
  13. package/dist/lib/ast/transform/perspective.js +1 -1
  14. package/dist/lib/ast/transform/utils.js +29 -21
  15. package/dist/lib/ast/types.js +8 -0
  16. package/dist/lib/fs/resolve.js +1 -16
  17. package/dist/lib/parser/declaration/list.js +6 -1
  18. package/dist/lib/parser/{linemap.js → linesmap.js} +25 -9
  19. package/dist/lib/parser/parse.js +1264 -151
  20. package/dist/lib/parser/source.js +48 -17
  21. package/dist/lib/parser/tokenize.js +112 -133
  22. package/dist/lib/parser/utils/at-rule-container.js +12 -44
  23. package/dist/lib/parser/utils/at-rule-generic.js +12 -24
  24. package/dist/lib/parser/utils/at-rule-import.js +4 -172
  25. package/dist/lib/parser/utils/at-rule-media.js +14 -251
  26. package/dist/lib/parser/utils/at-rule-support.js +8 -258
  27. package/dist/lib/parser/utils/at-rule-when-else.js +4 -214
  28. package/dist/lib/parser/utils/declaration.js +5 -95
  29. package/dist/lib/parser/utils/hash.js +54 -1
  30. package/dist/lib/parser/utils/selector.js +1 -1
  31. package/dist/lib/parser/utils/token.js +1 -0
  32. package/dist/lib/renderer/render.js +76 -43
  33. package/dist/lib/renderer/sourcemap/sourcemap.js +47 -43
  34. package/dist/lib/syntax/color/cmyk.js +3 -3
  35. package/dist/lib/syntax/color/color-mix.js +7 -7
  36. package/dist/lib/syntax/color/color.js +7 -7
  37. package/dist/lib/syntax/color/hsl.js +6 -6
  38. package/dist/lib/syntax/color/hwb.js +6 -6
  39. package/dist/lib/syntax/color/lab.js +5 -5
  40. package/dist/lib/syntax/color/lch.js +6 -6
  41. package/dist/lib/syntax/color/oklab.js +5 -5
  42. package/dist/lib/syntax/color/oklch.js +5 -5
  43. package/dist/lib/syntax/color/relative-color.js +8 -1
  44. package/dist/lib/syntax/color/utils/distance.js +2 -2
  45. package/dist/lib/syntax/constants.js +2 -1
  46. package/dist/lib/syntax/syntax.js +11 -8
  47. package/dist/lib/validation/config.json.js +27 -6
  48. package/dist/lib/validation/match.js +42 -845
  49. package/dist/node.js +134 -9
  50. package/dist/web.js +133 -6
  51. package/llms.txt +73 -0
  52. package/package.json +13 -16
  53. package/dist/lib/parser/arena.js +0 -206
package/CHANGELOG.md CHANGED
@@ -1,10 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ # v1.4.9
4
+
5
+ ## Improvements
6
+
7
+ ### Provide sync Api
8
+ - [x] Added parseSync() and transformSync() with the limitations below:
9
+
10
+ Unsupported parse features
11
+ - [x] flattened at-rule import files
12
+ - [x] using file loader as options.load() is forbidden
13
+ - [x] parse from stream
14
+ - [x] parse file as input parameter
15
+
16
+ Unsupported CSS modules features
17
+ - [x] pattern cannot use sha1, sha256 or sha512 algorithms
18
+ - [x] composes classes from file will throw an error
19
+ - [x] import css at-rule value from file will throw an error
20
+
21
+ ### Sourcemap
22
+ - [x] Embed CSS content into the sourcemap when the src file is not provided
23
+
24
+ ### Performance
25
+ - [x] Implement lazy token offsets calculation
26
+ - [x] Remove unnecessary values rounding
27
+
3
28
  ## v1.4.8
4
29
 
5
30
  ### Improvements
6
31
 
7
- - [x] support display-p3-linear color space.
32
+ - [x] Support display-p3-linear color space.
8
33
 
9
34
  ## v1.4.7
10
35
 
@@ -25,11 +50,11 @@
25
50
 
26
51
  ## v1.4.6
27
52
 
28
- - [x] Fix if syntax expansion regression bug #134
53
+ - [x] Fix if() syntax expansion regression bug #134
29
54
 
30
55
  ## v1.4.5
31
56
 
32
- - [x] Temporarily disable if syntax expansion #131
57
+ - [x] Temporarily disable if() syntax expansion #131
33
58
 
34
59
  ## v1.4.4
35
60