@tbela99/css-parser 1.6.8 → 1.7.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/index-umd-web.js +221 -244
  3. package/dist/index.cjs +220 -243
  4. package/dist/index.d.ts +8 -1
  5. package/dist/package.json.js +2 -2
  6. package/dist/src/data/properties.json.js +1 -1
  7. package/dist/src/data/validation.json.js +8 -2
  8. package/dist/src/lib/ast/clone.js +1 -1
  9. package/dist/src/lib/ast/expand.js +1 -1
  10. package/dist/src/lib/ast/features/calc.js +1 -1
  11. package/dist/src/lib/ast/features/if.js +1 -1
  12. package/dist/src/lib/ast/features/index.js +1 -1
  13. package/dist/src/lib/ast/features/inlinecssvariables.js +1 -1
  14. package/dist/src/lib/ast/features/prefix.js +1 -1
  15. package/dist/src/lib/ast/features/shorthand.js +39 -22
  16. package/dist/src/lib/ast/features/transform.js +1 -1
  17. package/dist/src/lib/ast/features/type.js +1 -1
  18. package/dist/src/lib/ast/find.js +1 -1
  19. package/dist/src/lib/ast/math/expression.js +1 -1
  20. package/dist/src/lib/ast/math/math.js +1 -1
  21. package/dist/src/lib/ast/minify.js +31 -3
  22. package/dist/src/lib/ast/node.js +1 -1
  23. package/dist/src/lib/ast/transform/compute.js +1 -1
  24. package/dist/src/lib/ast/transform/matrix.js +1 -1
  25. package/dist/src/lib/ast/transform/minify.js +1 -1
  26. package/dist/src/lib/ast/transform/perspective.js +1 -1
  27. package/dist/src/lib/ast/transform/rotate.js +1 -1
  28. package/dist/src/lib/ast/transform/scale.js +1 -1
  29. package/dist/src/lib/ast/transform/skew.js +1 -1
  30. package/dist/src/lib/ast/transform/translate.js +1 -1
  31. package/dist/src/lib/ast/transform/utils.js +1 -1
  32. package/dist/src/lib/ast/types.js +1 -1
  33. package/dist/src/lib/ast/walk.js +1 -1
  34. package/dist/src/lib/fs/resolve.js +1 -1
  35. package/dist/src/lib/parser/declaration/list.js +11 -1
  36. package/dist/src/lib/parser/declaration/map.js +2 -2
  37. package/dist/src/lib/parser/declaration/set.js +1 -1
  38. package/dist/src/lib/parser/linesmap.js +1 -1
  39. package/dist/src/lib/parser/parse.js +9 -18
  40. package/dist/src/lib/parser/source.js +1 -1
  41. package/dist/src/lib/parser/tokenize.js +1 -1
  42. package/dist/src/lib/parser/utils/angle.js +1 -1
  43. package/dist/src/lib/parser/utils/at-rule-container.js +1 -1
  44. package/dist/src/lib/parser/utils/at-rule-font-feature-values.js +1 -1
  45. package/dist/src/lib/parser/utils/at-rule-generic.js +1 -1
  46. package/dist/src/lib/parser/utils/at-rule-import.js +1 -1
  47. package/dist/src/lib/parser/utils/at-rule-media.js +2 -2
  48. package/dist/src/lib/parser/utils/at-rule-support.js +2 -2
  49. package/dist/src/lib/parser/utils/at-rule-when-else.js +1 -1
  50. package/dist/src/lib/parser/utils/at-rule.js +1 -1
  51. package/dist/src/lib/parser/utils/base64.js +1 -1
  52. package/dist/src/lib/parser/utils/cache.js +1 -1
  53. package/dist/src/lib/parser/utils/config.js +1 -1
  54. package/dist/src/lib/parser/utils/declaration.js +1 -1
  55. package/dist/src/lib/parser/utils/eq.js +1 -1
  56. package/dist/src/lib/parser/utils/hash.js +1 -1
  57. package/dist/src/lib/parser/utils/selector.js +1 -1
  58. package/dist/src/lib/parser/utils/text.js +1 -1
  59. package/dist/src/lib/parser/utils/token.js +2 -1
  60. package/dist/src/lib/parser/utils/type.js +1 -1
  61. package/dist/src/lib/printer/render.js +2 -2
  62. package/dist/src/lib/printer/sourcemap/lib/codec.js +1 -1
  63. package/dist/src/lib/printer/sourcemap/sourcemap.js +1 -1
  64. package/dist/src/lib/syntax/color/a98rgb.js +1 -1
  65. package/dist/src/lib/syntax/color/alpha.js +1 -1
  66. package/dist/src/lib/syntax/color/cmyk.js +1 -1
  67. package/dist/src/lib/syntax/color/color-mix.js +1 -1
  68. package/dist/src/lib/syntax/color/color.js +1 -1
  69. package/dist/src/lib/syntax/color/hex.js +1 -1
  70. package/dist/src/lib/syntax/color/hsl.js +1 -1
  71. package/dist/src/lib/syntax/color/hwb.js +1 -1
  72. package/dist/src/lib/syntax/color/lab.js +1 -1
  73. package/dist/src/lib/syntax/color/lch.js +1 -1
  74. package/dist/src/lib/syntax/color/oklab.js +1 -1
  75. package/dist/src/lib/syntax/color/oklch.js +1 -1
  76. package/dist/src/lib/syntax/color/p3.js +1 -1
  77. package/dist/src/lib/syntax/color/prophotorgb.js +1 -1
  78. package/dist/src/lib/syntax/color/rec2020.js +1 -1
  79. package/dist/src/lib/syntax/color/relative-color.js +1 -1
  80. package/dist/src/lib/syntax/color/rgb.js +1 -1
  81. package/dist/src/lib/syntax/color/srgb.js +1 -1
  82. package/dist/src/lib/syntax/color/utils/color-type.js +1 -1
  83. package/dist/src/lib/syntax/color/utils/colorspace.js +1 -1
  84. package/dist/src/lib/syntax/color/utils/components.js +1 -1
  85. package/dist/src/lib/syntax/color/utils/distance.js +1 -1
  86. package/dist/src/lib/syntax/color/utils/make-color.js +1 -1
  87. package/dist/src/lib/syntax/color/utils/matrix.js +1 -1
  88. package/dist/src/lib/syntax/color/xyz.js +1 -1
  89. package/dist/src/lib/syntax/color/xyzd50.js +1 -1
  90. package/dist/src/lib/syntax/constants.js +1 -1
  91. package/dist/src/lib/syntax/syntax.js +1 -1
  92. package/dist/src/lib/validation/config.js +20 -3
  93. package/dist/src/lib/validation/match.js +98 -196
  94. package/dist/src/lib/validation/parser/parse.js +8 -3
  95. package/dist/src/lib/validation/parser/typedef.js +1 -1
  96. package/dist/src/lib/validation/utils/list.js +1 -1
  97. package/dist/src/node.js +2 -1
  98. package/dist/src/types.js +1 -1
  99. package/dist/src/utils/sync.js +1 -1
  100. package/dist/src/web.js +2 -1
  101. package/package.json +7 -6
  102. package/CONTRIBUTING.md +0 -119
