@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.
Files changed (114) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +24 -9
  3. package/dist/ast/arena-node.js +1 -1
  4. package/dist/ast/arena.js +1 -1
  5. package/dist/ast/cache.js +1 -1
  6. package/dist/ast/features/calc.js +1 -1
  7. package/dist/ast/features/if.js +1 -1
  8. package/dist/ast/features/index.js +1 -1
  9. package/dist/ast/features/inlinecssvariables.js +1 -1
  10. package/dist/ast/features/mixin.js +1 -1
  11. package/dist/ast/features/prefix.js +1 -1
  12. package/dist/ast/features/shorthand.js +1 -1
  13. package/dist/ast/features/transform.js +1 -1
  14. package/dist/ast/features/type.js +1 -1
  15. package/dist/ast/math/expression.js +1 -1
  16. package/dist/ast/math/math.js +1 -1
  17. package/dist/ast/minify.js +1 -1
  18. package/dist/ast/mixins/custom-function.js +1 -1
  19. package/dist/ast/mixins/utils.js +1 -1
  20. package/dist/ast/mixins/variables.js +1 -1
  21. package/dist/ast/strings.js +1 -1
  22. package/dist/ast/transform/compute.js +1 -1
  23. package/dist/ast/transform/matrix.js +1 -1
  24. package/dist/ast/transform/minify.js +1 -1
  25. package/dist/ast/transform/perspective.js +1 -1
  26. package/dist/ast/transform/rotate.js +1 -1
  27. package/dist/ast/transform/scale.js +1 -1
  28. package/dist/ast/transform/skew.js +1 -1
  29. package/dist/ast/transform/translate.js +1 -1
  30. package/dist/ast/transform/utils.js +1 -1
  31. package/dist/ast/types.js +1 -1
  32. package/dist/ast/walk.js +1 -1
  33. package/dist/data/properties.json.js +1 -1
  34. package/dist/data/validation.json.js +1 -1
  35. package/dist/fs/resolve.js +1 -1
  36. package/dist/index-umd-web.js +17 -4
  37. package/dist/index.d.ts +16 -3
  38. package/dist/node.js +1 -1
  39. package/dist/parser/declaration/list.js +1 -1
  40. package/dist/parser/declaration/map.js +1 -1
  41. package/dist/parser/declaration/set.js +1 -1
  42. package/dist/parser/input.js +1 -1
  43. package/dist/parser/linesmap.js +1 -1
  44. package/dist/parser/parse.js +1 -1
  45. package/dist/parser/source.js +1 -1
  46. package/dist/parser/tokenize.js +1 -1
  47. package/dist/parser/utils/angle.js +1 -1
  48. package/dist/parser/utils/at-rule-container.js +1 -1
  49. package/dist/parser/utils/at-rule-font-feature-values.js +1 -1
  50. package/dist/parser/utils/at-rule-generic.js +1 -1
  51. package/dist/parser/utils/at-rule-import.js +1 -1
  52. package/dist/parser/utils/at-rule-media.js +1 -1
  53. package/dist/parser/utils/at-rule-support.js +1 -1
  54. package/dist/parser/utils/at-rule-when-else.js +1 -1
  55. package/dist/parser/utils/at-rule.js +1 -1
  56. package/dist/parser/utils/base64.js +1 -1
  57. package/dist/parser/utils/cache.js +1 -1
  58. package/dist/parser/utils/canonical.js +1 -1
  59. package/dist/parser/utils/codes.js +1 -1
  60. package/dist/parser/utils/config.js +1 -1
  61. package/dist/parser/utils/declaration.js +1 -1
  62. package/dist/parser/utils/eq.js +1 -1
  63. package/dist/parser/utils/hash.js +1 -1
  64. package/dist/parser/utils/selector.js +1 -1
  65. package/dist/parser/utils/text.js +1 -1
  66. package/dist/parser/utils/token.js +1 -1
  67. package/dist/parser/utils/type.js +1 -1
  68. package/dist/printer/lib/codec.js +1 -1
  69. package/dist/printer/render.js +1 -1
  70. package/dist/printer/result.js +16 -3
  71. package/dist/printer/sourcemap.js +1 -1
  72. package/dist/printer/writer.js +1 -1
  73. package/dist/syntax/color/a98rgb.js +1 -1
  74. package/dist/syntax/color/alpha.js +1 -1
  75. package/dist/syntax/color/cmyk.js +1 -1
  76. package/dist/syntax/color/color-mix.js +1 -1
  77. package/dist/syntax/color/color.js +1 -1
  78. package/dist/syntax/color/hex.js +1 -1
  79. package/dist/syntax/color/hsl.js +1 -1
  80. package/dist/syntax/color/hwb.js +1 -1
  81. package/dist/syntax/color/lab.js +1 -1
  82. package/dist/syntax/color/lch.js +1 -1
  83. package/dist/syntax/color/oklab.js +1 -1
  84. package/dist/syntax/color/oklch.js +1 -1
  85. package/dist/syntax/color/p3.js +1 -1
  86. package/dist/syntax/color/prophotorgb.js +1 -1
  87. package/dist/syntax/color/rec2020.js +1 -1
  88. package/dist/syntax/color/relative-color.js +1 -1
  89. package/dist/syntax/color/rgb.js +1 -1
  90. package/dist/syntax/color/srgb.js +1 -1
  91. package/dist/syntax/color/utils/color-type.js +1 -1
  92. package/dist/syntax/color/utils/colorspace.js +1 -1
  93. package/dist/syntax/color/utils/components.js +1 -1
  94. package/dist/syntax/color/utils/distance.js +1 -1
  95. package/dist/syntax/color/utils/make-color.js +1 -1
  96. package/dist/syntax/color/utils/matrix.js +1 -1
  97. package/dist/syntax/color/xyz.js +1 -1
  98. package/dist/syntax/color/xyzd50.js +1 -1
  99. package/dist/syntax/constants.js +1 -1
  100. package/dist/syntax/syntax.js +1 -1
  101. package/dist/types.js +1 -1
  102. package/dist/utils/sync.js +1 -1
  103. package/dist/validation/compiled/builtins.js +1 -1
  104. package/dist/validation/compiled/runtime.js +1 -1
  105. package/dist/validation/compiled/syntaxes.js +1 -1
  106. package/dist/validation/config.js +1 -1
  107. package/dist/validation/first.js +1 -1
  108. package/dist/validation/match.js +1 -1
  109. package/dist/validation/parser/parse.js +1 -1
  110. package/dist/validation/parser/typedef.js +1 -1
  111. package/dist/validation/utils/list.js +1 -1
  112. package/dist/version.js +2 -2
  113. package/dist/web.js +1 -1
  114. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ # v2.3.1
