From 5c90ca3a18ff98e641cfdcdea5926e16986801df Mon Sep 17 00:00:00 2001 From: Thierry Bela Nanga Date: Tue, 20 Oct 2026 10:52:34 -0400 Subject: [PATCH 1/9] update build files --- .npmignore | 1 + CHANGELOG.md | 2 +- dist/index-umd-web.js | 4 ++-- dist/index.cjs | 2 +- dist/package.json.js | 4 ++-- dist/src/data/properties.json.js | 2 +- dist/src/data/validation.json.js | 2 +- dist/src/lib/ast/clone.js | 2 +- dist/src/lib/ast/expand.js | 2 +- dist/src/lib/ast/features/calc.js | 2 +- dist/src/lib/ast/features/if.js | 2 +- dist/src/lib/ast/features/index.js | 2 +- dist/src/lib/ast/features/inlinecssvariables.js | 2 +- dist/src/lib/ast/features/prefix.js | 2 +- dist/src/lib/ast/features/shorthand.js | 2 +- dist/src/lib/ast/features/transform.js | 2 +- dist/src/lib/ast/features/type.js | 2 +- dist/src/lib/ast/find.js | 2 +- dist/src/lib/ast/math/expression.js | 2 +- dist/src/lib/ast/math/math.js | 2 +- dist/src/lib/ast/minify.js | 2 +- dist/src/lib/ast/node.js | 2 +- dist/src/lib/ast/transform/compute.js | 2 +- dist/src/lib/ast/transform/matrix.js | 2 +- dist/src/lib/ast/transform/minify.js | 2 +- dist/src/lib/ast/transform/perspective.js | 2 +- dist/src/lib/ast/transform/rotate.js | 2 +- dist/src/lib/ast/transform/scale.js | 2 +- dist/src/lib/ast/transform/skew.js | 2 +- dist/src/lib/ast/transform/translate.js | 2 +- dist/src/lib/ast/transform/utils.js | 2 +- dist/src/lib/ast/types.js | 2 +- dist/src/lib/ast/walk.js | 2 +- dist/src/lib/fs/resolve.js | 2 +- dist/src/lib/parser/declaration/list.js | 2 +- dist/src/lib/parser/declaration/map.js | 2 +- dist/src/lib/parser/declaration/set.js | 2 +- dist/src/lib/parser/linesmap.js | 2 +- dist/src/lib/parser/parse.js | 2 +- dist/src/lib/parser/source.js | 2 +- dist/src/lib/parser/tokenize.js | 2 +- dist/src/lib/parser/utils/angle.js | 2 +- dist/src/lib/parser/utils/at-rule-container.js | 2 +- dist/src/lib/parser/utils/at-rule-font-feature-values.js | 2 +- dist/src/lib/parser/utils/at-rule-generic.js | 2 +- dist/src/lib/parser/utils/at-rule-import.js | 2 +- dist/src/lib/parser/utils/at-rule-media.js | 2 +- dist/src/lib/parser/utils/at-rule-support.js | 2 +- dist/src/lib/parser/utils/at-rule-when-else.js | 2 +- dist/src/lib/parser/utils/at-rule.js | 2 +- dist/src/lib/parser/utils/base64.js | 2 +- dist/src/lib/parser/utils/cache.js | 2 +- dist/src/lib/parser/utils/config.js | 2 +- dist/src/lib/parser/utils/declaration.js | 2 +- dist/src/lib/parser/utils/eq.js | 2 +- dist/src/lib/parser/utils/hash.js | 2 +- dist/src/lib/parser/utils/selector.js | 2 +- dist/src/lib/parser/utils/text.js | 2 +- dist/src/lib/parser/utils/token.js | 2 +- dist/src/lib/parser/utils/type.js | 2 +- dist/src/lib/printer/render.js | 2 +- dist/src/lib/printer/sourcemap/lib/codec.js | 2 +- dist/src/lib/printer/sourcemap/sourcemap.js | 2 +- dist/src/lib/syntax/color/a98rgb.js | 2 +- dist/src/lib/syntax/color/alpha.js | 2 +- dist/src/lib/syntax/color/cmyk.js | 2 +- dist/src/lib/syntax/color/color-mix.js | 2 +- dist/src/lib/syntax/color/color.js | 2 +- dist/src/lib/syntax/color/hex.js | 2 +- dist/src/lib/syntax/color/hsl.js | 2 +- dist/src/lib/syntax/color/hwb.js | 2 +- dist/src/lib/syntax/color/lab.js | 2 +- dist/src/lib/syntax/color/lch.js | 2 +- dist/src/lib/syntax/color/oklab.js | 2 +- dist/src/lib/syntax/color/oklch.js | 2 +- dist/src/lib/syntax/color/p3.js | 2 +- dist/src/lib/syntax/color/prophotorgb.js | 2 +- dist/src/lib/syntax/color/rec2020.js | 2 +- dist/src/lib/syntax/color/relative-color.js | 2 +- dist/src/lib/syntax/color/rgb.js | 2 +- dist/src/lib/syntax/color/srgb.js | 2 +- dist/src/lib/syntax/color/utils/color-type.js | 2 +- dist/src/lib/syntax/color/utils/colorspace.js | 2 +- dist/src/lib/syntax/color/utils/components.js | 2 +- dist/src/lib/syntax/color/utils/distance.js | 2 +- dist/src/lib/syntax/color/utils/make-color.js | 2 +- dist/src/lib/syntax/color/utils/matrix.js | 2 +- dist/src/lib/syntax/color/xyz.js | 2 +- dist/src/lib/syntax/color/xyzd50.js | 2 +- dist/src/lib/syntax/constants.js | 2 +- dist/src/lib/syntax/syntax.js | 2 +- dist/src/lib/validation/config.js | 2 +- dist/src/lib/validation/match.js | 2 +- dist/src/lib/validation/parser/parse.js | 2 +- dist/src/lib/validation/parser/typedef.js | 2 +- dist/src/lib/validation/utils/list.js | 2 +- dist/src/node.js | 2 +- dist/src/types.js | 2 +- dist/src/utils/sync.js | 2 +- dist/src/web.js | 2 +- 100 files changed, 102 insertions(+), 101 deletions(-) diff --git a/.npmignore b/.npmignore index 004919b90..63941a84e 100644 --- a/.npmignore +++ b/.npmignore @@ -7,6 +7,7 @@ /benchmark /tools /ROADMAP.md +/CONTRIBUTING.md /rollup.config.js /tsconfig.json /src diff --git a/CHANGELOG.md b/CHANGELOG.md index e3015e454..43cd8cffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ # v1.6.9 -Add missing files from the dist folder. +fix import path #166 from package.json # v1.6.8 diff --git a/dist/index-umd-web.js b/dist/index-umd-web.js index cb1e002c8..037fe31e8 100644 --- a/dist/index-umd-web.js +++ b/dist/index-umd-web.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ (function (global, factory) { @@ -34778,7 +34778,7 @@ } } - var version = "1.6.8"; + var version = "1.6.9"; /** * Load file or url diff --git a/dist/index.cjs b/dist/index.cjs index 956baf354..20969aacf 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -34774,7 +34774,7 @@ function setNodeProperty(node, key, value) { } } -var version = "1.6.8"; +var version = "1.6.9"; /** * Load file or url diff --git a/dist/package.json.js b/dist/package.json.js index 60ef566f3..296a25b79 100644 --- a/dist/package.json.js +++ b/dist/package.json.js @@ -2,9 +2,9 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ -var version = "1.6.8"; +var version = "1.6.9"; export { version }; diff --git a/dist/src/data/properties.json.js b/dist/src/data/properties.json.js index 60f886b19..220a2de0e 100644 --- a/dist/src/data/properties.json.js +++ b/dist/src/data/properties.json.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ var properties = { diff --git a/dist/src/data/validation.json.js b/dist/src/data/validation.json.js index dda1ec13e..ab252db21 100644 --- a/dist/src/data/validation.json.js +++ b/dist/src/data/validation.json.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ var declarations = { diff --git a/dist/src/lib/ast/clone.js b/dist/src/lib/ast/clone.js index 4c43a3b52..af318b61c 100644 --- a/dist/src/lib/ast/clone.js +++ b/dist/src/lib/ast/clone.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from './types.js'; diff --git a/dist/src/lib/ast/expand.js b/dist/src/lib/ast/expand.js index 5677f978d..a7395dae2 100644 --- a/dist/src/lib/ast/expand.js +++ b/dist/src/lib/ast/expand.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { splitRule } from './minify.js'; diff --git a/dist/src/lib/ast/features/calc.js b/dist/src/lib/ast/features/calc.js index 77b3d79c1..9b63a6d5c 100644 --- a/dist/src/lib/ast/features/calc.js +++ b/dist/src/lib/ast/features/calc.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/if.js b/dist/src/lib/ast/features/if.js index 90eb588fc..c811aca02 100644 --- a/dist/src/lib/ast/features/if.js +++ b/dist/src/lib/ast/features/if.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/index.js b/dist/src/lib/ast/features/index.js index e0065d5f7..3a301ce5e 100644 --- a/dist/src/lib/ast/features/index.js +++ b/dist/src/lib/ast/features/index.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ export { ComputePrefixFeature } from './prefix.js'; diff --git a/dist/src/lib/ast/features/inlinecssvariables.js b/dist/src/lib/ast/features/inlinecssvariables.js index 00265176d..06f5a3f89 100644 --- a/dist/src/lib/ast/features/inlinecssvariables.js +++ b/dist/src/lib/ast/features/inlinecssvariables.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/prefix.js b/dist/src/lib/ast/features/prefix.js index 62340357c..3731913b9 100644 --- a/dist/src/lib/ast/features/prefix.js +++ b/dist/src/lib/ast/features/prefix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumAstNodeStatus, EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/shorthand.js b/dist/src/lib/ast/features/shorthand.js index d90b5e1bc..514274bf2 100644 --- a/dist/src/lib/ast/features/shorthand.js +++ b/dist/src/lib/ast/features/shorthand.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { PropertyList } from '../../parser/declaration/list.js'; diff --git a/dist/src/lib/ast/features/transform.js b/dist/src/lib/ast/features/transform.js index ac57ab13b..5ecd0109f 100644 --- a/dist/src/lib/ast/features/transform.js +++ b/dist/src/lib/ast/features/transform.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, EnumAstNodeStatus } from '../types.js'; diff --git a/dist/src/lib/ast/features/type.js b/dist/src/lib/ast/features/type.js index 7cfa1ffcf..3f1b11e14 100644 --- a/dist/src/lib/ast/features/type.js +++ b/dist/src/lib/ast/features/type.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/ast/find.js b/dist/src/lib/ast/find.js index 12778c0d6..652bdd596 100644 --- a/dist/src/lib/ast/find.js +++ b/dist/src/lib/ast/find.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from './types.js'; diff --git a/dist/src/lib/ast/math/expression.js b/dist/src/lib/ast/math/expression.js index 1ec1c4010..6b02e6d16 100644 --- a/dist/src/lib/ast/math/expression.js +++ b/dist/src/lib/ast/math/expression.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { equalsIgnoreCase } from '../../parser/utils/text.js'; diff --git a/dist/src/lib/ast/math/math.js b/dist/src/lib/ast/math/math.js index 6958b5711..f0e802744 100644 --- a/dist/src/lib/ast/math/math.js +++ b/dist/src/lib/ast/math/math.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { minifyNumber } from '../../syntax/syntax.js'; diff --git a/dist/src/lib/ast/minify.js b/dist/src/lib/ast/minify.js index 96251edf6..e527793dd 100644 --- a/dist/src/lib/ast/minify.js +++ b/dist/src/lib/ast/minify.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { eq } from '../parser/utils/eq.js'; diff --git a/dist/src/lib/ast/node.js b/dist/src/lib/ast/node.js index 47b2477c2..498ae3de8 100644 --- a/dist/src/lib/ast/node.js +++ b/dist/src/lib/ast/node.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { TOKENS, ERRORS, STATE, LOCSRCID, LOCSTA, LOCEND, PARENT } from '../syntax/constants.js'; diff --git a/dist/src/lib/ast/transform/compute.js b/dist/src/lib/ast/transform/compute.js index 246cc9d69..d676a8032 100644 --- a/dist/src/lib/ast/transform/compute.js +++ b/dist/src/lib/ast/transform/compute.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply, toZero } from './utils.js'; diff --git a/dist/src/lib/ast/transform/matrix.js b/dist/src/lib/ast/transform/matrix.js index d5b2764f7..e45bbbb00 100644 --- a/dist/src/lib/ast/transform/matrix.js +++ b/dist/src/lib/ast/transform/matrix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, is2DMatrix } from './utils.js'; diff --git a/dist/src/lib/ast/transform/minify.js b/dist/src/lib/ast/transform/minify.js index d49484231..3d4ccd489 100644 --- a/dist/src/lib/ast/transform/minify.js +++ b/dist/src/lib/ast/transform/minify.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply, decompose, round, toZero } from './utils.js'; diff --git a/dist/src/lib/ast/transform/perspective.js b/dist/src/lib/ast/transform/perspective.js index e0ecb65ca..2fa1f13ba 100644 --- a/dist/src/lib/ast/transform/perspective.js +++ b/dist/src/lib/ast/transform/perspective.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/rotate.js b/dist/src/lib/ast/transform/rotate.js index f3b76405d..4df345ab7 100644 --- a/dist/src/lib/ast/transform/rotate.js +++ b/dist/src/lib/ast/transform/rotate.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/scale.js b/dist/src/lib/ast/transform/scale.js index ad41c8049..2e1c91f98 100644 --- a/dist/src/lib/ast/transform/scale.js +++ b/dist/src/lib/ast/transform/scale.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/skew.js b/dist/src/lib/ast/transform/skew.js index 079cf49ae..7bf17a9cb 100644 --- a/dist/src/lib/ast/transform/skew.js +++ b/dist/src/lib/ast/transform/skew.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/translate.js b/dist/src/lib/ast/transform/translate.js index 50963647d..30333adbc 100644 --- a/dist/src/lib/ast/transform/translate.js +++ b/dist/src/lib/ast/transform/translate.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/utils.js b/dist/src/lib/ast/transform/utils.js index bcec65fe0..a9c822f3c 100644 --- a/dist/src/lib/ast/transform/utils.js +++ b/dist/src/lib/ast/transform/utils.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { epsilon } from '../../syntax/constants.js'; diff --git a/dist/src/lib/ast/types.js b/dist/src/lib/ast/types.js index 7ebb73a82..31a81a12c 100644 --- a/dist/src/lib/ast/types.js +++ b/dist/src/lib/ast/types.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/ast/walk.js b/dist/src/lib/ast/walk.js index 45bc0f54e..02e2f1e7b 100644 --- a/dist/src/lib/ast/walk.js +++ b/dist/src/lib/ast/walk.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { PARENT, TOKENS } from '../syntax/constants.js'; diff --git a/dist/src/lib/fs/resolve.js b/dist/src/lib/fs/resolve.js index be4068e3f..7a17fd9a0 100644 --- a/dist/src/lib/fs/resolve.js +++ b/dist/src/lib/fs/resolve.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { memoize } from '../parser/utils/cache.js'; diff --git a/dist/src/lib/parser/declaration/list.js b/dist/src/lib/parser/declaration/list.js index 30a01767c..ca13d34b4 100644 --- a/dist/src/lib/parser/declaration/list.js +++ b/dist/src/lib/parser/declaration/list.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { PropertySet } from './set.js'; diff --git a/dist/src/lib/parser/declaration/map.js b/dist/src/lib/parser/declaration/map.js index e22a1002d..cba78cab7 100644 --- a/dist/src/lib/parser/declaration/map.js +++ b/dist/src/lib/parser/declaration/map.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { eq } from '../utils/eq.js'; diff --git a/dist/src/lib/parser/declaration/set.js b/dist/src/lib/parser/declaration/set.js index 925fca65c..a80669930 100644 --- a/dist/src/lib/parser/declaration/set.js +++ b/dist/src/lib/parser/declaration/set.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { eq } from '../utils/eq.js'; diff --git a/dist/src/lib/parser/linesmap.js b/dist/src/lib/parser/linesmap.js index e43c9858b..14bc6c1d7 100644 --- a/dist/src/lib/parser/linesmap.js +++ b/dist/src/lib/parser/linesmap.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/parser/parse.js b/dist/src/lib/parser/parse.js index 701bbdc9f..a3525d273 100644 --- a/dist/src/lib/parser/parse.js +++ b/dist/src/lib/parser/parse.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { isIdentColor, parseColor, isColor } from '../syntax/syntax.js'; diff --git a/dist/src/lib/parser/source.js b/dist/src/lib/parser/source.js index 0ac41f39d..9075bb427 100644 --- a/dist/src/lib/parser/source.js +++ b/dist/src/lib/parser/source.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { SourceMap } from '../printer/sourcemap/sourcemap.js'; diff --git a/dist/src/lib/parser/tokenize.js b/dist/src/lib/parser/tokenize.js index 2fa9b2590..a4433694c 100644 --- a/dist/src/lib/parser/tokenize.js +++ b/dist/src/lib/parser/tokenize.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, ColorType } from '../ast/types.js'; diff --git a/dist/src/lib/parser/utils/angle.js b/dist/src/lib/parser/utils/angle.js index f22b5a5c1..3007f033f 100644 --- a/dist/src/lib/parser/utils/angle.js +++ b/dist/src/lib/parser/utils/angle.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/at-rule-container.js b/dist/src/lib/parser/utils/at-rule-container.js index acb720ba6..3a797611b 100644 --- a/dist/src/lib/parser/utils/at-rule-container.js +++ b/dist/src/lib/parser/utils/at-rule-container.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-font-feature-values.js b/dist/src/lib/parser/utils/at-rule-font-feature-values.js index dd16cbc91..c517127b7 100644 --- a/dist/src/lib/parser/utils/at-rule-font-feature-values.js +++ b/dist/src/lib/parser/utils/at-rule-font-feature-values.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getSyntaxRule } from '../../validation/config.js'; diff --git a/dist/src/lib/parser/utils/at-rule-generic.js b/dist/src/lib/parser/utils/at-rule-generic.js index 9e43a706a..cd6c83b66 100644 --- a/dist/src/lib/parser/utils/at-rule-generic.js +++ b/dist/src/lib/parser/utils/at-rule-generic.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-import.js b/dist/src/lib/parser/utils/at-rule-import.js index 2585f66ed..ab7ef4bb7 100644 --- a/dist/src/lib/parser/utils/at-rule-import.js +++ b/dist/src/lib/parser/utils/at-rule-import.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-media.js b/dist/src/lib/parser/utils/at-rule-media.js index d133c9b09..e5cc48f72 100644 --- a/dist/src/lib/parser/utils/at-rule-media.js +++ b/dist/src/lib/parser/utils/at-rule-media.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-support.js b/dist/src/lib/parser/utils/at-rule-support.js index 08a0107bc..2df37aa24 100644 --- a/dist/src/lib/parser/utils/at-rule-support.js +++ b/dist/src/lib/parser/utils/at-rule-support.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-when-else.js b/dist/src/lib/parser/utils/at-rule-when-else.js index b8a8674b3..34001a7af 100644 --- a/dist/src/lib/parser/utils/at-rule-when-else.js +++ b/dist/src/lib/parser/utils/at-rule-when-else.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule.js b/dist/src/lib/parser/utils/at-rule.js index 7e834477c..26eaf2dd1 100644 --- a/dist/src/lib/parser/utils/at-rule.js +++ b/dist/src/lib/parser/utils/at-rule.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { ValidationSyntaxGroupEnum } from '../../validation/parser/typedef.js'; diff --git a/dist/src/lib/parser/utils/base64.js b/dist/src/lib/parser/utils/base64.js index 870c7ef8d..cd1ea11b7 100644 --- a/dist/src/lib/parser/utils/base64.js +++ b/dist/src/lib/parser/utils/base64.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/cache.js b/dist/src/lib/parser/utils/cache.js index 41923d323..3f66e90c5 100644 --- a/dist/src/lib/parser/utils/cache.js +++ b/dist/src/lib/parser/utils/cache.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/config.js b/dist/src/lib/parser/utils/config.js index c1023ca5f..f1202f66a 100644 --- a/dist/src/lib/parser/utils/config.js +++ b/dist/src/lib/parser/utils/config.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import config from '../../../data/properties.json.js'; diff --git a/dist/src/lib/parser/utils/declaration.js b/dist/src/lib/parser/utils/declaration.js index 934d65e80..d881e83eb 100644 --- a/dist/src/lib/parser/utils/declaration.js +++ b/dist/src/lib/parser/utils/declaration.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, EnumAstNodeStatus, ColorType } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/eq.js b/dist/src/lib/parser/utils/eq.js index 17d1e2937..0c6e37f72 100644 --- a/dist/src/lib/parser/utils/eq.js +++ b/dist/src/lib/parser/utils/eq.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/hash.js b/dist/src/lib/parser/utils/hash.js index 1c87f8465..92fc91e2c 100644 --- a/dist/src/lib/parser/utils/hash.js +++ b/dist/src/lib/parser/utils/hash.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ // Alphabet: a-z, A-Z, 0-9, _, - diff --git a/dist/src/lib/parser/utils/selector.js b/dist/src/lib/parser/utils/selector.js index 987ba86b7..edb393146 100644 --- a/dist/src/lib/parser/utils/selector.js +++ b/dist/src/lib/parser/utils/selector.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, EnumAstNodeStatus } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/text.js b/dist/src/lib/parser/utils/text.js index 13ab0b25c..e562f575d 100644 --- a/dist/src/lib/parser/utils/text.js +++ b/dist/src/lib/parser/utils/text.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/token.js b/dist/src/lib/parser/utils/token.js index ac8e51db0..e4ca13500 100644 --- a/dist/src/lib/parser/utils/token.js +++ b/dist/src/lib/parser/utils/token.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/type.js b/dist/src/lib/parser/utils/type.js index 6965a3b69..6f0029253 100644 --- a/dist/src/lib/parser/utils/type.js +++ b/dist/src/lib/parser/utils/type.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/printer/render.js b/dist/src/lib/printer/render.js index c2409d296..ce8a136ce 100644 --- a/dist/src/lib/printer/render.js +++ b/dist/src/lib/printer/render.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { convertColor, getAngle } from '../syntax/color/color.js'; diff --git a/dist/src/lib/printer/sourcemap/lib/codec.js b/dist/src/lib/printer/sourcemap/lib/codec.js index 1a0656563..42babd029 100644 --- a/dist/src/lib/printer/sourcemap/lib/codec.js +++ b/dist/src/lib/printer/sourcemap/lib/codec.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ // from https://github.com/Rich-Harris/vlq/tree/master diff --git a/dist/src/lib/printer/sourcemap/sourcemap.js b/dist/src/lib/printer/sourcemap/sourcemap.js index a624fea12..5e2c6de2a 100644 --- a/dist/src/lib/printer/sourcemap/sourcemap.js +++ b/dist/src/lib/printer/sourcemap/sourcemap.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { toBase64 } from '../../parser/utils/base64.js'; diff --git a/dist/src/lib/syntax/color/a98rgb.js b/dist/src/lib/syntax/color/a98rgb.js index e4fe75c50..614d7900e 100644 --- a/dist/src/lib/syntax/color/a98rgb.js +++ b/dist/src/lib/syntax/color/a98rgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { xyz2srgb } from './srgb.js'; diff --git a/dist/src/lib/syntax/color/alpha.js b/dist/src/lib/syntax/color/alpha.js index 018757a09..d7f32fe10 100644 --- a/dist/src/lib/syntax/color/alpha.js +++ b/dist/src/lib/syntax/color/alpha.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { ColorType, EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/cmyk.js b/dist/src/lib/syntax/color/cmyk.js index b7ffc08ad..a272a975c 100644 --- a/dist/src/lib/syntax/color/cmyk.js +++ b/dist/src/lib/syntax/color/cmyk.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { ColorType, EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/color-mix.js b/dist/src/lib/syntax/color/color-mix.js index d68029c47..77b9d0718 100644 --- a/dist/src/lib/syntax/color/color-mix.js +++ b/dist/src/lib/syntax/color/color-mix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, ColorType, EnumAstNodeStatus } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/color.js b/dist/src/lib/syntax/color/color.js index 23701e758..e3db7e2a7 100644 --- a/dist/src/lib/syntax/color/color.js +++ b/dist/src/lib/syntax/color/color.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { ColorType, EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/hex.js b/dist/src/lib/syntax/color/hex.js index dd1707fc7..c9dbe231c 100644 --- a/dist/src/lib/syntax/color/hex.js +++ b/dist/src/lib/syntax/color/hex.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, ColorType } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/hsl.js b/dist/src/lib/syntax/color/hsl.js index 2e317c5e1..f50419188 100644 --- a/dist/src/lib/syntax/color/hsl.js +++ b/dist/src/lib/syntax/color/hsl.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { color2srgbvalues, getNumber } from './color.js'; diff --git a/dist/src/lib/syntax/color/hwb.js b/dist/src/lib/syntax/color/hwb.js index 5669d153c..8c66f3f42 100644 --- a/dist/src/lib/syntax/color/hwb.js +++ b/dist/src/lib/syntax/color/hwb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/lab.js b/dist/src/lib/syntax/color/lab.js index fad2c18db..e7cdc9e54 100644 --- a/dist/src/lib/syntax/color/lab.js +++ b/dist/src/lib/syntax/color/lab.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { e, k, D50 } from '../constants.js'; diff --git a/dist/src/lib/syntax/color/lch.js b/dist/src/lib/syntax/color/lch.js index 897f17ee9..cc988839b 100644 --- a/dist/src/lib/syntax/color/lch.js +++ b/dist/src/lib/syntax/color/lch.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/oklab.js b/dist/src/lib/syntax/color/oklab.js index 12ed73c6b..aaf516b40 100644 --- a/dist/src/lib/syntax/color/oklab.js +++ b/dist/src/lib/syntax/color/oklab.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/oklch.js b/dist/src/lib/syntax/color/oklch.js index ed9d491b9..14eb66893 100644 --- a/dist/src/lib/syntax/color/oklch.js +++ b/dist/src/lib/syntax/color/oklch.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/p3.js b/dist/src/lib/syntax/color/p3.js index f995b89ce..01008775c 100644 --- a/dist/src/lib/syntax/color/p3.js +++ b/dist/src/lib/syntax/color/p3.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { lsrgb2srgbvalues, xyz2srgb, srgb2lsrgbvalues } from './srgb.js'; diff --git a/dist/src/lib/syntax/color/prophotorgb.js b/dist/src/lib/syntax/color/prophotorgb.js index 98e57c221..8187f0236 100644 --- a/dist/src/lib/syntax/color/prophotorgb.js +++ b/dist/src/lib/syntax/color/prophotorgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { XYZ_D65_to_D50, xyzd502srgb } from './xyzd50.js'; diff --git a/dist/src/lib/syntax/color/rec2020.js b/dist/src/lib/syntax/color/rec2020.js index dde0c4824..373299cc8 100644 --- a/dist/src/lib/syntax/color/rec2020.js +++ b/dist/src/lib/syntax/color/rec2020.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { xyz2srgb } from './srgb.js'; diff --git a/dist/src/lib/syntax/color/relative-color.js b/dist/src/lib/syntax/color/relative-color.js index 81a883974..b330efaf2 100644 --- a/dist/src/lib/syntax/color/relative-color.js +++ b/dist/src/lib/syntax/color/relative-color.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { convertColor, getNumber } from './color.js'; diff --git a/dist/src/lib/syntax/color/rgb.js b/dist/src/lib/syntax/color/rgb.js index 49e935b18..29cd7a41c 100644 --- a/dist/src/lib/syntax/color/rgb.js +++ b/dist/src/lib/syntax/color/rgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { color2srgbvalues, minmax } from './color.js'; diff --git a/dist/src/lib/syntax/color/srgb.js b/dist/src/lib/syntax/color/srgb.js index be44568f2..3591a8109 100644 --- a/dist/src/lib/syntax/color/srgb.js +++ b/dist/src/lib/syntax/color/srgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/utils/color-type.js b/dist/src/lib/syntax/color/utils/color-type.js index 9c79e36cc..06590962c 100644 --- a/dist/src/lib/syntax/color/utils/color-type.js +++ b/dist/src/lib/syntax/color/utils/color-type.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { ColorType } from '../../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/utils/colorspace.js b/dist/src/lib/syntax/color/utils/colorspace.js index 863697876..02e559c86 100644 --- a/dist/src/lib/syntax/color/utils/colorspace.js +++ b/dist/src/lib/syntax/color/utils/colorspace.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { equalsIgnoreCase } from '../../../parser/utils/text.js'; diff --git a/dist/src/lib/syntax/color/utils/components.js b/dist/src/lib/syntax/color/utils/components.js index 9c8b3dc3b..a70ce7602 100644 --- a/dist/src/lib/syntax/color/utils/components.js +++ b/dist/src/lib/syntax/color/utils/components.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { ColorType, EnumToken } from '../../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/utils/distance.js b/dist/src/lib/syntax/color/utils/distance.js index dd345b615..8e2a3ceaa 100644 --- a/dist/src/lib/syntax/color/utils/distance.js +++ b/dist/src/lib/syntax/color/utils/distance.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { convertColor } from '../color.js'; diff --git a/dist/src/lib/syntax/color/utils/make-color.js b/dist/src/lib/syntax/color/utils/make-color.js index c555264ac..62ed7d75e 100644 --- a/dist/src/lib/syntax/color/utils/make-color.js +++ b/dist/src/lib/syntax/color/utils/make-color.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken, ColorType } from '../../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/utils/matrix.js b/dist/src/lib/syntax/color/utils/matrix.js index ffa8f1709..5913c14ee 100644 --- a/dist/src/lib/syntax/color/utils/matrix.js +++ b/dist/src/lib/syntax/color/utils/matrix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ // from https://www.w3.org/TR/css-color-4/multiply-matrices.js diff --git a/dist/src/lib/syntax/color/xyz.js b/dist/src/lib/syntax/color/xyz.js index 6ac1eda87..23216d0c3 100644 --- a/dist/src/lib/syntax/color/xyz.js +++ b/dist/src/lib/syntax/color/xyz.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { multiplyMatrices } from './utils/matrix.js'; diff --git a/dist/src/lib/syntax/color/xyzd50.js b/dist/src/lib/syntax/color/xyzd50.js index fbd8973d6..ae218cf38 100644 --- a/dist/src/lib/syntax/color/xyzd50.js +++ b/dist/src/lib/syntax/color/xyzd50.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { lsrgb2srgbvalues } from './srgb.js'; diff --git a/dist/src/lib/syntax/constants.js b/dist/src/lib/syntax/constants.js index bb5adb3cf..81c26cbb1 100644 --- a/dist/src/lib/syntax/constants.js +++ b/dist/src/lib/syntax/constants.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../ast/types.js'; diff --git a/dist/src/lib/syntax/syntax.js b/dist/src/lib/syntax/syntax.js index 849c7d8c3..c7f53e055 100644 --- a/dist/src/lib/syntax/syntax.js +++ b/dist/src/lib/syntax/syntax.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { isOkLabClose } from './color/utils/distance.js'; diff --git a/dist/src/lib/validation/config.js b/dist/src/lib/validation/config.js index 1bf33b659..c1e592ee1 100644 --- a/dist/src/lib/validation/config.js +++ b/dist/src/lib/validation/config.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import config from '../../data/validation.json.js'; diff --git a/dist/src/lib/validation/match.js b/dist/src/lib/validation/match.js index 69cff96ea..1fe3c9000 100644 --- a/dist/src/lib/validation/match.js +++ b/dist/src/lib/validation/match.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { getParsedSyntax, getSyntaxConfig } from './config.js'; diff --git a/dist/src/lib/validation/parser/parse.js b/dist/src/lib/validation/parser/parse.js index 615c19ce0..247de9537 100644 --- a/dist/src/lib/validation/parser/parse.js +++ b/dist/src/lib/validation/parser/parse.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/validation/parser/typedef.js b/dist/src/lib/validation/parser/typedef.js index 4ddbac08d..11e590992 100644 --- a/dist/src/lib/validation/parser/typedef.js +++ b/dist/src/lib/validation/parser/typedef.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ var ValidationTokenEnum; diff --git a/dist/src/lib/validation/utils/list.js b/dist/src/lib/validation/utils/list.js index 487ea934a..682118a17 100644 --- a/dist/src/lib/validation/utils/list.js +++ b/dist/src/lib/validation/utils/list.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/node.js b/dist/src/node.js index d54e607ac..b38526824 100644 --- a/dist/src/node.js +++ b/dist/src/node.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { deprecate } from 'node:util'; diff --git a/dist/src/types.js b/dist/src/types.js index c725cb63a..24cbbffdd 100644 --- a/dist/src/types.js +++ b/dist/src/types.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ /** diff --git a/dist/src/utils/sync.js b/dist/src/utils/sync.js index c6cfde1f6..c36c16294 100644 --- a/dist/src/utils/sync.js +++ b/dist/src/utils/sync.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { EnumToken } from '../lib/ast/types.js'; diff --git a/dist/src/web.js b/dist/src/web.js index c2c9e84b1..91ace38d2 100644 --- a/dist/src/web.js +++ b/dist/src/web.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.8 + Version: 1.6.9 License: MIT */ import { doParse, doParseSync } from './lib/parser/parse.js'; From 00948ce5b7b60eae6b2144002b341bedca449f8e Mon Sep 17 00:00:00 2001 From: Thierry Bela Nanga Date: Tue, 20 Oct 2026 11:21:51 -0400 Subject: [PATCH 2/9] update file path --- test/allFiles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/allFiles.js b/test/allFiles.js index 819b7efc1..df35444fc 100644 --- a/test/allFiles.js +++ b/test/allFiles.js @@ -1,5 +1,5 @@ import {readdir} from "node:fs/promises"; -import {load, transform} from "../dist/node.js"; +import {load, transform} from "../dist/src/node.js"; const baseDir = import.meta.dirname + '/files/css/'; const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'], e = Math.floor(Math.log(this) / Math.log(1024)); From 9562c10201f7bbdc063c23fa358ceab4a038baf3 Mon Sep 17 00:00:00 2001 From: Thierry Bela Nanga Date: Wed, 21 Oct 2026 18:14:25 -0400 Subject: [PATCH 3/9] fix parsing at-rule function with no argument #168 --- .gitignore | 1 + CHANGELOG.md | 4 + benchmark/package.json | 2 +- dist/index-umd-web.js | 113 ++++++++++++++---- dist/index.cjs | 111 +++++++++++++---- dist/package.json.js | 4 +- dist/src/data/properties.json.js | 2 +- dist/src/data/validation.json.js | 8 +- dist/src/lib/ast/clone.js | 2 +- dist/src/lib/ast/expand.js | 2 +- dist/src/lib/ast/features/calc.js | 2 +- dist/src/lib/ast/features/if.js | 2 +- dist/src/lib/ast/features/index.js | 2 +- .../lib/ast/features/inlinecssvariables.js | 2 +- dist/src/lib/ast/features/prefix.js | 2 +- dist/src/lib/ast/features/shorthand.js | 54 +++++---- dist/src/lib/ast/features/transform.js | 2 +- dist/src/lib/ast/features/type.js | 2 +- dist/src/lib/ast/find.js | 2 +- dist/src/lib/ast/math/expression.js | 2 +- dist/src/lib/ast/math/math.js | 2 +- dist/src/lib/ast/minify.js | 34 +++++- dist/src/lib/ast/node.js | 2 +- dist/src/lib/ast/transform/compute.js | 2 +- dist/src/lib/ast/transform/matrix.js | 2 +- dist/src/lib/ast/transform/minify.js | 2 +- dist/src/lib/ast/transform/perspective.js | 2 +- dist/src/lib/ast/transform/rotate.js | 2 +- dist/src/lib/ast/transform/scale.js | 2 +- dist/src/lib/ast/transform/skew.js | 2 +- dist/src/lib/ast/transform/translate.js | 2 +- dist/src/lib/ast/transform/utils.js | 2 +- dist/src/lib/ast/types.js | 2 +- dist/src/lib/ast/walk.js | 2 +- dist/src/lib/fs/resolve.js | 2 +- dist/src/lib/parser/declaration/list.js | 7 +- dist/src/lib/parser/declaration/map.js | 2 +- dist/src/lib/parser/declaration/set.js | 2 +- dist/src/lib/parser/linesmap.js | 2 +- dist/src/lib/parser/parse.js | 2 +- dist/src/lib/parser/source.js | 2 +- dist/src/lib/parser/tokenize.js | 2 +- dist/src/lib/parser/utils/angle.js | 2 +- .../src/lib/parser/utils/at-rule-container.js | 2 +- .../utils/at-rule-font-feature-values.js | 2 +- dist/src/lib/parser/utils/at-rule-generic.js | 2 +- dist/src/lib/parser/utils/at-rule-import.js | 2 +- dist/src/lib/parser/utils/at-rule-media.js | 2 +- dist/src/lib/parser/utils/at-rule-support.js | 2 +- .../src/lib/parser/utils/at-rule-when-else.js | 2 +- dist/src/lib/parser/utils/at-rule.js | 2 +- dist/src/lib/parser/utils/base64.js | 2 +- dist/src/lib/parser/utils/cache.js | 2 +- dist/src/lib/parser/utils/config.js | 2 +- dist/src/lib/parser/utils/declaration.js | 2 +- dist/src/lib/parser/utils/eq.js | 2 +- dist/src/lib/parser/utils/hash.js | 2 +- dist/src/lib/parser/utils/selector.js | 2 +- dist/src/lib/parser/utils/text.js | 2 +- dist/src/lib/parser/utils/token.js | 3 +- dist/src/lib/parser/utils/type.js | 2 +- dist/src/lib/printer/render.js | 2 +- dist/src/lib/printer/sourcemap/lib/codec.js | 2 +- dist/src/lib/printer/sourcemap/sourcemap.js | 2 +- dist/src/lib/syntax/color/a98rgb.js | 2 +- dist/src/lib/syntax/color/alpha.js | 2 +- dist/src/lib/syntax/color/cmyk.js | 2 +- dist/src/lib/syntax/color/color-mix.js | 2 +- dist/src/lib/syntax/color/color.js | 2 +- dist/src/lib/syntax/color/hex.js | 2 +- dist/src/lib/syntax/color/hsl.js | 2 +- dist/src/lib/syntax/color/hwb.js | 2 +- dist/src/lib/syntax/color/lab.js | 2 +- dist/src/lib/syntax/color/lch.js | 2 +- dist/src/lib/syntax/color/oklab.js | 2 +- dist/src/lib/syntax/color/oklch.js | 2 +- dist/src/lib/syntax/color/p3.js | 2 +- dist/src/lib/syntax/color/prophotorgb.js | 2 +- dist/src/lib/syntax/color/rec2020.js | 2 +- dist/src/lib/syntax/color/relative-color.js | 2 +- dist/src/lib/syntax/color/rgb.js | 2 +- dist/src/lib/syntax/color/srgb.js | 2 +- dist/src/lib/syntax/color/utils/color-type.js | 2 +- dist/src/lib/syntax/color/utils/colorspace.js | 2 +- dist/src/lib/syntax/color/utils/components.js | 2 +- dist/src/lib/syntax/color/utils/distance.js | 2 +- dist/src/lib/syntax/color/utils/make-color.js | 2 +- dist/src/lib/syntax/color/utils/matrix.js | 2 +- dist/src/lib/syntax/color/xyz.js | 2 +- dist/src/lib/syntax/color/xyzd50.js | 2 +- dist/src/lib/syntax/constants.js | 2 +- dist/src/lib/syntax/syntax.js | 2 +- dist/src/lib/validation/config.js | 2 +- dist/src/lib/validation/match.js | 17 ++- dist/src/lib/validation/parser/parse.js | 2 +- dist/src/lib/validation/parser/typedef.js | 2 +- dist/src/lib/validation/utils/list.js | 2 +- dist/src/node.js | 2 +- dist/src/types.js | 2 +- dist/src/utils/sync.js | 2 +- dist/src/web.js | 2 +- jsr.json | 2 +- package.json | 2 +- scripts/local-patch.json | 6 + src/data/validation.json | 2 +- src/lib/ast/features/shorthand.ts | 57 +++++---- src/lib/ast/minify.ts | 41 ++++++- src/lib/parser/declaration/list.ts | 6 + src/lib/parser/utils/token.ts | 1 + src/lib/validation/match.ts | 17 ++- test/specs/code/at-rules.js | 102 ++++++++++++++++ 111 files changed, 569 insertions(+), 203 deletions(-) diff --git a/.gitignore b/.gitignore index 1631267c1..f410958e0 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /ROADMAP.draft.md /.idea /.DS_Store +/CONTRIBUTING.md /ROADMAP.md /package-lock.json test/*.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 43cd8cffa..21e294839 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +# v1.7.0 + +- [ ] implement CSS [Custom Functions and Mixins Modules and Level 1](https://drafts.csswg.org/css-mixins/#apply-rule) + # v1.6.9 fix import path #166 from package.json diff --git a/benchmark/package.json b/benchmark/package.json index 2b2615324..ecd2c2655 100644 --- a/benchmark/package.json +++ b/benchmark/package.json @@ -10,7 +10,7 @@ "all": "npm run sizes && npm run bench; npm run report" }, "dependencies": { - "@tbela99/css-parser": "^1.6.9", + "@tbela99/css-parser": "^1.6.10", "@tbela99/css-parser2": "github:tbela99/css-parser#5920da6", "clean-css": "^5.3.3", "css-tree": "^3.2.1", diff --git a/dist/index-umd-web.js b/dist/index-umd-web.js index 037fe31e8..8192c3ae1 100644 --- a/dist/index-umd-web.js +++ b/dist/index-umd-web.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ (function (global, factory) { @@ -5723,6 +5723,12 @@ "@function": { syntax: " @function (#?) [returns ]? { }" }, + "@mixin": { + syntax: " @mixin [ #? ) | ]{}" + }, + "@apply": { + syntax: " @apply [ | ] [ { } ]?;" + }, "@left-top": { syntax: " @left-top { }" }, @@ -13238,9 +13244,22 @@ break; } const range = trimArray(context.peekRange()); + const args = range.slice(1, -1); context.next(); i++; - result = matchSyntax([syntaxes[i + 1]], createValidationContext(range.slice(1, -1)), options); + if (args.length === 0) { + context.update(range.at(-1)); + i += 2; + return { + success: true, + valid: true, + token, + context, + syntaxToken: syntaxes[i + 3], + errors: [], + }; + } + result = matchSyntax([syntaxes[i + 1]], createValidationContext(args), options); if (result.success) { context.update(range.at(-1)); i += 2; @@ -20873,6 +20892,11 @@ let result; for (const declaration of declarations) { name = declaration.typ != exports.EnumToken.DeclarationNodeType ? null : declaration.nam; + // @functiom / result + if (declaration[STATE] & exports.EnumAstNodeStatus.Unknown && equalsIgnoreCase("result", name)) { + this.declarations.set(declaration.nam, declaration); + continue; + } if (declaration[STATE] & (exports.EnumAstNodeStatus.Invalid | exports.EnumAstNodeStatus.Unknown | exports.EnumAstNodeStatus.ValidationFailed) || declaration.typ != exports.EnumToken.DeclarationNodeType || @@ -21110,32 +21134,41 @@ let l; const rules = []; const declarations = []; - // @ts-ignore - for (; k < j; k++) { - l = k; - // capture comments with the next token - while (l + 1 < j) { - // @ts-ignore - const node = ast.chi[l]; - if (node.typ == exports.EnumToken.CommentNodeType) { - l++; - continue; - } - break; + const doNotSort = ast.typ == exports.EnumToken.AtRuleNodeType && equalsIgnoreCase(ast.nam, "function"); + // https://drafts.csswg.org/css-mixins/#:~:text=The%20value%20of%20the%20result%20descriptor%20is%20always%2016px%20in%20the%20above%20example + if (doNotSort) { + for (const node of ast.chi) { + declarations.push(node); } + } + else { // @ts-ignore - const node = ast.chi[l]; - if (node.typ == exports.EnumToken.DeclarationNodeType) { - for (let m = k; m <= l; m++) { - declarations.push(ast.chi[m]); + for (; k < j; k++) { + l = k; + // capture comments with the next token + while (l + 1 < j) { + // @ts-ignore + const node = ast.chi[l]; + if (node.typ == exports.EnumToken.CommentNodeType) { + l++; + continue; + } + break; } - } - else { - for (let m = k; m <= l; m++) { - rules.push(ast.chi[m]); + // @ts-ignore + const node = ast.chi[l]; + if (node.typ == exports.EnumToken.DeclarationNodeType) { + for (let m = k; m <= l; m++) { + declarations.push(ast.chi[m]); + } + } + else { + for (let m = k; m <= l; m++) { + rules.push(ast.chi[m]); + } } + k = l; } - k = l; } if (declarations.length > 0) { ast.chi.length = 0; @@ -21155,6 +21188,7 @@ exports.EnumToken.LteTokenType, exports.EnumToken.ChildCombinatorTokenType, exports.EnumToken.PipeTokenType, + exports.EnumToken.ColonTokenType ]); const trimSpaceAfter = new Set([ ...tokensfuncSet.values(), @@ -23343,8 +23377,35 @@ previous = ast.chi[--nodeIndex]; } node = ast.chi[i]; - if (node.typ === exports.EnumToken.AtRuleNodeType && node.nam === "font-face") { - continue; + if (node.typ === exports.EnumToken.AtRuleNodeType) { + if (node.nam === "font-face") { + continue; + } + // https://drafts.csswg.org/css-mixins/#:~:text=The%20value%20of%20the%20result%20descriptor%20is%20always%2016px%20in%20the%20above%20example + if (equalsIgnoreCase(node.nam, "function")) { + const chi = node.chi; + let k = chi?.length; + let slice = false; + while (k--) { + if (chi[k].typ === exports.EnumToken.CommentNodeType || + chi[k].typ === exports.EnumToken.WhitespaceTokenType) { + continue; + } + if (chi[k].typ === exports.EnumToken.DeclarationNodeType && + equalsIgnoreCase(chi[k].nam, "result")) { + slice = true; + break; + } + } + if (k > 0 && slice) { + while (k--) { + if (chi[k].typ === exports.EnumToken.AtRuleNodeType) { + chi.splice(k, 1); + continue; + } + } + } + } } if (node.typ === exports.EnumToken.KeyframesAtRuleNodeType) { if (previous?.typ === exports.EnumToken.KeyframesAtRuleNodeType && @@ -34778,7 +34839,7 @@ } } - var version = "1.6.9"; + var version = "1.6.10"; /** * Load file or url diff --git a/dist/index.cjs b/dist/index.cjs index 20969aacf..ef256e12d 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -5719,6 +5719,12 @@ var atRules = { "@function": { syntax: " @function (#?) [returns ]? { }" }, + "@mixin": { + syntax: " @mixin [ #? ) | ]{}" + }, + "@apply": { + syntax: " @apply [ | ] [ { } ]?;" + }, "@left-top": { syntax: " @left-top { }" }, @@ -13234,9 +13240,22 @@ function matchSyntax(syntaxes, context, options) { break; } const range = trimArray(context.peekRange()); + const args = range.slice(1, -1); context.next(); i++; - result = matchSyntax([syntaxes[i + 1]], createValidationContext(range.slice(1, -1)), options); + if (args.length === 0) { + context.update(range.at(-1)); + i += 2; + return { + success: true, + valid: true, + token, + context, + syntaxToken: syntaxes[i + 3], + errors: [], + }; + } + result = matchSyntax([syntaxes[i + 1]], createValidationContext(args), options); if (result.success) { context.update(range.at(-1)); i += 2; @@ -20869,6 +20888,11 @@ class PropertyList { let result; for (const declaration of declarations) { name = declaration.typ != exports.EnumToken.DeclarationNodeType ? null : declaration.nam; + // @functiom / result + if (declaration[STATE] & exports.EnumAstNodeStatus.Unknown && equalsIgnoreCase("result", name)) { + this.declarations.set(declaration.nam, declaration); + continue; + } if (declaration[STATE] & (exports.EnumAstNodeStatus.Invalid | exports.EnumAstNodeStatus.Unknown | exports.EnumAstNodeStatus.ValidationFailed) || declaration.typ != exports.EnumToken.DeclarationNodeType || @@ -21106,32 +21130,41 @@ class ComputeShorthandFeature { let l; const rules = []; const declarations = []; - // @ts-ignore - for (; k < j; k++) { - l = k; - // capture comments with the next token - while (l + 1 < j) { - // @ts-ignore - const node = ast.chi[l]; - if (node.typ == exports.EnumToken.CommentNodeType) { - l++; - continue; - } - break; + const doNotSort = ast.typ == exports.EnumToken.AtRuleNodeType && equalsIgnoreCase(ast.nam, "function"); + // https://drafts.csswg.org/css-mixins/#:~:text=The%20value%20of%20the%20result%20descriptor%20is%20always%2016px%20in%20the%20above%20example + if (doNotSort) { + for (const node of ast.chi) { + declarations.push(node); } + } + else { // @ts-ignore - const node = ast.chi[l]; - if (node.typ == exports.EnumToken.DeclarationNodeType) { - for (let m = k; m <= l; m++) { - declarations.push(ast.chi[m]); + for (; k < j; k++) { + l = k; + // capture comments with the next token + while (l + 1 < j) { + // @ts-ignore + const node = ast.chi[l]; + if (node.typ == exports.EnumToken.CommentNodeType) { + l++; + continue; + } + break; } - } - else { - for (let m = k; m <= l; m++) { - rules.push(ast.chi[m]); + // @ts-ignore + const node = ast.chi[l]; + if (node.typ == exports.EnumToken.DeclarationNodeType) { + for (let m = k; m <= l; m++) { + declarations.push(ast.chi[m]); + } + } + else { + for (let m = k; m <= l; m++) { + rules.push(ast.chi[m]); + } } + k = l; } - k = l; } if (declarations.length > 0) { ast.chi.length = 0; @@ -21151,6 +21184,7 @@ const trimTokenSpace = new Set([ exports.EnumToken.LteTokenType, exports.EnumToken.ChildCombinatorTokenType, exports.EnumToken.PipeTokenType, + exports.EnumToken.ColonTokenType ]); const trimSpaceAfter = new Set([ ...tokensfuncSet.values(), @@ -23339,8 +23373,35 @@ function doMinify(ast, options = {}, recursive = false, errors, nestingContent, previous = ast.chi[--nodeIndex]; } node = ast.chi[i]; - if (node.typ === exports.EnumToken.AtRuleNodeType && node.nam === "font-face") { - continue; + if (node.typ === exports.EnumToken.AtRuleNodeType) { + if (node.nam === "font-face") { + continue; + } + // https://drafts.csswg.org/css-mixins/#:~:text=The%20value%20of%20the%20result%20descriptor%20is%20always%2016px%20in%20the%20above%20example + if (equalsIgnoreCase(node.nam, "function")) { + const chi = node.chi; + let k = chi?.length; + let slice = false; + while (k--) { + if (chi[k].typ === exports.EnumToken.CommentNodeType || + chi[k].typ === exports.EnumToken.WhitespaceTokenType) { + continue; + } + if (chi[k].typ === exports.EnumToken.DeclarationNodeType && + equalsIgnoreCase(chi[k].nam, "result")) { + slice = true; + break; + } + } + if (k > 0 && slice) { + while (k--) { + if (chi[k].typ === exports.EnumToken.AtRuleNodeType) { + chi.splice(k, 1); + continue; + } + } + } + } } if (node.typ === exports.EnumToken.KeyframesAtRuleNodeType) { if (previous?.typ === exports.EnumToken.KeyframesAtRuleNodeType && @@ -34774,7 +34835,7 @@ function setNodeProperty(node, key, value) { } } -var version = "1.6.9"; +var version = "1.6.10"; /** * Load file or url diff --git a/dist/package.json.js b/dist/package.json.js index 296a25b79..27811fbbd 100644 --- a/dist/package.json.js +++ b/dist/package.json.js @@ -2,9 +2,9 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ -var version = "1.6.9"; +var version = "1.6.10"; export { version }; diff --git a/dist/src/data/properties.json.js b/dist/src/data/properties.json.js index 220a2de0e..d48321400 100644 --- a/dist/src/data/properties.json.js +++ b/dist/src/data/properties.json.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ var properties = { diff --git a/dist/src/data/validation.json.js b/dist/src/data/validation.json.js index ab252db21..bd29e10e4 100644 --- a/dist/src/data/validation.json.js +++ b/dist/src/data/validation.json.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ var declarations = { @@ -4714,6 +4714,12 @@ var atRules = { "@function": { syntax: " @function (#?) [returns ]? { }" }, + "@mixin": { + syntax: " @mixin [ #? ) | ]{}" + }, + "@apply": { + syntax: " @apply [ | ] [ { } ]?;" + }, "@left-top": { syntax: " @left-top { }" }, diff --git a/dist/src/lib/ast/clone.js b/dist/src/lib/ast/clone.js index af318b61c..bc9fd92dc 100644 --- a/dist/src/lib/ast/clone.js +++ b/dist/src/lib/ast/clone.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from './types.js'; diff --git a/dist/src/lib/ast/expand.js b/dist/src/lib/ast/expand.js index a7395dae2..bfc9b3905 100644 --- a/dist/src/lib/ast/expand.js +++ b/dist/src/lib/ast/expand.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { splitRule } from './minify.js'; diff --git a/dist/src/lib/ast/features/calc.js b/dist/src/lib/ast/features/calc.js index 9b63a6d5c..f6308ad25 100644 --- a/dist/src/lib/ast/features/calc.js +++ b/dist/src/lib/ast/features/calc.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/if.js b/dist/src/lib/ast/features/if.js index c811aca02..adc6650ae 100644 --- a/dist/src/lib/ast/features/if.js +++ b/dist/src/lib/ast/features/if.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/index.js b/dist/src/lib/ast/features/index.js index 3a301ce5e..dd8d6adb5 100644 --- a/dist/src/lib/ast/features/index.js +++ b/dist/src/lib/ast/features/index.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ export { ComputePrefixFeature } from './prefix.js'; diff --git a/dist/src/lib/ast/features/inlinecssvariables.js b/dist/src/lib/ast/features/inlinecssvariables.js index 06f5a3f89..a4f20b782 100644 --- a/dist/src/lib/ast/features/inlinecssvariables.js +++ b/dist/src/lib/ast/features/inlinecssvariables.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/prefix.js b/dist/src/lib/ast/features/prefix.js index 3731913b9..f5eb9f921 100644 --- a/dist/src/lib/ast/features/prefix.js +++ b/dist/src/lib/ast/features/prefix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumAstNodeStatus, EnumToken } from '../types.js'; diff --git a/dist/src/lib/ast/features/shorthand.js b/dist/src/lib/ast/features/shorthand.js index 514274bf2..e55700e6a 100644 --- a/dist/src/lib/ast/features/shorthand.js +++ b/dist/src/lib/ast/features/shorthand.js @@ -2,12 +2,13 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { PropertyList } from '../../parser/declaration/list.js'; import { EnumToken } from '../types.js'; import { FeatureWalkMode } from './type.js'; +import { equalsIgnoreCase } from '../../parser/utils/text.js'; class ComputeShorthandFeature { accept = new Set([ @@ -37,32 +38,41 @@ class ComputeShorthandFeature { let l; const rules = []; const declarations = []; - // @ts-ignore - for (; k < j; k++) { - l = k; - // capture comments with the next token - while (l + 1 < j) { - // @ts-ignore - const node = ast.chi[l]; - if (node.typ == EnumToken.CommentNodeType) { - l++; - continue; - } - break; + const doNotSort = ast.typ == EnumToken.AtRuleNodeType && equalsIgnoreCase(ast.nam, "function"); + // https://drafts.csswg.org/css-mixins/#:~:text=The%20value%20of%20the%20result%20descriptor%20is%20always%2016px%20in%20the%20above%20example + if (doNotSort) { + for (const node of ast.chi) { + declarations.push(node); } + } + else { // @ts-ignore - const node = ast.chi[l]; - if (node.typ == EnumToken.DeclarationNodeType) { - for (let m = k; m <= l; m++) { - declarations.push(ast.chi[m]); + for (; k < j; k++) { + l = k; + // capture comments with the next token + while (l + 1 < j) { + // @ts-ignore + const node = ast.chi[l]; + if (node.typ == EnumToken.CommentNodeType) { + l++; + continue; + } + break; } - } - else { - for (let m = k; m <= l; m++) { - rules.push(ast.chi[m]); + // @ts-ignore + const node = ast.chi[l]; + if (node.typ == EnumToken.DeclarationNodeType) { + for (let m = k; m <= l; m++) { + declarations.push(ast.chi[m]); + } + } + else { + for (let m = k; m <= l; m++) { + rules.push(ast.chi[m]); + } } + k = l; } - k = l; } if (declarations.length > 0) { ast.chi.length = 0; diff --git a/dist/src/lib/ast/features/transform.js b/dist/src/lib/ast/features/transform.js index 5ecd0109f..903768e94 100644 --- a/dist/src/lib/ast/features/transform.js +++ b/dist/src/lib/ast/features/transform.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, EnumAstNodeStatus } from '../types.js'; diff --git a/dist/src/lib/ast/features/type.js b/dist/src/lib/ast/features/type.js index 3f1b11e14..7266e3850 100644 --- a/dist/src/lib/ast/features/type.js +++ b/dist/src/lib/ast/features/type.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/ast/find.js b/dist/src/lib/ast/find.js index 652bdd596..87fcec8bb 100644 --- a/dist/src/lib/ast/find.js +++ b/dist/src/lib/ast/find.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from './types.js'; diff --git a/dist/src/lib/ast/math/expression.js b/dist/src/lib/ast/math/expression.js index 6b02e6d16..130f38083 100644 --- a/dist/src/lib/ast/math/expression.js +++ b/dist/src/lib/ast/math/expression.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { equalsIgnoreCase } from '../../parser/utils/text.js'; diff --git a/dist/src/lib/ast/math/math.js b/dist/src/lib/ast/math/math.js index f0e802744..f748ca404 100644 --- a/dist/src/lib/ast/math/math.js +++ b/dist/src/lib/ast/math/math.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { minifyNumber } from '../../syntax/syntax.js'; diff --git a/dist/src/lib/ast/minify.js b/dist/src/lib/ast/minify.js index e527793dd..d352fa60f 100644 --- a/dist/src/lib/ast/minify.js +++ b/dist/src/lib/ast/minify.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { eq } from '../parser/utils/eq.js'; @@ -17,6 +17,7 @@ import { TOKENS, PARENT, OPTIMIZED, RAW, combinators, LOCEND, LOCSTA, LOCSRCID } import { replaceNodeOrValue } from '../parser/utils/token.js'; import { parseString } from '../parser/parse.js'; import { replaceCompound } from './expand.js'; +import { equalsIgnoreCase } from '../parser/utils/text.js'; const notEndingWith = ["(", "["].concat(combinators); const rules = [ @@ -366,8 +367,35 @@ function doMinify(ast, options = {}, recursive = false, errors, nestingContent, previous = ast.chi[--nodeIndex]; } node = ast.chi[i]; - if (node.typ === EnumToken.AtRuleNodeType && node.nam === "font-face") { - continue; + if (node.typ === EnumToken.AtRuleNodeType) { + if (node.nam === "font-face") { + continue; + } + // https://drafts.csswg.org/css-mixins/#:~:text=The%20value%20of%20the%20result%20descriptor%20is%20always%2016px%20in%20the%20above%20example + if (equalsIgnoreCase(node.nam, "function")) { + const chi = node.chi; + let k = chi?.length; + let slice = false; + while (k--) { + if (chi[k].typ === EnumToken.CommentNodeType || + chi[k].typ === EnumToken.WhitespaceTokenType) { + continue; + } + if (chi[k].typ === EnumToken.DeclarationNodeType && + equalsIgnoreCase(chi[k].nam, "result")) { + slice = true; + break; + } + } + if (k > 0 && slice) { + while (k--) { + if (chi[k].typ === EnumToken.AtRuleNodeType) { + chi.splice(k, 1); + continue; + } + } + } + } } if (node.typ === EnumToken.KeyframesAtRuleNodeType) { if (previous?.typ === EnumToken.KeyframesAtRuleNodeType && diff --git a/dist/src/lib/ast/node.js b/dist/src/lib/ast/node.js index 498ae3de8..150795e45 100644 --- a/dist/src/lib/ast/node.js +++ b/dist/src/lib/ast/node.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { TOKENS, ERRORS, STATE, LOCSRCID, LOCSTA, LOCEND, PARENT } from '../syntax/constants.js'; diff --git a/dist/src/lib/ast/transform/compute.js b/dist/src/lib/ast/transform/compute.js index d676a8032..4adcb01a4 100644 --- a/dist/src/lib/ast/transform/compute.js +++ b/dist/src/lib/ast/transform/compute.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply, toZero } from './utils.js'; diff --git a/dist/src/lib/ast/transform/matrix.js b/dist/src/lib/ast/transform/matrix.js index e45bbbb00..63e07f0fa 100644 --- a/dist/src/lib/ast/transform/matrix.js +++ b/dist/src/lib/ast/transform/matrix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, is2DMatrix } from './utils.js'; diff --git a/dist/src/lib/ast/transform/minify.js b/dist/src/lib/ast/transform/minify.js index 3d4ccd489..cdc66516c 100644 --- a/dist/src/lib/ast/transform/minify.js +++ b/dist/src/lib/ast/transform/minify.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply, decompose, round, toZero } from './utils.js'; diff --git a/dist/src/lib/ast/transform/perspective.js b/dist/src/lib/ast/transform/perspective.js index 2fa1f13ba..5c2268ec9 100644 --- a/dist/src/lib/ast/transform/perspective.js +++ b/dist/src/lib/ast/transform/perspective.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/rotate.js b/dist/src/lib/ast/transform/rotate.js index 4df345ab7..e03e7dc6c 100644 --- a/dist/src/lib/ast/transform/rotate.js +++ b/dist/src/lib/ast/transform/rotate.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/scale.js b/dist/src/lib/ast/transform/scale.js index 2e1c91f98..51c32ad94 100644 --- a/dist/src/lib/ast/transform/scale.js +++ b/dist/src/lib/ast/transform/scale.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/skew.js b/dist/src/lib/ast/transform/skew.js index 7bf17a9cb..3c89d93c9 100644 --- a/dist/src/lib/ast/transform/skew.js +++ b/dist/src/lib/ast/transform/skew.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/translate.js b/dist/src/lib/ast/transform/translate.js index 30333adbc..9441f9df2 100644 --- a/dist/src/lib/ast/transform/translate.js +++ b/dist/src/lib/ast/transform/translate.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { identity, multiply } from './utils.js'; diff --git a/dist/src/lib/ast/transform/utils.js b/dist/src/lib/ast/transform/utils.js index a9c822f3c..8e2796d23 100644 --- a/dist/src/lib/ast/transform/utils.js +++ b/dist/src/lib/ast/transform/utils.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { epsilon } from '../../syntax/constants.js'; diff --git a/dist/src/lib/ast/types.js b/dist/src/lib/ast/types.js index 31a81a12c..98d253442 100644 --- a/dist/src/lib/ast/types.js +++ b/dist/src/lib/ast/types.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/ast/walk.js b/dist/src/lib/ast/walk.js index 02e2f1e7b..dae162630 100644 --- a/dist/src/lib/ast/walk.js +++ b/dist/src/lib/ast/walk.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { PARENT, TOKENS } from '../syntax/constants.js'; diff --git a/dist/src/lib/fs/resolve.js b/dist/src/lib/fs/resolve.js index 7a17fd9a0..d40dc7624 100644 --- a/dist/src/lib/fs/resolve.js +++ b/dist/src/lib/fs/resolve.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { memoize } from '../parser/utils/cache.js'; diff --git a/dist/src/lib/parser/declaration/list.js b/dist/src/lib/parser/declaration/list.js index ca13d34b4..845e914d7 100644 --- a/dist/src/lib/parser/declaration/list.js +++ b/dist/src/lib/parser/declaration/list.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { PropertySet } from './set.js'; @@ -33,6 +33,11 @@ class PropertyList { let result; for (const declaration of declarations) { name = declaration.typ != EnumToken.DeclarationNodeType ? null : declaration.nam; + // @functiom / result + if (declaration[STATE] & EnumAstNodeStatus.Unknown && equalsIgnoreCase("result", name)) { + this.declarations.set(declaration.nam, declaration); + continue; + } if (declaration[STATE] & (EnumAstNodeStatus.Invalid | EnumAstNodeStatus.Unknown | EnumAstNodeStatus.ValidationFailed) || declaration.typ != EnumToken.DeclarationNodeType || diff --git a/dist/src/lib/parser/declaration/map.js b/dist/src/lib/parser/declaration/map.js index cba78cab7..1ccfdf196 100644 --- a/dist/src/lib/parser/declaration/map.js +++ b/dist/src/lib/parser/declaration/map.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { eq } from '../utils/eq.js'; diff --git a/dist/src/lib/parser/declaration/set.js b/dist/src/lib/parser/declaration/set.js index a80669930..ea5762977 100644 --- a/dist/src/lib/parser/declaration/set.js +++ b/dist/src/lib/parser/declaration/set.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { eq } from '../utils/eq.js'; diff --git a/dist/src/lib/parser/linesmap.js b/dist/src/lib/parser/linesmap.js index 14bc6c1d7..6ff855448 100644 --- a/dist/src/lib/parser/linesmap.js +++ b/dist/src/lib/parser/linesmap.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/parser/parse.js b/dist/src/lib/parser/parse.js index a3525d273..23771087c 100644 --- a/dist/src/lib/parser/parse.js +++ b/dist/src/lib/parser/parse.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { isIdentColor, parseColor, isColor } from '../syntax/syntax.js'; diff --git a/dist/src/lib/parser/source.js b/dist/src/lib/parser/source.js index 9075bb427..3f189327d 100644 --- a/dist/src/lib/parser/source.js +++ b/dist/src/lib/parser/source.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { SourceMap } from '../printer/sourcemap/sourcemap.js'; diff --git a/dist/src/lib/parser/tokenize.js b/dist/src/lib/parser/tokenize.js index a4433694c..86265a717 100644 --- a/dist/src/lib/parser/tokenize.js +++ b/dist/src/lib/parser/tokenize.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, ColorType } from '../ast/types.js'; diff --git a/dist/src/lib/parser/utils/angle.js b/dist/src/lib/parser/utils/angle.js index 3007f033f..85e9b8db6 100644 --- a/dist/src/lib/parser/utils/angle.js +++ b/dist/src/lib/parser/utils/angle.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/at-rule-container.js b/dist/src/lib/parser/utils/at-rule-container.js index 3a797611b..aaded39c1 100644 --- a/dist/src/lib/parser/utils/at-rule-container.js +++ b/dist/src/lib/parser/utils/at-rule-container.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-font-feature-values.js b/dist/src/lib/parser/utils/at-rule-font-feature-values.js index c517127b7..4b7491733 100644 --- a/dist/src/lib/parser/utils/at-rule-font-feature-values.js +++ b/dist/src/lib/parser/utils/at-rule-font-feature-values.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getSyntaxRule } from '../../validation/config.js'; diff --git a/dist/src/lib/parser/utils/at-rule-generic.js b/dist/src/lib/parser/utils/at-rule-generic.js index cd6c83b66..f8f13c545 100644 --- a/dist/src/lib/parser/utils/at-rule-generic.js +++ b/dist/src/lib/parser/utils/at-rule-generic.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-import.js b/dist/src/lib/parser/utils/at-rule-import.js index ab7ef4bb7..8695d8d5e 100644 --- a/dist/src/lib/parser/utils/at-rule-import.js +++ b/dist/src/lib/parser/utils/at-rule-import.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-media.js b/dist/src/lib/parser/utils/at-rule-media.js index e5cc48f72..33efdd5c2 100644 --- a/dist/src/lib/parser/utils/at-rule-media.js +++ b/dist/src/lib/parser/utils/at-rule-media.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-support.js b/dist/src/lib/parser/utils/at-rule-support.js index 2df37aa24..515ad2239 100644 --- a/dist/src/lib/parser/utils/at-rule-support.js +++ b/dist/src/lib/parser/utils/at-rule-support.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule-when-else.js b/dist/src/lib/parser/utils/at-rule-when-else.js index 34001a7af..f82a6d584 100644 --- a/dist/src/lib/parser/utils/at-rule-when-else.js +++ b/dist/src/lib/parser/utils/at-rule-when-else.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/at-rule.js b/dist/src/lib/parser/utils/at-rule.js index 26eaf2dd1..050309ae8 100644 --- a/dist/src/lib/parser/utils/at-rule.js +++ b/dist/src/lib/parser/utils/at-rule.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { ValidationSyntaxGroupEnum } from '../../validation/parser/typedef.js'; diff --git a/dist/src/lib/parser/utils/base64.js b/dist/src/lib/parser/utils/base64.js index cd1ea11b7..7ce7a1b6f 100644 --- a/dist/src/lib/parser/utils/base64.js +++ b/dist/src/lib/parser/utils/base64.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/cache.js b/dist/src/lib/parser/utils/cache.js index 3f66e90c5..5ffb6bef8 100644 --- a/dist/src/lib/parser/utils/cache.js +++ b/dist/src/lib/parser/utils/cache.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/config.js b/dist/src/lib/parser/utils/config.js index f1202f66a..ba06e90b6 100644 --- a/dist/src/lib/parser/utils/config.js +++ b/dist/src/lib/parser/utils/config.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import config from '../../../data/properties.json.js'; diff --git a/dist/src/lib/parser/utils/declaration.js b/dist/src/lib/parser/utils/declaration.js index d881e83eb..f24d86a75 100644 --- a/dist/src/lib/parser/utils/declaration.js +++ b/dist/src/lib/parser/utils/declaration.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, EnumAstNodeStatus, ColorType } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/eq.js b/dist/src/lib/parser/utils/eq.js index 0c6e37f72..fad8bb6fb 100644 --- a/dist/src/lib/parser/utils/eq.js +++ b/dist/src/lib/parser/utils/eq.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/hash.js b/dist/src/lib/parser/utils/hash.js index 92fc91e2c..d8a809327 100644 --- a/dist/src/lib/parser/utils/hash.js +++ b/dist/src/lib/parser/utils/hash.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ // Alphabet: a-z, A-Z, 0-9, _, - diff --git a/dist/src/lib/parser/utils/selector.js b/dist/src/lib/parser/utils/selector.js index edb393146..88f284fa6 100644 --- a/dist/src/lib/parser/utils/selector.js +++ b/dist/src/lib/parser/utils/selector.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, EnumAstNodeStatus } from '../../ast/types.js'; diff --git a/dist/src/lib/parser/utils/text.js b/dist/src/lib/parser/utils/text.js index e562f575d..b730ff019 100644 --- a/dist/src/lib/parser/utils/text.js +++ b/dist/src/lib/parser/utils/text.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/lib/parser/utils/token.js b/dist/src/lib/parser/utils/token.js index e4ca13500..bdeb1a132 100644 --- a/dist/src/lib/parser/utils/token.js +++ b/dist/src/lib/parser/utils/token.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; @@ -17,6 +17,7 @@ const trimTokenSpace = new Set([ EnumToken.LteTokenType, EnumToken.ChildCombinatorTokenType, EnumToken.PipeTokenType, + EnumToken.ColonTokenType ]); const trimSpaceAfter = new Set([ ...tokensfuncSet.values(), diff --git a/dist/src/lib/parser/utils/type.js b/dist/src/lib/parser/utils/type.js index 6f0029253..f92b002b4 100644 --- a/dist/src/lib/parser/utils/type.js +++ b/dist/src/lib/parser/utils/type.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/printer/render.js b/dist/src/lib/printer/render.js index ce8a136ce..701d9a409 100644 --- a/dist/src/lib/printer/render.js +++ b/dist/src/lib/printer/render.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { convertColor, getAngle } from '../syntax/color/color.js'; diff --git a/dist/src/lib/printer/sourcemap/lib/codec.js b/dist/src/lib/printer/sourcemap/lib/codec.js index 42babd029..a531de8eb 100644 --- a/dist/src/lib/printer/sourcemap/lib/codec.js +++ b/dist/src/lib/printer/sourcemap/lib/codec.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ // from https://github.com/Rich-Harris/vlq/tree/master diff --git a/dist/src/lib/printer/sourcemap/sourcemap.js b/dist/src/lib/printer/sourcemap/sourcemap.js index 5e2c6de2a..329dee934 100644 --- a/dist/src/lib/printer/sourcemap/sourcemap.js +++ b/dist/src/lib/printer/sourcemap/sourcemap.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { toBase64 } from '../../parser/utils/base64.js'; diff --git a/dist/src/lib/syntax/color/a98rgb.js b/dist/src/lib/syntax/color/a98rgb.js index 614d7900e..f6d6521a3 100644 --- a/dist/src/lib/syntax/color/a98rgb.js +++ b/dist/src/lib/syntax/color/a98rgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { xyz2srgb } from './srgb.js'; diff --git a/dist/src/lib/syntax/color/alpha.js b/dist/src/lib/syntax/color/alpha.js index d7f32fe10..ce98fb2c9 100644 --- a/dist/src/lib/syntax/color/alpha.js +++ b/dist/src/lib/syntax/color/alpha.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { ColorType, EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/cmyk.js b/dist/src/lib/syntax/color/cmyk.js index a272a975c..fe15ba500 100644 --- a/dist/src/lib/syntax/color/cmyk.js +++ b/dist/src/lib/syntax/color/cmyk.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { ColorType, EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/color-mix.js b/dist/src/lib/syntax/color/color-mix.js index 77b9d0718..9f4487731 100644 --- a/dist/src/lib/syntax/color/color-mix.js +++ b/dist/src/lib/syntax/color/color-mix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, ColorType, EnumAstNodeStatus } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/color.js b/dist/src/lib/syntax/color/color.js index e3db7e2a7..e1c758e44 100644 --- a/dist/src/lib/syntax/color/color.js +++ b/dist/src/lib/syntax/color/color.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { ColorType, EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/hex.js b/dist/src/lib/syntax/color/hex.js index c9dbe231c..3d79c7a17 100644 --- a/dist/src/lib/syntax/color/hex.js +++ b/dist/src/lib/syntax/color/hex.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, ColorType } from '../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/hsl.js b/dist/src/lib/syntax/color/hsl.js index f50419188..4d6ef1b58 100644 --- a/dist/src/lib/syntax/color/hsl.js +++ b/dist/src/lib/syntax/color/hsl.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { color2srgbvalues, getNumber } from './color.js'; diff --git a/dist/src/lib/syntax/color/hwb.js b/dist/src/lib/syntax/color/hwb.js index 8c66f3f42..221eb4587 100644 --- a/dist/src/lib/syntax/color/hwb.js +++ b/dist/src/lib/syntax/color/hwb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/lab.js b/dist/src/lib/syntax/color/lab.js index e7cdc9e54..1b9190b2d 100644 --- a/dist/src/lib/syntax/color/lab.js +++ b/dist/src/lib/syntax/color/lab.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { e, k, D50 } from '../constants.js'; diff --git a/dist/src/lib/syntax/color/lch.js b/dist/src/lib/syntax/color/lch.js index cc988839b..84798d3f5 100644 --- a/dist/src/lib/syntax/color/lch.js +++ b/dist/src/lib/syntax/color/lch.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/oklab.js b/dist/src/lib/syntax/color/oklab.js index aaf516b40..01bdd7fac 100644 --- a/dist/src/lib/syntax/color/oklab.js +++ b/dist/src/lib/syntax/color/oklab.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/oklch.js b/dist/src/lib/syntax/color/oklch.js index 14eb66893..73b8c4394 100644 --- a/dist/src/lib/syntax/color/oklch.js +++ b/dist/src/lib/syntax/color/oklch.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/p3.js b/dist/src/lib/syntax/color/p3.js index 01008775c..cb0165d1c 100644 --- a/dist/src/lib/syntax/color/p3.js +++ b/dist/src/lib/syntax/color/p3.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { lsrgb2srgbvalues, xyz2srgb, srgb2lsrgbvalues } from './srgb.js'; diff --git a/dist/src/lib/syntax/color/prophotorgb.js b/dist/src/lib/syntax/color/prophotorgb.js index 8187f0236..4ce8b7c8f 100644 --- a/dist/src/lib/syntax/color/prophotorgb.js +++ b/dist/src/lib/syntax/color/prophotorgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { XYZ_D65_to_D50, xyzd502srgb } from './xyzd50.js'; diff --git a/dist/src/lib/syntax/color/rec2020.js b/dist/src/lib/syntax/color/rec2020.js index 373299cc8..03f660f00 100644 --- a/dist/src/lib/syntax/color/rec2020.js +++ b/dist/src/lib/syntax/color/rec2020.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { xyz2srgb } from './srgb.js'; diff --git a/dist/src/lib/syntax/color/relative-color.js b/dist/src/lib/syntax/color/relative-color.js index b330efaf2..ff5ee88dd 100644 --- a/dist/src/lib/syntax/color/relative-color.js +++ b/dist/src/lib/syntax/color/relative-color.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { convertColor, getNumber } from './color.js'; diff --git a/dist/src/lib/syntax/color/rgb.js b/dist/src/lib/syntax/color/rgb.js index 29cd7a41c..5be02528f 100644 --- a/dist/src/lib/syntax/color/rgb.js +++ b/dist/src/lib/syntax/color/rgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { color2srgbvalues, minmax } from './color.js'; diff --git a/dist/src/lib/syntax/color/srgb.js b/dist/src/lib/syntax/color/srgb.js index 3591a8109..06962a424 100644 --- a/dist/src/lib/syntax/color/srgb.js +++ b/dist/src/lib/syntax/color/srgb.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getColorComponents } from './utils/components.js'; diff --git a/dist/src/lib/syntax/color/utils/color-type.js b/dist/src/lib/syntax/color/utils/color-type.js index 06590962c..aa68ff749 100644 --- a/dist/src/lib/syntax/color/utils/color-type.js +++ b/dist/src/lib/syntax/color/utils/color-type.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { ColorType } from '../../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/utils/colorspace.js b/dist/src/lib/syntax/color/utils/colorspace.js index 02e559c86..03f090162 100644 --- a/dist/src/lib/syntax/color/utils/colorspace.js +++ b/dist/src/lib/syntax/color/utils/colorspace.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { equalsIgnoreCase } from '../../../parser/utils/text.js'; diff --git a/dist/src/lib/syntax/color/utils/components.js b/dist/src/lib/syntax/color/utils/components.js index a70ce7602..055836567 100644 --- a/dist/src/lib/syntax/color/utils/components.js +++ b/dist/src/lib/syntax/color/utils/components.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { ColorType, EnumToken } from '../../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/utils/distance.js b/dist/src/lib/syntax/color/utils/distance.js index 8e2a3ceaa..445e90182 100644 --- a/dist/src/lib/syntax/color/utils/distance.js +++ b/dist/src/lib/syntax/color/utils/distance.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { convertColor } from '../color.js'; diff --git a/dist/src/lib/syntax/color/utils/make-color.js b/dist/src/lib/syntax/color/utils/make-color.js index 62ed7d75e..236f5e040 100644 --- a/dist/src/lib/syntax/color/utils/make-color.js +++ b/dist/src/lib/syntax/color/utils/make-color.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken, ColorType } from '../../../ast/types.js'; diff --git a/dist/src/lib/syntax/color/utils/matrix.js b/dist/src/lib/syntax/color/utils/matrix.js index 5913c14ee..99dabd10b 100644 --- a/dist/src/lib/syntax/color/utils/matrix.js +++ b/dist/src/lib/syntax/color/utils/matrix.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ // from https://www.w3.org/TR/css-color-4/multiply-matrices.js diff --git a/dist/src/lib/syntax/color/xyz.js b/dist/src/lib/syntax/color/xyz.js index 23216d0c3..14a9eb490 100644 --- a/dist/src/lib/syntax/color/xyz.js +++ b/dist/src/lib/syntax/color/xyz.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { multiplyMatrices } from './utils/matrix.js'; diff --git a/dist/src/lib/syntax/color/xyzd50.js b/dist/src/lib/syntax/color/xyzd50.js index ae218cf38..b49ce2a1c 100644 --- a/dist/src/lib/syntax/color/xyzd50.js +++ b/dist/src/lib/syntax/color/xyzd50.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { lsrgb2srgbvalues } from './srgb.js'; diff --git a/dist/src/lib/syntax/constants.js b/dist/src/lib/syntax/constants.js index 81c26cbb1..2788d45d9 100644 --- a/dist/src/lib/syntax/constants.js +++ b/dist/src/lib/syntax/constants.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../ast/types.js'; diff --git a/dist/src/lib/syntax/syntax.js b/dist/src/lib/syntax/syntax.js index c7f53e055..8e4a9f10b 100644 --- a/dist/src/lib/syntax/syntax.js +++ b/dist/src/lib/syntax/syntax.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { isOkLabClose } from './color/utils/distance.js'; diff --git a/dist/src/lib/validation/config.js b/dist/src/lib/validation/config.js index c1e592ee1..0961b1681 100644 --- a/dist/src/lib/validation/config.js +++ b/dist/src/lib/validation/config.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import config from '../../data/validation.json.js'; diff --git a/dist/src/lib/validation/match.js b/dist/src/lib/validation/match.js index 1fe3c9000..8bc23da37 100644 --- a/dist/src/lib/validation/match.js +++ b/dist/src/lib/validation/match.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { getParsedSyntax, getSyntaxConfig } from './config.js'; @@ -875,9 +875,22 @@ function matchSyntax(syntaxes, context, options) { break; } const range = trimArray(context.peekRange()); + const args = range.slice(1, -1); context.next(); i++; - result = matchSyntax([syntaxes[i + 1]], createValidationContext(range.slice(1, -1)), options); + if (args.length === 0) { + context.update(range.at(-1)); + i += 2; + return { + success: true, + valid: true, + token, + context, + syntaxToken: syntaxes[i + 3], + errors: [], + }; + } + result = matchSyntax([syntaxes[i + 1]], createValidationContext(args), options); if (result.success) { context.update(range.at(-1)); i += 2; diff --git a/dist/src/lib/validation/parser/parse.js b/dist/src/lib/validation/parser/parse.js index 247de9537..dc8a8b3d2 100644 --- a/dist/src/lib/validation/parser/parse.js +++ b/dist/src/lib/validation/parser/parse.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/lib/validation/parser/typedef.js b/dist/src/lib/validation/parser/typedef.js index 11e590992..55799abf1 100644 --- a/dist/src/lib/validation/parser/typedef.js +++ b/dist/src/lib/validation/parser/typedef.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ var ValidationTokenEnum; diff --git a/dist/src/lib/validation/utils/list.js b/dist/src/lib/validation/utils/list.js index 682118a17..311241d0f 100644 --- a/dist/src/lib/validation/utils/list.js +++ b/dist/src/lib/validation/utils/list.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../../ast/types.js'; diff --git a/dist/src/node.js b/dist/src/node.js index b38526824..a6fda2d61 100644 --- a/dist/src/node.js +++ b/dist/src/node.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { deprecate } from 'node:util'; diff --git a/dist/src/types.js b/dist/src/types.js index 24cbbffdd..78ba445d5 100644 --- a/dist/src/types.js +++ b/dist/src/types.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ /** diff --git a/dist/src/utils/sync.js b/dist/src/utils/sync.js index c36c16294..896125c0f 100644 --- a/dist/src/utils/sync.js +++ b/dist/src/utils/sync.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { EnumToken } from '../lib/ast/types.js'; diff --git a/dist/src/web.js b/dist/src/web.js index 91ace38d2..552cd32a1 100644 --- a/dist/src/web.js +++ b/dist/src/web.js @@ -2,7 +2,7 @@ CSS parser, minifier and validator for node and the browser Author(s): Thierry Bela - Version: 1.6.9 + Version: 1.6.10 License: MIT */ import { doParse, doParseSync } from './lib/parser/parse.js'; diff --git a/jsr.json b/jsr.json index 6f2902941..70bdfa128 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@tbela99/css-parser", - "version": "1.6.9", + "version": "1.6.10", "publish": { "include": [ "src", diff --git a/package.json b/package.json index faf680ff9..21b8a1f92 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@tbela99/css-parser", "description": "CSS parser, minifier and validator for node and the browser", - "version": "1.6.9", + "version": "1.6.10", "exports": { ".": "./dist/src/node.js", "./node": "./dist/src/node.js", diff --git a/scripts/local-patch.json b/scripts/local-patch.json index 382854a11..dd3cce5b2 100644 --- a/scripts/local-patch.json +++ b/scripts/local-patch.json @@ -81,6 +81,12 @@ "@function": { "syntax": " @function (#?) [returns ]? { }" }, + "@mixin": { + "syntax": " @mixin [ #? ) | ]{}" + }, + "@apply": { + "syntax": " @apply [ | ] [ { } ]?;" + }, "@left-top": { "syntax": " @left-top { }" }, diff --git a/src/data/validation.json b/src/data/validation.json index 0fe14b61e..e58407a9b 100644 --- a/src/data/validation.json +++ b/src/data/validation.json @@ -1 +1 @@ -{"declarations":{"-ms-accelerator":{"syntax":"false | true"},"-ms-block-progression":{"syntax":"tb | rl | bt | lr"},"-ms-content-zoom-chaining":{"syntax":"none | chained"},"-ms-content-zoom-limit":{"syntax":"<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>"},"-ms-content-zoom-limit-max":{"syntax":""},"-ms-content-zoom-limit-min":{"syntax":""},"-ms-content-zoom-snap":{"syntax":"<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>"},"-ms-content-zoom-snap-points":{"syntax":"snapInterval( , ) | snapList( # )"},"-ms-content-zoom-snap-type":{"syntax":"none | proximity | mandatory"},"-ms-content-zooming":{"syntax":"none | zoom"},"-ms-filter":{"syntax":""},"-ms-flow-from":{"syntax":"[ none | ]#"},"-ms-flow-into":{"syntax":"[ none | ]#"},"-ms-grid-columns":{"syntax":"none | | "},"-ms-grid-rows":{"syntax":"none | | "},"-ms-high-contrast-adjust":{"syntax":"auto | none"},"-ms-hyphenate-limit-chars":{"syntax":"auto | {1,3}"},"-ms-hyphenate-limit-lines":{"syntax":"no-limit | "},"-ms-hyphenate-limit-zone":{"syntax":" | "},"-ms-ime-align":{"syntax":"auto | after"},"-ms-overflow-style":{"syntax":" auto | none | scrollbar | -ms-autohiding-scrollbar"},"-ms-scroll-chaining":{"syntax":"chained | none"},"-ms-scroll-limit":{"syntax":"<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>"},"-ms-scroll-limit-x-max":{"syntax":"auto | "},"-ms-scroll-limit-x-min":{"syntax":""},"-ms-scroll-limit-y-max":{"syntax":"auto | "},"-ms-scroll-limit-y-min":{"syntax":""},"-ms-scroll-rails":{"syntax":"none | railed"},"-ms-scroll-snap-points-x":{"syntax":"snapInterval( , ) | snapList( # )"},"-ms-scroll-snap-points-y":{"syntax":"snapInterval( , ) | snapList( # )"},"-ms-scroll-snap-type":{"syntax":"none | proximity | mandatory"},"-ms-scroll-snap-x":{"syntax":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>"},"-ms-scroll-snap-y":{"syntax":"<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>"},"-ms-scroll-translation":{"syntax":"none | vertical-to-horizontal"},"-ms-scrollbar-3dlight-color":{"syntax":""},"-ms-scrollbar-arrow-color":{"syntax":""},"-ms-scrollbar-base-color":{"syntax":""},"-ms-scrollbar-darkshadow-color":{"syntax":""},"-ms-scrollbar-face-color":{"syntax":""},"-ms-scrollbar-highlight-color":{"syntax":""},"-ms-scrollbar-shadow-color":{"syntax":""},"-ms-scrollbar-track-color":{"syntax":""},"-ms-text-autospace":{"syntax":"none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space"},"-ms-touch-select":{"syntax":"grippers | none"},"-ms-user-select":{"syntax":"none | element | text"},"-ms-wrap-flow":{"syntax":"auto | both | start | end | maximum | clear"},"-ms-wrap-margin":{"syntax":""},"-ms-wrap-through":{"syntax":"wrap | none"},"-moz-appearance":{"syntax":"none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized"},"-moz-binding":{"syntax":" | none"},"-moz-border-bottom-colors":{"syntax":"+ | none"},"-moz-border-left-colors":{"syntax":"+ | none"},"-moz-border-right-colors":{"syntax":"+ | none"},"-moz-border-top-colors":{"syntax":"+ | none"},"-moz-context-properties":{"syntax":"none | [ fill | fill-opacity | stroke | stroke-opacity ]#"},"-moz-float-edge":{"syntax":"border-box | content-box | margin-box | padding-box"},"-moz-force-broken-image-icon":{"syntax":"0 | 1"},"-moz-orient":{"syntax":"inline | block | horizontal | vertical"},"-moz-outline-radius":{"syntax":"{1,4} [ / {1,4} ]?"},"-moz-outline-radius-bottomleft":{"syntax":""},"-moz-outline-radius-bottomright":{"syntax":""},"-moz-outline-radius-topleft":{"syntax":""},"-moz-outline-radius-topright":{"syntax":""},"-moz-stack-sizing":{"syntax":"ignore | stretch-to-fit"},"-moz-text-blink":{"syntax":"none | blink"},"-moz-user-focus":{"syntax":"ignore | normal | select-after | select-before | select-menu | select-same | select-all | none"},"-moz-user-input":{"syntax":"auto | none | enabled | disabled"},"-moz-user-modify":{"syntax":"read-only | read-write | write-only"},"-moz-window-dragging":{"syntax":"drag | no-drag"},"-moz-window-shadow":{"syntax":"default | menu | tooltip | sheet | none"},"-webkit-appearance":{"syntax":" none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-button | media-seek-back-button | media-seek-forward-button | media-slider | media-sliderthumb | media-time-remaining-display | media-toggle-closed-captions-button | media-volume-slider | media-volume-slider-container | media-volume-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"},"-webkit-border-after":{"syntax":"<'border-top'>"},"-webkit-border-after-color":{"syntax":"<'border-top-color'>"},"-webkit-border-after-style":{"syntax":"<'border-top-style'>"},"-webkit-border-after-width":{"syntax":"<'border-top-width'>"},"-webkit-border-before":{"syntax":"<'border-top'>"},"-webkit-border-before-color":{"syntax":"<'border-top-color'>"},"-webkit-border-before-style":{"syntax":"<'border-top-style'>"},"-webkit-border-before-width":{"syntax":"<'border-top-width'>"},"-webkit-border-end":{"syntax":"<'border-top'>"},"-webkit-border-end-color":{"syntax":"<'border-top-color'>"},"-webkit-border-end-style":{"syntax":"<'border-top-style'>"},"-webkit-border-end-width":{"syntax":"<'border-top-width'>"},"-webkit-border-start":{"syntax":"<'border-top'>"},"-webkit-border-start-color":{"syntax":"<'border-top-color'>"},"-webkit-border-start-style":{"syntax":"<'border-top-style'>"},"-webkit-border-start-width":{"syntax":"<'border-top-width'>"},"-webkit-box-reflect":{"syntax":"[ above | below | right | left ]? ? ?"},"-webkit-line-clamp":{"syntax":"none | "},"-webkit-mask":{"syntax":"[ || [ / ]? || || [ | border | padding | content | text ] || [ | border | padding | content ] ]#"},"-webkit-mask-attachment":{"syntax":"#"},"-webkit-mask-clip":{"syntax":"[ | no-clip | border | padding | content | text ]#"},"-webkit-mask-composite":{"syntax":"#"},"-webkit-mask-image":{"syntax":"#"},"-webkit-mask-origin":{"syntax":"[ | border | padding | content ]#"},"-webkit-mask-position":{"syntax":"#"},"-webkit-mask-position-x":{"syntax":"[ | left | center | right ]#"},"-webkit-mask-position-y":{"syntax":"[ | top | center | bottom ]#"},"-webkit-mask-repeat":{"syntax":"#"},"-webkit-mask-repeat-x":{"syntax":"repeat | no-repeat | space | round"},"-webkit-mask-repeat-y":{"syntax":"repeat | no-repeat | space | round"},"-webkit-mask-size":{"syntax":"#"},"-webkit-overflow-scrolling":{"syntax":"auto | touch"},"-webkit-tap-highlight-color":{"syntax":""},"-webkit-text-fill-color":{"syntax":""},"-webkit-text-stroke":{"syntax":" || "},"-webkit-text-stroke-color":{"syntax":""},"-webkit-text-stroke-width":{"syntax":""},"-webkit-touch-callout":{"syntax":"default | none"},"-webkit-user-modify":{"syntax":"read-only | read-write | read-write-plaintext-only"},"-webkit-user-select":{"syntax":" auto | none | text | all"},"accent-color":{"syntax":"auto | "},"align-content":{"syntax":"normal | | | ? "},"align-items":{"syntax":"normal | stretch | | [ ? ] | anchor-center"},"align-self":{"syntax":"auto | normal | stretch | | ? | anchor-center"},"align-tracks":{"syntax":"[ normal | | | ? ]#"},"alignment-baseline":{"syntax":" auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"},"all":{"syntax":"initial | inherit | unset | revert | revert-layer"},"anchor-name":{"syntax":"none | #"},"anchor-scope":{"syntax":"none | all | #"},"animation":{"syntax":"#"},"animation-composition":{"syntax":"#"},"animation-delay":{"syntax":"