package/CONTRIBUTING.md DELETED
@@ -1,119 +0,0 @@
1
- # Contributing
2
-
3
- Thanks for your interest in contributing to CSS Parser. This guide explains how to get the project running locally, update its generated configuration data, run the checks, and submit a change. It is intended to help new contributors get started and make contributions easier to review.
4
-
5
- ## Get the source
6
-
7
- 1. Fork the repository on GitHub.
8
- 2. Clone your fork and enter the project directory:
9
-
10
- ```sh
11
- git clone https://github.com/<your-user-name>/css-parser.git
12
- cd css-parser
13
- ```
14
-
15
- 3. Add the upstream repository and install the root project dependencies:
16
-
17
- ```sh
18
- git remote add upstream https://github.com/tbela99/css-parser.git
19
- npm install
20
- ```
21
-
22
- 4. Create a branch for your change:
23
-
24
- ```sh
25
- git switch -c descriptive-branch-name
26
- ```
27
-
28
- Use a current Node.js release compatible with the project dependencies.
29
-
30
- ## Update generated configuration
31
-
32
- The repository includes scripts for refreshing generated CSS property and syntax data. Run them from the project root:
33
-
34
- ```sh
35
- npm run config-update
36
- npm run syntax-update
37
- ```
38
-
39
- `config-update` regenerates `src/data/properties.json`. `syntax-update` regenerates `src/data/validation.json` from upstream CSS data and therefore requires an internet connection. Review the generated changes and include them when they are relevant to your contribution.
40
-
41
- ## Building
42
-
43
- Run the build command:
44
-
45
- ```sh
46
- npm run build
47
- ```
48
-
49
- Validate your changes before committing using deno:
50
-
51
- ```sh
52
- deno publish --dry-run
53
- ```
54
-
55
- ## Run tests
56
-
57
- Run the complete Node.js and browser test suites before submitting a change:
58
-
59
- ```sh
60
- npm test
61
- ```
62
-
63
- For a quicker, focused check, run either suite:
64
-
65
- ```sh
66
- npm run test:node
67
- npm run test:web
68
- ```
69
-
70
- The browser tests use Playwright with Chromium, Firefox, and WebKit. Install the required browsers if Playwright reports that they are missing.
71
-
72
- For debugging, run either suite:
73
-
74
- ```sh
75
- npm run debug:node
76
- npm run debug:web
77
- ```
78
- ## Check code coverage
79
-
80
- Generate Node.js coverage reports with:
81
-
82
- ```sh
83
- npm run test:cov
84
- ```
85
-
86
- The command prints a text summary and writes an HTML report under `coverage/`. Browser coverage can be collected separately with:
87
-
88
- ```sh
89
- npm run test:web-cov
90
- ```
91
-
92
- When changing behavior, add or update tests that exercise it and use the coverage reports to spot untested paths.
93
-
94
- ## Run the benchmark
95
-
96
- The benchmark has its own dependencies and must be run from the `benchmark/` directory:
97
-
98
- ```sh
99
- cd benchmark
100
- npm install
101
- npm run all
102
- ```
103
-
104
- This computes output sizes, runs the timing benchmarks, and generates `benchmark/results/benchmark.html`. Open that report to inspect the results. To run individual stages, use `npm run sizes`, `npm run bench`, or `npm run report` from `benchmark/`.
105
-
106
- ## Open a pull request
107
-
108
- 1. Review your changes and make sure no unrelated generated files or benchmark results are included.
109
- 2. Run the relevant tests; include coverage or benchmark results when they help explain the change.
110
- 3. Push your branch to your fork:
111
-
112
- ```sh
113
- git push -u origin descriptive-branch-name
114
- ```
115
-
116
- 4. Open a pull request on GitHub against `tbela99/css-parser`'s `master` branch.
117
- 5. In the pull request description, explain the problem and the proposed change, link any related issue, and list the checks you ran. Include before-and-after benchmark results for performance-related changes.
118
-
119
- Keep each pull request focused, and be ready to discuss or revise the change during review.