@tbela99/css-parser 2.3.0 → 2.3.1
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 +5 -0
- package/README.md +24 -9
- package/dist/ast/arena-node.js +1 -1
- package/dist/ast/arena.js +1 -1
- package/dist/ast/cache.js +1 -1
- package/dist/ast/features/calc.js +1 -1
- package/dist/ast/features/if.js +1 -1
- package/dist/ast/features/index.js +1 -1
- package/dist/ast/features/inlinecssvariables.js +1 -1
- package/dist/ast/features/mixin.js +1 -1
- package/dist/ast/features/prefix.js +1 -1
- package/dist/ast/features/shorthand.js +1 -1
- package/dist/ast/features/transform.js +1 -1
- package/dist/ast/features/type.js +1 -1
- package/dist/ast/math/expression.js +1 -1
- package/dist/ast/math/math.js +1 -1
- package/dist/ast/minify.js +1 -1
- package/dist/ast/mixins/custom-function.js +1 -1
- package/dist/ast/mixins/utils.js +1 -1
- package/dist/ast/mixins/variables.js +1 -1
- package/dist/ast/strings.js +1 -1
- package/dist/ast/transform/compute.js +1 -1
- package/dist/ast/transform/matrix.js +1 -1
- package/dist/ast/transform/minify.js +1 -1
- package/dist/ast/transform/perspective.js +1 -1
- package/dist/ast/transform/rotate.js +1 -1
- package/dist/ast/transform/scale.js +1 -1
- package/dist/ast/transform/skew.js +1 -1
- package/dist/ast/transform/translate.js +1 -1
- package/dist/ast/transform/utils.js +1 -1
- package/dist/ast/types.js +1 -1
- package/dist/ast/walk.js +1 -1
- package/dist/data/properties.json.js +1 -1
- package/dist/data/validation.json.js +1 -1
- package/dist/fs/resolve.js +1 -1
- package/dist/index-umd-web.js +17 -4
- package/dist/index.d.ts +16 -3
- package/dist/node.js +1 -1
- package/dist/parser/declaration/list.js +1 -1
- package/dist/parser/declaration/map.js +1 -1
- package/dist/parser/declaration/set.js +1 -1
- package/dist/parser/input.js +1 -1
- package/dist/parser/linesmap.js +1 -1
- package/dist/parser/parse.js +1 -1
- package/dist/parser/source.js +1 -1
- package/dist/parser/tokenize.js +1 -1
- package/dist/parser/utils/angle.js +1 -1
- package/dist/parser/utils/at-rule-container.js +1 -1
- package/dist/parser/utils/at-rule-font-feature-values.js +1 -1
- package/dist/parser/utils/at-rule-generic.js +1 -1
- package/dist/parser/utils/at-rule-import.js +1 -1
- package/dist/parser/utils/at-rule-media.js +1 -1
- package/dist/parser/utils/at-rule-support.js +1 -1
- package/dist/parser/utils/at-rule-when-else.js +1 -1
- package/dist/parser/utils/at-rule.js +1 -1
- package/dist/parser/utils/base64.js +1 -1
- package/dist/parser/utils/cache.js +1 -1
- package/dist/parser/utils/canonical.js +1 -1
- package/dist/parser/utils/codes.js +1 -1
- package/dist/parser/utils/config.js +1 -1
- package/dist/parser/utils/declaration.js +1 -1
- package/dist/parser/utils/eq.js +1 -1
- package/dist/parser/utils/hash.js +1 -1
- package/dist/parser/utils/selector.js +1 -1
- package/dist/parser/utils/text.js +1 -1
- package/dist/parser/utils/token.js +1 -1
- package/dist/parser/utils/type.js +1 -1
- package/dist/printer/lib/codec.js +1 -1
- package/dist/printer/render.js +1 -1
- package/dist/printer/result.js +16 -3
- package/dist/printer/sourcemap.js +1 -1
- package/dist/printer/writer.js +1 -1
- package/dist/syntax/color/a98rgb.js +1 -1
- package/dist/syntax/color/alpha.js +1 -1
- package/dist/syntax/color/cmyk.js +1 -1
- package/dist/syntax/color/color-mix.js +1 -1
- package/dist/syntax/color/color.js +1 -1
- package/dist/syntax/color/hex.js +1 -1
- package/dist/syntax/color/hsl.js +1 -1
- package/dist/syntax/color/hwb.js +1 -1
- package/dist/syntax/color/lab.js +1 -1
- package/dist/syntax/color/lch.js +1 -1
- package/dist/syntax/color/oklab.js +1 -1
- package/dist/syntax/color/oklch.js +1 -1
- package/dist/syntax/color/p3.js +1 -1
- package/dist/syntax/color/prophotorgb.js +1 -1
- package/dist/syntax/color/rec2020.js +1 -1
- package/dist/syntax/color/relative-color.js +1 -1
- package/dist/syntax/color/rgb.js +1 -1
- package/dist/syntax/color/srgb.js +1 -1
- package/dist/syntax/color/utils/color-type.js +1 -1
- package/dist/syntax/color/utils/colorspace.js +1 -1
- package/dist/syntax/color/utils/components.js +1 -1
- package/dist/syntax/color/utils/distance.js +1 -1
- package/dist/syntax/color/utils/make-color.js +1 -1
- package/dist/syntax/color/utils/matrix.js +1 -1
- package/dist/syntax/color/xyz.js +1 -1
- package/dist/syntax/color/xyzd50.js +1 -1
- package/dist/syntax/constants.js +1 -1
- package/dist/syntax/syntax.js +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/sync.js +1 -1
- package/dist/validation/compiled/builtins.js +1 -1
- package/dist/validation/compiled/runtime.js +1 -1
- package/dist/validation/compiled/syntaxes.js +1 -1
- package/dist/validation/config.js +1 -1
- package/dist/validation/first.js +1 -1
- package/dist/validation/match.js +1 -1
- package/dist/validation/parser/parse.js +1 -1
- package/dist/validation/parser/typedef.js +1 -1
- package/dist/validation/utils/list.js +1 -1
- package/dist/version.js +2 -2
- package/dist/web.js +1 -1
- package/package.json +1 -1
package/dist/parser/utils/eq.js
CHANGED
package/dist/printer/render.js
CHANGED
package/dist/printer/result.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.
|
|
5
|
+
Version: 2.3.1
|
|
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
|
/**
|
|
@@ -84,7 +93,11 @@ class RenderResult {
|
|
|
84
93
|
return result.#codeLength >= 0 ? result.#codeLength : result.code.length;
|
|
85
94
|
}
|
|
86
95
|
/**
|
|
87
|
-
* Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read
|
|
96
|
+
* Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read, the
|
|
97
|
+
* string is kept for the next reads: no string is created when it is not read.
|
|
98
|
+
*
|
|
99
|
+
* It is a getter, not a property of the object: `postMessage()` and `structuredClone()` do not send it, and it is
|
|
100
|
+
* an empty string when it is read for the first time after {@link RenderResult.write} was transferred.
|
|
88
101
|
*/
|
|
89
102
|
get code() {
|
|
90
103
|
if (this.#code === null) {
|
package/dist/printer/writer.js
CHANGED
package/dist/syntax/color/hex.js
CHANGED
package/dist/syntax/color/hsl.js
CHANGED
package/dist/syntax/color/hwb.js
CHANGED
package/dist/syntax/color/lab.js
CHANGED
package/dist/syntax/color/lch.js
CHANGED
package/dist/syntax/color/p3.js
CHANGED
package/dist/syntax/color/rgb.js
CHANGED
package/dist/syntax/color/xyz.js
CHANGED
package/dist/syntax/constants.js
CHANGED
package/dist/syntax/syntax.js
CHANGED
package/dist/types.js
CHANGED
package/dist/utils/sync.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.
|
|
5
|
+
Version: 2.3.1
|
|
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';
|
package/dist/validation/first.js
CHANGED
package/dist/validation/match.js
CHANGED
package/dist/version.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
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.
|
|
5
|
+
Version: 2.3.1
|
|
6
6
|
License: MIT
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* Version number
|
|
10
10
|
*/
|
|
11
|
-
const version = "2.3.
|
|
11
|
+
const version = "2.3.1";
|
|
12
12
|
|
|
13
13
|
export { version };
|