4
+
5
+ - [x] fix deno install
6
+ - [x] document native and wasm builds
7
+
3
8
  # v2.3.0
4
9
 
5
10
  ## Performance
package/README.md CHANGED
@@ -57,7 +57,7 @@ $ deno add @tbela99/css-parser
57
57
  CSS-Parser can transform these modern CSS features into lower-level CSS syntax:
58
58
  * **Nested CSS transpilation** to legacy-compatible syntax.
59
59
  * **`if()` function transpilation** for broader browser compatibility.
60
- * **CSS mixins and custom functions evaluation** the `@apply` rules are replaced by the mixin body, the custom function calls are replaced by their result.
60
+ * **CSS mixins and custom functions evaluation** (experimental, enabled with `{evaluateMixins: true}`) the `@apply` rules are replaced by the mixin body, the custom function calls are replaced by their result, see [syntax lowering](https://tbela99.github.io/css-parser/docs/documents/Guide.Syntax_Lowering.html).
61
61
  * **`color-mix()` function conversion** convert new color-mix() syntax to any of the supported colors.
62
62
 
63
63
  ## Benchmark
@@ -111,14 +111,29 @@ console.debug(result.code);
111
111
  console.debug(result.stats);
112
112
  ```
113
113
 
114
- Performance vs execution speed comparison
115
-
116
-
117
- | File: tailwind.css | Speed optimization | Minification optimization |
118
- | --------------------- | ------------------ | ------------------------- |
119
- | Size: 2,380,419 bytes | 1,890,835 bytes | 1,633,188 bytes |
120
- | Time | 109.07 ms | 191.85 ms |
121
- | Size reduction | -20.7% | -31.8% |
114
+ Compared with lightningcss and esbuild: the 12 files of the [benchmark](https://tbela99.github.io/css-parser/benchmark/index.html)
115
+ (3.1 MB), total of the median times and of the output sizes (Apple M2, Node.js 27). "Fast settings" are the settings of
116
+ the example above, "default settings" are the defaults (full minification). The
117
+ [native](https://tbela99.github.io/css-parser/docs/documents/Guide.Native_build_%28N-API%29.html) and the
118
+ [WebAssembly](https://tbela99.github.io/css-parser/docs/documents/Guide.WebAssembly_build.html) builds produce the
119
+ same output as the TypeScript library, faster.
120
+
121
+ | Library | Time | Output | Output vs lightningcss |
122
+ |---------|-----:|-------:|-----------------------:|
123
+ | lightningcss | 59.6 ms | 2370 KB | |
124
+ | esbuild | 113.1 ms | 2487 KB | +4.9% |
125
+ | N-API, default settings | 136.7 ms | 2098 KB | **-11.5%** |
126
+ | WebAssembly, default settings | 166.3 ms | 2098 KB | **-11.5%** |
127
+ | TypeScript, default settings | 292.8 ms | 2098 KB | **-11.5%** |
128
+ | N-API, fast settings | 65.9 ms | 2404 KB | +1.4% |
129
+ | WebAssembly, fast settings | 94.1 ms | 2404 KB | +1.4% |
130
+ | TypeScript, fast settings | 176.7 ms | 2404 KB | +1.4% |
131
+
132
+ - With the default settings, the output is 11.5% smaller than lightningcss. Lightningcss is about 2.3 times faster
133
+ than the N-API build.
134
+ - With the fast settings, the N-API build is about as fast as lightningcss, with an output 1.4% larger.
135
+
136
+ See [Performance](https://tbela99.github.io/css-parser/docs/documents/Guide.Performance.html) for the details.
122
137
 
123
138
  ## Playground
124
139
 
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus, ColorType } from './types.js';
package/dist/ast/arena.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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus, ColorType } from './types.js';
package/dist/ast/cache.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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { TokenField, numericTokenTypes } from '../arena.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  export { ComputePrefixFeature } from './prefix.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumAstNodeStatus, EnumToken } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { DeclarationMemo, PropertyList } from '../../parser/declaration/list.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { numericTokenTypes, TokenField } from '../arena.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { minifyNumber } from '../../syntax/syntax.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { eq, eqToken } from '../parser/utils/eq.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, EnumAstNodeStatus } from '../types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { hashString, hashRange } from '../parser/utils/codes.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto, toZero } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { isIdentity, is2DMatrix } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto, decompose, round, toZeroValue, identityMatrix } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { setIdentity, multiplyInto } from './utils.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { epsilon } from '../../syntax/constants.js';
package/dist/ast/types.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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  /**
package/dist/ast/walk.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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { WalkerOptionEnum, EnumAstNodeStatus, WalkerEvent, EnumToken } from './types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  var properties = {
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  var atRules = {
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { memoize } from '../parser/utils/cache.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  (function (global, factory) {
@@ -22111,7 +22111,16 @@
22111
22111
  */
22112
22112
  static shape = new RenderResult(new Uint8Array(0), [], { total: "0ms" });
22113
22113
  /**
22114
- * Rendered CSS, encoded as UTF-8
22114
+ * Rendered CSS, encoded as UTF-8: the output of the render, no conversion. Use it to write the css to a file or to
22115
+ * the network, or to send it to another thread without a copy:
22116
+ *
22117
+ * ```ts
22118
+ * self.postMessage(result.write, [result.write.buffer]);
22119
+ * ```
22120
+ *
22121
+ * It is a view of the first bytes of a larger buffer (`write.buffer`): without a transfer, `postMessage()` copies
22122
+ * the whole buffer, send `write.slice()` to copy only the css. See
22123
+ * [Zero copy between threads](../../files/usage.md#zero-copy-between-threads).
22115
22124
  */
22116
22125
  write;
22117
22126
  /**
@@ -22158,7 +22167,11 @@
22158
22167
  return result.#codeLength >= 0 ? result.#codeLength : result.code.length;
22159
22168
  }
22160
22169
  /**
22161
- * Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read
22170
+ * Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read, the
22171
+ * string is kept for the next reads: no string is created when it is not read.
22172
+ *
22173
+ * It is a getter, not a property of the object: `postMessage()` and `structuredClone()` do not send it, and it is
22174
+ * an empty string when it is read for the first time after {@link RenderResult.write} was transferred.
22162
22175
  */
22163
22176
  get code() {
22164
22177
  if (this.#code === null) {
@@ -50108,7 +50121,7 @@
50108
50121
  /**
50109
50122
  * Version number
50110
50123
  */
50111
- const version = "2.3.0";
50124
+ const version = "2.3.1";
50112
50125
 
50113
50126
  /**
50114
50127
  * Load file or url
package/dist/index.d.ts CHANGED
@@ -7018,7 +7018,16 @@ declare class RenderResult {
7018
7018
  */
7019
7019
  static readonly shape: RenderResult;
7020
7020
  /**
7021
- * Rendered CSS, encoded as UTF-8
7021
+ * Rendered CSS, encoded as UTF-8: the output of the render, no conversion. Use it to write the css to a file or to
7022
+ * the network, or to send it to another thread without a copy:
7023
+ *
7024
+ * ```ts
7025
+ * self.postMessage(result.write, [result.write.buffer]);
7026
+ * ```
7027
+ *
7028
+ * It is a view of the first bytes of a larger buffer (`write.buffer`): without a transfer, `postMessage()` copies
7029
+ * the whole buffer, send `write.slice()` to copy only the css. See
7030
+ * [Zero copy between threads](../../files/usage.md#zero-copy-between-threads).
7022
7031
  */
7023
7032
  write: Uint8Array;
7024
7033
  /**
@@ -7049,7 +7058,11 @@ declare class RenderResult {
7049
7058
  */
7050
7059
  static codeLength(result: RenderResult): number;
7051
7060
  /**
7052
- * Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read
7061
+ * Rendered CSS. The bytes of {@link RenderResult.write} are decoded the first time the property is read, the
7062
+ * string is kept for the next reads: no string is created when it is not read.
7063
+ *
7064
+ * It is a getter, not a property of the object: `postMessage()` and `structuredClone()` do not send it, and it is
7065
+ * an empty string when it is read for the first time after {@link RenderResult.write} was transferred.
7053
7066
  */
7054
7067
  get code(): string;
7055
7068
  /**
@@ -8407,7 +8420,7 @@ declare function parseSyntax(syntax: string): ValidationToken$1[];
8407
8420
  /**
8408
8421
  * Version number
8409
8422
  */
8410
- declare const version = "2.3.0";
8423
+ declare const version = "2.3.1";
8411
8424
 
8412
8425
  /**
8413
8426
  * Load file or url
package/dist/node.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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { Readable } from 'node:stream';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { PropertySet } from './set.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { eqToken } from '../utils/eq.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { numericTokenTypes } from '../../ast/arena.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { nativeBufferClass } from '../printer/writer.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { isIdentColor, parseColor, isColor } from '../syntax/syntax.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { SourceMap } from '../printer/sourcemap.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken, ColorType } from '../ast/types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  /**
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { TokenField } from '../../ast/arena.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { getSyntaxRule } from '../../validation/config.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../../ast/types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../../ast/types.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { TokenField } from '../../ast/arena.js';
@@ -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.0
5
+ Version: 2.3.1
6
6
  License: MIT
7
7
  */
8
8
  import { EnumToken } from '../../ast/types.js';