@tbela99/css-parser 1.4.5 → 1.4.7
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.
- package/CHANGELOG.md +23 -2
- package/README.md +2 -0
- package/dist/index-umd-web.js +6546 -6987
- package/dist/index.cjs +7784 -8223
- package/dist/index.d.ts +919 -51
- package/dist/lib/ast/clone.js +16 -23
- package/dist/lib/ast/expand.js +2 -2
- package/dist/lib/ast/features/if.js +88 -87
- package/dist/lib/ast/features/inlinecssvariables.js +2 -2
- package/dist/lib/ast/features/prefix.js +26 -22
- package/dist/lib/ast/features/transform.js +3 -3
- package/dist/lib/ast/find.js +17 -14
- package/dist/lib/ast/minify.js +97 -94
- package/dist/lib/ast/types.js +6 -2
- package/dist/lib/ast/walk.js +1 -1
- package/dist/lib/fs/resolve.js +46 -44
- package/dist/lib/parser/declaration/list.js +9 -10
- package/dist/lib/parser/declaration/map.js +13 -18
- package/dist/lib/parser/parse.js +331 -506
- package/dist/lib/parser/tokenize.js +39 -33
- package/dist/lib/parser/utils/at-rule-container.js +244 -247
- package/dist/lib/parser/utils/at-rule-generic.js +25 -25
- package/dist/lib/parser/utils/at-rule-import.js +194 -234
- package/dist/lib/parser/utils/at-rule-media.js +286 -286
- package/dist/lib/parser/utils/at-rule-support.js +279 -251
- package/dist/lib/parser/utils/at-rule-when-else.js +256 -259
- package/dist/lib/parser/utils/at-rule.js +19 -16
- package/dist/lib/parser/utils/cache.js +33 -5
- package/dist/lib/parser/utils/declaration.js +260 -322
- package/dist/lib/parser/utils/hash.js +15 -15
- package/dist/lib/parser/utils/selector.js +182 -222
- package/dist/lib/parser/utils/token.js +4 -7
- package/dist/lib/renderer/render.js +150 -120
- package/dist/lib/syntax/color/alpha.js +1 -4
- package/dist/lib/syntax/color/color.js +5 -5
- package/dist/lib/syntax/color/utils/colorspace.js +3 -3
- package/dist/lib/syntax/color/utils/components.js +21 -22
- package/dist/lib/syntax/color/utils/matrix.js +12 -11
- package/dist/lib/syntax/constants.js +22 -3
- package/dist/lib/syntax/syntax.js +252 -311
- package/dist/lib/validation/config.js +16 -17
- package/dist/lib/validation/match.js +1118 -1131
- package/dist/lib/validation/parser/parse.js +130 -286
- package/dist/node.js +16 -12
- package/dist/web.js +10 -8
- package/package.json +4 -4
- package/dist/lib/validation/utils/whitespace.js +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.4.7
|
|
4
|
+
|
|
5
|
+
### Improvements
|
|
6
|
+
|
|
7
|
+
- [x] Added support for parsing wrapped function arguments as defined in the CSS Values & Units Level 5 specification for component functions.
|
|
8
|
+
|
|
9
|
+
```css
|
|
10
|
+
font-family: random-item(--x,{Times,serif},{Arial,sans-serif},{Courier,monospace})
|
|
11
|
+
```
|
|
12
|
+
### Fixes
|
|
13
|
+
|
|
14
|
+
- [x] Fixed a performance regression, resulting in approximately ***25%*** performance gain.
|
|
15
|
+
- [x] Fixed a `conic-gradient()` minification bug.
|
|
16
|
+
- [x] Fixed missing characters by the streaming tokenizer
|
|
17
|
+
- [x] `walk()` with reverse parameter enabled was reversing the node's children
|
|
18
|
+
- [x] merging nodes could introduce a null reference
|
|
19
|
+
|
|
20
|
+
## v1.4.6
|
|
21
|
+
|
|
22
|
+
- [x] Fix if syntax expansion regression bug #134
|
|
23
|
+
|
|
3
24
|
## v1.4.5
|
|
4
25
|
|
|
5
|
-
- [x] Temporarily disable if syntax expansion
|
|
26
|
+
- [x] Temporarily disable if syntax expansion #131
|
|
6
27
|
|
|
7
28
|
## v1.4.4
|
|
8
29
|
|
|
9
30
|
### Validation changes
|
|
10
31
|
|
|
11
|
-
- [x] Added the `state` and `errors` properties to nodes to expose their validation status and any associated validation errors.
|
|
32
|
+
- [x] Added the `state` and `errors` properties to nodes to expose their validation status and any associated validation errors. #127
|
|
12
33
|
- [x] Nodes that fail validation are no longer discarded. Nodes are discarded only if they are invalid, unparsed, or malformed. Unknown nodes are discarded when lenient parsing is disabled.
|
|
13
34
|
|
|
14
35
|
### Color
|
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ $ deno add @tbela99/css-parser
|
|
|
44
44
|
## Syntax lowering
|
|
45
45
|
CSS-Parser can transform these modern CSS features into lower-level CSS syntax:
|
|
46
46
|
* **Nested CSS transpilation** to legacy-compatible syntax.
|
|
47
|
+
* **`if()` function transpilation** for broader browser compatibility.
|
|
47
48
|
* **`color-mix()` function conversion** convert new color-mix() syntax to any of the supported colors.
|
|
48
49
|
|
|
49
50
|
## Benchmark
|
|
@@ -80,6 +81,7 @@ Try it [online](https://tbela99.github.io/css-parser/playground/)
|
|
|
80
81
|
- [CSS Modules](https://tbela99.github.io/css-parser/docs/documents/Guide.CSS_Modules.html)
|
|
81
82
|
- [Minification](https://tbela99.github.io/css-parser/docs/documents/Guide.Minification.html)
|
|
82
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)
|
|
83
85
|
- [Ast Manipulation](https://tbela99.github.io/css-parser/docs/documents/Guide.Ast_Manipulation.html)
|
|
84
86
|
- [Utility Functions](https://tbela99.github.io/css-parser/docs/documents/Guide.Utility_Functions.html)
|
|
85
87
|
-
|