diff --git a/.gitignore b/.gitignore index c6c51761..420be673 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ /errors.txt /syntax.txt +/deno.lock +/.repl_history /ROADMAP.draft.md /.idea /.DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a04c78b..b9b16393 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ # Changelog +## v1.4.0 + +### CSS Module support + +- [x] scoped name generation +- composes: + - [x] compose from local selector + - [x] compose from other files + - [x] compose from global selector + - [x] comma separated compose list +- [x] :local +- [x] :global +- [x] :local() +- [x] :global() +- [x] selector +- [x] dashed ident (custom properties) +- [x] css at-rule property +- [x] css at-rule value +- [x] keyframe animations +- [x] grid +- naming + - [x] ignore + - [x] camelCase + - [x] camelCaseOnly + - [x] dashCase + - [x] dashCaseOnly +- default mode + - [x] global + - [x] local + - [x] pure(at least one class or id) + - icss + - [x] :import + - [x] :export + +### Bug Fixes +- [x] fix \ syntax validation #115 + ## v1.3.4 - [x] make streaming optional #109 diff --git a/README.md b/README.md index fd1332f3..e23b56d5 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,22 @@ $ deno add @tbela99/css-parser - no dependency - CSS validation based upon mdn-data -- fault-tolerant parser, will try to fix invalid tokens according to the CSS syntax module 3 recommendations. +- CSS modules support +- fault-tolerant parser implementing the CSS syntax module 3 recommendations. - fast and efficient minification without unsafe transforms, see [benchmark](https://tbela99.github.io/css-parser/benchmark/index.html) -- minify colors: color(), lab(), lch(), oklab(), oklch(), color-mix(), light-dark(), system colors and +- colors minification: color(), lab(), lch(), oklab(), oklch(), color-mix(), light-dark(), system colors and relative color -- generate nested css rules -- convert nested css rules to legacy syntax -- convert colors to any supported color format -- generate sourcemap -- compute css shorthands. see supported properties list below -- minify css transform functions -- evaluate math functions: calc(), clamp(), min(), max(), etc. -- inline css variables -- remove duplicate properties -- flatten @import rules +- color conversion to any supported color format +- automatic nested css rules generation +- nested css rules conversion to legacy syntax +- sourcemap generation +- css shorthands computation. see the supported properties list below +- css transform functions minification +- css math functions evaluation: calc(), clamp(), min(), max(), etc. +- css variables inlining +- duplicate properties removal +- @import rules flattening - experimental CSS prefix removal ## Online documentation @@ -49,11 +50,11 @@ See the full documentation at the [CSS Parser](https://tbela99.github.io/css-par Try it [online](https://tbela99.github.io/css-parser/playground/) -## Exports +## Import There are several ways to import the library into your application. -### Node exports +### Node import as a module @@ -64,7 +65,7 @@ import {transform} from '@tbela99/css-parser'; // ... ``` -### Deno exports +### Deno import as a module @@ -84,7 +85,7 @@ const {transform} = require('@tbela99/css-parser/cjs'); // ... ``` -### Web export +### Web Programmatic import @@ -162,19 +163,27 @@ Javascript umd module from cdn ``` -## Transform - -Parse and render css in a single pass. +## Exported functions -### Usage +```ts -```typescript +/* parse and render css */ +transform(css: string | ReadableStream, options?: TransformOptions = {}): Promise +/* parse css */ +parse(css: string | ReadableStream, options?: ParseOptions = {}): Promise; +/* render ast */ +render(ast: AstNode, options?: RenderOptions = {}): RenderResult; +/* parse and render css file or url */ +transformFile(filePathOrUrl: string, options?: TransformOptions = {}, asStream?: boolean): Promise; +/* parse css file or url */ +parseFile(filePathOrUrl: string, options?: ParseOptions = {}, asStream?: boolean): Promise; -transform(css: string | ReadableStream, transformOptions: TransformOptions = {}): TransformResult -parse(css: string | ReadableStream, parseOptions: ParseOptions = {}): ParseResult; -render(ast: AstNode, renderOptions: RenderOptions = {}): RenderResult; ``` +## Transform + +Parse and render css in a single pass. + ### Example ```javascript @@ -208,7 +217,7 @@ Include ParseOptions and RenderOptions > Minify Options - minify: boolean, optional. default to _true_. optimize ast. -- pass: number, optional. minification pass. default to 1 +- pass: number, optional. minification passes. default to 1 - nestingRules: boolean, optional. automatically generated nested rules. - expandNestingRules: boolean, optional. convert nesting rules into separate rules. will automatically set nestingRules to false. @@ -220,6 +229,10 @@ Include ParseOptions and RenderOptions in the :root {} or html {} rule. - removeEmpty: boolean, optional. remove empty rule lists from the ast. +> CSS modules Options + +- module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions, optional. css modules options. + > CSS Prefix Removal Options - removePrefix: boolean, optional. remove CSS prefixes. @@ -895,7 +908,7 @@ for (const {node, parent, root} of walk(ast)) { Ast can be transformed using node visitors -### Exemple 1: Declaration +### Example 1: Declaration the visitor is called for any declaration encountered @@ -930,7 +943,7 @@ console.debug(result.code); // .foo{transform:scale(calc(40/3))} ``` -### Exemple 2: Declaration +### Example 2: Declaration the visitor is called only on 'height' declarations @@ -985,7 +998,7 @@ console.debug(result.code); ``` -### Exemple 3: At-Rule +### Example 3: At-Rule the visitor is called on any at-rule @@ -1027,7 +1040,7 @@ console.debug(result.code); ``` -### Exemple 4: At-Rule +### Example 4: At-Rule the visitor is called only for at-rule media @@ -1069,7 +1082,7 @@ console.debug(result.code); ``` -### Exemple 5: Rule +### Example 5: Rule the visitor is called on any Rule @@ -1105,7 +1118,7 @@ console.debug(result.code); ``` -### Exemple 6: Rule +### Example 6: Rule Adding declarations to any rule diff --git a/dist/config.json.js b/dist/config.json.js index ce64e4c7..eadb3d68 100644 --- a/dist/config.json.js +++ b/dist/config.json.js @@ -562,6 +562,9 @@ var map = { }, animation: { shorthand: "animation", + separator: { + typ: "Comma" + }, pattern: "animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline", "default": [ "1", diff --git a/dist/index-umd-web.js b/dist/index-umd-web.js index 8212134f..babfab1c 100644 --- a/dist/index-umd-web.js +++ b/dist/index-umd-web.js @@ -433,6 +433,23 @@ * invalid declaration node type */ EnumToken[EnumToken["InvalidDeclarationNodeType"] = 94] = "InvalidDeclarationNodeType"; + /* css module nodes */ + /** + * composes token node type + */ + EnumToken[EnumToken["ComposesSelectorNodeType"] = 95] = "ComposesSelectorNodeType"; + /** + * css variable token type + */ + EnumToken[EnumToken["CssVariableTokenType"] = 96] = "CssVariableTokenType"; + /** + * css variable import token type + */ + EnumToken[EnumToken["CssVariableImportTokenType"] = 97] = "CssVariableImportTokenType"; + /** + * css variable declaration map token type + */ + EnumToken[EnumToken["CssVariableDeclarationMapTokenType"] = 98] = "CssVariableDeclarationMapTokenType"; /* aliases */ /** * alias for time token type @@ -549,7 +566,7 @@ exports.ColorType = void 0; (function (ColorType) { /** - * system colors + * deprecated system colors */ ColorType[ColorType["SYS"] = 0] = "SYS"; /** @@ -557,7 +574,7 @@ */ ColorType[ColorType["DPSYS"] = 1] = "DPSYS"; /** - * colors as literals + * named colors */ ColorType[ColorType["LIT"] = 2] = "LIT"; /** @@ -657,6 +674,48 @@ */ ColorType[ColorType["DEVICE_CMYK"] = 7] = "DEVICE_CMYK"; })(exports.ColorType || (exports.ColorType = {})); + exports.ModuleCaseTransformEnum = void 0; + (function (ModuleCaseTransformEnum) { + /** + * export class names as-is + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["IgnoreCase"] = 1] = "IgnoreCase"; + /** + * transform mapping key name to camel case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["CamelCase"] = 2] = "CamelCase"; + /** + * transform class names and mapping key name to camel case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["CamelCaseOnly"] = 4] = "CamelCaseOnly"; + /** + * transform mapping key name to dash case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["DashCase"] = 8] = "DashCase"; + /** + * transform class names and mapping key name to dash case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["DashCaseOnly"] = 16] = "DashCaseOnly"; + })(exports.ModuleCaseTransformEnum || (exports.ModuleCaseTransformEnum = {})); + exports.ModuleScopeEnumOptions = void 0; + (function (ModuleScopeEnumOptions) { + /** + * use the global scope + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Global"] = 32] = "Global"; + /** + * use the local scope + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Local"] = 64] = "Local"; + /** + * do not allow selector without an id or class + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Pure"] = 128] = "Pure"; + /** + * export using ICSS module format + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["ICSS"] = 256] = "ICSS"; + })(exports.ModuleScopeEnumOptions || (exports.ModuleScopeEnumOptions = {})); // from https://www.w3.org/TR/css-color-4/multiply-matrices.js /** @@ -3915,10 +3974,7 @@ // normalize hue for (const k of walkValues([object.h])) { if (k.value.typ == exports.EnumToken.AngleTokenType && k.value.unit == 'deg') { - // @ts-ignore k.value.typ = exports.EnumToken.NumberTokenType; - // @ts-ignore - delete k.value.unit; } } } @@ -4121,7 +4177,7 @@ function identity() { return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; } - function normalize(point) { + function normalize$1(point) { const [x, y, z] = point; const norm = Math.sqrt(point[0] * point[0] + point[1] * point[1] + point[2] * point[2]); return norm === 0 ? [0, 0, 0] : [x / norm, y / norm, z / norm]; @@ -4248,7 +4304,7 @@ ]; // Compute scale const scaleX = Math.hypot(...row0); - const row0Norm = normalize(row0); + const row0Norm = normalize$1(row0); const skewXY = dot(row0Norm, row1); const row1Proj = [ row1[0] - skewXY * row0Norm[0], @@ -4256,7 +4312,7 @@ row1[2] - skewXY * row0Norm[2] ]; const scaleY = Math.hypot(...row1Proj); - const row1Norm = normalize(row1Proj); + const row1Norm = normalize$1(row1Proj); const skewXZ = dot(row0Norm, row2); const skewYZ = dot(row1Norm, row2); const row2Proj = [ @@ -4264,7 +4320,7 @@ row2[1] - skewXZ * row0Norm[1] - skewYZ * row1Norm[1], row2[2] - skewXZ * row0Norm[2] - skewYZ * row1Norm[2] ]; - const row2Norm = normalize(row2Proj); + const row2Norm = normalize$1(row2Proj); const determinant = row0[0] * cross[0] + row0[1] * cross[1] + row0[2] * cross[2]; const scaleZ = Math.hypot(...row2Proj) * (determinant < 0 ? -1 : 1); // Build rotation matrix from orthonormalized vectors @@ -6530,6 +6586,9 @@ }, animation: { shorthand: "animation", + separator: { + typ: "Comma" + }, pattern: "animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline", "default": [ "1", @@ -7480,6 +7539,60 @@ }); return null; } + if ('composes' == node.nam.toLowerCase()) { + let left = []; + let right = []; + let current = 0; + let hasFrom = 0; + for (; current < node.val.length; current++) { + if (exports.EnumToken.WhitespaceTokenType == node.val[current].typ || exports.EnumToken.CommentTokenType == node.val[current].typ) { + if (!hasFrom) { + left.push(node.val[current]); + } + else { + right.push(node.val[current]); + } + continue; + } + if (exports.EnumToken.IdenTokenType == node.val[current].typ || exports.EnumToken.DashedIdenTokenType == node.val[current].typ || exports.EnumToken.StringTokenType == node.val[current].typ) { + if (exports.EnumToken.IdenTokenType == node.val[current].typ) { + if ('from' == node.val[current].val) { + if (hasFrom) { + return null; + } + hasFrom++; + continue; + } + } + if (hasFrom) { + right.push(node.val[current]); + } + else { + left.push(node.val[current]); + } + continue; + } + break; + } + if (hasFrom <= 1 && current > 0) { + if (hasFrom == 0) { + node.val.splice(0, left.length, { + typ: exports.EnumToken.ComposesSelectorNodeType, + l: left, + r: null + }); + } + else { + node.val.splice(0, current, { + typ: exports.EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a, b) => { + return a == null ? b : b.typ == exports.EnumToken.WhitespaceTokenType || b.typ == exports.EnumToken.CommentTokenType ? a : b; + }, null) + }); + } + } + } for (const { value: val, parent } of walkValues(node.val, node)) { if (val.typ == exports.EnumToken.AttrTokenType && val.chi.every((t) => [exports.EnumToken.IdenTokenType, exports.EnumToken.WhitespaceTokenType, exports.EnumToken.CommentTokenType].includes(t.typ))) { // @ts-ignore @@ -7526,6 +7639,13 @@ return buffer.length > 0 ? result + buffer : result; } + function dasherize(value) { + return value.replace(/([A-Z])/g, (all, one) => `-${one.toLowerCase()}`); + } + function camelize(value) { + return value.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); + } + // from https://github.com/Rich-Harris/vlq/tree/master // credit: Rich Harris const integer_to_char = {}; @@ -7672,9 +7792,10 @@ * render ast * @param data * @param options + * @param mapping * @private */ - function doRender(data, options = {}) { + function doRender(data, options = {}, mapping) { const minify = options.minify ?? true; const beautify = options.beautify ?? !minify; options = { @@ -7711,12 +7832,23 @@ const errors = []; const sourcemap = options.sourcemap ? new SourceMap : null; const cache = Object.create(null); + const position = { + ind: 0, + lin: 1, + col: 1 + }; + let code = ''; + if (mapping != null) { + if (mapping.importMapping != null) { + for (const [key, value] of Object.entries(mapping.importMapping)) { + code += `:import("${key}")${options.indent}{${options.newLine}${Object.entries(value).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${v}:${options.indent}${k};`, '')}${options.newLine}}${options.newLine}`; + } + } + code += `:export${options.indent}{${options.newLine}${Object.entries(mapping.mapping).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${k}:${options.indent}${v};`, '')}${options.newLine}}${options.newLine}`; + update(position, code); + } const result = { - code: renderAstNode(options.expandNestingRules && [exports.EnumToken.StyleSheetNodeType, exports.EnumToken.AtRuleNodeType, exports.EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data) : data, options, sourcemap, { - ind: 0, - lin: 1, - col: 1 - }, errors, function reducer(acc, curr) { + code: code + renderAstNode(options.expandNestingRules && [exports.EnumToken.StyleSheetNodeType, exports.EnumToken.AtRuleNodeType, exports.EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data) : data, options, sourcemap, position, errors, function reducer(acc, curr) { if (curr.typ == exports.EnumToken.CommentTokenType && options.removeComments) { if (!options.preserveLicense || !curr.val.startsWith('/*!')) { return acc; @@ -7875,6 +8007,11 @@ return `@${data.nam}${data.val === '' ? '' : options.indent || ' '}${data.val}${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; } return data.sel + `${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; + case exports.EnumToken.CssVariableTokenType: + case exports.EnumToken.CssVariableImportTokenType: + return `@value ${data.nam}:${options.indent}${filterValues((options.minify ? data.val : data.val)).reduce(reducer, '').trim()};`; + case exports.EnumToken.CssVariableDeclarationMapTokenType: + return `@value ${filterValues(data.vars).reduce((acc, curr) => acc + renderToken(curr), '').trim()} from ${filterValues(data.from).reduce((acc, curr) => acc + renderToken(curr), '').trim()};`; case exports.EnumToken.InvalidDeclarationNodeType: case exports.EnumToken.InvalidRuleTokenType: case exports.EnumToken.InvalidAtRuleTokenType: @@ -8029,6 +8166,8 @@ case exports.EnumToken.NameSpaceAttributeTokenType: return (token.l == null ? '' : renderToken(token.l, options, cache, reducer, errors)) + '|' + renderToken(token.r, options, cache, reducer, errors); + case exports.EnumToken.ComposesSelectorNodeType: + return token.l.reduce((acc, curr) => acc + renderToken(curr, options, cache), '') + (token.r == null ? '' : ' from ' + renderToken(token.r, options, cache, reducer, errors)); case exports.EnumToken.BlockStartTokenType: return '{'; case exports.EnumToken.BlockEndTokenType: @@ -8399,23 +8538,27 @@ } } function match$1(parseInfo, input) { - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + input.length + 1) == input; + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + input.length + 1) == input; } function peek(parseInfo, count = 1) { if (count == 1) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1); + return parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset + 1); } - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + count + 1); + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + count + 1); } function prev(parseInfo) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind - 1); + return parseInfo.offset == parseInfo.currentPosition.ind ? parseInfo.buffer.slice(-1) : parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset - 1); } function next(parseInfo, count = 1) { let char = ''; let chr = ''; - while (count-- && (chr = parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1))) { + let position = parseInfo.currentPosition.ind - parseInfo.offset; + while (count-- && (chr = parseInfo.stream.charAt(position + 1))) { char += chr; - const codepoint = parseInfo.stream.charCodeAt(++parseInfo.currentPosition.ind); + const codepoint = parseInfo.stream.charCodeAt(++position); + ++parseInfo.currentPosition.ind; if (isNewLine(codepoint)) { parseInfo.currentPosition.lin++; parseInfo.currentPosition.col = 0; @@ -8831,6 +8974,7 @@ const parseInfo = { stream: '', buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }; @@ -8838,7 +8982,17 @@ const reader = input.getReader(); while (true) { const { done, value } = await reader.read(); - parseInfo.stream += ArrayBuffer.isView(value) ? decoder.decode(value, { stream: true }) : value; + const stream = ArrayBuffer.isView(value) ? decoder.decode(value, { stream: true }) : value; + if (!done) { + if (parseInfo.stream.length > 2) { + parseInfo.stream = parseInfo.stream.slice(-2) + stream; + parseInfo.offset = parseInfo.currentPosition.ind - 1; + } + else { + parseInfo.stream = stream; + parseInfo.offset = Math.max(0, parseInfo.currentPosition.ind); + } + } yield* tokenize$1(parseInfo, done); if (done) { break; @@ -9601,7 +9755,7 @@ syntax: "[ ? ]+ | none" }, cursor: { - syntax: "[ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" + syntax: "[ [ [ ]? , ]* ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" }, cx: { syntax: " | " @@ -10829,6 +10983,12 @@ }, "white-space-trim": { syntax: "none | discard-before || discard-after || discard-inner" + }, + composes: { + syntax: "#" + }, + "composes-selector": { + syntax: "+ [from [global&&]]?" } }; var functions = { @@ -10854,7 +11014,7 @@ syntax: "atan2( , )" }, attr: { - syntax: "attr( ? [, ]? )" + syntax: "attr( ? , ? )" }, blur: { syntax: "blur( ? )" @@ -11207,7 +11367,7 @@ syntax: "scroll | fixed | local" }, "attr()": { - syntax: "attr( ? [, ]? )" + syntax: "attr( ? , ? )" }, "attr-matcher": { syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='" @@ -11215,6 +11375,9 @@ "attr-modifier": { syntax: "i | s" }, + "attr-type": { + syntax: "type( ) | raw-string | number | " + }, "attribute-selector": { syntax: "'[' ']' | '[' [ | ] ? ']'" }, @@ -11428,6 +11591,9 @@ "cubic-bezier-easing-function": { syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier( , , , )" }, + "cursor-predefined": { + syntax: "auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing" + }, "custom-color-space": { syntax: "" }, @@ -14349,8 +14515,7 @@ node: root, // @ts-ignore syntax: null, - error: 'expected selector', - tokens + error: 'expected selector' }; } tokens = tokens.slice(); @@ -14598,15 +14763,12 @@ return result; } } + // @ts-ignore return { valid: SyntaxValidationResult.Valid, - matches: [], - // @ts-ignore node: root, - // @ts-ignore syntax: null, - error: '', - tokens + error: '' }; } @@ -15250,6 +15412,7 @@ 'color', 'integer', 'bg-position', + 'composes-selector', 'length-percentage', 'flex', 'calc-sum', 'color', 'color-base', 'system-color', 'deprecated-system-color', 'pseudo-class-selector', 'pseudo-element-selector', 'feature-value-declaration' @@ -15280,6 +15443,9 @@ return { ...result, context }; } switch (syntax.val) { + case 'composes-selector': + success = token.typ == exports.EnumToken.ComposesSelectorNodeType; + break; case 'bg-position': { let val; let keyworkMatchCount = 0; @@ -15447,7 +15613,7 @@ } break; case 'integer': - success = (token.typ == exports.EnumToken.NumberTokenType && Number.isInteger(+token.val) && token.val > 0) || (token.typ == exports.EnumToken.FunctionTokenType && mathFuncs.includes(token.val.toLowerCase()) || (token.typ == exports.EnumToken.FunctionTokenType && wildCardFuncs.includes(token.val))); + success = (token.typ == exports.EnumToken.NumberTokenType && /^[+-]?\d+$/.test(token.val.toString())) || (token.typ == exports.EnumToken.FunctionTokenType && mathFuncs.includes(token.val.toLowerCase()) || (token.typ == exports.EnumToken.FunctionTokenType && wildCardFuncs.includes(token.val))); if ('range' in syntax) { success = success && +token.val >= +syntax.range[0] && +token.val <= +syntax.range[1]; } @@ -17610,6 +17776,91 @@ }; } + // Alphabet: a-z, A-Z, 0-9, _, - + const LOWER = "abcdefghijklmnopqrstuvwxyz"; + const DIGITS = "0123456789"; + const FULL_ALPHABET = (LOWER + DIGITS).split(""); // 64 chars + const FIRST_ALPHABET = (LOWER).split(""); // 54 chars (no digits) + /** + * supported hash algorithms + */ + const hashAlgorithms = ['hex', 'base64', 'base64url', 'sha1', 'sha256', 'sha384', 'sha512']; + // simple deterministic hash → number + function hashCode(str) { + let hash = 0; + let l = str.length; + let i = 0; + while (i < l) { + hash = (hash * 31 + str.charCodeAt(i++)) >>> 0; + } + return hash; + } + /** + * generate a hash id + * @param input + * @param length + */ + function hashId(input, length = 6) { + let n = hashCode(input); + const chars = []; + // First character: must not be a digit + chars.push(FIRST_ALPHABET[n % FIRST_ALPHABET.length]); + // Remaining characters + for (let i = 1; i < length; i++) { + n = (n + chars.length + i) % FULL_ALPHABET.length; + chars.push(FULL_ALPHABET[n]); + } + return chars.join(""); + } + /** + * convert input to hex + * @param input + */ + function toHex(input) { + let result = ''; + if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) { + for (const byte of Array.from(new Uint8Array(input))) { + result += byte.toString(16).padStart(2, '0'); + } + } + else { + for (const char of String(input)) { + result += char.charCodeAt(0).toString(16).padStart(2, '0'); + } + } + return result; + } + /** + * generate a hash + * @param input + * @param length + * @param algo + */ + async function hash(input, length = 6, algo) { + let result; + if (algo != null) { + switch (algo) { + case 'hex': + return toHex(input).slice(0, length); + case 'base64': + case 'base64url': + result = btoa(input); + if (algo == 'base64url') { + result = result.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); + } + return result.slice(0, length); + case 'sha1': + case 'sha256': + case 'sha384': + case 'sha512': + return toHex(await crypto.subtle.digest(algo.replace('sha', 'SHA-'), new TextEncoder().encode(input))).slice(0, length); + default: + throw new Error(`Unsupported hash algorithm: ${algo}`); + } + } + return hashId(input, length); + } + const urlTokenMatcher = /^(["']?)[a-zA-Z0-9_/.-][a-zA-Z0-9_/:.#?-]+(\1)$/; const trimWhiteSpace = [exports.EnumToken.CommentTokenType, exports.EnumToken.GtTokenType, exports.EnumToken.GteTokenType, exports.EnumToken.LtTokenType, exports.EnumToken.LteTokenType, exports.EnumToken.ColumnCombinatorTokenType]; const BadTokensTypes = [ @@ -17628,9 +17879,12 @@ function reject(reason) { throw new Error(reason ?? 'Parsing aborted'); } - function normalizeVisitorKeyName(keyName) { - return keyName.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); - } + /** + * replace token in its parent node + * @param parent + * @param value + * @param replacement + */ function replaceToken(parent, value, replacement) { for (const node of (Array.isArray(replacement) ? replacement : [replacement])) { if ('parent' in value && value.parent != node.parent) { @@ -17658,11 +17912,129 @@ target.splice(index, 1, ...(Array.isArray(replacement) ? replacement : [replacement])); } } + /** + * transform case of key name + * @param key + * @param how + * + * @throws Error + * @private + */ + function getKeyName(key, how) { + switch (how) { + case exports.ModuleCaseTransformEnum.CamelCase: + case exports.ModuleCaseTransformEnum.CamelCaseOnly: + return camelize(key); + case exports.ModuleCaseTransformEnum.DashCase: + case exports.ModuleCaseTransformEnum.DashCaseOnly: + return dasherize(key); + } + return key; + } + /** + * generate scoped name + * @param localName + * @param filePath + * @param pattern + * @param hashLength + * + * @throws Error + * @private + */ + async function generateScopedName(localName, filePath, pattern, hashLength = 5) { + if (localName.startsWith('--')) { + localName = localName.slice(2); + } + const matches = /.*?(([^/]+)\/)?([^/\\]*?)(\.([^?/]+))?([?].*)?$/.exec(filePath); + const folder = matches?.[2]?.replace?.(/[^A-Za-z0-9_-]/g, "_") ?? ''; + const fileBase = matches?.[3] ?? ''; + const ext = matches?.[5] ?? ''; + const path = filePath.replace(/[^A-Za-z0-9_-]/g, "_"); + // sanitize localName for safe char set (replace spaces/illegal chars) + const safeLocal = localName.replace(/[^A-Za-z0-9_-]/g, "_"); + const hashString = `${localName}::${filePath}`; + let result = ''; + let inParens = 0; + let key = ''; + let position = 0; + // Compose final scoped name. Ensure the entire class doesn't start with digit: + for (const char of pattern) { + position += char.length; + if (char == '[') { + inParens++; + if (inParens != 1) { + throw new Error(`Unexpected character: '${char} at position ${position - 1}' in pattern '${pattern}'`); + } + continue; + } + if (char == ']') { + inParens--; + if (inParens != 0) { + throw new Error(`Unexpected character: '${char}:${position - 1}'`); + } + let hashAlgo = null; + let length = null; + if (key.includes(':')) { + const parts = key.split(':'); + if (parts.length == 2) { + // @ts-ignore + [key, length] = parts; + // @ts-ignore + if (key == 'hash' && hashAlgorithms.includes(length)) { + // @ts-ignore + hashAlgo = length; + length = null; + } + } + if (parts.length == 3) { + // @ts-ignore + [key, hashAlgo, length] = parts; + } + if (length != null && !Number.isInteger(+length)) { + throw new Error(`Unsupported hash length: '${length}'. expecting format [hash:length] or [hash:hash-algo:length]`); + } + } + switch (key) { + case 'hash': + result += await hash(hashString, length ?? hashLength, hashAlgo); + break; + case 'name': + result += length != null ? fileBase.slice(0, +length) : fileBase; + break; + case 'local': + result += length != null ? safeLocal.slice(0, +length) : localName; + break; + case 'ext': + result += length != null ? ext.slice(0, +length) : ext; + break; + case 'path': + result += length != null ? path.slice(0, +length) : path; + break; + case 'folder': + result += length != null ? folder.slice(0, +length) : folder; + break; + default: + throw new Error(`Unsupported key: '${key}'`); + } + key = ''; + continue; + } + if (inParens > 0) { + key += char; + } + else { + result += char; + } + } + // if leading char is digit, prefix underscore (very rare) + return (/^[0-9]/.test(result) ? '_' : '') + result; + } /** * parse css string * @param iter * @param options * + * @throws Error * @private */ async function doParse(iter, options = {}) { @@ -17694,6 +18066,9 @@ if (typeof options.validation == 'boolean') { options.validation = options.validation ? exports.ValidationLevel.All : exports.ValidationLevel.None; } + if (options.module) { + options.expandNestingRules = true; + } if (options.expandNestingRules) { options.nestingRules = false; } @@ -17959,6 +18334,7 @@ const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), Object.assign({}, options, { @@ -18018,7 +18394,7 @@ } let node = result.node; for (const handler of handlers) { - callable = typeof handler == 'function' ? handler : handler[normalizeVisitorKeyName(node.typ == exports.EnumToken.DeclarationNodeType || node.typ == exports.EnumToken.AtRuleNodeType ? node.nam : node.val)]; + callable = typeof handler == 'function' ? handler : handler[camelize(node.typ == exports.EnumToken.DeclarationNodeType || node.typ == exports.EnumToken.AtRuleNodeType ? node.nam : node.val)]; if (callable == null) { continue; } @@ -18153,12 +18529,9 @@ } } } - const endTime = performance.now(); - if (options.signal != null) { - options.signal.removeEventListener('abort', reject); - } stats.bytesIn += stats.importedBytesIn; - return { + let endTime = performance.now(); + const result = { ast, errors, stats: { @@ -18168,6 +18541,503 @@ total: `${(endTime - startTime).toFixed(2)}ms` } }; + if (options.module) { + const moduleSettings = { + hashLength: 5, + filePath: '', + scoped: exports.ModuleScopeEnumOptions.Local, + naming: exports.ModuleCaseTransformEnum.IgnoreCase, + pattern: '', + generateScopedName, + ...(typeof options.module != 'object' ? {} : options.module) + }; + const parseModuleTime = performance.now(); + const namesMapping = {}; + const global = new Set; + const processed = new Set; + const pattern = typeof options.module == 'boolean' ? null : moduleSettings.pattern; + const importMapping = {}; + const cssVariablesMap = {}; + const importedCssVariables = {}; + let mapping = {}; + let revMapping = {}; + let filePath = typeof options.module == 'boolean' ? options.src : (moduleSettings.filePath ?? options.src); + filePath = filePath === '' ? options.src : options.resolve(filePath, options.dirname(options.src), options.cwd).relative; + if (typeof options.module == 'number') { + if (options.module & exports.ModuleCaseTransformEnum.CamelCase) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.CamelCase; + } + else if (options.module & exports.ModuleCaseTransformEnum.CamelCaseOnly) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.CamelCaseOnly; + } + else if (options.module & exports.ModuleCaseTransformEnum.DashCase) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.DashCase; + } + else if (options.module & exports.ModuleCaseTransformEnum.DashCaseOnly) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.DashCaseOnly; + } + if (options.module & exports.ModuleScopeEnumOptions.Global) { + moduleSettings.scoped = exports.ModuleScopeEnumOptions.Global; + } + if (options.module & exports.ModuleScopeEnumOptions.Pure) { + // @ts-ignore + moduleSettings.scoped |= exports.ModuleScopeEnumOptions.Pure; + } + if (options.module & exports.ModuleScopeEnumOptions.ICSS) { + // @ts-ignore + moduleSettings.scoped |= exports.ModuleScopeEnumOptions.ICSS; + } + } + if (typeof moduleSettings.scoped == 'boolean') { + moduleSettings.scoped = moduleSettings.scoped ? exports.ModuleScopeEnumOptions.Local : exports.ModuleScopeEnumOptions.Global; + } + moduleSettings.filePath = filePath; + moduleSettings.pattern = pattern != null && pattern !== '' ? pattern : (filePath === '' ? `[local]_[hash]` : `[local]_[hash]_[name]`); + for (const { node, parent } of walk(ast)) { + if (node.typ == exports.EnumToken.CssVariableImportTokenType) { + const url = node.val.find(t => t.typ == exports.EnumToken.StringTokenType).val.slice(1, -1); + const src = options.resolve(url, options.dirname(options.src), options.cwd); + const result = options.load(url, options.src); + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ + stream, + buffer: '', + offset: 0, + position: { ind: 0, lin: 1, col: 1 }, + currentPosition: { ind: -1, lin: 1, col: 0 } + }), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + })); + cssVariablesMap[node.nam] = root.cssModuleVariables; + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == exports.EnumToken.CssVariableDeclarationMapTokenType) { + const from = node.from.find(t => t.typ == exports.EnumToken.IdenTokenType || isIdentColor(t)); + if (!(from.val in cssVariablesMap)) { + errors.push({ + node, + message: `could not resolve @value import from '${from.val}'`, + action: 'drop' + }); + } + else { + for (const token of node.vars) { + if (token.typ == exports.EnumToken.IdenTokenType || isIdentColor(token)) { + if (!(token.val in cssVariablesMap[from.val])) { + errors.push({ + node, + message: `value '${token.val}' is not exported from '${from.val}'`, + action: 'drop' + }); + continue; + } + result.cssModuleVariables ??= {}; + result.cssModuleVariables[token.val] = importedCssVariables[token.val] = cssVariablesMap[from.val][token.val]; + } + } + } + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == exports.EnumToken.CssVariableTokenType) { + if (parent?.typ == exports.EnumToken.StyleSheetNodeType) { + if (result.cssModuleVariables == null) { + result.cssModuleVariables = {}; + } + result.cssModuleVariables[node.nam] = node; + } + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == exports.EnumToken.DeclarationNodeType) { + if (node.nam.startsWith('--')) { + if (!(node.nam in namesMapping)) { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? node.nam : moduleSettings.generateScopedName(node.nam, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[node.nam] = '--' + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[node.nam] = node.nam; + } + node.nam = mapping[node.nam]; + } + if ('composes' == node.nam.toLowerCase()) { + const tokens = []; + let isValid = true; + for (const token of node.val) { + if (token.typ == exports.EnumToken.ComposesSelectorNodeType) { + if (!(token.r == null || token.r.typ == exports.EnumToken.StringTokenType || token.r.typ == exports.EnumToken.IdenTokenType)) { + errors.push({ + action: 'drop', + message: `composes '${exports.EnumToken[token.r.typ]}' is not supported`, + node + }); + isValid = false; + break; + } + tokens.push(token); + } + } + // find parent rule + let parentRule = node.parent; + while (parentRule != null && parentRule.typ != exports.EnumToken.RuleNodeType) { + parentRule = parentRule.parent; + } + if (!isValid || tokens.length == 0) { + if (tokens.length == 0) { + errors.push({ + action: 'drop', + message: `composes is empty`, + node + }); + } + parentRule.chi.splice(parentRule.chi.indexOf(node), 1); + continue; + } + for (const token of tokens) { + // composes: a b c; + if (token.r == null) { + for (const rule of token.l) { + if (rule.typ == exports.EnumToken.WhitespaceTokenType || rule.typ == exports.EnumToken.CommentTokenType) { + continue; + } + if (!(rule.val in mapping)) { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? rule.val : moduleSettings.generateScopedName(rule.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[rule.val] = (rule.typ == exports.EnumToken.DashedIdenTokenType ? '--' : '') + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[mapping[rule.val]] = rule.val; + } + if (parentRule != null) { + for (const tk of parentRule.tokens) { + if (tk.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + mapping[key] = [...new Set([...mapping[key].split(' '), mapping[rule.val]])].join(' '); + } + } + } + } + } + } + // composes: a b c from 'file.css'; + else if (token.r.typ == exports.EnumToken.String) { + const url = token.r.val.slice(1, -1); + const src = options.resolve(url, options.dirname(options.src), options.cwd); + const result = options.load(url, options.src); + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ + stream, + buffer: '', + offset: 0, + position: { ind: 0, lin: 1, col: 1 }, + currentPosition: { ind: -1, lin: 1, col: 0 } + }), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + })); + const srcIndex = (src.relative.startsWith('/') || src.relative.startsWith('../') ? '' : './') + src.relative; + if (Object.keys(root.mapping).length > 0) { + importMapping[srcIndex] = {}; + } + if (parentRule != null) { + for (const tk of parentRule.tokens) { + if (tk.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + const values = []; + for (const iden of token.l) { + if (iden.typ != exports.EnumToken.IdenTokenType && iden.typ != exports.EnumToken.DashedIdenTokenType) { + continue; + } + if (!(iden.val in root.mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? iden.val : moduleSettings.generateScopedName(iden.val, srcIndex, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + root.mapping[iden.val] = (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + root.revMapping[root.mapping[iden.val]] = iden.val; + } + importMapping[srcIndex][iden.val] = root.mapping[iden.val]; + values.push(root.mapping[iden.val]); + } + mapping[key] = [...new Set([...mapping[key].split(' '), ...values])].join(' '); + } + } + } + } + } + // composes: a b c from global; + else if (token.r.typ == exports.EnumToken.IdenTokenType) { + // global + if (parentRule != null) { + if ('global' == token.r.val.toLowerCase()) { + for (const tk of parentRule.tokens) { + if (tk.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + mapping[key] = [...new Set([...mapping[key].split(' '), ...(token.l.reduce((acc, curr) => { + if (curr.typ == exports.EnumToken.IdenTokenType) { + acc.push(curr.val); + } + return acc; + }, []))])].join(' '); + } + } + } + } + else { + errors.push({ + action: 'drop', + message: `composes '${token.r.val}' is not supported`, + node + }); + } + } + } + } + parentRule.chi.splice(parentRule.chi.indexOf(node), 1); + } + if (node.typ == exports.EnumToken.DeclarationNodeType && ['grid-column', 'grid-column-start', 'grid-column-end', 'grid-row', 'grid-row-start', 'grid-row-end', 'grid-template', 'grid-template-columns', 'grid-template-rows'].includes(node.nam)) { + for (const { value } of walkValues(node.val, node)) { + if (value.typ != exports.EnumToken.IdenTokenType) { + continue; + } + let idenToken = value.val; + let suffix = ''; + if (idenToken.endsWith('-start')) { + suffix = '-start'; + idenToken = idenToken.slice(0, -6); + } + else if (idenToken.endsWith('-end')) { + suffix = '-end'; + idenToken = idenToken.slice(0, -4); + } + if (!(idenToken in mapping)) { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? idenToken : moduleSettings.generateScopedName(idenToken, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + if (result instanceof Promise) { + result = await result; + } + mapping[idenToken] = result; + revMapping[result] = idenToken; + if (suffix !== '') { + idenToken += suffix; + if (!(idenToken in mapping)) { + mapping[idenToken] = result + suffix; + revMapping[result + suffix] = idenToken; + } + } + } + value.val = mapping[idenToken]; + } + } + else if (node.nam == 'grid-template-areas' || node.nam == 'grid-template') { + for (let i = 0; i < node.val.length; i++) { + if (node.val[i].typ == exports.EnumToken.String) { + const tokens = parseString(node.val[i].val.slice(1, -1), { location: true }); + for (const { value } of walkValues(tokens)) { + if (value.typ == exports.EnumToken.IdenTokenType || value.typ == exports.EnumToken.DashedIdenTokenType) { + if (value.val in mapping) { + value.val = mapping[value.val]; + } + else { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + if (result instanceof Promise) { + result = await result; + } + mapping[value.val] = result; + revMapping[result] = value.val; + value.val = result; + } + } + } + node.val[i].val = node.val[i].val.charAt(0) + tokens.reduce((acc, curr) => acc + renderToken(curr), '') + node.val[i].val.charAt(node.val[i].val.length - 1); + } + } + } + else if (node.nam == 'animation' || node.nam == 'animation-name') { + for (const { value } of walkValues(node.val, node)) { + if (value.typ == exports.EnumToken.IdenTokenType && ![ + 'none', 'infinite', 'normal', 'reverse', 'alternate', + 'alternate-reverse', 'forwards', 'backwards', 'both', + 'running', 'paused', 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', + 'step-start', 'step-end', 'jump-start', 'jump-end', + 'jump-none', 'jump-both', 'start', 'end', + 'inherit', 'initial', 'unset' + ].includes(value.val)) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + mapping[value.val] = result instanceof Promise ? await result : result; + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + } + } + for (const { value, parent } of walkValues(node.val, node)) { + if (value.typ == exports.EnumToken.DashedIdenTokenType) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let val = result instanceof Promise ? await result : result; + mapping[value.val] = '--' + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming) : val); + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + else if ((value.typ == exports.EnumToken.IdenTokenType || isIdentColor(value)) && value.val in importedCssVariables) { + replaceToken(parent, value, importedCssVariables[value.val].val); + } + } + } + else if (node.typ == exports.EnumToken.RuleNodeType) { + if (node.tokens == null) { + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + value: parseSelector(parseString(node.sel, { location: true })) + }); + } + let hasIdOrClass = false; + for (const { value } of walkValues(node.tokens, node, + // @ts-ignore + (value, parent) => { + if (value.typ == exports.EnumToken.PseudoClassTokenType) { + const val = value.val.toLowerCase(); + switch (val) { + case ':local': + case ':global': + { + let index = parent.tokens.indexOf(value); + parent.tokens.splice(index, 1); + if (parent.tokens[index]?.typ == exports.EnumToken.WhitespaceTokenType || parent.tokens[index]?.typ == exports.EnumToken.DescendantCombinatorTokenType) { + parent.tokens.splice(index, 1); + } + if (val == ':global') { + for (; index < parent.tokens.length; index++) { + if (parent.tokens[index].typ == exports.EnumToken.CommaTokenType || + ([exports.EnumToken.PseudoClassFuncTokenType, exports.EnumToken.PseudoClassTokenType].includes(parent.tokens[index].typ) && + [':global', ':local'].includes(parent.tokens[index].val.toLowerCase()))) { + break; + } + global.add(parent.tokens[index]); + } + } + } + break; + } + } + else if (value.typ == exports.EnumToken.PseudoClassFuncTokenType) { + switch (value.val.toLowerCase()) { + case ':global': + for (const token of value.chi) { + global.add(token); + } + parent.tokens.splice(parent.tokens.indexOf(value), 1, ...value.chi); + break; + case ':local': + parent.tokens.splice(parent.tokens.indexOf(value), 1, ...value.chi); + break; + } + } + })) { + if (value.typ == exports.EnumToken.HashTokenType || value.typ == exports.EnumToken.ClassSelectorTokenType) { + hasIdOrClass = true; + } + if (processed.has(value)) { + continue; + } + processed.add(value); + if (value.typ == exports.EnumToken.PseudoClassTokenType) ; + else if (value.typ == exports.EnumToken.PseudoClassFuncTokenType) ; + else { + if (global.has(value)) { + continue; + } + if (value.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = value.val.slice(1); + if (!(val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? val : moduleSettings.generateScopedName(val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[val] = (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[mapping[val]] = val; + } + value.val = '.' + mapping[val]; + } + } + } + if (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Pure) { + if (!hasIdOrClass) { + throw new Error(`pure module: No id or class found in selector '${node.sel}' at '${node.loc?.src ?? ''}':${node.loc?.sta?.lin ?? ''}:${node.loc?.sta?.col ?? ''}`); + } + } + node.sel = ''; + for (const token of node.tokens) { + node.sel += renderToken(token); + } + } + else if (node.typ == exports.EnumToken.AtRuleNodeType || node.typ == exports.EnumToken.KeyframesAtRuleNodeType) { + const val = node.nam.toLowerCase(); + if (node.tokens == null) { + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + // @ts-ignore + value: parseAtRulePrelude(parseString(node.val), node) + }); + } + if (val == 'property' || val == 'keyframes') { + const prefix = val == 'property' ? '--' : ''; + for (const value of node.tokens) { + if ((prefix == '--' && value.typ == exports.EnumToken.DashedIdenTokenType) || (prefix == '' && value.typ == exports.EnumToken.IdenTokenType)) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let val = result instanceof Promise ? await result : result; + mapping[value.val] = prefix + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming) : val); + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + } + node.val = node.tokens.reduce((a, b) => a + renderToken(b), ''); + } + else { + let isReplaced = false; + for (const { value, parent } of walkValues(node.tokens, node)) { + if (exports.EnumToken.MediaQueryConditionTokenType == parent.typ && value != parent.l) { + if ((value.typ == exports.EnumToken.IdenTokenType || isIdentColor(value)) && value.val in importedCssVariables) { + isReplaced = true; + parent.r.splice(parent.r.indexOf(value), 1, ...importedCssVariables[value.val].val); + } + } + } + if (isReplaced) { + node.val = node.tokens.reduce((a, b) => a + renderToken(b), ''); + } + } + } + } + if (moduleSettings.naming != exports.ModuleCaseTransformEnum.IgnoreCase) { + revMapping = {}; + mapping = Object.entries(mapping).reduce((acc, [key, value]) => { + const keyName = getKeyName(key, moduleSettings.naming); + acc[keyName] = value; + revMapping[value] = keyName; + return acc; + }, {}); + } + result.mapping = mapping; + result.revMapping = revMapping; + if ((moduleSettings.scoped & exports.ModuleScopeEnumOptions.ICSS) && Object.keys(importMapping).length > 0) { + result.importMapping = importMapping; + } + endTime = performance.now(); + result.stats.module = `${(endTime - parseModuleTime).toFixed(2)}ms`; + result.stats.total = `${(endTime - startTime).toFixed(2)}ms`; + } + if (options.signal != null) { + options.signal.removeEventListener('abort', reject); + } + return result; } function getLastNode(context) { let i = context.chi.length; @@ -18385,6 +19255,147 @@ isValid = false; } } + if (node.nam == 'value') { + let i = 0; + while (i < tokens.length) { + if (tokens[i].typ == exports.EnumToken.WhitespaceTokenType || tokens[i].typ == exports.EnumToken.CommentTokenType) { + i++; + continue; + } + break; + } + if (i < tokens.length) { + if (tokens[i].typ == exports.EnumToken.IdenTokenType || isIdentColor(tokens[i])) { + let k = i + 1; + while (k < tokens.length) { + if (tokens[k].typ == exports.EnumToken.WhitespaceTokenType || tokens[k].typ == exports.EnumToken.CommentTokenType) { + k++; + continue; + } + // var or import + if (tokens[k].typ == exports.EnumToken.ColonTokenType) { + let j = k; + while (++j < tokens.length) { + if (tokens[j].typ != exports.EnumToken.WhitespaceTokenType && tokens[j].typ != exports.EnumToken.CommentTokenType) { + break; + } + } + let offset = k + 1; + while (offset < tokens.length && tokens[offset].typ == exports.EnumToken.WhitespaceTokenType) { + offset++; + } + if (tokens[j].typ == exports.EnumToken.StringTokenType) { + Object.assign(node, { + typ: exports.EnumToken.CssVariableImportTokenType, + nam: tokens[i].val, + val: tokens.slice(offset) + }); + delete node.tokens; + // @ts-ignore + delete node.raw; + context.chi.push(node); + return null; + } + Object.assign(node, { + typ: exports.EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(offset) + }); + context.chi.push(node); + return null; + } + if (tokens[k].typ == exports.EnumToken.PseudoClassTokenType) { + Object.assign(tokens[k], { + typ: exports.EnumToken.IdenTokenType, + val: tokens[k].val.slice(1) + }); + Object.assign(node, { + typ: exports.EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(k) + }); + context.chi.push(node); + return null; + } + if (tokens[k].typ == exports.EnumToken.CommaTokenType) { + let j = i; + while (++j < tokens.length) { + if (tokens[j].typ == exports.EnumToken.IdenTokenType && tokens[j].val.toLowerCase() == 'from') { + const vars = tokens.slice(i, j); + const from = tokens.slice(j + 1); + let l = 0; + let expect = exports.EnumToken.IdenTokenType; + for (; l < vars.length; l++) { + if (vars[l].typ == exports.EnumToken.WhitespaceTokenType || vars[l].typ == exports.EnumToken.CommentTokenType) { + continue; + } + if (expect == vars[l].typ || (expect == exports.EnumToken.IdenTokenType && isIdentColor(vars[l]))) { + expect = expect == exports.EnumToken.CommaTokenType ? exports.EnumToken.IdenTokenType : exports.EnumToken.CommaTokenType; + continue; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(vars[l]) ?? location, + message: `expecting '${exports.EnumToken[expect]}' but found ${renderToken(vars[l])}` + }); + return null; + } + l = 0; + expect = exports.EnumToken.IdenTokenType; + for (; l < from.length; l++) { + if (from[l].typ == exports.EnumToken.WhitespaceTokenType || from[l].typ == exports.EnumToken.CommentTokenType) { + continue; + } + if (expect == from[l].typ || isIdentColor(from[l])) { + while (++l < from.length) { + if (from[l].typ == exports.EnumToken.WhitespaceTokenType || from[l].typ == exports.EnumToken.CommentTokenType) { + continue; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `unexpected '${renderToken(from[l])}'` + }); + return null; + } + break; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `expecting but found ${renderToken(from[l])}` + }); + return null; + } + // @ts-ignore + delete node.nam; + // @ts-ignore + delete node.val; + Object.assign(node, { + typ: exports.EnumToken.CssVariableDeclarationMapTokenType, + vars, + from + }); + context.chi.push(node); + return null; + } + } + } + k++; + } + Object.assign(node, { + typ: exports.EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(k) + }); + context.chi.push(node); + return null; + } + } + } // @ts-ignore const skipValidate = (options.validation & exports.ValidationLevel.AtRule) == 0; const isAllowed = skipValidate || isNodeAllowedInContext(node, context); @@ -18923,6 +19934,7 @@ return doParse(tokenize$1({ stream: `.x{${declaration}}`, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), { setParent: false, minify: false, validation: false }).then(result => { @@ -19043,6 +20055,7 @@ const parseInfo = { stream: src, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }; @@ -19168,12 +20181,10 @@ val: +val.slice(0, -1) }; } - // if (isDimension(val)) { const dimension = parseDimension(val); if (dimension != null) { return dimension; } - // } const v = val.toLowerCase(); if (v == 'currentcolor' || v == 'transparent' || v in COLORS_NAMES) { return { @@ -19202,6 +20213,12 @@ val }; } + if (val.charAt(0) == '.' && isIdent(val.slice(1))) { + return { + typ: exports.EnumToken.ClassSelectorTokenType, + val + }; + } if (val.charAt(0) == '#' && isHexColor(val)) { return { typ: exports.EnumToken.ColorTokenType, @@ -19249,6 +20266,55 @@ function parseTokens(tokens, options = {}) { for (let i = 0; i < tokens.length; i++) { const t = tokens[i]; + if (t.typ == exports.EnumToken.IdenTokenType && t.val == 'from' && i > 0) { + const left = []; + const right = []; + let foundLeft = 0; + let foundRight = 0; + let k = i; + let l = i; + while (k > 0) { + if (tokens[k - 1].typ == exports.EnumToken.CommentTokenType || tokens[k - 1].typ == exports.EnumToken.WhitespaceTokenType) { + left.push(tokens[--k]); + continue; + } + if (tokens[k - 1].typ == exports.EnumToken.IdenTokenType || tokens[k - 1].typ == exports.EnumToken.DashedIdenTokenType) { + foundLeft++; + left.push(tokens[--k]); + continue; + } + break; + } + while (++l < tokens.length) { + if (tokens[l].typ == exports.EnumToken.CommentTokenType || tokens[l].typ == exports.EnumToken.WhitespaceTokenType) { + right.push(tokens[l]); + continue; + } + if (tokens[l].typ == exports.EnumToken.IdenTokenType || tokens[l].typ == exports.EnumToken.StringTokenType) { + foundRight++; + right.push(tokens[l]); + continue; + } + break; + } + if (foundLeft > 0 && foundRight == 1) { + while (left?.[0].typ == exports.EnumToken.WhitespaceTokenType) { + left.shift(); + } + while (left.at(-1)?.typ == exports.EnumToken.WhitespaceTokenType) { + left.pop(); + } + tokens.splice(k, l - k + 1, { + typ: exports.EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a, b) => { + return a == null ? b : b.typ == exports.EnumToken.IdenTokenType || b.typ == exports.EnumToken.StringTokenType ? b : a; + }, null) + }); + i = k; + continue; + } + } if (t.typ == exports.EnumToken.WhitespaceTokenType && ((i == 0 || i + 1 == tokens.length || [exports.EnumToken.CommaTokenType, exports.EnumToken.GteTokenType, exports.EnumToken.LteTokenType, exports.EnumToken.ColumnCombinatorTokenType].includes(tokens[i + 1].typ)) || @@ -19757,7 +20823,6 @@ * ``` */ function* walkValues(values, root = null, filter, reverse) { - // const set = new Set(); const stack = values.slice(); const map = new Map; let previous = null; @@ -19791,8 +20856,12 @@ continue; } // @ts-ignore - if (option != null && typeof option == 'object' && 'typ' in option) { - map.set(option, map.get(value) ?? root); + if (option != null && typeof option == 'object' && ('typ' in option || Array.isArray(option))) { + const op = Array.isArray(option) ? option : [option]; + for (const o of op) { + map.set(o, map.get(value) ?? root); + } + stack[reverse ? 'push' : 'unshift'](...op); } } } @@ -19815,12 +20884,12 @@ const values = []; if ('l' in value && value.l != null) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.l); + values.push(value.l); // @ts-ignore map.set(value.l, value); } if ('op' in value && typeof value.op == 'object') { - values[reverse ? 'push' : 'unshift'](value.op); + values.push(value.op); // @ts-ignore map.set(value.op, value); } @@ -19828,14 +20897,14 @@ if (Array.isArray(value.r)) { for (const r of value.r) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](r); + values.push(r); // @ts-ignore map.set(r, value); } } else { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.r); + values.push(value.r); // @ts-ignore map.set(value.r, value); } @@ -19851,8 +20920,12 @@ if (isValid) { option = filter.fn(value, map.get(value), exports.WalkerEvent.Leave); // @ts-ignore - if (option != null && 'typ' in option) { - map.set(option, map.get(value) ?? root); + if (option != null && ('typ' in option || Array.isArray(option))) { + const op = Array.isArray(option) ? option : [option]; + for (const o of op) { + map.set(o, map.get(value) ?? root); + } + stack[reverse ? 'push' : 'unshift'](...op); } } } @@ -19863,7 +20936,7 @@ /** * feature walk mode * - * @internal + * @private */ exports.FeatureWalkMode = void 0; (function (FeatureWalkMode) { @@ -20947,9 +22020,12 @@ }); } add(...declarations) { + let name; for (const declaration of declarations) { + name = declaration.typ != exports.EnumToken.DeclarationNodeType ? null : declaration.nam.toLowerCase(); if (declaration.typ != exports.EnumToken.DeclarationNodeType || - (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === declaration.nam.toLowerCase()) || + 'composes' === name || + (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === name) || (Array.isArray(this.options.removeDuplicateDeclarations) ? this.options.removeDuplicateDeclarations.includes(declaration.nam) : !this.options.removeDuplicateDeclarations)) { this.declarations.set(Number(Math.random().toString().slice(2)).toString(36), declaration); continue; @@ -22511,7 +23587,7 @@ continue; } else if (node.typ == previous?.typ && [exports.EnumToken.KeyFramesRuleNodeType, exports.EnumToken.RuleNodeType].includes(node.typ)) { - const intersect = diff(previous, node, reducer, options); + const intersect = diff$1(previous, node, reducer, options); if (intersect != null) { if (intersect.node1.chi.length == 0) { ast.chi.splice(i--, 1); @@ -22557,7 +23633,7 @@ nodeIndex = i; } if (recursive && node != null && ('chi' in node)) { - if (node.typ == exports.EnumToken.KeyframesAtRuleNodeType || !node.chi.some(n => n.typ == exports.EnumToken.DeclarationNodeType)) { + if (node.typ == exports.EnumToken.KeyframesAtRuleNodeType || !node.chi.some((n) => n.typ == exports.EnumToken.DeclarationNodeType)) { if (!(node.typ == exports.EnumToken.AtRuleNodeType && node.nam != 'font-face')) { doMinify(node, options, recursive, errors, nestingContent, context); } @@ -22990,7 +24066,7 @@ * * @private */ - function diff(n1, n2, reducer, options = {}) { + function diff$1(n1, n2, reducer, options = {}) { if (!('cache' in options)) { options.cache = new WeakMap(); } @@ -23388,6 +24464,9 @@ // // return path; // } + if (path === '') { + return ''; + } let i = 0; let parts = ['']; for (; i < path.length; i++) { @@ -23412,6 +24491,12 @@ * @private */ function splitPath(result) { + if (result.length == 0) { + return { parts: [], i: 0 }; + } + if (result === '/') { + return { parts: ['/'], i: 0 }; + } const parts = ['']; let i = 0; for (; i < result.length; i++) { @@ -23455,6 +24540,21 @@ } cwd ??= ''; currentDirectory ??= ''; + if (currentDirectory !== '' && url.startsWith(currentDirectory + '/')) { + return { + absolute: url, + relative: url.slice(currentDirectory.length + 1) + }; + } + if (currentDirectory === '' && cwd !== '' && url.startsWith(cwd == '/' ? cwd : cwd + '/')) { + cwd = normalize(cwd); + const absolute = normalize(url); + const prefix = cwd == '/' ? cwd : cwd + '/'; + return { + absolute, + relative: absolute.startsWith(prefix) ? absolute.slice(prefix.length) : diff(absolute, cwd) + }; + } if (matchUrl.test(currentDirectory)) { const path = new URL(url, currentDirectory).href; return { @@ -23469,9 +24569,15 @@ else if (currentDirectory.charAt(0) == '/') { result = dirname(currentDirectory) + '/' + url; } - let { parts, i } = splitPath(result); - const absolute = parts.join('/'); - const { parts: dirs } = splitPath(cwd ?? currentDirectory); + const absolute = normalize(result); + return { + absolute, + relative: absolute === '' ? '' : diff(absolute, cwd ?? currentDirectory), + }; + } + function diff(path1, path2) { + let { parts } = splitPath(path1); + const { parts: dirs } = splitPath(path2); for (const p of dirs) { if (parts[0] == p) { parts.shift(); @@ -23480,21 +24586,69 @@ parts.unshift('..'); } } - return { - absolute, - relative: parts.join('/') + (i < result.length ? result.slice(i) : '') - }; + return parts.join('/'); + } + function normalize(path) { + let parts = []; + let i = 0; + for (; i < path.length; i++) { + const chr = path.charAt(i); + if (chr == '/') { + if (parts.length == 0 || parts[parts.length - 1] !== '') { + parts.push(''); + } + } + else if (chr == '?' || chr == '#') { + break; + } + else { + parts[parts.length - 1] += chr; + } + } + let k = -1; + while (++k < parts.length) { + if (parts[k] == '.') { + parts.splice(k--, 1); + } + else if (parts[k] == '..') { + parts.splice(k - 1, 2); + k -= 2; + } + } + return (path.charAt(0) == '/' ? '/' : '') + parts.join('/'); } + /** + * response type + */ + exports.ResponseType = void 0; + (function (ResponseType) { + /** + * return text + */ + ResponseType[ResponseType["Text"] = 0] = "Text"; + /** + * return a readable stream + */ + ResponseType[ResponseType["ReadableStream"] = 1] = "ReadableStream"; + /** + * return an arraybuffer + */ + ResponseType[ResponseType["ArrayBuffer"] = 2] = "ArrayBuffer"; + })(exports.ResponseType || (exports.ResponseType = {})); + /** * default file or url loader * @param url * @param currentFile * - * @param asStream + * @param responseType * @private */ - async function load(url, currentFile = '.', asStream = false) { + async function load(url, currentFile = '.', responseType = false) { + if (typeof responseType == 'boolean') { + responseType = responseType ? exports.ResponseType.ReadableStream : exports.ResponseType.Text; + } let t; if (matchUrl.test(url)) { t = new URL(url); @@ -23510,13 +24664,17 @@ if (!response.ok) { throw new Error(`${response.status} ${response.statusText} ${response.url}`); } - return asStream ? response.body : await response.text(); + if (responseType == exports.ResponseType.ArrayBuffer) { + return response.arrayBuffer(); + } + return responseType == exports.ResponseType.ReadableStream ? response.body : await response.text(); }); } /** * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -23541,12 +24699,12 @@ * // } * ``` */ - function render(data, options = {}) { + function render(data, options = {}, mapping) { return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? self.location.pathname.endsWith('/') ? self.location.pathname : dirname(self.location.pathname) - })); + }), mapping); } /** * parse css file @@ -23606,6 +24764,7 @@ return doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), Object.assign(options, { @@ -23613,7 +24772,10 @@ resolve, dirname, cwd: options.cwd ?? self.location.pathname.endsWith('/') ? self.location.pathname : dirname(self.location.pathname) - })); + })).then(result => { + const { revMapping, ...res } = result; + return res; + }); } /** * transform css file @@ -23665,8 +24827,21 @@ options = { minify: true, removeEmpty: true, removeCharset: true, ...options }; const startTime = performance.now(); return parse(css, options).then((parseResult) => { + let mapping = null; + let importMapping = null; + if (typeof options.module == 'number' && (options.module & exports.ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } + else if (typeof options.module == 'object' && typeof options.module.scoped == 'number' && (options.module.scoped & exports.ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } // ast already expanded by parse - const rendered = render(parseResult.ast, { ...options, expandNestingRules: false }); + const rendered = render(parseResult.ast, { + ...options, + expandNestingRules: false + }, mapping != null ? { mapping, importMapping } : null); return { ...parseResult, ...rendered, diff --git a/dist/index.cjs b/dist/index.cjs index 85d14a0a..21307188 100644 --- a/dist/index.cjs +++ b/dist/index.cjs @@ -434,6 +434,23 @@ exports.EnumToken = void 0; * invalid declaration node type */ EnumToken[EnumToken["InvalidDeclarationNodeType"] = 94] = "InvalidDeclarationNodeType"; + /* css module nodes */ + /** + * composes token node type + */ + EnumToken[EnumToken["ComposesSelectorNodeType"] = 95] = "ComposesSelectorNodeType"; + /** + * css variable token type + */ + EnumToken[EnumToken["CssVariableTokenType"] = 96] = "CssVariableTokenType"; + /** + * css variable import token type + */ + EnumToken[EnumToken["CssVariableImportTokenType"] = 97] = "CssVariableImportTokenType"; + /** + * css variable declaration map token type + */ + EnumToken[EnumToken["CssVariableDeclarationMapTokenType"] = 98] = "CssVariableDeclarationMapTokenType"; /* aliases */ /** * alias for time token type @@ -550,7 +567,7 @@ exports.EnumToken = void 0; exports.ColorType = void 0; (function (ColorType) { /** - * system colors + * deprecated system colors */ ColorType[ColorType["SYS"] = 0] = "SYS"; /** @@ -558,7 +575,7 @@ exports.ColorType = void 0; */ ColorType[ColorType["DPSYS"] = 1] = "DPSYS"; /** - * colors as literals + * named colors */ ColorType[ColorType["LIT"] = 2] = "LIT"; /** @@ -658,6 +675,48 @@ exports.ColorType = void 0; */ ColorType[ColorType["DEVICE_CMYK"] = 7] = "DEVICE_CMYK"; })(exports.ColorType || (exports.ColorType = {})); +exports.ModuleCaseTransformEnum = void 0; +(function (ModuleCaseTransformEnum) { + /** + * export class names as-is + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["IgnoreCase"] = 1] = "IgnoreCase"; + /** + * transform mapping key name to camel case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["CamelCase"] = 2] = "CamelCase"; + /** + * transform class names and mapping key name to camel case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["CamelCaseOnly"] = 4] = "CamelCaseOnly"; + /** + * transform mapping key name to dash case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["DashCase"] = 8] = "DashCase"; + /** + * transform class names and mapping key name to dash case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["DashCaseOnly"] = 16] = "DashCaseOnly"; +})(exports.ModuleCaseTransformEnum || (exports.ModuleCaseTransformEnum = {})); +exports.ModuleScopeEnumOptions = void 0; +(function (ModuleScopeEnumOptions) { + /** + * use the global scope + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Global"] = 32] = "Global"; + /** + * use the local scope + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Local"] = 64] = "Local"; + /** + * do not allow selector without an id or class + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Pure"] = 128] = "Pure"; + /** + * export using ICSS module format + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["ICSS"] = 256] = "ICSS"; +})(exports.ModuleScopeEnumOptions || (exports.ModuleScopeEnumOptions = {})); // from https://www.w3.org/TR/css-color-4/multiply-matrices.js /** @@ -3916,10 +3975,7 @@ function computeComponentValue(expr, converted, values) { // normalize hue for (const k of walkValues([object.h])) { if (k.value.typ == exports.EnumToken.AngleTokenType && k.value.unit == 'deg') { - // @ts-ignore k.value.typ = exports.EnumToken.NumberTokenType; - // @ts-ignore - delete k.value.unit; } } } @@ -4122,7 +4178,7 @@ const epsilon = 1e-5; function identity() { return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; } -function normalize(point) { +function normalize$1(point) { const [x, y, z] = point; const norm = Math.sqrt(point[0] * point[0] + point[1] * point[1] + point[2] * point[2]); return norm === 0 ? [0, 0, 0] : [x / norm, y / norm, z / norm]; @@ -4249,7 +4305,7 @@ function decompose(original) { ]; // Compute scale const scaleX = Math.hypot(...row0); - const row0Norm = normalize(row0); + const row0Norm = normalize$1(row0); const skewXY = dot(row0Norm, row1); const row1Proj = [ row1[0] - skewXY * row0Norm[0], @@ -4257,7 +4313,7 @@ function decompose(original) { row1[2] - skewXY * row0Norm[2] ]; const scaleY = Math.hypot(...row1Proj); - const row1Norm = normalize(row1Proj); + const row1Norm = normalize$1(row1Proj); const skewXZ = dot(row0Norm, row2); const skewYZ = dot(row1Norm, row2); const row2Proj = [ @@ -4265,7 +4321,7 @@ function decompose(original) { row2[1] - skewXZ * row0Norm[1] - skewYZ * row1Norm[1], row2[2] - skewXZ * row0Norm[2] - skewYZ * row1Norm[2] ]; - const row2Norm = normalize(row2Proj); + const row2Norm = normalize$1(row2Proj); const determinant = row0[0] * cross[0] + row0[1] * cross[1] + row0[2] * cross[2]; const scaleZ = Math.hypot(...row2Proj) * (determinant < 0 ? -1 : 1); // Build rotation matrix from orthonormalized vectors @@ -6531,6 +6587,9 @@ var map = { }, animation: { shorthand: "animation", + separator: { + typ: "Comma" + }, pattern: "animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline", "default": [ "1", @@ -7481,6 +7540,60 @@ function parseDeclarationNode(node, errors, location) { }); return null; } + if ('composes' == node.nam.toLowerCase()) { + let left = []; + let right = []; + let current = 0; + let hasFrom = 0; + for (; current < node.val.length; current++) { + if (exports.EnumToken.WhitespaceTokenType == node.val[current].typ || exports.EnumToken.CommentTokenType == node.val[current].typ) { + if (!hasFrom) { + left.push(node.val[current]); + } + else { + right.push(node.val[current]); + } + continue; + } + if (exports.EnumToken.IdenTokenType == node.val[current].typ || exports.EnumToken.DashedIdenTokenType == node.val[current].typ || exports.EnumToken.StringTokenType == node.val[current].typ) { + if (exports.EnumToken.IdenTokenType == node.val[current].typ) { + if ('from' == node.val[current].val) { + if (hasFrom) { + return null; + } + hasFrom++; + continue; + } + } + if (hasFrom) { + right.push(node.val[current]); + } + else { + left.push(node.val[current]); + } + continue; + } + break; + } + if (hasFrom <= 1 && current > 0) { + if (hasFrom == 0) { + node.val.splice(0, left.length, { + typ: exports.EnumToken.ComposesSelectorNodeType, + l: left, + r: null + }); + } + else { + node.val.splice(0, current, { + typ: exports.EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a, b) => { + return a == null ? b : b.typ == exports.EnumToken.WhitespaceTokenType || b.typ == exports.EnumToken.CommentTokenType ? a : b; + }, null) + }); + } + } + } for (const { value: val, parent } of walkValues(node.val, node)) { if (val.typ == exports.EnumToken.AttrTokenType && val.chi.every((t) => [exports.EnumToken.IdenTokenType, exports.EnumToken.WhitespaceTokenType, exports.EnumToken.CommentTokenType].includes(t.typ))) { // @ts-ignore @@ -7527,6 +7640,13 @@ function parseGridTemplate(template) { return buffer.length > 0 ? result + buffer : result; } +function dasherize(value) { + return value.replace(/([A-Z])/g, (all, one) => `-${one.toLowerCase()}`); +} +function camelize(value) { + return value.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); +} + // from https://github.com/Rich-Harris/vlq/tree/master // credit: Rich Harris const integer_to_char = {}; @@ -7673,9 +7793,10 @@ function update(position, str) { * render ast * @param data * @param options + * @param mapping * @private */ -function doRender(data, options = {}) { +function doRender(data, options = {}, mapping) { const minify = options.minify ?? true; const beautify = options.beautify ?? !minify; options = { @@ -7712,12 +7833,23 @@ function doRender(data, options = {}) { const errors = []; const sourcemap = options.sourcemap ? new SourceMap : null; const cache = Object.create(null); + const position = { + ind: 0, + lin: 1, + col: 1 + }; + let code = ''; + if (mapping != null) { + if (mapping.importMapping != null) { + for (const [key, value] of Object.entries(mapping.importMapping)) { + code += `:import("${key}")${options.indent}{${options.newLine}${Object.entries(value).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${v}:${options.indent}${k};`, '')}${options.newLine}}${options.newLine}`; + } + } + code += `:export${options.indent}{${options.newLine}${Object.entries(mapping.mapping).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${k}:${options.indent}${v};`, '')}${options.newLine}}${options.newLine}`; + update(position, code); + } const result = { - code: renderAstNode(options.expandNestingRules && [exports.EnumToken.StyleSheetNodeType, exports.EnumToken.AtRuleNodeType, exports.EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data) : data, options, sourcemap, { - ind: 0, - lin: 1, - col: 1 - }, errors, function reducer(acc, curr) { + code: code + renderAstNode(options.expandNestingRules && [exports.EnumToken.StyleSheetNodeType, exports.EnumToken.AtRuleNodeType, exports.EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data) : data, options, sourcemap, position, errors, function reducer(acc, curr) { if (curr.typ == exports.EnumToken.CommentTokenType && options.removeComments) { if (!options.preserveLicense || !curr.val.startsWith('/*!')) { return acc; @@ -7876,6 +8008,11 @@ function renderAstNode(data, options, sourcemap, position, errors, reducer, cach return `@${data.nam}${data.val === '' ? '' : options.indent || ' '}${data.val}${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; } return data.sel + `${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; + case exports.EnumToken.CssVariableTokenType: + case exports.EnumToken.CssVariableImportTokenType: + return `@value ${data.nam}:${options.indent}${filterValues((options.minify ? data.val : data.val)).reduce(reducer, '').trim()};`; + case exports.EnumToken.CssVariableDeclarationMapTokenType: + return `@value ${filterValues(data.vars).reduce((acc, curr) => acc + renderToken(curr), '').trim()} from ${filterValues(data.from).reduce((acc, curr) => acc + renderToken(curr), '').trim()};`; case exports.EnumToken.InvalidDeclarationNodeType: case exports.EnumToken.InvalidRuleTokenType: case exports.EnumToken.InvalidAtRuleTokenType: @@ -8030,6 +8167,8 @@ function renderToken(token, options = {}, cache = Object.create(null), reducer, case exports.EnumToken.NameSpaceAttributeTokenType: return (token.l == null ? '' : renderToken(token.l, options, cache, reducer, errors)) + '|' + renderToken(token.r, options, cache, reducer, errors); + case exports.EnumToken.ComposesSelectorNodeType: + return token.l.reduce((acc, curr) => acc + renderToken(curr, options, cache), '') + (token.r == null ? '' : ' from ' + renderToken(token.r, options, cache, reducer, errors)); case exports.EnumToken.BlockStartTokenType: return '{'; case exports.EnumToken.BlockEndTokenType: @@ -8400,23 +8539,27 @@ function* consumeString(quoteStr, buffer, parseInfo) { } } function match$1(parseInfo, input) { - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + input.length + 1) == input; + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + input.length + 1) == input; } function peek(parseInfo, count = 1) { if (count == 1) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1); + return parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset + 1); } - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + count + 1); + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + count + 1); } function prev(parseInfo) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind - 1); + return parseInfo.offset == parseInfo.currentPosition.ind ? parseInfo.buffer.slice(-1) : parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset - 1); } function next(parseInfo, count = 1) { let char = ''; let chr = ''; - while (count-- && (chr = parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1))) { + let position = parseInfo.currentPosition.ind - parseInfo.offset; + while (count-- && (chr = parseInfo.stream.charAt(position + 1))) { char += chr; - const codepoint = parseInfo.stream.charCodeAt(++parseInfo.currentPosition.ind); + const codepoint = parseInfo.stream.charCodeAt(++position); + ++parseInfo.currentPosition.ind; if (isNewLine(codepoint)) { parseInfo.currentPosition.lin++; parseInfo.currentPosition.col = 0; @@ -8832,6 +8975,7 @@ async function* tokenizeStream(input) { const parseInfo = { stream: '', buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }; @@ -8839,7 +8983,17 @@ async function* tokenizeStream(input) { const reader = input.getReader(); while (true) { const { done, value } = await reader.read(); - parseInfo.stream += ArrayBuffer.isView(value) ? decoder.decode(value, { stream: true }) : value; + const stream = ArrayBuffer.isView(value) ? decoder.decode(value, { stream: true }) : value; + if (!done) { + if (parseInfo.stream.length > 2) { + parseInfo.stream = parseInfo.stream.slice(-2) + stream; + parseInfo.offset = parseInfo.currentPosition.ind - 1; + } + else { + parseInfo.stream = stream; + parseInfo.offset = Math.max(0, parseInfo.currentPosition.ind); + } + } yield* tokenize$1(parseInfo, done); if (done) { break; @@ -9602,7 +9756,7 @@ var declarations = { syntax: "[ ? ]+ | none" }, cursor: { - syntax: "[ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" + syntax: "[ [ [ ]? , ]* ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" }, cx: { syntax: " | " @@ -10830,6 +10984,12 @@ var declarations = { }, "white-space-trim": { syntax: "none | discard-before || discard-after || discard-inner" + }, + composes: { + syntax: "#" + }, + "composes-selector": { + syntax: "+ [from [global&&]]?" } }; var functions = { @@ -10855,7 +11015,7 @@ var functions = { syntax: "atan2( , )" }, attr: { - syntax: "attr( ? [, ]? )" + syntax: "attr( ? , ? )" }, blur: { syntax: "blur( ? )" @@ -11208,7 +11368,7 @@ var syntaxes = { syntax: "scroll | fixed | local" }, "attr()": { - syntax: "attr( ? [, ]? )" + syntax: "attr( ? , ? )" }, "attr-matcher": { syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='" @@ -11216,6 +11376,9 @@ var syntaxes = { "attr-modifier": { syntax: "i | s" }, + "attr-type": { + syntax: "type( ) | raw-string | number | " + }, "attribute-selector": { syntax: "'[' ']' | '[' [ | ] ? ']'" }, @@ -11429,6 +11592,9 @@ var syntaxes = { "cubic-bezier-easing-function": { syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier( , , , )" }, + "cursor-predefined": { + syntax: "auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing" + }, "custom-color-space": { syntax: "" }, @@ -14350,8 +14516,7 @@ function validateCompoundSelector(tokens, root, options) { node: root, // @ts-ignore syntax: null, - error: 'expected selector', - tokens + error: 'expected selector' }; } tokens = tokens.slice(); @@ -14599,15 +14764,12 @@ function validateRelativeSelectorList(tokens, root, options) { return result; } } + // @ts-ignore return { valid: SyntaxValidationResult.Valid, - matches: [], - // @ts-ignore node: root, - // @ts-ignore syntax: null, - error: '', - tokens + error: '' }; } @@ -14661,6 +14823,9 @@ function dirname(path) { // // return path; // } + if (path === '') { + return ''; + } let i = 0; let parts = ['']; for (; i < path.length; i++) { @@ -14685,6 +14850,12 @@ function dirname(path) { * @private */ function splitPath(result) { + if (result.length == 0) { + return { parts: [], i: 0 }; + } + if (result === '/') { + return { parts: ['/'], i: 0 }; + } const parts = ['']; let i = 0; for (; i < result.length; i++) { @@ -14728,6 +14899,21 @@ function resolve(url, currentDirectory, cwd) { } cwd ??= ''; currentDirectory ??= ''; + if (currentDirectory !== '' && url.startsWith(currentDirectory + '/')) { + return { + absolute: url, + relative: url.slice(currentDirectory.length + 1) + }; + } + if (currentDirectory === '' && cwd !== '' && url.startsWith(cwd == '/' ? cwd : cwd + '/')) { + cwd = normalize(cwd); + const absolute = normalize(url); + const prefix = cwd == '/' ? cwd : cwd + '/'; + return { + absolute, + relative: absolute.startsWith(prefix) ? absolute.slice(prefix.length) : diff$1(absolute, cwd) + }; + } if (matchUrl.test(currentDirectory)) { const path = new URL(url, currentDirectory).href; return { @@ -14742,9 +14928,15 @@ function resolve(url, currentDirectory, cwd) { else if (currentDirectory.charAt(0) == '/') { result = dirname(currentDirectory) + '/' + url; } - let { parts, i } = splitPath(result); - const absolute = parts.join('/'); - const { parts: dirs } = splitPath(cwd ?? currentDirectory); + const absolute = normalize(result); + return { + absolute, + relative: absolute === '' ? '' : diff$1(absolute, cwd ?? currentDirectory), + }; +} +function diff$1(path1, path2) { + let { parts } = splitPath(path1); + const { parts: dirs } = splitPath(path2); for (const p of dirs) { if (parts[0] == p) { parts.shift(); @@ -14753,16 +14945,61 @@ function resolve(url, currentDirectory, cwd) { parts.unshift('..'); } } - return { - absolute, - relative: parts.join('/') + (i < result.length ? result.slice(i) : '') - }; + return parts.join('/'); +} +function normalize(path) { + let parts = []; + let i = 0; + for (; i < path.length; i++) { + const chr = path.charAt(i); + if (chr == '/') { + if (parts.length == 0 || parts[parts.length - 1] !== '') { + parts.push(''); + } + } + else if (chr == '?' || chr == '#') { + break; + } + else { + parts[parts.length - 1] += chr; + } + } + let k = -1; + while (++k < parts.length) { + if (parts[k] == '.') { + parts.splice(k--, 1); + } + else if (parts[k] == '..') { + parts.splice(k - 1, 2); + k -= 2; + } + } + return (path.charAt(0) == '/' ? '/' : '') + parts.join('/'); } +/** + * response type + */ +exports.ResponseType = void 0; +(function (ResponseType) { + /** + * return text + */ + ResponseType[ResponseType["Text"] = 0] = "Text"; + /** + * return a readable stream + */ + ResponseType[ResponseType["ReadableStream"] = 1] = "ReadableStream"; + /** + * return an arraybuffer + */ + ResponseType[ResponseType["ArrayBuffer"] = 2] = "ArrayBuffer"; +})(exports.ResponseType || (exports.ResponseType = {})); + /** * feature walk mode * - * @internal + * @private */ exports.FeatureWalkMode = void 0; (function (FeatureWalkMode) { @@ -15378,6 +15615,7 @@ function matchPropertyType(syntax, context, options) { 'color', 'integer', 'bg-position', + 'composes-selector', 'length-percentage', 'flex', 'calc-sum', 'color', 'color-base', 'system-color', 'deprecated-system-color', 'pseudo-class-selector', 'pseudo-element-selector', 'feature-value-declaration' @@ -15408,6 +15646,9 @@ function matchPropertyType(syntax, context, options) { return { ...result, context }; } switch (syntax.val) { + case 'composes-selector': + success = token.typ == exports.EnumToken.ComposesSelectorNodeType; + break; case 'bg-position': { let val; let keyworkMatchCount = 0; @@ -15575,7 +15816,7 @@ function matchPropertyType(syntax, context, options) { } break; case 'integer': - success = (token.typ == exports.EnumToken.NumberTokenType && Number.isInteger(+token.val) && token.val > 0) || (token.typ == exports.EnumToken.FunctionTokenType && mathFuncs.includes(token.val.toLowerCase()) || (token.typ == exports.EnumToken.FunctionTokenType && wildCardFuncs.includes(token.val))); + success = (token.typ == exports.EnumToken.NumberTokenType && /^[+-]?\d+$/.test(token.val.toString())) || (token.typ == exports.EnumToken.FunctionTokenType && mathFuncs.includes(token.val.toLowerCase()) || (token.typ == exports.EnumToken.FunctionTokenType && wildCardFuncs.includes(token.val))); if ('range' in syntax) { success = success && +token.val >= +syntax.range[0] && +token.val <= +syntax.range[1]; } @@ -17738,6 +17979,91 @@ function validateAtRule(atRule, options, root) { }; } +// Alphabet: a-z, A-Z, 0-9, _, - +const LOWER = "abcdefghijklmnopqrstuvwxyz"; +const DIGITS = "0123456789"; +const FULL_ALPHABET = (LOWER + DIGITS).split(""); // 64 chars +const FIRST_ALPHABET = (LOWER).split(""); // 54 chars (no digits) +/** + * supported hash algorithms + */ +const hashAlgorithms = ['hex', 'base64', 'base64url', 'sha1', 'sha256', 'sha384', 'sha512']; +// simple deterministic hash → number +function hashCode(str) { + let hash = 0; + let l = str.length; + let i = 0; + while (i < l) { + hash = (hash * 31 + str.charCodeAt(i++)) >>> 0; + } + return hash; +} +/** + * generate a hash id + * @param input + * @param length + */ +function hashId(input, length = 6) { + let n = hashCode(input); + const chars = []; + // First character: must not be a digit + chars.push(FIRST_ALPHABET[n % FIRST_ALPHABET.length]); + // Remaining characters + for (let i = 1; i < length; i++) { + n = (n + chars.length + i) % FULL_ALPHABET.length; + chars.push(FULL_ALPHABET[n]); + } + return chars.join(""); +} +/** + * convert input to hex + * @param input + */ +function toHex(input) { + let result = ''; + if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) { + for (const byte of Array.from(new Uint8Array(input))) { + result += byte.toString(16).padStart(2, '0'); + } + } + else { + for (const char of String(input)) { + result += char.charCodeAt(0).toString(16).padStart(2, '0'); + } + } + return result; +} +/** + * generate a hash + * @param input + * @param length + * @param algo + */ +async function hash(input, length = 6, algo) { + let result; + if (algo != null) { + switch (algo) { + case 'hex': + return toHex(input).slice(0, length); + case 'base64': + case 'base64url': + result = btoa(input); + if (algo == 'base64url') { + result = result.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); + } + return result.slice(0, length); + case 'sha1': + case 'sha256': + case 'sha384': + case 'sha512': + return toHex(await crypto.subtle.digest(algo.replace('sha', 'SHA-'), new TextEncoder().encode(input))).slice(0, length); + default: + throw new Error(`Unsupported hash algorithm: ${algo}`); + } + } + return hashId(input, length); +} + const urlTokenMatcher = /^(["']?)[a-zA-Z0-9_/.-][a-zA-Z0-9_/:.#?-]+(\1)$/; const trimWhiteSpace = [exports.EnumToken.CommentTokenType, exports.EnumToken.GtTokenType, exports.EnumToken.GteTokenType, exports.EnumToken.LtTokenType, exports.EnumToken.LteTokenType, exports.EnumToken.ColumnCombinatorTokenType]; const BadTokensTypes = [ @@ -17756,9 +18082,12 @@ const enumTokenHints = new Set([ function reject(reason) { throw new Error(reason ?? 'Parsing aborted'); } -function normalizeVisitorKeyName(keyName) { - return keyName.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); -} +/** + * replace token in its parent node + * @param parent + * @param value + * @param replacement + */ function replaceToken(parent, value, replacement) { for (const node of (Array.isArray(replacement) ? replacement : [replacement])) { if ('parent' in value && value.parent != node.parent) { @@ -17786,11 +18115,129 @@ function replaceToken(parent, value, replacement) { target.splice(index, 1, ...(Array.isArray(replacement) ? replacement : [replacement])); } } +/** + * transform case of key name + * @param key + * @param how + * + * @throws Error + * @private + */ +function getKeyName(key, how) { + switch (how) { + case exports.ModuleCaseTransformEnum.CamelCase: + case exports.ModuleCaseTransformEnum.CamelCaseOnly: + return camelize(key); + case exports.ModuleCaseTransformEnum.DashCase: + case exports.ModuleCaseTransformEnum.DashCaseOnly: + return dasherize(key); + } + return key; +} +/** + * generate scoped name + * @param localName + * @param filePath + * @param pattern + * @param hashLength + * + * @throws Error + * @private + */ +async function generateScopedName(localName, filePath, pattern, hashLength = 5) { + if (localName.startsWith('--')) { + localName = localName.slice(2); + } + const matches = /.*?(([^/]+)\/)?([^/\\]*?)(\.([^?/]+))?([?].*)?$/.exec(filePath); + const folder = matches?.[2]?.replace?.(/[^A-Za-z0-9_-]/g, "_") ?? ''; + const fileBase = matches?.[3] ?? ''; + const ext = matches?.[5] ?? ''; + const path = filePath.replace(/[^A-Za-z0-9_-]/g, "_"); + // sanitize localName for safe char set (replace spaces/illegal chars) + const safeLocal = localName.replace(/[^A-Za-z0-9_-]/g, "_"); + const hashString = `${localName}::${filePath}`; + let result = ''; + let inParens = 0; + let key = ''; + let position = 0; + // Compose final scoped name. Ensure the entire class doesn't start with digit: + for (const char of pattern) { + position += char.length; + if (char == '[') { + inParens++; + if (inParens != 1) { + throw new Error(`Unexpected character: '${char} at position ${position - 1}' in pattern '${pattern}'`); + } + continue; + } + if (char == ']') { + inParens--; + if (inParens != 0) { + throw new Error(`Unexpected character: '${char}:${position - 1}'`); + } + let hashAlgo = null; + let length = null; + if (key.includes(':')) { + const parts = key.split(':'); + if (parts.length == 2) { + // @ts-ignore + [key, length] = parts; + // @ts-ignore + if (key == 'hash' && hashAlgorithms.includes(length)) { + // @ts-ignore + hashAlgo = length; + length = null; + } + } + if (parts.length == 3) { + // @ts-ignore + [key, hashAlgo, length] = parts; + } + if (length != null && !Number.isInteger(+length)) { + throw new Error(`Unsupported hash length: '${length}'. expecting format [hash:length] or [hash:hash-algo:length]`); + } + } + switch (key) { + case 'hash': + result += await hash(hashString, length ?? hashLength, hashAlgo); + break; + case 'name': + result += length != null ? fileBase.slice(0, +length) : fileBase; + break; + case 'local': + result += length != null ? safeLocal.slice(0, +length) : localName; + break; + case 'ext': + result += length != null ? ext.slice(0, +length) : ext; + break; + case 'path': + result += length != null ? path.slice(0, +length) : path; + break; + case 'folder': + result += length != null ? folder.slice(0, +length) : folder; + break; + default: + throw new Error(`Unsupported key: '${key}'`); + } + key = ''; + continue; + } + if (inParens > 0) { + key += char; + } + else { + result += char; + } + } + // if leading char is digit, prefix underscore (very rare) + return (/^[0-9]/.test(result) ? '_' : '') + result; +} /** * parse css string * @param iter * @param options * + * @throws Error * @private */ async function doParse(iter, options = {}) { @@ -17822,6 +18269,9 @@ async function doParse(iter, options = {}) { if (typeof options.validation == 'boolean') { options.validation = options.validation ? exports.ValidationLevel.All : exports.ValidationLevel.None; } + if (options.module) { + options.expandNestingRules = true; + } if (options.expandNestingRules) { options.nestingRules = false; } @@ -18087,6 +18537,7 @@ async function doParse(iter, options = {}) { const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), Object.assign({}, options, { @@ -18146,7 +18597,7 @@ async function doParse(iter, options = {}) { } let node = result.node; for (const handler of handlers) { - callable = typeof handler == 'function' ? handler : handler[normalizeVisitorKeyName(node.typ == exports.EnumToken.DeclarationNodeType || node.typ == exports.EnumToken.AtRuleNodeType ? node.nam : node.val)]; + callable = typeof handler == 'function' ? handler : handler[camelize(node.typ == exports.EnumToken.DeclarationNodeType || node.typ == exports.EnumToken.AtRuleNodeType ? node.nam : node.val)]; if (callable == null) { continue; } @@ -18281,12 +18732,9 @@ async function doParse(iter, options = {}) { } } } - const endTime = performance.now(); - if (options.signal != null) { - options.signal.removeEventListener('abort', reject); - } stats.bytesIn += stats.importedBytesIn; - return { + let endTime = performance.now(); + const result = { ast, errors, stats: { @@ -18296,6 +18744,503 @@ async function doParse(iter, options = {}) { total: `${(endTime - startTime).toFixed(2)}ms` } }; + if (options.module) { + const moduleSettings = { + hashLength: 5, + filePath: '', + scoped: exports.ModuleScopeEnumOptions.Local, + naming: exports.ModuleCaseTransformEnum.IgnoreCase, + pattern: '', + generateScopedName, + ...(typeof options.module != 'object' ? {} : options.module) + }; + const parseModuleTime = performance.now(); + const namesMapping = {}; + const global = new Set; + const processed = new Set; + const pattern = typeof options.module == 'boolean' ? null : moduleSettings.pattern; + const importMapping = {}; + const cssVariablesMap = {}; + const importedCssVariables = {}; + let mapping = {}; + let revMapping = {}; + let filePath = typeof options.module == 'boolean' ? options.src : (moduleSettings.filePath ?? options.src); + filePath = filePath === '' ? options.src : options.resolve(filePath, options.dirname(options.src), options.cwd).relative; + if (typeof options.module == 'number') { + if (options.module & exports.ModuleCaseTransformEnum.CamelCase) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.CamelCase; + } + else if (options.module & exports.ModuleCaseTransformEnum.CamelCaseOnly) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.CamelCaseOnly; + } + else if (options.module & exports.ModuleCaseTransformEnum.DashCase) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.DashCase; + } + else if (options.module & exports.ModuleCaseTransformEnum.DashCaseOnly) { + moduleSettings.naming = exports.ModuleCaseTransformEnum.DashCaseOnly; + } + if (options.module & exports.ModuleScopeEnumOptions.Global) { + moduleSettings.scoped = exports.ModuleScopeEnumOptions.Global; + } + if (options.module & exports.ModuleScopeEnumOptions.Pure) { + // @ts-ignore + moduleSettings.scoped |= exports.ModuleScopeEnumOptions.Pure; + } + if (options.module & exports.ModuleScopeEnumOptions.ICSS) { + // @ts-ignore + moduleSettings.scoped |= exports.ModuleScopeEnumOptions.ICSS; + } + } + if (typeof moduleSettings.scoped == 'boolean') { + moduleSettings.scoped = moduleSettings.scoped ? exports.ModuleScopeEnumOptions.Local : exports.ModuleScopeEnumOptions.Global; + } + moduleSettings.filePath = filePath; + moduleSettings.pattern = pattern != null && pattern !== '' ? pattern : (filePath === '' ? `[local]_[hash]` : `[local]_[hash]_[name]`); + for (const { node, parent } of walk(ast)) { + if (node.typ == exports.EnumToken.CssVariableImportTokenType) { + const url = node.val.find(t => t.typ == exports.EnumToken.StringTokenType).val.slice(1, -1); + const src = options.resolve(url, options.dirname(options.src), options.cwd); + const result = options.load(url, options.src); + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ + stream, + buffer: '', + offset: 0, + position: { ind: 0, lin: 1, col: 1 }, + currentPosition: { ind: -1, lin: 1, col: 0 } + }), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + })); + cssVariablesMap[node.nam] = root.cssModuleVariables; + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == exports.EnumToken.CssVariableDeclarationMapTokenType) { + const from = node.from.find(t => t.typ == exports.EnumToken.IdenTokenType || isIdentColor(t)); + if (!(from.val in cssVariablesMap)) { + errors.push({ + node, + message: `could not resolve @value import from '${from.val}'`, + action: 'drop' + }); + } + else { + for (const token of node.vars) { + if (token.typ == exports.EnumToken.IdenTokenType || isIdentColor(token)) { + if (!(token.val in cssVariablesMap[from.val])) { + errors.push({ + node, + message: `value '${token.val}' is not exported from '${from.val}'`, + action: 'drop' + }); + continue; + } + result.cssModuleVariables ??= {}; + result.cssModuleVariables[token.val] = importedCssVariables[token.val] = cssVariablesMap[from.val][token.val]; + } + } + } + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == exports.EnumToken.CssVariableTokenType) { + if (parent?.typ == exports.EnumToken.StyleSheetNodeType) { + if (result.cssModuleVariables == null) { + result.cssModuleVariables = {}; + } + result.cssModuleVariables[node.nam] = node; + } + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == exports.EnumToken.DeclarationNodeType) { + if (node.nam.startsWith('--')) { + if (!(node.nam in namesMapping)) { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? node.nam : moduleSettings.generateScopedName(node.nam, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[node.nam] = '--' + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[node.nam] = node.nam; + } + node.nam = mapping[node.nam]; + } + if ('composes' == node.nam.toLowerCase()) { + const tokens = []; + let isValid = true; + for (const token of node.val) { + if (token.typ == exports.EnumToken.ComposesSelectorNodeType) { + if (!(token.r == null || token.r.typ == exports.EnumToken.StringTokenType || token.r.typ == exports.EnumToken.IdenTokenType)) { + errors.push({ + action: 'drop', + message: `composes '${exports.EnumToken[token.r.typ]}' is not supported`, + node + }); + isValid = false; + break; + } + tokens.push(token); + } + } + // find parent rule + let parentRule = node.parent; + while (parentRule != null && parentRule.typ != exports.EnumToken.RuleNodeType) { + parentRule = parentRule.parent; + } + if (!isValid || tokens.length == 0) { + if (tokens.length == 0) { + errors.push({ + action: 'drop', + message: `composes is empty`, + node + }); + } + parentRule.chi.splice(parentRule.chi.indexOf(node), 1); + continue; + } + for (const token of tokens) { + // composes: a b c; + if (token.r == null) { + for (const rule of token.l) { + if (rule.typ == exports.EnumToken.WhitespaceTokenType || rule.typ == exports.EnumToken.CommentTokenType) { + continue; + } + if (!(rule.val in mapping)) { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? rule.val : moduleSettings.generateScopedName(rule.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[rule.val] = (rule.typ == exports.EnumToken.DashedIdenTokenType ? '--' : '') + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[mapping[rule.val]] = rule.val; + } + if (parentRule != null) { + for (const tk of parentRule.tokens) { + if (tk.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + mapping[key] = [...new Set([...mapping[key].split(' '), mapping[rule.val]])].join(' '); + } + } + } + } + } + } + // composes: a b c from 'file.css'; + else if (token.r.typ == exports.EnumToken.String) { + const url = token.r.val.slice(1, -1); + const src = options.resolve(url, options.dirname(options.src), options.cwd); + const result = options.load(url, options.src); + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ + stream, + buffer: '', + offset: 0, + position: { ind: 0, lin: 1, col: 1 }, + currentPosition: { ind: -1, lin: 1, col: 0 } + }), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + })); + const srcIndex = (src.relative.startsWith('/') || src.relative.startsWith('../') ? '' : './') + src.relative; + if (Object.keys(root.mapping).length > 0) { + importMapping[srcIndex] = {}; + } + if (parentRule != null) { + for (const tk of parentRule.tokens) { + if (tk.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + const values = []; + for (const iden of token.l) { + if (iden.typ != exports.EnumToken.IdenTokenType && iden.typ != exports.EnumToken.DashedIdenTokenType) { + continue; + } + if (!(iden.val in root.mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? iden.val : moduleSettings.generateScopedName(iden.val, srcIndex, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + root.mapping[iden.val] = (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + root.revMapping[root.mapping[iden.val]] = iden.val; + } + importMapping[srcIndex][iden.val] = root.mapping[iden.val]; + values.push(root.mapping[iden.val]); + } + mapping[key] = [...new Set([...mapping[key].split(' '), ...values])].join(' '); + } + } + } + } + } + // composes: a b c from global; + else if (token.r.typ == exports.EnumToken.IdenTokenType) { + // global + if (parentRule != null) { + if ('global' == token.r.val.toLowerCase()) { + for (const tk of parentRule.tokens) { + if (tk.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + mapping[key] = [...new Set([...mapping[key].split(' '), ...(token.l.reduce((acc, curr) => { + if (curr.typ == exports.EnumToken.IdenTokenType) { + acc.push(curr.val); + } + return acc; + }, []))])].join(' '); + } + } + } + } + else { + errors.push({ + action: 'drop', + message: `composes '${token.r.val}' is not supported`, + node + }); + } + } + } + } + parentRule.chi.splice(parentRule.chi.indexOf(node), 1); + } + if (node.typ == exports.EnumToken.DeclarationNodeType && ['grid-column', 'grid-column-start', 'grid-column-end', 'grid-row', 'grid-row-start', 'grid-row-end', 'grid-template', 'grid-template-columns', 'grid-template-rows'].includes(node.nam)) { + for (const { value } of walkValues(node.val, node)) { + if (value.typ != exports.EnumToken.IdenTokenType) { + continue; + } + let idenToken = value.val; + let suffix = ''; + if (idenToken.endsWith('-start')) { + suffix = '-start'; + idenToken = idenToken.slice(0, -6); + } + else if (idenToken.endsWith('-end')) { + suffix = '-end'; + idenToken = idenToken.slice(0, -4); + } + if (!(idenToken in mapping)) { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? idenToken : moduleSettings.generateScopedName(idenToken, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + if (result instanceof Promise) { + result = await result; + } + mapping[idenToken] = result; + revMapping[result] = idenToken; + if (suffix !== '') { + idenToken += suffix; + if (!(idenToken in mapping)) { + mapping[idenToken] = result + suffix; + revMapping[result + suffix] = idenToken; + } + } + } + value.val = mapping[idenToken]; + } + } + else if (node.nam == 'grid-template-areas' || node.nam == 'grid-template') { + for (let i = 0; i < node.val.length; i++) { + if (node.val[i].typ == exports.EnumToken.String) { + const tokens = parseString(node.val[i].val.slice(1, -1), { location: true }); + for (const { value } of walkValues(tokens)) { + if (value.typ == exports.EnumToken.IdenTokenType || value.typ == exports.EnumToken.DashedIdenTokenType) { + if (value.val in mapping) { + value.val = mapping[value.val]; + } + else { + let result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + if (result instanceof Promise) { + result = await result; + } + mapping[value.val] = result; + revMapping[result] = value.val; + value.val = result; + } + } + } + node.val[i].val = node.val[i].val.charAt(0) + tokens.reduce((acc, curr) => acc + renderToken(curr), '') + node.val[i].val.charAt(node.val[i].val.length - 1); + } + } + } + else if (node.nam == 'animation' || node.nam == 'animation-name') { + for (const { value } of walkValues(node.val, node)) { + if (value.typ == exports.EnumToken.IdenTokenType && ![ + 'none', 'infinite', 'normal', 'reverse', 'alternate', + 'alternate-reverse', 'forwards', 'backwards', 'both', + 'running', 'paused', 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', + 'step-start', 'step-end', 'jump-start', 'jump-end', + 'jump-none', 'jump-both', 'start', 'end', + 'inherit', 'initial', 'unset' + ].includes(value.val)) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + mapping[value.val] = result instanceof Promise ? await result : result; + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + } + } + for (const { value, parent } of walkValues(node.val, node)) { + if (value.typ == exports.EnumToken.DashedIdenTokenType) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let val = result instanceof Promise ? await result : result; + mapping[value.val] = '--' + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming) : val); + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + else if ((value.typ == exports.EnumToken.IdenTokenType || isIdentColor(value)) && value.val in importedCssVariables) { + replaceToken(parent, value, importedCssVariables[value.val].val); + } + } + } + else if (node.typ == exports.EnumToken.RuleNodeType) { + if (node.tokens == null) { + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + value: parseSelector(parseString(node.sel, { location: true })) + }); + } + let hasIdOrClass = false; + for (const { value } of walkValues(node.tokens, node, + // @ts-ignore + (value, parent) => { + if (value.typ == exports.EnumToken.PseudoClassTokenType) { + const val = value.val.toLowerCase(); + switch (val) { + case ':local': + case ':global': + { + let index = parent.tokens.indexOf(value); + parent.tokens.splice(index, 1); + if (parent.tokens[index]?.typ == exports.EnumToken.WhitespaceTokenType || parent.tokens[index]?.typ == exports.EnumToken.DescendantCombinatorTokenType) { + parent.tokens.splice(index, 1); + } + if (val == ':global') { + for (; index < parent.tokens.length; index++) { + if (parent.tokens[index].typ == exports.EnumToken.CommaTokenType || + ([exports.EnumToken.PseudoClassFuncTokenType, exports.EnumToken.PseudoClassTokenType].includes(parent.tokens[index].typ) && + [':global', ':local'].includes(parent.tokens[index].val.toLowerCase()))) { + break; + } + global.add(parent.tokens[index]); + } + } + } + break; + } + } + else if (value.typ == exports.EnumToken.PseudoClassFuncTokenType) { + switch (value.val.toLowerCase()) { + case ':global': + for (const token of value.chi) { + global.add(token); + } + parent.tokens.splice(parent.tokens.indexOf(value), 1, ...value.chi); + break; + case ':local': + parent.tokens.splice(parent.tokens.indexOf(value), 1, ...value.chi); + break; + } + } + })) { + if (value.typ == exports.EnumToken.HashTokenType || value.typ == exports.EnumToken.ClassSelectorTokenType) { + hasIdOrClass = true; + } + if (processed.has(value)) { + continue; + } + processed.add(value); + if (value.typ == exports.EnumToken.PseudoClassTokenType) ; + else if (value.typ == exports.EnumToken.PseudoClassFuncTokenType) ; + else { + if (global.has(value)) { + continue; + } + if (value.typ == exports.EnumToken.ClassSelectorTokenType) { + const val = value.val.slice(1); + if (!(val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? val : moduleSettings.generateScopedName(val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[val] = (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[mapping[val]] = val; + } + value.val = '.' + mapping[val]; + } + } + } + if (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Pure) { + if (!hasIdOrClass) { + throw new Error(`pure module: No id or class found in selector '${node.sel}' at '${node.loc?.src ?? ''}':${node.loc?.sta?.lin ?? ''}:${node.loc?.sta?.col ?? ''}`); + } + } + node.sel = ''; + for (const token of node.tokens) { + node.sel += renderToken(token); + } + } + else if (node.typ == exports.EnumToken.AtRuleNodeType || node.typ == exports.EnumToken.KeyframesAtRuleNodeType) { + const val = node.nam.toLowerCase(); + if (node.tokens == null) { + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + // @ts-ignore + value: parseAtRulePrelude(parseString(node.val), node) + }); + } + if (val == 'property' || val == 'keyframes') { + const prefix = val == 'property' ? '--' : ''; + for (const value of node.tokens) { + if ((prefix == '--' && value.typ == exports.EnumToken.DashedIdenTokenType) || (prefix == '' && value.typ == exports.EnumToken.IdenTokenType)) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & exports.ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let val = result instanceof Promise ? await result : result; + mapping[value.val] = prefix + (moduleSettings.naming & exports.ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & exports.ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming) : val); + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + } + node.val = node.tokens.reduce((a, b) => a + renderToken(b), ''); + } + else { + let isReplaced = false; + for (const { value, parent } of walkValues(node.tokens, node)) { + if (exports.EnumToken.MediaQueryConditionTokenType == parent.typ && value != parent.l) { + if ((value.typ == exports.EnumToken.IdenTokenType || isIdentColor(value)) && value.val in importedCssVariables) { + isReplaced = true; + parent.r.splice(parent.r.indexOf(value), 1, ...importedCssVariables[value.val].val); + } + } + } + if (isReplaced) { + node.val = node.tokens.reduce((a, b) => a + renderToken(b), ''); + } + } + } + } + if (moduleSettings.naming != exports.ModuleCaseTransformEnum.IgnoreCase) { + revMapping = {}; + mapping = Object.entries(mapping).reduce((acc, [key, value]) => { + const keyName = getKeyName(key, moduleSettings.naming); + acc[keyName] = value; + revMapping[value] = keyName; + return acc; + }, {}); + } + result.mapping = mapping; + result.revMapping = revMapping; + if ((moduleSettings.scoped & exports.ModuleScopeEnumOptions.ICSS) && Object.keys(importMapping).length > 0) { + result.importMapping = importMapping; + } + endTime = performance.now(); + result.stats.module = `${(endTime - parseModuleTime).toFixed(2)}ms`; + result.stats.total = `${(endTime - startTime).toFixed(2)}ms`; + } + if (options.signal != null) { + options.signal.removeEventListener('abort', reject); + } + return result; } function getLastNode(context) { let i = context.chi.length; @@ -18513,6 +19458,147 @@ function parseNode(results, context, options, errors, src, map, rawTokens, stats isValid = false; } } + if (node.nam == 'value') { + let i = 0; + while (i < tokens.length) { + if (tokens[i].typ == exports.EnumToken.WhitespaceTokenType || tokens[i].typ == exports.EnumToken.CommentTokenType) { + i++; + continue; + } + break; + } + if (i < tokens.length) { + if (tokens[i].typ == exports.EnumToken.IdenTokenType || isIdentColor(tokens[i])) { + let k = i + 1; + while (k < tokens.length) { + if (tokens[k].typ == exports.EnumToken.WhitespaceTokenType || tokens[k].typ == exports.EnumToken.CommentTokenType) { + k++; + continue; + } + // var or import + if (tokens[k].typ == exports.EnumToken.ColonTokenType) { + let j = k; + while (++j < tokens.length) { + if (tokens[j].typ != exports.EnumToken.WhitespaceTokenType && tokens[j].typ != exports.EnumToken.CommentTokenType) { + break; + } + } + let offset = k + 1; + while (offset < tokens.length && tokens[offset].typ == exports.EnumToken.WhitespaceTokenType) { + offset++; + } + if (tokens[j].typ == exports.EnumToken.StringTokenType) { + Object.assign(node, { + typ: exports.EnumToken.CssVariableImportTokenType, + nam: tokens[i].val, + val: tokens.slice(offset) + }); + delete node.tokens; + // @ts-ignore + delete node.raw; + context.chi.push(node); + return null; + } + Object.assign(node, { + typ: exports.EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(offset) + }); + context.chi.push(node); + return null; + } + if (tokens[k].typ == exports.EnumToken.PseudoClassTokenType) { + Object.assign(tokens[k], { + typ: exports.EnumToken.IdenTokenType, + val: tokens[k].val.slice(1) + }); + Object.assign(node, { + typ: exports.EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(k) + }); + context.chi.push(node); + return null; + } + if (tokens[k].typ == exports.EnumToken.CommaTokenType) { + let j = i; + while (++j < tokens.length) { + if (tokens[j].typ == exports.EnumToken.IdenTokenType && tokens[j].val.toLowerCase() == 'from') { + const vars = tokens.slice(i, j); + const from = tokens.slice(j + 1); + let l = 0; + let expect = exports.EnumToken.IdenTokenType; + for (; l < vars.length; l++) { + if (vars[l].typ == exports.EnumToken.WhitespaceTokenType || vars[l].typ == exports.EnumToken.CommentTokenType) { + continue; + } + if (expect == vars[l].typ || (expect == exports.EnumToken.IdenTokenType && isIdentColor(vars[l]))) { + expect = expect == exports.EnumToken.CommaTokenType ? exports.EnumToken.IdenTokenType : exports.EnumToken.CommaTokenType; + continue; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(vars[l]) ?? location, + message: `expecting '${exports.EnumToken[expect]}' but found ${renderToken(vars[l])}` + }); + return null; + } + l = 0; + expect = exports.EnumToken.IdenTokenType; + for (; l < from.length; l++) { + if (from[l].typ == exports.EnumToken.WhitespaceTokenType || from[l].typ == exports.EnumToken.CommentTokenType) { + continue; + } + if (expect == from[l].typ || isIdentColor(from[l])) { + while (++l < from.length) { + if (from[l].typ == exports.EnumToken.WhitespaceTokenType || from[l].typ == exports.EnumToken.CommentTokenType) { + continue; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `unexpected '${renderToken(from[l])}'` + }); + return null; + } + break; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `expecting but found ${renderToken(from[l])}` + }); + return null; + } + // @ts-ignore + delete node.nam; + // @ts-ignore + delete node.val; + Object.assign(node, { + typ: exports.EnumToken.CssVariableDeclarationMapTokenType, + vars, + from + }); + context.chi.push(node); + return null; + } + } + } + k++; + } + Object.assign(node, { + typ: exports.EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(k) + }); + context.chi.push(node); + return null; + } + } + } // @ts-ignore const skipValidate = (options.validation & exports.ValidationLevel.AtRule) == 0; const isAllowed = skipValidate || isNodeAllowedInContext(node, context); @@ -19051,6 +20137,7 @@ async function parseDeclarations(declaration) { return doParse(tokenize$1({ stream: `.x{${declaration}}`, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), { setParent: false, minify: false, validation: false }).then(result => { @@ -19171,6 +20258,7 @@ function parseString(src, options = { location: false }) { const parseInfo = { stream: src, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }; @@ -19296,12 +20384,10 @@ function getTokenType(val, hint) { val: +val.slice(0, -1) }; } - // if (isDimension(val)) { const dimension = parseDimension(val); if (dimension != null) { return dimension; } - // } const v = val.toLowerCase(); if (v == 'currentcolor' || v == 'transparent' || v in COLORS_NAMES) { return { @@ -19330,6 +20416,12 @@ function getTokenType(val, hint) { val }; } + if (val.charAt(0) == '.' && isIdent(val.slice(1))) { + return { + typ: exports.EnumToken.ClassSelectorTokenType, + val + }; + } if (val.charAt(0) == '#' && isHexColor(val)) { return { typ: exports.EnumToken.ColorTokenType, @@ -19377,6 +20469,55 @@ function getTokenType(val, hint) { function parseTokens(tokens, options = {}) { for (let i = 0; i < tokens.length; i++) { const t = tokens[i]; + if (t.typ == exports.EnumToken.IdenTokenType && t.val == 'from' && i > 0) { + const left = []; + const right = []; + let foundLeft = 0; + let foundRight = 0; + let k = i; + let l = i; + while (k > 0) { + if (tokens[k - 1].typ == exports.EnumToken.CommentTokenType || tokens[k - 1].typ == exports.EnumToken.WhitespaceTokenType) { + left.push(tokens[--k]); + continue; + } + if (tokens[k - 1].typ == exports.EnumToken.IdenTokenType || tokens[k - 1].typ == exports.EnumToken.DashedIdenTokenType) { + foundLeft++; + left.push(tokens[--k]); + continue; + } + break; + } + while (++l < tokens.length) { + if (tokens[l].typ == exports.EnumToken.CommentTokenType || tokens[l].typ == exports.EnumToken.WhitespaceTokenType) { + right.push(tokens[l]); + continue; + } + if (tokens[l].typ == exports.EnumToken.IdenTokenType || tokens[l].typ == exports.EnumToken.StringTokenType) { + foundRight++; + right.push(tokens[l]); + continue; + } + break; + } + if (foundLeft > 0 && foundRight == 1) { + while (left?.[0].typ == exports.EnumToken.WhitespaceTokenType) { + left.shift(); + } + while (left.at(-1)?.typ == exports.EnumToken.WhitespaceTokenType) { + left.pop(); + } + tokens.splice(k, l - k + 1, { + typ: exports.EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a, b) => { + return a == null ? b : b.typ == exports.EnumToken.IdenTokenType || b.typ == exports.EnumToken.StringTokenType ? b : a; + }, null) + }); + i = k; + continue; + } + } if (t.typ == exports.EnumToken.WhitespaceTokenType && ((i == 0 || i + 1 == tokens.length || [exports.EnumToken.CommaTokenType, exports.EnumToken.GteTokenType, exports.EnumToken.LteTokenType, exports.EnumToken.ColumnCombinatorTokenType].includes(tokens[i + 1].typ)) || @@ -19885,7 +21026,6 @@ function* walk(node, filter, reverse) { * ``` */ function* walkValues(values, root = null, filter, reverse) { - // const set = new Set(); const stack = values.slice(); const map = new Map; let previous = null; @@ -19919,8 +21059,12 @@ function* walkValues(values, root = null, filter, reverse) { continue; } // @ts-ignore - if (option != null && typeof option == 'object' && 'typ' in option) { - map.set(option, map.get(value) ?? root); + if (option != null && typeof option == 'object' && ('typ' in option || Array.isArray(option))) { + const op = Array.isArray(option) ? option : [option]; + for (const o of op) { + map.set(o, map.get(value) ?? root); + } + stack[reverse ? 'push' : 'unshift'](...op); } } } @@ -19943,12 +21087,12 @@ function* walkValues(values, root = null, filter, reverse) { const values = []; if ('l' in value && value.l != null) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.l); + values.push(value.l); // @ts-ignore map.set(value.l, value); } if ('op' in value && typeof value.op == 'object') { - values[reverse ? 'push' : 'unshift'](value.op); + values.push(value.op); // @ts-ignore map.set(value.op, value); } @@ -19956,14 +21100,14 @@ function* walkValues(values, root = null, filter, reverse) { if (Array.isArray(value.r)) { for (const r of value.r) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](r); + values.push(r); // @ts-ignore map.set(r, value); } } else { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.r); + values.push(value.r); // @ts-ignore map.set(value.r, value); } @@ -19979,8 +21123,12 @@ function* walkValues(values, root = null, filter, reverse) { if (isValid) { option = filter.fn(value, map.get(value), exports.WalkerEvent.Leave); // @ts-ignore - if (option != null && 'typ' in option) { - map.set(option, map.get(value) ?? root); + if (option != null && ('typ' in option || Array.isArray(option))) { + const op = Array.isArray(option) ? option : [option]; + for (const o of op) { + map.set(o, map.get(value) ?? root); + } + stack[reverse ? 'push' : 'unshift'](...op); } } } @@ -21058,9 +22206,12 @@ class PropertyList { }); } add(...declarations) { + let name; for (const declaration of declarations) { + name = declaration.typ != exports.EnumToken.DeclarationNodeType ? null : declaration.nam.toLowerCase(); if (declaration.typ != exports.EnumToken.DeclarationNodeType || - (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === declaration.nam.toLowerCase()) || + 'composes' === name || + (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === name) || (Array.isArray(this.options.removeDuplicateDeclarations) ? this.options.removeDuplicateDeclarations.includes(declaration.nam) : !this.options.removeDuplicateDeclarations)) { this.declarations.set(Number(Math.random().toString().slice(2)).toString(36), declaration); continue; @@ -22668,7 +23819,7 @@ function doMinify(ast, options = {}, recursive = false, errors, nestingContent, nodeIndex = i; } if (recursive && node != null && ('chi' in node)) { - if (node.typ == exports.EnumToken.KeyframesAtRuleNodeType || !node.chi.some(n => n.typ == exports.EnumToken.DeclarationNodeType)) { + if (node.typ == exports.EnumToken.KeyframesAtRuleNodeType || !node.chi.some((n) => n.typ == exports.EnumToken.DeclarationNodeType)) { if (!(node.typ == exports.EnumToken.AtRuleNodeType && node.nam != 'font-face')) { doMinify(node, options, recursive, errors, nestingContent, context); } @@ -23491,28 +24642,40 @@ function replaceCompoundLiteral(selector, replace) { * load file or url as stream * @param url * @param currentFile - * @param asStream + * @param responseType * @throws Error file not found * * @private */ -async function load(url, currentFile = '.', asStream = false) { +async function load(url, currentFile = '.', responseType = false) { const resolved = resolve(url, currentFile); + if (typeof responseType == 'boolean') { + responseType = responseType ? exports.ResponseType.ReadableStream : exports.ResponseType.Text; + } if (matchUrl.test(resolved.absolute)) { return fetch(resolved.absolute).then(async (response) => { if (!response.ok) { throw new Error(`${response.status} ${response.statusText} ${response.url}`); } - return asStream ? response.body : await response.text(); + if (responseType == exports.ResponseType.ArrayBuffer) { + return response.arrayBuffer(); + } + return responseType == exports.ResponseType.ReadableStream ? response.body : await response.text(); }); } try { - if (!asStream) { + if (responseType == exports.ResponseType.Text) { return promises.readFile(resolved.absolute, 'utf-8'); } + if (responseType == exports.ResponseType.ArrayBuffer) { + return promises.readFile(resolved.absolute).then(buffer => buffer.buffer); + } const stats = await promises.lstat(resolved.absolute); if (stats.isFile()) { - return node_stream.Readable.toWeb(node_fs.createReadStream(resolved.absolute, { encoding: 'utf-8', highWaterMark: 64 * 1024 })); + return node_stream.Readable.toWeb(node_fs.createReadStream(resolved.absolute, { + encoding: 'utf-8', + highWaterMark: 64 * 1024 + })); } } catch (error) { @@ -23524,6 +24687,7 @@ async function load(url, currentFile = '.', asStream = false) { * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -23548,8 +24712,8 @@ async function load(url, currentFile = '.', asStream = false) { * // } * ``` */ -function render(data, options = {}) { - return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? process.cwd() })); +function render(data, options = {}, mapping) { + return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? process.cwd() }), mapping); } /** * parse css file @@ -23624,9 +24788,18 @@ async function parse(stream, options = {}) { return doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize$1({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } - }), Object.assign(options, { load, resolve, dirname, cwd: options.cwd ?? process.cwd() })); + }), Object.assign(options, { + load, + resolve, + dirname, + cwd: options.cwd ?? process.cwd() + })).then(result => { + const { revMapping, ...res } = result; + return res; + }); } /** * transform css file @@ -23701,8 +24874,21 @@ async function transform(css, options = {}) { options = { minify: true, removeEmpty: true, removeCharset: true, ...options }; const startTime = performance.now(); return parse(css, options).then((parseResult) => { + let mapping = null; + let importMapping = null; + if (typeof options.module == 'number' && (options.module & exports.ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } + else if (typeof options.module == 'object' && typeof options.module.scoped == 'number' && (options.module.scoped & exports.ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } // ast already expanded by parse - const rendered = render(parseResult.ast, { ...options, expandNestingRules: false }); + const rendered = render(parseResult.ast, { + ...options, + expandNestingRules: false + }, mapping != null ? { mapping, importMapping } : null); return { ...parseResult, ...rendered, diff --git a/dist/index.d.ts b/dist/index.d.ts index 85a54600..a718524f 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -422,6 +422,22 @@ declare enum EnumToken { * invalid declaration node type */ InvalidDeclarationNodeType = 94, + /** + * composes token node type + */ + ComposesSelectorNodeType = 95, + /** + * css variable token type + */ + CssVariableTokenType = 96, + /** + * css variable import token type + */ + CssVariableImportTokenType = 97, + /** + * css variable declaration map token type + */ + CssVariableDeclarationMapTokenType = 98, /** * alias for time token type */ @@ -536,7 +552,7 @@ declare enum EnumToken { */ declare enum ColorType { /** - * system colors + * deprecated system colors */ SYS = 0, /** @@ -544,7 +560,7 @@ declare enum ColorType { */ DPSYS = 1, /** - * colors as literals + * named colors */ LIT = 2, /** @@ -644,6 +660,46 @@ declare enum ColorType { */ DEVICE_CMYK = 7 } +declare enum ModuleCaseTransformEnum { + /** + * export class names as-is + */ + IgnoreCase = 1, + /** + * transform mapping key name to camel case + */ + CamelCase = 2, + /** + * transform class names and mapping key name to camel case + */ + CamelCaseOnly = 4, + /** + * transform mapping key name to dash case + */ + DashCase = 8, + /** + * transform class names and mapping key name to dash case + */ + DashCaseOnly = 16 +} +declare enum ModuleScopeEnumOptions { + /** + * use the global scope + */ + Global = 32, + /** + * use the local scope + */ + Local = 64, + /** + * do not allow selector without an id or class + */ + Pure = 128, + /** + * export using ICSS module format + */ + ICSS = 256 +} /** * apply minification rules to the ast tree @@ -1078,7 +1134,7 @@ export declare interface FunctionURLToken extends BaseToken { typ: EnumToken.UrlFunctionTokenType, val: 'url'; - chi: Array; + chi: Array; } /** @@ -1693,6 +1749,40 @@ export declare interface ListToken extends BaseToken { chi: Token$1[]; } +/** + * Composes selector token + */ +export declare interface ComposesSelectorToken extends BaseToken { + + typ: EnumToken.ComposesSelectorTokenType; + l: Token$1[]; + r: Token$1 | null; +} + +/** + * Css variable token + */ +export declare interface CssVariableToken$1 extends BaseToken { + + typ: EnumToken.CssVariableTokenType; + nam: string; + val: Token$1[]; +} + +export declare interface CssVariableImportTokenType$1 extends BaseToken { + + typ: EnumToken.CssVariableImportTokenType; + nam: string; + val: Token$1[]; +} + +export declare interface CssVariableMapTokenType extends BaseToken { + + typ: EnumToken.CssVariableMapTokenType; + vars: Token$1[]; + from: Token$1[]; +} + /** * Unary expression node */ @@ -1784,6 +1874,8 @@ export declare type Token$1 = | ContainMatchToken | MatchExpressionToken | NameSpaceAttributeToken + | ComposesSelectorToken + | CssVariableToken$1 | DashMatchToken | EqualMatchToken @@ -2226,7 +2318,9 @@ export declare type AstNode$1 = | AstKeyFrameRule | AstInvalidRule | AstInvalidAtRule - | AstInvalidDeclaration; + | AstInvalidDeclaration + | CssVariableToken + | CssVariableImportTokenType; export declare type GenericVisitorResult = T | T[] | Promise | Promise | null | Promise; export declare type GenericVisitorHandler = ((node: T, parent?: AstNode | Token, root?: AstNode | Token) => GenericVisitorResult); @@ -2502,7 +2596,7 @@ export declare interface VisitorNodeMap { * // body {color:#f3fff0} * ``` */ - [key: keyof typeof EnumToken]: GenericVisitorAstNodeHandlerMap | GenericVisitorAstNodeHandlerMap; + [key : keyof typeof EnumToken]: GenericVisitorAstNodeHandlerMap | GenericVisitorAstNodeHandlerMap; } export declare interface PropertyListOptions { @@ -2532,12 +2626,17 @@ export declare interface ParseInfo { * current parsing position */ currentPosition: Position; + + /** + * offset + */ + offset: number; } /** * feature walk mode * - * @internal + * @private */ declare enum FeatureWalkMode { /** @@ -3074,9 +3173,9 @@ export declare type WalkerOption = WalkerOptionEnum | AstNode$1 | Token$1 | null export declare type WalkerFilter = (node: AstNode$1) => WalkerOption; /** - * filter nod + * filter nodes */ -export declare type WalkerValueFilter = (node: AstNode$1 | Token$1, parent?: AstNode$1 | Token$1 | null, event?: WalkerEvent) => WalkerOption | null; +export declare type WalkerValueFilter = (node: AstNode$1 | Token$1, parent?: AstNode$1 | Token$1 | AstNode$1[] | Token$1[] | null, event?: WalkerEvent) => WalkerOption | null; export declare interface WalkResult { node: AstNode$1; @@ -3268,6 +3367,126 @@ export declare type LoadResult = | string | Promise; +export declare interface ModuleOptions { + + /** + * use local scope vs global scope + */ + scoped?: boolean | ModuleScopeEnumOptions; + + /** + * module output file path. it is used to generate the scoped name. if not provided, [options.src](../docs/interfaces/node.ParserOptions.html#src) will be used + */ + filePath?: string; + + /** + * generated scope hash length. the default is 5 + */ + hashLength?: number; + + /** + * the pattern used to generate scoped names. the supported placeholders are: + * - name: the file base name without the extension + * - hash: the file path hash + * - local: the local name + * - path: the file path + * - folder: the folder name + * - ext: the file extension + * + * the pattern can optionally have a maximum number of characters: + * ``` + * pattern: '[local:2]-[hash:5]' + * ``` + * the hash pattern can take an algorithm, a maximum number of characters or both: + * ``` + * pattern: '[local]-[hash:base64:5]' + * ``` + * or + * ``` + * pattern: '[local]-[hash:5]' + * ``` + * or + * ``` + * pattern: '[local]-[hash:sha1]' + * ``` + * + * supported hash algorithms are: + * - base64 + * - hex + * - base64url + * - sha1 + * - sha256 + * - sha384 + * - sha512 + * + * ```typescript + * + * import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser'; + * import type {TransformResult} from '@tbela99/css-parser'; + * css = ` + * :local(.className) { + * background: red; + * color: yellow; + * } + * + * :local(.subClass) { + * composes: className; + * background: blue; + * } + * `; + * + * let result: TransformResult = await transform(css, { + * + * beautify:true, + * module: { + * pattern: '[local]-[hash:sha256]' + * } + * + * }); + * + * console.log(result.code); + * ``` + * generated css + * + * ```css + * .className-b629f { + * background: red; + * color: #ff0 + * } + * .subClass-a0c35 { + * background: blue + * } + * ``` + */ + pattern?: string; + + /** + * optional. function change the case of the scoped name and the class mapping + * + * - {@link ModuleCaseTransformEnum.IgnoreCase}: do not change case + * - {@link ModuleCaseTransformEnum.CamelCase}: camelCase {@link ParseResult.mapping} key name + * - {@link ModuleCaseTransformEnum.CamelCaseOnly}: camelCase {@link ParseResult.mapping} key name and the scoped class name + * - {@link ModuleCaseTransformEnum.DashCase}: dashCase {@link ParseResult.mapping} key name + * - {@link ModuleCaseTransformEnum.DashCaseOnly}: dashCase {@link ParseResult.mapping} key name and the scoped class name + * + */ + naming?: ModuleCaseTransformEnum, + + /** + * optional function to generate scoped name + * @param localName + * @param filePath + * @param pattern see {@link ModuleOptions.pattern} + * @param hashLength + */ + generateScopedName?: ( + localName: string, + filePath: string, + pattern: string, + hashLength?: number + ) => string | Promise; +} + /** * parser options */ @@ -3306,7 +3525,7 @@ export declare interface ParserOptions extends MinifyOptions, MinifyFeatureOptio * @param asStream * */ - load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult; + load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult; /** * get directory name * @param path @@ -3360,6 +3579,11 @@ export declare interface ParserOptions extends MinifyOptions, MinifyFeatureOptio * @private */ cache?: WeakMap; + + /** + * css modules options + */ + module?: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions } /** @@ -3536,13 +3760,17 @@ export declare interface ParseResultStats { */ importedBytesIn: number; /** - * parse time + * parse processing time */ parse: string; /** - * minify time + * minify processing time */ minify: string; + /** + * module processing time + */ + module?: string; /** * total time */ @@ -3578,7 +3806,22 @@ export declare interface ParseResult { /** * parse stats */ - stats: ParseResultStats + stats: ParseResultStats; + + /** + * css module mapping + */ + mapping?: Record; + + cssModuleVariables?: Record; + + importMapping?: Record>; + + /** + * css module reverse mapping + * @private + */ + revMapping?: Record; } /** @@ -3781,20 +4024,39 @@ declare function resolve(url: string, currentDirectory: string, cwd?: string): { relative: string; }; +/** + * response type + */ +declare enum ResponseType { + /** + * return text + */ + Text = 0, + /** + * return a readable stream + */ + ReadableStream = 1, + /** + * return an arraybuffer + */ + ArrayBuffer = 2 +} + /** * load file or url as stream * @param url * @param currentFile - * @param asStream + * @param responseType * @throws Error file not found * * @private */ -declare function load(url: string, currentFile?: string, asStream?: boolean): Promise>>; +declare function load(url: string, currentFile?: string, responseType?: boolean | ResponseType): Promise>>; /** * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -3819,7 +4081,10 @@ declare function load(url: string, currentFile?: string, asStream?: boolean): Pr * // } * ``` */ -declare function render(data: AstNode$1, options?: RenderOptions): RenderResult; +declare function render(data: AstNode$1, options?: RenderOptions, mapping?: { + mapping: Record; + importMapping: Record> | null; +} | null): RenderResult; /** * parse css file * @param file url or path @@ -3957,5 +4222,5 @@ declare function transformFile(file: string, options?: TransformOptions, asStrea */ declare function transform(css: string | ReadableStream, options?: TransformOptions): Promise; -export { ColorType, EnumToken, FeatureWalkMode, SourceMap, ValidationLevel, WalkerEvent, WalkerOptionEnum, convertColor, dirname, expand, isOkLabClose, load, mathFuncs, minify, okLabDistance, parse, parseDeclarations, parseFile, parseString, parseTokens, render, renderToken, resolve, transform, transformFile, transformFunctions, walk, walkValues }; -export type { AddToken, AngleToken, AstAtRule, AstComment, AstDeclaration, AstInvalidAtRule, AstInvalidDeclaration, AstInvalidRule, AstKeyFrameRule, AstKeyframesAtRule, AstKeyframesRule, AstNode$1 as AstNode, AstRule, AstRuleList, AstStyleSheet, AtRuleToken, AtRuleVisitorHandler, AttrEndToken, AttrStartToken, AttrToken, Background, BackgroundAttachmentMapping, BackgroundPosition, BackgroundPositionClass, BackgroundPositionConstraints, BackgroundPositionMapping, BackgroundProperties, BackgroundRepeat, BackgroundRepeatMapping, BackgroundSize, BackgroundSizeMapping, BadCDOCommentToken, BadCommentToken, BadStringToken, BadUrlToken, BaseToken, BinaryExpressionNode, BinaryExpressionToken, BlockEndToken, BlockStartToken, Border, BorderColor, BorderColorClass, BorderProperties, BorderRadius, CDOCommentToken, ChildCombinatorToken, ClassSelectorToken, ColonToken, ColorToken, ColumnCombinatorToken, CommaToken, CommentToken, ConstraintsMapping, ContainMatchToken, Context, DashMatchToken, DashedIdentToken, DeclarationVisitorHandler, DelimToken, DescendantCombinatorToken, DimensionToken, DivToken, EOFToken, EndMatchToken, EqualMatchToken, ErrorDescription, FlexToken, Font, FontFamily, FontProperties, FontWeight, FontWeightConstraints, FontWeightMapping, FractionToken, FrequencyToken, FunctionImageToken, FunctionToken, FunctionURLToken, GenericVisitorAstNodeHandlerMap, GenericVisitorHandler, GenericVisitorResult, GreaterThanOrEqualToken, GreaterThanToken, GridTemplateFuncToken, HashToken, IdentListToken, IdentToken, ImportantToken, IncludeMatchToken, InvalidAttrToken, InvalidClassSelectorToken, LengthToken, LessThanOrEqualToken, LessThanToken, LineHeight, ListToken, LiteralToken, LoadResult, Location, Map$1 as Map, MatchExpressionToken, MatchedSelector, MediaFeatureAndToken, MediaFeatureNotToken, MediaFeatureOnlyToken, MediaFeatureOrToken, MediaFeatureToken, MediaQueryConditionToken, MinifyFeature, MinifyFeatureOptions, MinifyOptions, MulToken, NameSpaceAttributeToken, NestingSelectorToken, NextSiblingCombinatorToken, NumberToken, OptimizedSelector, OptimizedSelectorToken, Outline, OutlineProperties, ParensEndToken, ParensStartToken, ParensToken, ParseInfo, ParseResult, ParseResultStats, ParseTokenOptions, ParserOptions, PercentageToken, Position, Prefix, PropertiesConfig, PropertiesConfigProperties, PropertyListOptions, PropertyMapType, PropertySetType, PropertyType, PseudoClassFunctionToken, PseudoClassToken, PseudoElementToken, PseudoPageToken, PurpleBackgroundAttachment, RawSelectorTokens, RenderOptions, RenderResult, ResolutionToken, ResolvedPath, RuleVisitorHandler, SemiColonToken, Separator, ShorthandDef, ShorthandMapType, ShorthandProperties, ShorthandPropertyType, ShorthandType, SourceMapObject, StartMatchToken, StringToken, SubToken, SubsequentCombinatorToken, TimeToken, TimelineFunctionToken, TimingFunctionToken, Token$1 as Token, TokenizeResult, TransformOptions, TransformResult, UnaryExpression, UnaryExpressionNode, UnclosedStringToken, UniversalSelectorToken, UrlToken, ValidationConfiguration, ValidationOptions, ValidationResult, ValidationSelectorOptions, ValidationSyntaxNode, ValidationSyntaxResult, Value, ValueVisitorHandler, VariableScopeInfo, VisitorNodeMap, WalkAttributesResult, WalkResult, WalkerFilter, WalkerOption, WalkerValueFilter, WhitespaceToken }; +export { ColorType, EnumToken, FeatureWalkMode, ModuleCaseTransformEnum, ModuleScopeEnumOptions, ResponseType, SourceMap, ValidationLevel, WalkerEvent, WalkerOptionEnum, convertColor, dirname, expand, isOkLabClose, load, mathFuncs, minify, okLabDistance, parse, parseDeclarations, parseFile, parseString, parseTokens, render, renderToken, resolve, transform, transformFile, transformFunctions, walk, walkValues }; +export type { AddToken, AngleToken, AstAtRule, AstComment, AstDeclaration, AstInvalidAtRule, AstInvalidDeclaration, AstInvalidRule, AstKeyFrameRule, AstKeyframesAtRule, AstKeyframesRule, AstNode$1 as AstNode, AstRule, AstRuleList, AstStyleSheet, AtRuleToken, AtRuleVisitorHandler, AttrEndToken, AttrStartToken, AttrToken, Background, BackgroundAttachmentMapping, BackgroundPosition, BackgroundPositionClass, BackgroundPositionConstraints, BackgroundPositionMapping, BackgroundProperties, BackgroundRepeat, BackgroundRepeatMapping, BackgroundSize, BackgroundSizeMapping, BadCDOCommentToken, BadCommentToken, BadStringToken, BadUrlToken, BaseToken, BinaryExpressionNode, BinaryExpressionToken, BlockEndToken, BlockStartToken, Border, BorderColor, BorderColorClass, BorderProperties, BorderRadius, CDOCommentToken, ChildCombinatorToken, ClassSelectorToken, ColonToken, ColorToken, ColumnCombinatorToken, CommaToken, CommentToken, ComposesSelectorToken, ConstraintsMapping, ContainMatchToken, Context, CssVariableImportTokenType$1 as CssVariableImportTokenType, CssVariableMapTokenType, CssVariableToken$1 as CssVariableToken, DashMatchToken, DashedIdentToken, DeclarationVisitorHandler, DelimToken, DescendantCombinatorToken, DimensionToken, DivToken, EOFToken, EndMatchToken, EqualMatchToken, ErrorDescription, FlexToken, Font, FontFamily, FontProperties, FontWeight, FontWeightConstraints, FontWeightMapping, FractionToken, FrequencyToken, FunctionImageToken, FunctionToken, FunctionURLToken, GenericVisitorAstNodeHandlerMap, GenericVisitorHandler, GenericVisitorResult, GreaterThanOrEqualToken, GreaterThanToken, GridTemplateFuncToken, HashToken, IdentListToken, IdentToken, ImportantToken, IncludeMatchToken, InvalidAttrToken, InvalidClassSelectorToken, LengthToken, LessThanOrEqualToken, LessThanToken, LineHeight, ListToken, LiteralToken, LoadResult, Location, Map$1 as Map, MatchExpressionToken, MatchedSelector, MediaFeatureAndToken, MediaFeatureNotToken, MediaFeatureOnlyToken, MediaFeatureOrToken, MediaFeatureToken, MediaQueryConditionToken, MinifyFeature, MinifyFeatureOptions, MinifyOptions, ModuleOptions, MulToken, NameSpaceAttributeToken, NestingSelectorToken, NextSiblingCombinatorToken, NumberToken, OptimizedSelector, OptimizedSelectorToken, Outline, OutlineProperties, ParensEndToken, ParensStartToken, ParensToken, ParseInfo, ParseResult, ParseResultStats, ParseTokenOptions, ParserOptions, PercentageToken, Position, Prefix, PropertiesConfig, PropertiesConfigProperties, PropertyListOptions, PropertyMapType, PropertySetType, PropertyType, PseudoClassFunctionToken, PseudoClassToken, PseudoElementToken, PseudoPageToken, PurpleBackgroundAttachment, RawSelectorTokens, RenderOptions, RenderResult, ResolutionToken, ResolvedPath, RuleVisitorHandler, SemiColonToken, Separator, ShorthandDef, ShorthandMapType, ShorthandProperties, ShorthandPropertyType, ShorthandType, SourceMapObject, StartMatchToken, StringToken, SubToken, SubsequentCombinatorToken, TimeToken, TimelineFunctionToken, TimingFunctionToken, Token$1 as Token, TokenizeResult, TransformOptions, TransformResult, UnaryExpression, UnaryExpressionNode, UnclosedStringToken, UniversalSelectorToken, UrlToken, ValidationConfiguration, ValidationOptions, ValidationResult, ValidationSelectorOptions, ValidationSyntaxNode, ValidationSyntaxResult, Value, ValueVisitorHandler, VariableScopeInfo, VisitorNodeMap, WalkAttributesResult, WalkResult, WalkerFilter, WalkerOption, WalkerValueFilter, WhitespaceToken }; diff --git a/dist/lib/ast/features/type.js b/dist/lib/ast/features/type.js index 893abfbc..d2ee5c1d 100644 --- a/dist/lib/ast/features/type.js +++ b/dist/lib/ast/features/type.js @@ -1,7 +1,7 @@ /** * feature walk mode * - * @internal + * @private */ var FeatureWalkMode; (function (FeatureWalkMode) { diff --git a/dist/lib/ast/minify.js b/dist/lib/ast/minify.js index 490e774f..2ffd07a1 100644 --- a/dist/lib/ast/minify.js +++ b/dist/lib/ast/minify.js @@ -439,7 +439,7 @@ function doMinify(ast, options = {}, recursive = false, errors, nestingContent, nodeIndex = i; } if (recursive && node != null && ('chi' in node)) { - if (node.typ == EnumToken.KeyframesAtRuleNodeType || !node.chi.some(n => n.typ == EnumToken.DeclarationNodeType)) { + if (node.typ == EnumToken.KeyframesAtRuleNodeType || !node.chi.some((n) => n.typ == EnumToken.DeclarationNodeType)) { if (!(node.typ == EnumToken.AtRuleNodeType && node.nam != 'font-face')) { doMinify(node, options, recursive, errors, nestingContent, context); } diff --git a/dist/lib/ast/types.js b/dist/lib/ast/types.js index 5cb3b02e..60a20d4c 100644 --- a/dist/lib/ast/types.js +++ b/dist/lib/ast/types.js @@ -427,6 +427,23 @@ var EnumToken; * invalid declaration node type */ EnumToken[EnumToken["InvalidDeclarationNodeType"] = 94] = "InvalidDeclarationNodeType"; + /* css module nodes */ + /** + * composes token node type + */ + EnumToken[EnumToken["ComposesSelectorNodeType"] = 95] = "ComposesSelectorNodeType"; + /** + * css variable token type + */ + EnumToken[EnumToken["CssVariableTokenType"] = 96] = "CssVariableTokenType"; + /** + * css variable import token type + */ + EnumToken[EnumToken["CssVariableImportTokenType"] = 97] = "CssVariableImportTokenType"; + /** + * css variable declaration map token type + */ + EnumToken[EnumToken["CssVariableDeclarationMapTokenType"] = 98] = "CssVariableDeclarationMapTokenType"; /* aliases */ /** * alias for time token type @@ -543,7 +560,7 @@ var EnumToken; var ColorType; (function (ColorType) { /** - * system colors + * deprecated system colors */ ColorType[ColorType["SYS"] = 0] = "SYS"; /** @@ -551,7 +568,7 @@ var ColorType; */ ColorType[ColorType["DPSYS"] = 1] = "DPSYS"; /** - * colors as literals + * named colors */ ColorType[ColorType["LIT"] = 2] = "LIT"; /** @@ -651,5 +668,47 @@ var ColorType; */ ColorType[ColorType["DEVICE_CMYK"] = 7] = "DEVICE_CMYK"; })(ColorType || (ColorType = {})); +var ModuleCaseTransformEnum; +(function (ModuleCaseTransformEnum) { + /** + * export class names as-is + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["IgnoreCase"] = 1] = "IgnoreCase"; + /** + * transform mapping key name to camel case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["CamelCase"] = 2] = "CamelCase"; + /** + * transform class names and mapping key name to camel case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["CamelCaseOnly"] = 4] = "CamelCaseOnly"; + /** + * transform mapping key name to dash case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["DashCase"] = 8] = "DashCase"; + /** + * transform class names and mapping key name to dash case + */ + ModuleCaseTransformEnum[ModuleCaseTransformEnum["DashCaseOnly"] = 16] = "DashCaseOnly"; +})(ModuleCaseTransformEnum || (ModuleCaseTransformEnum = {})); +var ModuleScopeEnumOptions; +(function (ModuleScopeEnumOptions) { + /** + * use the global scope + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Global"] = 32] = "Global"; + /** + * use the local scope + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Local"] = 64] = "Local"; + /** + * do not allow selector without an id or class + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["Pure"] = 128] = "Pure"; + /** + * export using ICSS module format + */ + ModuleScopeEnumOptions[ModuleScopeEnumOptions["ICSS"] = 256] = "ICSS"; +})(ModuleScopeEnumOptions || (ModuleScopeEnumOptions = {})); -export { ColorType, EnumToken, SyntaxValidationResult, ValidationLevel }; +export { ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions, SyntaxValidationResult, ValidationLevel }; diff --git a/dist/lib/ast/walk.js b/dist/lib/ast/walk.js index 8016f903..1b43f0ea 100644 --- a/dist/lib/ast/walk.js +++ b/dist/lib/ast/walk.js @@ -187,7 +187,6 @@ function* walk(node, filter, reverse) { * ``` */ function* walkValues(values, root = null, filter, reverse) { - // const set = new Set(); const stack = values.slice(); const map = new Map; let previous = null; @@ -221,8 +220,12 @@ function* walkValues(values, root = null, filter, reverse) { continue; } // @ts-ignore - if (option != null && typeof option == 'object' && 'typ' in option) { - map.set(option, map.get(value) ?? root); + if (option != null && typeof option == 'object' && ('typ' in option || Array.isArray(option))) { + const op = Array.isArray(option) ? option : [option]; + for (const o of op) { + map.set(o, map.get(value) ?? root); + } + stack[reverse ? 'push' : 'unshift'](...op); } } } @@ -245,12 +248,12 @@ function* walkValues(values, root = null, filter, reverse) { const values = []; if ('l' in value && value.l != null) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.l); + values.push(value.l); // @ts-ignore map.set(value.l, value); } if ('op' in value && typeof value.op == 'object') { - values[reverse ? 'push' : 'unshift'](value.op); + values.push(value.op); // @ts-ignore map.set(value.op, value); } @@ -258,14 +261,14 @@ function* walkValues(values, root = null, filter, reverse) { if (Array.isArray(value.r)) { for (const r of value.r) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](r); + values.push(r); // @ts-ignore map.set(r, value); } } else { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.r); + values.push(value.r); // @ts-ignore map.set(value.r, value); } @@ -281,8 +284,12 @@ function* walkValues(values, root = null, filter, reverse) { if (isValid) { option = filter.fn(value, map.get(value), WalkerEvent.Leave); // @ts-ignore - if (option != null && 'typ' in option) { - map.set(option, map.get(value) ?? root); + if (option != null && ('typ' in option || Array.isArray(option))) { + const op = Array.isArray(option) ? option : [option]; + for (const o of op) { + map.set(o, map.get(value) ?? root); + } + stack[reverse ? 'push' : 'unshift'](...op); } } } diff --git a/dist/lib/fs/resolve.js b/dist/lib/fs/resolve.js index cc8d877b..516dc8f1 100644 --- a/dist/lib/fs/resolve.js +++ b/dist/lib/fs/resolve.js @@ -10,6 +10,9 @@ function dirname(path) { // // return path; // } + if (path === '') { + return ''; + } let i = 0; let parts = ['']; for (; i < path.length; i++) { @@ -34,6 +37,12 @@ function dirname(path) { * @private */ function splitPath(result) { + if (result.length == 0) { + return { parts: [], i: 0 }; + } + if (result === '/') { + return { parts: ['/'], i: 0 }; + } const parts = ['']; let i = 0; for (; i < result.length; i++) { @@ -77,6 +86,21 @@ function resolve(url, currentDirectory, cwd) { } cwd ??= ''; currentDirectory ??= ''; + if (currentDirectory !== '' && url.startsWith(currentDirectory + '/')) { + return { + absolute: url, + relative: url.slice(currentDirectory.length + 1) + }; + } + if (currentDirectory === '' && cwd !== '' && url.startsWith(cwd == '/' ? cwd : cwd + '/')) { + cwd = normalize(cwd); + const absolute = normalize(url); + const prefix = cwd == '/' ? cwd : cwd + '/'; + return { + absolute, + relative: absolute.startsWith(prefix) ? absolute.slice(prefix.length) : diff(absolute, cwd) + }; + } if (matchUrl.test(currentDirectory)) { const path = new URL(url, currentDirectory).href; return { @@ -91,9 +115,15 @@ function resolve(url, currentDirectory, cwd) { else if (currentDirectory.charAt(0) == '/') { result = dirname(currentDirectory) + '/' + url; } - let { parts, i } = splitPath(result); - const absolute = parts.join('/'); - const { parts: dirs } = splitPath(cwd ?? currentDirectory); + const absolute = normalize(result); + return { + absolute, + relative: absolute === '' ? '' : diff(absolute, cwd ?? currentDirectory), + }; +} +function diff(path1, path2) { + let { parts } = splitPath(path1); + const { parts: dirs } = splitPath(path2); for (const p of dirs) { if (parts[0] == p) { parts.shift(); @@ -102,10 +132,36 @@ function resolve(url, currentDirectory, cwd) { parts.unshift('..'); } } - return { - absolute, - relative: parts.join('/') + (i < result.length ? result.slice(i) : '') - }; + return parts.join('/'); +} +function normalize(path) { + let parts = []; + let i = 0; + for (; i < path.length; i++) { + const chr = path.charAt(i); + if (chr == '/') { + if (parts.length == 0 || parts[parts.length - 1] !== '') { + parts.push(''); + } + } + else if (chr == '?' || chr == '#') { + break; + } + else { + parts[parts.length - 1] += chr; + } + } + let k = -1; + while (++k < parts.length) { + if (parts[k] == '.') { + parts.splice(k--, 1); + } + else if (parts[k] == '..') { + parts.splice(k - 1, 2); + k -= 2; + } + } + return (path.charAt(0) == '/' ? '/' : '') + parts.join('/'); } export { dirname, matchUrl, resolve }; diff --git a/dist/lib/parser/declaration/list.js b/dist/lib/parser/declaration/list.js index 2e46d89e..dd03b993 100644 --- a/dist/lib/parser/declaration/list.js +++ b/dist/lib/parser/declaration/list.js @@ -25,9 +25,12 @@ class PropertyList { }); } add(...declarations) { + let name; for (const declaration of declarations) { + name = declaration.typ != EnumToken.DeclarationNodeType ? null : declaration.nam.toLowerCase(); if (declaration.typ != EnumToken.DeclarationNodeType || - (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === declaration.nam.toLowerCase()) || + 'composes' === name || + (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === name) || (Array.isArray(this.options.removeDuplicateDeclarations) ? this.options.removeDuplicateDeclarations.includes(declaration.nam) : !this.options.removeDuplicateDeclarations)) { this.declarations.set(Number(Math.random().toString().slice(2)).toString(36), declaration); continue; diff --git a/dist/lib/parser/parse.js b/dist/lib/parser/parse.js index 551f2bea..af85874d 100644 --- a/dist/lib/parser/parse.js +++ b/dist/lib/parser/parse.js @@ -1,10 +1,11 @@ import { isIdentStart, isIdent, isIdentColor, mathFuncs, isColor, parseColor, isPseudo, pseudoElements, isAtKeyword, isFunction, isNumber, isPercentage, parseDimension, isHexColor, isHash, mediaTypes } from '../syntax/syntax.js'; -import { EnumToken, ColorType, ValidationLevel, SyntaxValidationResult } from '../ast/types.js'; +import { EnumToken, ColorType, ValidationLevel, ModuleCaseTransformEnum, ModuleScopeEnumOptions, SyntaxValidationResult } from '../ast/types.js'; import { definedPropertySettings, minify, combinators } from '../ast/minify.js'; import { walkValues, WalkerEvent, walk, WalkerOptionEnum } from '../ast/walk.js'; import { expand } from '../ast/expand.js'; import './utils/config.js'; import { parseDeclarationNode } from './utils/declaration.js'; +import { camelize, dasherize } from './utils/text.js'; import { renderToken } from '../renderer/render.js'; import '../renderer/sourcemap/lib/encode.js'; import { funcLike, timingFunc, timelineFunc, COLORS_NAMES, systemColors, deprecatedSystemColors, colorsFunc } from '../syntax/color/utils/constants.js'; @@ -19,6 +20,7 @@ import '../validation/syntaxes/complex-selector.js'; import { validateKeyframeSelector } from '../validation/syntaxes/keyframe-selector.js'; import { isNodeAllowedInContext, evaluateSyntax } from '../validation/syntax.js'; import { validateAtRuleKeyframes } from '../validation/at-rules/keyframes.js'; +import { hashAlgorithms, hash } from './utils/hash.js'; const urlTokenMatcher = /^(["']?)[a-zA-Z0-9_/.-][a-zA-Z0-9_/:.#?-]+(\1)$/; const trimWhiteSpace = [EnumToken.CommentTokenType, EnumToken.GtTokenType, EnumToken.GteTokenType, EnumToken.LtTokenType, EnumToken.LteTokenType, EnumToken.ColumnCombinatorTokenType]; @@ -38,9 +40,12 @@ const enumTokenHints = new Set([ function reject(reason) { throw new Error(reason ?? 'Parsing aborted'); } -function normalizeVisitorKeyName(keyName) { - return keyName.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); -} +/** + * replace token in its parent node + * @param parent + * @param value + * @param replacement + */ function replaceToken(parent, value, replacement) { for (const node of (Array.isArray(replacement) ? replacement : [replacement])) { if ('parent' in value && value.parent != node.parent) { @@ -68,11 +73,129 @@ function replaceToken(parent, value, replacement) { target.splice(index, 1, ...(Array.isArray(replacement) ? replacement : [replacement])); } } +/** + * transform case of key name + * @param key + * @param how + * + * @throws Error + * @private + */ +function getKeyName(key, how) { + switch (how) { + case ModuleCaseTransformEnum.CamelCase: + case ModuleCaseTransformEnum.CamelCaseOnly: + return camelize(key); + case ModuleCaseTransformEnum.DashCase: + case ModuleCaseTransformEnum.DashCaseOnly: + return dasherize(key); + } + return key; +} +/** + * generate scoped name + * @param localName + * @param filePath + * @param pattern + * @param hashLength + * + * @throws Error + * @private + */ +async function generateScopedName(localName, filePath, pattern, hashLength = 5) { + if (localName.startsWith('--')) { + localName = localName.slice(2); + } + const matches = /.*?(([^/]+)\/)?([^/\\]*?)(\.([^?/]+))?([?].*)?$/.exec(filePath); + const folder = matches?.[2]?.replace?.(/[^A-Za-z0-9_-]/g, "_") ?? ''; + const fileBase = matches?.[3] ?? ''; + const ext = matches?.[5] ?? ''; + const path = filePath.replace(/[^A-Za-z0-9_-]/g, "_"); + // sanitize localName for safe char set (replace spaces/illegal chars) + const safeLocal = localName.replace(/[^A-Za-z0-9_-]/g, "_"); + const hashString = `${localName}::${filePath}`; + let result = ''; + let inParens = 0; + let key = ''; + let position = 0; + // Compose final scoped name. Ensure the entire class doesn't start with digit: + for (const char of pattern) { + position += char.length; + if (char == '[') { + inParens++; + if (inParens != 1) { + throw new Error(`Unexpected character: '${char} at position ${position - 1}' in pattern '${pattern}'`); + } + continue; + } + if (char == ']') { + inParens--; + if (inParens != 0) { + throw new Error(`Unexpected character: '${char}:${position - 1}'`); + } + let hashAlgo = null; + let length = null; + if (key.includes(':')) { + const parts = key.split(':'); + if (parts.length == 2) { + // @ts-ignore + [key, length] = parts; + // @ts-ignore + if (key == 'hash' && hashAlgorithms.includes(length)) { + // @ts-ignore + hashAlgo = length; + length = null; + } + } + if (parts.length == 3) { + // @ts-ignore + [key, hashAlgo, length] = parts; + } + if (length != null && !Number.isInteger(+length)) { + throw new Error(`Unsupported hash length: '${length}'. expecting format [hash:length] or [hash:hash-algo:length]`); + } + } + switch (key) { + case 'hash': + result += await hash(hashString, length ?? hashLength, hashAlgo); + break; + case 'name': + result += length != null ? fileBase.slice(0, +length) : fileBase; + break; + case 'local': + result += length != null ? safeLocal.slice(0, +length) : localName; + break; + case 'ext': + result += length != null ? ext.slice(0, +length) : ext; + break; + case 'path': + result += length != null ? path.slice(0, +length) : path; + break; + case 'folder': + result += length != null ? folder.slice(0, +length) : folder; + break; + default: + throw new Error(`Unsupported key: '${key}'`); + } + key = ''; + continue; + } + if (inParens > 0) { + key += char; + } + else { + result += char; + } + } + // if leading char is digit, prefix underscore (very rare) + return (/^[0-9]/.test(result) ? '_' : '') + result; +} /** * parse css string * @param iter * @param options * + * @throws Error * @private */ async function doParse(iter, options = {}) { @@ -104,6 +227,9 @@ async function doParse(iter, options = {}) { if (typeof options.validation == 'boolean') { options.validation = options.validation ? ValidationLevel.All : ValidationLevel.None; } + if (options.module) { + options.expandNestingRules = true; + } if (options.expandNestingRules) { options.nestingRules = false; } @@ -369,6 +495,7 @@ async function doParse(iter, options = {}) { const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), Object.assign({}, options, { @@ -428,7 +555,7 @@ async function doParse(iter, options = {}) { } let node = result.node; for (const handler of handlers) { - callable = typeof handler == 'function' ? handler : handler[normalizeVisitorKeyName(node.typ == EnumToken.DeclarationNodeType || node.typ == EnumToken.AtRuleNodeType ? node.nam : node.val)]; + callable = typeof handler == 'function' ? handler : handler[camelize(node.typ == EnumToken.DeclarationNodeType || node.typ == EnumToken.AtRuleNodeType ? node.nam : node.val)]; if (callable == null) { continue; } @@ -563,12 +690,9 @@ async function doParse(iter, options = {}) { } } } - const endTime = performance.now(); - if (options.signal != null) { - options.signal.removeEventListener('abort', reject); - } stats.bytesIn += stats.importedBytesIn; - return { + let endTime = performance.now(); + const result = { ast, errors, stats: { @@ -578,6 +702,503 @@ async function doParse(iter, options = {}) { total: `${(endTime - startTime).toFixed(2)}ms` } }; + if (options.module) { + const moduleSettings = { + hashLength: 5, + filePath: '', + scoped: ModuleScopeEnumOptions.Local, + naming: ModuleCaseTransformEnum.IgnoreCase, + pattern: '', + generateScopedName, + ...(typeof options.module != 'object' ? {} : options.module) + }; + const parseModuleTime = performance.now(); + const namesMapping = {}; + const global = new Set; + const processed = new Set; + const pattern = typeof options.module == 'boolean' ? null : moduleSettings.pattern; + const importMapping = {}; + const cssVariablesMap = {}; + const importedCssVariables = {}; + let mapping = {}; + let revMapping = {}; + let filePath = typeof options.module == 'boolean' ? options.src : (moduleSettings.filePath ?? options.src); + filePath = filePath === '' ? options.src : options.resolve(filePath, options.dirname(options.src), options.cwd).relative; + if (typeof options.module == 'number') { + if (options.module & ModuleCaseTransformEnum.CamelCase) { + moduleSettings.naming = ModuleCaseTransformEnum.CamelCase; + } + else if (options.module & ModuleCaseTransformEnum.CamelCaseOnly) { + moduleSettings.naming = ModuleCaseTransformEnum.CamelCaseOnly; + } + else if (options.module & ModuleCaseTransformEnum.DashCase) { + moduleSettings.naming = ModuleCaseTransformEnum.DashCase; + } + else if (options.module & ModuleCaseTransformEnum.DashCaseOnly) { + moduleSettings.naming = ModuleCaseTransformEnum.DashCaseOnly; + } + if (options.module & ModuleScopeEnumOptions.Global) { + moduleSettings.scoped = ModuleScopeEnumOptions.Global; + } + if (options.module & ModuleScopeEnumOptions.Pure) { + // @ts-ignore + moduleSettings.scoped |= ModuleScopeEnumOptions.Pure; + } + if (options.module & ModuleScopeEnumOptions.ICSS) { + // @ts-ignore + moduleSettings.scoped |= ModuleScopeEnumOptions.ICSS; + } + } + if (typeof moduleSettings.scoped == 'boolean') { + moduleSettings.scoped = moduleSettings.scoped ? ModuleScopeEnumOptions.Local : ModuleScopeEnumOptions.Global; + } + moduleSettings.filePath = filePath; + moduleSettings.pattern = pattern != null && pattern !== '' ? pattern : (filePath === '' ? `[local]_[hash]` : `[local]_[hash]_[name]`); + for (const { node, parent } of walk(ast)) { + if (node.typ == EnumToken.CssVariableImportTokenType) { + const url = node.val.find(t => t.typ == EnumToken.StringTokenType).val.slice(1, -1); + const src = options.resolve(url, options.dirname(options.src), options.cwd); + const result = options.load(url, options.src); + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ + stream, + buffer: '', + offset: 0, + position: { ind: 0, lin: 1, col: 1 }, + currentPosition: { ind: -1, lin: 1, col: 0 } + }), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + })); + cssVariablesMap[node.nam] = root.cssModuleVariables; + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == EnumToken.CssVariableDeclarationMapTokenType) { + const from = node.from.find(t => t.typ == EnumToken.IdenTokenType || isIdentColor(t)); + if (!(from.val in cssVariablesMap)) { + errors.push({ + node, + message: `could not resolve @value import from '${from.val}'`, + action: 'drop' + }); + } + else { + for (const token of node.vars) { + if (token.typ == EnumToken.IdenTokenType || isIdentColor(token)) { + if (!(token.val in cssVariablesMap[from.val])) { + errors.push({ + node, + message: `value '${token.val}' is not exported from '${from.val}'`, + action: 'drop' + }); + continue; + } + result.cssModuleVariables ??= {}; + result.cssModuleVariables[token.val] = importedCssVariables[token.val] = cssVariablesMap[from.val][token.val]; + } + } + } + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == EnumToken.CssVariableTokenType) { + if (parent?.typ == EnumToken.StyleSheetNodeType) { + if (result.cssModuleVariables == null) { + result.cssModuleVariables = {}; + } + result.cssModuleVariables[node.nam] = node; + } + parent.chi.splice(parent.chi.indexOf(node), 1); + continue; + } + if (node.typ == EnumToken.DeclarationNodeType) { + if (node.nam.startsWith('--')) { + if (!(node.nam in namesMapping)) { + let result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? node.nam : moduleSettings.generateScopedName(node.nam, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[node.nam] = '--' + (moduleSettings.naming & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[node.nam] = node.nam; + } + node.nam = mapping[node.nam]; + } + if ('composes' == node.nam.toLowerCase()) { + const tokens = []; + let isValid = true; + for (const token of node.val) { + if (token.typ == EnumToken.ComposesSelectorNodeType) { + if (!(token.r == null || token.r.typ == EnumToken.StringTokenType || token.r.typ == EnumToken.IdenTokenType)) { + errors.push({ + action: 'drop', + message: `composes '${EnumToken[token.r.typ]}' is not supported`, + node + }); + isValid = false; + break; + } + tokens.push(token); + } + } + // find parent rule + let parentRule = node.parent; + while (parentRule != null && parentRule.typ != EnumToken.RuleNodeType) { + parentRule = parentRule.parent; + } + if (!isValid || tokens.length == 0) { + if (tokens.length == 0) { + errors.push({ + action: 'drop', + message: `composes is empty`, + node + }); + } + parentRule.chi.splice(parentRule.chi.indexOf(node), 1); + continue; + } + for (const token of tokens) { + // composes: a b c; + if (token.r == null) { + for (const rule of token.l) { + if (rule.typ == EnumToken.WhitespaceTokenType || rule.typ == EnumToken.CommentTokenType) { + continue; + } + if (!(rule.val in mapping)) { + let result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? rule.val : moduleSettings.generateScopedName(rule.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[rule.val] = (rule.typ == EnumToken.DashedIdenTokenType ? '--' : '') + (moduleSettings.naming & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[mapping[rule.val]] = rule.val; + } + if (parentRule != null) { + for (const tk of parentRule.tokens) { + if (tk.typ == EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + mapping[key] = [...new Set([...mapping[key].split(' '), mapping[rule.val]])].join(' '); + } + } + } + } + } + } + // composes: a b c from 'file.css'; + else if (token.r.typ == EnumToken.String) { + const url = token.r.val.slice(1, -1); + const src = options.resolve(url, options.dirname(options.src), options.cwd); + const result = options.load(url, options.src); + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ + stream, + buffer: '', + offset: 0, + position: { ind: 0, lin: 1, col: 1 }, + currentPosition: { ind: -1, lin: 1, col: 0 } + }), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + })); + const srcIndex = (src.relative.startsWith('/') || src.relative.startsWith('../') ? '' : './') + src.relative; + if (Object.keys(root.mapping).length > 0) { + importMapping[srcIndex] = {}; + } + if (parentRule != null) { + for (const tk of parentRule.tokens) { + if (tk.typ == EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + const values = []; + for (const iden of token.l) { + if (iden.typ != EnumToken.IdenTokenType && iden.typ != EnumToken.DashedIdenTokenType) { + continue; + } + if (!(iden.val in root.mapping)) { + const result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? iden.val : moduleSettings.generateScopedName(iden.val, srcIndex, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + root.mapping[iden.val] = (moduleSettings.naming & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + root.revMapping[root.mapping[iden.val]] = iden.val; + } + importMapping[srcIndex][iden.val] = root.mapping[iden.val]; + values.push(root.mapping[iden.val]); + } + mapping[key] = [...new Set([...mapping[key].split(' '), ...values])].join(' '); + } + } + } + } + } + // composes: a b c from global; + else if (token.r.typ == EnumToken.IdenTokenType) { + // global + if (parentRule != null) { + if ('global' == token.r.val.toLowerCase()) { + for (const tk of parentRule.tokens) { + if (tk.typ == EnumToken.ClassSelectorTokenType) { + const val = tk.val.slice(1); + if (val in revMapping) { + const key = revMapping[val]; + mapping[key] = [...new Set([...mapping[key].split(' '), ...(token.l.reduce((acc, curr) => { + if (curr.typ == EnumToken.IdenTokenType) { + acc.push(curr.val); + } + return acc; + }, []))])].join(' '); + } + } + } + } + else { + errors.push({ + action: 'drop', + message: `composes '${token.r.val}' is not supported`, + node + }); + } + } + } + } + parentRule.chi.splice(parentRule.chi.indexOf(node), 1); + } + if (node.typ == EnumToken.DeclarationNodeType && ['grid-column', 'grid-column-start', 'grid-column-end', 'grid-row', 'grid-row-start', 'grid-row-end', 'grid-template', 'grid-template-columns', 'grid-template-rows'].includes(node.nam)) { + for (const { value } of walkValues(node.val, node)) { + if (value.typ != EnumToken.IdenTokenType) { + continue; + } + let idenToken = value.val; + let suffix = ''; + if (idenToken.endsWith('-start')) { + suffix = '-start'; + idenToken = idenToken.slice(0, -6); + } + else if (idenToken.endsWith('-end')) { + suffix = '-end'; + idenToken = idenToken.slice(0, -4); + } + if (!(idenToken in mapping)) { + let result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? idenToken : moduleSettings.generateScopedName(idenToken, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + if (result instanceof Promise) { + result = await result; + } + mapping[idenToken] = result; + revMapping[result] = idenToken; + if (suffix !== '') { + idenToken += suffix; + if (!(idenToken in mapping)) { + mapping[idenToken] = result + suffix; + revMapping[result + suffix] = idenToken; + } + } + } + value.val = mapping[idenToken]; + } + } + else if (node.nam == 'grid-template-areas' || node.nam == 'grid-template') { + for (let i = 0; i < node.val.length; i++) { + if (node.val[i].typ == EnumToken.String) { + const tokens = parseString(node.val[i].val.slice(1, -1), { location: true }); + for (const { value } of walkValues(tokens)) { + if (value.typ == EnumToken.IdenTokenType || value.typ == EnumToken.DashedIdenTokenType) { + if (value.val in mapping) { + value.val = mapping[value.val]; + } + else { + let result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + if (result instanceof Promise) { + result = await result; + } + mapping[value.val] = result; + revMapping[result] = value.val; + value.val = result; + } + } + } + node.val[i].val = node.val[i].val.charAt(0) + tokens.reduce((acc, curr) => acc + renderToken(curr), '') + node.val[i].val.charAt(node.val[i].val.length - 1); + } + } + } + else if (node.nam == 'animation' || node.nam == 'animation-name') { + for (const { value } of walkValues(node.val, node)) { + if (value.typ == EnumToken.IdenTokenType && ![ + 'none', 'infinite', 'normal', 'reverse', 'alternate', + 'alternate-reverse', 'forwards', 'backwards', 'both', + 'running', 'paused', 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', + 'step-start', 'step-end', 'jump-start', 'jump-end', + 'jump-none', 'jump-both', 'start', 'end', + 'inherit', 'initial', 'unset' + ].includes(value.val)) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + mapping[value.val] = result instanceof Promise ? await result : result; + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + } + } + for (const { value, parent } of walkValues(node.val, node)) { + if (value.typ == EnumToken.DashedIdenTokenType) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let val = result instanceof Promise ? await result : result; + mapping[value.val] = '--' + (moduleSettings.naming & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming) : val); + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + else if ((value.typ == EnumToken.IdenTokenType || isIdentColor(value)) && value.val in importedCssVariables) { + replaceToken(parent, value, importedCssVariables[value.val].val); + } + } + } + else if (node.typ == EnumToken.RuleNodeType) { + if (node.tokens == null) { + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + value: parseSelector(parseString(node.sel, { location: true })) + }); + } + let hasIdOrClass = false; + for (const { value } of walkValues(node.tokens, node, + // @ts-ignore + (value, parent) => { + if (value.typ == EnumToken.PseudoClassTokenType) { + const val = value.val.toLowerCase(); + switch (val) { + case ':local': + case ':global': + { + let index = parent.tokens.indexOf(value); + parent.tokens.splice(index, 1); + if (parent.tokens[index]?.typ == EnumToken.WhitespaceTokenType || parent.tokens[index]?.typ == EnumToken.DescendantCombinatorTokenType) { + parent.tokens.splice(index, 1); + } + if (val == ':global') { + for (; index < parent.tokens.length; index++) { + if (parent.tokens[index].typ == EnumToken.CommaTokenType || + ([EnumToken.PseudoClassFuncTokenType, EnumToken.PseudoClassTokenType].includes(parent.tokens[index].typ) && + [':global', ':local'].includes(parent.tokens[index].val.toLowerCase()))) { + break; + } + global.add(parent.tokens[index]); + } + } + } + break; + } + } + else if (value.typ == EnumToken.PseudoClassFuncTokenType) { + switch (value.val.toLowerCase()) { + case ':global': + for (const token of value.chi) { + global.add(token); + } + parent.tokens.splice(parent.tokens.indexOf(value), 1, ...value.chi); + break; + case ':local': + parent.tokens.splice(parent.tokens.indexOf(value), 1, ...value.chi); + break; + } + } + })) { + if (value.typ == EnumToken.HashTokenType || value.typ == EnumToken.ClassSelectorTokenType) { + hasIdOrClass = true; + } + if (processed.has(value)) { + continue; + } + processed.add(value); + if (value.typ == EnumToken.PseudoClassTokenType) ; + else if (value.typ == EnumToken.PseudoClassFuncTokenType) ; + else { + if (global.has(value)) { + continue; + } + if (value.typ == EnumToken.ClassSelectorTokenType) { + const val = value.val.slice(1); + if (!(val in mapping)) { + const result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? val : moduleSettings.generateScopedName(val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let value = result instanceof Promise ? await result : result; + mapping[val] = (moduleSettings.naming & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming) : value); + revMapping[mapping[val]] = val; + } + value.val = '.' + mapping[val]; + } + } + } + if (moduleSettings.scoped & ModuleScopeEnumOptions.Pure) { + if (!hasIdOrClass) { + throw new Error(`pure module: No id or class found in selector '${node.sel}' at '${node.loc?.src ?? ''}':${node.loc?.sta?.lin ?? ''}:${node.loc?.sta?.col ?? ''}`); + } + } + node.sel = ''; + for (const token of node.tokens) { + node.sel += renderToken(token); + } + } + else if (node.typ == EnumToken.AtRuleNodeType || node.typ == EnumToken.KeyframesAtRuleNodeType) { + const val = node.nam.toLowerCase(); + if (node.tokens == null) { + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + // @ts-ignore + value: parseAtRulePrelude(parseString(node.val), node) + }); + } + if (val == 'property' || val == 'keyframes') { + const prefix = val == 'property' ? '--' : ''; + for (const value of node.tokens) { + if ((prefix == '--' && value.typ == EnumToken.DashedIdenTokenType) || (prefix == '' && value.typ == EnumToken.IdenTokenType)) { + if (!(value.val in mapping)) { + const result = (moduleSettings.scoped & ModuleScopeEnumOptions.Global) ? value.val : moduleSettings.generateScopedName(value.val, moduleSettings.filePath, moduleSettings.pattern, moduleSettings.hashLength); + let val = result instanceof Promise ? await result : result; + mapping[value.val] = prefix + (moduleSettings.naming & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming) : val); + revMapping[mapping[value.val]] = value.val; + } + value.val = mapping[value.val]; + } + } + node.val = node.tokens.reduce((a, b) => a + renderToken(b), ''); + } + else { + let isReplaced = false; + for (const { value, parent } of walkValues(node.tokens, node)) { + if (EnumToken.MediaQueryConditionTokenType == parent.typ && value != parent.l) { + if ((value.typ == EnumToken.IdenTokenType || isIdentColor(value)) && value.val in importedCssVariables) { + isReplaced = true; + parent.r.splice(parent.r.indexOf(value), 1, ...importedCssVariables[value.val].val); + } + } + } + if (isReplaced) { + node.val = node.tokens.reduce((a, b) => a + renderToken(b), ''); + } + } + } + } + if (moduleSettings.naming != ModuleCaseTransformEnum.IgnoreCase) { + revMapping = {}; + mapping = Object.entries(mapping).reduce((acc, [key, value]) => { + const keyName = getKeyName(key, moduleSettings.naming); + acc[keyName] = value; + revMapping[value] = keyName; + return acc; + }, {}); + } + result.mapping = mapping; + result.revMapping = revMapping; + if ((moduleSettings.scoped & ModuleScopeEnumOptions.ICSS) && Object.keys(importMapping).length > 0) { + result.importMapping = importMapping; + } + endTime = performance.now(); + result.stats.module = `${(endTime - parseModuleTime).toFixed(2)}ms`; + result.stats.total = `${(endTime - startTime).toFixed(2)}ms`; + } + if (options.signal != null) { + options.signal.removeEventListener('abort', reject); + } + return result; } function getLastNode(context) { let i = context.chi.length; @@ -795,6 +1416,147 @@ function parseNode(results, context, options, errors, src, map, rawTokens, stats isValid = false; } } + if (node.nam == 'value') { + let i = 0; + while (i < tokens.length) { + if (tokens[i].typ == EnumToken.WhitespaceTokenType || tokens[i].typ == EnumToken.CommentTokenType) { + i++; + continue; + } + break; + } + if (i < tokens.length) { + if (tokens[i].typ == EnumToken.IdenTokenType || isIdentColor(tokens[i])) { + let k = i + 1; + while (k < tokens.length) { + if (tokens[k].typ == EnumToken.WhitespaceTokenType || tokens[k].typ == EnumToken.CommentTokenType) { + k++; + continue; + } + // var or import + if (tokens[k].typ == EnumToken.ColonTokenType) { + let j = k; + while (++j < tokens.length) { + if (tokens[j].typ != EnumToken.WhitespaceTokenType && tokens[j].typ != EnumToken.CommentTokenType) { + break; + } + } + let offset = k + 1; + while (offset < tokens.length && tokens[offset].typ == EnumToken.WhitespaceTokenType) { + offset++; + } + if (tokens[j].typ == EnumToken.StringTokenType) { + Object.assign(node, { + typ: EnumToken.CssVariableImportTokenType, + nam: tokens[i].val, + val: tokens.slice(offset) + }); + delete node.tokens; + // @ts-ignore + delete node.raw; + context.chi.push(node); + return null; + } + Object.assign(node, { + typ: EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(offset) + }); + context.chi.push(node); + return null; + } + if (tokens[k].typ == EnumToken.PseudoClassTokenType) { + Object.assign(tokens[k], { + typ: EnumToken.IdenTokenType, + val: tokens[k].val.slice(1) + }); + Object.assign(node, { + typ: EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(k) + }); + context.chi.push(node); + return null; + } + if (tokens[k].typ == EnumToken.CommaTokenType) { + let j = i; + while (++j < tokens.length) { + if (tokens[j].typ == EnumToken.IdenTokenType && tokens[j].val.toLowerCase() == 'from') { + const vars = tokens.slice(i, j); + const from = tokens.slice(j + 1); + let l = 0; + let expect = EnumToken.IdenTokenType; + for (; l < vars.length; l++) { + if (vars[l].typ == EnumToken.WhitespaceTokenType || vars[l].typ == EnumToken.CommentTokenType) { + continue; + } + if (expect == vars[l].typ || (expect == EnumToken.IdenTokenType && isIdentColor(vars[l]))) { + expect = expect == EnumToken.CommaTokenType ? EnumToken.IdenTokenType : EnumToken.CommaTokenType; + continue; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(vars[l]) ?? location, + message: `expecting '${EnumToken[expect]}' but found ${renderToken(vars[l])}` + }); + return null; + } + l = 0; + expect = EnumToken.IdenTokenType; + for (; l < from.length; l++) { + if (from[l].typ == EnumToken.WhitespaceTokenType || from[l].typ == EnumToken.CommentTokenType) { + continue; + } + if (expect == from[l].typ || isIdentColor(from[l])) { + while (++l < from.length) { + if (from[l].typ == EnumToken.WhitespaceTokenType || from[l].typ == EnumToken.CommentTokenType) { + continue; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `unexpected '${renderToken(from[l])}'` + }); + return null; + } + break; + } + errors.push({ + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `expecting but found ${renderToken(from[l])}` + }); + return null; + } + // @ts-ignore + delete node.nam; + // @ts-ignore + delete node.val; + Object.assign(node, { + typ: EnumToken.CssVariableDeclarationMapTokenType, + vars, + from + }); + context.chi.push(node); + return null; + } + } + } + k++; + } + Object.assign(node, { + typ: EnumToken.CssVariableTokenType, + nam: tokens[i].val, + val: tokens.slice(k) + }); + context.chi.push(node); + return null; + } + } + } // @ts-ignore const skipValidate = (options.validation & ValidationLevel.AtRule) == 0; const isAllowed = skipValidate || isNodeAllowedInContext(node, context); @@ -1333,6 +2095,7 @@ async function parseDeclarations(declaration) { return doParse(tokenize({ stream: `.x{${declaration}}`, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), { setParent: false, minify: false, validation: false }).then(result => { @@ -1453,6 +2216,7 @@ function parseString(src, options = { location: false }) { const parseInfo = { stream: src, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }; @@ -1578,12 +2342,10 @@ function getTokenType(val, hint) { val: +val.slice(0, -1) }; } - // if (isDimension(val)) { const dimension = parseDimension(val); if (dimension != null) { return dimension; } - // } const v = val.toLowerCase(); if (v == 'currentcolor' || v == 'transparent' || v in COLORS_NAMES) { return { @@ -1612,6 +2374,12 @@ function getTokenType(val, hint) { val }; } + if (val.charAt(0) == '.' && isIdent(val.slice(1))) { + return { + typ: EnumToken.ClassSelectorTokenType, + val + }; + } if (val.charAt(0) == '#' && isHexColor(val)) { return { typ: EnumToken.ColorTokenType, @@ -1659,6 +2427,55 @@ function getTokenType(val, hint) { function parseTokens(tokens, options = {}) { for (let i = 0; i < tokens.length; i++) { const t = tokens[i]; + if (t.typ == EnumToken.IdenTokenType && t.val == 'from' && i > 0) { + const left = []; + const right = []; + let foundLeft = 0; + let foundRight = 0; + let k = i; + let l = i; + while (k > 0) { + if (tokens[k - 1].typ == EnumToken.CommentTokenType || tokens[k - 1].typ == EnumToken.WhitespaceTokenType) { + left.push(tokens[--k]); + continue; + } + if (tokens[k - 1].typ == EnumToken.IdenTokenType || tokens[k - 1].typ == EnumToken.DashedIdenTokenType) { + foundLeft++; + left.push(tokens[--k]); + continue; + } + break; + } + while (++l < tokens.length) { + if (tokens[l].typ == EnumToken.CommentTokenType || tokens[l].typ == EnumToken.WhitespaceTokenType) { + right.push(tokens[l]); + continue; + } + if (tokens[l].typ == EnumToken.IdenTokenType || tokens[l].typ == EnumToken.StringTokenType) { + foundRight++; + right.push(tokens[l]); + continue; + } + break; + } + if (foundLeft > 0 && foundRight == 1) { + while (left?.[0].typ == EnumToken.WhitespaceTokenType) { + left.shift(); + } + while (left.at(-1)?.typ == EnumToken.WhitespaceTokenType) { + left.pop(); + } + tokens.splice(k, l - k + 1, { + typ: EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a, b) => { + return a == null ? b : b.typ == EnumToken.IdenTokenType || b.typ == EnumToken.StringTokenType ? b : a; + }, null) + }); + i = k; + continue; + } + } if (t.typ == EnumToken.WhitespaceTokenType && ((i == 0 || i + 1 == tokens.length || [EnumToken.CommaTokenType, EnumToken.GteTokenType, EnumToken.LteTokenType, EnumToken.ColumnCombinatorTokenType].includes(tokens[i + 1].typ)) || @@ -1942,4 +2759,4 @@ function parseTokens(tokens, options = {}) { return tokens; } -export { doParse, getTokenType, parseAtRulePrelude, parseDeclarations, parseSelector, parseString, parseTokens, replaceToken, urlTokenMatcher }; +export { doParse, generateScopedName, getKeyName, getTokenType, parseAtRulePrelude, parseDeclarations, parseSelector, parseString, parseTokens, replaceToken, urlTokenMatcher }; diff --git a/dist/lib/parser/tokenize.js b/dist/lib/parser/tokenize.js index dec7b934..3ee635b4 100644 --- a/dist/lib/parser/tokenize.js +++ b/dist/lib/parser/tokenize.js @@ -138,23 +138,27 @@ function* consumeString(quoteStr, buffer, parseInfo) { } } function match(parseInfo, input) { - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + input.length + 1) == input; + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + input.length + 1) == input; } function peek(parseInfo, count = 1) { if (count == 1) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1); + return parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset + 1); } - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + count + 1); + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + count + 1); } function prev(parseInfo) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind - 1); + return parseInfo.offset == parseInfo.currentPosition.ind ? parseInfo.buffer.slice(-1) : parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset - 1); } function next(parseInfo, count = 1) { let char = ''; let chr = ''; - while (count-- && (chr = parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1))) { + let position = parseInfo.currentPosition.ind - parseInfo.offset; + while (count-- && (chr = parseInfo.stream.charAt(position + 1))) { char += chr; - const codepoint = parseInfo.stream.charCodeAt(++parseInfo.currentPosition.ind); + const codepoint = parseInfo.stream.charCodeAt(++position); + ++parseInfo.currentPosition.ind; if (isNewLine(codepoint)) { parseInfo.currentPosition.lin++; parseInfo.currentPosition.col = 0; @@ -570,6 +574,7 @@ async function* tokenizeStream(input) { const parseInfo = { stream: '', buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }; @@ -577,7 +582,17 @@ async function* tokenizeStream(input) { const reader = input.getReader(); while (true) { const { done, value } = await reader.read(); - parseInfo.stream += ArrayBuffer.isView(value) ? decoder.decode(value, { stream: true }) : value; + const stream = ArrayBuffer.isView(value) ? decoder.decode(value, { stream: true }) : value; + if (!done) { + if (parseInfo.stream.length > 2) { + parseInfo.stream = parseInfo.stream.slice(-2) + stream; + parseInfo.offset = parseInfo.currentPosition.ind - 1; + } + else { + parseInfo.stream = stream; + parseInfo.offset = Math.max(0, parseInfo.currentPosition.ind); + } + } yield* tokenize(parseInfo, done); if (done) { break; diff --git a/dist/lib/parser/utils/declaration.js b/dist/lib/parser/utils/declaration.js index 745c50bb..3a62fb94 100644 --- a/dist/lib/parser/utils/declaration.js +++ b/dist/lib/parser/utils/declaration.js @@ -20,6 +20,60 @@ function parseDeclarationNode(node, errors, location) { }); return null; } + if ('composes' == node.nam.toLowerCase()) { + let left = []; + let right = []; + let current = 0; + let hasFrom = 0; + for (; current < node.val.length; current++) { + if (EnumToken.WhitespaceTokenType == node.val[current].typ || EnumToken.CommentTokenType == node.val[current].typ) { + if (!hasFrom) { + left.push(node.val[current]); + } + else { + right.push(node.val[current]); + } + continue; + } + if (EnumToken.IdenTokenType == node.val[current].typ || EnumToken.DashedIdenTokenType == node.val[current].typ || EnumToken.StringTokenType == node.val[current].typ) { + if (EnumToken.IdenTokenType == node.val[current].typ) { + if ('from' == node.val[current].val) { + if (hasFrom) { + return null; + } + hasFrom++; + continue; + } + } + if (hasFrom) { + right.push(node.val[current]); + } + else { + left.push(node.val[current]); + } + continue; + } + break; + } + if (hasFrom <= 1 && current > 0) { + if (hasFrom == 0) { + node.val.splice(0, left.length, { + typ: EnumToken.ComposesSelectorNodeType, + l: left, + r: null + }); + } + else { + node.val.splice(0, current, { + typ: EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a, b) => { + return a == null ? b : b.typ == EnumToken.WhitespaceTokenType || b.typ == EnumToken.CommentTokenType ? a : b; + }, null) + }); + } + } + } for (const { value: val, parent } of walkValues(node.val, node)) { if (val.typ == EnumToken.AttrTokenType && val.chi.every((t) => [EnumToken.IdenTokenType, EnumToken.WhitespaceTokenType, EnumToken.CommentTokenType].includes(t.typ))) { // @ts-ignore diff --git a/dist/lib/parser/utils/hash.js b/dist/lib/parser/utils/hash.js new file mode 100644 index 00000000..83179138 --- /dev/null +++ b/dist/lib/parser/utils/hash.js @@ -0,0 +1,86 @@ +// Alphabet: a-z, A-Z, 0-9, _, - +const LOWER = "abcdefghijklmnopqrstuvwxyz"; +const DIGITS = "0123456789"; +const FULL_ALPHABET = (LOWER + DIGITS).split(""); // 64 chars +const FIRST_ALPHABET = (LOWER).split(""); // 54 chars (no digits) +/** + * supported hash algorithms + */ +const hashAlgorithms = ['hex', 'base64', 'base64url', 'sha1', 'sha256', 'sha384', 'sha512']; +// simple deterministic hash → number +function hashCode(str) { + let hash = 0; + let l = str.length; + let i = 0; + while (i < l) { + hash = (hash * 31 + str.charCodeAt(i++)) >>> 0; + } + return hash; +} +/** + * generate a hash id + * @param input + * @param length + */ +function hashId(input, length = 6) { + let n = hashCode(input); + const chars = []; + // First character: must not be a digit + chars.push(FIRST_ALPHABET[n % FIRST_ALPHABET.length]); + // Remaining characters + for (let i = 1; i < length; i++) { + n = (n + chars.length + i) % FULL_ALPHABET.length; + chars.push(FULL_ALPHABET[n]); + } + return chars.join(""); +} +/** + * convert input to hex + * @param input + */ +function toHex(input) { + let result = ''; + if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) { + for (const byte of Array.from(new Uint8Array(input))) { + result += byte.toString(16).padStart(2, '0'); + } + } + else { + for (const char of String(input)) { + result += char.charCodeAt(0).toString(16).padStart(2, '0'); + } + } + return result; +} +/** + * generate a hash + * @param input + * @param length + * @param algo + */ +async function hash(input, length = 6, algo) { + let result; + if (algo != null) { + switch (algo) { + case 'hex': + return toHex(input).slice(0, length); + case 'base64': + case 'base64url': + result = btoa(input); + if (algo == 'base64url') { + result = result.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); + } + return result.slice(0, length); + case 'sha1': + case 'sha256': + case 'sha384': + case 'sha512': + return toHex(await crypto.subtle.digest(algo.replace('sha', 'SHA-'), new TextEncoder().encode(input))).slice(0, length); + default: + throw new Error(`Unsupported hash algorithm: ${algo}`); + } + } + return hashId(input, length); +} + +export { hash, hashAlgorithms, hashId }; diff --git a/dist/lib/parser/utils/text.js b/dist/lib/parser/utils/text.js new file mode 100644 index 00000000..e5a29f2c --- /dev/null +++ b/dist/lib/parser/utils/text.js @@ -0,0 +1,8 @@ +function dasherize(value) { + return value.replace(/([A-Z])/g, (all, one) => `-${one.toLowerCase()}`); +} +function camelize(value) { + return value.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); +} + +export { camelize, dasherize }; diff --git a/dist/lib/renderer/render.js b/dist/lib/renderer/render.js index 95790eb4..14bf3ab0 100644 --- a/dist/lib/renderer/render.js +++ b/dist/lib/renderer/render.js @@ -29,9 +29,10 @@ function update(position, str) { * render ast * @param data * @param options + * @param mapping * @private */ -function doRender(data, options = {}) { +function doRender(data, options = {}, mapping) { const minify = options.minify ?? true; const beautify = options.beautify ?? !minify; options = { @@ -68,12 +69,23 @@ function doRender(data, options = {}) { const errors = []; const sourcemap = options.sourcemap ? new SourceMap : null; const cache = Object.create(null); + const position = { + ind: 0, + lin: 1, + col: 1 + }; + let code = ''; + if (mapping != null) { + if (mapping.importMapping != null) { + for (const [key, value] of Object.entries(mapping.importMapping)) { + code += `:import("${key}")${options.indent}{${options.newLine}${Object.entries(value).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${v}:${options.indent}${k};`, '')}${options.newLine}}${options.newLine}`; + } + } + code += `:export${options.indent}{${options.newLine}${Object.entries(mapping.mapping).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${k}:${options.indent}${v};`, '')}${options.newLine}}${options.newLine}`; + update(position, code); + } const result = { - code: renderAstNode(options.expandNestingRules && [EnumToken.StyleSheetNodeType, EnumToken.AtRuleNodeType, EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data) : data, options, sourcemap, { - ind: 0, - lin: 1, - col: 1 - }, errors, function reducer(acc, curr) { + code: code + renderAstNode(options.expandNestingRules && [EnumToken.StyleSheetNodeType, EnumToken.AtRuleNodeType, EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data) : data, options, sourcemap, position, errors, function reducer(acc, curr) { if (curr.typ == EnumToken.CommentTokenType && options.removeComments) { if (!options.preserveLicense || !curr.val.startsWith('/*!')) { return acc; @@ -232,6 +244,11 @@ function renderAstNode(data, options, sourcemap, position, errors, reducer, cach return `@${data.nam}${data.val === '' ? '' : options.indent || ' '}${data.val}${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; } return data.sel + `${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; + case EnumToken.CssVariableTokenType: + case EnumToken.CssVariableImportTokenType: + return `@value ${data.nam}:${options.indent}${filterValues((options.minify ? data.val : data.val)).reduce(reducer, '').trim()};`; + case EnumToken.CssVariableDeclarationMapTokenType: + return `@value ${filterValues(data.vars).reduce((acc, curr) => acc + renderToken(curr), '').trim()} from ${filterValues(data.from).reduce((acc, curr) => acc + renderToken(curr), '').trim()};`; case EnumToken.InvalidDeclarationNodeType: case EnumToken.InvalidRuleTokenType: case EnumToken.InvalidAtRuleTokenType: @@ -386,6 +403,8 @@ function renderToken(token, options = {}, cache = Object.create(null), reducer, case EnumToken.NameSpaceAttributeTokenType: return (token.l == null ? '' : renderToken(token.l, options, cache, reducer, errors)) + '|' + renderToken(token.r, options, cache, reducer, errors); + case EnumToken.ComposesSelectorNodeType: + return token.l.reduce((acc, curr) => acc + renderToken(curr, options, cache), '') + (token.r == null ? '' : ' from ' + renderToken(token.r, options, cache, reducer, errors)); case EnumToken.BlockStartTokenType: return '{'; case EnumToken.BlockEndTokenType: diff --git a/dist/lib/syntax/color/relativecolor.js b/dist/lib/syntax/color/relativecolor.js index 4173091e..49dd7757 100644 --- a/dist/lib/syntax/color/relativecolor.js +++ b/dist/lib/syntax/color/relativecolor.js @@ -77,10 +77,7 @@ function computeComponentValue(expr, converted, values) { // normalize hue for (const k of walkValues([object.h])) { if (k.value.typ == EnumToken.AngleTokenType && k.value.unit == 'deg') { - // @ts-ignore k.value.typ = EnumToken.NumberTokenType; - // @ts-ignore - delete k.value.unit; } } } diff --git a/dist/lib/validation/config.json.js b/dist/lib/validation/config.json.js index a838b59a..d4f3b9dd 100644 --- a/dist/lib/validation/config.json.js +++ b/dist/lib/validation/config.json.js @@ -753,7 +753,7 @@ var declarations = { syntax: "[ ? ]+ | none" }, cursor: { - syntax: "[ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" + syntax: "[ [ [ ]? , ]* ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" }, cx: { syntax: " | " @@ -1981,6 +1981,12 @@ var declarations = { }, "white-space-trim": { syntax: "none | discard-before || discard-after || discard-inner" + }, + composes: { + syntax: "#" + }, + "composes-selector": { + syntax: "+ [from [global&&]]?" } }; var functions = { @@ -2006,7 +2012,7 @@ var functions = { syntax: "atan2( , )" }, attr: { - syntax: "attr( ? [, ]? )" + syntax: "attr( ? , ? )" }, blur: { syntax: "blur( ? )" @@ -2359,7 +2365,7 @@ var syntaxes = { syntax: "scroll | fixed | local" }, "attr()": { - syntax: "attr( ? [, ]? )" + syntax: "attr( ? , ? )" }, "attr-matcher": { syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='" @@ -2367,6 +2373,9 @@ var syntaxes = { "attr-modifier": { syntax: "i | s" }, + "attr-type": { + syntax: "type( ) | raw-string | number | " + }, "attribute-selector": { syntax: "'[' ']' | '[' [ | ] ? ']'" }, @@ -2580,6 +2589,9 @@ var syntaxes = { "cubic-bezier-easing-function": { syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier( , , , )" }, + "cursor-predefined": { + syntax: "auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing" + }, "custom-color-space": { syntax: "" }, diff --git a/dist/lib/validation/syntax.js b/dist/lib/validation/syntax.js index 6f6c71c2..e1a46a51 100644 --- a/dist/lib/validation/syntax.js +++ b/dist/lib/validation/syntax.js @@ -11,6 +11,7 @@ import '../renderer/sourcemap/lib/encode.js'; import { getSyntaxConfig, getParsedSyntax, getSyntax } from './config.js'; import './syntaxes/complex-selector.js'; import { funcLike, colorsFunc } from '../syntax/color/utils/constants.js'; +import '../../types.js'; import '../ast/features/type.js'; const config = getSyntaxConfig(); @@ -615,6 +616,7 @@ function matchPropertyType(syntax, context, options) { 'color', 'integer', 'bg-position', + 'composes-selector', 'length-percentage', 'flex', 'calc-sum', 'color', 'color-base', 'system-color', 'deprecated-system-color', 'pseudo-class-selector', 'pseudo-element-selector', 'feature-value-declaration' @@ -645,6 +647,9 @@ function matchPropertyType(syntax, context, options) { return { ...result, context }; } switch (syntax.val) { + case 'composes-selector': + success = token.typ == EnumToken.ComposesSelectorNodeType; + break; case 'bg-position': { let val; let keyworkMatchCount = 0; @@ -812,7 +817,7 @@ function matchPropertyType(syntax, context, options) { } break; case 'integer': - success = (token.typ == EnumToken.NumberTokenType && Number.isInteger(+token.val) && token.val > 0) || (token.typ == EnumToken.FunctionTokenType && mathFuncs.includes(token.val.toLowerCase()) || (token.typ == EnumToken.FunctionTokenType && wildCardFuncs.includes(token.val))); + success = (token.typ == EnumToken.NumberTokenType && /^[+-]?\d+$/.test(token.val.toString())) || (token.typ == EnumToken.FunctionTokenType && mathFuncs.includes(token.val.toLowerCase()) || (token.typ == EnumToken.FunctionTokenType && wildCardFuncs.includes(token.val))); if ('range' in syntax) { success = success && +token.val >= +syntax.range[0] && +token.val <= +syntax.range[1]; } diff --git a/dist/lib/validation/syntaxes/compound-selector.js b/dist/lib/validation/syntaxes/compound-selector.js index 84471be1..c15564b8 100644 --- a/dist/lib/validation/syntaxes/compound-selector.js +++ b/dist/lib/validation/syntaxes/compound-selector.js @@ -20,8 +20,7 @@ function validateCompoundSelector(tokens, root, options) { node: root, // @ts-ignore syntax: null, - error: 'expected selector', - tokens + error: 'expected selector' }; } tokens = tokens.slice(); diff --git a/dist/lib/validation/syntaxes/relative-selector-list.js b/dist/lib/validation/syntaxes/relative-selector-list.js index dbcafa88..a56bf158 100644 --- a/dist/lib/validation/syntaxes/relative-selector-list.js +++ b/dist/lib/validation/syntaxes/relative-selector-list.js @@ -19,15 +19,12 @@ function validateRelativeSelectorList(tokens, root, options) { return result; } } + // @ts-ignore return { valid: SyntaxValidationResult.Valid, - matches: [], - // @ts-ignore node: root, - // @ts-ignore syntax: null, - error: '', - tokens + error: '' }; } diff --git a/dist/node.js b/dist/node.js index eaa3dc34..0651c54f 100644 --- a/dist/node.js +++ b/dist/node.js @@ -1,5 +1,6 @@ import process from 'node:process'; -export { ColorType, EnumToken, ValidationLevel } from './lib/ast/types.js'; +import { ModuleScopeEnumOptions } from './lib/ast/types.js'; +export { ColorType, EnumToken, ModuleCaseTransformEnum, ValidationLevel } from './lib/ast/types.js'; export { minify } from './lib/ast/minify.js'; export { WalkerEvent, WalkerOptionEnum, walk, walkValues } from './lib/ast/walk.js'; export { expand } from './lib/ast/expand.js'; @@ -21,34 +22,47 @@ import { resolve, matchUrl, dirname } from './lib/fs/resolve.js'; import { Readable } from 'node:stream'; import { createReadStream } from 'node:fs'; import { readFile, lstat } from 'node:fs/promises'; +import { ResponseType } from './types.js'; export { FeatureWalkMode } from './lib/ast/features/type.js'; /** * load file or url as stream * @param url * @param currentFile - * @param asStream + * @param responseType * @throws Error file not found * * @private */ -async function load(url, currentFile = '.', asStream = false) { +async function load(url, currentFile = '.', responseType = false) { const resolved = resolve(url, currentFile); + if (typeof responseType == 'boolean') { + responseType = responseType ? ResponseType.ReadableStream : ResponseType.Text; + } if (matchUrl.test(resolved.absolute)) { return fetch(resolved.absolute).then(async (response) => { if (!response.ok) { throw new Error(`${response.status} ${response.statusText} ${response.url}`); } - return asStream ? response.body : await response.text(); + if (responseType == ResponseType.ArrayBuffer) { + return response.arrayBuffer(); + } + return responseType == ResponseType.ReadableStream ? response.body : await response.text(); }); } try { - if (!asStream) { + if (responseType == ResponseType.Text) { return readFile(resolved.absolute, 'utf-8'); } + if (responseType == ResponseType.ArrayBuffer) { + return readFile(resolved.absolute).then(buffer => buffer.buffer); + } const stats = await lstat(resolved.absolute); if (stats.isFile()) { - return Readable.toWeb(createReadStream(resolved.absolute, { encoding: 'utf-8', highWaterMark: 64 * 1024 })); + return Readable.toWeb(createReadStream(resolved.absolute, { + encoding: 'utf-8', + highWaterMark: 64 * 1024 + })); } } catch (error) { @@ -60,6 +74,7 @@ async function load(url, currentFile = '.', asStream = false) { * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -84,8 +99,8 @@ async function load(url, currentFile = '.', asStream = false) { * // } * ``` */ -function render(data, options = {}) { - return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? process.cwd() })); +function render(data, options = {}, mapping) { + return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? process.cwd() }), mapping); } /** * parse css file @@ -160,9 +175,18 @@ async function parse(stream, options = {}) { return doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } - }), Object.assign(options, { load, resolve, dirname, cwd: options.cwd ?? process.cwd() })); + }), Object.assign(options, { + load, + resolve, + dirname, + cwd: options.cwd ?? process.cwd() + })).then(result => { + const { revMapping, ...res } = result; + return res; + }); } /** * transform css file @@ -237,8 +261,21 @@ async function transform(css, options = {}) { options = { minify: true, removeEmpty: true, removeCharset: true, ...options }; const startTime = performance.now(); return parse(css, options).then((parseResult) => { + let mapping = null; + let importMapping = null; + if (typeof options.module == 'number' && (options.module & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } + else if (typeof options.module == 'object' && typeof options.module.scoped == 'number' && (options.module.scoped & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } // ast already expanded by parse - const rendered = render(parseResult.ast, { ...options, expandNestingRules: false }); + const rendered = render(parseResult.ast, { + ...options, + expandNestingRules: false + }, mapping != null ? { mapping, importMapping } : null); return { ...parseResult, ...rendered, @@ -253,4 +290,4 @@ async function transform(css, options = {}) { }); } -export { dirname, load, parse, parseFile, render, resolve, transform, transformFile }; +export { ModuleScopeEnumOptions, ResponseType, dirname, load, parse, parseFile, render, resolve, transform, transformFile }; diff --git a/dist/types.d.ts b/dist/types.d.ts new file mode 100644 index 00000000..7c6b4884 --- /dev/null +++ b/dist/types.d.ts @@ -0,0 +1,17 @@ +/** + * response type + */ +export declare enum ResponseType { + /** + * return text + */ + Text = 0, + /** + * return a readable stream + */ + ReadableStream = 1, + /** + * return an arraybuffer + */ + ArrayBuffer = 2 +} diff --git a/dist/types.js b/dist/types.js new file mode 100644 index 00000000..ced6b074 --- /dev/null +++ b/dist/types.js @@ -0,0 +1,20 @@ +/** + * response type + */ +var ResponseType; +(function (ResponseType) { + /** + * return text + */ + ResponseType[ResponseType["Text"] = 0] = "Text"; + /** + * return a readable stream + */ + ResponseType[ResponseType["ReadableStream"] = 1] = "ReadableStream"; + /** + * return an arraybuffer + */ + ResponseType[ResponseType["ArrayBuffer"] = 2] = "ArrayBuffer"; +})(ResponseType || (ResponseType = {})); + +export { ResponseType }; diff --git a/dist/web.js b/dist/web.js index 4d94555d..106474a0 100644 --- a/dist/web.js +++ b/dist/web.js @@ -1,4 +1,5 @@ -export { ColorType, EnumToken, ValidationLevel } from './lib/ast/types.js'; +import { ModuleScopeEnumOptions } from './lib/ast/types.js'; +export { ColorType, EnumToken, ModuleCaseTransformEnum, ValidationLevel } from './lib/ast/types.js'; export { minify } from './lib/ast/minify.js'; export { WalkerEvent, WalkerOptionEnum, walk, walkValues } from './lib/ast/walk.js'; export { expand } from './lib/ast/expand.js'; @@ -17,6 +18,7 @@ import './lib/validation/parser/parse.js'; import './lib/validation/syntaxes/complex-selector.js'; import './lib/validation/syntax.js'; import { matchUrl, resolve, dirname } from './lib/fs/resolve.js'; +import { ResponseType } from './types.js'; export { FeatureWalkMode } from './lib/ast/features/type.js'; /** @@ -24,10 +26,13 @@ export { FeatureWalkMode } from './lib/ast/features/type.js'; * @param url * @param currentFile * - * @param asStream + * @param responseType * @private */ -async function load(url, currentFile = '.', asStream = false) { +async function load(url, currentFile = '.', responseType = false) { + if (typeof responseType == 'boolean') { + responseType = responseType ? ResponseType.ReadableStream : ResponseType.Text; + } let t; if (matchUrl.test(url)) { t = new URL(url); @@ -43,13 +48,17 @@ async function load(url, currentFile = '.', asStream = false) { if (!response.ok) { throw new Error(`${response.status} ${response.statusText} ${response.url}`); } - return asStream ? response.body : await response.text(); + if (responseType == ResponseType.ArrayBuffer) { + return response.arrayBuffer(); + } + return responseType == ResponseType.ReadableStream ? response.body : await response.text(); }); } /** * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -74,12 +83,12 @@ async function load(url, currentFile = '.', asStream = false) { * // } * ``` */ -function render(data, options = {}) { +function render(data, options = {}, mapping) { return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? self.location.pathname.endsWith('/') ? self.location.pathname : dirname(self.location.pathname) - })); + }), mapping); } /** * parse css file @@ -139,6 +148,7 @@ async function parse(stream, options = {}) { return doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ stream, buffer: '', + offset: 0, position: { ind: 0, lin: 1, col: 1 }, currentPosition: { ind: -1, lin: 1, col: 0 } }), Object.assign(options, { @@ -146,7 +156,10 @@ async function parse(stream, options = {}) { resolve, dirname, cwd: options.cwd ?? self.location.pathname.endsWith('/') ? self.location.pathname : dirname(self.location.pathname) - })); + })).then(result => { + const { revMapping, ...res } = result; + return res; + }); } /** * transform css file @@ -198,8 +211,21 @@ async function transform(css, options = {}) { options = { minify: true, removeEmpty: true, removeCharset: true, ...options }; const startTime = performance.now(); return parse(css, options).then((parseResult) => { + let mapping = null; + let importMapping = null; + if (typeof options.module == 'number' && (options.module & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } + else if (typeof options.module == 'object' && typeof options.module.scoped == 'number' && (options.module.scoped & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping; + importMapping = parseResult.importMapping; + } // ast already expanded by parse - const rendered = render(parseResult.ast, { ...options, expandNestingRules: false }); + const rendered = render(parseResult.ast, { + ...options, + expandNestingRules: false + }, mapping != null ? { mapping, importMapping } : null); return { ...parseResult, ...rendered, @@ -214,4 +240,4 @@ async function transform(css, options = {}) { }); } -export { dirname, load, parse, parseFile, render, resolve, transform, transformFile }; +export { ModuleScopeEnumOptions, ResponseType, dirname, load, parse, parseFile, render, resolve, transform, transformFile }; diff --git a/docs/assets/hierarchy.js b/docs/assets/hierarchy.js index 13cdab0f..4a30192e 100644 --- a/docs/assets/hierarchy.js +++ b/docs/assets/hierarchy.js @@ -1 +1 @@ -window.hierarchyData = "eJylm8ty3LYSht+F605C3AHtbF1yXMeWFI18ziKVBTSEJJY5oEJyXFa5/O4pjqURQHKquicLaTP98+sGG0Djwu9F17ZDX5z8yZkGp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SRk60kzy7P8ZPRiy2Wk50HtU9dP3rK+VOmQDItz0ck2jBEG3uyq17T2oy0kCORslO812sEBOBcg+Pa/ORpuuF0yPC+okPys9Ooi1DV/uU+Ghq+EGHJbg/5c4fP4DUdks/1Hv5lbPDbW6tCpAdC7PHgmLCOX9Nh+fvewCU+9VZkSHp2R2P3mP9uQ/980sWqJs12+7RIP7L9zdMwbEKsfBwP6IZ7xUhPdDprfA4/xpv6rqnjwwGu7FdjfUl7x832btjt4h7SKnvFSE9MNgdUhL28itQbjM0jpgRI4dgs3+rvhBOQ7xSOS7PpYouvdV5tsZw0U75E3z+f/XjqwzAg7wzOJDiqK/NTCU88lU4FSGI2U36oc6/xNeuaEOlBthLb7Rwc4MCaDsnP7lV89m24mfZWp4qnvtuO+IphjxTrRTprka4/EW8+OZnfCmqfuiEccM1uTYj0IJubTobhT9/X/o5wrjjXILnZ+VvyjF8Lht2Tbp+fUHc496uRvmRrqeRpF/7pUEdSKc4Lll8pveq7p9CPz1NGUb6wWMoO/t5DqHRf7v0Lm9c0O+jznJkY2zZm/Quh6zBsG9SN27mG/n2Qcb9aJdsLTgJ7jqP/cYhDqRLZHoujuSHgyYk5uRWMUrtW0Nnt8t0TKfmQCchOKAFMuxdHdNoS1yFWJEcyAb2nvDphl07g30dqf/gLyT4yuO19HO67viU0xVyDTEWjVsH48GcSDPbnz/8DzYnRnQ==" \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index cfb23a3a..a871854d 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -35,6 +35,20 @@ --dark-hl-16: #CE9178; --light-hl-17: #CD3131; --dark-hl-17: #F44747; + --light-hl-18: #811F3F; + --dark-hl-18: #D16969; + --light-hl-19: #D16969; + --dark-hl-19: #CE9178; + --light-hl-20: #000000; + --dark-hl-20: #D7BA7D; + --light-hl-21: #EE0000; + --dark-hl-21: #D7BA7D; + --light-hl-22: #EE0000; + --dark-hl-22: #DCDCAA; + --light-hl-23: #0451A5; + --dark-hl-23: #9CDCFE; + --light-hl-24: #000000; + --dark-hl-24: #C8C8C8; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -58,6 +72,13 @@ --hl-15: var(--light-hl-15); --hl-16: var(--light-hl-16); --hl-17: var(--light-hl-17); + --hl-18: var(--light-hl-18); + --hl-19: var(--light-hl-19); + --hl-20: var(--light-hl-20); + --hl-21: var(--light-hl-21); + --hl-22: var(--light-hl-22); + --hl-23: var(--light-hl-23); + --hl-24: var(--light-hl-24); --code-background: var(--light-code-background); } } @@ -80,6 +101,13 @@ --hl-15: var(--dark-hl-15); --hl-16: var(--dark-hl-16); --hl-17: var(--dark-hl-17); + --hl-18: var(--dark-hl-18); + --hl-19: var(--dark-hl-19); + --hl-20: var(--dark-hl-20); + --hl-21: var(--dark-hl-21); + --hl-22: var(--dark-hl-22); + --hl-23: var(--dark-hl-23); + --hl-24: var(--dark-hl-24); --code-background: var(--dark-code-background); } } @@ -102,6 +130,13 @@ --hl-15: var(--light-hl-15); --hl-16: var(--light-hl-16); --hl-17: var(--light-hl-17); + --hl-18: var(--light-hl-18); + --hl-19: var(--light-hl-19); + --hl-20: var(--light-hl-20); + --hl-21: var(--light-hl-21); + --hl-22: var(--light-hl-22); + --hl-23: var(--light-hl-23); + --hl-24: var(--light-hl-24); --code-background: var(--light-code-background); } @@ -124,6 +159,13 @@ --hl-15: var(--dark-hl-15); --hl-16: var(--dark-hl-16); --hl-17: var(--dark-hl-17); + --hl-18: var(--dark-hl-18); + --hl-19: var(--dark-hl-19); + --hl-20: var(--dark-hl-20); + --hl-21: var(--dark-hl-21); + --hl-22: var(--dark-hl-22); + --hl-23: var(--dark-hl-23); + --hl-24: var(--dark-hl-24); --code-background: var(--dark-code-background); } @@ -145,4 +187,11 @@ .hl-15 { color: var(--hl-15); } .hl-16 { color: var(--hl-16); } .hl-17 { color: var(--hl-17); } +.hl-18 { color: var(--hl-18); } +.hl-19 { color: var(--hl-19); } +.hl-20 { color: var(--hl-20); } +.hl-21 { color: var(--hl-21); } +.hl-22 { color: var(--hl-22); } +.hl-23 { color: var(--hl-23); } +.hl-24 { color: var(--hl-24); } pre, code { background: var(--code-background); } diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 4f0e35a2..0fe92ac6 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "eJyt3V2T27YVBuC/ktneeprETlLHd87a63jqr3rt9CLjyWBJaIWaBBUClHfTyX/vgF8iiXPOe9T2zmO9eEiKIEhBOKtf/30R7V28eHLxonOlvXhwcTBxf/HkomyKrrY+hq/7F/66j3V18eDis/PlxZPHjx4//uGbxw8uir2rytb6iye/ztDTm6aLPNS/THJ/PpiNK2ti19rAM1MCSS9sjM7ffhWiaaMteXAM/jYGkfsxmFvh7epfRsZr593OFSa6xvPUMoXEyy7Epv4qtsaHXdPWvDokf5uTSH4apHMa4Bn9xVSuBEd6ytDap4Xnm2VvrZuyq2z4Ov3vuu1DupMeTBsW7XedL9J2R6F/de388N1i4/3rz2xRmbbf3SBLyyRSr1wF9islBKW1vrQtSwwvC+2JvrMhmD5DK+LxrFKC9sVUn1kkvQja/mKqzvIn6RQRnOumawv72hxOTFGZEKZeN7++Nr59uLwKahP3V50vFvtyNK0zN3PnnRNr5tFD8s2djoPl8qjgXjZV0364PyxOmPVdPVLzq5uLcwE89139oflsPQnMr/LAOKr/01SfX68u8AWzyfDYaTh5ZY+2IrFNhsfS5mz7/Gh9JKHF6wh5e0jbS++GIJ1CPPc0xDerdyneH6YTP762GQy/+fFv337/cE287yr7yi2H9zUzvQ6pPvmLCy427c/Gl9VyGFqaRBDhPzlv2vvnd4fWhuAazx43FUT4YnxW7D6bRpt5Yb1tXTE2Gk/Q2HY1riw2Btqct0npqMjkefx7G7qK7kZUEOGvGlMK5OllBL03X65tZYvYtP3wE0gvS0FW19vP7+ubEXRhEaNn3vyj8kohcojub5KKYyZyiB5GvStXRcZcBnTYMIQK2BDQYf0hwd1b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B8+milU0XrWviMmmZNdjaqd7605m03DdhZcKgDQ+gsxGPoGImjRcfl7TWjYbUrR2NrUwmjfciX/67LLkrMfI7ADbbxtuaiWSdXLYtd0ZSNYuqWzCmWy2myLbl5rmM/ikjz7ZRWmQB2bZM2Y289npMZNtIp8LDZ9soo/O36jYim6Y8kY2jRe4P/FQg/RhRbp3g/QJm28qm7ngvvpKzqTteCvcBm7rLnP168aHeCRZN9hetmRQTfYR7oHVjCkr0EfqxgHZ2RLHAVfGeGSb6MulpLlFsSuA6Nr/nJLirkcROfFqcrfi84FOCghaeGYqUoKCfesQlradSglIVCQfnC0oJQr9mP/G/U0Ppe/09spBAJMzjz8dFFswtcQnEXDqAcSfL92Dr3/nLPOPHXGk5v0ja5vneAI8Q+XNqpNS29iQnt+ifDmJk+wmTbdvfDmJsDVppxf/im2gE7yKEnyRitKmPq7ZddaTh8aV+J5I0nSaIbROXT811M0lfrX7989f/ABuoYnY=" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 895c9dfa..a81ce16d 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "eJy8vVuT4zaWrv1XdlTd1vYIZ8B3bh+6/bVP47J79nyOCYcqxarStlLK1qHsmo757zsIUJni4ssFEGT6yuUkiPWSehdI4AHAf704Hn4/vfj0l3+9+G2737z41Cvv7cq/erFf3zcvPn3x18t207x49eJy3L349MXmcHe5b/bn07/Fv3/y/ny/e/Hqxd1ufTo1pxefvnjxP6/GavrszeFyHq0pHgX1vXrxsD42+/OjlPEAXzXr8+XYnEZjXAvMC/PX5nze7t/9r9N5fTw3m9FoXblfu3Lzgv58Wr8b/xni0XkBvt3ut2+3d+vz9rAfjXNbaF64zy+n8+H+f52P6/3p7eF4PxoyFfz1seC8sJ+dGAeeZvrvH+vddsPfwKci00LJxyD7w0063h82l11z+rf2j2wuWv1YwcP6eHqq4e1lf9fK6eqIB3lpUcB4zV80d7v1MV7iiY1yW3BWxK+2O/562gK1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vWYUNfrxQRLkc1ifDf703ZLHn71TASp1Gmr9wmK4TuRrmgfo1G2QgQb2ig7r57Ob0KHgSlZaxuQ+2RPg7+9/lCsin7rizt/f3//8efaqiE6y5MkU9wOl8gpFvqdLnI5//dcft+H2SJT/8d//86///Od/AUVA9Qg="; \ No newline at end of file +window.searchData = "eJy8vV2T3DaWrvtXJqRbbU/ik0DfuWW726dty9ty9+w5HROOVCUl5Tgrszo/ZGt2nP9+ggCzKrn4YgEEWb5qtwhgvcx6F0DiAcD/++J4+O304k///L8vft3uNy/+5JRzduVevdiv79sXf3rxl8t207549eJy3L3404vN4e5y3+7Pp38P//7Fx/P97sWrF3e79enUnl786cWL/+9VqqUv3x0u52RL4Spo79WLh/Wx3Z8fpaQDfNOuz5dje0rGuBaYF+Yv7fm83X/4t9N5fTy3m2S0vtwvfbl5Qf9+Wn9I/xnC1XkBvt/ut++3d+vz9rBPxrktNC/c68vpfLj/t/NxvT+9PxzvkyFjwV8eC84L++WJceBppv/+sd5tN/wP+FRk5s/39u2/3R82lx3j9tdv3/7Sl5kWTD6G2R9ucr9v69+7f2QT3+rHBh7Wx9NTC+8v+7vu3vs2wkVeWhCQbvmr9m63Pobf88RGuS04K+I32x1/P12B2gjHdr9pj6nm49XatseZRpovzLCCCNxvNChUG+m39e7XVIDu2px2/7HeXdqkmZ5KTIoh5FPqvj1cjnft9+uHxxh9EzHC4+VJAYx4Stq7w/50Pl7uzodjSYiXw/LpcE/1bu9sJZ9+v936dP7uQMYQLnRXYfdUYWJsudJPP+t6sykKGcvNiXQ+/D9v3/xQFOx8+O/T7Ds7H/5+3BWGuxx5y8Bo6sk79+vzx28u+7unBPi0Pm7X7x77/ccCk+x5E+GpA7hmVirUuOSkmDeD5WF3OP78+eGpU2r3l/s+yuPFaQltnx4pvPvlp7/8Od/2y7V3vxw/vOP/QE9iYbTX3//n3wpC3d1//nVenDffvfmpJFD3f+dH+uX7b/9PabRf7re/z4r41df/+Pb1178U/pSb9tP2rv1l9i/61bd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VNcgJi3SnSAMrepewjO8sRmkRW8AulD+QqiypC/NQyidf+iDEFZTfQj7hnkgCkXHYt47YDSp6mEDaDsiJsx/kqiZJbQ9TkF5QtRen9rC0RMiyPt63IwrN+17RDl1l9hkswq1T1m5kUSgnBgBbKarJzDWU2ES97RxenceT/KBsxndDbqQ+SgapCCG0K/4Gyh9GvbvwppRg3QwhMJx03MOrCt8R3qBIvhZfULw6UGmbD7+f+ow8a2vA3X0zhl0AnHA/U12Fcw5PPjSEfC1Pm7B6whyyUsLyXkxe3ytQYDhs2GTVcpBjvMyhzeA7oXR6kVoMHBsmDByUhvGEnDoR8Ktn5Eeuky4Yay0HxMqYfqO6q/eqDpCqhuJQu0q/3YT2aUsqorRiYclMIKnJIKvnCM7V3A2VtbQAduSTCX1cGl38N6/vRciooieOFukARI2UXrz8//xITZ3uiPCl/fv71+7USZY48WVl5OHYUVwkU3hRaMZt//fbjMTx2gv/HP/75r7///n/mwfdd"; \ No newline at end of file diff --git a/docs/classes/node.SourceMap.html b/docs/classes/node.SourceMap.html index d21cabab..52668a0d 100644 --- a/docs/classes/node.SourceMap.html +++ b/docs/classes/node.SourceMap.html @@ -157,16 +157,16 @@ --md-sys-color-surface-container-highest: #e9e1d9 }

Class SourceMapInternal

Source map class

-
Index

Constructors

Index

Constructors

Methods

Properties

Constructors

Methods

Properties

lastLocation: null | Location = null

Last location

-

css‑parser is a fast, fault‑tolerant and dependency‑free CSS toolkit for Node.js & browsers. -It follows CSS Syntax Module Level 3 and validation using syntax rules from MDN Data. -According to this benchmark, it is one of the most efficient CSS minifier available.

+It follows CSS Syntax Module Level 3 and validation using syntax rules +from MDN Data. +According to this benchmark, it is one of the most +efficient CSS minifier available.

See the full documentation at the CSS Parser documentation site

Try it online

+
+

← Index | Features →

the ast tree returned by the parser is always a AstStyleSheet node. +

the ast root node returned by the parser is always a AstStyleSheet node. the other nodes are AstRule, AstAtRule, AstDeclaration, AstComment, AstInvalidRule, AstInvalidAtRule, AstInvalidDeclaration

Ast rule tokens attribute is an array @@ -184,15 +184,18 @@

the function walkValues() is used to walk the node attribute's tokens.

+

the function walkValues() is used to walk the node attribute's tokens.


import {AstDeclaration, EnumToken, transform, walkValues} from '@tbela99/css-parser';

const css = `
body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }
`;

const result = await transform(css);
const declaration = result.ast.chi[0].chi[0] as AstDeclaration;

// walk the node attribute's tokens in reverse order
for (const {value} of walkValues(declaration.val, null, null,true)) {

console.error([EnumToken[value.typ], value.val]);
}

// [ "Color", "color" ]
// [ "FunctionTokenType", "calc" ]
// [ "Number", 0.15 ]
// [ "Add", undefined ]
// [ "Iden", "b" ]
// [ "Whitespace", undefined ]
// [ "FunctionTokenType", "calc" ]
// [ "Number", 0.24 ]
// [ "Add", undefined ]
// [ "Iden", "g" ]
// [ "Whitespace", undefined ]
// [ "Iden", "r" ]
// [ "Whitespace", undefined ]
// [ "Iden", "display-p3" ]
// [ "Whitespace", undefined ]
// [ "FunctionTokenType", "var" ]
// [ "DashedIden", "--base-color" ]
// [ "Whitespace", undefined ]
// [ "Iden", "from" ]
-

CSS Modules

CSS module is a feature that allows you to use CSS classes in a way that is safe from conflicts with other classes in the same project. +to enable CSS module support, pass the module option to the parse() or transform() function. +for a detailed explanation of the module options, see the module options section.

+

parse(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});
transform(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});

parseFile(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});
transformFile(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});
+
+ +

the scoped option is used to configure the scope of the generated class names.

+

this is the default scope.

+

import {transform, TransformOptions} from "@tbela99/css-parser";
import type {TransformResult} from "@tbela99/css-parser";

const css = `
.className {
background: red;
color: yellow;
}

.subClass {
composes: className;
background: blue;
}
`;

let result: TransformResult = await transform(css, {

beautify: true,
module: {scoped: ModuleScopeEnumOptions.Local
}
});

console.log(result.code); +
+ +

output

+
.className_vjnt1 {
background: red;
color: #ff0
}
.subClass_sgkqy {
background: blue
} +
+ +

the class names are not scoped unless they are scoped using :local or :local()

+

result = await transform(css, {

beautify: true,
module: {scoped: ModuleScopeEnumOptions.Global
}

});

console.log(result.code); +
+ +

output

+
.className {
background: red;
color: #ff0
}
.subClass {
background: blue
} +
+ +

export css using ICSS format

+

result = await transform(css, {

beautify: true,
module: {scoped: ModuleScopeEnumOptions.ICSS
}

});

console.log(result.code); +
+ +

output

+
:export {
className: className_vjnt1;
subClass: subClass_sgkqy className_vjnt1;
}
.className_vjnt1 {
background: red;
color: #ff0
}
.subClass_sgkqy {
background: blue
} +
+ +

require to use at least one id or class in selectors. it will throw an error it there are no id or class name in the selector.

+

result = await transform(css, {

beautify: true,
module: {scoped: ModuleScopeEnumOptions.Pure
}

});

console.log(result.code); +
+ +

output

+
.className {
background: red;
color: #ff0
}
.subClass {
background: blue
} +
+ +

scopes can be mixed using the bitwise OR operator '|'

+

result = await transform(css, {

beautify: true,
module: {scoped: ModuleScopeEnumOptions.Pure | ModuleScopeEnumOptions.Global | ModuleScopeEnumOptions.ICSS
}

});

console.log(result.code); +
+ +

class composition is supported using the composes property.

+

import {transform, TransformOptions} from "@tbela99/css-parser";

const options: TransformOptions = {

module: true,
beautify: true,
};

const result = await transform(`
.goal .bg-indigo {
background: indigo;
}

.indigo-white {
composes: bg-indigo title;
color: white;
}
`, options);

console.log(result.code);
console.log(result.mapping);

+
+ +

generated css code

+
.goal_r7bhp .bg-indigo_gy28g {
background: indigo
}
.indigo-white_wims0 {
color: #fff
} +
+ +

generated class mapping

+

{
"goal": "goal_r7bhp",
"bg-indigo": "bg-indigo_gy28g",
"indigo-white": "indigo-white_wims0 bg-indigo_gy28g title_qw06e",
"title": "title_qw06e"
} +
+ +

classes can be composed from other files as well as the global scope

+

import {transform, TransformOptions} from "@tbela99/css-parser";

const options: TransformOptions = {

module: true,
beautify: true,
};

const result = await transform(`
.goal .bg-indigo {
background: indigo;
}

.indigo-white {
composes: bg-indigo;
composes: title block ruler from global;
composes: bg-indigo title from './other-file.css';
color: white;
}
`, options);
+
+ +

the naming option is used to configure the case of the generated class names as well as the class mapping.

+

no case transformation

+

import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';
import type {TransformResult} from '@tbela99/css-parser';

let css = `

:local(.class-name) {
background: red;
color: yellow;
}

:local(.sub-class) {
composes: class-name;
background: blue;
`;

let result = await transform(css, {

module: {
naming: ModuleCaseTransformEnum.IgnoreCase
}

});

console.log(result.code); +
+ +

use camel case for the mapping key names

+

import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';
import type {TransformResult} from '@tbela99/css-parser';

let css = `

:local(.class-name) {
background: red;
color: yellow;
}

:local(.sub-class) {
composes: class-name;
background: blue;
`;

let result = await transform(css, {

module: {
naming: ModuleCaseTransformEnum.CamelCaseOnly
}

});

console.log(result.code); +
+ +

generated css

+
.class-name_agkqy {
background: red;
color: #ff0
}
.sub-class_nfjpx {
background: blue
} +
+ +

generated mapping

+
console.log(result.mapping);
+
+ +
{
"className": "class-name_agkqy",
"subClass": "sub-class_nfjpx"
} +
+ +

use camel case key names and the scoped class names

+

import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';
import type {TransformResult} from '@tbela99/css-parser';

let css = `

:local(.class-name) {
background: red;
color: yellow;
}

:local(.sub-class) {
composes: class-name;
background: blue;
`;

let result = await transform(css, {

module: {
naming: ModuleCaseTransformEnum.CamelCaseOnly
}

});

console.log(result.code); +
+ +

generated css

+
.className_agkqy {
background: red;
color: #ff0
}
.subClass_nfjpx {
background: blue
} +
+ +

generated mapping

+
console.log(result.mapping);
+
+ +
{
"className": "className_agkqy",
"subClass": "subClass_nfjpx"
} +
+ +

use dash case for the mapping key names

+

import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';
import type {TransformResult} from '@tbela99/css-parser';

let css = `

:local(.className) {
background: red;
color: yellow;
}

:local(.subClass) {
composes: className;
background: blue;
}
`;

let result = await transform(css, {

module: {
naming: ModuleCaseTransformEnum.DashCase
}

});

console.log(result.code); +
+ +

generated css

+
.className_vjnt1 {
background: red;
color: #ff0
}
.subClass_sgkqy {
background: blue
} +
+ +

generated mapping

+
console.log(result.mapping);
+
+ +
{
"class-name": "className_vjnt1",
"sub-class": "subClass_sgkqy className_vjnt1"
} +
+ +

use dash case key names and the scoped class names

+

import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';
import type {TransformResult} from '@tbela99/css-parser';

let css = `

:local(.className) {
background: red;
color: yellow;
}

:local(.subClass) {
composes: className;
background: blue;
}
`;

let result = await transform(css, {

module: {
naming: ModuleCaseTransformEnum.DashCaseOnly
}

});

console.log(result.code); +
+ +

generated css

+
.class-name_vjnt1 {
background: red;
color: #ff0
}
.sub-class_sgkqy {
background: blue
} +
+ +

generated mapping

+
console.log(result.mapping);
+
+ +
{
"class-name": "class-name_vjnt1",
"sub-class": "sub-class_sgkqy class-name_vjnt1"
} +
+ +

the pattern option is used to configure the generated scoped names.

+

import {transform, ModulePatternEnum} from '@tbela99/css-parser';
import type {TransformResult} from '@tbela99/css-parser';

const css = `
.className {
background: red;
color: yellow;
}

.subClass {
composes: className;
background: blue;
}
`;

let result: TransformResult = await transform(css, {

beautify: true,
module: {
pattern: '[local]-[hash:sha256]'
}

});

console.log(result.code); +
+ +

generated css

+
.className-b629f {
background: red;
color: #ff0
}
.subClass-a0c35 {
background: blue
} +
+ +

generated mapping

+
console.log(result.mapping);
+
+ +
{
"className": "className-b629f",
"subClass": "subClass-a0c35 className-b629f"
} +
+ +

the supported placeholders are:

+
    +
  • name: the file base name without the extension
  • +
  • hash: the file path hash
  • +
  • local: the local name
  • +
  • path: the file path
  • +
  • folder: the folder name
  • +
  • ext: the file extension
  • +
+

the pattern placeholders can optionally have a maximum number of characters:

+
pattern: '[local:2]-[hash:5]'
+
+ +

the hash pattern can take an algorithm, a maximum number of characters or both:

+
pattern: '[local]-[hash:base64:5]'
+
+ +

or

+
pattern: '[local]-[hash:5]'
+
+ +

or

+
pattern: '[local]-[hash:sha1]'
+
+ +

supported hash algorithms are:

+
    +
  • base64
  • +
  • hex
  • +
  • base64url
  • +
  • sha1
  • +
  • sha256
  • +
  • sha384
  • +
  • sha512
  • +
+
+

← Validation

+
diff --git a/docs/documents/Guide.Custom_transform.html b/docs/documents/Guide.Custom_transform.html index 03536590..559e3934 100644 --- a/docs/documents/Guide.Custom_transform.html +++ b/docs/documents/Guide.Custom_transform.html @@ -158,7 +158,10 @@ }

visitors are used to alter the ast tree produced by the parser. for more information about the visitor object see the typescript definition

visitors can be called when the node is entered, visited or left.

-

import {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from "@tbela99/css-parser";
const options: ParserOptions = {

visitor: [
{

AtRule: [
(node: AstAtRule): AstAtRule => {

console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}, {

media: (node: AstAtRule): AstAtRule => {

console.error(`> visiting only '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
}, {

type: WalkerEvent.Leave,
handler: (node: AstAtRule): AstAtRule => {

console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`)
return node
}
},
{
type: WalkerEvent.Enter,
handler: (node: AstAtRule): AstAtRule => {

console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
}]
}] as VisitorNodeMap[]
};

const css = `

@media screen {

.foo {

height: calc(100px * 2/ 15);
}
}

@supports (height: 30pt) {

.foo {

height: calc(100px * 2/ 15);
}
}
`;

const result = await transform(css, options);

console.debug(result.code);

// > enter '@media' node at position 3:1
// > visiting '@media' node at position 3:1
// > visiting only '@media' node at position 3:1
// > leaving '@media' node at position 3:1
// > enter '@supports' node at position 11:1
// > visiting '@supports' node at position 11:1
// > leaving '@supports' node at position 11:1
+

const options: ParserOptions = {

visitor: [
{

AtRule: [
// called when entering a node
{
type: WalkerEvent.Enter,
handler: (node: AstAtRule): AstAtRule => {

console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
},
// called when leaving a node
{

type: WalkerEvent.Leave,
handler: (node: AstAtRule): AstAtRule => {

console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`)
return node
}
},
// called after node enter handlers but before node leave handlers
(node: AstAtRule): AstAtRule => {

console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
}
]
}
]
} +
+ +

import {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from "@tbela99/css-parser";
const options: ParserOptions = {

visitor: [
{

AtRule: [
(node: AstAtRule): AstAtRule => {

console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}, {

media: (node: AstAtRule): AstAtRule => {

console.error(`> visiting only '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
}, {

type: WalkerEvent.Leave,
handler: (node: AstAtRule): AstAtRule => {

console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`)
return node
}
},
{
type: WalkerEvent.Enter,
handler: (node: AstAtRule): AstAtRule => {

console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
}]
}] as VisitorNodeMap[]
};

const css = `

@media screen {

.foo {

height: calc(100px * 2/ 15);
}
}

@supports (height: 30pt) {

.foo {

height: calc(100px * 2/ 15);
}
}
`;

const result = await transform(css, options);

console.debug(result.code);

// > enter '@media' node at position 3:1
// > visiting '@media' node at position 3:1
// > visiting only '@media' node at position 3:1
// > leaving '@media' node at position 3:1
// > enter '@supports' node at position 11:1
// > visiting '@supports' node at position 11:1
// > leaving '@supports' node at position 11:1

Example: change media at-rule prelude

@@ -183,11 +186,20 @@

the value visitor is called on each token of the selector node, declaration value and the at-rule prelude, etc.

+

import {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from "@tbela99/css-parser";
const options: ParserOptions = {

visitor: {

Value: (node: Token): Token => {

console.error(`> visiting token at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);
return node
}
} as VisitorNodeMap
}; +
+

generic token visitor is a function whose name is a keyof EnumToken. it is called for every token of the specified type.


import {transform, parse, parseDeclarations} from "@tbela99/css-parser";
const options: ParserOptions = {

inlineCssVariables: true,
visitor: {

// Stylesheet node visitor
StyleSheetNodeType: async (node) => {

// insert a new rule
node.chi.unshift(await parse('html {--base-color: pink}').then(result => result.ast.chi[0]))
},
ColorTokenType: (node) => {

// dump all color tokens
// console.debug(node);
},
FunctionTokenType: (node) => {

// dump all function tokens
// console.debug(node);
},
DeclarationNodeType: (node) => {

// dump all declaration nodes
// console.debug(node);
}
}
};

const css = `

body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }
`;

console.debug(await transform(css, options));

// body {color:#f3fff0}
-

a non-exhaustive list of features is provided below:

  • no dependency
  • -
  • fault-tolerant parser that tries to fix invalid tokens.
  • CSS validation based upon mdn-data
  • -
  • fast and efficient minification without unsafe transforms
  • -
  • minify colors: color(), lab(), lch(), oklab(), oklch(), color-mix(), light-dark(), system colors and +
  • CSS modules support
  • +
  • fault-tolerant parser implementing the CSS syntax module 3 recommendations.
  • +
  • fast and efficient minification without unsafe transforms, +see benchmark
  • +
  • colors minification: color(), lab(), lch(), oklab(), oklch(), color-mix(), light-dark(), system colors and relative color
  • -
  • convert colors to any supported color format
  • -
  • automatically generate nested css rules
  • -
  • convert nested css rules to legacy syntax
  • -
  • generate sourcemap
  • -
  • compute css shorthands.
  • -
  • minify css transform functions: translate(), scale(), etc.
  • -
  • evaluate math functions: calc(), clamp(), min(), max(), etc.
  • -
  • inline css variables
  • -
  • remove duplicate properties
  • -
  • flatten @import rules
  • +
  • color conversion to any supported color format
  • +
  • automatic nested css rules generation
  • +
  • nested css rules conversion to legacy syntax
  • +
  • sourcemap generation
  • +
  • css shorthands computation. see the supported properties list below
  • +
  • css transform functions minification
  • +
  • css math functions evaluation: calc(), clamp(), min(), max(), etc.
  • +
  • css variables inlining
  • +
  • duplicate properties removal
  • +
  • @import rules flattening
  • experimental CSS prefix removal
+
+

← About | Getting started →

Enumeration ColorType

supported color types enum

-
Index

Enumeration Members

Index

Enumeration Members

A98_RGB CMYK COLOR COLOR_MIX @@ -185,33 +185,33 @@ XYZ_D50 XYZ_D65

Enumeration Members

A98_RGB: 15

color using a98-rgb values

-
CMYK: 7

colors as cmyk values

-
COLOR: 12

colors using color() function

-
COLOR_MIX: 22

color-mix() color function

-
DEVICE_CMYK: 7

alias for cmyk

-
DISPLAY_P3: 17

color using display-p3 values

-
DPSYS: 1

deprecated system colors

-
HEX: 3

colors as hex values

-
HSL: 5

alias for hsl

-
HSLA: 5

colors as hsl values

-
HWB: 6

colors as hwb values

-
LAB: 10

colors as lab values

-
LCH: 11

colors as lch values

-
LIGHT_DARK: 21

light-dark() color function

-
LIT: 2

colors as literals

-
OKLAB: 8

colors as oklab values

-
OKLCH: 9

colors as oklch values

-
PROPHOTO_RGB: 14

color using prophoto-rgb values

-
REC2020: 16

color using rec2020 values

-
RGB: 4

alias for rgba

-
RGBA: 4

colors as rgb values

-
SRGB: 13

color using srgb values

-
SRGB_LINEAR: 18

color using srgb-linear values

-
SYS: 0

system colors

-
XYZ: 20

alias for xyz-d65

-
XYZ_D50: 19

color using xyz-d50 values

-
XYZ_D65: 20

color using xyz-d65 values

-

Enumeration EnumToken

enum of all token types

-
Index

Enumeration Members

Add +
Index

Enumeration Members

Add: 60

addition token type

-
Angle: 24

alias for angle token type

-
AngleTokenType: 24

angle token type

-
AtRuleNodeType: 3

at-rule node type

-
AtRuleTokenType: 13

at-rule token type

-
AttrEndTokenType: 32

attribute end token type

-
AttrStartTokenType: 31

attribute start token type

-
AttrTokenType: 51

attribute token type

-
BadCdoTokenType: 53

bad cdo token type

-
BadCommentTokenType: 52

bad comment token type

-
BadStringTokenType: 55

bad string token type

-
BadUrlTokenType: 54

bad URL token type

-
BinaryExpressionTokenType: 56

binary expression token type

-
BlockEndTokenType: 30

block end token type

-
BlockStartTokenType: 29

block start token type

-
CDOCOMMNodeType: 1

alias for cdata section node type

-
CDOCOMMTokenType: 1

cdata section token

-
ChildCombinatorTokenType: 76

child combinator token type

-
ClassSelectorTokenType: 74

class selector token type

-
ColonTokenType: 10

colon token type

-
Color: 50

alias for color token type

-
ColorTokenType: 50

color token type

-
ColumnCombinatorTokenType: 64

column combinator token type

-
Comma: 9

alias for comma token type

-
CommaTokenType: 9

comma token type

-
Comment: 0

alias for comment token type

-
CommentNodeType: 0

alias for comment node type

-
CommentTokenType: 0

comment token

-
ContainMatchTokenType: 65

contain match token type

-
DashedIden: 8

alias for dashed identifier token type

-
DashedIdenTokenType: 8

dashed identifier token type

-
DashMatchTokenType: 38

dash match token type

-
DeclarationNodeType: 5

declaration node type

-
DelimTokenType: 46

delimiter token type

-
DescendantCombinatorTokenType: 77

descendant combinator token type

-
Dimension: 22

alias for dimension token type

-
DimensionTokenType: 22

dimension token type

-
Div: 62

division token type

-
EndMatchTokenType: 67

end match token type

-
EndParensTokenType: 34

end parentheses token type

-
EOF: 48

alias for end of file token type

-
EOFTokenType: 48

end of file token type

-
EqualMatchTokenType: 39

equal match token type

-
Flex: 58

alias for flex token type

-
FlexTokenType: 58

flex token type

-
FractionTokenType: 70

fraction token type

-
Frequency: 26

alias for frequency token type

-
FrequencyTokenType: 26

frequency token type

-
FunctionTokenType: 15

function token type

-
GridTemplateFunc: 72

alias for grid template function token type

-
GridTemplateFuncTokenType: 72

grid template function token type

-
GteTokenType: 43

greater than or equal to token type

-
GtTokenType: 42

greater than token type

-
Hash: 28

alias for hash token type

-
HashTokenType: 28

hash token type

-
Iden: 7

alias for identifier token type

-
IdenList: 71

alias for identifier list token type

-
IdenListTokenType: 71

identifier list token type

-
IdenTokenType: 7

identifier token type

-
ImageFunc: 19

alias for image function token type

-
ImageFunctionTokenType: 19

image function token type

-
ImportantTokenType: 49

important token type

-
IncludeMatchTokenType: 37

include match token type

-
InvalidAtRuleTokenType: 84

invalid at rule token type

-
InvalidAttrTokenType: 83

invalid attribute token type

-
InvalidClassSelectorTokenType: 82

invalid class selector token type

-
InvalidDeclarationNodeType: 94

invalid declaration node type

-
InvalidRuleTokenType: 81

invalid rule token type

-
KeyframesAtRuleNodeType: 93

keyframe at rule node type

-
KeyFramesRuleNodeType: 73

keyframe rule node type

-
Length: 23

alias for length token type

-
LengthTokenType: 23

length token type

-
ListToken: 59

token list token type

-
Literal: 6

alias for literal token type

-
LiteralTokenType: 6

literal token type

-
LteTokenType: 41

less than or equal to token type

-
LtTokenType: 40

less than token type

-
MatchExpressionTokenType: 68

match expression token type

-
MediaFeatureAndTokenType: 89

media feature and token type

-
MediaFeatureNotTokenType: 88

media feature not token type

-
MediaFeatureOnlyTokenType: 87

media feature only token type

-
MediaFeatureOrTokenType: 90

media feature or token type

-
MediaFeatureTokenType: 86

media feature token type

-
MediaQueryConditionTokenType: 85

media query condition token type

-
Mul: 61

multiplication token type

-
NameSpaceAttributeTokenType: 69

namespace attribute token type

-
NestingSelectorTokenType: 80

nesting selector token type

-
NextSiblingCombinatorTokenType: 78

next sibling combinator token type

-
Number: 12

alias for number token type

-
NumberTokenType: 12

number token type

-
ParensTokenType: 35

parentheses token type

-
Perc: 14

alias for percentage token type

-
PercentageTokenType: 14

percentage token type

-
PseudoClassFuncTokenType: 45

pseudo-class function token type

-
PseudoClassTokenType: 44

pseudo-class token type

-
PseudoElementTokenType: 92

pseudo element token type

-
PseudoPageTokenType: 91

pseudo page token type

-
Resolution: 27

alias for resolution token type

-
ResolutionTokenType: 27

resolution token type

-
RuleNodeType: 4

rule node type

-
SemiColonTokenType: 11

semicolon token type

-
StartMatchTokenType: 66

start match token type

-
StartParensTokenType: 33

start parentheses token type

-
String: 20

alias for string token type

-
StringTokenType: 20

string token type

-
StyleSheetNodeType: 2

style sheet node type

-
Sub: 63

subtraction token type

-
SubsequentSiblingCombinatorTokenType: 79

subsequent sibling combinator token type

-
Time: 25

alias for time token type

-
TimelineFunction: 16

alias for timeline function token type

-
TimelineFunctionTokenType: 16

timeline function token type

-
TimeTokenType: 25

time token type

-
TimingFunction: 17

alias for timing function token type

-
TimingFunctionTokenType: 17

timing function token type

-
UnaryExpressionTokenType: 57

unary expression token type

-
UnclosedStringTokenType: 21

unclosed string token type

-
UniversalSelectorTokenType: 75

universal selector token type

-
UrlFunc: 18

alias for url function token type

-
UrlFunctionTokenType: 18

url function token type

-
UrlTokenTokenType: 47

URL token type

-
Whitespace: 36

alias for whitespace token type

-
WhitespaceTokenType: 36

whitespace token type

-

Enumeration ModuleCaseTransformEnum

Index

Enumeration Members

CamelCase: 2

transform mapping key name to camel case

+
CamelCaseOnly: 4

transform class names and mapping key name to camel case

+
DashCase: 8

transform mapping key name to dash case

+
DashCaseOnly: 16

transform class names and mapping key name to dash case

+
IgnoreCase: 1

export class names as-is

+
diff --git a/docs/enums/node.ModuleScopeEnumOptions.html b/docs/enums/node.ModuleScopeEnumOptions.html new file mode 100644 index 00000000..80434b71 --- /dev/null +++ b/docs/enums/node.ModuleScopeEnumOptions.html @@ -0,0 +1,182 @@ +ModuleScopeEnumOptions | @tbela99/css-parser

Enumeration ModuleScopeEnumOptions

Index

Enumeration Members

Enumeration Members

Global: 32

use the global scope

+
ICSS: 256

export using ICSS module format

+
Local: 64

use the local scope

+
Pure: 128

do not allow selector without an id or class

+
diff --git a/docs/enums/node.FeatureWalkMode.html b/docs/enums/node.ResponseType.html similarity index 54% rename from docs/enums/node.FeatureWalkMode.html rename to docs/enums/node.ResponseType.html index cc89b1d8..a2529e19 100644 --- a/docs/enums/node.FeatureWalkMode.html +++ b/docs/enums/node.ResponseType.html @@ -1,4 +1,4 @@ -FeatureWalkMode | @tbela99/css-parser

Enumeration FeatureWalkModeInternal

feature walk mode

-
Index

Enumeration Members

Enumeration Members

Post

Post: 2

post process

-
Pre: 1

pre process

-

Enumeration ResponseType

response type

+
Index

Enumeration Members

Enumeration Members

ArrayBuffer: 2

return an arraybuffer

+
ReadableStream: 1

return a readable stream

+
Text: 0

return text

+

Enumeration ValidationLevel

enum of validation levels

-
Index

Enumeration Members

All +
Index

Enumeration Members

All: 7

validate selectors, at-rules and declarations

-
AtRule: 2

validate at-rules

-
Declaration: 4

validate declarations

-
Default: 3

validate selectors and at-rules

-
None: 0

disable validation

-
Selector: 1

validate selectors

-

Enumeration WalkerEvent

event types for the walkValues function

-
Index

Enumeration Members

Index

Enumeration Members

Enumeration Members

Enter: 1

enter node

-
Leave: 2

leave node

-

Enumeration WalkerOptionEnum

options for the walk function

-
Index

Enumeration Members

Index

Enumeration Members

Enumeration Members

Children: 4

ignore the current node and process its children

-
Ignore: 1

ignore the current node and its children

-
IgnoreChildren: 8

ignore the current node children

-
Stop: 2

stop walking the tree

-

Function render

  • render the ast tree

    -

    Parameters

    • data: AstNode
    • options: RenderOptions = {}

      Example:

      +

      Function render

      • render the ast tree

        +

        Parameters

        • data: any
        • options: RenderOptions = {}
        • Optionalmapping:
              | {
                  importMapping: Record<string, Record<string, string>>
                  | null;
                  mapping: Record<string, string>;
              }
              | null

          Example:


          import {render, ColorType} from '@tbela99/css-parser';

          const css = 'body { color: color(from hsl(0 100% 50%) xyz x y z); }';
          const parseResult = await parse(css);

          let renderResult = render(parseResult.ast);
          console.log(result.code);

          // body{color:red}


          renderResult = render(parseResult.ast, {beautify: true, convertColor: ColorType.SRGB});
          console.log(renderResult.code);

          // body {
          // color: color(srgb 1 0 0)
          // }
          -

        Returns RenderResult

      Function walk

      • walk ast nodes

        -

        Parameters

        • node: AstNode

          initial node

          -
        • Optionalfilter: null | WalkerFilter

          control the walk process

          +

          Function walk

          • walk ast nodes

            +

            Parameters

            • node: any

              initial node

              +
            • Optionalfilter: WalkerFilter | null

              control the walk process

            • Optionalreverse: boolean

              walk in reverse order


              import {walk} from '@tbela99/css-parser';

              const css = `
              body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }

              html,
              body {
              line-height: 1.474;
              }

              .ruler {

              height: 10px;
              }
              `;

              for (const {node, parent, root} of walk(ast)) {

              // do something with node
              }
              @@ -167,7 +167,7 @@
              import {EnumToken, transform, walk, WalkerOptionEnum} from '@tbela99/css-parser';

              const css = `
              body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }

              html,
              body {
              line-height: 1.474;
              }

              .ruler {

              height: 10px;
              }
              `;

              function filter(node) {

              if (node.typ == EnumToken.AstRule && node.sel.includes('html')) {

              // skip the children of the current node
              return WalkerOptionEnum.IgnoreChildren;
              }
              }

              const result = await transform(css);
              for (const {node} of walk(result.ast, filter)) {

              console.error([EnumToken[node.typ]]);
              }

              // [ "StyleSheetNodeType" ]
              // [ "RuleNodeType" ]
              // [ "DeclarationNodeType" ]
              // [ "RuleNodeType" ]
              // [ "DeclarationNodeType" ]
              // [ "RuleNodeType" ]
              // [ "DeclarationNodeType" ]
              -

            Returns Generator<WalkResult>

          Function walkValues

          • walk ast node value tokens

            -

            Parameters

            • values: Token[]
            • root:
                  | null
                  | ColorToken
                  | InvalidClassSelectorToken
                  | InvalidAttrToken
                  | LiteralToken
                  | IdentToken
                  | IdentListToken
                  | DashedIdentToken
                  | CommaToken
                  | ColonToken
                  | SemiColonToken
                  | ClassSelectorToken
                  | UniversalSelectorToken
                  | ChildCombinatorToken
                  | DescendantCombinatorToken
                  | NextSiblingCombinatorToken
                  | SubsequentCombinatorToken
                  | ColumnCombinatorToken
                  | NestingSelectorToken
                  | MediaQueryConditionToken
                  | MediaFeatureToken
                  | MediaFeatureNotToken
                  | MediaFeatureOnlyToken
                  | MediaFeatureAndToken
                  | MediaFeatureOrToken
                  | AstDeclaration
                  | NumberToken
                  | AtRuleToken
                  | PercentageToken
                  | FlexToken
                  | FunctionURLToken
                  | FunctionImageToken
                  | TimingFunctionToken
                  | TimelineFunctionToken
                  | FunctionToken
                  | GridTemplateFuncToken
                  | DimensionToken
                  | LengthToken
                  | AngleToken
                  | StringToken
                  | TimeToken
                  | FrequencyToken
                  | ResolutionToken
                  | UnclosedStringToken
                  | HashToken
                  | BadStringToken
                  | BlockStartToken
                  | BlockEndToken
                  | AttrStartToken
                  | AttrEndToken
                  | ParensStartToken
                  | ParensEndToken
                  | ParensToken
                  | CDOCommentToken
                  | BadCDOCommentToken
                  | CommentToken
                  | BadCommentToken
                  | WhitespaceToken
                  | IncludeMatchToken
                  | StartMatchToken
                  | EndMatchToken
                  | ContainMatchToken
                  | MatchExpressionToken
                  | NameSpaceAttributeToken
                  | DashMatchToken
                  | EqualMatchToken
                  | LessThanToken
                  | LessThanOrEqualToken
                  | GreaterThanToken
                  | GreaterThanOrEqualToken
                  | ListToken
                  | PseudoClassToken
                  | PseudoPageToken
                  | PseudoElementToken
                  | PseudoClassFunctionToken
                  | DelimToken
                  | BinaryExpressionToken
                  | UnaryExpression
                  | FractionToken
                  | AddToken
                  | SubToken
                  | DivToken
                  | MulToken
                  | BadUrlToken
                  | UrlToken
                  | ImportantToken
                  | AttrToken
                  | EOFToken
                  | AstAtRule
                  | AstKeyframesAtRule
                  | AstKeyFrameRule
                  | AstInvalidRule
                  | AstInvalidAtRule
                  | AstStyleSheet
                  | AstRule
                  | AstComment
                  | AstInvalidDeclaration = null
            • Optionalfilter:
                  | null
                  | WalkerValueFilter
                  | {
                      event?: WalkerEvent;
                      fn?: WalkerValueFilter;
                      type?: EnumToken
                      | EnumToken[]
                      | ((token: Token) => boolean);
                  }
            • Optionalreverse: boolean

              Example:

              +

              Function walkValues

              • walk ast node value tokens

                +

                Parameters

                • values: Token[]
                • root: any = null
                • Optionalfilter:
                      | WalkerValueFilter
                      | {
                          event?: WalkerEvent;
                          fn?: WalkerValueFilter;
                          type?: EnumToken
                          | EnumToken[]
                          | ((token: Token) => boolean);
                      }
                      | null
                • Optionalreverse: boolean

                  Example:


                  import {AstDeclaration, EnumToken, transform, walkValues} from '@tbela99/css-parser';

                  const css = `
                  body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }
                  `;

                  const result = await transform(css);
                  const declaration = result.ast.chi[0].chi[0] as AstDeclaration;

                  // walk the node attribute's tokens in reverse order
                  for (const {value} of walkValues(declaration.val, null, null,true)) {

                  console.error([EnumToken[value.typ], value.val]);
                  }

                  // [ "Color", "color" ]
                  // [ "FunctionTokenType", "calc" ]
                  // [ "Number", 0.15 ]
                  // [ "Add", undefined ]
                  // [ "Iden", "b" ]
                  // [ "Whitespace", undefined ]
                  // [ "FunctionTokenType", "calc" ]
                  // [ "Number", 0.24 ]
                  // [ "Add", undefined ]
                  // [ "Iden", "g" ]
                  // [ "Whitespace", undefined ]
                  // [ "Iden", "r" ]
                  // [ "Whitespace", undefined ]
                  // [ "Iden", "display-p3" ]
                  // [ "Whitespace", undefined ]
                  // [ "FunctionTokenType", "var" ]
                  // [ "DashedIden", "--base-color" ]
                  // [ "Whitespace", undefined ]
                  // [ "Iden", "from" ]
                  -

                Returns Generator<WalkAttributesResult>

              Function render

              • render the ast tree

                -

                Parameters

                • data: AstNode
                • options: RenderOptions = {}

                  Example:

                  +

                  Function render

                  • render the ast tree

                    +

                    Parameters

                    • data: any
                    • options: RenderOptions = {}
                    • Optionalmapping:
                          | {
                              importMapping: Record<string, Record<string, string>>
                              | null;
                              mapping: Record<string, string>;
                          }
                          | null

                      Example:


                      import {render, ColorType} from '@tbela99/css-parser';

                      const css = 'body { color: color(from hsl(0 100% 50%) xyz x y z); }';
                      const parseResult = await parse(css);

                      let renderResult = render(parseResult.ast);
                      console.log(result.code);

                      // body{color:red}


                      renderResult = render(parseResult.ast, {beautify: true, convertColor: ColorType.SRGB});
                      console.log(renderResult.code);

                      // body {
                      // color: color(srgb 1 0 0)
                      // }
                      -

                    Returns RenderResult

                  @tbela99/css-parser

                  Hierarchy Summary

                  @tbela99/css-parser

                  Hierarchy Summary

                  Interface AddToken

                  Add token

                  -
                  interface AddToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: Add;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AddToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: Add;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -
                  typ: Add

                  token type

                  -

                  Interface AngleToken

                  Angle token

                  -
                  interface AngleToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: AngleTokenType;
                      unit: string;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AngleToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: AngleTokenType;
                      unit: string;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  unit: string
                  val: number | FractionToken

                  Interface AstAtRule

                  at rule node

                  -
                  interface AstAtRule {
                      chi?:
                          | (AstDeclaration | AstComment | AstInvalidDeclaration)[]
                          | (AstRule | AstComment)[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: AtRuleNodeType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstAtRule {
                      chi?:
                          | (AstDeclaration | AstComment | AstInvalidDeclaration)[]
                          | (AstRule | AstComment)[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: AtRuleNodeType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi?:
                      | (AstDeclaration | AstComment | AstInvalidDeclaration)[]
                      | (AstRule | AstComment)[]
                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstComment

                  comment node

                  -
                  interface AstComment {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: CommentTokenType | CDOCOMMTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstComment {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: CommentTokenType | CDOCOMMTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstDeclaration

                  declaration node

                  -
                  interface AstDeclaration {
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null;
                      typ: DeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstDeclaration {
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null;
                      typ: DeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: Token[]

                  Interface AstInvalidAtRule

                  invalid at rule node

                  -
                  interface AstInvalidAtRule {
                      chi?: AstNode[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: InvalidAtRuleTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstInvalidAtRule {
                      chi?: any[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: InvalidAtRuleTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi?: AstNode[]
                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstInvalidDeclaration

                  invalid declaration node

                  -
                  interface AstInvalidDeclaration {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: InvalidDeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstInvalidDeclaration {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: InvalidDeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: Token[]

                  Interface AstInvalidRule

                  invalid rule node

                  -
                  interface AstInvalidRule {
                      chi: AstNode[];
                      loc?: Location;
                      parent?: any;
                      sel: string;
                      tokens?: null | Token[];
                      typ: InvalidRuleTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstInvalidRule {
                      chi: any[];
                      loc?: Location;
                      parent?: any;
                      sel: string;
                      tokens?: Token[] | null;
                      typ: InvalidRuleTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: AstNode[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  sel: string
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstKeyFrameRule

                  keyframe rule node

                  -
                  interface AstKeyFrameRule {
                      chi: (AstDeclaration | AstComment | AstInvalidDeclaration)[];
                      loc?: Location;
                      optimized?: OptimizedSelector;
                      parent?: any;
                      raw?: RawSelectorTokens;
                      sel: string;
                      tokens?: Token[];
                      typ: KeyFramesRuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstKeyFrameRule {
                      chi: (AstDeclaration | AstComment | AstInvalidDeclaration)[];
                      loc?: Location;
                      optimized?: OptimizedSelector;
                      parent?: any;
                      raw?: RawSelectorTokens;
                      sel: string;
                      tokens?: Token[];
                      typ: KeyFramesRuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi loc? optimized? parent? @@ -165,11 +165,11 @@ sel tokens? typ -

                  Properties

                  loc?: Location

                  location info

                  -
                  optimized?: OptimizedSelector
                  parent?: any

                  parent node

                  -
                  sel: string
                  tokens?: Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstKeyFrameRule

                  keyframe rule node

                  -
                  interface AstKeyFrameRule {
                      chi: (AstDeclaration | AstComment | AstInvalidDeclaration)[];
                      loc?: Location;
                      optimized?: OptimizedSelector;
                      parent?: any;
                      raw?: RawSelectorTokens;
                      sel: string;
                      tokens?: Token[];
                      typ: KeyFramesRuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstKeyFrameRule {
                      chi: (AstDeclaration | AstComment | AstInvalidDeclaration)[];
                      loc?: Location;
                      optimized?: OptimizedSelector;
                      parent?: any;
                      raw?: RawSelectorTokens;
                      sel: string;
                      tokens?: Token[];
                      typ: KeyFramesRuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi loc? optimized? parent? @@ -165,11 +165,11 @@ sel tokens? typ -

                  Properties

                  loc?: Location

                  location info

                  -
                  optimized?: OptimizedSelector
                  parent?: any

                  parent node

                  -
                  sel: string
                  tokens?: Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstKeyframesAtRule

                  keyframe at rule node

                  -
                  interface AstKeyframesAtRule {
                      chi: (AstComment | AstKeyframesRule)[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: KeyframesAtRuleNodeType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstKeyframesAtRule {
                      chi: (AstComment | AstKeyframesRule)[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: KeyframesAtRuleNodeType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstKeyframesRule

                  keyframe rule node

                  -
                  interface AstKeyframesRule {
                      chi: (AstDeclaration | AstRuleList | AstComment | AstInvalidDeclaration)[];
                      loc?: Location;
                      optimized?: OptimizedSelector;
                      parent?: any;
                      raw?: RawSelectorTokens;
                      sel: string;
                      tokens?: null | Token[];
                      typ: KeyFramesRuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstKeyframesRule {
                      chi: (AstDeclaration | AstRuleList | AstComment | AstInvalidDeclaration)[];
                      loc?: Location;
                      optimized?: OptimizedSelector;
                      parent?: any;
                      raw?: RawSelectorTokens;
                      sel: string;
                      tokens?: Token[] | null;
                      typ: KeyFramesRuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi loc? optimized? parent? @@ -165,11 +165,11 @@ sel tokens? typ -

                  Properties

                  loc?: Location

                  location info

                  -
                  optimized?: OptimizedSelector
                  parent?: any

                  parent node

                  -
                  sel: string
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstRule

                  rule node

                  -
                  interface AstRule {
                      chi: (
                          | AstDeclaration
                          | AstAtRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration
                      )[];
                      loc?: Location;
                      optimized?: null
                      | OptimizedSelector;
                      parent?: any;
                      raw?: null | RawSelectorTokens;
                      sel: string;
                      tokens?: null | Token[];
                      typ: RuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstRule {
                      chi: (
                          | AstDeclaration
                          | AstAtRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration
                      )[];
                      loc?: Location;
                      optimized?: OptimizedSelector
                      | null;
                      parent?: any;
                      raw?: RawSelectorTokens | null;
                      sel: string;
                      tokens?: Token[] | null;
                      typ: RuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi loc? optimized? parent? @@ -165,11 +165,11 @@ sel tokens? typ -

                  Properties

                  chi: (
                      | AstDeclaration
                      | AstAtRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration
                  )[]
                  loc?: Location

                  location info

                  -
                  optimized?: null | OptimizedSelector
                  parent?: any

                  parent node

                  -
                  raw?: null | RawSelectorTokens
                  sel: string
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstStyleSheet

                  stylesheet node

                  -
                  interface AstStyleSheet {
                      chi: any[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: StyleSheetNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstStyleSheet {
                      chi: any[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: StyleSheetNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  chi: any[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AtRuleToken

                  At rule token

                  -
                  interface AtRuleToken {
                      loc?: Location;
                      parent?: any;
                      pre: string;
                      tokens?: null | Token[];
                      typ: AtRuleTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AtRuleToken {
                      loc?: Location;
                      parent?: any;
                      pre: string;
                      tokens?: Token[] | null;
                      typ: AtRuleTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  pre: string
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AttrEndToken

                  Attribute end token

                  -
                  interface AttrEndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: AttrEndTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AttrEndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: AttrEndTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AttrStartToken

                  Attribute start token

                  -
                  interface AttrStartToken {
                      chi?: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: AttrStartTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AttrStartToken {
                      chi?: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: AttrStartTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi?: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AttrToken

                  Attribute token

                  -
                  interface AttrToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: AttrTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AttrToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: AttrTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface BadCDOCommentToken

                  Bad CDO comment token

                  -
                  interface BadCDOCommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: BadCdoTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface BadCDOCommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: BadCdoTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface BadCommentToken

                  Bad comment token

                  -
                  interface BadCommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: BadCommentTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface BadCommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: BadCommentTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface BadStringToken

                  Bad string token

                  -
                  interface BadStringToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: BadStringTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface BadStringToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: BadStringTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface BadUrlToken

                  Bad URL token

                  -
                  interface BadUrlToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: BadUrlTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface BadUrlToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: BadUrlTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface BaseToken

                  interface BaseToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: EnumToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc? +

                  Interface BaseToken

                  interface BaseToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: EnumToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface BinaryExpressionToken

                  Binary expression token

                  -
                  interface BinaryExpressionToken {
                      l:
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken;
                      loc?: Location;
                      op: Add
                      | Mul
                      | Div
                      | Sub;
                      parent?: any;
                      r:
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken;
                      tokens?: null
                      | Token[];
                      typ: BinaryExpressionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  l +
                  interface BinaryExpressionToken {
                      l:
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | ComposesSelectorToken
                          | CssVariableToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken;
                      loc?: Location;
                      op: Add
                      | Mul
                      | Div
                      | Sub;
                      parent?: any;
                      r:
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | ComposesSelectorToken
                          | CssVariableToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken;
                      tokens?: Token[]
                      | null;
                      typ: BinaryExpressionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  l:
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                  loc?: Location

                  location info

                  -
                  op: Add | Mul | Div | Sub
                  parent?: any

                  parent node

                  -
                  r:
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface BlockEndToken

                  Block end token

                  -
                  interface BlockEndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: BlockEndTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface BlockEndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: BlockEndTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface BlockStartToken

                  Block start token

                  -
                  interface BlockStartToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: BlockStartTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface BlockStartToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: BlockStartTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface CDOCommentToken

                  CDO comment token

                  -
                  interface CDOCommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: CDOCOMMTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface CDOCommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: CDOCOMMTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface ChildCombinatorToken

                  Child combinator token

                  -
                  interface ChildCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ChildCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ChildCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ChildCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ClassSelectorToken

                  Class selector token

                  -
                  interface ClassSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ClassSelectorTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ClassSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ClassSelectorTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface ColonToken

                  Colon token

                  -
                  interface ColonToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ColonTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ColonToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ColonTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ColorToken

                  Color token

                  -
                  interface ColorToken {
                      cal?: "rel" | "mix";
                      chi?: Token[];
                      kin: ColorType;
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ColorTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ColorToken {
                      cal?: "rel" | "mix";
                      chi?: Token[];
                      kin: ColorType;
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ColorTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  cal? chi? kin loc? @@ -165,11 +165,11 @@ tokens? typ val -

                  Properties

                  cal?: "rel" | "mix"
                  chi?: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface ColumnCombinatorToken

                  Column combinator token

                  -
                  interface ColumnCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ColumnCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ColumnCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ColumnCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface CommaToken

                  Comma token

                  -
                  interface CommaToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: CommaTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface CommaToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: CommaTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface CommentToken

                  Comment token

                  -
                  interface CommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: CommentTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface CommentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: CommentTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface ComposesSelectorToken

                  Composes selector token

                  +
                  interface ComposesSelectorToken {
                      l: Token[];
                      loc?: Location;
                      parent?: any;
                      r: Token | null;
                      tokens?: Token[] | null;
                      typ: ComposesSelectorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  l: Token[]
                  loc?: Location

                  location info

                  +
                  parent?: any

                  parent node

                  +
                  r: Token | null
                  tokens?: Token[] | null

                  prelude or selector tokens

                  +
                  typ: ComposesSelectorTokenType

                  token type

                  +
                  diff --git a/docs/interfaces/node.ContainMatchToken.html b/docs/interfaces/node.ContainMatchToken.html index b6eb867c..21382eab 100644 --- a/docs/interfaces/node.ContainMatchToken.html +++ b/docs/interfaces/node.ContainMatchToken.html @@ -157,15 +157,15 @@ --md-sys-color-surface-container-highest: #e9e1d9 }

                  Interface ContainMatchToken

                  Contain match token

                  -
                  interface ContainMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ContainMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ContainMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ContainMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface Context<Type>

                  interface Context<Type> {
                      index: number;
                      length: number;
                      clone<Type>(): Context<Type>;
                      consume<Type>(token: Type, howMany?: number): boolean;
                      consume<Type>(token: Type, howMany?: number): boolean;
                      current<Type>(): null | Type;
                      done(): boolean;
                      next<Type>(): null | Type;
                      peek<Type>(): null | Type;
                      slice<Type>(): Type[];
                      update<Type>(context: Context<Type>): void;
                  }

                  Type Parameters

                  • Type
                  Index

                  Methods

                  clone +

                  Interface Context<Type>

                  interface Context<Type> {
                      index: number;
                      length: number;
                      clone<Type>(): Context<Type>;
                      consume<Type>(token: Type, howMany?: number): boolean;
                      consume<Type>(token: Type, howMany?: number): boolean;
                      current<Type>(): Type | null;
                      done(): boolean;
                      next<Type>(): Type | null;
                      peek<Type>(): Type | null;
                      slice<Type>(): Type[];
                      update<Type>(context: Context<Type>): void;
                  }

                  Type Parameters

                  • Type
                  Index

                  Methods

                  clone consume current done @@ -166,8 +166,8 @@ update

                  Properties

                  Methods

                  Properties

                  index: number
                  length: number

                  The length of the context tokens to be consumed

                  -

                  Interface CssVariableImportTokenType

                  interface CssVariableImportTokenType {
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: CssVariableImportTokenType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  +
                  nam: string
                  parent?: any

                  parent node

                  +
                  tokens?: Token[] | null

                  prelude or selector tokens

                  +

                  token type

                  +
                  val: Token[]
                  diff --git a/docs/interfaces/node.CssVariableMapTokenType.html b/docs/interfaces/node.CssVariableMapTokenType.html new file mode 100644 index 00000000..100b0f61 --- /dev/null +++ b/docs/interfaces/node.CssVariableMapTokenType.html @@ -0,0 +1,184 @@ +CssVariableMapTokenType | @tbela99/css-parser

                  Interface CssVariableMapTokenType

                  interface CssVariableMapTokenType {
                      from: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: CssVariableMapTokenType;
                      vars: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  from: Token[]
                  loc?: Location

                  location info

                  +
                  parent?: any

                  parent node

                  +
                  tokens?: Token[] | null

                  prelude or selector tokens

                  +
                  typ: CssVariableMapTokenType

                  token type

                  +
                  vars: Token[]
                  diff --git a/docs/interfaces/node.CssVariableToken.html b/docs/interfaces/node.CssVariableToken.html new file mode 100644 index 00000000..e047430b --- /dev/null +++ b/docs/interfaces/node.CssVariableToken.html @@ -0,0 +1,185 @@ +CssVariableToken | @tbela99/css-parser

                  Interface CssVariableToken

                  Css variable token

                  +
                  interface CssVariableToken {
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: CssVariableTokenType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  +
                  nam: string
                  parent?: any

                  parent node

                  +
                  tokens?: Token[] | null

                  prelude or selector tokens

                  +

                  token type

                  +
                  val: Token[]
                  diff --git a/docs/interfaces/node.DashMatchToken.html b/docs/interfaces/node.DashMatchToken.html index be81974b..79308627 100644 --- a/docs/interfaces/node.DashMatchToken.html +++ b/docs/interfaces/node.DashMatchToken.html @@ -157,15 +157,15 @@ --md-sys-color-surface-container-highest: #e9e1d9 }

                  Interface DashMatchToken

                  Dash match token

                  -
                  interface DashMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: DashMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface DashMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: DashMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface DashedIdentToken

                  Dashed ident token

                  -
                  interface DashedIdentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: DashedIdenTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface DashedIdentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: DashedIdenTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface DelimToken

                  Delim token

                  -
                  interface DelimToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: DelimTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface DelimToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: DelimTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface DescendantCombinatorToken

                  Descendant combinator token

                  -
                  interface DescendantCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: DescendantCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface DescendantCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: DescendantCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface DimensionToken

                  Dimension token

                  -
                  interface DimensionToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: DimensionTokenType;
                      unit: string;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface DimensionToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: DimensionTokenType;
                      unit: string;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  unit: string
                  val: number | FractionToken

                  Interface DivToken

                  Div token

                  -
                  interface DivToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: Div;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface DivToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: Div;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -
                  typ: Div

                  token type

                  -

                  Interface EOFToken

                  EOF token

                  -
                  interface EOFToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: EOFTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface EOFToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: EOFTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface EndMatchToken

                  End match token

                  -
                  interface EndMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: EndMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface EndMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: EndMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface EqualMatchToken

                  Equal match token

                  -
                  interface EqualMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: EqualMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface EqualMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: EqualMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ErrorDescription

                  error description

                  -
                  interface ErrorDescription {
                      action: "drop" | "ignore";
                      error?: Error;
                      location?: Location;
                      message: string;
                      node?:
                          | null
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken
                          | AstAtRule
                          | AstKeyframesAtRule
                          | AstKeyFrameRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstStyleSheet
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration;
                      rawTokens?: TokenizeResult[];
                      syntax?: null
                      | string;
                  }
                  Index

                  Properties

                  interface ErrorDescription {
                      action: "drop" | "ignore";
                      error?: Error;
                      location?: Location;
                      message: string;
                      node?: any;
                      rawTokens?: TokenizeResult[];
                      syntax?: string | null;
                  }
                  Index

                  Properties

                  Properties

                  action: "drop" | "ignore"

                  drop rule or declaration

                  -
                  error?: Error

                  error object

                  -
                  location?: Location

                  error location

                  -
                  message: string

                  error message

                  -
                  node?:
                      | null
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                      | AstAtRule
                      | AstKeyframesAtRule
                      | AstKeyFrameRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstStyleSheet
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration

                  error node

                  -
                  rawTokens?: TokenizeResult[]

                  raw tokens

                  -
                  syntax?: null | string

                  syntax error description

                  -

                  Interface FlexToken

                  Flex token

                  -
                  interface FlexToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: FlexTokenType;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface FlexToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: FlexTokenType;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: number | FractionToken

                  Interface FractionToken

                  Fraction token

                  -
                  interface FractionToken {
                      l: NumberToken;
                      loc?: Location;
                      parent?: any;
                      r: NumberToken;
                      tokens?: null | Token[];
                      typ: FractionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  l +
                  interface FractionToken {
                      l: NumberToken;
                      loc?: Location;
                      parent?: any;
                      r: NumberToken;
                      tokens?: Token[] | null;
                      typ: FractionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface FrequencyToken

                  Frequency token

                  -
                  interface FrequencyToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: FrequencyTokenType;
                      unit: "Hz" | "Khz";
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface FrequencyToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: FrequencyTokenType;
                      unit: "Hz" | "Khz";
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  unit: "Hz" | "Khz"
                  val: number | FractionToken

                  Interface FunctionImageToken

                  Function image token

                  -
                  interface FunctionImageToken {
                      chi: (CommentToken | UrlToken)[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ImageFunctionTokenType;
                      val:
                          | "linear-gradient"
                          | "radial-gradient"
                          | "repeating-linear-gradient"
                          | "repeating-radial-gradient"
                          | "conic-gradient"
                          | "image"
                          | "image-set"
                          | "element"
                          | "cross-fade";
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface FunctionImageToken {
                      chi: (CommentToken | UrlToken)[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ImageFunctionTokenType;
                      val:
                          | "linear-gradient"
                          | "radial-gradient"
                          | "repeating-linear-gradient"
                          | "repeating-radial-gradient"
                          | "conic-gradient"
                          | "image"
                          | "image-set"
                          | "element"
                          | "cross-fade";
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val:
                      | "linear-gradient"
                      | "radial-gradient"
                      | "repeating-linear-gradient"
                      | "repeating-radial-gradient"
                      | "conic-gradient"
                      | "image"
                      | "image-set"
                      | "element"
                      | "cross-fade"

                  Interface FunctionToken

                  Function token

                  -
                  interface FunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: FunctionTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface FunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: FunctionTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface FunctionURLToken

                  Function URL token

                  -
                  interface FunctionURLToken {
                      chi: (CommentToken | UrlToken)[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: UrlFunctionTokenType;
                      val: "url";
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface FunctionURLToken {
                      chi: (StringToken | CommentToken | UrlToken)[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: UrlFunctionTokenType;
                      val: "url";
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: "url"

                  Interface GreaterThanOrEqualToken

                  Greater than or equal token

                  -
                  interface GreaterThanOrEqualToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: GteTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface GreaterThanOrEqualToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: GteTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface GreaterThanToken

                  Greater than token

                  -
                  interface GreaterThanToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: GtTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface GreaterThanToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: GtTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface GridTemplateFuncToken

                  Grid template function token

                  -
                  interface GridTemplateFuncToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: GridTemplateFuncTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface GridTemplateFuncToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: GridTemplateFuncTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface HashToken

                  Hash token

                  -
                  interface HashToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: HashTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface HashToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: HashTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface IdentListToken

                  Ident list token

                  -
                  interface IdentListToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: IdenListTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface IdentListToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: IdenListTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface IdentToken

                  Ident token

                  -
                  interface IdentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: IdenTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface IdentToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: IdenTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface ImportantToken

                  Important token

                  -
                  interface ImportantToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ImportantTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ImportantToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ImportantTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface IncludeMatchToken

                  Include match token

                  -
                  interface IncludeMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: IncludeMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface IncludeMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: IncludeMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface InvalidAttrToken

                  Invalid attribute token

                  -
                  interface InvalidAttrToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: InvalidAttrTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface InvalidAttrToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: InvalidAttrTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface InvalidClassSelectorToken

                  Invalid class selector token

                  -
                  interface InvalidClassSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: InvalidClassSelectorTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface InvalidClassSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: InvalidClassSelectorTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface LengthToken

                  Length token

                  -
                  interface LengthToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: LengthTokenType;
                      unit: string;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface LengthToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: LengthTokenType;
                      unit: string;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  unit: string
                  val: number | FractionToken

                  Interface LessThanOrEqualToken

                  Less than or equal token

                  -
                  interface LessThanOrEqualToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: LteTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface LessThanOrEqualToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: LteTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface LessThanToken

                  Less than token

                  -
                  interface LessThanToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: LtTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface LessThanToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: LtTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ListToken

                  List token

                  -
                  interface ListToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ListToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface ListToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ListToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface LiteralToken

                  Literal token

                  -
                  interface LiteralToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: LiteralTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface LiteralToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: LiteralTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface Location

                  token or node location

                  -
                  interface Location {
                      end: Position;
                      src: string;
                      sta: Position;
                  }
                  Index

                  Properties

                  end +
                  interface Location {
                      end: Position;
                      src: string;
                      sta: Position;
                  }
                  Index

                  Properties

                  Properties

                  end position

                  -
                  src: string

                  source file

                  -

                  start position

                  -

                  Interface MatchExpressionToken

                  Match expression token

                  -
                  interface MatchExpressionToken {
                      attr?: "s" | "i";
                      l: Token;
                      loc?: Location;
                      op:
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | DashMatchToken
                          | EqualMatchToken;
                      parent?: any;
                      r: Token;
                      tokens?: null
                      | Token[];
                      typ: MatchExpressionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MatchExpressionToken {
                      attr?: "s" | "i";
                      l: Token;
                      loc?: Location;
                      op:
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | DashMatchToken
                          | EqualMatchToken;
                      parent?: any;
                      r: Token;
                      tokens?: Token[]
                      | null;
                      typ: MatchExpressionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  attr? l loc? op @@ -165,11 +165,11 @@ r tokens? typ -

                  Properties

                  attr?: "s" | "i"
                  loc?: Location

                  location info

                  -
                  op:
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | DashMatchToken
                      | EqualMatchToken
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface MatchedSelectorInternal

                  matched selector object

                  -
                  interface MatchedSelector {
                      eq: boolean;
                      match: string[][];
                      selector1: string[][];
                      selector2: string[][];
                  }
                  Index

                  Properties

                  eq +
                  interface MatchedSelector {
                      eq: boolean;
                      match: string[][];
                      selector1: string[][];
                      selector2: string[][];
                  }
                  Index

                  Properties

                  eq: boolean

                  selectors partially match

                  -
                  match: string[][]

                  matched selector

                  -
                  selector1: string[][]

                  selector 1

                  -
                  selector2: string[][]

                  selector 2

                  -

                  Interface MediaFeatureAndToken

                  Media feature and token

                  -
                  interface MediaFeatureAndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: MediaFeatureAndTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MediaFeatureAndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: MediaFeatureAndTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface MediaFeatureNotToken

                  Media feature not token

                  -
                  interface MediaFeatureNotToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: MediaFeatureNotTokenType;
                      val: Token;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MediaFeatureNotToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: MediaFeatureNotTokenType;
                      val: Token;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: Token

                  Interface MediaFeatureOnlyToken

                  Media feature only token

                  -
                  interface MediaFeatureOnlyToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: MediaFeatureOnlyTokenType;
                      val: Token;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MediaFeatureOnlyToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: MediaFeatureOnlyTokenType;
                      val: Token;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: Token

                  Interface MediaFeatureOrToken

                  Media feature or token

                  -
                  interface MediaFeatureOrToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: MediaFeatureOrTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MediaFeatureOrToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: MediaFeatureOrTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface MediaFeatureToken

                  Media feature token

                  -
                  interface MediaFeatureToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: MediaFeatureTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MediaFeatureToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: MediaFeatureTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface MediaQueryConditionToken

                  Media query condition token

                  -
                  interface MediaQueryConditionToken {
                      l: Token;
                      loc?: Location;
                      op:
                          | ColonToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken;
                      parent?: any;
                      r: Token[];
                      tokens?: null
                      | Token[];
                      typ: MediaQueryConditionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  l +
                  interface MediaQueryConditionToken {
                      l: Token;
                      loc?: Location;
                      op:
                          | ColonToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken;
                      parent?: any;
                      r: Token[];
                      tokens?: Token[]
                      | null;
                      typ: MediaQueryConditionTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  r: Token[]
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface MinifyFeatureInternal

                  minify feature

                  -
                  interface MinifyFeature {
                      accept?: Set<EnumToken>;
                      ordering: number;
                      processMode: FeatureWalkMode;
                      register: (options: ParserOptions | MinifyFeatureOptions) => void;
                      run: (
                          ast: AstAtRule | AstRule,
                          options: ParserOptions,
                          parent: AstAtRule | AstStyleSheet | AstRule,
                          context: { [key: string]: any },
                          mode: FeatureWalkMode,
                      ) => null | AstNode;
                  }
                  Index

                  Properties

                  interface MinifyFeature {
                      accept?: Set<EnumToken>;
                      ordering: number;
                      processMode: FeatureWalkMode;
                      register: (options: ParserOptions | MinifyFeatureOptions) => void;
                      run: (
                          ast: AstAtRule | AstRule,
                          options: ParserOptions,
                          parent: AstAtRule | AstStyleSheet | AstRule,
                          context: { [key: string]: any },
                          mode: FeatureWalkMode,
                      ) => any;
                  }
                  Index

                  Properties

                  accept?: Set<EnumToken>

                  accepted tokens

                  -
                  ordering: number

                  ordering

                  -
                  processMode: FeatureWalkMode

                  process mode

                  -
                  register: (options: ParserOptions | MinifyFeatureOptions) => void

                  register feature

                  -
                  run: (
                      ast: AstAtRule | AstRule,
                      options: ParserOptions,
                      parent: AstAtRule | AstStyleSheet | AstRule,
                      context: { [key: string]: any },
                      mode: FeatureWalkMode,
                  ) => null | AstNode

                  run feature

                  -

                  Interface MinifyFeatureOptionsInternal

                  minify feature options

                  -

                  Hierarchy (View Summary)

                  Interface MinifyOptions

                  minify options

                  -
                  interface MinifyOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      inlineCssVariables?: boolean;
                      minify?: boolean;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeDuplicateDeclarations?: string | boolean | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MinifyOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      inlineCssVariables?: boolean;
                      minify?: boolean;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeDuplicateDeclarations?: string | boolean | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  computeCalcExpression?: boolean

                  compute math functions see supported functions mathFuncs

                  -
                  computeShorthand?: boolean

                  compute shorthand properties

                  -
                  computeTransform?: boolean

                  compute transform functions +

                  computeShorthand?: boolean

                  compute shorthand properties

                  +
                  computeTransform?: boolean

                  compute transform functions see supported functions transformFunctions

                  -
                  inlineCssVariables?: boolean

                  inline css variables

                  -
                  minify?: boolean

                  enable minification

                  -
                  nestingRules?: boolean

                  generate nested rules

                  -
                  parseColor?: boolean

                  parse color tokens

                  -
                  pass?: number

                  define minification passes.

                  -
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array

                  +
                  inlineCssVariables?: boolean

                  inline css variables

                  +
                  minify?: boolean

                  enable minification

                  +
                  nestingRules?: boolean

                  generate nested rules

                  +
                  parseColor?: boolean

                  parse color tokens

                  +
                  pass?: number

                  define minification passes.

                  +
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array


                  import {transform} from '@tbela99/css-parser';

                  const css = `

                  .table {

                  width: 100%;
                  width: calc(100% + 40px);
                  margin-left: 20px;
                  margin-left: min(100% , 20px)
                  }

                  `;
                  const result = await transform(css, {

                  beautify: true,
                  validation: true,
                  removeDuplicateDeclarations: ['width']
                  }
                  );

                  console.log(result.code);
                  -
                  removeEmpty?: boolean

                  remove empty ast nodes

                  -
                  removePrefix?: boolean

                  remove css prefix

                  -

                  Interface ModuleOptions

                  interface ModuleOptions {
                      filePath?: string;
                      generateScopedName?: (
                          localName: string,
                          filePath: string,
                          pattern: string,
                          hashLength?: number,
                      ) => string | Promise<string>;
                      hashLength?: number;
                      naming?: ModuleCaseTransformEnum;
                      pattern?: string;
                      scoped?: boolean | ModuleScopeEnumOptions;
                  }
                  Index

                  Properties

                  filePath?: string

                  module output file path. it is used to generate the scoped name. if not provided, options.src will be used

                  +
                  generateScopedName?: (
                      localName: string,
                      filePath: string,
                      pattern: string,
                      hashLength?: number,
                  ) => string | Promise<string>

                  optional function to generate scoped name

                  +

                  Type Declaration

                    • (
                          localName: string,
                          filePath: string,
                          pattern: string,
                          hashLength?: number,
                      ): string | Promise<string>
                    • Parameters

                      Returns string | Promise<string>

                  hashLength?: number

                  generated scope hash length. the default is 5

                  +

                  optional. function change the case of the scoped name and the class mapping

                  + +
                  pattern?: string

                  the pattern used to generate scoped names. the supported placeholders are:

                  +
                    +
                  • name: the file base name without the extension
                  • +
                  • hash: the file path hash
                  • +
                  • local: the local name
                  • +
                  • path: the file path
                  • +
                  • folder: the folder name
                  • +
                  • ext: the file extension
                  • +
                  +

                  the pattern can optionally have a maximum number of characters:

                  +
                  pattern: '[local:2]-[hash:5]'
                  +
                  + +

                  the hash pattern can take an algorithm, a maximum number of characters or both:

                  +
                  pattern: '[local]-[hash:base64:5]'
                  +
                  + +

                  or

                  +
                  pattern: '[local]-[hash:5]'
                  +
                  + +

                  or

                  +
                  pattern: '[local]-[hash:sha1]'
                  +
                  + +

                  supported hash algorithms are:

                  +
                    +
                  • base64
                  • +
                  • hex
                  • +
                  • base64url
                  • +
                  • sha1
                  • +
                  • sha256
                  • +
                  • sha384
                  • +
                  • sha512
                  • +
                  +

                  import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';
                  import type {TransformResult} from '@tbela99/css-parser';
                  css = `
                  :local(.className) {
                  background: red;
                  color: yellow;
                  }

                  :local(.subClass) {
                  composes: className;
                  background: blue;
                  }
                  `;

                  let result: TransformResult = await transform(css, {

                  beautify:true,
                  module: {
                  pattern: '[local]-[hash:sha256]'
                  }

                  });

                  console.log(result.code); +
                  + +

                  generated css

                  +
                  .className-b629f {
                  background: red;
                  color: #ff0
                  }
                  .subClass-a0c35 {
                  background: blue
                  } +
                  + +
                  scoped?: boolean | ModuleScopeEnumOptions

                  use local scope vs global scope

                  +
                  diff --git a/docs/interfaces/node.MulToken.html b/docs/interfaces/node.MulToken.html index 57e1f0d6..7ce4ca17 100644 --- a/docs/interfaces/node.MulToken.html +++ b/docs/interfaces/node.MulToken.html @@ -157,15 +157,15 @@ --md-sys-color-surface-container-highest: #e9e1d9 }

                  Interface MulToken

                  Mul token

                  -
                  interface MulToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: Mul;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface MulToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: Mul;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -
                  typ: Mul

                  token type

                  -

                  Interface NameSpaceAttributeToken

                  Name space attribute token

                  -
                  interface NameSpaceAttributeToken {
                      l?: Token;
                      loc?: Location;
                      parent?: any;
                      r: Token;
                      tokens?: null | Token[];
                      typ: NameSpaceAttributeTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  l? +
                  interface NameSpaceAttributeToken {
                      l?: Token;
                      loc?: Location;
                      parent?: any;
                      r: Token;
                      tokens?: Token[] | null;
                      typ: NameSpaceAttributeTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  l?: Token
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface NestingSelectorToken

                  Nesting selector token

                  -
                  interface NestingSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: NestingSelectorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface NestingSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: NestingSelectorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface NextSiblingCombinatorToken

                  Next sibling combinator token

                  -
                  interface NextSiblingCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: NextSiblingCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface NextSiblingCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: NextSiblingCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface NumberToken

                  Number token

                  -
                  interface NumberToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: NumberTokenType;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface NumberToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: NumberTokenType;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: number | FractionToken

                  Interface ParensEndToken

                  Parenthesis end token

                  -
                  interface ParensEndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: EndParensTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ParensEndToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: EndParensTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ParensStartToken

                  Parenthesis start token

                  -
                  interface ParensStartToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: StartParensTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ParensStartToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: StartParensTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ParensToken

                  Parenthesis token

                  -
                  interface ParensToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ParensTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface ParensToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ParensTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ParseInfo

                  parse info

                  -
                  interface ParseInfo {
                      buffer: string;
                      currentPosition: Position;
                      position: Position;
                      stream: string;
                  }
                  Index

                  Properties

                  interface ParseInfo {
                      buffer: string;
                      currentPosition: Position;
                      offset: number;
                      position: Position;
                      stream: string;
                  }
                  Index

                  Properties

                  buffer: string

                  read buffer

                  -
                  currentPosition: Position

                  current parsing position

                  -
                  position: Position

                  last token position

                  -
                  stream: string

                  stream

                  -

                  Interface ParseResult

                  parse result object

                  -
                  interface ParseResult {
                      ast: AstStyleSheet;
                      errors: ErrorDescription[];
                      stats: ParseResultStats;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  ast +
                  interface ParseResult {
                      ast: AstStyleSheet;
                      cssModuleVariables?: Record<string, CssVariableToken>;
                      errors: ErrorDescription[];
                      importMapping?: Record<string, Record<string, string>>;
                      mapping?: Record<string, string>;
                      stats: ParseResultStats;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  parsed ast tree

                  -

                  parse errors

                  -

                  parse stats

                  -

                  Interface ParseResultStats

                  parse result stats object

                  -
                  interface ParseResultStats {
                      bytesIn: number;
                      importedBytesIn: number;
                      imports: ParseResultStats[];
                      minify: string;
                      nodesCount: number;
                      parse: string;
                      src: string;
                      tokensCount: number;
                      total: string;
                  }
                  Index

                  Properties

                  interface ParseResultStats {
                      bytesIn: number;
                      importedBytesIn: number;
                      imports: ParseResultStats[];
                      minify: string;
                      module?: string;
                      nodesCount: number;
                      parse: string;
                      src: string;
                      tokensCount: number;
                      total: string;
                  }
                  Index

                  Properties

                  bytesIn: number

                  bytes read

                  -
                  importedBytesIn: number

                  bytes read from imported files

                  -
                  imports: ParseResultStats[]

                  imported files stats

                  -
                  minify: string

                  minify time

                  -
                  nodesCount: number

                  nodes count

                  -
                  parse: string

                  parse time

                  -
                  src: string

                  source file

                  -
                  tokensCount: number

                  tokens count

                  -
                  total: string

                  total time

                  -

                  Interface ParseTokenOptions

                  parse token options

                  -
                  interface ParseTokenOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeCharset?: boolean;
                      removeDuplicateDeclarations?: string | boolean | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ParseTokenOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      module?:
                          | boolean
                          | ModuleCaseTransformEnum
                          | ModuleScopeEnumOptions
                          | ModuleOptions;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeCharset?: boolean;
                      removeDuplicateDeclarations?: string
                      | boolean
                      | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  computeCalcExpression?: boolean

                  compute math functions see supported functions mathFuncs

                  -
                  computeShorthand?: boolean

                  compute shorthand properties

                  -
                  computeTransform?: boolean

                  compute transform functions +

                  computeShorthand?: boolean

                  compute shorthand properties

                  +
                  computeTransform?: boolean

                  compute transform functions see supported functions transformFunctions

                  -
                  cwd?: string

                  current working directory

                  -
                  expandNestingRules?: boolean

                  expand nested rules

                  -
                  inlineCssVariables?: boolean

                  inline css variables

                  -
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  -
                  load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult

                  url and file loader

                  -
                  minify?: boolean

                  enable minification

                  -
                  nestingRules?: boolean

                  generate nested rules

                  -
                  parseColor?: boolean

                  parse color tokens

                  -
                  pass?: number

                  define minification passes.

                  -
                  removeCharset?: boolean

                  remove at-rule charset

                  -
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array

                  +
                  cwd?: string

                  current working directory

                  +
                  expandNestingRules?: boolean

                  expand nested rules

                  +
                  inlineCssVariables?: boolean

                  inline css variables

                  +
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  +
                  load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult

                  url and file loader

                  +
                  minify?: boolean

                  enable minification

                  +
                  module?:
                      | boolean
                      | ModuleCaseTransformEnum
                      | ModuleScopeEnumOptions
                      | ModuleOptions

                  css modules options

                  +
                  nestingRules?: boolean

                  generate nested rules

                  +
                  parseColor?: boolean

                  parse color tokens

                  +
                  pass?: number

                  define minification passes.

                  +
                  removeCharset?: boolean

                  remove at-rule charset

                  +
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array


                  import {transform} from '@tbela99/css-parser';

                  const css = `

                  .table {

                  width: 100%;
                  width: calc(100% + 40px);
                  margin-left: 20px;
                  margin-left: min(100% , 20px)
                  }

                  `;
                  const result = await transform(css, {

                  beautify: true,
                  validation: true,
                  removeDuplicateDeclarations: ['width']
                  }
                  );

                  console.log(result.code);
                  -
                  removeEmpty?: boolean

                  remove empty ast nodes

                  -
                  removePrefix?: boolean

                  remove css prefix

                  -
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  -
                  resolveImport?: boolean

                  resolve import

                  -
                  resolveUrls?: boolean

                  resolve urls

                  -
                  signal?: AbortSignal

                  abort signal

                  +
                  removeEmpty?: boolean

                  remove empty ast nodes

                  +
                  removePrefix?: boolean

                  remove css prefix

                  +
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  +
                  resolveImport?: boolean

                  resolve import

                  +
                  resolveUrls?: boolean

                  resolve urls

                  +
                  signal?: AbortSignal

                  abort signal

                  Example: abort after 10 seconds


                  const result = await parse(cssString, {
                  signal: AbortSignal.timeout(10000)
                  });
                  -
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  -
                  src?: string

                  source file to be used for sourcemap

                  -
                  validation?: boolean | ValidationLevel

                  enable css validation

                  +
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  +
                  src?: string

                  source file to be used for sourcemap

                  +
                  validation?: boolean | ValidationLevel

                  enable css validation

                  see ValidationLevel

                  -

                  node visitor +

                  node visitor VisitorNodeMap[]

                  -

                  Interface ParserOptions

                  parser options

                  -
                  interface ParserOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeCharset?: boolean;
                      removeDuplicateDeclarations?: string | boolean | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ParserOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      module?:
                          | boolean
                          | ModuleCaseTransformEnum
                          | ModuleScopeEnumOptions
                          | ModuleOptions;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeCharset?: boolean;
                      removeDuplicateDeclarations?: string
                      | boolean
                      | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  computeCalcExpression?: boolean

                  compute math functions see supported functions mathFuncs

                  -
                  computeShorthand?: boolean

                  compute shorthand properties

                  -
                  computeTransform?: boolean

                  compute transform functions +

                  computeShorthand?: boolean

                  compute shorthand properties

                  +
                  computeTransform?: boolean

                  compute transform functions see supported functions transformFunctions

                  -
                  cwd?: string

                  current working directory

                  -
                  expandNestingRules?: boolean

                  expand nested rules

                  -
                  inlineCssVariables?: boolean

                  inline css variables

                  -
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  -
                  load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult

                  url and file loader

                  -
                  minify?: boolean

                  enable minification

                  -
                  nestingRules?: boolean

                  generate nested rules

                  -
                  parseColor?: boolean

                  parse color tokens

                  -
                  pass?: number

                  define minification passes.

                  -
                  removeCharset?: boolean

                  remove at-rule charset

                  -
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array

                  +
                  cwd?: string

                  current working directory

                  +
                  expandNestingRules?: boolean

                  expand nested rules

                  +
                  inlineCssVariables?: boolean

                  inline css variables

                  +
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  +
                  load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult

                  url and file loader

                  +
                  minify?: boolean

                  enable minification

                  +
                  module?:
                      | boolean
                      | ModuleCaseTransformEnum
                      | ModuleScopeEnumOptions
                      | ModuleOptions

                  css modules options

                  +
                  nestingRules?: boolean

                  generate nested rules

                  +
                  parseColor?: boolean

                  parse color tokens

                  +
                  pass?: number

                  define minification passes.

                  +
                  removeCharset?: boolean

                  remove at-rule charset

                  +
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array


                  import {transform} from '@tbela99/css-parser';

                  const css = `

                  .table {

                  width: 100%;
                  width: calc(100% + 40px);
                  margin-left: 20px;
                  margin-left: min(100% , 20px)
                  }

                  `;
                  const result = await transform(css, {

                  beautify: true,
                  validation: true,
                  removeDuplicateDeclarations: ['width']
                  }
                  );

                  console.log(result.code);
                  -
                  removeEmpty?: boolean

                  remove empty ast nodes

                  -
                  removePrefix?: boolean

                  remove css prefix

                  -
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  -
                  resolveImport?: boolean

                  resolve import

                  -
                  resolveUrls?: boolean

                  resolve urls

                  -
                  signal?: AbortSignal

                  abort signal

                  +
                  removeEmpty?: boolean

                  remove empty ast nodes

                  +
                  removePrefix?: boolean

                  remove css prefix

                  +
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  +
                  resolveImport?: boolean

                  resolve import

                  +
                  resolveUrls?: boolean

                  resolve urls

                  +
                  signal?: AbortSignal

                  abort signal

                  Example: abort after 10 seconds


                  const result = await parse(cssString, {
                  signal: AbortSignal.timeout(10000)
                  });
                  -
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  -
                  src?: string

                  source file to be used for sourcemap

                  -
                  validation?: boolean | ValidationLevel

                  enable css validation

                  +
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  +
                  src?: string

                  source file to be used for sourcemap

                  +
                  validation?: boolean | ValidationLevel

                  enable css validation

                  see ValidationLevel

                  -

                  node visitor +

                  node visitor VisitorNodeMap[]

                  -

                  Interface PercentageToken

                  Percentage token

                  -
                  interface PercentageToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: PercentageTokenType;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface PercentageToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: PercentageTokenType;
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: number | FractionToken

                  Interface Position

                  Position

                  -
                  interface Position {
                      col: number;
                      ind: number;
                      lin: number;
                  }
                  Index

                  Properties

                  col +
                  interface Position {
                      col: number;
                      ind: number;
                      lin: number;
                  }
                  Index

                  Properties

                  Properties

                  col: number

                  column number

                  -
                  ind: number

                  index in the source

                  -
                  lin: number

                  line number

                  -

                  Interface PropertyListOptions

                  interface PropertyListOptions {
                      computeShorthand?: boolean;
                      removeDuplicateDeclarations?: string | boolean | string[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  computeShorthand? +

                  Interface PropertyListOptions

                  interface PropertyListOptions {
                      computeShorthand?: boolean;
                      removeDuplicateDeclarations?: string | boolean | string[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  computeShorthand?: boolean
                  removeDuplicateDeclarations?: string | boolean | string[]

                  Interface PropertyMapType

                  interface PropertyMapType {
                      constraints?: { [key: string]: { [key: string]: any } };
                      default: string[];
                      keywords: string[];
                      mapping?: Record<string, string>;
                      multiple?: boolean;
                      prefix?: {
                          typ:
                              | "toString"
                              | "toLocaleString"
                              | "toFixed"
                              | "toExponential"
                              | "toPrecision"
                              | "valueOf";
                          val: string;
                      };
                      previous?: string;
                      required?: boolean;
                      separator?: {
                          typ: | "toString"
                          | "toLocaleString"
                          | "toFixed"
                          | "toExponential"
                          | "toPrecision"
                          | "valueOf";
                      };
                      types: string[];
                  }
                  Index

                  Properties

                  constraints? +

                  Interface PropertyMapType

                  interface PropertyMapType {
                      constraints?: { [key: string]: { [key: string]: any } };
                      default: string[];
                      keywords: string[];
                      mapping?: Record<string, string>;
                      multiple?: boolean;
                      prefix?: {
                          typ:
                              | "toString"
                              | "toLocaleString"
                              | "toFixed"
                              | "toExponential"
                              | "toPrecision"
                              | "valueOf";
                          val: string;
                      };
                      previous?: string;
                      required?: boolean;
                      separator?: {
                          typ: | "toString"
                          | "toLocaleString"
                          | "toFixed"
                          | "toExponential"
                          | "toPrecision"
                          | "valueOf";
                      };
                      types: string[];
                  }
                  Index

                  Properties

                  constraints?: { [key: string]: { [key: string]: any } }
                  default: string[]
                  keywords: string[]
                  mapping?: Record<string, string>
                  multiple?: boolean
                  prefix?: {
                      typ:
                          | "toString"
                          | "toLocaleString"
                          | "toFixed"
                          | "toExponential"
                          | "toPrecision"
                          | "valueOf";
                      val: string;
                  }
                  previous?: string
                  required?: boolean
                  separator?: {
                      typ:
                          | "toString"
                          | "toLocaleString"
                          | "toFixed"
                          | "toExponential"
                          | "toPrecision"
                          | "valueOf";
                  }
                  types: string[]

                  Interface PropertySetType

                  Indexable

                  Interface PropertySetType

                  Indexable

                  Interface PropertyType

                  interface PropertyType {
                      shorthand: string;
                  }
                  Index

                  Properties

                  Properties

                  shorthand: string

                  Interface PropertyType

                  interface PropertyType {
                      shorthand: string;
                  }
                  Index

                  Properties

                  Properties

                  shorthand: string

                  Interface PseudoClassFunctionToken

                  Pseudo class function token

                  -
                  interface PseudoClassFunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: PseudoClassFuncTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface PseudoClassFunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: PseudoClassFuncTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface PseudoClassToken

                  Pseudo class token

                  -
                  interface PseudoClassToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: PseudoClassTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface PseudoClassToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: PseudoClassTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface PseudoElementToken

                  Pseudo element token

                  -
                  interface PseudoElementToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: PseudoElementTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface PseudoElementToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: PseudoElementTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface PseudoPageToken

                  Pseudo page token

                  -
                  interface PseudoPageToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: PseudoPageTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface PseudoPageToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: PseudoPageTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface RenderOptions

                  ast node render options

                  -
                  interface RenderOptions {
                      beautify?: boolean;
                      convertColor?: boolean | ColorType;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      indent?: string;
                      minify?: boolean;
                      newLine?: string;
                      output?: string;
                      preserveLicense?: boolean;
                      removeComments?: boolean;
                      removeEmpty?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => ResolvedPath;
                      sourcemap?: boolean | "inline";
                      withParents?: boolean;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface RenderOptions {
                      beautify?: boolean;
                      convertColor?: boolean | ColorType;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      indent?: string;
                      minify?: boolean;
                      newLine?: string;
                      output?: string;
                      preserveLicense?: boolean;
                      removeComments?: boolean;
                      removeEmpty?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => ResolvedPath;
                      sourcemap?: boolean | "inline";
                      withParents?: boolean;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  beautify? convertColor? cwd? expandNestingRules? @@ -175,23 +175,23 @@
                  const result = await transform(css, {beautify: true});
                   
                  -
                  convertColor?: boolean | ColorType

                  convert color to the specified color space. 'true' will convert to HEX

                  -
                  cwd?: string

                  current working directory

                  -
                  expandNestingRules?: boolean

                  expand nesting rules

                  -
                  indent?: string

                  indent string

                  -
                  minify?: boolean

                  minify css values.

                  -
                  newLine?: string

                  new line string

                  -
                  output?: string

                  output file. used for url resolution

                  -
                  preserveLicense?: boolean

                  preserve license comments. license comments are comments that start with /*!

                  -
                  removeComments?: boolean

                  remove comments

                  -
                  removeEmpty?: boolean

                  remove empty nodes. empty nodes are removed by default

                  +
                  convertColor?: boolean | ColorType

                  convert color to the specified color space. 'true' will convert to HEX

                  +
                  cwd?: string

                  current working directory

                  +
                  expandNestingRules?: boolean

                  expand nesting rules

                  +
                  indent?: string

                  indent string

                  +
                  minify?: boolean

                  minify css values.

                  +
                  newLine?: string

                  new line string

                  +
                  output?: string

                  output file. used for url resolution

                  +
                  preserveLicense?: boolean

                  preserve license comments. license comments are comments that start with /*!

                  +
                  removeComments?: boolean

                  remove comments

                  +
                  removeEmpty?: boolean

                  remove empty nodes. empty nodes are removed by default


                  const css = `
                  @supports selector(:-ms-input-placeholder) {

                  :-ms-input-placeholder {

                  }
                  }`;
                  const result = await transform(css, {removeEmpty: false});
                  -
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => ResolvedPath

                  resolve path

                  -
                  sourcemap?: boolean | "inline"

                  generate sourcemap object. 'inline' will embed it in the css

                  -
                  withParents?: boolean

                  render the node along with its parents

                  -

                  Interface RenderResult

                  render result object

                  -
                  interface RenderResult {
                      code: string;
                      errors: ErrorDescription[];
                      map?: SourceMap;
                      stats: { total: string };
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface RenderResult {
                      code: string;
                      errors: ErrorDescription[];
                      map?: SourceMap;
                      stats: { total: string };
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  code: string

                  rendered css

                  -

                  render errors

                  -
                  map?: SourceMap

                  source map

                  -
                  stats: { total: string }

                  render stats

                  +

                  render errors

                  +
                  map?: SourceMap

                  source map

                  +
                  stats: { total: string }

                  render stats

                  Type Declaration

                  • total: string

                    render time

                    -

                  Interface ResolutionToken

                  Resolution token

                  -
                  interface ResolutionToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: ResolutionTokenType;
                      unit: "x" | "dpi" | "dpcm" | "dppx";
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ResolutionToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: ResolutionTokenType;
                      unit: "x" | "dpi" | "dpcm" | "dppx";
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  unit: "x" | "dpi" | "dpcm" | "dppx"
                  val: number | FractionToken

                  Interface ResolvedPathInternal

                  resolved path

                  -
                  interface ResolvedPath {
                      absolute: string;
                      relative: string;
                  }
                  Index

                  Properties

                  interface ResolvedPath {
                      absolute: string;
                      relative: string;
                  }
                  Index

                  Properties

                  Properties

                  absolute: string

                  absolute path

                  -
                  relative: string

                  relative path

                  -

                  Interface SemiColonToken

                  Semicolon token

                  -
                  interface SemiColonToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: SemiColonTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface SemiColonToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: SemiColonTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface ShorthandDef

                  interface ShorthandDef {
                      defaults: string[];
                      keywords: string;
                      multiple?: boolean;
                      pattern: string;
                      separator?: string;
                      shorthand: string;
                  }
                  Index

                  Properties

                  defaults +

                  Interface ShorthandDef

                  interface ShorthandDef {
                      defaults: string[];
                      keywords: string;
                      multiple?: boolean;
                      pattern: string;
                      separator?: string;
                      shorthand: string;
                  }
                  Index

                  Properties

                  defaults: string[]
                  keywords: string
                  multiple?: boolean
                  pattern: string
                  separator?: string
                  shorthand: string

                  Interface ShorthandMapType

                  interface ShorthandMapType {
                      default: string[];
                      keywords: string[];
                      mapping?: Record<string, string>;
                      multiple?: boolean;
                      pattern: string;
                      properties: { [property: string]: PropertyMapType };
                      separator?: {
                          typ:
                              | "toString"
                              | "toLocaleString"
                              | "toFixed"
                              | "toExponential"
                              | "toPrecision"
                              | "valueOf";
                          val?: string;
                      };
                      set?: Record<string, string[]>;
                      shorthand: string;
                  }
                  Index

                  Properties

                  default +

                  Interface ShorthandMapType

                  interface ShorthandMapType {
                      default: string[];
                      keywords: string[];
                      mapping?: Record<string, string>;
                      multiple?: boolean;
                      pattern: string;
                      properties: { [property: string]: PropertyMapType };
                      separator?: {
                          typ:
                              | "toString"
                              | "toLocaleString"
                              | "toFixed"
                              | "toExponential"
                              | "toPrecision"
                              | "valueOf";
                          val?: string;
                      };
                      set?: Record<string, string[]>;
                      shorthand: string;
                  }
                  Index

                  Properties

                  Properties

                  default: string[]
                  keywords: string[]
                  mapping?: Record<string, string>
                  multiple?: boolean
                  pattern: string
                  properties: { [property: string]: PropertyMapType }
                  separator?: {
                      typ:
                          | "toString"
                          | "toLocaleString"
                          | "toFixed"
                          | "toExponential"
                          | "toPrecision"
                          | "valueOf";
                      val?: string;
                  }
                  set?: Record<string, string[]>
                  shorthand: string

                  Interface ShorthandProperties

                  interface ShorthandProperties {
                      constraints?: any[];
                      default: string[];
                      keywords: string[];
                      mapping?: { [key: string]: any };
                      multiple?: boolean;
                      prefix?: string;
                      required?: boolean;
                      types: EnumToken[];
                      validation?: { [key: string]: any };
                  }
                  Index

                  Properties

                  constraints? +

                  Interface ShorthandProperties

                  interface ShorthandProperties {
                      constraints?: any[];
                      default: string[];
                      keywords: string[];
                      mapping?: { [key: string]: any };
                      multiple?: boolean;
                      prefix?: string;
                      required?: boolean;
                      types: EnumToken[];
                      validation?: { [key: string]: any };
                  }
                  Index

                  Properties

                  constraints?: any[]
                  default: string[]
                  keywords: string[]
                  mapping?: { [key: string]: any }
                  multiple?: boolean
                  prefix?: string
                  required?: boolean
                  types: EnumToken[]
                  validation?: { [key: string]: any }

                  Interface ShorthandPropertyType

                  interface ShorthandPropertyType {
                      keywords: string[];
                      map?: string;
                      multiple: boolean;
                      properties: string[];
                      separator: {
                          typ:
                              | "toString"
                              | "toLocaleString"
                              | "toFixed"
                              | "toExponential"
                              | "toPrecision"
                              | "valueOf";
                          val: string;
                      };
                      shorthand: string;
                      types: string[];
                  }
                  Index

                  Properties

                  keywords +

                  Interface ShorthandPropertyType

                  interface ShorthandPropertyType {
                      keywords: string[];
                      map?: string;
                      multiple: boolean;
                      properties: string[];
                      separator: {
                          typ:
                              | "toString"
                              | "toLocaleString"
                              | "toFixed"
                              | "toExponential"
                              | "toPrecision"
                              | "valueOf";
                          val: string;
                      };
                      shorthand: string;
                      types: string[];
                  }
                  Index

                  Properties

                  keywords: string[]
                  map?: string
                  multiple: boolean
                  properties: string[]
                  separator: {
                      typ:
                          | "toString"
                          | "toLocaleString"
                          | "toFixed"
                          | "toExponential"
                          | "toPrecision"
                          | "valueOf";
                      val: string;
                  }
                  shorthand: string
                  types: string[]

                  Interface ShorthandType

                  interface ShorthandType {
                      properties: ShorthandProperties;
                      shorthand: string;
                  }
                  Index

                  Properties

                  properties +

                  Interface ShorthandType

                  interface ShorthandType {
                      properties: ShorthandProperties;
                      shorthand: string;
                  }
                  Index

                  Properties

                  Properties

                  shorthand: string

                  Interface SourceMapObjectInternal

                  source map object

                  -
                  interface SourceMapObject {
                      file?: string;
                      mappings: string;
                      names?: string[];
                      sourceRoot?: string;
                      sources?: string[];
                      sourcesContent?: (null | string)[];
                      version: number;
                  }
                  Index

                  Properties

                  interface SourceMapObject {
                      file?: string;
                      mappings: string;
                      names?: string[];
                      sourceRoot?: string;
                      sources?: string[];
                      sourcesContent?: (string | null)[];
                      version: number;
                  }
                  Index

                  Properties

                  file?: string
                  mappings: string
                  names?: string[]
                  sourceRoot?: string
                  sources?: string[]
                  sourcesContent?: (null | string)[]
                  version: number

                  Interface StartMatchToken

                  Start match token

                  -
                  interface StartMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: StartMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface StartMatchToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: StartMatchTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface StringToken

                  String token

                  -
                  interface StringToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: StringTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface StringToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: StringTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface SubToken

                  Sub token

                  -
                  interface SubToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: Sub;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface SubToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: Sub;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -
                  typ: Sub

                  token type

                  -

                  Interface SubsequentCombinatorToken

                  Subsequent sibling combinator token

                  -
                  interface SubsequentCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: SubsequentSiblingCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface SubsequentCombinatorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: SubsequentSiblingCombinatorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface TimeToken

                  Time token

                  -
                  interface TimeToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: TimeTokenType;
                      unit: "s" | "ms";
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface TimeToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: TimeTokenType;
                      unit: "s" | "ms";
                      val: number | FractionToken;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  unit: "s" | "ms"
                  val: number | FractionToken

                  Interface TimelineFunctionToken

                  Timeline function token

                  -
                  interface TimelineFunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: TimelineFunctionTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface TimelineFunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: TimelineFunctionTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface TimingFunctionToken

                  Timing function token

                  -
                  interface TimingFunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: TimingFunctionTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface TimingFunctionToken {
                      chi: Token[];
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: TimingFunctionTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: Token[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface TokenizeResultInternal

                  tokenize result object

                  -
                  interface TokenizeResult {
                      bytesIn: number;
                      end: Position;
                      hint?: EnumToken;
                      len: number;
                      sta: Position;
                      token: string;
                  }
                  Index

                  Properties

                  interface TokenizeResult {
                      bytesIn: number;
                      end: Position;
                      hint?: EnumToken;
                      len: number;
                      sta: Position;
                      token: string;
                  }
                  Index

                  Properties

                  bytesIn: number

                  bytes in

                  -

                  token end position

                  -
                  hint?: EnumToken

                  token type hint

                  -
                  len: number

                  token length

                  -

                  token start position

                  -
                  token: string

                  token

                  -

                  Interface TransformOptions

                  transform options

                  -
                  interface TransformOptions {
                      beautify?: boolean;
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      convertColor?: boolean | ColorType;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      indent?: string;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      nestingRules?: boolean;
                      newLine?: string;
                      output?: string;
                      parseColor?: boolean;
                      pass?: number;
                      preserveLicense?: boolean;
                      removeCharset?: boolean;
                      removeComments?: boolean;
                      removeDuplicateDeclarations?: string | boolean | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                      withParents?: boolean;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface TransformOptions {
                      beautify?: boolean;
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      convertColor?: boolean | ColorType;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      indent?: string;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      module?:
                          | boolean
                          | ModuleCaseTransformEnum
                          | ModuleScopeEnumOptions
                          | ModuleOptions;
                      nestingRules?: boolean;
                      newLine?: string;
                      output?: string;
                      parseColor?: boolean;
                      pass?: number;
                      preserveLicense?: boolean;
                      removeCharset?: boolean;
                      removeComments?: boolean;
                      removeDuplicateDeclarations?: string
                      | boolean
                      | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                      withParents?: boolean;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  beautify? computeCalcExpression? computeShorthand? computeTransform? @@ -169,6 +169,7 @@ lenient? load? minify? +module? nestingRules? newLine? output? @@ -193,49 +194,50 @@
                  const result = await transform(css, {beautify: true});
                   
                  -
                  computeCalcExpression?: boolean

                  compute math functions +

                  computeCalcExpression?: boolean

                  compute math functions see supported functions mathFuncs

                  -
                  computeShorthand?: boolean

                  compute shorthand properties

                  -
                  computeTransform?: boolean

                  compute transform functions +

                  computeShorthand?: boolean

                  compute shorthand properties

                  +
                  computeTransform?: boolean

                  compute transform functions see supported functions transformFunctions

                  -
                  convertColor?: boolean | ColorType

                  convert color to the specified color space. 'true' will convert to HEX

                  -
                  cwd?: string

                  current working directory

                  -
                  expandNestingRules?: boolean

                  expand nested rules

                  -
                  indent?: string

                  indent string

                  -
                  inlineCssVariables?: boolean

                  inline css variables

                  -
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  -
                  load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult

                  url and file loader

                  -
                  minify?: boolean

                  enable minification

                  -
                  nestingRules?: boolean

                  generate nested rules

                  -
                  newLine?: string

                  new line string

                  -
                  output?: string

                  output file. used for url resolution

                  -
                  parseColor?: boolean

                  parse color tokens

                  -
                  pass?: number

                  define minification passes.

                  -
                  preserveLicense?: boolean

                  preserve license comments. license comments are comments that start with /*!

                  -
                  removeCharset?: boolean

                  remove at-rule charset

                  -
                  removeComments?: boolean

                  remove comments

                  -
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array

                  +
                  convertColor?: boolean | ColorType

                  convert color to the specified color space. 'true' will convert to HEX

                  +
                  cwd?: string

                  current working directory

                  +
                  expandNestingRules?: boolean

                  expand nested rules

                  +
                  indent?: string

                  indent string

                  +
                  inlineCssVariables?: boolean

                  inline css variables

                  +
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  +
                  load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult

                  url and file loader

                  +
                  minify?: boolean

                  enable minification

                  +
                  module?:
                      | boolean
                      | ModuleCaseTransformEnum
                      | ModuleScopeEnumOptions
                      | ModuleOptions

                  css modules options

                  +
                  nestingRules?: boolean

                  generate nested rules

                  +
                  newLine?: string

                  new line string

                  +
                  output?: string

                  output file. used for url resolution

                  +
                  parseColor?: boolean

                  parse color tokens

                  +
                  pass?: number

                  define minification passes.

                  +
                  preserveLicense?: boolean

                  preserve license comments. license comments are comments that start with /*!

                  +
                  removeCharset?: boolean

                  remove at-rule charset

                  +
                  removeComments?: boolean

                  remove comments

                  +
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array


                  import {transform} from '@tbela99/css-parser';

                  const css = `

                  .table {

                  width: 100%;
                  width: calc(100% + 40px);
                  margin-left: 20px;
                  margin-left: min(100% , 20px)
                  }

                  `;
                  const result = await transform(css, {

                  beautify: true,
                  validation: true,
                  removeDuplicateDeclarations: ['width']
                  }
                  );

                  console.log(result.code);
                  -
                  removeEmpty?: boolean

                  remove empty ast nodes

                  -
                  removePrefix?: boolean

                  remove css prefix

                  -
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  -
                  resolveImport?: boolean

                  resolve import

                  -
                  resolveUrls?: boolean

                  resolve urls

                  -
                  signal?: AbortSignal

                  abort signal

                  +
                  removeEmpty?: boolean

                  remove empty ast nodes

                  +
                  removePrefix?: boolean

                  remove css prefix

                  +
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  +
                  resolveImport?: boolean

                  resolve import

                  +
                  resolveUrls?: boolean

                  resolve urls

                  +
                  signal?: AbortSignal

                  abort signal

                  Example: abort after 10 seconds


                  const result = await parse(cssString, {
                  signal: AbortSignal.timeout(10000)
                  });
                  -
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  -
                  src?: string

                  source file to be used for sourcemap

                  -
                  validation?: boolean | ValidationLevel

                  enable css validation

                  +
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  +
                  src?: string

                  source file to be used for sourcemap

                  +
                  validation?: boolean | ValidationLevel

                  enable css validation

                  see ValidationLevel

                  -

                  node visitor +

                  node visitor VisitorNodeMap[]

                  -
                  withParents?: boolean

                  render the node along with its parents

                  -

                  Interface TransformResult

                  transform result object

                  -
                  interface TransformResult {
                      ast: AstStyleSheet;
                      code: string;
                      errors: ErrorDescription[];
                      map?: SourceMap;
                      stats: {
                          bytesIn: number;
                          bytesOut: number;
                          importedBytesIn: number;
                          imports: ParseResultStats[];
                          minify: string;
                          parse: string;
                          render: string;
                          src: string;
                          total: string;
                      };
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  ast +
                  interface TransformResult {
                      ast: AstStyleSheet;
                      code: string;
                      cssModuleVariables?: Record<string, CssVariableToken>;
                      errors: ErrorDescription[];
                      importMapping?: Record<string, Record<string, string>>;
                      map?: SourceMap;
                      mapping?: Record<string, string>;
                      stats: {
                          bytesIn: number;
                          bytesOut: number;
                          importedBytesIn: number;
                          imports: ParseResultStats[];
                          minify: string;
                          parse: string;
                          render: string;
                          src: string;
                          total: string;
                      };
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  parsed ast tree

                  -
                  code: string

                  rendered css

                  -

                  parse errors

                  -
                  map?: SourceMap

                  source map

                  -
                  stats: {
                      bytesIn: number;
                      bytesOut: number;
                      importedBytesIn: number;
                      imports: ParseResultStats[];
                      minify: string;
                      parse: string;
                      render: string;
                      src: string;
                      total: string;
                  }

                  transform stats

                  +
                  code: string

                  rendered css

                  +
                  cssModuleVariables?: Record<string, CssVariableToken>

                  parse errors

                  +
                  importMapping?: Record<string, Record<string, string>>
                  map?: SourceMap

                  source map

                  +
                  mapping?: Record<string, string>

                  css module mapping

                  +
                  stats: {
                      bytesIn: number;
                      bytesOut: number;
                      importedBytesIn: number;
                      imports: ParseResultStats[];
                      minify: string;
                      parse: string;
                      render: string;
                      src: string;
                      total: string;
                  }

                  transform stats

                  Type Declaration

                  • bytesIn: number

                    bytes read

                  • bytesOut: number

                    generated css size

                  • importedBytesIn: number

                    bytes read from imported files

                    @@ -176,7 +180,7 @@
                  • render: string

                    render time

                  • src: string

                    source file

                  • total: string

                    total time

                    -

                  Interface UnaryExpression

                  Unary expression token

                  -
                  interface UnaryExpression {
                      loc?: Location;
                      parent?: any;
                      sign: Add | Sub;
                      tokens?: null | Token[];
                      typ: UnaryExpressionTokenType;
                      val: UnaryExpressionNode;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface UnaryExpression {
                      loc?: Location;
                      parent?: any;
                      sign: Add | Sub;
                      tokens?: Token[] | null;
                      typ: UnaryExpressionTokenType;
                      val: UnaryExpressionNode;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  sign: Add | Sub
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface UnclosedStringToken

                  Unclosed string token

                  -
                  interface UnclosedStringToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: UnclosedStringTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface UnclosedStringToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: UnclosedStringTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface UniversalSelectorToken

                  Universal selector token

                  -
                  interface UniversalSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: UniversalSelectorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface UniversalSelectorToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: UniversalSelectorTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface UrlToken

                  URL token

                  -
                  interface UrlToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: UrlTokenTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface UrlToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: UrlTokenTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface ValidationConfiguration

                  Index

                  Properties

                  atRules +

                  Interface ValidationConfiguration

                  Index

                  Properties

                  declarations: ValidationSyntaxNode

                  Interface ValidationOptions

                  css validation options

                  -
                  interface ValidationOptions {
                      lenient?: boolean;
                      validation?: boolean | ValidationLevel;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ValidationOptions {
                      lenient?: boolean;
                      validation?: boolean | ValidationLevel;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  -
                  validation?: boolean | ValidationLevel

                  enable css validation

                  +
                  validation?: boolean | ValidationLevel

                  enable css validation

                  see ValidationLevel

                  -

                  Interface ValidationResult

                  interface ValidationResult {
                      cycle?: boolean;
                      error: string;
                      node:
                          | null
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken
                          | AstAtRule
                          | AstKeyframesAtRule
                          | AstKeyFrameRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstStyleSheet
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration;
                      syntax: null
                      | string
                      | ValidationToken;
                      valid: SyntaxValidationResult;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  cycle? +

                  Interface ValidationResult

                  interface ValidationResult {
                      cycle?: boolean;
                      error: string;
                      node: any;
                      syntax: string | ValidationToken | null;
                      valid: SyntaxValidationResult;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  cycle?: boolean
                  error: string
                  node:
                      | null
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                      | AstAtRule
                      | AstKeyframesAtRule
                      | AstKeyFrameRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstStyleSheet
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration
                  syntax: null | string | ValidationToken
                  valid: SyntaxValidationResult

                  Interface ValidationSelectorOptions

                  css validation options

                  -
                  interface ValidationSelectorOptions {
                      lenient?: boolean;
                      nestedSelector?: boolean;
                      validation?: boolean | ValidationLevel;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ValidationSelectorOptions {
                      lenient?: boolean;
                      nestedSelector?: boolean;
                      validation?: boolean | ValidationLevel;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  -
                  nestedSelector?: boolean
                  validation?: boolean | ValidationLevel

                  enable css validation

                  +
                  nestedSelector?: boolean
                  validation?: boolean | ValidationLevel

                  enable css validation

                  see ValidationLevel

                  -

                  Interface ValidationSyntaxNode

                  interface ValidationSyntaxNode {
                      ast?: ValidationToken[];
                      syntax: string;
                  }
                  Index

                  Properties

                  ast? +

                  Interface ValidationSyntaxNode

                  interface ValidationSyntaxNode {
                      ast?: ValidationToken[];
                      syntax: string;
                  }
                  Index

                  Properties

                  Properties

                  ast?: ValidationToken[]
                  syntax: string

                  Interface ValidationSyntaxResult

                  interface ValidationSyntaxResult {
                      context: Token[] | Context<Token>;
                      cycle?: boolean;
                      error: string;
                      node:
                          | null
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken
                          | AstAtRule
                          | AstKeyframesAtRule
                          | AstKeyFrameRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstStyleSheet
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration;
                      syntax: null
                      | string
                      | ValidationToken;
                      valid: SyntaxValidationResult;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  context +

                  Interface ValidationSyntaxResult

                  interface ValidationSyntaxResult {
                      context: Token[] | Context<Token>;
                      cycle?: boolean;
                      error: string;
                      node: any;
                      syntax: string | ValidationToken | null;
                      valid: SyntaxValidationResult;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  context: Token[] | Context<Token>
                  cycle?: boolean
                  error: string
                  node:
                      | null
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                      | AstAtRule
                      | AstKeyframesAtRule
                      | AstKeyFrameRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstStyleSheet
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration
                  syntax: null | string | ValidationToken
                  valid: SyntaxValidationResult

                  Interface VariableScopeInfoInternal

                  variable scope info object

                  -
                  interface VariableScopeInfo {
                      declarationCount: number;
                      globalScope: boolean;
                      node: AstDeclaration;
                      parent: Set<AstAtRule | AstRule>;
                      replaceable: boolean;
                      values: Token[];
                  }
                  Index

                  Properties

                  interface VariableScopeInfo {
                      declarationCount: number;
                      globalScope: boolean;
                      node: AstDeclaration;
                      parent: Set<AstAtRule | AstRule>;
                      replaceable: boolean;
                      values: Token[];
                  }
                  Index

                  Properties

                  declarationCount: number

                  declaration count

                  -
                  globalScope: boolean

                  global scope

                  -

                  declaration node

                  -
                  parent: Set<AstAtRule | AstRule>

                  parent nodes

                  -
                  replaceable: boolean

                  replaceable

                  -
                  values: Token[]

                  declaration values

                  -

                  Interface VisitorNodeMap

                  node visitor callback map

                  -
                  Index

                  Properties

                  Index

                  Properties

                  AtRule? Declaration? KeyframesAtRule? KeyframesRule? @@ -168,7 +168,7 @@

                  import {transform, AstAtRule, ParserOptions} from "@tbela99/css-parser";

                  const options: ParserOptions = {

                  visitor: {

                  AtRule: {

                  media: (node: AstAtRule): AstAtRule => {

                  node.val = 'tv,screen';
                  return node
                  }
                  }
                  }
                  };

                  const css = `

                  @media screen {

                  .foo {

                  height: calc(100px * 2/ 15);
                  }
                  }
                  `;

                  const result = await transform(css, options);

                  console.debug(result.code);

                  // @media tv,screen{.foo{height:calc(40px/3)}}
                  -

                  declaration visitor

                  +

                  declaration visitor

                  Example: add 'width: 3px' everytime a declaration with the name 'height' is found


                  import {transform, parseDeclarations} from "@tbela99/css-parser";

                  const options: ParserOptions = {

                  removeEmpty: false,
                  visitor: {

                  Declaration: {

                  // called only for height declaration
                  height: (node: AstDeclaration): AstDeclaration[] => {


                  return [
                  node,
                  {

                  typ: EnumToken.DeclarationNodeType,
                  nam: 'width',
                  val: [
                  <LengthToken>{
                  typ: EnumToken.LengthTokenType,
                  val: 3,
                  unit: 'px'
                  }
                  ]
                  }
                  ];
                  }
                  }
                  }
                  };

                  const css = `

                  .foo {
                  height: calc(100px * 2/ 15);
                  }
                  .selector {
                  color: lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180))
                  }
                  `;

                  console.debug(await transform(css, options));

                  // .foo{height:calc(40px/3);width:3px}.selector{color:#0880b0}
                  @@ -177,13 +177,13 @@
                  import {AstDeclaration, ParserOptions, transform} from "../src/node.ts";

                  const options: ParserOptions = {

                  visitor: {

                  // called for every declaration
                  Declaration: (node: AstDeclaration): null => {


                  if (node.nam == 'height') {

                  node.nam = 'width';
                  }

                  else if (node.nam == 'margin') {

                  node.nam = 'padding'
                  }

                  return null;
                  }
                  }
                  };

                  const css = `

                  .foo {
                  height: calc(100px * 2/ 15);
                  margin: 10px;
                  }
                  .selector {

                  margin: 20px;}
                  `;

                  const result = await transform(css, options);

                  console.debug(result.code);

                  // .foo{width:calc(40px/3);padding:10px}.selector{padding:20px}
                  -

                  rule visitor

                  +

                  rule visitor

                  Example: add 'width: 3px' to every rule with the selector '.foo'


                  import {transform, parseDeclarations} from "@tbela99/css-parser";

                  const options: ParserOptions = {

                  removeEmpty: false,
                  visitor: {

                  Rule: async (node: AstRule): Promise<AstRule | null> => {

                  if (node.sel == '.foo') {

                  node.chi.push(...await parseDeclarations('width: 3px'));
                  return node;
                  }

                  return null;
                  }
                  }
                  };

                  const css = `

                  .foo {
                  .foo {
                  }
                  }
                  `;

                  console.debug(await transform(css, options));

                  // .foo{width:3px;.foo{width:3px}}
                  -

                  value visitor

                  -

                  Interface WalkAttributesResult

                  interface WalkAttributesResult {
                      nextValue: null | Token;
                      parent:
                          | null
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken
                          | AstAtRule
                          | AstKeyframesAtRule
                          | AstKeyFrameRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstStyleSheet
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration;
                      previousValue: null
                      | Token;
                      root?:
                          | null
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken
                          | AstAtRule
                          | AstKeyframesAtRule
                          | AstKeyFrameRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstStyleSheet
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration;
                      value: Token;
                  }
                  Index

                  Properties

                  nextValue +

                  Interface WalkAttributesResult

                  interface WalkAttributesResult {
                      nextValue: Token | null;
                      parent: any;
                      previousValue: Token | null;
                      root?: any;
                      value: Token;
                  }
                  Index

                  Properties

                  nextValue: null | Token
                  parent:
                      | null
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                      | AstAtRule
                      | AstKeyframesAtRule
                      | AstKeyFrameRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstStyleSheet
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration
                  previousValue: null | Token
                  root?:
                      | null
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                      | AstAtRule
                      | AstKeyframesAtRule
                      | AstKeyFrameRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstStyleSheet
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration
                  value: Token

                  Interface WalkResult

                  interface WalkResult {
                      node: AstNode;
                      parent?: AstRuleList;
                      root?: AstNode;
                  }
                  Index

                  Properties

                  node +

                  Interface WalkResult

                  interface WalkResult {
                      node: any;
                      parent?: AstRuleList;
                      root?: any;
                  }
                  Index

                  Properties

                  Properties

                  node: AstNode
                  parent?: AstRuleList
                  root?: AstNode

                  Interface WhitespaceToken

                  Whitespace token

                  -
                  interface WhitespaceToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: WhitespaceTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface WhitespaceToken {
                      loc?: Location;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: WhitespaceTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  diff --git a/docs/media/node.AstAtRule.html b/docs/media/node.AstAtRule.html index 5e3c8785..0110b839 100644 --- a/docs/media/node.AstAtRule.html +++ b/docs/media/node.AstAtRule.html @@ -157,18 +157,18 @@ --md-sys-color-surface-container-highest: #e9e1d9 }

                  Interface AstAtRule

                  at rule node

                  -
                  interface AstAtRule {
                      chi?:
                          | (AstDeclaration | AstComment | AstInvalidDeclaration)[]
                          | (AstRule | AstComment)[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: AtRuleNodeType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstAtRule {
                      chi?:
                          | (AstDeclaration | AstComment | AstInvalidDeclaration)[]
                          | (AstRule | AstComment)[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: AtRuleNodeType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi?:
                      | (AstDeclaration | AstComment | AstInvalidDeclaration)[]
                      | (AstRule | AstComment)[]
                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstComment

                  comment node

                  -
                  interface AstComment {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: CommentTokenType | CDOCOMMTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstComment {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: CommentTokenType | CDOCOMMTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstDeclaration

                  declaration node

                  -
                  interface AstDeclaration {
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null;
                      typ: DeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstDeclaration {
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null;
                      typ: DeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: Token[]

                  Interface AstInvalidAtRule

                  invalid at rule node

                  -
                  interface AstInvalidAtRule {
                      chi?: AstNode[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: null | Token[];
                      typ: InvalidAtRuleTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstInvalidAtRule {
                      chi?: any[];
                      loc?: Location;
                      nam: string;
                      parent?: any;
                      tokens?: Token[] | null;
                      typ: InvalidAtRuleTokenType;
                      val: string;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi?: AstNode[]
                  loc?: Location

                  location info

                  -
                  nam: string
                  parent?: any

                  parent node

                  -
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: string

                  Interface AstInvalidDeclaration

                  invalid declaration node

                  -
                  interface AstInvalidDeclaration {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: InvalidDeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface AstInvalidDeclaration {
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: InvalidDeclarationNodeType;
                      val: Token[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -
                  val: Token[]

                  Interface AstInvalidRule

                  invalid rule node

                  -
                  interface AstInvalidRule {
                      chi: AstNode[];
                      loc?: Location;
                      parent?: any;
                      sel: string;
                      tokens?: null | Token[];
                      typ: InvalidRuleTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstInvalidRule {
                      chi: any[];
                      loc?: Location;
                      parent?: any;
                      sel: string;
                      tokens?: Token[] | null;
                      typ: InvalidRuleTokenType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi: AstNode[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  sel: string
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstRule

                  rule node

                  -
                  interface AstRule {
                      chi: (
                          | AstDeclaration
                          | AstAtRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration
                      )[];
                      loc?: Location;
                      optimized?: null
                      | OptimizedSelector;
                      parent?: any;
                      raw?: null | RawSelectorTokens;
                      sel: string;
                      tokens?: null | Token[];
                      typ: RuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstRule {
                      chi: (
                          | AstDeclaration
                          | AstAtRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration
                      )[];
                      loc?: Location;
                      optimized?: OptimizedSelector
                      | null;
                      parent?: any;
                      raw?: RawSelectorTokens | null;
                      sel: string;
                      tokens?: Token[] | null;
                      typ: RuleNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi loc? optimized? parent? @@ -165,11 +165,11 @@ sel tokens? typ -

                  Properties

                  chi: (
                      | AstDeclaration
                      | AstAtRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration
                  )[]
                  loc?: Location

                  location info

                  -
                  optimized?: null | OptimizedSelector
                  parent?: any

                  parent node

                  -
                  raw?: null | RawSelectorTokens
                  sel: string
                  tokens?: null | Token[]

                  prelude or selector tokens

                  -

                  token type

                  -

                  Interface AstStyleSheet

                  stylesheet node

                  -
                  interface AstStyleSheet {
                      chi: any[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: StyleSheetNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  chi +
                  interface AstStyleSheet {
                      chi: any[];
                      loc?: Location;
                      parent?: any;
                      tokens?: null;
                      typ: StyleSheetNodeType;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  Properties

                  chi: any[]
                  loc?: Location

                  location info

                  -
                  parent?: any

                  parent node

                  -
                  tokens?: null

                  prelude or selector tokens

                  -

                  token type

                  -

                  Enumeration EnumToken

                  enum of all token types

                  -
                  Index

                  Enumeration Members

                  Add +
                  Index

                  Enumeration Members

                  Add: 60

                  addition token type

                  -
                  Angle: 24

                  alias for angle token type

                  -
                  AngleTokenType: 24

                  angle token type

                  -
                  AtRuleNodeType: 3

                  at-rule node type

                  -
                  AtRuleTokenType: 13

                  at-rule token type

                  -
                  AttrEndTokenType: 32

                  attribute end token type

                  -
                  AttrStartTokenType: 31

                  attribute start token type

                  -
                  AttrTokenType: 51

                  attribute token type

                  -
                  BadCdoTokenType: 53

                  bad cdo token type

                  -
                  BadCommentTokenType: 52

                  bad comment token type

                  -
                  BadStringTokenType: 55

                  bad string token type

                  -
                  BadUrlTokenType: 54

                  bad URL token type

                  -
                  BinaryExpressionTokenType: 56

                  binary expression token type

                  -
                  BlockEndTokenType: 30

                  block end token type

                  -
                  BlockStartTokenType: 29

                  block start token type

                  -
                  CDOCOMMNodeType: 1

                  alias for cdata section node type

                  -
                  CDOCOMMTokenType: 1

                  cdata section token

                  -
                  ChildCombinatorTokenType: 76

                  child combinator token type

                  -
                  ClassSelectorTokenType: 74

                  class selector token type

                  -
                  ColonTokenType: 10

                  colon token type

                  -
                  Color: 50

                  alias for color token type

                  -
                  ColorTokenType: 50

                  color token type

                  -
                  ColumnCombinatorTokenType: 64

                  column combinator token type

                  -
                  Comma: 9

                  alias for comma token type

                  -
                  CommaTokenType: 9

                  comma token type

                  -
                  Comment: 0

                  alias for comment token type

                  -
                  CommentNodeType: 0

                  alias for comment node type

                  -
                  CommentTokenType: 0

                  comment token

                  -
                  ContainMatchTokenType: 65

                  contain match token type

                  -
                  DashedIden: 8

                  alias for dashed identifier token type

                  -
                  DashedIdenTokenType: 8

                  dashed identifier token type

                  -
                  DashMatchTokenType: 38

                  dash match token type

                  -
                  DeclarationNodeType: 5

                  declaration node type

                  -
                  DelimTokenType: 46

                  delimiter token type

                  -
                  DescendantCombinatorTokenType: 77

                  descendant combinator token type

                  -
                  Dimension: 22

                  alias for dimension token type

                  -
                  DimensionTokenType: 22

                  dimension token type

                  -
                  Div: 62

                  division token type

                  -
                  EndMatchTokenType: 67

                  end match token type

                  -
                  EndParensTokenType: 34

                  end parentheses token type

                  -
                  EOF: 48

                  alias for end of file token type

                  -
                  EOFTokenType: 48

                  end of file token type

                  -
                  EqualMatchTokenType: 39

                  equal match token type

                  -
                  Flex: 58

                  alias for flex token type

                  -
                  FlexTokenType: 58

                  flex token type

                  -
                  FractionTokenType: 70

                  fraction token type

                  -
                  Frequency: 26

                  alias for frequency token type

                  -
                  FrequencyTokenType: 26

                  frequency token type

                  -
                  FunctionTokenType: 15

                  function token type

                  -
                  GridTemplateFunc: 72

                  alias for grid template function token type

                  -
                  GridTemplateFuncTokenType: 72

                  grid template function token type

                  -
                  GteTokenType: 43

                  greater than or equal to token type

                  -
                  GtTokenType: 42

                  greater than token type

                  -
                  Hash: 28

                  alias for hash token type

                  -
                  HashTokenType: 28

                  hash token type

                  -
                  Iden: 7

                  alias for identifier token type

                  -
                  IdenList: 71

                  alias for identifier list token type

                  -
                  IdenListTokenType: 71

                  identifier list token type

                  -
                  IdenTokenType: 7

                  identifier token type

                  -
                  ImageFunc: 19

                  alias for image function token type

                  -
                  ImageFunctionTokenType: 19

                  image function token type

                  -
                  ImportantTokenType: 49

                  important token type

                  -
                  IncludeMatchTokenType: 37

                  include match token type

                  -
                  InvalidAtRuleTokenType: 84

                  invalid at rule token type

                  -
                  InvalidAttrTokenType: 83

                  invalid attribute token type

                  -
                  InvalidClassSelectorTokenType: 82

                  invalid class selector token type

                  -
                  InvalidDeclarationNodeType: 94

                  invalid declaration node type

                  -
                  InvalidRuleTokenType: 81

                  invalid rule token type

                  -
                  KeyframesAtRuleNodeType: 93

                  keyframe at rule node type

                  -
                  KeyFramesRuleNodeType: 73

                  keyframe rule node type

                  -
                  Length: 23

                  alias for length token type

                  -
                  LengthTokenType: 23

                  length token type

                  -
                  ListToken: 59

                  token list token type

                  -
                  Literal: 6

                  alias for literal token type

                  -
                  LiteralTokenType: 6

                  literal token type

                  -
                  LteTokenType: 41

                  less than or equal to token type

                  -
                  LtTokenType: 40

                  less than token type

                  -
                  MatchExpressionTokenType: 68

                  match expression token type

                  -
                  MediaFeatureAndTokenType: 89

                  media feature and token type

                  -
                  MediaFeatureNotTokenType: 88

                  media feature not token type

                  -
                  MediaFeatureOnlyTokenType: 87

                  media feature only token type

                  -
                  MediaFeatureOrTokenType: 90

                  media feature or token type

                  -
                  MediaFeatureTokenType: 86

                  media feature token type

                  -
                  MediaQueryConditionTokenType: 85

                  media query condition token type

                  -
                  Mul: 61

                  multiplication token type

                  -
                  NameSpaceAttributeTokenType: 69

                  namespace attribute token type

                  -
                  NestingSelectorTokenType: 80

                  nesting selector token type

                  -
                  NextSiblingCombinatorTokenType: 78

                  next sibling combinator token type

                  -
                  Number: 12

                  alias for number token type

                  -
                  NumberTokenType: 12

                  number token type

                  -
                  ParensTokenType: 35

                  parentheses token type

                  -
                  Perc: 14

                  alias for percentage token type

                  -
                  PercentageTokenType: 14

                  percentage token type

                  -
                  PseudoClassFuncTokenType: 45

                  pseudo-class function token type

                  -
                  PseudoClassTokenType: 44

                  pseudo-class token type

                  -
                  PseudoElementTokenType: 92

                  pseudo element token type

                  -
                  PseudoPageTokenType: 91

                  pseudo page token type

                  -
                  Resolution: 27

                  alias for resolution token type

                  -
                  ResolutionTokenType: 27

                  resolution token type

                  -
                  RuleNodeType: 4

                  rule node type

                  -
                  SemiColonTokenType: 11

                  semicolon token type

                  -
                  StartMatchTokenType: 66

                  start match token type

                  -
                  StartParensTokenType: 33

                  start parentheses token type

                  -
                  String: 20

                  alias for string token type

                  -
                  StringTokenType: 20

                  string token type

                  -
                  StyleSheetNodeType: 2

                  style sheet node type

                  -
                  Sub: 63

                  subtraction token type

                  -
                  SubsequentSiblingCombinatorTokenType: 79

                  subsequent sibling combinator token type

                  -
                  Time: 25

                  alias for time token type

                  -
                  TimelineFunction: 16

                  alias for timeline function token type

                  -
                  TimelineFunctionTokenType: 16

                  timeline function token type

                  -
                  TimeTokenType: 25

                  time token type

                  -
                  TimingFunction: 17

                  alias for timing function token type

                  -
                  TimingFunctionTokenType: 17

                  timing function token type

                  -
                  UnaryExpressionTokenType: 57

                  unary expression token type

                  -
                  UnclosedStringTokenType: 21

                  unclosed string token type

                  -
                  UniversalSelectorTokenType: 75

                  universal selector token type

                  -
                  UrlFunc: 18

                  alias for url function token type

                  -
                  UrlFunctionTokenType: 18

                  url function token type

                  -
                  UrlTokenTokenType: 47

                  URL token type

                  -
                  Whitespace: 36

                  alias for whitespace token type

                  -
                  WhitespaceTokenType: 36

                  whitespace token type

                  -

                  Interface ErrorDescription

                  error description

                  -
                  interface ErrorDescription {
                      action: "drop" | "ignore";
                      error?: Error;
                      location?: Location;
                      message: string;
                      node?:
                          | null
                          | ColorToken
                          | InvalidClassSelectorToken
                          | InvalidAttrToken
                          | LiteralToken
                          | IdentToken
                          | IdentListToken
                          | DashedIdentToken
                          | CommaToken
                          | ColonToken
                          | SemiColonToken
                          | ClassSelectorToken
                          | UniversalSelectorToken
                          | ChildCombinatorToken
                          | DescendantCombinatorToken
                          | NextSiblingCombinatorToken
                          | SubsequentCombinatorToken
                          | ColumnCombinatorToken
                          | NestingSelectorToken
                          | MediaQueryConditionToken
                          | MediaFeatureToken
                          | MediaFeatureNotToken
                          | MediaFeatureOnlyToken
                          | MediaFeatureAndToken
                          | MediaFeatureOrToken
                          | AstDeclaration
                          | NumberToken
                          | AtRuleToken
                          | PercentageToken
                          | FlexToken
                          | FunctionURLToken
                          | FunctionImageToken
                          | TimingFunctionToken
                          | TimelineFunctionToken
                          | FunctionToken
                          | GridTemplateFuncToken
                          | DimensionToken
                          | LengthToken
                          | AngleToken
                          | StringToken
                          | TimeToken
                          | FrequencyToken
                          | ResolutionToken
                          | UnclosedStringToken
                          | HashToken
                          | BadStringToken
                          | BlockStartToken
                          | BlockEndToken
                          | AttrStartToken
                          | AttrEndToken
                          | ParensStartToken
                          | ParensEndToken
                          | ParensToken
                          | CDOCommentToken
                          | BadCDOCommentToken
                          | CommentToken
                          | BadCommentToken
                          | WhitespaceToken
                          | IncludeMatchToken
                          | StartMatchToken
                          | EndMatchToken
                          | ContainMatchToken
                          | MatchExpressionToken
                          | NameSpaceAttributeToken
                          | DashMatchToken
                          | EqualMatchToken
                          | LessThanToken
                          | LessThanOrEqualToken
                          | GreaterThanToken
                          | GreaterThanOrEqualToken
                          | ListToken
                          | PseudoClassToken
                          | PseudoPageToken
                          | PseudoElementToken
                          | PseudoClassFunctionToken
                          | DelimToken
                          | BinaryExpressionToken
                          | UnaryExpression
                          | FractionToken
                          | AddToken
                          | SubToken
                          | DivToken
                          | MulToken
                          | BadUrlToken
                          | UrlToken
                          | ImportantToken
                          | AttrToken
                          | EOFToken
                          | AstAtRule
                          | AstKeyframesAtRule
                          | AstKeyFrameRule
                          | AstInvalidRule
                          | AstInvalidAtRule
                          | AstStyleSheet
                          | AstRule
                          | AstComment
                          | AstInvalidDeclaration;
                      rawTokens?: TokenizeResult[];
                      syntax?: null
                      | string;
                  }
                  Index

                  Properties

                  interface ErrorDescription {
                      action: "drop" | "ignore";
                      error?: Error;
                      location?: Location;
                      message: string;
                      node?: any;
                      rawTokens?: TokenizeResult[];
                      syntax?: string | null;
                  }
                  Index

                  Properties

                  Properties

                  action: "drop" | "ignore"

                  drop rule or declaration

                  -
                  error?: Error

                  error object

                  -
                  location?: Location

                  error location

                  -
                  message: string

                  error message

                  -
                  node?:
                      | null
                      | ColorToken
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | AttrToken
                      | EOFToken
                      | AstAtRule
                      | AstKeyframesAtRule
                      | AstKeyFrameRule
                      | AstInvalidRule
                      | AstInvalidAtRule
                      | AstStyleSheet
                      | AstRule
                      | AstComment
                      | AstInvalidDeclaration

                  error node

                  -
                  rawTokens?: TokenizeResult[]

                  raw tokens

                  -
                  syntax?: null | string

                  syntax error description

                  -

                  Interface ParseResult

                  parse result object

                  -
                  interface ParseResult {
                      ast: AstStyleSheet;
                      errors: ErrorDescription[];
                      stats: ParseResultStats;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  ast +
                  interface ParseResult {
                      ast: AstStyleSheet;
                      cssModuleVariables?: Record<string, CssVariableToken>;
                      errors: ErrorDescription[];
                      importMapping?: Record<string, Record<string, string>>;
                      mapping?: Record<string, string>;
                      stats: ParseResultStats;
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  parsed ast tree

                  -

                  parse errors

                  -

                  parse stats

                  -

                  Interface ParserOptions

                  parser options

                  -
                  interface ParserOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeCharset?: boolean;
                      removeDuplicateDeclarations?: string | boolean | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  interface ParserOptions {
                      computeCalcExpression?: boolean;
                      computeShorthand?: boolean;
                      computeTransform?: boolean;
                      cwd?: string;
                      expandNestingRules?: boolean;
                      inlineCssVariables?: boolean;
                      lenient?: boolean;
                      load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult;
                      minify?: boolean;
                      module?:
                          | boolean
                          | ModuleCaseTransformEnum
                          | ModuleScopeEnumOptions
                          | ModuleOptions;
                      nestingRules?: boolean;
                      parseColor?: boolean;
                      pass?: number;
                      removeCharset?: boolean;
                      removeDuplicateDeclarations?: string
                      | boolean
                      | string[];
                      removeEmpty?: boolean;
                      removePrefix?: boolean;
                      resolve?: (
                          url: string,
                          currentUrl: string,
                          currentWorkingDirectory?: string,
                      ) => { absolute: string; relative: string };
                      resolveImport?: boolean;
                      resolveUrls?: boolean;
                      signal?: AbortSignal;
                      sourcemap?: boolean | "inline";
                      src?: string;
                      validation?: boolean | ValidationLevel;
                      visitor?: VisitorNodeMap | VisitorNodeMap[];
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  computeCalcExpression?: boolean

                  compute math functions see supported functions mathFuncs

                  -
                  computeShorthand?: boolean

                  compute shorthand properties

                  -
                  computeTransform?: boolean

                  compute transform functions +

                  computeShorthand?: boolean

                  compute shorthand properties

                  +
                  computeTransform?: boolean

                  compute transform functions see supported functions transformFunctions

                  -
                  cwd?: string

                  current working directory

                  -
                  expandNestingRules?: boolean

                  expand nested rules

                  -
                  inlineCssVariables?: boolean

                  inline css variables

                  -
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  -
                  load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult

                  url and file loader

                  -
                  minify?: boolean

                  enable minification

                  -
                  nestingRules?: boolean

                  generate nested rules

                  -
                  parseColor?: boolean

                  parse color tokens

                  -
                  pass?: number

                  define minification passes.

                  -
                  removeCharset?: boolean

                  remove at-rule charset

                  -
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array

                  +
                  cwd?: string

                  current working directory

                  +
                  expandNestingRules?: boolean

                  expand nested rules

                  +
                  inlineCssVariables?: boolean

                  inline css variables

                  +
                  lenient?: boolean

                  lenient validation. retain nodes that failed validation

                  +
                  load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult

                  url and file loader

                  +
                  minify?: boolean

                  enable minification

                  +
                  module?:
                      | boolean
                      | ModuleCaseTransformEnum
                      | ModuleScopeEnumOptions
                      | ModuleOptions

                  css modules options

                  +
                  nestingRules?: boolean

                  generate nested rules

                  +
                  parseColor?: boolean

                  parse color tokens

                  +
                  pass?: number

                  define minification passes.

                  +
                  removeCharset?: boolean

                  remove at-rule charset

                  +
                  removeDuplicateDeclarations?: string | boolean | string[]

                  remove duplicate declarations from the same rule. if passed as a string array, duplicated declarations are removed, except for those in the array


                  import {transform} from '@tbela99/css-parser';

                  const css = `

                  .table {

                  width: 100%;
                  width: calc(100% + 40px);
                  margin-left: 20px;
                  margin-left: min(100% , 20px)
                  }

                  `;
                  const result = await transform(css, {

                  beautify: true,
                  validation: true,
                  removeDuplicateDeclarations: ['width']
                  }
                  );

                  console.log(result.code);
                  -
                  removeEmpty?: boolean

                  remove empty ast nodes

                  -
                  removePrefix?: boolean

                  remove css prefix

                  -
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  -
                  resolveImport?: boolean

                  resolve import

                  -
                  resolveUrls?: boolean

                  resolve urls

                  -
                  signal?: AbortSignal

                  abort signal

                  +
                  removeEmpty?: boolean

                  remove empty ast nodes

                  +
                  removePrefix?: boolean

                  remove css prefix

                  +
                  resolve?: (
                      url: string,
                      currentUrl: string,
                      currentWorkingDirectory?: string,
                  ) => { absolute: string; relative: string }

                  url and path resolver

                  +
                  resolveImport?: boolean

                  resolve import

                  +
                  resolveUrls?: boolean

                  resolve urls

                  +
                  signal?: AbortSignal

                  abort signal

                  Example: abort after 10 seconds


                  const result = await parse(cssString, {
                  signal: AbortSignal.timeout(10000)
                  });
                  -
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  -
                  src?: string

                  source file to be used for sourcemap

                  -
                  validation?: boolean | ValidationLevel

                  enable css validation

                  +
                  sourcemap?: boolean | "inline"

                  include sourcemap in the ast. sourcemap info is always generated

                  +
                  src?: string

                  source file to be used for sourcemap

                  +
                  validation?: boolean | ValidationLevel

                  enable css validation

                  see ValidationLevel

                  -

                  node visitor +

                  node visitor VisitorNodeMap[]

                  -

                  Type Alias Token

                  Token:
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | ColorToken
                      | AttrToken
                      | EOFToken

                  Token

                  -

                  Type Alias Token

                  Token:
                      | InvalidClassSelectorToken
                      | InvalidAttrToken
                      | LiteralToken
                      | IdentToken
                      | IdentListToken
                      | DashedIdentToken
                      | CommaToken
                      | ColonToken
                      | SemiColonToken
                      | ClassSelectorToken
                      | UniversalSelectorToken
                      | ChildCombinatorToken
                      | DescendantCombinatorToken
                      | NextSiblingCombinatorToken
                      | SubsequentCombinatorToken
                      | ColumnCombinatorToken
                      | NestingSelectorToken
                      | MediaQueryConditionToken
                      | MediaFeatureToken
                      | MediaFeatureNotToken
                      | MediaFeatureOnlyToken
                      | MediaFeatureAndToken
                      | MediaFeatureOrToken
                      | AstDeclaration
                      | NumberToken
                      | AtRuleToken
                      | PercentageToken
                      | FlexToken
                      | FunctionURLToken
                      | FunctionImageToken
                      | TimingFunctionToken
                      | TimelineFunctionToken
                      | FunctionToken
                      | GridTemplateFuncToken
                      | DimensionToken
                      | LengthToken
                      | AngleToken
                      | StringToken
                      | TimeToken
                      | FrequencyToken
                      | ResolutionToken
                      | UnclosedStringToken
                      | HashToken
                      | BadStringToken
                      | BlockStartToken
                      | BlockEndToken
                      | AttrStartToken
                      | AttrEndToken
                      | ParensStartToken
                      | ParensEndToken
                      | ParensToken
                      | CDOCommentToken
                      | BadCDOCommentToken
                      | CommentToken
                      | BadCommentToken
                      | WhitespaceToken
                      | IncludeMatchToken
                      | StartMatchToken
                      | EndMatchToken
                      | ContainMatchToken
                      | MatchExpressionToken
                      | NameSpaceAttributeToken
                      | ComposesSelectorToken
                      | CssVariableToken
                      | DashMatchToken
                      | EqualMatchToken
                      | LessThanToken
                      | LessThanOrEqualToken
                      | GreaterThanToken
                      | GreaterThanOrEqualToken
                      | ListToken
                      | PseudoClassToken
                      | PseudoPageToken
                      | PseudoElementToken
                      | PseudoClassFunctionToken
                      | DelimToken
                      | BinaryExpressionToken
                      | UnaryExpression
                      | FractionToken
                      | AddToken
                      | SubToken
                      | DivToken
                      | MulToken
                      | BadUrlToken
                      | UrlToken
                      | ImportantToken
                      | ColorToken
                      | AttrToken
                      | EOFToken

                  Token

                  +

                  Interface TransformResult

                  transform result object

                  -
                  interface TransformResult {
                      ast: AstStyleSheet;
                      code: string;
                      errors: ErrorDescription[];
                      map?: SourceMap;
                      stats: {
                          bytesIn: number;
                          bytesOut: number;
                          importedBytesIn: number;
                          imports: ParseResultStats[];
                          minify: string;
                          parse: string;
                          render: string;
                          src: string;
                          total: string;
                      };
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  ast +
                  interface TransformResult {
                      ast: AstStyleSheet;
                      code: string;
                      cssModuleVariables?: Record<string, CssVariableToken>;
                      errors: ErrorDescription[];
                      importMapping?: Record<string, Record<string, string>>;
                      map?: SourceMap;
                      mapping?: Record<string, string>;
                      stats: {
                          bytesIn: number;
                          bytesOut: number;
                          importedBytesIn: number;
                          imports: ParseResultStats[];
                          minify: string;
                          parse: string;
                          render: string;
                          src: string;
                          total: string;
                      };
                  }

                  Hierarchy (View Summary)

                  Index

                  Properties

                  parsed ast tree

                  -
                  code: string

                  rendered css

                  -

                  parse errors

                  -
                  map?: SourceMap

                  source map

                  -
                  stats: {
                      bytesIn: number;
                      bytesOut: number;
                      importedBytesIn: number;
                      imports: ParseResultStats[];
                      minify: string;
                      parse: string;
                      render: string;
                      src: string;
                      total: string;
                  }

                  transform stats

                  +
                  code: string

                  rendered css

                  +
                  cssModuleVariables?: Record<string, CssVariableToken>

                  parse errors

                  +
                  importMapping?: Record<string, Record<string, string>>
                  map?: SourceMap

                  source map

                  +
                  mapping?: Record<string, string>

                  css module mapping

                  +
                  stats: {
                      bytesIn: number;
                      bytesOut: number;
                      importedBytesIn: number;
                      imports: ParseResultStats[];
                      minify: string;
                      parse: string;
                      render: string;
                      src: string;
                      total: string;
                  }

                  transform stats

                  Type Declaration

                  • bytesIn: number

                    bytes read

                  • bytesOut: number

                    generated css size

                  • importedBytesIn: number

                    bytes read from imported files

                    @@ -176,7 +180,7 @@
                  • render: string

                    render time

                  • src: string

                    source file

                  • total: string

                    total time

                    -

                  Enumeration ValidationLevel

                  enum of validation levels

                  -
                  Index

                  Enumeration Members

                  All +
                  Index

                  Enumeration Members

                  All: 7

                  validate selectors, at-rules and declarations

                  -
                  AtRule: 2

                  validate at-rules

                  -
                  Declaration: 4

                  validate declarations

                  -
                  Default: 3

                  validate selectors and at-rules

                  -
                  None: 0

                  disable validation

                  -
                  Selector: 1

                  validate selectors

                  -

                  Enumeration ValidationLevel

                  enum of validation levels

                  -
                  Index

                  Enumeration Members

                  All +
                  Index

                  Enumeration Members

                  All: 7

                  validate selectors, at-rules and declarations

                  -
                  AtRule: 2

                  validate at-rules

                  -
                  Declaration: 4

                  validate declarations

                  -
                  Default: 3

                  validate selectors and at-rules

                  -
                  None: 0

                  disable validation

                  -
                  Selector: 1

                  validate selectors

                  -

                  Interface VisitorNodeMap

                  node visitor callback map

                  -
                  Index

                  Properties

                  Index

                  Properties

                  AtRule? Declaration? KeyframesAtRule? KeyframesRule? @@ -168,7 +168,7 @@

                  import {transform, AstAtRule, ParserOptions} from "@tbela99/css-parser";

                  const options: ParserOptions = {

                  visitor: {

                  AtRule: {

                  media: (node: AstAtRule): AstAtRule => {

                  node.val = 'tv,screen';
                  return node
                  }
                  }
                  }
                  };

                  const css = `

                  @media screen {

                  .foo {

                  height: calc(100px * 2/ 15);
                  }
                  }
                  `;

                  const result = await transform(css, options);

                  console.debug(result.code);

                  // @media tv,screen{.foo{height:calc(40px/3)}}
                  -

                  declaration visitor

                  +

                  declaration visitor

                  Example: add 'width: 3px' everytime a declaration with the name 'height' is found


                  import {transform, parseDeclarations} from "@tbela99/css-parser";

                  const options: ParserOptions = {

                  removeEmpty: false,
                  visitor: {

                  Declaration: {

                  // called only for height declaration
                  height: (node: AstDeclaration): AstDeclaration[] => {


                  return [
                  node,
                  {

                  typ: EnumToken.DeclarationNodeType,
                  nam: 'width',
                  val: [
                  <LengthToken>{
                  typ: EnumToken.LengthTokenType,
                  val: 3,
                  unit: 'px'
                  }
                  ]
                  }
                  ];
                  }
                  }
                  }
                  };

                  const css = `

                  .foo {
                  height: calc(100px * 2/ 15);
                  }
                  .selector {
                  color: lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180))
                  }
                  `;

                  console.debug(await transform(css, options));

                  // .foo{height:calc(40px/3);width:3px}.selector{color:#0880b0}
                  @@ -177,13 +177,13 @@
                  import {AstDeclaration, ParserOptions, transform} from "../src/node.ts";

                  const options: ParserOptions = {

                  visitor: {

                  // called for every declaration
                  Declaration: (node: AstDeclaration): null => {


                  if (node.nam == 'height') {

                  node.nam = 'width';
                  }

                  else if (node.nam == 'margin') {

                  node.nam = 'padding'
                  }

                  return null;
                  }
                  }
                  };

                  const css = `

                  .foo {
                  height: calc(100px * 2/ 15);
                  margin: 10px;
                  }
                  .selector {

                  margin: 20px;}
                  `;

                  const result = await transform(css, options);

                  console.debug(result.code);

                  // .foo{width:calc(40px/3);padding:10px}.selector{padding:20px}
                  -

                  rule visitor

                  +

                  rule visitor

                  Example: add 'width: 3px' to every rule with the selector '.foo'


                  import {transform, parseDeclarations} from "@tbela99/css-parser";

                  const options: ParserOptions = {

                  removeEmpty: false,
                  visitor: {

                  Rule: async (node: AstRule): Promise<AstRule | null> => {

                  if (node.sel == '.foo') {

                  node.chi.push(...await parseDeclarations('width: 3px'));
                  return node;
                  }

                  return null;
                  }
                  }
                  };

                  const css = `

                  .foo {
                  .foo {
                  }
                  }
                  `;

                  console.debug(await transform(css, options));

                  // .foo{width:3px;.foo{width:3px}}
                  -

                  value visitor

                  -

                  Type Alias WalkerOption

                  WalkerOption: WalkerOptionEnum | AstNode | Token | null

                  node walker option

                  -

                  Module node

                  Functions

                  parse
                  parseDeclarations
                  parseFile
                  render
                  transform
                  transformFile
                  walk
                  walkValues

                  Classes

                  SourceMap

                  Enumerations

                  ColorType
                  EnumToken
                  FeatureWalkMode
                  ValidationLevel
                  WalkerEvent
                  WalkerOptionEnum

                  Interfaces

                  AddToken
                  AngleToken
                  AstAtRule
                  AstComment
                  AstDeclaration
                  AstInvalidAtRule
                  AstInvalidDeclaration
                  AstInvalidRule
                  AstKeyFrameRule
                  AstKeyframesAtRule
                  AstKeyframesRule
                  AstRule
                  AstStyleSheet
                  AtRuleToken
                  AttrEndToken
                  AttrStartToken
                  AttrToken
                  BadCDOCommentToken
                  BadCommentToken
                  BadStringToken
                  BadUrlToken
                  BaseToken
                  BinaryExpressionToken
                  BlockEndToken
                  BlockStartToken
                  CDOCommentToken
                  ChildCombinatorToken
                  ClassSelectorToken
                  ColonToken
                  ColorToken
                  ColumnCombinatorToken
                  CommaToken
                  CommentToken
                  ContainMatchToken
                  Context
                  DashedIdentToken
                  DashMatchToken
                  DelimToken
                  DescendantCombinatorToken
                  DimensionToken
                  DivToken
                  EndMatchToken
                  EOFToken
                  EqualMatchToken
                  ErrorDescription
                  FlexToken
                  FractionToken
                  FrequencyToken
                  FunctionImageToken
                  FunctionToken
                  FunctionURLToken
                  GreaterThanOrEqualToken
                  GreaterThanToken
                  GridTemplateFuncToken
                  HashToken
                  IdentListToken
                  IdentToken
                  ImportantToken
                  IncludeMatchToken
                  InvalidAttrToken
                  InvalidClassSelectorToken
                  LengthToken
                  LessThanOrEqualToken
                  LessThanToken
                  ListToken
                  LiteralToken
                  Location
                  MatchedSelector
                  MatchExpressionToken
                  MediaFeatureAndToken
                  MediaFeatureNotToken
                  MediaFeatureOnlyToken
                  MediaFeatureOrToken
                  MediaFeatureToken
                  MediaQueryConditionToken
                  MinifyFeature
                  MinifyFeatureOptions
                  MinifyOptions
                  MulToken
                  NameSpaceAttributeToken
                  NestingSelectorToken
                  NextSiblingCombinatorToken
                  NumberToken
                  ParensEndToken
                  ParensStartToken
                  ParensToken
                  ParseInfo
                  ParseResult
                  ParseResultStats
                  ParserOptions
                  ParseTokenOptions
                  PercentageToken
                  Position
                  PropertyListOptions
                  PropertyMapType
                  PropertySetType
                  PropertyType
                  PseudoClassFunctionToken
                  PseudoClassToken
                  PseudoElementToken
                  PseudoPageToken
                  RenderOptions
                  RenderResult
                  ResolutionToken
                  ResolvedPath
                  SemiColonToken
                  ShorthandDef
                  ShorthandMapType
                  ShorthandProperties
                  ShorthandPropertyType
                  ShorthandType
                  SourceMapObject
                  StartMatchToken
                  StringToken
                  SubsequentCombinatorToken
                  SubToken
                  TimelineFunctionToken
                  TimeToken
                  TimingFunctionToken
                  TokenizeResult
                  TransformOptions
                  TransformResult
                  UnaryExpression
                  UnclosedStringToken
                  UniversalSelectorToken
                  UrlToken
                  ValidationConfiguration
                  ValidationOptions
                  ValidationResult
                  ValidationSelectorOptions
                  ValidationSyntaxNode
                  ValidationSyntaxResult
                  VariableScopeInfo
                  VisitorNodeMap
                  WalkAttributesResult
                  WalkResult
                  WhitespaceToken

                  Type Aliases

                  AstNode
                  AstRuleList
                  AtRuleVisitorHandler
                  BinaryExpressionNode
                  DeclarationVisitorHandler
                  GenericVisitorAstNodeHandlerMap
                  GenericVisitorHandler
                  GenericVisitorResult
                  LoadResult
                  RawSelectorTokens
                  RuleVisitorHandler
                  Token
                  UnaryExpressionNode
                  ValueVisitorHandler
                  WalkerFilter
                  WalkerOption
                  WalkerValueFilter

                  Variables

                  mathFuncs
                  transformFunctions

                  Module node

                  Functions

                  parse
                  parseDeclarations
                  parseFile
                  render
                  transform
                  transformFile
                  walk
                  walkValues

                  Classes

                  SourceMap

                  Enumerations

                  ColorType
                  EnumToken
                  ModuleCaseTransformEnum
                  ModuleScopeEnumOptions
                  ResponseType
                  ValidationLevel
                  WalkerEvent
                  WalkerOptionEnum

                  Interfaces

                  AddToken
                  AngleToken
                  AstAtRule
                  AstComment
                  AstDeclaration
                  AstInvalidAtRule
                  AstInvalidDeclaration
                  AstInvalidRule
                  AstKeyFrameRule
                  AstKeyframesAtRule
                  AstKeyframesRule
                  AstRule
                  AstStyleSheet
                  AtRuleToken
                  AttrEndToken
                  AttrStartToken
                  AttrToken
                  BadCDOCommentToken
                  BadCommentToken
                  BadStringToken
                  BadUrlToken
                  BaseToken
                  BinaryExpressionToken
                  BlockEndToken
                  BlockStartToken
                  CDOCommentToken
                  ChildCombinatorToken
                  ClassSelectorToken
                  ColonToken
                  ColorToken
                  ColumnCombinatorToken
                  CommaToken
                  CommentToken
                  ComposesSelectorToken
                  ContainMatchToken
                  Context
                  CssVariableImportTokenType
                  CssVariableMapTokenType
                  CssVariableToken
                  DashedIdentToken
                  DashMatchToken
                  DelimToken
                  DescendantCombinatorToken
                  DimensionToken
                  DivToken
                  EndMatchToken
                  EOFToken
                  EqualMatchToken
                  ErrorDescription
                  FlexToken
                  FractionToken
                  FrequencyToken
                  FunctionImageToken
                  FunctionToken
                  FunctionURLToken
                  GreaterThanOrEqualToken
                  GreaterThanToken
                  GridTemplateFuncToken
                  HashToken
                  IdentListToken
                  IdentToken
                  ImportantToken
                  IncludeMatchToken
                  InvalidAttrToken
                  InvalidClassSelectorToken
                  LengthToken
                  LessThanOrEqualToken
                  LessThanToken
                  ListToken
                  LiteralToken
                  Location
                  MatchedSelector
                  MatchExpressionToken
                  MediaFeatureAndToken
                  MediaFeatureNotToken
                  MediaFeatureOnlyToken
                  MediaFeatureOrToken
                  MediaFeatureToken
                  MediaQueryConditionToken
                  MinifyFeature
                  MinifyFeatureOptions
                  MinifyOptions
                  ModuleOptions
                  MulToken
                  NameSpaceAttributeToken
                  NestingSelectorToken
                  NextSiblingCombinatorToken
                  NumberToken
                  ParensEndToken
                  ParensStartToken
                  ParensToken
                  ParseInfo
                  ParseResult
                  ParseResultStats
                  ParserOptions
                  ParseTokenOptions
                  PercentageToken
                  Position
                  PropertyListOptions
                  PropertyMapType
                  PropertySetType
                  PropertyType
                  PseudoClassFunctionToken
                  PseudoClassToken
                  PseudoElementToken
                  PseudoPageToken
                  RenderOptions
                  RenderResult
                  ResolutionToken
                  ResolvedPath
                  SemiColonToken
                  ShorthandDef
                  ShorthandMapType
                  ShorthandProperties
                  ShorthandPropertyType
                  ShorthandType
                  SourceMapObject
                  StartMatchToken
                  StringToken
                  SubsequentCombinatorToken
                  SubToken
                  TimelineFunctionToken
                  TimeToken
                  TimingFunctionToken
                  TokenizeResult
                  TransformOptions
                  TransformResult
                  UnaryExpression
                  UnclosedStringToken
                  UniversalSelectorToken
                  UrlToken
                  ValidationConfiguration
                  ValidationOptions
                  ValidationResult
                  ValidationSelectorOptions
                  ValidationSyntaxNode
                  ValidationSyntaxResult
                  VariableScopeInfo
                  VisitorNodeMap
                  WalkAttributesResult
                  WalkResult
                  WhitespaceToken

                  Type Aliases

                  AstNode
                  AstRuleList
                  AtRuleVisitorHandler
                  BinaryExpressionNode
                  DeclarationVisitorHandler
                  GenericVisitorAstNodeHandlerMap
                  GenericVisitorHandler
                  GenericVisitorResult
                  LoadResult
                  RawSelectorTokens
                  RuleVisitorHandler
                  Token
                  UnaryExpressionNode
                  ValueVisitorHandler
                  WalkerFilter
                  WalkerOption
                  WalkerValueFilter

                  Variables

                  mathFuncs
                  transformFunctions

                  Function walk

                  • walk ast nodes

                    -

                    Parameters

                    • node: AstNode

                      initial node

                      -
                    • Optionalfilter: null | WalkerFilter

                      control the walk process

                      +

                      Function walk

                      • walk ast nodes

                        +

                        Parameters

                        • node: any

                          initial node

                          +
                        • Optionalfilter: WalkerFilter | null

                          control the walk process

                        • Optionalreverse: boolean

                          walk in reverse order


                          import {walk} from '@tbela99/css-parser';

                          const css = `
                          body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }

                          html,
                          body {
                          line-height: 1.474;
                          }

                          .ruler {

                          height: 10px;
                          }
                          `;

                          for (const {node, parent, root} of walk(ast)) {

                          // do something with node
                          }
                          @@ -167,7 +167,7 @@
                          import {EnumToken, transform, walk, WalkerOptionEnum} from '@tbela99/css-parser';

                          const css = `
                          body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }

                          html,
                          body {
                          line-height: 1.474;
                          }

                          .ruler {

                          height: 10px;
                          }
                          `;

                          function filter(node) {

                          if (node.typ == EnumToken.AstRule && node.sel.includes('html')) {

                          // skip the children of the current node
                          return WalkerOptionEnum.IgnoreChildren;
                          }
                          }

                          const result = await transform(css);
                          for (const {node} of walk(result.ast, filter)) {

                          console.error([EnumToken[node.typ]]);
                          }

                          // [ "StyleSheetNodeType" ]
                          // [ "RuleNodeType" ]
                          // [ "DeclarationNodeType" ]
                          // [ "RuleNodeType" ]
                          // [ "DeclarationNodeType" ]
                          // [ "RuleNodeType" ]
                          // [ "DeclarationNodeType" ]
                          -

                        Returns Generator<WalkResult>

                      Function walk

                      • walk ast nodes

                        -

                        Parameters

                        • node: AstNode

                          initial node

                          -
                        • Optionalfilter: null | WalkerFilter

                          control the walk process

                          +

                          Function walk

                          • walk ast nodes

                            +

                            Parameters

                            • node: any

                              initial node

                              +
                            • Optionalfilter: WalkerFilter | null

                              control the walk process

                            • Optionalreverse: boolean

                              walk in reverse order


                              import {walk} from '@tbela99/css-parser';

                              const css = `
                              body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }

                              html,
                              body {
                              line-height: 1.474;
                              }

                              .ruler {

                              height: 10px;
                              }
                              `;

                              for (const {node, parent, root} of walk(ast)) {

                              // do something with node
                              }
                              @@ -167,7 +167,7 @@
                              import {EnumToken, transform, walk, WalkerOptionEnum} from '@tbela99/css-parser';

                              const css = `
                              body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }

                              html,
                              body {
                              line-height: 1.474;
                              }

                              .ruler {

                              height: 10px;
                              }
                              `;

                              function filter(node) {

                              if (node.typ == EnumToken.AstRule && node.sel.includes('html')) {

                              // skip the children of the current node
                              return WalkerOptionEnum.IgnoreChildren;
                              }
                              }

                              const result = await transform(css);
                              for (const {node} of walk(result.ast, filter)) {

                              console.error([EnumToken[node.typ]]);
                              }

                              // [ "StyleSheetNodeType" ]
                              // [ "RuleNodeType" ]
                              // [ "DeclarationNodeType" ]
                              // [ "RuleNodeType" ]
                              // [ "DeclarationNodeType" ]
                              // [ "RuleNodeType" ]
                              // [ "DeclarationNodeType" ]
                              -

                            Returns Generator<WalkResult>

                          Function walkValues

                          • walk ast node value tokens

                            -

                            Parameters

                            • values: Token[]
                            • root:
                                  | null
                                  | ColorToken
                                  | InvalidClassSelectorToken
                                  | InvalidAttrToken
                                  | LiteralToken
                                  | IdentToken
                                  | IdentListToken
                                  | DashedIdentToken
                                  | CommaToken
                                  | ColonToken
                                  | SemiColonToken
                                  | ClassSelectorToken
                                  | UniversalSelectorToken
                                  | ChildCombinatorToken
                                  | DescendantCombinatorToken
                                  | NextSiblingCombinatorToken
                                  | SubsequentCombinatorToken
                                  | ColumnCombinatorToken
                                  | NestingSelectorToken
                                  | MediaQueryConditionToken
                                  | MediaFeatureToken
                                  | MediaFeatureNotToken
                                  | MediaFeatureOnlyToken
                                  | MediaFeatureAndToken
                                  | MediaFeatureOrToken
                                  | AstDeclaration
                                  | NumberToken
                                  | AtRuleToken
                                  | PercentageToken
                                  | FlexToken
                                  | FunctionURLToken
                                  | FunctionImageToken
                                  | TimingFunctionToken
                                  | TimelineFunctionToken
                                  | FunctionToken
                                  | GridTemplateFuncToken
                                  | DimensionToken
                                  | LengthToken
                                  | AngleToken
                                  | StringToken
                                  | TimeToken
                                  | FrequencyToken
                                  | ResolutionToken
                                  | UnclosedStringToken
                                  | HashToken
                                  | BadStringToken
                                  | BlockStartToken
                                  | BlockEndToken
                                  | AttrStartToken
                                  | AttrEndToken
                                  | ParensStartToken
                                  | ParensEndToken
                                  | ParensToken
                                  | CDOCommentToken
                                  | BadCDOCommentToken
                                  | CommentToken
                                  | BadCommentToken
                                  | WhitespaceToken
                                  | IncludeMatchToken
                                  | StartMatchToken
                                  | EndMatchToken
                                  | ContainMatchToken
                                  | MatchExpressionToken
                                  | NameSpaceAttributeToken
                                  | DashMatchToken
                                  | EqualMatchToken
                                  | LessThanToken
                                  | LessThanOrEqualToken
                                  | GreaterThanToken
                                  | GreaterThanOrEqualToken
                                  | ListToken
                                  | PseudoClassToken
                                  | PseudoPageToken
                                  | PseudoElementToken
                                  | PseudoClassFunctionToken
                                  | DelimToken
                                  | BinaryExpressionToken
                                  | UnaryExpression
                                  | FractionToken
                                  | AddToken
                                  | SubToken
                                  | DivToken
                                  | MulToken
                                  | BadUrlToken
                                  | UrlToken
                                  | ImportantToken
                                  | AttrToken
                                  | EOFToken
                                  | AstAtRule
                                  | AstKeyframesAtRule
                                  | AstKeyFrameRule
                                  | AstInvalidRule
                                  | AstInvalidAtRule
                                  | AstStyleSheet
                                  | AstRule
                                  | AstComment
                                  | AstInvalidDeclaration = null
                            • Optionalfilter:
                                  | null
                                  | WalkerValueFilter
                                  | {
                                      event?: WalkerEvent;
                                      fn?: WalkerValueFilter;
                                      type?: EnumToken
                                      | EnumToken[]
                                      | ((token: Token) => boolean);
                                  }
                            • Optionalreverse: boolean

                              Example:

                              +

                              Function walkValues

                              • walk ast node value tokens

                                +

                                Parameters

                                • values: Token[]
                                • root: any = null
                                • Optionalfilter:
                                      | WalkerValueFilter
                                      | {
                                          event?: WalkerEvent;
                                          fn?: WalkerValueFilter;
                                          type?: EnumToken
                                          | EnumToken[]
                                          | ((token: Token) => boolean);
                                      }
                                      | null
                                • Optionalreverse: boolean

                                  Example:


                                  import {AstDeclaration, EnumToken, transform, walkValues} from '@tbela99/css-parser';

                                  const css = `
                                  body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }
                                  `;

                                  const result = await transform(css);
                                  const declaration = result.ast.chi[0].chi[0] as AstDeclaration;

                                  // walk the node attribute's tokens in reverse order
                                  for (const {value} of walkValues(declaration.val, null, null,true)) {

                                  console.error([EnumToken[value.typ], value.val]);
                                  }

                                  // [ "Color", "color" ]
                                  // [ "FunctionTokenType", "calc" ]
                                  // [ "Number", 0.15 ]
                                  // [ "Add", undefined ]
                                  // [ "Iden", "b" ]
                                  // [ "Whitespace", undefined ]
                                  // [ "FunctionTokenType", "calc" ]
                                  // [ "Number", 0.24 ]
                                  // [ "Add", undefined ]
                                  // [ "Iden", "g" ]
                                  // [ "Whitespace", undefined ]
                                  // [ "Iden", "r" ]
                                  // [ "Whitespace", undefined ]
                                  // [ "Iden", "display-p3" ]
                                  // [ "Whitespace", undefined ]
                                  // [ "FunctionTokenType", "var" ]
                                  // [ "DashedIden", "--base-color" ]
                                  // [ "Whitespace", undefined ]
                                  // [ "Iden", "from" ]
                                  -

                                Returns Generator<WalkAttributesResult>

                              Module web

                              Functions

                              parse
                              parseFile
                              render
                              transform
                              transformFile

                              References

                              AddToken → AddToken
                              AngleToken → AngleToken
                              AstAtRule → AstAtRule
                              AstComment → AstComment
                              AstDeclaration → AstDeclaration
                              AstInvalidAtRule → AstInvalidAtRule
                              AstInvalidDeclaration → AstInvalidDeclaration
                              AstInvalidRule → AstInvalidRule
                              AstKeyFrameRule → AstKeyFrameRule
                              AstKeyframesAtRule → AstKeyframesAtRule
                              AstKeyframesRule → AstKeyframesRule
                              AstNode → AstNode
                              AstRule → AstRule
                              AstRuleList → AstRuleList
                              AstStyleSheet → AstStyleSheet
                              AtRuleToken → AtRuleToken
                              AtRuleVisitorHandler → AtRuleVisitorHandler
                              AttrEndToken → AttrEndToken
                              AttrStartToken → AttrStartToken
                              AttrToken → AttrToken
                              BadCDOCommentToken → BadCDOCommentToken
                              BadCommentToken → BadCommentToken
                              BadStringToken → BadStringToken
                              BadUrlToken → BadUrlToken
                              BaseToken → BaseToken
                              BinaryExpressionNode → BinaryExpressionNode
                              BinaryExpressionToken → BinaryExpressionToken
                              BlockEndToken → BlockEndToken
                              BlockStartToken → BlockStartToken
                              CDOCommentToken → CDOCommentToken
                              ChildCombinatorToken → ChildCombinatorToken
                              ClassSelectorToken → ClassSelectorToken
                              ColonToken → ColonToken
                              ColorToken → ColorToken
                              ColorType → ColorType
                              ColumnCombinatorToken → ColumnCombinatorToken
                              CommaToken → CommaToken
                              CommentToken → CommentToken
                              ContainMatchToken → ContainMatchToken
                              Context → Context
                              DashedIdentToken → DashedIdentToken
                              DashMatchToken → DashMatchToken
                              DeclarationVisitorHandler → DeclarationVisitorHandler
                              DelimToken → DelimToken
                              DescendantCombinatorToken → DescendantCombinatorToken
                              DimensionToken → DimensionToken
                              DivToken → DivToken
                              EndMatchToken → EndMatchToken
                              EnumToken → EnumToken
                              EOFToken → EOFToken
                              EqualMatchToken → EqualMatchToken
                              ErrorDescription → ErrorDescription
                              FeatureWalkMode → FeatureWalkMode
                              FlexToken → FlexToken
                              FractionToken → FractionToken
                              FrequencyToken → FrequencyToken
                              FunctionImageToken → FunctionImageToken
                              FunctionToken → FunctionToken
                              FunctionURLToken → FunctionURLToken
                              GenericVisitorAstNodeHandlerMap → GenericVisitorAstNodeHandlerMap
                              GenericVisitorHandler → GenericVisitorHandler
                              GenericVisitorResult → GenericVisitorResult
                              GreaterThanOrEqualToken → GreaterThanOrEqualToken
                              GreaterThanToken → GreaterThanToken
                              GridTemplateFuncToken → GridTemplateFuncToken
                              HashToken → HashToken
                              IdentListToken → IdentListToken
                              IdentToken → IdentToken
                              ImportantToken → ImportantToken
                              IncludeMatchToken → IncludeMatchToken
                              InvalidAttrToken → InvalidAttrToken
                              InvalidClassSelectorToken → InvalidClassSelectorToken
                              LengthToken → LengthToken
                              LessThanOrEqualToken → LessThanOrEqualToken
                              LessThanToken → LessThanToken
                              ListToken → ListToken
                              LiteralToken → LiteralToken
                              LoadResult → LoadResult
                              Location → Location
                              MatchedSelector → MatchedSelector
                              MatchExpressionToken → MatchExpressionToken
                              mathFuncs → mathFuncs
                              MediaFeatureAndToken → MediaFeatureAndToken
                              MediaFeatureNotToken → MediaFeatureNotToken
                              MediaFeatureOnlyToken → MediaFeatureOnlyToken
                              MediaFeatureOrToken → MediaFeatureOrToken
                              MediaFeatureToken → MediaFeatureToken
                              MediaQueryConditionToken → MediaQueryConditionToken
                              MinifyFeature → MinifyFeature
                              MinifyFeatureOptions → MinifyFeatureOptions
                              MinifyOptions → MinifyOptions
                              MulToken → MulToken
                              NameSpaceAttributeToken → NameSpaceAttributeToken
                              NestingSelectorToken → NestingSelectorToken
                              NextSiblingCombinatorToken → NextSiblingCombinatorToken
                              NumberToken → NumberToken
                              ParensEndToken → ParensEndToken
                              ParensStartToken → ParensStartToken
                              ParensToken → ParensToken
                              parseDeclarations → parseDeclarations
                              ParseInfo → ParseInfo
                              ParseResult → ParseResult
                              ParseResultStats → ParseResultStats
                              ParserOptions → ParserOptions
                              ParseTokenOptions → ParseTokenOptions
                              PercentageToken → PercentageToken
                              Position → Position
                              PropertyListOptions → PropertyListOptions
                              PropertyMapType → PropertyMapType
                              PropertySetType → PropertySetType
                              PropertyType → PropertyType
                              PseudoClassFunctionToken → PseudoClassFunctionToken
                              PseudoClassToken → PseudoClassToken
                              PseudoElementToken → PseudoElementToken
                              PseudoPageToken → PseudoPageToken
                              RawSelectorTokens → RawSelectorTokens
                              RenderOptions → RenderOptions
                              RenderResult → RenderResult
                              ResolutionToken → ResolutionToken
                              ResolvedPath → ResolvedPath
                              RuleVisitorHandler → RuleVisitorHandler
                              SemiColonToken → SemiColonToken
                              ShorthandDef → ShorthandDef
                              ShorthandMapType → ShorthandMapType
                              ShorthandProperties → ShorthandProperties
                              ShorthandPropertyType → ShorthandPropertyType
                              ShorthandType → ShorthandType
                              SourceMap → SourceMap
                              SourceMapObject → SourceMapObject
                              StartMatchToken → StartMatchToken
                              StringToken → StringToken
                              SubsequentCombinatorToken → SubsequentCombinatorToken
                              SubToken → SubToken
                              TimelineFunctionToken → TimelineFunctionToken
                              TimeToken → TimeToken
                              TimingFunctionToken → TimingFunctionToken
                              Token → Token
                              TokenizeResult → TokenizeResult
                              transformFunctions → transformFunctions
                              TransformOptions → TransformOptions
                              TransformResult → TransformResult
                              UnaryExpression → UnaryExpression
                              UnaryExpressionNode → UnaryExpressionNode
                              UnclosedStringToken → UnclosedStringToken
                              UniversalSelectorToken → UniversalSelectorToken
                              UrlToken → UrlToken
                              ValidationConfiguration → ValidationConfiguration
                              ValidationLevel → ValidationLevel
                              ValidationOptions → ValidationOptions
                              ValidationResult → ValidationResult
                              ValidationSelectorOptions → ValidationSelectorOptions
                              ValidationSyntaxNode → ValidationSyntaxNode
                              ValidationSyntaxResult → ValidationSyntaxResult
                              ValueVisitorHandler → ValueVisitorHandler
                              VariableScopeInfo → VariableScopeInfo
                              VisitorNodeMap → VisitorNodeMap
                              walk → walk
                              WalkAttributesResult → WalkAttributesResult
                              WalkerEvent → WalkerEvent
                              WalkerFilter → WalkerFilter
                              WalkerOption → WalkerOption
                              WalkerOptionEnum → WalkerOptionEnum
                              WalkerValueFilter → WalkerValueFilter
                              WalkResult → WalkResult
                              walkValues → walkValues
                              WhitespaceToken → WhitespaceToken

                              Module web

                              Functions

                              parse
                              parseFile
                              render
                              transform
                              transformFile

                              References

                              AddToken → AddToken
                              AngleToken → AngleToken
                              AstAtRule → AstAtRule
                              AstComment → AstComment
                              AstDeclaration → AstDeclaration
                              AstInvalidAtRule → AstInvalidAtRule
                              AstInvalidDeclaration → AstInvalidDeclaration
                              AstInvalidRule → AstInvalidRule
                              AstKeyFrameRule → AstKeyFrameRule
                              AstKeyframesAtRule → AstKeyframesAtRule
                              AstKeyframesRule → AstKeyframesRule
                              AstNode → AstNode
                              AstRule → AstRule
                              AstRuleList → AstRuleList
                              AstStyleSheet → AstStyleSheet
                              AtRuleToken → AtRuleToken
                              AtRuleVisitorHandler → AtRuleVisitorHandler
                              AttrEndToken → AttrEndToken
                              AttrStartToken → AttrStartToken
                              AttrToken → AttrToken
                              BadCDOCommentToken → BadCDOCommentToken
                              BadCommentToken → BadCommentToken
                              BadStringToken → BadStringToken
                              BadUrlToken → BadUrlToken
                              BaseToken → BaseToken
                              BinaryExpressionNode → BinaryExpressionNode
                              BinaryExpressionToken → BinaryExpressionToken
                              BlockEndToken → BlockEndToken
                              BlockStartToken → BlockStartToken
                              CDOCommentToken → CDOCommentToken
                              ChildCombinatorToken → ChildCombinatorToken
                              ClassSelectorToken → ClassSelectorToken
                              ColonToken → ColonToken
                              ColorToken → ColorToken
                              ColorType → ColorType
                              ColumnCombinatorToken → ColumnCombinatorToken
                              CommaToken → CommaToken
                              CommentToken → CommentToken
                              ComposesSelectorToken → ComposesSelectorToken
                              ContainMatchToken → ContainMatchToken
                              Context → Context
                              CssVariableImportTokenType → CssVariableImportTokenType
                              CssVariableMapTokenType → CssVariableMapTokenType
                              CssVariableToken → CssVariableToken
                              DashedIdentToken → DashedIdentToken
                              DashMatchToken → DashMatchToken
                              DeclarationVisitorHandler → DeclarationVisitorHandler
                              DelimToken → DelimToken
                              DescendantCombinatorToken → DescendantCombinatorToken
                              DimensionToken → DimensionToken
                              DivToken → DivToken
                              EndMatchToken → EndMatchToken
                              EnumToken → EnumToken
                              EOFToken → EOFToken
                              EqualMatchToken → EqualMatchToken
                              ErrorDescription → ErrorDescription
                              FlexToken → FlexToken
                              FractionToken → FractionToken
                              FrequencyToken → FrequencyToken
                              FunctionImageToken → FunctionImageToken
                              FunctionToken → FunctionToken
                              FunctionURLToken → FunctionURLToken
                              GenericVisitorAstNodeHandlerMap → GenericVisitorAstNodeHandlerMap
                              GenericVisitorHandler → GenericVisitorHandler
                              GenericVisitorResult → GenericVisitorResult
                              GreaterThanOrEqualToken → GreaterThanOrEqualToken
                              GreaterThanToken → GreaterThanToken
                              GridTemplateFuncToken → GridTemplateFuncToken
                              HashToken → HashToken
                              IdentListToken → IdentListToken
                              IdentToken → IdentToken
                              ImportantToken → ImportantToken
                              IncludeMatchToken → IncludeMatchToken
                              InvalidAttrToken → InvalidAttrToken
                              InvalidClassSelectorToken → InvalidClassSelectorToken
                              LengthToken → LengthToken
                              LessThanOrEqualToken → LessThanOrEqualToken
                              LessThanToken → LessThanToken
                              ListToken → ListToken
                              LiteralToken → LiteralToken
                              LoadResult → LoadResult
                              Location → Location
                              MatchedSelector → MatchedSelector
                              MatchExpressionToken → MatchExpressionToken
                              mathFuncs → mathFuncs
                              MediaFeatureAndToken → MediaFeatureAndToken
                              MediaFeatureNotToken → MediaFeatureNotToken
                              MediaFeatureOnlyToken → MediaFeatureOnlyToken
                              MediaFeatureOrToken → MediaFeatureOrToken
                              MediaFeatureToken → MediaFeatureToken
                              MediaQueryConditionToken → MediaQueryConditionToken
                              MinifyFeature → MinifyFeature
                              MinifyFeatureOptions → MinifyFeatureOptions
                              MinifyOptions → MinifyOptions
                              ModuleCaseTransformEnum → ModuleCaseTransformEnum
                              ModuleOptions → ModuleOptions
                              ModuleScopeEnumOptions → ModuleScopeEnumOptions
                              MulToken → MulToken
                              NameSpaceAttributeToken → NameSpaceAttributeToken
                              NestingSelectorToken → NestingSelectorToken
                              NextSiblingCombinatorToken → NextSiblingCombinatorToken
                              NumberToken → NumberToken
                              ParensEndToken → ParensEndToken
                              ParensStartToken → ParensStartToken
                              ParensToken → ParensToken
                              parseDeclarations → parseDeclarations
                              ParseInfo → ParseInfo
                              ParseResult → ParseResult
                              ParseResultStats → ParseResultStats
                              ParserOptions → ParserOptions
                              ParseTokenOptions → ParseTokenOptions
                              PercentageToken → PercentageToken
                              Position → Position
                              PropertyListOptions → PropertyListOptions
                              PropertyMapType → PropertyMapType
                              PropertySetType → PropertySetType
                              PropertyType → PropertyType
                              PseudoClassFunctionToken → PseudoClassFunctionToken
                              PseudoClassToken → PseudoClassToken
                              PseudoElementToken → PseudoElementToken
                              PseudoPageToken → PseudoPageToken
                              RawSelectorTokens → RawSelectorTokens
                              RenderOptions → RenderOptions
                              RenderResult → RenderResult
                              ResolutionToken → ResolutionToken
                              ResolvedPath → ResolvedPath
                              ResponseType → ResponseType
                              RuleVisitorHandler → RuleVisitorHandler
                              SemiColonToken → SemiColonToken
                              ShorthandDef → ShorthandDef
                              ShorthandMapType → ShorthandMapType
                              ShorthandProperties → ShorthandProperties
                              ShorthandPropertyType → ShorthandPropertyType
                              ShorthandType → ShorthandType
                              SourceMap → SourceMap
                              SourceMapObject → SourceMapObject
                              StartMatchToken → StartMatchToken
                              StringToken → StringToken
                              SubsequentCombinatorToken → SubsequentCombinatorToken
                              SubToken → SubToken
                              TimelineFunctionToken → TimelineFunctionToken
                              TimeToken → TimeToken
                              TimingFunctionToken → TimingFunctionToken
                              Token → Token
                              TokenizeResult → TokenizeResult
                              transformFunctions → transformFunctions
                              TransformOptions → TransformOptions
                              TransformResult → TransformResult
                              UnaryExpression → UnaryExpression
                              UnaryExpressionNode → UnaryExpressionNode
                              UnclosedStringToken → UnclosedStringToken
                              UniversalSelectorToken → UniversalSelectorToken
                              UrlToken → UrlToken
                              ValidationConfiguration → ValidationConfiguration
                              ValidationLevel → ValidationLevel
                              ValidationOptions → ValidationOptions
                              ValidationResult → ValidationResult
                              ValidationSelectorOptions → ValidationSelectorOptions
                              ValidationSyntaxNode → ValidationSyntaxNode
                              ValidationSyntaxResult → ValidationSyntaxResult
                              ValueVisitorHandler → ValueVisitorHandler
                              VariableScopeInfo → VariableScopeInfo
                              VisitorNodeMap → VisitorNodeMap
                              walk → walk
                              WalkAttributesResult → WalkAttributesResult
                              WalkerEvent → WalkerEvent
                              WalkerFilter → WalkerFilter
                              WalkerOption → WalkerOption
                              WalkerOptionEnum → WalkerOptionEnum
                              WalkerValueFilter → WalkerValueFilter
                              WalkResult → WalkResult
                              walkValues → walkValues
                              WhitespaceToken → WhitespaceToken

                              Module node

                              Functions

                              parse
                              parseDeclarations
                              parseFile
                              render
                              transform
                              transformFile
                              walk
                              walkValues

                              Classes

                              SourceMap

                              Enumerations

                              ColorType
                              EnumToken
                              FeatureWalkMode
                              ValidationLevel
                              WalkerEvent
                              WalkerOptionEnum

                              Interfaces

                              AddToken
                              AngleToken
                              AstAtRule
                              AstComment
                              AstDeclaration
                              AstInvalidAtRule
                              AstInvalidDeclaration
                              AstInvalidRule
                              AstKeyFrameRule
                              AstKeyframesAtRule
                              AstKeyframesRule
                              AstRule
                              AstStyleSheet
                              AtRuleToken
                              AttrEndToken
                              AttrStartToken
                              AttrToken
                              BadCDOCommentToken
                              BadCommentToken
                              BadStringToken
                              BadUrlToken
                              BaseToken
                              BinaryExpressionToken
                              BlockEndToken
                              BlockStartToken
                              CDOCommentToken
                              ChildCombinatorToken
                              ClassSelectorToken
                              ColonToken
                              ColorToken
                              ColumnCombinatorToken
                              CommaToken
                              CommentToken
                              ContainMatchToken
                              Context
                              DashedIdentToken
                              DashMatchToken
                              DelimToken
                              DescendantCombinatorToken
                              DimensionToken
                              DivToken
                              EndMatchToken
                              EOFToken
                              EqualMatchToken
                              ErrorDescription
                              FlexToken
                              FractionToken
                              FrequencyToken
                              FunctionImageToken
                              FunctionToken
                              FunctionURLToken
                              GreaterThanOrEqualToken
                              GreaterThanToken
                              GridTemplateFuncToken
                              HashToken
                              IdentListToken
                              IdentToken
                              ImportantToken
                              IncludeMatchToken
                              InvalidAttrToken
                              InvalidClassSelectorToken
                              LengthToken
                              LessThanOrEqualToken
                              LessThanToken
                              ListToken
                              LiteralToken
                              Location
                              MatchedSelector
                              MatchExpressionToken
                              MediaFeatureAndToken
                              MediaFeatureNotToken
                              MediaFeatureOnlyToken
                              MediaFeatureOrToken
                              MediaFeatureToken
                              MediaQueryConditionToken
                              MinifyFeature
                              MinifyFeatureOptions
                              MinifyOptions
                              MulToken
                              NameSpaceAttributeToken
                              NestingSelectorToken
                              NextSiblingCombinatorToken
                              NumberToken
                              ParensEndToken
                              ParensStartToken
                              ParensToken
                              ParseInfo
                              ParseResult
                              ParseResultStats
                              ParserOptions
                              ParseTokenOptions
                              PercentageToken
                              Position
                              PropertyListOptions
                              PropertyMapType
                              PropertySetType
                              PropertyType
                              PseudoClassFunctionToken
                              PseudoClassToken
                              PseudoElementToken
                              PseudoPageToken
                              RenderOptions
                              RenderResult
                              ResolutionToken
                              ResolvedPath
                              SemiColonToken
                              ShorthandDef
                              ShorthandMapType
                              ShorthandProperties
                              ShorthandPropertyType
                              ShorthandType
                              SourceMapObject
                              StartMatchToken
                              StringToken
                              SubsequentCombinatorToken
                              SubToken
                              TimelineFunctionToken
                              TimeToken
                              TimingFunctionToken
                              TokenizeResult
                              TransformOptions
                              TransformResult
                              UnaryExpression
                              UnclosedStringToken
                              UniversalSelectorToken
                              UrlToken
                              ValidationConfiguration
                              ValidationOptions
                              ValidationResult
                              ValidationSelectorOptions
                              ValidationSyntaxNode
                              ValidationSyntaxResult
                              VariableScopeInfo
                              VisitorNodeMap
                              WalkAttributesResult
                              WalkResult
                              WhitespaceToken

                              Type Aliases

                              AstNode
                              AstRuleList
                              AtRuleVisitorHandler
                              BinaryExpressionNode
                              DeclarationVisitorHandler
                              GenericVisitorAstNodeHandlerMap
                              GenericVisitorHandler
                              GenericVisitorResult
                              LoadResult
                              RawSelectorTokens
                              RuleVisitorHandler
                              Token
                              UnaryExpressionNode
                              ValueVisitorHandler
                              WalkerFilter
                              WalkerOption
                              WalkerValueFilter

                              Variables

                              mathFuncs
                              transformFunctions

                              Module node

                              Functions

                              parse
                              parseDeclarations
                              parseFile
                              render
                              transform
                              transformFile
                              walk
                              walkValues

                              Classes

                              SourceMap

                              Enumerations

                              ColorType
                              EnumToken
                              ModuleCaseTransformEnum
                              ModuleScopeEnumOptions
                              ResponseType
                              ValidationLevel
                              WalkerEvent
                              WalkerOptionEnum

                              Interfaces

                              AddToken
                              AngleToken
                              AstAtRule
                              AstComment
                              AstDeclaration
                              AstInvalidAtRule
                              AstInvalidDeclaration
                              AstInvalidRule
                              AstKeyFrameRule
                              AstKeyframesAtRule
                              AstKeyframesRule
                              AstRule
                              AstStyleSheet
                              AtRuleToken
                              AttrEndToken
                              AttrStartToken
                              AttrToken
                              BadCDOCommentToken
                              BadCommentToken
                              BadStringToken
                              BadUrlToken
                              BaseToken
                              BinaryExpressionToken
                              BlockEndToken
                              BlockStartToken
                              CDOCommentToken
                              ChildCombinatorToken
                              ClassSelectorToken
                              ColonToken
                              ColorToken
                              ColumnCombinatorToken
                              CommaToken
                              CommentToken
                              ComposesSelectorToken
                              ContainMatchToken
                              Context
                              CssVariableImportTokenType
                              CssVariableMapTokenType
                              CssVariableToken
                              DashedIdentToken
                              DashMatchToken
                              DelimToken
                              DescendantCombinatorToken
                              DimensionToken
                              DivToken
                              EndMatchToken
                              EOFToken
                              EqualMatchToken
                              ErrorDescription
                              FlexToken
                              FractionToken
                              FrequencyToken
                              FunctionImageToken
                              FunctionToken
                              FunctionURLToken
                              GreaterThanOrEqualToken
                              GreaterThanToken
                              GridTemplateFuncToken
                              HashToken
                              IdentListToken
                              IdentToken
                              ImportantToken
                              IncludeMatchToken
                              InvalidAttrToken
                              InvalidClassSelectorToken
                              LengthToken
                              LessThanOrEqualToken
                              LessThanToken
                              ListToken
                              LiteralToken
                              Location
                              MatchedSelector
                              MatchExpressionToken
                              MediaFeatureAndToken
                              MediaFeatureNotToken
                              MediaFeatureOnlyToken
                              MediaFeatureOrToken
                              MediaFeatureToken
                              MediaQueryConditionToken
                              MinifyFeature
                              MinifyFeatureOptions
                              MinifyOptions
                              ModuleOptions
                              MulToken
                              NameSpaceAttributeToken
                              NestingSelectorToken
                              NextSiblingCombinatorToken
                              NumberToken
                              ParensEndToken
                              ParensStartToken
                              ParensToken
                              ParseInfo
                              ParseResult
                              ParseResultStats
                              ParserOptions
                              ParseTokenOptions
                              PercentageToken
                              Position
                              PropertyListOptions
                              PropertyMapType
                              PropertySetType
                              PropertyType
                              PseudoClassFunctionToken
                              PseudoClassToken
                              PseudoElementToken
                              PseudoPageToken
                              RenderOptions
                              RenderResult
                              ResolutionToken
                              ResolvedPath
                              SemiColonToken
                              ShorthandDef
                              ShorthandMapType
                              ShorthandProperties
                              ShorthandPropertyType
                              ShorthandType
                              SourceMapObject
                              StartMatchToken
                              StringToken
                              SubsequentCombinatorToken
                              SubToken
                              TimelineFunctionToken
                              TimeToken
                              TimingFunctionToken
                              TokenizeResult
                              TransformOptions
                              TransformResult
                              UnaryExpression
                              UnclosedStringToken
                              UniversalSelectorToken
                              UrlToken
                              ValidationConfiguration
                              ValidationOptions
                              ValidationResult
                              ValidationSelectorOptions
                              ValidationSyntaxNode
                              ValidationSyntaxResult
                              VariableScopeInfo
                              VisitorNodeMap
                              WalkAttributesResult
                              WalkResult
                              WhitespaceToken

                              Type Aliases

                              AstNode
                              AstRuleList
                              AtRuleVisitorHandler
                              BinaryExpressionNode
                              DeclarationVisitorHandler
                              GenericVisitorAstNodeHandlerMap
                              GenericVisitorHandler
                              GenericVisitorResult
                              LoadResult
                              RawSelectorTokens
                              RuleVisitorHandler
                              Token
                              UnaryExpressionNode
                              ValueVisitorHandler
                              WalkerFilter
                              WalkerOption
                              WalkerValueFilter

                              Variables

                              mathFuncs
                              transformFunctions

                              Module web

                              Functions

                              parse
                              parseFile
                              render
                              transform
                              transformFile

                              References

                              AddToken → AddToken
                              AngleToken → AngleToken
                              AstAtRule → AstAtRule
                              AstComment → AstComment
                              AstDeclaration → AstDeclaration
                              AstInvalidAtRule → AstInvalidAtRule
                              AstInvalidDeclaration → AstInvalidDeclaration
                              AstInvalidRule → AstInvalidRule
                              AstKeyFrameRule → AstKeyFrameRule
                              AstKeyframesAtRule → AstKeyframesAtRule
                              AstKeyframesRule → AstKeyframesRule
                              AstNode → AstNode
                              AstRule → AstRule
                              AstRuleList → AstRuleList
                              AstStyleSheet → AstStyleSheet
                              AtRuleToken → AtRuleToken
                              AtRuleVisitorHandler → AtRuleVisitorHandler
                              AttrEndToken → AttrEndToken
                              AttrStartToken → AttrStartToken
                              AttrToken → AttrToken
                              BadCDOCommentToken → BadCDOCommentToken
                              BadCommentToken → BadCommentToken
                              BadStringToken → BadStringToken
                              BadUrlToken → BadUrlToken
                              BaseToken → BaseToken
                              BinaryExpressionNode → BinaryExpressionNode
                              BinaryExpressionToken → BinaryExpressionToken
                              BlockEndToken → BlockEndToken
                              BlockStartToken → BlockStartToken
                              CDOCommentToken → CDOCommentToken
                              ChildCombinatorToken → ChildCombinatorToken
                              ClassSelectorToken → ClassSelectorToken
                              ColonToken → ColonToken
                              ColorToken → ColorToken
                              ColorType → ColorType
                              ColumnCombinatorToken → ColumnCombinatorToken
                              CommaToken → CommaToken
                              CommentToken → CommentToken
                              ContainMatchToken → ContainMatchToken
                              Context → Context
                              DashedIdentToken → DashedIdentToken
                              DashMatchToken → DashMatchToken
                              DeclarationVisitorHandler → DeclarationVisitorHandler
                              DelimToken → DelimToken
                              DescendantCombinatorToken → DescendantCombinatorToken
                              DimensionToken → DimensionToken
                              DivToken → DivToken
                              EndMatchToken → EndMatchToken
                              EnumToken → EnumToken
                              EOFToken → EOFToken
                              EqualMatchToken → EqualMatchToken
                              ErrorDescription → ErrorDescription
                              FeatureWalkMode → FeatureWalkMode
                              FlexToken → FlexToken
                              FractionToken → FractionToken
                              FrequencyToken → FrequencyToken
                              FunctionImageToken → FunctionImageToken
                              FunctionToken → FunctionToken
                              FunctionURLToken → FunctionURLToken
                              GenericVisitorAstNodeHandlerMap → GenericVisitorAstNodeHandlerMap
                              GenericVisitorHandler → GenericVisitorHandler
                              GenericVisitorResult → GenericVisitorResult
                              GreaterThanOrEqualToken → GreaterThanOrEqualToken
                              GreaterThanToken → GreaterThanToken
                              GridTemplateFuncToken → GridTemplateFuncToken
                              HashToken → HashToken
                              IdentListToken → IdentListToken
                              IdentToken → IdentToken
                              ImportantToken → ImportantToken
                              IncludeMatchToken → IncludeMatchToken
                              InvalidAttrToken → InvalidAttrToken
                              InvalidClassSelectorToken → InvalidClassSelectorToken
                              LengthToken → LengthToken
                              LessThanOrEqualToken → LessThanOrEqualToken
                              LessThanToken → LessThanToken
                              ListToken → ListToken
                              LiteralToken → LiteralToken
                              LoadResult → LoadResult
                              Location → Location
                              MatchedSelector → MatchedSelector
                              MatchExpressionToken → MatchExpressionToken
                              mathFuncs → mathFuncs
                              MediaFeatureAndToken → MediaFeatureAndToken
                              MediaFeatureNotToken → MediaFeatureNotToken
                              MediaFeatureOnlyToken → MediaFeatureOnlyToken
                              MediaFeatureOrToken → MediaFeatureOrToken
                              MediaFeatureToken → MediaFeatureToken
                              MediaQueryConditionToken → MediaQueryConditionToken
                              MinifyFeature → MinifyFeature
                              MinifyFeatureOptions → MinifyFeatureOptions
                              MinifyOptions → MinifyOptions
                              MulToken → MulToken
                              NameSpaceAttributeToken → NameSpaceAttributeToken
                              NestingSelectorToken → NestingSelectorToken
                              NextSiblingCombinatorToken → NextSiblingCombinatorToken
                              NumberToken → NumberToken
                              ParensEndToken → ParensEndToken
                              ParensStartToken → ParensStartToken
                              ParensToken → ParensToken
                              parseDeclarations → parseDeclarations
                              ParseInfo → ParseInfo
                              ParseResult → ParseResult
                              ParseResultStats → ParseResultStats
                              ParserOptions → ParserOptions
                              ParseTokenOptions → ParseTokenOptions
                              PercentageToken → PercentageToken
                              Position → Position
                              PropertyListOptions → PropertyListOptions
                              PropertyMapType → PropertyMapType
                              PropertySetType → PropertySetType
                              PropertyType → PropertyType
                              PseudoClassFunctionToken → PseudoClassFunctionToken
                              PseudoClassToken → PseudoClassToken
                              PseudoElementToken → PseudoElementToken
                              PseudoPageToken → PseudoPageToken
                              RawSelectorTokens → RawSelectorTokens
                              RenderOptions → RenderOptions
                              RenderResult → RenderResult
                              ResolutionToken → ResolutionToken
                              ResolvedPath → ResolvedPath
                              RuleVisitorHandler → RuleVisitorHandler
                              SemiColonToken → SemiColonToken
                              ShorthandDef → ShorthandDef
                              ShorthandMapType → ShorthandMapType
                              ShorthandProperties → ShorthandProperties
                              ShorthandPropertyType → ShorthandPropertyType
                              ShorthandType → ShorthandType
                              SourceMap → SourceMap
                              SourceMapObject → SourceMapObject
                              StartMatchToken → StartMatchToken
                              StringToken → StringToken
                              SubsequentCombinatorToken → SubsequentCombinatorToken
                              SubToken → SubToken
                              TimelineFunctionToken → TimelineFunctionToken
                              TimeToken → TimeToken
                              TimingFunctionToken → TimingFunctionToken
                              Token → Token
                              TokenizeResult → TokenizeResult
                              transformFunctions → transformFunctions
                              TransformOptions → TransformOptions
                              TransformResult → TransformResult
                              UnaryExpression → UnaryExpression
                              UnaryExpressionNode → UnaryExpressionNode
                              UnclosedStringToken → UnclosedStringToken
                              UniversalSelectorToken → UniversalSelectorToken
                              UrlToken → UrlToken
                              ValidationConfiguration → ValidationConfiguration
                              ValidationLevel → ValidationLevel
                              ValidationOptions → ValidationOptions
                              ValidationResult → ValidationResult
                              ValidationSelectorOptions → ValidationSelectorOptions
                              ValidationSyntaxNode → ValidationSyntaxNode
                              ValidationSyntaxResult → ValidationSyntaxResult
                              ValueVisitorHandler → ValueVisitorHandler
                              VariableScopeInfo → VariableScopeInfo
                              VisitorNodeMap → VisitorNodeMap
                              walk → walk
                              WalkAttributesResult → WalkAttributesResult
                              WalkerEvent → WalkerEvent
                              WalkerFilter → WalkerFilter
                              WalkerOption → WalkerOption
                              WalkerOptionEnum → WalkerOptionEnum
                              WalkerValueFilter → WalkerValueFilter
                              WalkResult → WalkResult
                              walkValues → walkValues
                              WhitespaceToken → WhitespaceToken

                              Module web

                              Functions

                              parse
                              parseFile
                              render
                              transform
                              transformFile

                              References

                              AddToken → AddToken
                              AngleToken → AngleToken
                              AstAtRule → AstAtRule
                              AstComment → AstComment
                              AstDeclaration → AstDeclaration
                              AstInvalidAtRule → AstInvalidAtRule
                              AstInvalidDeclaration → AstInvalidDeclaration
                              AstInvalidRule → AstInvalidRule
                              AstKeyFrameRule → AstKeyFrameRule
                              AstKeyframesAtRule → AstKeyframesAtRule
                              AstKeyframesRule → AstKeyframesRule
                              AstNode → AstNode
                              AstRule → AstRule
                              AstRuleList → AstRuleList
                              AstStyleSheet → AstStyleSheet
                              AtRuleToken → AtRuleToken
                              AtRuleVisitorHandler → AtRuleVisitorHandler
                              AttrEndToken → AttrEndToken
                              AttrStartToken → AttrStartToken
                              AttrToken → AttrToken
                              BadCDOCommentToken → BadCDOCommentToken
                              BadCommentToken → BadCommentToken
                              BadStringToken → BadStringToken
                              BadUrlToken → BadUrlToken
                              BaseToken → BaseToken
                              BinaryExpressionNode → BinaryExpressionNode
                              BinaryExpressionToken → BinaryExpressionToken
                              BlockEndToken → BlockEndToken
                              BlockStartToken → BlockStartToken
                              CDOCommentToken → CDOCommentToken
                              ChildCombinatorToken → ChildCombinatorToken
                              ClassSelectorToken → ClassSelectorToken
                              ColonToken → ColonToken
                              ColorToken → ColorToken
                              ColorType → ColorType
                              ColumnCombinatorToken → ColumnCombinatorToken
                              CommaToken → CommaToken
                              CommentToken → CommentToken
                              ComposesSelectorToken → ComposesSelectorToken
                              ContainMatchToken → ContainMatchToken
                              Context → Context
                              CssVariableImportTokenType → CssVariableImportTokenType
                              CssVariableMapTokenType → CssVariableMapTokenType
                              CssVariableToken → CssVariableToken
                              DashedIdentToken → DashedIdentToken
                              DashMatchToken → DashMatchToken
                              DeclarationVisitorHandler → DeclarationVisitorHandler
                              DelimToken → DelimToken
                              DescendantCombinatorToken → DescendantCombinatorToken
                              DimensionToken → DimensionToken
                              DivToken → DivToken
                              EndMatchToken → EndMatchToken
                              EnumToken → EnumToken
                              EOFToken → EOFToken
                              EqualMatchToken → EqualMatchToken
                              ErrorDescription → ErrorDescription
                              FlexToken → FlexToken
                              FractionToken → FractionToken
                              FrequencyToken → FrequencyToken
                              FunctionImageToken → FunctionImageToken
                              FunctionToken → FunctionToken
                              FunctionURLToken → FunctionURLToken
                              GenericVisitorAstNodeHandlerMap → GenericVisitorAstNodeHandlerMap
                              GenericVisitorHandler → GenericVisitorHandler
                              GenericVisitorResult → GenericVisitorResult
                              GreaterThanOrEqualToken → GreaterThanOrEqualToken
                              GreaterThanToken → GreaterThanToken
                              GridTemplateFuncToken → GridTemplateFuncToken
                              HashToken → HashToken
                              IdentListToken → IdentListToken
                              IdentToken → IdentToken
                              ImportantToken → ImportantToken
                              IncludeMatchToken → IncludeMatchToken
                              InvalidAttrToken → InvalidAttrToken
                              InvalidClassSelectorToken → InvalidClassSelectorToken
                              LengthToken → LengthToken
                              LessThanOrEqualToken → LessThanOrEqualToken
                              LessThanToken → LessThanToken
                              ListToken → ListToken
                              LiteralToken → LiteralToken
                              LoadResult → LoadResult
                              Location → Location
                              MatchedSelector → MatchedSelector
                              MatchExpressionToken → MatchExpressionToken
                              mathFuncs → mathFuncs
                              MediaFeatureAndToken → MediaFeatureAndToken
                              MediaFeatureNotToken → MediaFeatureNotToken
                              MediaFeatureOnlyToken → MediaFeatureOnlyToken
                              MediaFeatureOrToken → MediaFeatureOrToken
                              MediaFeatureToken → MediaFeatureToken
                              MediaQueryConditionToken → MediaQueryConditionToken
                              MinifyFeature → MinifyFeature
                              MinifyFeatureOptions → MinifyFeatureOptions
                              MinifyOptions → MinifyOptions
                              ModuleCaseTransformEnum → ModuleCaseTransformEnum
                              ModuleOptions → ModuleOptions
                              ModuleScopeEnumOptions → ModuleScopeEnumOptions
                              MulToken → MulToken
                              NameSpaceAttributeToken → NameSpaceAttributeToken
                              NestingSelectorToken → NestingSelectorToken
                              NextSiblingCombinatorToken → NextSiblingCombinatorToken
                              NumberToken → NumberToken
                              ParensEndToken → ParensEndToken
                              ParensStartToken → ParensStartToken
                              ParensToken → ParensToken
                              parseDeclarations → parseDeclarations
                              ParseInfo → ParseInfo
                              ParseResult → ParseResult
                              ParseResultStats → ParseResultStats
                              ParserOptions → ParserOptions
                              ParseTokenOptions → ParseTokenOptions
                              PercentageToken → PercentageToken
                              Position → Position
                              PropertyListOptions → PropertyListOptions
                              PropertyMapType → PropertyMapType
                              PropertySetType → PropertySetType
                              PropertyType → PropertyType
                              PseudoClassFunctionToken → PseudoClassFunctionToken
                              PseudoClassToken → PseudoClassToken
                              PseudoElementToken → PseudoElementToken
                              PseudoPageToken → PseudoPageToken
                              RawSelectorTokens → RawSelectorTokens
                              RenderOptions → RenderOptions
                              RenderResult → RenderResult
                              ResolutionToken → ResolutionToken
                              ResolvedPath → ResolvedPath
                              ResponseType → ResponseType
                              RuleVisitorHandler → RuleVisitorHandler
                              SemiColonToken → SemiColonToken
                              ShorthandDef → ShorthandDef
                              ShorthandMapType → ShorthandMapType
                              ShorthandProperties → ShorthandProperties
                              ShorthandPropertyType → ShorthandPropertyType
                              ShorthandType → ShorthandType
                              SourceMap → SourceMap
                              SourceMapObject → SourceMapObject
                              StartMatchToken → StartMatchToken
                              StringToken → StringToken
                              SubsequentCombinatorToken → SubsequentCombinatorToken
                              SubToken → SubToken
                              TimelineFunctionToken → TimelineFunctionToken
                              TimeToken → TimeToken
                              TimingFunctionToken → TimingFunctionToken
                              Token → Token
                              TokenizeResult → TokenizeResult
                              transformFunctions → transformFunctions
                              TransformOptions → TransformOptions
                              TransformResult → TransformResult
                              UnaryExpression → UnaryExpression
                              UnaryExpressionNode → UnaryExpressionNode
                              UnclosedStringToken → UnclosedStringToken
                              UniversalSelectorToken → UniversalSelectorToken
                              UrlToken → UrlToken
                              ValidationConfiguration → ValidationConfiguration
                              ValidationLevel → ValidationLevel
                              ValidationOptions → ValidationOptions
                              ValidationResult → ValidationResult
                              ValidationSelectorOptions → ValidationSelectorOptions
                              ValidationSyntaxNode → ValidationSyntaxNode
                              ValidationSyntaxResult → ValidationSyntaxResult
                              ValueVisitorHandler → ValueVisitorHandler
                              VariableScopeInfo → VariableScopeInfo
                              VisitorNodeMap → VisitorNodeMap
                              walk → walk
                              WalkAttributesResult → WalkAttributesResult
                              WalkerEvent → WalkerEvent
                              WalkerFilter → WalkerFilter
                              WalkerOption → WalkerOption
                              WalkerOptionEnum → WalkerOptionEnum
                              WalkerValueFilter → WalkerValueFilter
                              WalkResult → WalkResult
                              walkValues → walkValues
                              WhitespaceToken → WhitespaceToken
                              \n```" + }, + { + "kind": "text", + "text": "\n\n### As umd module\n\nit can also be imported as an umd module\n\n" + }, + { + "kind": "code", + "text": "```html\n\n\n\n```" + }, + { + "kind": "text", + "text": "\n\n------\n[← Features](" + }, + { + "kind": "relative-link", + "text": "./features.md", + "target": 2 + }, + { + "kind": "text", + "text": ") | [Usage →](" + }, + { + "kind": "relative-link", + "text": "./usage.md", + "target": 4 + }, + { + "kind": "text", + "text": ")" + } + ], + "frontmatter": { + "group": "Documents", + "category": "Guides" + } + }, + { + "id": 5, + "name": "Usage", + "variant": "document", + "kind": 8388608, + "flags": {}, + "content": [ + { + "kind": "text", + "text": "## Usage\n### From node, bun or deno\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n\n.ruler {\n\n height: 10px;\n background-color: orange\n}\n.hsl { color: #b3222280; }\n`;\n\nconst result = await transform(css, {\n\n beautify: true,\n convertColor: ColorType.SRGB\n});\n\nconsole.debug(result.code);\n```" + }, + { + "kind": "text", + "text": "\n\nthe library exposes three entry points\n\n- " + }, + { + "kind": "code", + "text": "`@tbela99/css-parser`" + }, + { + "kind": "text", + "text": " or " + }, + { + "kind": "code", + "text": "`@tbela99/css-parser/node`" + }, + { + "kind": "text", + "text": " which relies on node fs and fs/promises to read files\n- " + }, + { + "kind": "code", + "text": "`@tbela99/css-parser/cjs`" + }, + { + "kind": "text", + "text": " same as the previous except it is exported as a commonjs module\n- " + }, + { + "kind": "code", + "text": "`@tbela99/css-parser/web`" + }, + { + "kind": "text", + "text": " which relies on the web fetch api to read files\n\nthe default file loader can be overridden via the options [ParseOptions.load](" + }, + { + "kind": "relative-link", + "text": "../interfaces/node.ParserOptions.html#load" + }, + { + "kind": "text", + "text": ") or [TransformOptions.load](" + }, + { + "kind": "relative-link", + "text": "../interfaces/node.TransformOptions.html#load" + }, + { + "kind": "text", + "text": ") of parse() and transform() functions\n\n### From the web browser\n\nload as javascript module\n\n" + }, + { + "kind": "code", + "text": "```html\n\n```" + }, + { + "kind": "text", + "text": "\n\nload as an umd module\n\n" + }, + { + "kind": "code", + "text": "```html\n\n\n\n```" + }, + { + "kind": "text", + "text": "\n\n### Parsing\n\nparsing is achieved using the parse() or transform() or the corresponding parseFile() and transformFile() functions. the transform() function will also provide the css code as a result which comes handing if you do not want an additional step of rendering the ast.\n\n" + }, + { + "kind": "code", + "text": "```ts\nimport {parse, render} from '@tbela99/css-parser';\n\nconst css = `...`;\n\nconst result = await parse(css);\nconsole.debug(result.ast);\nconsole.debug(result.stats);\n\nconst rendered = render(result.ast);\nconsole.debug(rendered.code);\nconsole.debug(result.stats);\n````\n\nor\n\n```" + }, + { + "kind": "text", + "text": "ts\nimport " + }, + { + "kind": "text", + "text": "{transform" + }, + { + "kind": "text", + "text": "}" + }, + { + "kind": "text", + "text": " from '@tbela99/css-parser';\n\nconst css = " + }, + { + "kind": "code", + "text": "`...`" + }, + { + "kind": "text", + "text": ";\n\nconst result = await transform(css);\nconsole.debug(result.ast);\nconsole.debug(result.code);\nconsole.debug(result.stats);\n" + }, + { + "kind": "code", + "text": "````\n\n### Parsing files\n\nthe parseFile() and transformFile() functions can be used to parse files.\nthey both accept a file url or path as first argument.\n\n```ts\nimport {transformFile} from '@tbela99/css-parser';\n\nconst css = `https://docs.deno.com/styles.css`;\n\nlet result = await transformFile(css);\nconsole.debug(result.code);\n\n// load file as readable stream\nresult = await transformFile(css, true);\nconsole.debug(result.code);\n```\n\n### Parsing from a Readable Stream\n\nthe parse() and transform() functions accept a string or readable stream as first argument.\n\n```ts\nimport {parse} from '@tbela99/css-parser';\nimport {Readable} from \"node:stream\";\n\n// usage: node index.ts < styles.css or cat styles.css | node index.ts\n\nconst readableStream = Readable.toWeb(process.stdin);\nconst result = await parse(readableStream, {beautify: true});\n\nconsole.log(result.ast);\n```\n\na response body object can also be passed to parseFile() or transformFile() functions\n\n```ts\n\nimport {transformFile} from '@tbela99/css-parser';\n\nconst response = await fetch(`https://docs.deno.com/styles.css`);\nconst result = await transformFile(response.body); // or parse(response.body)\nconsole.debug(result.code);\n\n```\n### Rendering css\n\n[rendering options](../interfaces/node.RenderOptions.html) can be passed to both transform() and render() functions.\n\n#### Pretty printing\nby default css output is minified. that behavior can be changed by passing the `{beautify:true}` option.\n\n```ts\n\nconst result = await transform(css, {beautify: true}); \n// or render(ast, {beautify: true})\n\nconsole.log(result.code);\n\n```\n\n#### Preserving license comments\n\nby default all comments are removed. they can be preserved by passing the `{removeComments:false}` option,\n\nif you only want to preserve license comments, and remove other comments, you can pass `{preserveLicense:true}` instead.\n\n```ts\n\nconst css = `/*!\n * Bootstrap v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n[data-bs-theme=dark] {\n color-scheme: dark;\n \n ...`;\n\nconst result = await transform(css, {preserveLicense: true}); \n```\n\n#### Converting colors\n\ncolor conversion is controlled by the `convertColor` option. colors are converted to the HEX format by default.\nthat behavior can be changed by passing the chosen color type to the convertColor option:\n\n- ColorType.HEX\n- ColorType.RGB or ColorType.RGBA\n- ColorType.HSL or ColorType.HSLA\n- ColorType.HWB or ColorType.HWBA\n- ColorType.CMYK or ColorType.DEVICE_CMYK\n- ColorType.SRGB\n- ColorType.SRGB_LINEAR\n- ColorType.DISPLAY_P3\n- ColorType.PROPHOTO_RGB\n- ColorType.A98_RGB\n- ColorType.REC2020\n- ColorType.XYZ or ColorType.XYZ_D65\n- ColorType.XYZ_D50\n- ColorType.LAB\n- ColorType.LCH\n- ColorType.OKLAB\n- ColorType.OKLCH\n\n```ts\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n.color-map {\n\ncolor: lab(from #123456 calc(l + 10) a b);\nbackground-color: lab(from hsl(180 100% 50%) calc(l - 10) a b);\n}\n`;\nconst result = await transform(css, {\n beautify: true,\n convertColor: ColorType.RGB,\n computeCalcExpression: true\n});\n\nconsole.log(result.code);\n\n// .color-map {\n// color: rgb(45 74 111);\n// background-color: rgb(0 226 226)\n// }\n```\n.\n\n------\n[← Getting started](../../docs/documents/Guide.Getting_started.html) | [Minification →]( ../../docs/documents/Guide.Minification.html )" + } + ], + "frontmatter": { + "group": "Documents", + "category": "Guides" + } + }, + { + "id": 6, + "name": "Minification", + "variant": "document", + "kind": 8388608, + "flags": {}, + "content": [ + { + "kind": "text", + "text": "## Minification\n\nthe minification process is the default behavior. it applies to both the ast and the css output.\nit can be disabled by setting " + }, + { + "kind": "code", + "text": "`{minify:false}`" + }, + { + "kind": "text", + "text": " in the options.\n\nindividual flags can be set to control specific minification features.\n\n### Keyframes\n\nkeyframes rules are minified.\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform, TransformOptions} from \"@tbela99/css-parser\";\n\nconst options: TransformOptions = {\n\n beautify: true,\n};\n\nconst css = `@keyframes slide-in {\n from {\n transform: translateX(0%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + }, + { + "kind": "text", + "text": "\n\noutput\n" + }, + { + "kind": "code", + "text": "```css\n@keyframes slide-in {\n 0% {\n transform: translateX(0)\n }\n to {\n transform: translateX(100%)\n }\n}\n```" + }, + { + "kind": "text", + "text": "\n\n### CSS variables inlining\n\nthis feature is disabled by default.\nit can be enabled using " + }, + { + "kind": "code", + "text": "`{inlineCssVariables: true}`" + }, + { + "kind": "text", + "text": ".\nthe CSS variables must be defined only once, and they must be defined in 'html' or ':root' selectors.\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n:root {\n--color: green;\n}\n._19_u :focus {\n color: hsl(from var(--color) calc(h * 2) s l);\n}\n`;\nconst result = await transform(css, {\n beautify: true,\n convertColor: false,\n inlineCssVariables: true,\n computeCalcExpression: false\n});\n\nconsole.log(result.code);\n\n```" + }, + { + "kind": "text", + "text": "\n\noutput\n" + }, + { + "kind": "code", + "text": "```css\n._19_u :focus {\n color: hsl(from green calc((h*2)) s l)\n}\n```" + }, + { + "kind": "text", + "text": "\n\n### Math functions\n\nthis feature is enabled by default. it can be disabled using " + }, + { + "kind": "code", + "text": "`{computeCalcExpression: false}`" + }, + { + "kind": "text", + "text": ".\n[math functions](" + }, + { + "kind": "relative-link", + "text": "../variables/node.mathFuncs.html" + }, + { + "kind": "text", + "text": ") such as " + }, + { + "kind": "code", + "text": "`calc()`" + }, + { + "kind": "text", + "text": " are evaluated when enabled using " + }, + { + "kind": "code", + "text": "`{computeCalcExpression: true}`" + }, + { + "kind": "text", + "text": ".\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n:root {\n--color: green;\n}\n._19_u :focus {\n color: hsl(from var(--color) calc(h * 2) s l);\n}\n`;\nconst result = await transform(css, {\n beautify: true,\n inlineCssVariables: true,\n computeCalcExpression: true\n});\n\nconsole.log(result.code);\n\n```" + }, + { + "kind": "text", + "text": "\n\noutput\n\n" + }, + { + "kind": "code", + "text": "```css\n._19_u :focus {\n color: navy\n}\n```" + }, + { + "kind": "text", + "text": "\n\n### Color minification\n\nCSS colors level 4&5 are fully supported. the library will convert between all supported color formats.\nit can also compute relative colors and color-mix() functions.\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform, ColorType, TransformOptions} from '@tbela99/css-parser';\n\nconst options: TransformOptions = {\n\n beautify: true,\n};\n\nconst css = `\n\n.color1 {\n --color1: color(from green srgb r g b / 0.5);\n --color2: color(from #123456 xyz calc(x + 0.75) y calc(z - 0.35));\n --color3: \ncolor(display-p3 1 0.5 0);\n--color4: color(display-p3 1 0.5 0 / .5);\n--color5: color-mix(in lab, plum 60%, #123456 50%);\n--color6: color-mix(in lch longer hue, hsl(200deg 50% 80%), coral);\n}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + }, + { + "kind": "text", + "text": "\n\noutput\n\n" + }, + { + "kind": "code", + "text": "```css\n.color1 {\n --color1: #00800080;\n --color2: red;\n --color3: #ff7600;\n --color4: #ff760080;\n --color5: #816d9d;\n --color6: #88ca86\n}\n```" + }, + { + "kind": "text", + "text": "\n\nthe color result color format can be specified using the " + }, + { + "kind": "code", + "text": "`convertColor`" + }, + { + "kind": "text", + "text": " option.\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform, ColorType, TransformOptions} from '@tbela99/css-parser';\n\nconst options: TransformOptions = {\n\n beautify: true,\n convertColor: ColorType.OKLCH\n};\n\nconst css = `\n\n.color1 {\n --color1: color(from green srgb r g b / 0.5);\n --color2: color(from #123456 xyz calc(x + 0.75) y calc(z - 0.35));\n --color3: \ncolor(display-p3 1 0.5 0);\n--color4: color(display-p3 1 0.5 0 / .5);\n--color5: color-mix(in lab, plum 60%, #123456 50%);\n--color6: color-mix(in lch longer hue, hsl(200deg 50% 80%), coral);\n}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + }, { "kind": "text", - "text": "## Features\n\na non-exhaustive list of features is provided below:\n\n- no dependency\n- fault-tolerant parser that tries to fix invalid tokens.\n- CSS validation based upon mdn-data\n- fast and efficient minification without unsafe transforms\n- minify colors: color(), lab(), lch(), oklab(), oklch(), color-mix(), light-dark(), system colors and\n relative color\n- convert colors to any supported color format\n- automatically generate nested css rules\n- convert nested css rules to legacy syntax\n- generate sourcemap\n- compute css shorthands.\n- minify css transform functions: translate(), scale(), etc.\n- evaluate math functions: calc(), clamp(), min(), max(), etc.\n- inline css variables\n- remove duplicate properties\n- flatten @import rules\n- experimental CSS prefix removal" - } - ], - "frontmatter": { - "group": "Documents", - "slug": "/features", - "category": "Guides" - } - }, - { - "id": 4, - "name": "Getting started", - "variant": "document", - "kind": 8388608, - "flags": {}, - "content": [ + "text": "\n\noutput\n\n" + }, + { + "kind": "code", + "text": "```css\n.color1 {\n --color1: oklch(.519752 .176858 142.495/50%);\n --color2: oklch(.473385 .954378 47.1833);\n --color3: oklch(.742513 .219804 51.1597);\n --color4: oklch(.742513 .219804 51.1597/50%);\n --color5: oklch(.572282 .075648 303.425);\n --color6: oklch(.77643 .115501 143.964)\n}\n```" + }, { "kind": "text", - "text": "## Installation\n\n### From npm\n\n" + "text": "\n\n### Transform functions\n\ncompute css transform functions and preserve the shortest possible value. this feature is enabled by default. it can be disabled using " }, { "kind": "code", - "text": "```shell\n$ npm install @tbela99/css-parser\n```" + "text": "`{computeTransform: false}`" }, { "kind": "text", - "text": "\n\n### From jsr\n\n" + "text": ".\n\n" }, { "kind": "code", - "text": "```shell\n$ deno add @tbela99/css-parser\n```" + "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n\n.now {\n transform: scaleX(1) scaleY(1) ;\n}\n\n .now1 {\n transform: scaleX(1.5) scaleY(2);\n}\n`;\nconst result = await transform(css);\n\nconsole.log(result.code);\n\n```" }, { "kind": "text", - "text": "\n### As web module\n\nthe library can be imported as a module in the browser\n\n" + "text": "\n\noutput\n" }, { "kind": "code", - "text": "```html\n\n```" + "text": "```css\n.now{transform:none}.now1{transform:scale(1.5,2)}\n```" }, { "kind": "text", - "text": "\n\n### As umd module\n\nit can also be imported as umd module\n\n" + "text": "\n\n### CSS values\n\ndimension and numeric values are minified.\n\n" }, { "kind": "code", - "text": "```html\n\n\n\n```" - } - ], - "frontmatter": { - "group": "Documents", - "slug": "/install", - "category": "Guides" - } - }, - { - "id": 5, - "name": "Usage", - "variant": "document", - "kind": 8388608, - "flags": {}, - "content": [ + "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.now {\n width: 0px;\n}\n`;\nconst result = await transform(css);\n\nconsole.log(result.code);\n\n```" + }, { "kind": "text", - "text": "## Usage\n\n### From node, bun or deno\n\n" + "text": "\n\noutput\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n\n.ruler {\n\n height: 10px;\n background-color: orange\n}\n.hsl { color: #b3222280; }\n`;\n\nconst result = await transform(css, {\n\n beautify: true,\n convertColor: ColorType.SRGB\n});\n\nconsole.debug(result.code);\n```" + "text": "```css\n.now{width:0}\n```" }, { "kind": "text", - "text": "\n\nthe library exposes three entry points\n\n- " + "text": "\n\n### Redundant declarations\n\nby default, only the last declaration is preserved.\nto preserve all declarations, pass the option " }, { "kind": "code", - "text": "`@tbela99/css-parser`" + "text": "`{removeDuplicateDeclarations: false}`" }, { "kind": "text", - "text": " or " + "text": ".\n\n" }, { "kind": "code", - "text": "`@tbela99/css-parser/node`" + "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n\n width: 100%;\n width: calc(100% + 40px);\n margin-left: 20px;\n margin-left: min(100% , 20px)\n}\n \n`;\nconst result = await transform(css, {\n\n beautify: true,\n validation: true,\n removeDuplicateDeclarations: false\n }\n);\n\nconsole.log(result.code);\n\n```" }, { "kind": "text", - "text": " which relies on node fs and fs/promises to read files\n- " + "text": "\noutput\n\n" }, { "kind": "code", - "text": "`@tbela99/css-parser/cjs`" + "text": "```css\n.table {\n width: 100%;\n width: calc(100% + 40px);\n margin-left: 20px;\n margin-left: min(100%,20px)\n}\n```" }, { "kind": "text", - "text": " same as the previous except it is exported as a commonjs module\n- " + "text": "\n\nto preserve only specific declarations, pass an array of declaration names to preserve\n\n" }, { "kind": "code", - "text": "`@tbela99/css-parser/web`" + "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n\n width: 100%;\n width: calc(100% + 40px);\n margin-left: 20px;\n margin-left: min(100% , 20px)\n}\n \n`;\nconst result = await transform(css, {\n\n beautify: true,\n validation: true,\n removeDuplicateDeclarations: ['width']\n}\n);\n\nconsole.log(result.code);\n\n```" }, { "kind": "text", - "text": " which relies on the web fetch api to read files\n\nthe default file loader can be overridden via the options [ParseOptions.load](" + "text": "\noutput\n\n" }, { - "kind": "relative-link", - "text": "../interfaces/node.ParserOptions.html#load" + "kind": "code", + "text": "```css\n.table {\n width: 100%;\n width: calc(100% + 40px);\n margin-left: min(100%,20px)\n}\n```" }, { "kind": "text", - "text": ") or [TransformOptions.load](" + "text": "\n\n### Merging adjacent rules\n\nadjacent rules with common declarations and at-rules with the same name and prelude are merged.\n\n" }, { - "kind": "relative-link", - "text": "../interfaces/node.TransformOptions.html#load" + "kind": "code", + "text": "```ts\n\nconst options: TransformOptions = {\n\n beautify: true,\n validation: true,\n removeDuplicateDeclarations: ['background', 'width']\n};\n\nconst css = `\n\n@media tv {\n\n .rule {\n \n width: 100%;\n width: calc(100% + 40px);\n margin-left: min(100% , 20px)\n }\n}\n \n@media tv {\n\n .rule {\n \n margin-left: min(100% , 20px)\n }\n}\n\n #converted-text { color: color(from green display-p3 r calc(g + .2) b ); \n background: -o-linear-gradient(top, white, black);\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));\n background: linear-gradient(to bottom, white, black);}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" }, { "kind": "text", - "text": ") of parse() and transform() functions\n\n### From the web browser\n\nload as javascript module\n\n" + "text": "\n\noutput\n\n" }, { "kind": "code", - "text": "```html\n\n```" + "text": "```css\n@media tv {\n .rule {\n width: 100%;\n width: calc(100% + 40px);\n margin-left: min(100%,20px)\n }\n}\n#converted-text {\n color: #00b400;\n background: -o-linear-gradient(top,#fff,#000);\n background: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#000));\n background: linear-gradient(to bottom,#fff,#000)\n}\n```" }, { "kind": "text", - "text": "\n\nload as umd module\n\n" + "text": "\n\n### Conditional wrapping or unwrapping selectors using :is()\n\nthis feature is enabled by default. it can be disabled by turning off minification using " }, { "kind": "code", - "text": "```html\n\n\n\n```" + "text": "`{minify: false}`" }, { "kind": "text", - "text": "\n\n### Parsing\n\nparsing is achieved using the parse() or transform() function. the transform() function will also provide the css code as a result which comes handing if you do not want an additional step of rendering the ast.\n\n" + "text": ".\nit will attempt to wrap or unwrap rules using :is() and use the shortest possible selector.\n\n" }, { "kind": "code", - "text": "```ts\nimport {parse, render} from '@tbela99/css-parser';\n\nconst css = `...`;\n\nconst result = await parse(css);\nconsole.debug(result.ast);\nconsole.debug(result.stats);\n\nconst rendered = render(result.ast);\nconsole.debug(rendered.code);\nconsole.debug(result.stats);\n````\n\nor\n\n```" + "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n border-collapse: collapse;\n width: 100%;\n}\n \n.table td, .table th, .table tr {\n border: 1px solid #ddd;\n padding: 8px;\n}\n`;\nconst result = await transform(css, {\n\n beautify: true,\n nestingRules: false\n }\n);\n\nconsole.log(result.code);\n\n```" }, { "kind": "text", - "text": "ts\nimport " + "text": "\n\noutput\n" + }, + { + "kind": "code", + "text": "```css\n.table {\n border-collapse: collapse;\n width: 100%\n}\n.table:is(td,th,tr) {\n border: 1px solid #ddd;\n padding: 8px\n}\n```" }, { "kind": "text", - "text": "{transform" + "text": "\n\n### CSS Nesting\n\nthis feature is enabled by default. it can be disabled using " + }, + { + "kind": "code", + "text": "`{nestingRules: false}`" }, { "kind": "text", - "text": "}" + "text": ".\nwhen enabled, css rules are automatically nested.\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n border-collapse: collapse;\n width: 100%;\n}\n \n.table td, .table th {\n border: 1px solid #ddd;\n padding: 8px;\n}\n \n.table tr:nth-child(even){background-color: #f2f2f2;}\n \n.table tr:hover {background-color: #ddd;}\n \n.table th {\n padding-top: 12px;\n padding-bottom: 12px;\n text-align: left;\n background-color: #4CAF50;\n color: white;\n}\n`;\nconst result = await transform(css, {\n\n beautify: true,\n convertColor: ColorType.OKLCH\n }\n);\n\nconsole.log(result.code);\n\n```" }, { "kind": "text", - "text": " from '@tbela99/css-parser';\n\nconst css = " + "text": "\n\noutput\n" }, { "kind": "code", - "text": "`...`" + "text": "```css\n.table {\n border-collapse: collapse;\n width: 100%;\n & td,& th {\n border: 1px solid oklch(.897547 0 0);\n padding: 8px\n }\n & tr {\n &:nth-child(2n) {\n background-color: oklch(.961151 0 0)\n }\n &:hover {\n background-color: oklch(.897547 0 0)\n }\n }\n & th {\n padding-top: 12px;\n padding-bottom: 12px;\n text-align: left;\n background-color: oklch(.673098 .162442 144.208);\n color: oklch(1 0 0)\n }\n}\n```" }, { "kind": "text", - "text": ";\n\nconst result = await transform(css);\nconsole.debug(result.ast);\nconsole.debug(result.code);\nconsole.debug(result.stats);\n" + "text": "\n\n### UTF-8 escape sequence\n\nutf-8 escape sequences are decoded and replaced by their corresponding characters.\n\n### Experimental CSS prefix removal\n\nthis feature is disabled by default. the prefixed versions of the css gradient functions are not supported.\n\n" + }, + { + "kind": "code", + "text": "```ts \n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n::-webkit-input-placeholder {\n color: gray;\n }\n \n ::-moz-placeholder {\n color: gray;\n }\n \n :-ms-input-placeholder {\n color: gray;\n }\n \n ::-ms-input-placeholder {\n color: gray;\n }\n \n ::placeholder {\n color: gray;\n }\n \n @supports selector(:-ms-input-placeholder) {\n \n \n :-ms-input-placeholder {\n color: gray;\n }\n }\n\n@media (-webkit-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx) {\n .image {\n background-image: url(image@2x.png);\n }\n \n }\n \n \n @-webkit-keyframes bar {\n \n from, 0% {\n \n height: 10px;\n }\n }\n \n @keyframes bar {\n \n from, 0% {\n \n height: 10px;\n }\n }\n .example {\n \n -moz-animation: bar 1s infinite;\n display: -ms-grid;\n display: grid;\n -webkit-transition: all .5s;\n -o-transition: all .5s;\n transition: all .5s;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background: -o-linear-gradient(top, white, black);\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));\n background: linear-gradient(to bottom, white, black);\n }\n \n .site{\n display:-ms-grid;\n display:grid; -ms-grid-columns:2fr 1fr;\n grid-template-columns:2fr 1fr;\n grid-template-areas:\"header header\"\n \"title sidebar\"\n \"main sidebar\"\n \"footer footer\";\n }\n .site > *{padding:30px; color:#fff; font-size:20px;}\n .mastheader{\n -ms-grid-row:1;\n -ms-grid-column:1;\n -ms-grid-column-span:2;\n grid-area:header;\n }\n .page-title{\n -ms-grid-row:2;\n -ms-grid-column:1;\n grid-area:title;\n }\n .main-content{\n -ms-grid-row:3;\n -ms-grid-column:1;\n grid-area:main;\n }\n .sidebar{\n -ms-grid-row:2;\n -ms-grid-row-span:2;\n -ms-grid-column:2;\n grid-area:sidebar;\n }\n .footer{\n -ms-grid-row:4;\n -ms-grid-column:1;\n -ms-grid-column-span:2;\n grid-area:footer;\n }\n`;\nconst result = await transform(css, {\n\n beautify: true,\n removePrefix: true\n }\n);\n\nconsole.log(result.code);\n```" + }, + { + "kind": "text", + "text": "\n\noutput\n" + }, + { + "kind": "code", + "text": "```css\n::placeholder {\n color: grey\n}\n@supports selector(::placeholder) {\n ::placeholder {\n color: grey\n }\n}\n@media (min-resolution:2x),(-o-min-device-pixel-ratio:2/1),(min-resolution:2x) {\n .image {\n background-image: url(image@2x.png)\n }\n}\n@keyframes bar {\n 0% {\n height: 10px\n }\n}\n.example,.site {\n display: grid\n}\n.site {\n grid-template-columns: 2fr 1fr;\n grid-template-areas: \"header header\"\"title sidebar\"\"main sidebar\"\"footer footer\"\n}\n.example {\n animation: bar 1s infinite;\n transition: .5s;\n user-select: none;\n background: linear-gradient(to bottom,#fff,#000)\n}\n.site>* {\n padding: 30px;\n color: #fff;\n font-size: 20px\n}\n.mastheader {\n grid-row: 1;\n grid-column: 1;\n grid-column-end: 2;\n grid-area: header\n}\n.page-title {\n grid-row: 2;\n grid-column: 1;\n grid-area: title\n}\n.main-content {\n grid-row: 3;\n grid-column: 1;\n grid-area: main\n}\n.sidebar {\n grid-row: 2;\n grid-row-end: 2;\n grid-column: 2;\n grid-area: sidebar\n}\n.footer {\n grid-row: 4;\n grid-column: 1;\n grid-column-end: 2;\n grid-area: footer\n}\n```" + }, + { + "kind": "text", + "text": "\n\n### Shorthands\n\nshorthand properties are computed and default values are removed.\n\n" + }, + { + "kind": "code", + "text": "```ts\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n\n margin-left: 25px;\n margin-top: 20px;\n margin-right: 25px;\n margin-bottom: 15px;\n}\n \n`;\nconst result = await transform(css, {\n\n beautify: true,\n }\n);\n\nconsole.log(result.code);\n\n```" + }, + { + "kind": "text", + "text": "\n\noutput\n\n" }, { "kind": "code", - "text": "````\n\n### Parsing files\n\nthe parseFile() and transformFile() functions can be used to parse files.\nthey both accept a file url or path as first argument.\n\n```ts\nimport {transformFile} from '@tbela99/css-parser';\n\nconst css = `https://docs.deno.com/styles.css`;\n\nlet result = await transformFile(css);\nconsole.debug(result.code);\n\n// load file as readable stream\nresult = await transformFile(css, true);\nconsole.debug(result.code);\n```\n\n### Parsing from a Readable Stream\n\nthe parse() and transform() functions accept a string or readable stream as first argument.\n\n```ts\nimport {parse} from '@tbela99/css-parser';\nimport {Readable} from \"node:stream\";\n\n// usage: node index.ts < styles.css or cat styles.css | node index.ts\n\nconst readableStream = Readable.toWeb(process.stdin);\nconst result = await parse(readableStream, {beautify: true});\n\nconsole.log(result.ast);\n```\n\na response body object can also be passed to parseFile() or transformFile() functions\n\n```ts\n\nimport {transformFile} from '@tbela99/css-parser';\n\nconst response = await fetch(`https://docs.deno.com/styles.css`);\nconst result = await transformFile(response.body); // or parse(response.body)\nconsole.debug(result.code);\n\n```\n### Rendering css\n\n[rendering options](../interfaces/node.RenderOptions.html) can be passed to both transform() and render() functions.\n\n#### Pretty printing\nby default css output is minified. that behavior can be changed by passing the `{beautify:true}` option.\n\n```ts\n\nconst result = await transform(css, {beautify: true}); \n// or render(ast, {beautify: true})\n\nconsole.log(result.code);\n\n```\n\n#### Preserving license comments\n\nby default all comments are removed. they can be preserved by passing the `{removeComments:false}` option,\n\nif you only want to preserve license comments, and remove other comments, you can pass `{preserveLicense:true}` instead.\n\n```ts\n\nconst css = `/*!\n * Bootstrap v5.3.3 (https://getbootstrap.com/)\n * Copyright 2011-2024 The Bootstrap Authors\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n[data-bs-theme=dark] {\n color-scheme: dark;\n \n ...`;\n\nconst result = await transform(css, {preserveLicense: true}); \n```\n\n#### Converting colors\n\ncolor conversion is controlled by the `convertColor` option. colors are converted to the HEX format by default.\nthat behavior can be changed by passing the chosen color type to the convertColor option:\n\n- ColorType.HEX\n- ColorType.RGB or ColorType.RGBA\n- ColorType.HSL or ColorType.HSLA\n- ColorType.HWB or ColorType.HWBA\n- ColorType.CMYK or ColorType.DEVICE_CMYK\n- ColorType.SRGB\n- ColorType.SRGB_LINEAR\n- ColorType.DISPLAY_P3\n- ColorType.PROPHOTO_RGB\n- ColorType.A98_RGB\n- ColorType.REC2020\n- ColorType.XYZ or ColorType.XYZ_D65\n- ColorType.XYZ_D50\n- ColorType.LAB\n- ColorType.LCH\n- ColorType.OKLAB\n- ColorType.OKLCH\n\n```ts\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n.color-map {\n\ncolor: lab(from #123456 calc(l + 10) a b);\nbackground-color: lab(from hsl(180 100% 50%) calc(l - 10) a b);\n}\n`;\nconst result = await transform(css, {\n beautify: true,\n convertColor: ColorType.RGB,\n computeCalcExpression: true\n});\n\nconsole.log(result.code);\n\n// .color-map {\n// color: rgb(45 74 111);\n// background-color: rgb(0 226 226)\n// }\n```" + "text": "```css\n.table {\n margin: 20px 25px 15px\n}\n```" + }, + { + "kind": "text", + "text": "\n\n#### Computed shorthands properties\n\nlist of computed shorthands properties:\n\n- [ ] ~all~\n- [x] animation\n- [x] background\n- [x] border\n- [ ] border-block-end\n- [ ] border-block-start\n- [x] border-bottom\n- [x] border-color\n- [ ] border-image\n- [ ] border-inline-end\n- [ ] border-inline-start\n- [x] border-left\n- [x] border-radius\n- [x] border-right\n- [x] border-style\n- [x] border-top\n- [x] border-width\n- [x] column-rule\n- [x] columns\n- [x] container\n- [ ] contain-intrinsic-size\n- [x] flex\n- [x] flex-flow\n- [x] font\n- [ ] font-synthesis\n- [ ] font-variant\n- [x] gap\n- [ ] grid\n- [ ] grid-area\n- [ ] grid-column\n- [ ] grid-row\n- [ ] grid-template\n- [x] inset\n- [x] list-style\n- [x] margin\n- [ ] mask\n- [ ] offset\n- [x] outline\n- [x] overflow\n- [x] padding\n- [ ] place-content\n- [ ] place-items\n- [ ] place-self\n- [ ] scroll-margin\n- [ ] scroll-padding\n- [ ] scroll-timeline\n- [x] text-decoration\n- [x] text-emphasis\n- [x] transition\n\n------\n[← Usage](" + }, + { + "kind": "relative-link", + "text": "./usage.md", + "target": 4 + }, + { + "kind": "text", + "text": ") | [Custom transform →](" + }, + { + "kind": "relative-link", + "text": "./transform.md", + "target": 6 + }, + { + "kind": "text", + "text": ")" } ], "frontmatter": { "group": "Documents", - "slug": "/usage", "category": "Guides" } }, { - "id": 6, - "name": "Minification", + "id": 7, + "name": "Custom transform", "variant": "document", "kind": 8388608, "flags": {}, "content": [ { "kind": "text", - "text": "## Minification\n\nthe minification process is the default behavior. it applies to both the ast and the css output.\nit can be disabled by setting " + "text": "## Custom transform\n\nvisitors are used to alter the ast tree produced by the parser. for more information about the visitor object see the [typescript definition](" + }, + { + "kind": "relative-link", + "text": "../docs/interfaces/node.VisitorNodeMap.html", + "target": 14 + }, + { + "kind": "text", + "text": ")\n\n## Visitors order\n\nvisitors can be called when the node is entered, visited or left.\n\n" }, { "kind": "code", - "text": "`{minify:false}`" + "text": "```ts\n\nconst options: ParserOptions = {\n \n visitor: [\n {\n\n AtRule: [\n // called when entering a node\n {\n type: WalkerEvent.Enter,\n handler: (node: AstAtRule): AstAtRule => {\n\n console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n },\n // called when leaving a node\n {\n\n type: WalkerEvent.Leave,\n handler: (node: AstAtRule): AstAtRule => {\n\n console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`)\n return node\n }\n },\n // called after node enter handlers but before node leave handlers\n (node: AstAtRule): AstAtRule => {\n\n console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n }\n ]\n }\n ]\n}\n```" }, { "kind": "text", - "text": " in the options.\n\nindividual flags can be set to control specific minification features.\n\n### Keyframes\n\nkeyframes rules are minified.\n\n" + "text": "\n\n### Examples\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, TransformOptions} from \"@tbela99/css-parser\";\n\nconst options: TransformOptions = {\n\n beautify: true,\n};\n\nconst css = `@keyframes slide-in {\n from {\n transform: translateX(0%);\n }\n\n 100% {\n transform: translateX(100%);\n }\n}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + "text": "```ts\n\nimport {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n visitor: [\n {\n\n AtRule: [\n (node: AstAtRule): AstAtRule => {\n\n console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }, {\n\n media: (node: AstAtRule): AstAtRule => {\n\n console.error(`> visiting only '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n }, {\n\n type: WalkerEvent.Leave,\n handler: (node: AstAtRule): AstAtRule => {\n\n console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`)\n return node\n }\n },\n {\n type: WalkerEvent.Enter,\n handler: (node: AstAtRule): AstAtRule => {\n\n console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n }]\n }] as VisitorNodeMap[]\n};\n\nconst css = `\n\n@media screen {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n }\n}\n\n@supports (height: 30pt) {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n }\n}\n`;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n// > enter '@media' node at position 3:1\n// > visiting '@media' node at position 3:1\n// > visiting only '@media' node at position 3:1\n// > leaving '@media' node at position 3:1\n// > enter '@supports' node at position 11:1\n// > visiting '@supports' node at position 11:1\n// > leaving '@supports' node at position 11:1\n\n```" }, { "kind": "text", - "text": "\n\noutput\n" + "text": "\n\n## At rule visitor\n\nExample: change media at-rule prelude\n\n" }, { "kind": "code", - "text": "```css\n@keyframes slide-in {\n 0% {\n transform: translateX(0)\n }\n to {\n transform: translateX(100%)\n }\n}\n```" + "text": "```ts\n\nimport {transform, AstAtRule, ParserOptions} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n visitor: {\n\n AtRule: {\n\n media: (node: AstAtRule): AstAtRule => {\n\n node.val = 'tv,screen';\n return node\n }\n }\n }\n};\n\nconst css = `\n\n@media screen {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n }\n}\n`;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n// @media tv,screen{.foo{height:calc(40px/3)}}\n```" }, { "kind": "text", - "text": "\n\n### CSS variables inlining\n\nthis feature is disabled by default.\nit can be enabled using " + "text": "\n\n### Declaration visitor\n\nExample: add 'width: 3px' everytime a declaration with the name 'height' is found\n\n" }, { "kind": "code", - "text": "`{inlineCssVariables: true}`" + "text": "```ts\n\nimport {transform, parseDeclarations} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n removeEmpty: false,\n visitor: {\n\n Declaration: {\n\n // called only for height declaration\n height: (node: AstDeclaration): AstDeclaration[] => {\n \n return [\n node,\n {\n\n typ: EnumToken.DeclarationNodeType,\n nam: 'width',\n val: [\n {\n typ: EnumToken.LengthTokenType,\n val: 3,\n unit: 'px'\n }\n ]\n }\n ];\n }\n }\n }\n};\n\nconst css = `\n\n.foo {\n height: calc(100px * 2/ 15);\n}\n.selector {\ncolor: lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180))\n}\n`;\n\nconsole.debug(await transform(css, options));\n\n// .foo{height:calc(40px/3);width:3px}.selector{color:#0880b0}\n```" }, { "kind": "text", - "text": ".\nthe CSS variables must be defined only once, and they must be defined in 'html' or ':root' selectors.\n\n" + "text": "\n\nExample: rename 'margin' to 'padding' and 'height' to 'width'\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n:root {\n--color: green;\n}\n._19_u :focus {\n color: hsl(from var(--color) calc(h * 2) s l);\n}\n`;\nconst result = await transform(css, {\n beautify: true,\n convertColor: false,\n inlineCssVariables: true,\n computeCalcExpression: false\n});\n\nconsole.log(result.code);\n\n```" + "text": "```ts\n\nimport {AstDeclaration, ParserOptions, transform} from \"../src/node.ts\";\nconst options: ParserOptions = {\n\n visitor: {\n\n // called for every declaration\n Declaration: (node: AstDeclaration): null => {\n\n\n if (node.nam == 'height') {\n\n node.nam = 'width';\n }\n\n else if (node.nam == 'margin') {\n\n node.nam = 'padding'\n }\n\n return null;\n }\n }\n};\n\nconst css = `\n\n.foo {\n height: calc(100px * 2/ 15);\n margin: 10px;\n}\n.selector {\n\nmargin: 20px;}\n`;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n// .foo{width:calc(40px/3);padding:10px}.selector{padding:20px}\n```" }, { "kind": "text", - "text": "\n\noutput\n" + "text": "\n\n### Rule visitor\n\nExample: add 'width: 3px' to every rule with the selector '.foo'\n\n" }, { "kind": "code", - "text": "```css\n._19_u :focus {\n color: hsl(from green calc((h*2)) s l)\n}\n```" + "text": "```ts\n\nimport {transform, parseDeclarations} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n removeEmpty: false,\n visitor: {\n\n Rule: async (node: AstRule): Promise => {\n\n if (node.sel == '.foo') {\n\n node.chi.push(...await parseDeclarations('width: 3px'));\n return node;\n }\n\n return null;\n }\n }\n};\n\nconst css = `\n\n.foo {\n .foo {\n }\n}\n`;\n\nconsole.debug(await transform(css, options));\n\n// .foo{width:3px;.foo{width:3px}}\n```" }, { "kind": "text", - "text": "\n\n### Math functions\n\nthis feature is enabled by default. it can be disabled using " + "text": "\n\n### KeyframesRule visitor\n\nkeyframes rule visitor is called on each keyframes rule node.\n\n### KeyframesAtRule visitor\n\nthe keyframes at-rule visitor is called on each keyframes at-rule node. the visitor can be a function or an object with a property named after the keyframes at-rule prelude.\n\n" }, { "kind": "code", - "text": "`{computeCalcExpression: false}`" + "text": "```ts\n\nimport {transform} from \"@tbela99/css-parser\";\nconst css = `\n@keyframes slide-in {\n from {\n transform: translateX(0%);\n }\n\n to {\n transform: translateX(100%);\n }\n}\n@keyframes identifier {\n 0% {\n top: 0;\n left: 0;\n }\n 30% {\n top: 50px;\n }\n 68%,\n 72% {\n left: 50px;\n }\n 100% {\n top: 100px;\n left: 100%;\n }\n}\n `;\n\nconst result = await transform(css, {\n removePrefix: true,\n beautify: true,\n visitor: {\n KeyframesAtRule: {\n slideIn(node) {\n node.val = 'slide-in-out';\n return node;\n }\n }\n }\n});\n\n```" }, { "kind": "text", - "text": ".\n[math functions](" + "text": "\n\n### Value visitor\n\nthe value visitor is called on each token of the selector node, declaration value and the at-rule prelude, etc.\n\n" + }, + { + "kind": "code", + "text": "```ts\n\nimport {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n visitor: {\n\n Value: (node: Token): Token => {\n\n console.error(`> visiting token at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n } as VisitorNodeMap\n};\n```" + }, + { + "kind": "text", + "text": "\n### Generic visitor\n\ngeneric token visitor is a function whose name is a keyof [EnumToken](" }, { "kind": "relative-link", - "text": "../variables/node.mathFuncs.html" + "text": "../docs/enums/node.EnumToken.html", + "target": 15 }, { "kind": "text", - "text": ") such as " + "text": "). it is called for every token of the specified type.\n\n" }, { "kind": "code", - "text": "`calc()`" + "text": "```ts\n\nimport {transform, parse, parseDeclarations} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n inlineCssVariables: true,\n visitor: {\n\n // Stylesheet node visitor\n StyleSheetNodeType: async (node) => {\n\n // insert a new rule\n node.chi.unshift(await parse('html {--base-color: pink}').then(result => result.ast.chi[0]))\n },\n ColorTokenType: (node) => {\n\n // dump all color tokens\n // console.debug(node);\n },\n FunctionTokenType: (node) => {\n\n // dump all function tokens\n // console.debug(node);\n },\n DeclarationNodeType: (node) => {\n\n // dump all declaration nodes\n // console.debug(node);\n }\n }\n};\n\nconst css = `\n\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n`;\n\nconsole.debug(await transform(css, options));\n\n// body {color:#f3fff0}\n```" }, { "kind": "text", - "text": " are evaluated when enabled using " + "text": "\n\n### Example of visitor\n\na visitor that inlines all images under a specific size\n\n" }, { "kind": "code", - "text": "`{computeCalcExpression: true}`" + "text": "```ts\nimport {\n EnumToken,\n FunctionURLToken,\n load,\n StringToken,\n Token,\n transform,\n UrlToken,\n ResponseType,\n AstDeclaration,\n AstNode\n} from \"@tbela99/css-parser\";\nconst css = `\n.goal .bg-indigo {\n background: url(/img/animatecss-opengraph.jpg);\n}\n`;\n\n// 35 kb or something\nconst maxSize = 35 * 1024;\n// accepted images\nconst extensions = ['jpg', 'gif', 'png', 'webp']\nconst result = await transform(css, {\n visitor: {\n UrlFunctionTokenType: async (node: FunctionURLToken, parent : AstNode) => {\n\n if (parent.typ == EnumToken.DeclarationNodeType) {\n\n const t = node.chi.find(t => t.typ != EnumToken.WhitespaceTokenType && t.typ != EnumToken.CommaTokenType) as Token;\n \n if (t == null) {\n \n return;\n }\n\n const url = t.typ == EnumToken.StringTokenType ? (t as StringToken).val.slice(1, -1) : (t as UrlToken).val;\n\n if (url.startsWith('data:')) {\n\n return;\n }\n\n const matches = /(.*?\\/)?([^/.]+)\\.([^?#]+)([?#].*)?$/.exec(url);\n\n if (matches == null || !extensions.includes(matches[3].toLowerCase())) {\n\n return;\n }\n\n const buffer = await load(url, '.', ResponseType.ArrayBuffer) as ArrayBuffer ;\n\n if (buffer.byteLength > maxSize) {\n\n return\n }\n\n Object.assign(t, {typ: EnumToken.StringTokenType, val: `\"data:image/${matches[3].toLowerCase()};base64,${toBase64(new Uint8Array(buffer))}\"`})\n }\n }\n }\n});\n\nfunction toBase64(arraybuffer: Uint8Array) {\n\n // @ts-ignore\n if (typeof Uint8Array.prototype.toBase64! == 'function') {\n\n // @ts-ignore\n return arraybuffer.toBase64();\n }\n\n let binary = '';\n for (const byte of arraybuffer) {\n binary += String.fromCharCode( byte);\n }\n\n return btoa( binary );\n}\n\nconsole.error(result.code);\n// .goal .bg-indigo{background:url(\"data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QugRXhpZgAA ...\")}\n```" }, { "kind": "text", - "text": ".\n\n" + "text": "\n\n------\n[← Minification](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n:root {\n--color: green;\n}\n._19_u :focus {\n color: hsl(from var(--color) calc(h * 2) s l);\n}\n`;\nconst result = await transform(css, {\n beautify: true,\n inlineCssVariables: true,\n computeCalcExpression: true\n});\n\nconsole.log(result.code);\n\n```" + "kind": "relative-link", + "text": "./minification.md", + "target": 5 }, { "kind": "text", - "text": "\n\noutput\n\n" + "text": ") | [Ast →](" }, { - "kind": "code", - "text": "```css\n._19_u :focus {\n color: navy\n}\n```" + "kind": "relative-link", + "text": "./ast.md", + "target": 7 }, { "kind": "text", - "text": "\n\n### Color minification\n\nCSS colors level 4&5 are fully supported. the library will convert between all supported color formats.\nit can also compute relative colors and color-mix() functions.\n\n" + "text": ")" + } + ], + "frontmatter": { + "group": "Documents", + "category": "Guides" + } + }, + { + "id": 8, + "name": "Ast", + "variant": "document", + "kind": 8388608, + "flags": {}, + "content": [ + { + "kind": "text", + "text": "## Ast node types\n\nthe ast root node returned by the parser is always a [AstStyleSheet](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform, ColorType, TransformOptions} from '@tbela99/css-parser';\n\nconst options: TransformOptions = {\n\n beautify: true,\n};\n\nconst css = `\n\n.color1 {\n --color1: color(from green srgb r g b / 0.5);\n --color2: color(from #123456 xyz calc(x + 0.75) y calc(z - 0.35));\n --color3: \ncolor(display-p3 1 0.5 0);\n--color4: color(display-p3 1 0.5 0 / .5);\n--color5: color-mix(in lab, plum 60%, #123456 50%);\n--color6: color-mix(in lch longer hue, hsl(200deg 50% 80%), coral);\n}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstStyleSheet.html", + "target": 16 }, { "kind": "text", - "text": "\n\noutput\n\n" + "text": ") node.\nthe other nodes\nare [AstRule](" }, { - "kind": "code", - "text": "```css\n.color1 {\n --color1: #00800080;\n --color2: red;\n --color3: #ff7600;\n --color4: #ff760080;\n --color5: #816d9d;\n --color6: #88ca86\n}\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstRule.html", + "target": 17 }, { "kind": "text", - "text": "\n\nthe color result color format can be specified using the " + "text": "), [AstAtRule](" }, { - "kind": "code", - "text": "`convertColor`" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstAtRule.html", + "target": 18 }, { "kind": "text", - "text": " option.\n\n" + "text": "), [AstDeclaration](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform, ColorType, TransformOptions} from '@tbela99/css-parser';\n\nconst options: TransformOptions = {\n\n beautify: true,\n convertColor: ColorType.OKLCH\n};\n\nconst css = `\n\n.color1 {\n --color1: color(from green srgb r g b / 0.5);\n --color2: color(from #123456 xyz calc(x + 0.75) y calc(z - 0.35));\n --color3: \ncolor(display-p3 1 0.5 0);\n--color4: color(display-p3 1 0.5 0 / .5);\n--color5: color-mix(in lab, plum 60%, #123456 50%);\n--color6: color-mix(in lch longer hue, hsl(200deg 50% 80%), coral);\n}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstDeclaration.html", + "target": 19 }, { "kind": "text", - "text": "\n\noutput\n\n" + "text": "), [AstComment](" }, { - "kind": "code", - "text": "```css\n.color1 {\n --color1: oklch(.519752 .176858 142.495/50%);\n --color2: oklch(.473385 .954378 47.1833);\n --color3: oklch(.742513 .219804 51.1597);\n --color4: oklch(.742513 .219804 51.1597/50%);\n --color5: oklch(.572282 .075648 303.425);\n --color6: oklch(.77643 .115501 143.964)\n}\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstComment.html", + "target": 20 }, { "kind": "text", - "text": "\n\n### Transform functions\n\ncompute css transform functions and preserve the shortest possible value. this feature is enabled by default. it can be disabled using " + "text": "), [AstInvalidRule](" }, { - "kind": "code", - "text": "`{computeTransform: false}`" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstInvalidRule.html", + "target": 21 }, { "kind": "text", - "text": ".\n\n" + "text": "), [AstInvalidAtRule](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform, ColorType} from '@tbela99/css-parser';\n\nconst css = `\n\n.now {\n transform: scaleX(1) scaleY(1) ;\n}\n\n .now1 {\n transform: scaleX(1.5) scaleY(2);\n}\n`;\nconst result = await transform(css);\n\nconsole.log(result.code);\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstInvalidAtRule.html", + "target": 22 }, { "kind": "text", - "text": "\n\noutput\n" + "text": "), [AstInvalidDeclaration](" }, { - "kind": "code", - "text": "```css\n.now{transform:none}.now1{transform:scale(1.5,2)}\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstInvalidDeclaration.html", + "target": 23 }, { "kind": "text", - "text": "\n\n### CSS values\n\ndimension and numeric values are minified.\n\n" + "text": ")\n\n## Ast node attributes\n\n### Ast rule attributes\n\n[Ast rule](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.now {\n width: 0px;\n}\n`;\nconst result = await transform(css);\n\nconsole.log(result.code);\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.AstRule.html", + "target": 17 }, { "kind": "text", - "text": "\n\noutput\n\n" + "text": ") _tokens_ attribute is an array\nof [Token](" }, { - "kind": "code", - "text": "```css\n.now{width:0}\n```" + "kind": "relative-link", + "text": "../docs/types/node.Token.html", + "target": 24 }, { "kind": "text", - "text": "\n\n### Redundant declarations\n\nby default, only the last declaration is preserved.\nto preserve all declarations, pass the option " + "text": ") representing the parsed selector.\nthe _sel_ attribute string that contains the rule's selector.\nmodifying the sel attribute does not affect the tokens attribute, and similarly, changes to the tokens attribute do not\nupdate the sel attribute.\n\n" }, { "kind": "code", - "text": "`{removeDuplicateDeclarations: false}`" + "text": "```ts\n\nimport {AstRule, parseDeclarations, ParserOptions, transform, parseDeclarations} from '@tbela99/css-parser';\n\nconst options: ParserOptions = {\n\n visitor: {\n\n async Rule(node: AstRule): AstRule {\n\n node.sel = '.foo,.bar,.fubar';\n\n node.chi.push(...await parseDeclarations('width: 3px'));\n return node;\n }\n }\n};\n\nconst css = `\n\n .foo {\n\n height: calc(100px * 2/ 15); \n } \n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// .foo,.bar,.fubar{height:calc(40px/3);width:3px}\n```" }, { "kind": "text", - "text": ".\n\n" + "text": "\n\n### Ast at-rule attributes\n\n[Ast at-rule](" + }, + { + "kind": "relative-link", + "text": "../docs/interfaces/node.AstAtRule.html", + "target": 18 + }, + { + "kind": "text", + "text": ") _tokens_ attribute is either null or an array\nof [Token](" + }, + { + "kind": "relative-link", + "text": "../docs/types/node.Token.html", + "target": 24 + }, + { + "kind": "text", + "text": ") representing the parsed prelude.\nthe _val_ attribute string that contains the at-rule's prelude.\n\nmodifying the _val_ attribute does not affect the _tokens_ attribute, and similarly, changes to the _tokens_ attribute do not\nupdate the _val_ attribute.\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n\n width: 100%;\n width: calc(100% + 40px);\n margin-left: 20px;\n margin-left: min(100% , 20px)\n}\n \n`;\nconst result = await transform(css, {\n\n beautify: true,\n validation: true,\n removeDuplicateDeclarations: false\n }\n);\n\nconsole.log(result.code);\n\n```" + "text": "```ts\nimport {ParserOptions, transform, AstAtRule} from '@tbela99/css-parser';\n\nconst options: ParserOptions = {\n\n visitor: {\n\n AtRule: {\n\n media: (node: AstAtRule): AstAtRule => {\n\n node.val = 'all';\n return node\n }\n }\n }\n};\n\nconst css = `\n\n@media screen {\n \n .foo {\n\n height: calc(100px * 2/ 15); \n } \n}\n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// .foo{height:calc(40px/3)}\n```" }, { "kind": "text", - "text": "\noutput\n\n" + "text": "\n\n### Ast declaration attributes\n\n[Ast declaration](" + }, + { + "kind": "relative-link", + "text": "../docs/interfaces/node.AstDeclaration.html", + "target": 19 + }, + { + "kind": "text", + "text": ") _nam_ attribute is the declaration name. the _val_\nattribute is an array of [Token](" + }, + { + "kind": "relative-link", + "text": "../docs/types/node.Token.html", + "target": 24 + }, + { + "kind": "text", + "text": ") representing the declaration's value.\n\n" }, { "kind": "code", - "text": "```css\n.table {\n width: 100%;\n width: calc(100% + 40px);\n margin-left: 20px;\n margin-left: min(100%,20px)\n}\n```" + "text": "```ts\n\nimport {AstDeclaration, EnumToken, LengthToken, ParserOptions, transform} from '@tbela99/css-parser';\n\nconst options: ParserOptions = {\n\n visitor: {\n\n Declaration: {\n\n // called only for height declaration\n height: (node: AstDeclaration): AstDeclaration[] => {\n\n\n return [\n node,\n {\n\n typ: EnumToken.DeclarationNodeType,\n nam: 'width',\n val: [\n {\n typ: EnumToken.LengthTokenType,\n val: 3,\n unit: 'px'\n }\n ]\n }\n ];\n }\n }\n }\n};\n\nconst css = `\n\n.foo {\n height: calc(100px * 2/ 15);\n}\n.selector {\ncolor: lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180)) \n}\n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// .foo{height:calc(40px/3);width:3px}.selector{color:#0880b0}\n```" }, { "kind": "text", - "text": "\n\nto preserve only specific declarations, pass an array of declaration names to preserve\n\n" + "text": "\n\n## Ast traversal\n\nast traversal is achieved using [walk()](" + }, + { + "kind": "relative-link", + "text": "../docs/functions/node.walk.html", + "target": 25 + }, + { + "kind": "text", + "text": ")\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n\n width: 100%;\n width: calc(100% + 40px);\n margin-left: 20px;\n margin-left: min(100% , 20px)\n}\n \n`;\nconst result = await transform(css, {\n\n beautify: true,\n validation: true,\n removeDuplicateDeclarations: ['width']\n}\n);\n\nconsole.log(result.code);\n\n```" + "text": "```ts\n\nimport {walk} from '@tbela99/css-parser';\n\nconst css = `\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n\nhtml,\nbody {\n line-height: 1.474;\n}\n\n.ruler {\n\n height: 10px;\n}\n`;\n\nfor (const {node, parent, root} of walk(ast)) {\n\n // do something with node\n}\n```" }, { "kind": "text", - "text": "\noutput\n\n" + "text": "\n\nast traversal can be controlled using a [filter](" + }, + { + "kind": "relative-link", + "text": "../docs/media/node.walk.html#walk", + "target": 26, + "targetAnchor": "walk" + }, + { + "kind": "text", + "text": ") function. the filter function returns a value of type [WalkerOption](" + }, + { + "kind": "relative-link", + "text": "../docs/types/node.WalkerOption.html", + "target": 27 + }, + { + "kind": "text", + "text": ").\nif the filter function returns new nodes, those will also be visited.\n\n" }, { "kind": "code", - "text": "```css\n.table {\n width: 100%;\n width: calc(100% + 40px);\n margin-left: min(100%,20px)\n}\n```" + "text": "```ts\n\nimport {EnumToken, transform, walk, WalkerOptionEnum} from '@tbela99/css-parser';\n\nconst css = `\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n\nhtml,\nbody {\n line-height: 1.474;\n}\n\n.ruler {\n\n height: 10px;\n}\n`;\n\nfunction filter(node) {\n\n if (node.typ == EnumToken.AstRule && node.sel.includes('html')) {\n\n // skip the children of the current node\n return WalkerOptionEnum.IgnoreChildren;\n }\n}\n\nconst result = await transform(css);\nfor (const {node} of walk(result.ast, filter)) {\n\n console.error([EnumToken[node.typ]]);\n}\n\n// [ \"StyleSheetNodeType\" ]\n// [ \"RuleNodeType\" ]\n// [ \"DeclarationNodeType\" ]\n// [ \"RuleNodeType\" ]\n// [ \"DeclarationNodeType\" ]\n// [ \"RuleNodeType\" ]\n// [ \"DeclarationNodeType\" ]\n\n```" }, { "kind": "text", - "text": "\n\n### Merging adjacent rules\n\nadjacent rules with common declarations and at-rules with the same name and prelude are merged.\n\n" + "text": "\n\n### Ast node attributes traversal\n\nthe function [walkValues()](" + }, + { + "kind": "relative-link", + "text": "../docs/functions/node.walkValues.html", + "target": 28 + }, + { + "kind": "text", + "text": ") is used to walk the node attribute's tokens.\n\n" }, { "kind": "code", - "text": "```ts\n\nconst options: TransformOptions = {\n\n beautify: true,\n validation: true,\n removeDuplicateDeclarations: ['background', 'width']\n};\n\nconst css = `\n\n@media tv {\n\n .rule {\n \n width: 100%;\n width: calc(100% + 40px);\n margin-left: min(100% , 20px)\n }\n}\n \n@media tv {\n\n .rule {\n \n margin-left: min(100% , 20px)\n }\n}\n\n #converted-text { color: color(from green display-p3 r calc(g + .2) b ); \n background: -o-linear-gradient(top, white, black);\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));\n background: linear-gradient(to bottom, white, black);}\n `;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n```" + "text": "```ts\n\nimport {AstDeclaration, EnumToken, transform, walkValues} from '@tbela99/css-parser';\n\nconst css = `\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n`;\n\nconst result = await transform(css);\nconst declaration = result.ast.chi[0].chi[0] as AstDeclaration;\n\n// walk the node attribute's tokens in reverse order\nfor (const {value} of walkValues(declaration.val, null, null,true)) {\n\n console.error([EnumToken[value.typ], value.val]);\n}\n\n// [ \"Color\", \"color\" ]\n// [ \"FunctionTokenType\", \"calc\" ]\n// [ \"Number\", 0.15 ]\n// [ \"Add\", undefined ]\n// [ \"Iden\", \"b\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"FunctionTokenType\", \"calc\" ]\n// [ \"Number\", 0.24 ]\n// [ \"Add\", undefined ]\n// [ \"Iden\", \"g\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"Iden\", \"r\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"Iden\", \"display-p3\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"FunctionTokenType\", \"var\" ]\n// [ \"DashedIden\", \"--base-color\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"Iden\", \"from\" ]\n```" }, { "kind": "text", - "text": "\n\noutput\n\n" + "text": "\n\n------\n[← Custom transform](" + }, + { + "kind": "relative-link", + "text": "./transform.md", + "target": 6 + }, + { + "kind": "text", + "text": ") | [Validation →](" + }, + { + "kind": "relative-link", + "text": "./validation.md", + "target": 8 + }, + { + "kind": "text", + "text": ")" + } + ], + "frontmatter": { + "group": "Documents", + "category": "Guides" + } + }, + { + "id": 9, + "name": "Validation", + "variant": "document", + "kind": 8388608, + "flags": {}, + "content": [ + { + "kind": "text", + "text": "## Validation\n\nvalidation is performed using [mdn-data](https://github.com/mdn/data). the validation level can be configured using the [validation](" + }, + { + "kind": "relative-link", + "text": "../docs/interfaces/node.ParserOptions.html#validation", + "target": 29, + "targetAnchor": "validation" + }, + { + "kind": "text", + "text": ") option.\npossible values are _boolean_ or [ValidationLevel](" + }, + { + "kind": "relative-link", + "text": "../docs/enums/node.ValidationLevel.html", + "target": 30 + }, + { + "kind": "text", + "text": "):\n\n- _true_ or [ValidationLevel.All](" + }, + { + "kind": "relative-link", + "text": "../docs/media/node.ValidationLevel.html#all", + "target": 31, + "targetAnchor": "all" + }, + { + "kind": "text", + "text": "): validates all nodes\n- _false_ or [ValidationLevel.None](" + }, + { + "kind": "relative-link", + "text": "../docs/media/node.ValidationLevel.html#none", + "target": 31, + "targetAnchor": "none" + }, + { + "kind": "text", + "text": "): no validation\n- [ValidationLevel.Selector](" + }, + { + "kind": "relative-link", + "text": "../docs/media/node.ValidationLevel.html#selector", + "target": 31, + "targetAnchor": "selector" + }, + { + "kind": "text", + "text": "): validates only selectors\n- [ValidationLevel.AtRule](" + }, + { + "kind": "relative-link", + "text": "../docs/media/node.ValidationLevel.html#atrule", + "target": 31, + "targetAnchor": "atrule" + }, + { + "kind": "text", + "text": "): validates only at-rules\n- [ValidationLevel.Declaration](" + }, + { + "kind": "relative-link", + "text": "../docs/media/node.ValidationLevel.html#declaration", + "target": 31, + "targetAnchor": "declaration" + }, + { + "kind": "text", + "text": "): validates only declarations\n- [ValidationLevel.Default](" }, { - "kind": "code", - "text": "```css\n@media tv {\n .rule {\n width: 100%;\n width: calc(100% + 40px);\n margin-left: min(100%,20px)\n }\n}\n#converted-text {\n color: #00b400;\n background: -o-linear-gradient(top,#fff,#000);\n background: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#000));\n background: linear-gradient(to bottom,#fff,#000)\n}\n```" + "kind": "relative-link", + "text": "../docs/media/node.ValidationLevel.html#default", + "target": 31, + "targetAnchor": "default" }, { "kind": "text", - "text": "\n\n### Conditional wrapping or unwrapping selectors using :is()\n\nthis feature is enabled by default. it can be disabled by turning off minification using " + "text": "): validates selectors and at-rules\n\n" }, { "kind": "code", - "text": "`{minify: false}`" + "text": "```ts\n\nimport {transform, TransformOptions, ValidationLevel} from \"@tbela99/css-parser\";\n\nconst options: TransformOptions = {\n\n validation: ValidationLevel.All,\n beautify: true,\n removeDuplicateDeclarations: 'height'\n};\n\nconst css = `\n\n@supports(height: 30pti) {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n height: 'new';\n height: auto;\n }\n}\n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// @supports (height:30pti) {\n// .foo {\n// height: calc(40px/3);\n// height: auto\n// }\n// }\n```" }, { "kind": "text", - "text": ".\nit will attempt to wrap or unwrap rules using :is() and use the shortest possible selector.\n\n" + "text": "\n\n## Lenient validation\n\nthe parser is lenient. this means that invalid nodes are kept in the ast but they are not rendered.\nthis behavior can be changed using the [lenient](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n border-collapse: collapse;\n width: 100%;\n}\n \n.table td, .table th, .table tr {\n border: 1px solid #ddd;\n padding: 8px;\n}\n`;\nconst result = await transform(css, {\n\n beautify: true,\n nestingRules: false\n }\n);\n\nconsole.log(result.code);\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.ParserOptions.html#lenient", + "target": 29, + "targetAnchor": "lenient" }, { "kind": "text", - "text": "\n\noutput\n" + "text": ") option.\n\n## Validation errors\n\nvalidation errors are returned with [parse result](" }, { - "kind": "code", - "text": "```css\n.table {\n border-collapse: collapse;\n width: 100%\n}\n.table:is(td,th,tr) {\n border: 1px solid #ddd;\n padding: 8px\n}\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.ParseResult.html", + "target": 32 }, { "kind": "text", - "text": "\n\n### CSS Nesting\n\nthis feature is enabled by default. it can be disabled using " + "text": ") or [transform result](" }, { - "kind": "code", - "text": "`{nestingRules: false}`" + "kind": "relative-link", + "text": "../docs/interfaces/node.TransformResult.html", + "target": 33 }, { "kind": "text", - "text": ".\nwhen enabled, css rules are automatically nested.\n\n" + "text": ").\ncheck the [typescript definition](" }, { - "kind": "code", - "text": "```ts\n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n border-collapse: collapse;\n width: 100%;\n}\n \n.table td, .table th {\n border: 1px solid #ddd;\n padding: 8px;\n}\n \n.table tr:nth-child(even){background-color: #f2f2f2;}\n \n.table tr:hover {background-color: #ddd;}\n \n.table th {\n padding-top: 12px;\n padding-bottom: 12px;\n text-align: left;\n background-color: #4CAF50;\n color: white;\n}\n`;\nconst result = await transform(css, {\n\n beautify: true,\n convertColor: ColorType.OKLCH\n }\n);\n\nconsole.log(result.code);\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.ErrorDescription.html", + "target": 34 }, { "kind": "text", - "text": "\n\noutput\n" + "text": ") of ErrorDescription for more details.\n\n\n" }, { "kind": "code", - "text": "```css\n.table {\n border-collapse: collapse;\n width: 100%;\n & td,& th {\n border: 1px solid oklch(.897547 0 0);\n padding: 8px\n }\n & tr {\n &:nth-child(2n) {\n background-color: oklch(.961151 0 0)\n }\n &:hover {\n background-color: oklch(.897547 0 0)\n }\n }\n & th {\n padding-top: 12px;\n padding-bottom: 12px;\n text-align: left;\n background-color: oklch(.673098 .162442 144.208);\n color: oklch(1 0 0)\n }\n}\n```" + "text": "```ts\n\nconsole.debug(result.errors);\n```" }, { "kind": "text", - "text": "\n\n### UTF-8 escape sequence\n\nutf-8 escape sequences are decoded and replaced by their corresponding characters.\n\n### Experimental CSS prefix removal\n\nthis feature is disabled by default. the prefixed versions of the css gradient functions are not supported.\n\n" + "text": "\n\n## Invalid tokens handling\n\n[bad tokens](" }, { - "kind": "code", - "text": "```ts \n\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n::-webkit-input-placeholder {\n color: gray;\n }\n \n ::-moz-placeholder {\n color: gray;\n }\n \n :-ms-input-placeholder {\n color: gray;\n }\n \n ::-ms-input-placeholder {\n color: gray;\n }\n \n ::placeholder {\n color: gray;\n }\n \n @supports selector(:-ms-input-placeholder) {\n \n \n :-ms-input-placeholder {\n color: gray;\n }\n }\n\n@media (-webkit-min-device-pixel-ratio: 2), (-o-min-device-pixel-ratio: 2/1), (min-resolution: 2dppx) {\n .image {\n background-image: url(image@2x.png);\n }\n \n }\n \n \n @-webkit-keyframes bar {\n \n from, 0% {\n \n height: 10px;\n }\n }\n \n @keyframes bar {\n \n from, 0% {\n \n height: 10px;\n }\n }\n .example {\n \n -moz-animation: bar 1s infinite;\n display: -ms-grid;\n display: grid;\n -webkit-transition: all .5s;\n -o-transition: all .5s;\n transition: all .5s;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background: -o-linear-gradient(top, white, black);\n background: -webkit-gradient(linear, left top, left bottom, from(white), to(black));\n background: linear-gradient(to bottom, white, black);\n }\n \n .site{\n display:-ms-grid;\n display:grid; -ms-grid-columns:2fr 1fr;\n grid-template-columns:2fr 1fr;\n grid-template-areas:\"header header\"\n \"title sidebar\"\n \"main sidebar\"\n \"footer footer\";\n }\n .site > *{padding:30px; color:#fff; font-size:20px;}\n .mastheader{\n -ms-grid-row:1;\n -ms-grid-column:1;\n -ms-grid-column-span:2;\n grid-area:header;\n }\n .page-title{\n -ms-grid-row:2;\n -ms-grid-column:1;\n grid-area:title;\n }\n .main-content{\n -ms-grid-row:3;\n -ms-grid-column:1;\n grid-area:main;\n }\n .sidebar{\n -ms-grid-row:2;\n -ms-grid-row-span:2;\n -ms-grid-column:2;\n grid-area:sidebar;\n }\n .footer{\n -ms-grid-row:4;\n -ms-grid-column:1;\n -ms-grid-column-span:2;\n grid-area:footer;\n }\n`;\nconst result = await transform(css, {\n\n beautify: true,\n removePrefix: true\n }\n);\n\nconsole.log(result.code);\n```" + "kind": "relative-link", + "text": "../docs/enums/node.EnumToken.html#badcdotokentype", + "target": 15, + "targetAnchor": "badcdotokentype" }, { "kind": "text", - "text": "\n\noutput\n" + "text": ") are thrown out during parsing. visitor functions can be used to catch and fix invalid tokens.\n\n" }, { "kind": "code", - "text": "```css\n::placeholder {\n color: grey\n}\n@supports selector(::placeholder) {\n ::placeholder {\n color: grey\n }\n}\n@media (min-resolution:2x),(-o-min-device-pixel-ratio:2/1),(min-resolution:2x) {\n .image {\n background-image: url(image@2x.png)\n }\n}\n@keyframes bar {\n 0% {\n height: 10px\n }\n}\n.example,.site {\n display: grid\n}\n.site {\n grid-template-columns: 2fr 1fr;\n grid-template-areas: \"header header\"\"title sidebar\"\"main sidebar\"\"footer footer\"\n}\n.example {\n animation: bar 1s infinite;\n transition: .5s;\n user-select: none;\n background: linear-gradient(to bottom,#fff,#000)\n}\n.site>* {\n padding: 30px;\n color: #fff;\n font-size: 20px\n}\n.mastheader {\n grid-row: 1;\n grid-column: 1;\n grid-column-end: 2;\n grid-area: header\n}\n.page-title {\n grid-row: 2;\n grid-column: 1;\n grid-area: title\n}\n.main-content {\n grid-row: 3;\n grid-column: 1;\n grid-area: main\n}\n.sidebar {\n grid-row: 2;\n grid-row-end: 2;\n grid-column: 2;\n grid-area: sidebar\n}\n.footer {\n grid-row: 4;\n grid-column: 1;\n grid-column-end: 2;\n grid-area: footer\n}\n```" + "text": "```ts\n\nimport {EnumToken, transform, TransformOptions, ValidationLevel} from \"@tbela99/css-parser\";\nconst options: TransformOptions = {\n\n validation: ValidationLevel.All,\n beautify: true,\n removeDuplicateDeclarations: 'height',\n visitor: {\n InvalidRuleTokenType(node) {\n\n console.debug(`> found '${EnumToken[node.typ]}'`);\n },\n InvalidAtRuleTokenType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidDeclarationNodeType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidClassSelectorTokenType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidAttrTokenType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidAtRuleNodeType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n }\n }\n};\n\nconst css = `\n\n@supports(height: 30pti) {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n height: 'new';\n height: auto;\n }\n}\n\n@supports(height: 30pti);\n`;\n\nconst result = await transform(css, options);\n\n//> found 'InvalidDeclarationNodeType' in '' at 8:13\n//> found 'InvalidAtRuleTokenType' in '' at 13:1\n\n```" }, { "kind": "text", - "text": "\n\n### Shorthands\n\nshorthand properties are computed and default values are removed.\n\n" + "text": "\n------\n[← Ast](" }, { - "kind": "code", - "text": "```ts\nimport {transform} from '@tbela99/css-parser';\n\nconst css = `\n\n.table {\n\n margin-left: 25px;\n margin-top: 20px;\n margin-right: 25px;\n margin-bottom: 15px;\n}\n \n`;\nconst result = await transform(css, {\n\n beautify: true,\n }\n);\n\nconsole.log(result.code);\n\n```" + "kind": "relative-link", + "text": "./ast.md", + "target": 7 }, { "kind": "text", - "text": "\n\noutput\n\n" + "text": ") | [CSS Modules](" }, { - "kind": "code", - "text": "```css\n.table {\n margin: 20px 25px 15px\n}\n```" + "kind": "relative-link", + "text": "./css-module.md", + "target": 9 }, { "kind": "text", - "text": "\n\n#### Computed shorthands properties\n\nlist of computed shorthands properties:\n\n- [ ] ~all~\n- [x] animation\n- [x] background\n- [x] border\n- [ ] border-block-end\n- [ ] border-block-start\n- [x] border-bottom\n- [x] border-color\n- [ ] border-image\n- [ ] border-inline-end\n- [ ] border-inline-start\n- [x] border-left\n- [x] border-radius\n- [x] border-right\n- [x] border-style\n- [x] border-top\n- [x] border-width\n- [x] column-rule\n- [x] columns\n- [x] container\n- [ ] contain-intrinsic-size\n- [x] flex\n- [x] flex-flow\n- [x] font\n- [ ] font-synthesis\n- [ ] font-variant\n- [x] gap\n- [ ] grid\n- [ ] grid-area\n- [ ] grid-column\n- [ ] grid-row\n- [ ] grid-template\n- [x] inset\n- [x] list-style\n- [x] margin\n- [ ] mask\n- [ ] offset\n- [x] outline\n- [x] overflow\n- [x] padding\n- [ ] place-content\n- [ ] place-items\n- [ ] place-self\n- [ ] scroll-margin\n- [ ] scroll-padding\n- [ ] scroll-timeline\n- [x] text-decoration\n- [x] text-emphasis\n- [x] transition" + "text": ")" } ], "frontmatter": { "group": "Documents", - "slug": "/minification", "category": "Guides" } }, { - "id": 7, - "name": "Custom transform", + "id": 10, + "name": "CSS modules", "variant": "document", "kind": 8388608, "flags": {}, "content": [ { "kind": "text", - "text": "## Custom transform\n\nvisitors are used to alter the ast tree produced by the parser. for more information about the visitor object see the [typescript definition](" + "text": "# CSS Modules\n\nCSS module is a feature that allows you to use CSS classes in a way that is safe from conflicts with other classes in the same project.\nto enable CSS module support, pass the " }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.VisitorNodeMap.html", - "target": 12 + "kind": "code", + "text": "`module`" }, { "kind": "text", - "text": ")\n\n## Visitors order\n\nvisitors can be called when the node is entered, visited or left.\n\n" + "text": " option to the parse() or transform() function.\nfor a detailed explanation of the module options, see the [module options](" }, { - "kind": "code", - "text": "```ts\n\nimport {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n visitor: [\n {\n\n AtRule: [\n (node: AstAtRule): AstAtRule => {\n\n console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }, {\n\n media: (node: AstAtRule): AstAtRule => {\n\n console.error(`> visiting only '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n }, {\n\n type: WalkerEvent.Leave,\n handler: (node: AstAtRule): AstAtRule => {\n\n console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`)\n return node\n }\n },\n {\n type: WalkerEvent.Enter,\n handler: (node: AstAtRule): AstAtRule => {\n\n console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`);\n return node\n }\n }]\n }] as VisitorNodeMap[]\n};\n\nconst css = `\n\n@media screen {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n }\n}\n\n@supports (height: 30pt) {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n }\n}\n`;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n// > enter '@media' node at position 3:1\n// > visiting '@media' node at position 3:1\n// > visiting only '@media' node at position 3:1\n// > leaving '@media' node at position 3:1\n// > enter '@supports' node at position 11:1\n// > visiting '@supports' node at position 11:1\n// > leaving '@supports' node at position 11:1\n\n```" + "kind": "relative-link", + "text": "../docs/interfaces/node.ParserOptions.html#module", + "target": 29, + "targetAnchor": "module" }, { "kind": "text", - "text": "\n\n## At rule visitor\n\nExample: change media at-rule prelude\n\n" + "text": ") section.\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, AstAtRule, ParserOptions} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n visitor: {\n\n AtRule: {\n\n media: (node: AstAtRule): AstAtRule => {\n\n node.val = 'tv,screen';\n return node\n }\n }\n }\n};\n\nconst css = `\n\n@media screen {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n }\n}\n`;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n// @media tv,screen{.foo{height:calc(40px/3)}}\n```" + "text": "```typescript\n\nparse(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});\ntransform(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});\n\nparseFile(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});\ntransformFile(css, {module: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions});\n\n```" }, { "kind": "text", - "text": "\n\n### Declaration visitor\n\nExample: add 'width: 3px' everytime a declaration with the name 'height' is found\n\n" + "text": "\n\n## Scope\n\nthe " }, { "kind": "code", - "text": "```ts\n\nimport {transform, parseDeclarations} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n removeEmpty: false,\n visitor: {\n\n Declaration: {\n\n // called only for height declaration\n height: (node: AstDeclaration): AstDeclaration[] => {\n \n return [\n node,\n {\n\n typ: EnumToken.DeclarationNodeType,\n nam: 'width',\n val: [\n {\n typ: EnumToken.LengthTokenType,\n val: 3,\n unit: 'px'\n }\n ]\n }\n ];\n }\n }\n }\n};\n\nconst css = `\n\n.foo {\n height: calc(100px * 2/ 15);\n}\n.selector {\ncolor: lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180))\n}\n`;\n\nconsole.debug(await transform(css, options));\n\n// .foo{height:calc(40px/3);width:3px}.selector{color:#0880b0}\n```" + "text": "`scoped`" }, { "kind": "text", - "text": "\n\nExample: rename 'margin' to 'padding' and 'height' to 'width'\n\n" + "text": " option is used to configure the scope of the generated class names.\n\n### Local scope\n\nthis is the default scope.\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {AstDeclaration, ParserOptions, transform} from \"../src/node.ts\";\nconst options: ParserOptions = {\n\n visitor: {\n\n // called for every declaration\n Declaration: (node: AstDeclaration): null => {\n\n\n if (node.nam == 'height') {\n\n node.nam = 'width';\n }\n\n else if (node.nam == 'margin') {\n\n node.nam = 'padding'\n }\n\n return null;\n }\n }\n};\n\nconst css = `\n\n.foo {\n height: calc(100px * 2/ 15);\n margin: 10px;\n}\n.selector {\n\nmargin: 20px;}\n`;\n\nconst result = await transform(css, options);\n\nconsole.debug(result.code);\n\n// .foo{width:calc(40px/3);padding:10px}.selector{padding:20px}\n```" + "text": "```typescript\n\nimport {transform, TransformOptions} from \"@tbela99/css-parser\";\nimport type {TransformResult} from \"@tbela99/css-parser\";\n\nconst css = `\n.className {\n background: red;\n color: yellow;\n}\n\n.subClass {\n composes: className;\n background: blue;\n}\n`;\n\nlet result: TransformResult = await transform(css, {\n\n beautify: true,\n module: {scoped: ModuleScopeEnumOptions.Local\n }\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "\n\n### Rule visitor\n\nExample: add 'width: 3px' to every rule with the selector '.foo'\n\n" + "text": "\n\noutput\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, parseDeclarations} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n removeEmpty: false,\n visitor: {\n\n Rule: async (node: AstRule): Promise => {\n\n if (node.sel == '.foo') {\n\n node.chi.push(...await parseDeclarations('width: 3px'));\n return node;\n }\n\n return null;\n }\n }\n};\n\nconst css = `\n\n.foo {\n .foo {\n }\n}\n`;\n\nconsole.debug(await transform(css, options));\n\n// .foo{width:3px;.foo{width:3px}}\n```" + "text": "```css\n.className_vjnt1 {\n background: red;\n color: #ff0\n}\n.subClass_sgkqy {\n background: blue\n}\n```" }, { "kind": "text", - "text": "\n\n### KeyframesRule visitor\n\nkeyframes rule visitor is called on each keyframes rule node.\n\n### KeyframesAtRule visitor\n\nthe keyframes at-rule visitor is called on each keyframes at-rule node. the visitor can be a function or an object with a property named after the keyframes at-rule prelude.\n\n" + "text": "\n\n### Global scope\n\nthe class names are not scoped unless they are scoped using :local or :local()\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform} from \"@tbela99/css-parser\";\nconst css = `\n@keyframes slide-in {\n from {\n transform: translateX(0%);\n }\n\n to {\n transform: translateX(100%);\n }\n}\n@keyframes identifier {\n 0% {\n top: 0;\n left: 0;\n }\n 30% {\n top: 50px;\n }\n 68%,\n 72% {\n left: 50px;\n }\n 100% {\n top: 100px;\n left: 100%;\n }\n}\n `;\n\nconst result = await transform(css, {\n removePrefix: true,\n beautify: true,\n visitor: {\n KeyframesAtRule: {\n slideIn(node) {\n node.val = 'slide-in-out';\n return node;\n }\n }\n }\n});\n\n```" + "text": "```typescript\n\nresult = await transform(css, {\n\n beautify: true,\n module: {scoped: ModuleScopeEnumOptions.Global\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "\n\n### Value visitor\n\nthe value visitor is called on each token of the selector node, declaration value and the at-rule prelude, etc.\n\n### Generic visitor\n\ngeneric token visitor is a function whose name is a keyof [EnumToken](" + "text": "\n\noutput\n\n" }, { - "kind": "relative-link", - "text": "../docs/enums/node.EnumToken.html", - "target": 13 + "kind": "code", + "text": "```css\n.className {\n background: red;\n color: #ff0\n}\n.subClass {\n background: blue\n}\n```" }, { "kind": "text", - "text": "). it is called for every token of the specified type.\n\n" + "text": "\n\n### ICSS scope\n\nexport css using ICSS format \n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, parse, parseDeclarations} from \"@tbela99/css-parser\";\nconst options: ParserOptions = {\n\n inlineCssVariables: true,\n visitor: {\n\n // Stylesheet node visitor\n StyleSheetNodeType: async (node) => {\n\n // insert a new rule\n node.chi.unshift(await parse('html {--base-color: pink}').then(result => result.ast.chi[0]))\n },\n ColorTokenType: (node) => {\n\n // dump all color tokens\n // console.debug(node);\n },\n FunctionTokenType: (node) => {\n\n // dump all function tokens\n // console.debug(node);\n },\n DeclarationNodeType: (node) => {\n\n // dump all declaration nodes\n // console.debug(node);\n }\n }\n};\n\nconst css = `\n\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n`;\n\nconsole.debug(await transform(css, options));\n\n// body {color:#f3fff0}\n```" - } - ], - "frontmatter": { - "group": "Documents", - "slug": "/transform", - "category": "Guides" - } - }, - { - "id": 8, - "name": "Ast", - "variant": "document", - "kind": 8388608, - "flags": {}, - "content": [ - { - "kind": "text", - "text": "## Ast node types\n\nthe ast tree returned by the parser is always a [AstStyleSheet](" - }, - { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstStyleSheet.html", - "target": 14 + "text": "```typescript\n\n result = await transform(css, {\n\n beautify: true,\n module: {scoped: ModuleScopeEnumOptions.ICSS\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": ") node.\nthe other nodes\nare [AstRule](" + "text": "\n\noutput\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstRule.html", - "target": 15 + "kind": "code", + "text": "```css\n:export {\n className: className_vjnt1;\n subClass: subClass_sgkqy className_vjnt1;\n}\n.className_vjnt1 {\n background: red;\n color: #ff0\n}\n.subClass_sgkqy {\n background: blue\n}\n```" }, { "kind": "text", - "text": "), [AstAtRule](" + "text": "\n\n### Pure scope\n\nrequire to use at least one id or class in selectors. it will throw an error it there are no id or class name in the selector.\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstAtRule.html", - "target": 16 + "kind": "code", + "text": "```typescript\n\n result = await transform(css, {\n\n beautify: true,\n module: {scoped: ModuleScopeEnumOptions.Pure\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "), [AstDeclaration](" + "text": "\n\noutput\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstDeclaration.html", - "target": 17 + "kind": "code", + "text": "```css\n.className {\n background: red;\n color: #ff0\n}\n.subClass {\n background: blue\n}\n```" }, { "kind": "text", - "text": "), [AstComment](" + "text": "\n\n### Mixing scopes\n\nscopes can be mixed using the bitwise OR operator '|'\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstComment.html", - "target": 18 + "kind": "code", + "text": "```typescript\n\n result = await transform(css, {\n\n beautify: true,\n module: {scoped: ModuleScopeEnumOptions.Pure | ModuleScopeEnumOptions.Global | ModuleScopeEnumOptions.ICSS\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "), [AstInvalidRule](" + "text": "\n\n## Class composition\n\nclass composition is supported using the " }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstInvalidRule.html", - "target": 19 + "kind": "code", + "text": "`composes`" }, { "kind": "text", - "text": "), [AstInvalidAtRule](" + "text": " property.\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstInvalidAtRule.html", - "target": 20 + "kind": "code", + "text": "```typescript\n\nimport {transform, TransformOptions} from \"@tbela99/css-parser\";\n\nconst options: TransformOptions = {\n\n module: true,\n beautify: true,\n};\n\nconst result = await transform(`\n.goal .bg-indigo {\n background: indigo;\n}\n\n.indigo-white {\n composes: bg-indigo title;\n color: white;\n}\n`, options);\n\nconsole.log(result.code);\nconsole.log(result.mapping);\n\n\n```" }, { "kind": "text", - "text": "), [AstInvalidDeclaration](" + "text": "\n\ngenerated css code\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstInvalidDeclaration.html", - "target": 21 + "kind": "code", + "text": "```css\n.goal_r7bhp .bg-indigo_gy28g {\n background: indigo\n}\n.indigo-white_wims0 {\n color: #fff\n}\n```" }, { "kind": "text", - "text": ")\n\n## Ast node attributes\n\n### Ast rule attributes\n\n[Ast rule](" + "text": "\ngenerated class mapping\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstRule.html", - "target": 15 + "kind": "code", + "text": "```json\n\n{\n \"goal\": \"goal_r7bhp\",\n \"bg-indigo\": \"bg-indigo_gy28g\",\n \"indigo-white\": \"indigo-white_wims0 bg-indigo_gy28g title_qw06e\",\n \"title\": \"title_qw06e\"\n}\n```" }, { "kind": "text", - "text": ") _tokens_ attribute is an array\nof [Token](" + "text": "\n\nclasses can be composed from other files as well as the global scope\n\n" }, { - "kind": "relative-link", - "text": "../docs/types/node.Token.html", - "target": 22 + "kind": "code", + "text": "```typescript\n\nimport {transform, TransformOptions} from \"@tbela99/css-parser\";\n\nconst options: TransformOptions = {\n\n module: true,\n beautify: true,\n};\n\nconst result = await transform(`\n.goal .bg-indigo {\n background: indigo;\n}\n\n.indigo-white {\n composes: bg-indigo;\n composes: title block ruler from global;\n composes: bg-indigo title from './other-file.css';\n color: white;\n}\n`, options);\n\n```" }, { "kind": "text", - "text": ") representing the parsed selector.\nthe _sel_ attribute string that contains the rule's selector.\nmodifying the sel attribute does not affect the tokens attribute, and similarly, changes to the tokens attribute do not\nupdate the sel attribute.\n\n" + "text": "\n\n## Naming\n\nthe " }, { "kind": "code", - "text": "```ts\n\nimport {AstRule, parseDeclarations, ParserOptions, transform, parseDeclarations} from '@tbela99/css-parser';\n\nconst options: ParserOptions = {\n\n visitor: {\n\n async Rule(node: AstRule): AstRule {\n\n node.sel = '.foo,.bar,.fubar';\n\n node.chi.push(...await parseDeclarations('width: 3px'));\n return node;\n }\n }\n};\n\nconst css = `\n\n .foo {\n\n height: calc(100px * 2/ 15); \n } \n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// .foo,.bar,.fubar{height:calc(40px/3);width:3px}\n```" + "text": "`naming`" }, { "kind": "text", - "text": "\n\n### Ast at-rule attributes\n\n[Ast at-rule](" + "text": " option is used to configure the case of the generated class names as well as the class mapping. \n\n### Ignore Case\n\nno case transformation\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstAtRule.html", - "target": 16 + "kind": "code", + "text": "```typescript\n\nimport {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';\nimport type {TransformResult} from '@tbela99/css-parser';\n\nlet css = `\n\n:local(.class-name) {\n background: red;\n color: yellow;\n}\n\n:local(.sub-class) {\n composes: class-name;\n background: blue;\n`;\n\nlet result = await transform(css, {\n\n module: {\n naming: ModuleCaseTransformEnum.IgnoreCase\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": ") _tokens_ attribute is either null or an array\nof [Token](" + "text": "\n### Camel case\n\nuse camel case for the mapping key names\n\n" }, { - "kind": "relative-link", - "text": "../docs/types/node.Token.html", - "target": 22 + "kind": "code", + "text": "```typescript\n\nimport {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';\nimport type {TransformResult} from '@tbela99/css-parser';\n\nlet css = `\n\n:local(.class-name) {\n background: red;\n color: yellow;\n}\n\n:local(.sub-class) {\n composes: class-name;\n background: blue;\n`;\n\nlet result = await transform(css, {\n\n module: {\n naming: ModuleCaseTransformEnum.CamelCaseOnly\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": ") representing the parsed prelude.\nthe _val_ attribute string that contains the at-rule's prelude.\n\nmodifying the _val_ attribute does not affect the _tokens_ attribute, and similarly, changes to the _tokens_ attribute do not\nupdate the _val_ attribute.\n\n" + "text": "\ngenerated css\n" }, { "kind": "code", - "text": "```ts\nimport {ParserOptions, transform, AstAtRule} from '@tbela99/css-parser';\n\nconst options: ParserOptions = {\n\n visitor: {\n\n AtRule: {\n\n media: (node: AstAtRule): AstAtRule => {\n\n node.val = 'all';\n return node\n }\n }\n }\n};\n\nconst css = `\n\n@media screen {\n \n .foo {\n\n height: calc(100px * 2/ 15); \n } \n}\n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// .foo{height:calc(40px/3)}\n```" + "text": "```css\n.class-name_agkqy {\n background: red;\n color: #ff0\n}\n.sub-class_nfjpx {\n background: blue\n}\n```" }, { "kind": "text", - "text": "\n\n### Ast declaration attributes\n\n[Ast declaration](" + "text": "\ngenerated mapping\n\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.AstDeclaration.html", - "target": 17 + "kind": "code", + "text": "```ts\nconsole.log(result.mapping);\n```" }, { "kind": "text", - "text": ") _nam_ attribute is the declaration name. the _val_\nattribute is an array of [Token](" + "text": "\n" }, { - "kind": "relative-link", - "text": "../docs/types/node.Token.html", - "target": 22 + "kind": "code", + "text": "```json\n{\n \"className\": \"class-name_agkqy\",\n \"subClass\": \"sub-class_nfjpx\"\n}\n```" }, { "kind": "text", - "text": ") representing the declaration's value.\n\n" + "text": "\n\n### Camel case only\n\nuse camel case key names and the scoped class names\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {AstDeclaration, EnumToken, LengthToken, ParserOptions, transform} from '@tbela99/css-parser';\n\nconst options: ParserOptions = {\n\n visitor: {\n\n Declaration: {\n\n // called only for height declaration\n height: (node: AstDeclaration): AstDeclaration[] => {\n\n\n return [\n node,\n {\n\n typ: EnumToken.DeclarationNodeType,\n nam: 'width',\n val: [\n {\n typ: EnumToken.LengthTokenType,\n val: 3,\n unit: 'px'\n }\n ]\n }\n ];\n }\n }\n }\n};\n\nconst css = `\n\n.foo {\n height: calc(100px * 2/ 15);\n}\n.selector {\ncolor: lch(from peru calc(l * 0.8) calc(c * 0.7) calc(h + 180)) \n}\n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// .foo{height:calc(40px/3);width:3px}.selector{color:#0880b0}\n```" + "text": "```typescript\n\nimport {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';\nimport type {TransformResult} from '@tbela99/css-parser';\n\nlet css = `\n\n:local(.class-name) {\n background: red;\n color: yellow;\n}\n\n:local(.sub-class) {\n composes: class-name;\n background: blue;\n`;\n\nlet result = await transform(css, {\n\n module: {\n naming: ModuleCaseTransformEnum.CamelCaseOnly\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "\n\n## Ast traversal\n\nast traversal is achieved using [walk()](" + "text": "\ngenerated css\n\n" }, { - "kind": "relative-link", - "text": "../docs/functions/node.walk.html", - "target": 23 + "kind": "code", + "text": "```css\n.className_agkqy {\n background: red;\n color: #ff0\n}\n.subClass_nfjpx {\n background: blue\n}\n```" }, { "kind": "text", - "text": ")\n\n" + "text": "\ngenerated mapping\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {walk} from '@tbela99/css-parser';\n\nconst css = `\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n\nhtml,\nbody {\n line-height: 1.474;\n}\n\n.ruler {\n\n height: 10px;\n}\n`;\n\nfor (const {node, parent, root} of walk(ast)) {\n\n // do something with node\n}\n```" + "text": "```ts\nconsole.log(result.mapping);\n```" }, { "kind": "text", - "text": "\n\nast traversal can be controlled using a [filter](" + "text": "\n" }, { - "kind": "relative-link", - "text": "../docs/media/node.walk.html#walk", - "target": 24, - "targetAnchor": "walk" + "kind": "code", + "text": "```json\n{\n \"className\": \"className_agkqy\",\n \"subClass\": \"subClass_nfjpx\"\n}\n```" }, { "kind": "text", - "text": ") function. the filter function returns a value of type [WalkerOption](" + "text": "\n\n### Dash case\n\nuse dash case for the mapping key names\n\n" }, { - "kind": "relative-link", - "text": "../docs/types/node.WalkerOption.html", - "target": 25 + "kind": "code", + "text": "```typescript\n\nimport {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';\nimport type {TransformResult} from '@tbela99/css-parser';\n\nlet css = `\n\n:local(.className) {\n background: red;\n color: yellow;\n}\n\n:local(.subClass) {\n composes: className;\n background: blue;\n}\n`;\n\nlet result = await transform(css, {\n\n module: {\n naming: ModuleCaseTransformEnum.DashCase\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": ").\n\n" + "text": "\ngenerated css\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {EnumToken, transform, walk, WalkerOptionEnum} from '@tbela99/css-parser';\n\nconst css = `\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n\nhtml,\nbody {\n line-height: 1.474;\n}\n\n.ruler {\n\n height: 10px;\n}\n`;\n\nfunction filter(node) {\n\n if (node.typ == EnumToken.AstRule && node.sel.includes('html')) {\n\n // skip the children of the current node\n return WalkerOptionEnum.IgnoreChildren;\n }\n}\n\nconst result = await transform(css);\nfor (const {node} of walk(result.ast, filter)) {\n\n console.error([EnumToken[node.typ]]);\n}\n\n// [ \"StyleSheetNodeType\" ]\n// [ \"RuleNodeType\" ]\n// [ \"DeclarationNodeType\" ]\n// [ \"RuleNodeType\" ]\n// [ \"DeclarationNodeType\" ]\n// [ \"RuleNodeType\" ]\n// [ \"DeclarationNodeType\" ]\n\n```" + "text": "```css\n.className_vjnt1 {\n background: red;\n color: #ff0\n}\n.subClass_sgkqy {\n background: blue\n}\n```" }, { "kind": "text", - "text": "\n\n### Walking ast node attributes\n\nthe function [walkValues()](" + "text": "\ngenerated mapping\n\n" }, { - "kind": "relative-link", - "text": "../docs/functions/node.walkValues.html", - "target": 26 + "kind": "code", + "text": "```ts\nconsole.log(result.mapping);\n```" }, { "kind": "text", - "text": ") is used to walk the node attribute's tokens.\n\n" + "text": "\n" }, { "kind": "code", - "text": "```ts\n\nimport {AstDeclaration, EnumToken, transform, walkValues} from '@tbela99/css-parser';\n\nconst css = `\nbody { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b + 0.15)); }\n`;\n\nconst result = await transform(css);\nconst declaration = result.ast.chi[0].chi[0] as AstDeclaration;\n\n// walk the node attribute's tokens in reverse order\nfor (const {value} of walkValues(declaration.val, null, null,true)) {\n\n console.error([EnumToken[value.typ], value.val]);\n}\n\n// [ \"Color\", \"color\" ]\n// [ \"FunctionTokenType\", \"calc\" ]\n// [ \"Number\", 0.15 ]\n// [ \"Add\", undefined ]\n// [ \"Iden\", \"b\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"FunctionTokenType\", \"calc\" ]\n// [ \"Number\", 0.24 ]\n// [ \"Add\", undefined ]\n// [ \"Iden\", \"g\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"Iden\", \"r\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"Iden\", \"display-p3\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"FunctionTokenType\", \"var\" ]\n// [ \"DashedIden\", \"--base-color\" ]\n// [ \"Whitespace\", undefined ]\n// [ \"Iden\", \"from\" ]\n```" - } - ], - "frontmatter": { - "group": "Documents", - "slug": "/traversal", - "category": "Guides" - } - }, - { - "id": 9, - "name": "Validation", - "variant": "document", - "kind": 8388608, - "flags": {}, - "content": [ - { - "kind": "text", - "text": "## Validation\n\nvalidation is performed using [mdn-data](https://github.com/mdn/data). the validation level can be configured using the [validation](" - }, - { - "kind": "relative-link", - "text": "../docs/interfaces/node.ParserOptions.html#validation", - "target": 27, - "targetAnchor": "validation" + "text": "```json\n{\n \"class-name\": \"className_vjnt1\",\n \"sub-class\": \"subClass_sgkqy className_vjnt1\"\n}\n```" }, { "kind": "text", - "text": ") option.\npossible values are _boolean_ or [ValidationLevel](" + "text": "\n\n### Dash case only\n\nuse dash case key names and the scoped class names\n\n" }, { - "kind": "relative-link", - "text": "../docs/enums/node.ValidationLevel.html", - "target": 28 + "kind": "code", + "text": "```typescript\n\nimport {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser';\nimport type {TransformResult} from '@tbela99/css-parser';\n\nlet css = `\n\n:local(.className) {\n background: red;\n color: yellow;\n}\n\n:local(.subClass) {\n composes: className;\n background: blue;\n}\n`;\n\nlet result = await transform(css, {\n\n module: {\n naming: ModuleCaseTransformEnum.DashCaseOnly\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "):\n\n- _true_ or [ValidationLevel.All](" + "text": "\ngenerated css\n\n" }, { - "kind": "relative-link", - "text": "../docs/media/node.ValidationLevel.html#all", - "target": 29, - "targetAnchor": "all" + "kind": "code", + "text": "```css\n.class-name_vjnt1 {\n background: red;\n color: #ff0\n}\n.sub-class_sgkqy {\n background: blue\n}\n```" }, { "kind": "text", - "text": "): validates all nodes\n- _false_ or [ValidationLevel.None](" + "text": "\ngenerated mapping\n\n" }, { - "kind": "relative-link", - "text": "../docs/media/node.ValidationLevel.html#none", - "target": 29, - "targetAnchor": "none" + "kind": "code", + "text": "```ts\nconsole.log(result.mapping);\n```" }, { "kind": "text", - "text": "): no validation\n- [ValidationLevel.Selector](" + "text": "\n" }, { - "kind": "relative-link", - "text": "../docs/media/node.ValidationLevel.html#selector", - "target": 29, - "targetAnchor": "selector" + "kind": "code", + "text": "```json\n{\n \"class-name\": \"class-name_vjnt1\",\n \"sub-class\": \"sub-class_sgkqy class-name_vjnt1\"\n}\n```" }, { "kind": "text", - "text": "): validates only selectors\n- [ValidationLevel.AtRule](" + "text": "\n\n## Pattern\n\nthe " }, { - "kind": "relative-link", - "text": "../docs/media/node.ValidationLevel.html#atrule", - "target": 29, - "targetAnchor": "atrule" + "kind": "code", + "text": "`pattern`" }, { "kind": "text", - "text": "): validates only at-rules\n- [ValidationLevel.Declaration](" + "text": " option is used to configure the generated scoped names.\n\n" }, { - "kind": "relative-link", - "text": "../docs/media/node.ValidationLevel.html#declaration", - "target": 29, - "targetAnchor": "declaration" + "kind": "code", + "text": "```typescript\n\nimport {transform, ModulePatternEnum} from '@tbela99/css-parser';\nimport type {TransformResult} from '@tbela99/css-parser';\n\nconst css = `\n.className {\n background: red;\n color: yellow;\n}\n\n.subClass {\n composes: className;\n background: blue;\n}\n`;\n\nlet result: TransformResult = await transform(css, {\n\n beautify: true,\n module: {\n pattern: '[local]-[hash:sha256]'\n }\n\n});\n\nconsole.log(result.code);\n```" }, { "kind": "text", - "text": "): validates only declarations\n- [ValidationLevel.Default](" + "text": "\ngenerated css\n\n" }, { - "kind": "relative-link", - "text": "../docs/media/node.ValidationLevel.html#default", - "target": 29, - "targetAnchor": "default" + "kind": "code", + "text": "```css\n.className-b629f {\n background: red;\n color: #ff0\n}\n.subClass-a0c35 {\n background: blue\n}\n```" }, { "kind": "text", - "text": "): validates selectors and at-rules\n\n" + "text": "\ngenerated mapping\n\n" }, { "kind": "code", - "text": "```ts\n\nimport {transform, TransformOptions, ValidationLevel} from \"@tbela99/css-parser\";\n\nconst options: TransformOptions = {\n\n validation: ValidationLevel.All,\n beautify: true,\n removeDuplicateDeclarations: 'height'\n};\n\nconst css = `\n\n@supports(height: 30pti) {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n height: 'new';\n height: auto;\n }\n}\n`;\n\nconst result = await transform(css, options);\nconsole.debug(result.code);\n\n// @supports (height:30pti) {\n// .foo {\n// height: calc(40px/3);\n// height: auto\n// }\n// }\n```" + "text": "```ts\nconsole.log(result.mapping);\n```" }, { "kind": "text", - "text": "\n\n## Lenient validation\n\nthe parser is lenient. this means that invalid nodes are kept in the ast but they are not rendered.\nthis behavior can be changed using the [lenient](" + "text": "\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.ParserOptions.html#lenient", - "target": 27, - "targetAnchor": "lenient" + "kind": "code", + "text": "```json\n{\n \"className\": \"className-b629f\",\n \"subClass\": \"subClass-a0c35 className-b629f\"\n}\n```" }, { "kind": "text", - "text": ") option.\n\n## Validation Errors\n\nvalidation errors are returned with [parse result](" + "text": "\nthe supported placeholders are:\n- name: the file base name without the extension\n- hash: the file path hash\n- local: the local name\n- path: the file path\n- folder: the folder name\n- ext: the file extension\n\nthe pattern placeholders can optionally have a maximum number of characters:\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.ParseResult.html", - "target": 30 + "kind": "code", + "text": "```\npattern: '[local:2]-[hash:5]'\n```" }, { "kind": "text", - "text": ") or [transform result](" + "text": "\nthe hash pattern can take an algorithm, a maximum number of characters or both:\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.TransformResult.html", - "target": 31 + "kind": "code", + "text": "```\npattern: '[local]-[hash:base64:5]'\n```" }, { "kind": "text", - "text": ").\ncheck the [typescript definition](" + "text": "\nor\n" }, { - "kind": "relative-link", - "text": "../docs/interfaces/node.ErrorDescription.html", - "target": 32 + "kind": "code", + "text": "```\npattern: '[local]-[hash:5]'\n```" }, { "kind": "text", - "text": ") of ErrorDescription for more details.\n\n\n" + "text": "\nor\n" }, { "kind": "code", - "text": "```ts\n\nconsole.debug(result.errors);\n```" + "text": "```\npattern: '[local]-[hash:sha1]'\n```" }, { "kind": "text", - "text": "\n\n## Invalid tokens handling\n\n[bad tokens](" + "text": "\n\nsupported hash algorithms are:\n- base64\n- hex\n- base64url\n- sha1\n- sha256\n- sha384\n- sha512\n------\n\n[← Validation](" }, { "kind": "relative-link", - "text": "../docs/enums/node.EnumToken.html#badcdotokentype", - "target": 13, - "targetAnchor": "badcdotokentype" + "text": "./validation.md", + "target": 8 }, { "kind": "text", - "text": ") are thrown out during parsing. visitor functions can be used to catch and fix invalid tokens.\n\n" - }, - { - "kind": "code", - "text": "```ts\n\nimport {EnumToken, transform, TransformOptions, ValidationLevel} from \"@tbela99/css-parser\";\nconst options: TransformOptions = {\n\n validation: ValidationLevel.All,\n beautify: true,\n removeDuplicateDeclarations: 'height',\n visitor: {\n InvalidRuleTokenType(node) {\n\n console.debug(`> found '${EnumToken[node.typ]}'`);\n },\n InvalidAtRuleTokenType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidDeclarationNodeType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidClassSelectorTokenType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidAttrTokenType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n },\n InvalidAtRuleNodeType(node) {\n console.debug(`> found '${EnumToken[node.typ]}' in '${node.loc.src}' at ${node.loc.sta.lin}:${node.loc.sta.col}`);\n }\n }\n};\n\nconst css = `\n\n@supports(height: 30pti) {\n\n .foo {\n\n height: calc(100px * 2/ 15);\n height: 'new';\n height: auto;\n }\n}\n\n@supports(height: 30pti);\n`;\n\nconst result = await transform(css, options);\n\n//> found 'InvalidDeclarationNodeType' in '' at 8:13\n//> found 'InvalidAtRuleTokenType' in '' at 13:1\n\n```" + "text": ")" } ], "frontmatter": { "group": "Documents", - "slug": "/validation", "category": "Guides" } } @@ -52361,8 +52355,8 @@ ], "childrenIncludingDocuments": [ 1, - 10, - 38 + 11, + 43 ], "groups": [ { @@ -52374,8 +52368,8 @@ { "title": "Modules", "children": [ - 10, - 38 + 11, + 43 ] } ], @@ -52389,8 +52383,8 @@ { "title": "Other", "children": [ - 10, - 38 + 11, + 43 ] } ], @@ -52468,6 +52462,15 @@ "text": "./validation.md", "target": 8 }, + { + "kind": "text", + "text": ")\n- [CSS module](" + }, + { + "kind": "relative-link", + "text": "./css-module.md", + "target": 9 + }, { "kind": "text", "text": ")\n\n## Modules\n\n- [Node](" @@ -52475,7 +52478,7 @@ { "kind": "relative-link", "text": "../docs/modules/node.html", - "target": 9 + "target": 10 }, { "kind": "text", @@ -52484,24 +52487,28 @@ { "kind": "relative-link", "text": "../docs/modules/web.html", - "target": 10 + "target": 11 + }, + { + "kind": "text", + "text": ")\n\n## Misc\n\n- [Playground](https://tbela99.github.io/css-parser/playground/)\n- [Benchmark](https://tbela99.github.io/css-parser/benchmark/index.html)\n\n------\n[About →](" + }, + { + "kind": "relative-link", + "text": "./about.md", + "target": 1 }, { "kind": "text", - "text": ")\n\n## Misc\n\n- [Playground](https://tbela99.github.io/css-parser/playground/)\n- [Benchmark](https://tbela99.github.io/css-parser/benchmark/index.html)" + "text": ")" } ], "symbolIdMap": { - "10": { + "11": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", "qualifiedName": "" }, - "16": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/node.ts", - "qualifiedName": "render" - }, "17": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", @@ -52510,52 +52517,52 @@ "18": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "data" + "qualifiedName": "render" }, "19": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "options" + "qualifiedName": "data" }, "20": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "parseFile" + "qualifiedName": "options" }, "21": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "parseFile" + "qualifiedName": "mapping" }, "22": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "file" + "qualifiedName": "__type" }, "23": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "options" + "qualifiedName": "__type.mapping" }, "24": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "asStream" + "qualifiedName": "__type.importMapping" }, "25": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "parse" + "qualifiedName": "parseFile" }, "26": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "parse" + "qualifiedName": "parseFile" }, "27": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "stream" + "qualifiedName": "file" }, "28": { "packageName": "@tbela99/css-parser", @@ -52565,42 +52572,42 @@ "29": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "transformFile" + "qualifiedName": "asStream" }, "30": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "transformFile" + "qualifiedName": "parse" }, "31": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "file" + "qualifiedName": "parse" }, "32": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "options" + "qualifiedName": "stream" }, "33": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "asStream" + "qualifiedName": "options" }, "34": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "transform" + "qualifiedName": "transformFile" }, "35": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "transform" + "qualifiedName": "transformFile" }, "36": { "packageName": "@tbela99/css-parser", "packagePath": "src/node.ts", - "qualifiedName": "css" + "qualifiedName": "file" }, "37": { "packageName": "@tbela99/css-parser", @@ -52608,7221 +52615,7641 @@ "qualifiedName": "options" }, "38": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/node.ts", + "qualifiedName": "asStream" + }, + "39": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/node.ts", + "qualifiedName": "transform" + }, + "40": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/node.ts", + "qualifiedName": "transform" + }, + "41": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/node.ts", + "qualifiedName": "css" + }, + "42": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/node.ts", + "qualifiedName": "options" + }, + "43": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "" }, - "44": { + "49": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "render" }, - "45": { + "50": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "render" }, - "46": { + "51": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "data" }, - "47": { + "52": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "options" }, - "48": { + "53": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "mapping" + }, + "54": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "__type" + }, + "55": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "__type.mapping" + }, + "56": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "__type.importMapping" + }, + "57": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "parseFile" }, - "49": { + "58": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "parseFile" }, - "50": { + "59": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "file" }, - "51": { + "60": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "options" }, - "52": { + "61": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "asStream" }, - "53": { + "62": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "parse" }, - "54": { + "63": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "parse" }, - "55": { + "64": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "stream" }, - "56": { + "65": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "options" }, - "57": { + "66": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "transformFile" }, - "58": { + "67": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "transformFile" }, - "59": { + "68": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "file" }, - "60": { + "69": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "options" }, - "61": { + "70": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "asStream" }, - "62": { + "71": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "transform" }, - "63": { + "72": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "transform" }, - "64": { + "73": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "css" }, - "65": { + "74": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "options" }, - "66": { + "75": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription" }, - "67": { + "76": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.action" }, - "68": { + "77": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.message" }, - "69": { + "78": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.syntax" }, - "70": { + "79": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.node" }, - "71": { + "80": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.location" }, - "72": { + "81": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.error" }, - "73": { + "82": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription.rawTokens" }, - "74": { + "83": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions" }, - "75": { + "84": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.validation" }, - "76": { + "85": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.lenient" }, - "83": { + "92": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions" }, - "84": { + "93": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.minify" }, - "85": { + "94": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.parseColor" }, - "86": { + "95": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.nestingRules" }, - "87": { + "96": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeDuplicateDeclarations" }, - "88": { + "97": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.computeShorthand" + }, + "98": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.computeTransform" + }, + "99": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.computeCalcExpression" + }, + "100": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.inlineCssVariables" + }, + "101": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.removeEmpty" + }, + "102": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.removePrefix" + }, + "103": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "MinifyOptions.pass" + }, + "104": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "LoadResult" + }, + "105": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ModuleOptions" + }, + "106": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ModuleOptions.scoped" + }, + "107": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ModuleOptions.filePath" + }, + "108": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ModuleOptions.hashLength" + }, + "109": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ModuleOptions.pattern" + }, + "110": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.computeShorthand" + "qualifiedName": "ModuleOptions.naming" }, - "89": { + "111": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.computeTransform" + "qualifiedName": "ModuleOptions.generateScopedName" }, - "90": { + "112": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.computeCalcExpression" + "qualifiedName": "__type" }, - "91": { + "113": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.inlineCssVariables" + "qualifiedName": "__type" }, - "92": { + "114": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.removeEmpty" + "qualifiedName": "localName" }, - "93": { + "115": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.removePrefix" + "qualifiedName": "filePath" }, - "94": { + "116": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "MinifyOptions.pass" + "qualifiedName": "pattern" }, - "95": { + "117": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", - "qualifiedName": "LoadResult" + "qualifiedName": "hashLength" }, - "96": { + "118": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeatureOptions" }, - "98": { + "120": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature" }, - "99": { + "121": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature.accept" }, - "100": { + "122": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature.ordering" }, - "101": { + "123": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature.processMode" }, - "102": { + "124": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature.register" }, - "103": { + "125": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "104": { + "126": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "105": { + "127": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "options" }, - "106": { + "128": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature.run" }, - "107": { + "129": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "108": { + "130": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "109": { + "131": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ast" }, - "110": { + "132": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "options" }, - "111": { + "133": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "parent" }, - "112": { + "134": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "context" }, - "113": { + "135": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "114": { + "136": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.__index" }, - "116": { + "138": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "mode" }, - "117": { + "139": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ResolvedPath" }, - "118": { + "140": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ResolvedPath.absolute" }, - "119": { + "141": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ResolvedPath.relative" }, - "120": { + "142": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats" }, - "121": { + "143": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.src" }, - "122": { + "144": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.bytesIn" }, - "123": { + "145": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.importedBytesIn" }, - "124": { + "146": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.parse" }, - "125": { + "147": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.minify" }, - "126": { + "148": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResultStats.module" + }, + "149": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.total" }, - "127": { + "150": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.imports" }, - "128": { + "151": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.nodesCount" }, - "129": { + "152": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats.tokensCount" }, - "130": { + "153": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseTokenOptions" }, - "131": { + "154": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.src" }, - "132": { + "155": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.sourcemap" }, - "133": { + "156": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.removeCharset" }, - "134": { + "157": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolveImport" }, - "135": { + "158": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.cwd" }, - "136": { + "159": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.expandNestingRules" }, - "137": { + "160": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.load" }, - "138": { + "161": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "139": { + "162": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "140": { + "163": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "141": { + "164": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "142": { + "165": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "asStream" }, - "147": { + "170": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolveUrls" }, - "148": { + "171": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolve" }, - "149": { + "172": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "150": { + "173": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "151": { + "174": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "152": { + "175": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "153": { + "176": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentWorkingDirectory" }, - "154": { + "177": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "155": { + "178": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.absolute" }, - "156": { + "179": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.relative" }, - "157": { + "180": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.visitor" }, - "158": { + "181": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.signal" }, - "161": { + "184": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParserOptions.module" + }, + "185": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.minify" }, - "162": { + "186": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.parseColor" }, - "163": { + "187": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.nestingRules" }, - "164": { + "188": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeDuplicateDeclarations" }, - "165": { + "189": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeShorthand" }, - "166": { + "190": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeTransform" }, - "167": { + "191": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeCalcExpression" }, - "168": { + "192": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.inlineCssVariables" }, - "169": { + "193": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeEmpty" }, - "170": { + "194": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removePrefix" }, - "171": { + "195": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.pass" }, - "173": { + "197": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.validation" }, - "174": { + "198": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.lenient" }, - "181": { + "205": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult" }, - "182": { + "206": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult.token" }, - "183": { + "207": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult.len" }, - "184": { + "208": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult.hint" }, - "185": { + "209": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult.sta" }, - "186": { + "210": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult.end" }, - "187": { + "211": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult.bytesIn" }, - "188": { + "212": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MatchedSelector" }, - "189": { + "213": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MatchedSelector.match" }, - "190": { + "214": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MatchedSelector.selector1" }, - "191": { + "215": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MatchedSelector.selector2" }, - "192": { + "216": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MatchedSelector.eq" }, - "193": { + "217": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo" }, - "194": { + "218": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo.globalScope" }, - "195": { + "219": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo.parent" }, - "196": { + "220": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo.declarationCount" }, - "197": { + "221": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo.replaceable" }, - "198": { + "222": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo.node" }, - "199": { + "223": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo.values" }, - "200": { + "224": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject" }, - "201": { + "225": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.version" }, - "202": { + "226": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.file" }, - "203": { + "227": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.sourceRoot" }, - "204": { + "228": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.sources" }, - "205": { + "229": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.sourcesContent" }, - "206": { + "230": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.names" }, - "207": { + "231": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject.mappings" }, - "208": { + "232": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Position" }, - "209": { + "233": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Position.ind" }, - "210": { + "234": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Position.lin" }, - "211": { + "235": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Position.col" }, - "212": { + "236": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Location" }, - "213": { + "237": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Location.sta" }, - "214": { + "238": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Location.end" }, - "215": { + "239": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Location.src" }, - "216": { + "240": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken" }, - "217": { + "241": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.typ" }, - "218": { + "242": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "219": { + "243": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "220": { + "244": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "222": { + "246": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstComment" }, - "223": { + "247": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstComment.typ" }, - "224": { + "248": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstComment.tokens" }, - "225": { + "249": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstComment.val" }, - "226": { + "250": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "227": { + "251": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "229": { + "253": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstDeclaration" }, - "230": { + "254": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstDeclaration.nam" }, - "231": { + "255": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstDeclaration.tokens" }, - "232": { + "256": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstDeclaration.val" }, - "233": { + "257": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstDeclaration.typ" }, - "234": { + "258": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "235": { + "259": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "237": { + "261": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule" }, - "238": { + "262": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule.typ" }, - "239": { + "263": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule.sel" }, - "240": { + "264": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule.chi" }, - "241": { + "265": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule.optimized" }, - "242": { + "266": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule.raw" }, - "243": { + "267": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "244": { + "268": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "245": { + "269": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "247": { + "271": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidRule" }, - "248": { + "272": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidRule.typ" }, - "249": { + "273": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidRule.sel" }, - "250": { + "274": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidRule.chi" }, - "251": { + "275": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "252": { + "276": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "253": { + "277": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "255": { + "279": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidDeclaration" }, - "256": { + "280": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidDeclaration.typ" }, - "257": { + "281": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidDeclaration.tokens" }, - "258": { + "282": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidDeclaration.val" }, - "259": { + "283": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "260": { + "284": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "262": { + "286": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidAtRule" }, - "263": { + "287": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidAtRule.typ" }, - "264": { + "288": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidAtRule.nam" }, - "265": { + "289": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidAtRule.val" }, - "266": { + "290": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidAtRule.chi" }, - "267": { + "291": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "268": { + "292": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "269": { + "293": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "271": { + "295": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule" }, - "272": { + "296": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule.typ" }, - "273": { + "297": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule.sel" }, - "274": { + "298": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule.chi" }, - "275": { + "299": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule.optimized" }, - "276": { + "300": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule.raw" }, - "277": { + "301": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule.tokens" }, - "278": { + "302": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "279": { + "303": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "281": { + "305": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "RawSelectorTokens" }, - "292": { + "316": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstAtRule" }, - "293": { + "317": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstAtRule.typ" }, - "294": { + "318": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstAtRule.nam" }, - "295": { + "319": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstAtRule.val" }, - "296": { + "320": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstAtRule.chi" }, - "297": { + "321": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "298": { + "322": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "299": { + "323": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "301": { + "325": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule" }, - "302": { + "326": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule.typ" }, - "303": { + "327": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule.sel" }, - "304": { + "328": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule.chi" }, - "305": { + "329": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule.optimized" }, - "306": { + "330": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule.raw" }, - "307": { + "331": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "308": { + "332": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "309": { + "333": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "311": { + "335": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesAtRule" }, - "312": { + "336": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesAtRule.typ" }, - "313": { + "337": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesAtRule.nam" }, - "314": { + "338": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesAtRule.val" }, - "315": { + "339": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesAtRule.chi" }, - "316": { + "340": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "317": { + "341": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "318": { + "342": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "320": { + "344": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRuleList" }, - "321": { + "345": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstStyleSheet" }, - "322": { + "346": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstStyleSheet.typ" }, - "323": { + "347": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstStyleSheet.chi" }, - "324": { + "348": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstStyleSheet.tokens" }, - "325": { + "349": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "326": { + "350": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "328": { + "352": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LiteralToken" }, - "329": { + "353": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LiteralToken.typ" }, - "330": { + "354": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LiteralToken.val" }, - "331": { + "355": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "332": { + "356": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "333": { + "357": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "335": { + "359": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ClassSelectorToken" }, - "336": { + "360": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ClassSelectorToken.typ" }, - "337": { + "361": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ClassSelectorToken.val" }, - "338": { + "362": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "339": { + "363": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "340": { + "364": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "342": { + "366": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidClassSelectorToken" }, - "343": { + "367": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidClassSelectorToken.typ" }, - "344": { + "368": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidClassSelectorToken.val" }, - "345": { + "369": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "346": { + "370": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "347": { + "371": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "349": { + "373": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UniversalSelectorToken" }, - "350": { + "374": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UniversalSelectorToken.typ" }, - "351": { + "375": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "352": { + "376": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "353": { + "377": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "355": { + "379": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentToken" }, - "356": { + "380": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentToken.typ" }, - "357": { + "381": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentToken.val" }, - "358": { + "382": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "359": { + "383": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "360": { + "384": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "362": { + "386": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentListToken" }, - "363": { + "387": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentListToken.typ" }, - "364": { + "388": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentListToken.val" }, - "365": { + "389": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "366": { + "390": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "367": { + "391": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "369": { + "393": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashedIdentToken" }, - "370": { + "394": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashedIdentToken.typ" }, - "371": { + "395": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashedIdentToken.val" }, - "372": { + "396": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "373": { + "397": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "374": { + "398": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "376": { + "400": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommaToken" }, - "377": { + "401": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommaToken.typ" }, - "378": { + "402": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "379": { + "403": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "380": { + "404": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "382": { + "406": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColonToken" }, - "383": { + "407": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColonToken.typ" }, - "384": { + "408": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "385": { + "409": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "386": { + "410": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "388": { + "412": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SemiColonToken" }, - "389": { + "413": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SemiColonToken.typ" }, - "390": { + "414": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "391": { + "415": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "392": { + "416": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "394": { + "418": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NestingSelectorToken" }, - "395": { + "419": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NestingSelectorToken.typ" }, - "396": { + "420": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "397": { + "421": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "398": { + "422": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "400": { + "424": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NumberToken" }, - "401": { + "425": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NumberToken.typ" }, - "402": { + "426": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NumberToken.val" }, - "403": { + "427": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "404": { + "428": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "405": { + "429": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "407": { + "431": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AtRuleToken" }, - "408": { + "432": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AtRuleToken.typ" }, - "409": { + "433": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AtRuleToken.val" }, - "410": { + "434": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AtRuleToken.pre" }, - "411": { + "435": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "412": { + "436": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "413": { + "437": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "415": { + "439": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PercentageToken" }, - "416": { + "440": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PercentageToken.typ" }, - "417": { + "441": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PercentageToken.val" }, - "418": { + "442": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "419": { + "443": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "420": { + "444": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "422": { + "446": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FlexToken" }, - "423": { + "447": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FlexToken.typ" }, - "424": { + "448": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FlexToken.val" }, - "425": { + "449": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "426": { + "450": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "427": { + "451": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "429": { + "453": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionToken" }, - "430": { + "454": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionToken.typ" }, - "431": { + "455": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionToken.val" }, - "432": { + "456": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionToken.chi" }, - "433": { + "457": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "434": { + "458": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "435": { + "459": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "437": { + "461": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GridTemplateFuncToken" }, - "438": { + "462": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GridTemplateFuncToken.typ" }, - "439": { + "463": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GridTemplateFuncToken.val" }, - "440": { + "464": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GridTemplateFuncToken.chi" }, - "441": { + "465": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "442": { + "466": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "443": { + "467": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "445": { + "469": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionURLToken" }, - "446": { + "470": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionURLToken.typ" }, - "447": { + "471": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionURLToken.val" }, - "448": { + "472": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionURLToken.chi" }, - "449": { + "473": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "450": { + "474": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "451": { + "475": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "453": { + "477": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionImageToken" }, - "454": { + "478": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionImageToken.typ" }, - "455": { + "479": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionImageToken.val" }, - "456": { + "480": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionImageToken.chi" }, - "457": { + "481": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "458": { + "482": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "459": { + "483": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "461": { + "485": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimingFunctionToken" }, - "462": { + "486": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimingFunctionToken.typ" }, - "463": { + "487": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimingFunctionToken.val" }, - "464": { + "488": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimingFunctionToken.chi" }, - "465": { + "489": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "466": { + "490": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "467": { + "491": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "469": { + "493": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimelineFunctionToken" }, - "470": { + "494": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimelineFunctionToken.typ" }, - "471": { + "495": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimelineFunctionToken.val" }, - "472": { + "496": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimelineFunctionToken.chi" }, - "473": { + "497": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "474": { + "498": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "475": { + "499": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "477": { + "501": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StringToken" }, - "478": { + "502": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StringToken.typ" }, - "479": { + "503": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StringToken.val" }, - "480": { + "504": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "481": { + "505": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "482": { + "506": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "484": { + "508": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadStringToken" }, - "485": { + "509": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadStringToken.typ" }, - "486": { + "510": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadStringToken.val" }, - "487": { + "511": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "488": { + "512": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "489": { + "513": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "491": { + "515": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnclosedStringToken" }, - "492": { + "516": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnclosedStringToken.typ" }, - "493": { + "517": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnclosedStringToken.val" }, - "494": { + "518": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "495": { + "519": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "496": { + "520": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "498": { + "522": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DimensionToken" }, - "499": { + "523": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DimensionToken.typ" }, - "500": { + "524": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DimensionToken.val" }, - "501": { + "525": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DimensionToken.unit" }, - "502": { + "526": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "503": { + "527": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "504": { + "528": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "506": { + "530": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LengthToken" }, - "507": { + "531": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LengthToken.typ" }, - "508": { + "532": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LengthToken.val" }, - "509": { + "533": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LengthToken.unit" }, - "510": { + "534": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "511": { + "535": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "512": { + "536": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "514": { + "538": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AngleToken" }, - "515": { + "539": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AngleToken.typ" }, - "516": { + "540": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AngleToken.val" }, - "517": { + "541": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AngleToken.unit" }, - "518": { + "542": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "519": { + "543": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "520": { + "544": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "522": { + "546": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimeToken" }, - "523": { + "547": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimeToken.typ" }, - "524": { + "548": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimeToken.val" }, - "525": { + "549": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimeToken.unit" }, - "526": { + "550": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "527": { + "551": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "528": { + "552": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "530": { + "554": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FrequencyToken" }, - "531": { + "555": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FrequencyToken.typ" }, - "532": { + "556": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FrequencyToken.val" }, - "533": { + "557": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FrequencyToken.unit" }, - "534": { + "558": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "535": { + "559": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "536": { + "560": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "538": { + "562": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ResolutionToken" }, - "539": { + "563": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ResolutionToken.typ" }, - "540": { + "564": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ResolutionToken.val" }, - "541": { + "565": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ResolutionToken.unit" }, - "542": { + "566": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "543": { + "567": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "544": { + "568": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "546": { + "570": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "HashToken" }, - "547": { + "571": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "HashToken.typ" }, - "548": { + "572": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "HashToken.val" }, - "549": { + "573": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "550": { + "574": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "551": { + "575": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "553": { + "577": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BlockStartToken" }, - "554": { + "578": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BlockStartToken.typ" }, - "555": { + "579": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "556": { + "580": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "557": { + "581": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "559": { + "583": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BlockEndToken" }, - "560": { + "584": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BlockEndToken.typ" }, - "561": { + "585": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "562": { + "586": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "563": { + "587": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "565": { + "589": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrStartToken" }, - "566": { + "590": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrStartToken.typ" }, - "567": { + "591": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrStartToken.chi" }, - "568": { + "592": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "569": { + "593": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "570": { + "594": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "572": { + "596": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrEndToken" }, - "573": { + "597": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrEndToken.typ" }, - "574": { + "598": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "575": { + "599": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "576": { + "600": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "578": { + "602": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensStartToken" }, - "579": { + "603": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensStartToken.typ" }, - "580": { + "604": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "581": { + "605": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "582": { + "606": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "584": { + "608": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensEndToken" }, - "585": { + "609": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensEndToken.typ" }, - "586": { + "610": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "587": { + "611": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "588": { + "612": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "590": { + "614": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensToken" }, - "591": { + "615": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensToken.typ" }, - "592": { + "616": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensToken.chi" }, - "593": { + "617": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "594": { + "618": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "595": { + "619": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "597": { + "621": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "WhitespaceToken" }, - "598": { + "622": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "WhitespaceToken.typ" }, - "599": { + "623": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "600": { + "624": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "601": { + "625": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "603": { + "627": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommentToken" }, - "604": { + "628": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommentToken.typ" }, - "605": { + "629": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommentToken.val" }, - "606": { + "630": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "607": { + "631": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "608": { + "632": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "610": { + "634": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCommentToken" }, - "611": { + "635": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCommentToken.typ" }, - "612": { + "636": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCommentToken.val" }, - "613": { + "637": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "614": { + "638": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "615": { + "639": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "617": { + "641": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CDOCommentToken" }, - "618": { + "642": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CDOCommentToken.typ" }, - "619": { + "643": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CDOCommentToken.val" }, - "620": { + "644": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "621": { + "645": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "622": { + "646": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "624": { + "648": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCDOCommentToken" }, - "625": { + "649": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCDOCommentToken.typ" }, - "626": { + "650": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCDOCommentToken.val" }, - "627": { + "651": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "628": { + "652": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "629": { + "653": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "631": { + "655": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IncludeMatchToken" }, - "632": { + "656": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IncludeMatchToken.typ" }, - "633": { + "657": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "634": { + "658": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "635": { + "659": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "637": { + "661": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashMatchToken" }, - "638": { + "662": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashMatchToken.typ" }, - "639": { + "663": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "640": { + "664": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "641": { + "665": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "643": { + "667": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EqualMatchToken" }, - "644": { + "668": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EqualMatchToken.typ" }, - "645": { + "669": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "646": { + "670": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "647": { + "671": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "649": { + "673": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StartMatchToken" }, - "650": { + "674": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StartMatchToken.typ" }, - "651": { + "675": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "652": { + "676": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "653": { + "677": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "655": { + "679": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EndMatchToken" }, - "656": { + "680": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EndMatchToken.typ" }, - "657": { + "681": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "658": { + "682": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "659": { + "683": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "661": { + "685": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ContainMatchToken" }, - "662": { + "686": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ContainMatchToken.typ" }, - "663": { + "687": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "664": { + "688": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "665": { + "689": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "667": { + "691": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LessThanToken" }, - "668": { + "692": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LessThanToken.typ" }, - "669": { + "693": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "670": { + "694": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "671": { + "695": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "673": { + "697": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LessThanOrEqualToken" }, - "674": { + "698": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LessThanOrEqualToken.typ" }, - "675": { + "699": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "676": { + "700": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "677": { + "701": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "679": { + "703": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GreaterThanToken" }, - "680": { + "704": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GreaterThanToken.typ" }, - "681": { + "705": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "682": { + "706": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "683": { + "707": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "685": { + "709": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GreaterThanOrEqualToken" }, - "686": { + "710": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GreaterThanOrEqualToken.typ" }, - "687": { + "711": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "688": { + "712": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "689": { + "713": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "691": { + "715": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColumnCombinatorToken" }, - "692": { + "716": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColumnCombinatorToken.typ" }, - "693": { + "717": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "694": { + "718": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "695": { + "719": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "697": { + "721": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassToken" }, - "698": { + "722": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassToken.typ" }, - "699": { + "723": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassToken.val" }, - "700": { + "724": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "701": { + "725": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "702": { + "726": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "704": { + "728": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoElementToken" }, - "705": { + "729": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoElementToken.typ" }, - "706": { + "730": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoElementToken.val" }, - "707": { + "731": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "708": { + "732": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "709": { + "733": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "711": { + "735": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoPageToken" }, - "712": { + "736": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoPageToken.typ" }, - "713": { + "737": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoPageToken.val" }, - "714": { + "738": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "715": { + "739": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "716": { + "740": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "718": { + "742": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassFunctionToken" }, - "719": { + "743": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassFunctionToken.typ" }, - "720": { + "744": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassFunctionToken.val" }, - "721": { + "745": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassFunctionToken.chi" }, - "722": { + "746": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "723": { + "747": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "724": { + "748": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "726": { + "750": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DelimToken" }, - "727": { + "751": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DelimToken.typ" }, - "728": { + "752": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "729": { + "753": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "730": { + "754": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "732": { + "756": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadUrlToken" }, - "733": { + "757": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadUrlToken.typ" }, - "734": { + "758": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadUrlToken.val" }, - "735": { + "759": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "736": { + "760": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "737": { + "761": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "739": { + "763": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UrlToken" }, - "740": { + "764": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UrlToken.typ" }, - "741": { + "765": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UrlToken.val" }, - "742": { + "766": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "743": { + "767": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "744": { + "768": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "746": { + "770": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EOFToken" }, - "747": { + "771": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EOFToken.typ" }, - "748": { + "772": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "749": { + "773": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "750": { + "774": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "752": { + "776": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ImportantToken" }, - "753": { + "777": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ImportantToken.typ" }, - "754": { + "778": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "755": { + "779": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "756": { + "780": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "758": { + "782": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken" }, - "759": { + "783": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken.typ" }, - "760": { + "784": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken.val" }, - "761": { + "785": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken.kin" }, - "762": { + "786": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken.chi" }, - "763": { + "787": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken.cal" }, - "764": { + "788": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "765": { + "789": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "766": { + "790": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "768": { + "792": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrToken" }, - "769": { + "793": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrToken.typ" }, - "770": { + "794": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrToken.chi" }, - "771": { + "795": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "772": { + "796": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "773": { + "797": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "775": { + "799": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidAttrToken" }, - "776": { + "800": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidAttrToken.typ" }, - "777": { + "801": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidAttrToken.chi" }, - "778": { + "802": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "779": { + "803": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "780": { + "804": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "782": { + "806": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ChildCombinatorToken" }, - "783": { + "807": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ChildCombinatorToken.typ" }, - "784": { + "808": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "785": { + "809": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "786": { + "810": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "788": { + "812": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureToken" }, - "789": { + "813": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureToken.typ" }, - "790": { + "814": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureToken.val" }, - "791": { + "815": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "792": { + "816": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "793": { + "817": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "795": { + "819": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureNotToken" }, - "796": { + "820": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureNotToken.typ" }, - "797": { + "821": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureNotToken.val" }, - "798": { + "822": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "799": { + "823": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "800": { + "824": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "802": { + "826": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOnlyToken" }, - "803": { + "827": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOnlyToken.typ" }, - "804": { + "828": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOnlyToken.val" }, - "805": { + "829": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "806": { + "830": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "807": { + "831": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "809": { + "833": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureAndToken" }, - "810": { + "834": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureAndToken.typ" }, - "811": { + "835": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "812": { + "836": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "813": { + "837": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "815": { + "839": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOrToken" }, - "816": { + "840": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOrToken.typ" }, - "817": { + "841": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "818": { + "842": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "819": { + "843": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "821": { + "845": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaQueryConditionToken" }, - "822": { + "846": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaQueryConditionToken.typ" }, - "823": { + "847": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaQueryConditionToken.l" }, - "824": { + "848": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaQueryConditionToken.op" }, - "825": { + "849": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaQueryConditionToken.r" }, - "826": { + "850": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "827": { + "851": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "828": { + "852": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "830": { + "854": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DescendantCombinatorToken" }, - "831": { + "855": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DescendantCombinatorToken.typ" }, - "832": { + "856": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "833": { + "857": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "834": { + "858": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "836": { + "860": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NextSiblingCombinatorToken" }, - "837": { + "861": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NextSiblingCombinatorToken.typ" }, - "838": { + "862": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "839": { + "863": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "840": { + "864": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "842": { + "866": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SubsequentCombinatorToken" }, - "843": { + "867": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SubsequentCombinatorToken.typ" }, - "844": { + "868": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "845": { + "869": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "846": { + "870": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "848": { + "872": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AddToken" }, - "849": { + "873": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AddToken.typ" }, - "850": { + "874": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "851": { + "875": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "852": { + "876": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "854": { + "878": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SubToken" }, - "855": { + "879": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SubToken.typ" }, - "856": { + "880": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "857": { + "881": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "858": { + "882": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "860": { + "884": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DivToken" }, - "861": { + "885": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DivToken.typ" }, - "862": { + "886": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "863": { + "887": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "864": { + "888": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "866": { + "890": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MulToken" }, - "867": { + "891": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MulToken.typ" }, - "868": { + "892": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "869": { + "893": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "870": { + "894": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "872": { + "896": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpression" }, - "873": { + "897": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpression.typ" }, - "874": { + "898": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpression.sign" }, - "875": { + "899": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpression.val" }, - "876": { + "900": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "877": { + "901": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "878": { + "902": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "880": { + "904": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FractionToken" }, - "881": { + "905": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FractionToken.typ" }, - "882": { + "906": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FractionToken.l" }, - "883": { + "907": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FractionToken.r" }, - "884": { + "908": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "885": { + "909": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "886": { + "910": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "888": { + "912": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionToken" }, - "889": { + "913": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionToken.typ" }, - "890": { + "914": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionToken.op" }, - "891": { + "915": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionToken.l" }, - "892": { + "916": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionToken.r" }, - "893": { + "917": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "894": { + "918": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "895": { + "919": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "897": { + "921": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken" }, - "898": { + "922": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken.typ" }, - "899": { + "923": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken.op" }, - "900": { + "924": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken.l" }, - "901": { + "925": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken.r" }, - "902": { + "926": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken.attr" }, - "903": { + "927": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "904": { + "928": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "905": { + "929": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "907": { + "931": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NameSpaceAttributeToken" }, - "908": { + "932": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NameSpaceAttributeToken.typ" }, - "909": { + "933": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NameSpaceAttributeToken.l" }, - "910": { + "934": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NameSpaceAttributeToken.r" }, - "911": { + "935": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "912": { + "936": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "913": { + "937": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "915": { + "939": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ListToken" }, - "916": { + "940": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ListToken.typ" }, - "917": { + "941": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ListToken.chi" }, - "918": { + "942": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.loc" }, - "919": { + "943": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.tokens" }, - "920": { + "944": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken.parent" }, - "922": { + "946": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "ComposesSelectorToken" + }, + "947": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "ComposesSelectorToken.typ" + }, + "948": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "ComposesSelectorToken.l" + }, + "949": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "ComposesSelectorToken.r" + }, + "950": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.loc" + }, + "951": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.tokens" + }, + "952": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.parent" + }, + "954": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableToken" + }, + "955": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableToken.typ" + }, + "956": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableToken.nam" + }, + "957": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableToken.val" + }, + "958": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.loc" + }, + "959": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.tokens" + }, + "960": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.parent" + }, + "962": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableImportTokenType" + }, + "963": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableImportTokenType.typ" + }, + "964": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableImportTokenType.nam" + }, + "965": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableImportTokenType.val" + }, + "966": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.loc" + }, + "967": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.tokens" + }, + "968": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.parent" + }, + "970": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableMapTokenType" + }, + "971": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableMapTokenType.typ" + }, + "972": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableMapTokenType.vars" + }, + "973": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableMapTokenType.from" + }, + "974": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.loc" + }, + "975": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.tokens" + }, + "976": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/ast.d.ts", + "qualifiedName": "BaseToken.parent" + }, + "978": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpressionNode" }, - "923": { + "979": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionNode" }, - "924": { + "980": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "Token" }, - "925": { + "981": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyType" }, - "926": { + "982": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyType.shorthand" }, - "927": { + "983": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType" }, - "928": { + "984": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.shorthand" }, - "929": { + "985": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.map" }, - "930": { + "986": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.properties" }, - "931": { + "987": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.types" }, - "932": { + "988": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.multiple" }, - "933": { + "989": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.separator" }, - "934": { + "990": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "935": { + "991": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.typ" }, - "936": { + "992": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.val" }, - "937": { + "993": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType.keywords" }, - "938": { + "994": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertySetType" }, - "939": { + "995": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertySetType.__index" }, - "941": { + "997": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType" }, - "942": { + "998": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.default" }, - "943": { + "999": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.types" }, - "944": { + "1000": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.keywords" }, - "945": { + "1001": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.required" }, - "946": { + "1002": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.multiple" }, - "947": { + "1003": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.prefix" }, - "948": { + "1004": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "949": { + "1005": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.typ" }, - "950": { + "1006": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.val" }, - "951": { + "1007": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.previous" }, - "952": { + "1008": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.separator" }, - "953": { + "1009": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "954": { + "1010": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.typ" }, - "955": { + "1011": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.constraints" }, - "956": { + "1012": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "957": { + "1013": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.__index" }, - "959": { + "1015": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "960": { + "1016": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.__index" }, - "962": { + "1018": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType.mapping" }, - "963": { + "1019": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType" }, - "964": { + "1020": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.shorthand" }, - "965": { + "1021": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.pattern" }, - "966": { + "1022": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.keywords" }, - "967": { + "1023": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.default" }, - "968": { + "1024": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.mapping" }, - "969": { + "1025": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.multiple" }, - "970": { + "1026": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.separator" }, - "971": { + "1027": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "972": { + "1028": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.typ" }, - "973": { + "1029": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.val" }, - "974": { + "1030": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.set" }, - "975": { + "1031": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType.properties" }, - "976": { + "1032": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "977": { + "1033": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.__index" }, - "979": { + "1035": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties" }, - "980": { + "1036": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.types" }, - "981": { + "1037": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.default" }, - "982": { + "1038": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.keywords" }, - "983": { + "1039": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.required" }, - "984": { + "1040": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.multiple" }, - "985": { + "1041": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.constraints" }, - "986": { + "1042": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.mapping" }, - "987": { + "1043": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "988": { + "1044": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.__index" }, - "990": { + "1046": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.validation" }, - "991": { + "1047": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type" }, - "992": { + "1048": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "__type.__index" }, - "994": { + "1050": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties.prefix" }, - "995": { + "1051": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef" }, - "996": { + "1052": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef.shorthand" }, - "997": { + "1053": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef.pattern" }, - "998": { + "1054": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef.keywords" }, - "999": { + "1055": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef.defaults" }, - "1000": { + "1056": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef.multiple" }, - "1001": { + "1057": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef.separator" }, - "1002": { + "1058": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandType" }, - "1003": { + "1059": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandType.shorthand" }, - "1004": { + "1060": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandType.properties" }, - "1240": { + "1296": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "GenericVisitorResult" }, - "1241": { + "1297": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "T" }, - "1242": { + "1298": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "GenericVisitorHandler" }, - "1243": { + "1299": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type" }, - "1244": { + "1300": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type" }, - "1245": { + "1301": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "node" }, - "1246": { + "1302": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "parent" }, - "1247": { + "1303": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "root" }, - "1248": { + "1304": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "T" }, - "1249": { + "1305": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "GenericVisitorAstNodeHandlerMap" }, - "1250": { + "1306": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type" }, - "1251": { + "1307": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type.type" }, - "1252": { + "1308": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type.handler" }, - "1253": { + "1309": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type" }, - "1254": { + "1310": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type.type" }, - "1255": { + "1311": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "__type.handler" }, - "1256": { + "1312": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "T" }, - "1257": { + "1313": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "ValueVisitorHandler" }, - "1258": { + "1314": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "DeclarationVisitorHandler" }, - "1259": { + "1315": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "RuleVisitorHandler" }, - "1260": { + "1316": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "AtRuleVisitorHandler" }, - "1261": { + "1317": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap" }, - "1262": { + "1318": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap.AtRule" }, - "1263": { + "1319": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap.Declaration" }, - "1264": { + "1320": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap.Rule" }, - "1265": { + "1321": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap.KeyframesRule" }, - "1266": { + "1322": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap.KeyframesAtRule" }, - "1267": { + "1323": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap.Value" }, - "1268": { + "1324": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkerOption" }, - "1269": { + "1325": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkerFilter" }, - "1270": { + "1326": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "__type" }, - "1271": { + "1327": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "__type" }, - "1272": { + "1328": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "node" }, - "1273": { + "1329": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkerValueFilter" }, - "1274": { + "1330": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "__type" }, - "1275": { + "1331": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "__type" }, - "1276": { + "1332": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "node" }, - "1277": { + "1333": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "parent" }, - "1278": { + "1334": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "event" }, - "1279": { + "1335": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkResult" }, - "1280": { + "1336": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkResult.node" }, - "1281": { + "1337": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkResult.parent" }, - "1282": { + "1338": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkResult.root" }, - "1283": { + "1339": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult" }, - "1284": { + "1340": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult.value" }, - "1285": { + "1341": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult.previousValue" }, - "1286": { + "1342": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult.nextValue" }, - "1287": { + "1343": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult.root" }, - "1288": { + "1344": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult.parent" }, - "1289": { + "1345": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "PropertyListOptions" }, - "1290": { + "1346": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "PropertyListOptions.removeDuplicateDeclarations" }, - "1291": { + "1347": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "PropertyListOptions.computeShorthand" }, - "1292": { + "1348": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "ParseInfo" }, - "1293": { + "1349": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "ParseInfo.buffer" }, - "1294": { + "1350": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "ParseInfo.stream" }, - "1295": { + "1351": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "ParseInfo.position" }, - "1296": { + "1352": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "ParseInfo.currentPosition" }, - "1297": { + "1353": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/parse.d.ts", + "qualifiedName": "ParseInfo.offset" + }, + "1354": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxNode" }, - "1298": { + "1355": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxNode.syntax" }, - "1299": { + "1356": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxNode.ast" }, - "1300": { + "1357": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSelectorOptions" }, - "1301": { + "1358": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSelectorOptions.nestedSelector" }, - "1302": { + "1359": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.validation" }, - "1303": { + "1360": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.lenient" }, - "1310": { + "1367": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration" }, - "1311": { + "1368": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration.declarations" }, - "1312": { + "1369": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration.functions" }, - "1313": { + "1370": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration.syntaxes" }, - "1314": { + "1371": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration.selectors" }, - "1315": { + "1372": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration.atRules" }, - "1316": { + "1373": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult" }, - "1317": { + "1374": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.valid" }, - "1318": { + "1375": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.node" }, - "1319": { + "1376": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.syntax" }, - "1320": { + "1377": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.error" }, - "1321": { + "1378": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.cycle" }, - "1322": { + "1379": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxResult" }, - "1323": { + "1380": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxResult.syntax" }, - "1324": { + "1381": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxResult.context" }, - "1325": { + "1382": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.valid" }, - "1326": { + "1383": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.node" }, - "1327": { + "1384": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.error" }, - "1328": { + "1385": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult.cycle" }, - "1329": { + "1386": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context" }, - "1330": { + "1387": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.index" }, - "1331": { + "1388": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.length" }, - "1332": { + "1389": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.current" }, - "1333": { + "1390": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.current" }, - "1334": { + "1391": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1335": { + "1392": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.update" }, - "1336": { + "1393": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.update" }, - "1337": { + "1394": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1338": { + "1395": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "context" }, - "1339": { + "1396": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.consume" }, - "1340": { + "1397": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.consume" }, - "1341": { + "1398": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1342": { + "1399": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "token" }, - "1343": { + "1400": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "howMany" }, - "1344": { + "1401": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.consume" }, - "1345": { + "1402": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1346": { + "1403": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "token" }, - "1347": { + "1404": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "howMany" }, - "1348": { + "1405": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.peek" }, - "1349": { + "1406": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.peek" }, - "1350": { + "1407": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1351": { + "1408": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.next" }, - "1352": { + "1409": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.next" }, - "1353": { + "1410": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1354": { + "1411": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.slice" }, - "1355": { + "1412": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.slice" }, - "1356": { + "1413": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1357": { + "1414": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.clone" }, - "1358": { + "1415": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.clone" }, - "1359": { + "1416": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Type" }, - "1360": { + "1417": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.done" }, - "1361": { + "1418": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.done" }, - "1362": { + "1419": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context.Type" }, - "1363": { + "1420": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ErrorDescription" }, - "1364": { + "1421": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions" }, - "1365": { + "1422": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions" }, - "1366": { + "1423": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "LoadResult" }, - "1367": { + "1424": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ModuleOptions" + }, + "1425": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeatureOptions" }, - "1368": { + "1426": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyFeature" }, - "1369": { + "1427": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ResolvedPath" }, - "1370": { + "1428": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResultStats" }, - "1371": { + "1429": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseTokenOptions" }, - "1372": { + "1430": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TokenizeResult" }, - "1373": { + "1431": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MatchedSelector" }, - "1374": { + "1432": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "VariableScopeInfo" }, - "1375": { + "1433": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "SourceMapObject" }, - "1376": { + "1434": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Position" }, - "1377": { + "1435": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "Location" }, - "1378": { + "1436": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "BaseToken" }, - "1379": { + "1437": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstComment" }, - "1380": { + "1438": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstDeclaration" }, - "1381": { + "1439": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRule" }, - "1382": { + "1440": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidRule" }, - "1383": { + "1441": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidDeclaration" }, - "1384": { + "1442": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstInvalidAtRule" }, - "1385": { + "1443": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyFrameRule" }, - "1386": { + "1444": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "RawSelectorTokens" }, - "1389": { + "1447": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstAtRule" }, - "1390": { + "1448": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesRule" }, - "1391": { + "1449": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstKeyframesAtRule" }, - "1392": { + "1450": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstRuleList" }, - "1393": { + "1451": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstStyleSheet" }, - "1394": { + "1452": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LiteralToken" }, - "1395": { + "1453": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ClassSelectorToken" }, - "1396": { + "1454": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidClassSelectorToken" }, - "1397": { + "1455": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UniversalSelectorToken" }, - "1398": { + "1456": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentToken" }, - "1399": { + "1457": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IdentListToken" }, - "1400": { + "1458": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashedIdentToken" }, - "1401": { + "1459": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommaToken" }, - "1402": { + "1460": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColonToken" }, - "1403": { + "1461": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SemiColonToken" }, - "1404": { + "1462": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NestingSelectorToken" }, - "1405": { + "1463": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NumberToken" }, - "1406": { + "1464": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AtRuleToken" }, - "1407": { + "1465": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PercentageToken" }, - "1408": { + "1466": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FlexToken" }, - "1409": { + "1467": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionToken" }, - "1410": { + "1468": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GridTemplateFuncToken" }, - "1411": { + "1469": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionURLToken" }, - "1412": { + "1470": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FunctionImageToken" }, - "1413": { + "1471": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimingFunctionToken" }, - "1414": { + "1472": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimelineFunctionToken" }, - "1415": { + "1473": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StringToken" }, - "1416": { + "1474": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadStringToken" }, - "1417": { + "1475": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnclosedStringToken" }, - "1418": { + "1476": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DimensionToken" }, - "1419": { + "1477": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LengthToken" }, - "1420": { + "1478": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AngleToken" }, - "1421": { + "1479": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "TimeToken" }, - "1422": { + "1480": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FrequencyToken" }, - "1423": { + "1481": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ResolutionToken" }, - "1424": { + "1482": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "HashToken" }, - "1425": { + "1483": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BlockStartToken" }, - "1426": { + "1484": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BlockEndToken" }, - "1427": { + "1485": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrStartToken" }, - "1428": { + "1486": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrEndToken" }, - "1429": { + "1487": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensStartToken" }, - "1430": { + "1488": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensEndToken" }, - "1431": { + "1489": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ParensToken" }, - "1432": { + "1490": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "WhitespaceToken" }, - "1433": { + "1491": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CommentToken" }, - "1434": { + "1492": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCommentToken" }, - "1435": { + "1493": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "CDOCommentToken" }, - "1436": { + "1494": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadCDOCommentToken" }, - "1437": { + "1495": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "IncludeMatchToken" }, - "1438": { + "1496": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DashMatchToken" }, - "1439": { + "1497": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EqualMatchToken" }, - "1440": { + "1498": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "StartMatchToken" }, - "1441": { + "1499": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EndMatchToken" }, - "1442": { + "1500": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ContainMatchToken" }, - "1443": { + "1501": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LessThanToken" }, - "1444": { + "1502": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "LessThanOrEqualToken" }, - "1445": { + "1503": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GreaterThanToken" }, - "1446": { + "1504": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "GreaterThanOrEqualToken" }, - "1447": { + "1505": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColumnCombinatorToken" }, - "1448": { + "1506": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassToken" }, - "1449": { + "1507": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoElementToken" }, - "1450": { + "1508": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoPageToken" }, - "1451": { + "1509": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "PseudoClassFunctionToken" }, - "1452": { + "1510": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DelimToken" }, - "1453": { + "1511": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BadUrlToken" }, - "1454": { + "1512": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UrlToken" }, - "1455": { + "1513": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "EOFToken" }, - "1456": { + "1514": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ImportantToken" }, - "1457": { + "1515": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ColorToken" }, - "1458": { + "1516": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AttrToken" }, - "1459": { + "1517": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "InvalidAttrToken" }, - "1460": { + "1518": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ChildCombinatorToken" }, - "1461": { + "1519": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureToken" }, - "1462": { + "1520": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureNotToken" }, - "1463": { + "1521": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOnlyToken" }, - "1464": { + "1522": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureAndToken" }, - "1465": { + "1523": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaFeatureOrToken" }, - "1466": { + "1524": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MediaQueryConditionToken" }, - "1467": { + "1525": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DescendantCombinatorToken" }, - "1468": { + "1526": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NextSiblingCombinatorToken" }, - "1469": { + "1527": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SubsequentCombinatorToken" }, - "1470": { + "1528": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "AddToken" }, - "1471": { + "1529": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "SubToken" }, - "1472": { + "1530": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "DivToken" }, - "1473": { + "1531": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MulToken" }, - "1474": { + "1532": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpression" }, - "1475": { + "1533": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "FractionToken" }, - "1476": { + "1534": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionToken" }, - "1477": { + "1535": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "MatchExpressionToken" }, - "1478": { + "1536": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "NameSpaceAttributeToken" }, - "1479": { + "1537": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "ListToken" }, - "1480": { + "1538": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "ComposesSelectorToken" + }, + "1539": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableToken" + }, + "1540": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableImportTokenType" + }, + "1541": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/token.d.ts", + "qualifiedName": "CssVariableMapTokenType" + }, + "1542": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "UnaryExpressionNode" }, - "1481": { + "1543": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "BinaryExpressionNode" }, - "1482": { + "1544": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/token.d.ts", "qualifiedName": "Token" }, - "1483": { + "1545": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyType" }, - "1484": { + "1546": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandPropertyType" }, - "1485": { + "1547": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertySetType" }, - "1486": { + "1548": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "PropertyMapType" }, - "1487": { + "1549": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandMapType" }, - "1488": { + "1550": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandProperties" }, - "1489": { + "1551": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandDef" }, - "1490": { + "1552": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/shorthand.d.ts", "qualifiedName": "ShorthandType" }, - "1524": { + "1586": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "GenericVisitorResult" }, - "1525": { + "1587": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "GenericVisitorHandler" }, - "1526": { + "1588": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "GenericVisitorAstNodeHandlerMap" }, - "1527": { + "1589": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "ValueVisitorHandler" }, - "1528": { + "1590": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "DeclarationVisitorHandler" }, - "1529": { + "1591": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "RuleVisitorHandler" }, - "1530": { + "1592": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "AtRuleVisitorHandler" }, - "1531": { + "1593": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/visitor.d.ts", "qualifiedName": "VisitorNodeMap" }, - "1532": { + "1594": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkerOption" }, - "1533": { + "1595": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkerFilter" }, - "1534": { + "1596": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkerValueFilter" }, - "1535": { + "1597": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkResult" }, - "1536": { + "1598": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/walker.d.ts", "qualifiedName": "WalkAttributesResult" }, - "1537": { + "1599": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "PropertyListOptions" }, - "1538": { + "1600": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/parse.d.ts", "qualifiedName": "ParseInfo" }, - "1539": { + "1601": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxNode" }, - "1540": { + "1602": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSelectorOptions" }, - "1541": { + "1603": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationConfiguration" }, - "1542": { + "1604": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationResult" }, - "1543": { + "1605": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "ValidationSyntaxResult" }, - "1544": { + "1606": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/validation.d.ts", "qualifiedName": "Context" }, - "1545": { + "1607": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/ast.d.ts", "qualifiedName": "AstNode" }, - "1546": { + "1608": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResult" }, - "1547": { + "1609": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResult.ast" }, - "1548": { + "1610": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResult.errors" }, - "1549": { + "1611": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResult.stats" }, - "1550": { + "1612": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResult.mapping" + }, + "1613": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResult.cssModuleVariables" + }, + "1614": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResult.importMapping" + }, + "1616": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions" }, - "1551": { + "1617": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.src" }, - "1552": { + "1618": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.sourcemap" }, - "1553": { + "1619": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.removeCharset" }, - "1554": { + "1620": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolveImport" }, - "1555": { + "1621": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.cwd" }, - "1556": { + "1622": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.expandNestingRules" }, - "1557": { + "1623": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.load" }, - "1558": { + "1624": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1559": { + "1625": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1560": { + "1626": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "1561": { + "1627": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "1562": { + "1628": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "asStream" }, - "1567": { + "1633": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolveUrls" }, - "1568": { + "1634": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolve" }, - "1569": { + "1635": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1570": { + "1636": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1571": { + "1637": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "1572": { + "1638": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "1573": { + "1639": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentWorkingDirectory" }, - "1574": { + "1640": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1575": { + "1641": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.absolute" }, - "1576": { + "1642": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.relative" }, - "1577": { + "1643": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.visitor" }, - "1578": { + "1644": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.signal" }, - "1581": { + "1647": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParserOptions.module" + }, + "1648": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.minify" }, - "1582": { + "1649": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.parseColor" }, - "1583": { + "1650": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.nestingRules" }, - "1584": { + "1651": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeDuplicateDeclarations" }, - "1585": { + "1652": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeShorthand" }, - "1586": { + "1653": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeTransform" }, - "1587": { + "1654": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeCalcExpression" }, - "1588": { + "1655": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.inlineCssVariables" }, - "1589": { + "1656": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeEmpty" }, - "1590": { + "1657": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removePrefix" }, - "1591": { + "1658": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.pass" }, - "1593": { + "1660": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.validation" }, - "1594": { + "1661": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.lenient" }, - "1601": { + "1668": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions" }, - "1602": { + "1669": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.minify" }, - "1603": { + "1670": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.beautify" }, - "1604": { + "1671": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.removeEmpty" }, - "1605": { + "1672": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.expandNestingRules" }, - "1606": { + "1673": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.preserveLicense" }, - "1607": { + "1674": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.sourcemap" }, - "1608": { + "1675": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.indent" }, - "1609": { + "1676": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.newLine" }, - "1610": { + "1677": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.removeComments" }, - "1611": { + "1678": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.convertColor" }, - "1612": { + "1679": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.withParents" }, - "1613": { + "1680": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.output" }, - "1614": { + "1681": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.cwd" }, - "1615": { + "1682": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.resolve" }, - "1616": { + "1683": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1617": { + "1684": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1618": { + "1685": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "1619": { + "1686": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "1620": { + "1687": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentWorkingDirectory" }, - "1621": { + "1688": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult" }, - "1622": { + "1689": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult.code" }, - "1623": { + "1690": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult.errors" }, - "1624": { + "1691": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult.stats" }, - "1625": { + "1692": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1626": { + "1693": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.total" }, - "1627": { + "1694": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult.map" }, - "1628": { + "1695": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TransformOptions" }, - "1629": { + "1696": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.src" }, - "1630": { + "1697": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.sourcemap" }, - "1631": { + "1698": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.removeCharset" }, - "1632": { + "1699": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolveImport" }, - "1633": { + "1700": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.cwd" }, - "1634": { + "1701": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.expandNestingRules" }, - "1635": { + "1702": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.load" }, - "1636": { + "1703": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1637": { + "1704": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1638": { + "1705": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "1639": { + "1706": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "1640": { + "1707": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "asStream" }, - "1645": { + "1712": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolveUrls" }, - "1646": { + "1713": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.resolve" }, - "1647": { + "1714": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1648": { + "1715": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1649": { + "1716": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "url" }, - "1650": { + "1717": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentUrl" }, - "1651": { + "1718": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "currentWorkingDirectory" }, - "1652": { + "1719": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1653": { + "1720": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.absolute" }, - "1654": { + "1721": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.relative" }, - "1655": { + "1722": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.visitor" }, - "1656": { + "1723": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParserOptions.signal" }, - "1659": { + "1726": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParserOptions.module" + }, + "1727": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.minify" }, - "1660": { + "1728": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.parseColor" }, - "1661": { + "1729": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.nestingRules" }, - "1662": { + "1730": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeDuplicateDeclarations" }, - "1663": { + "1731": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeShorthand" }, - "1664": { + "1732": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeTransform" }, - "1665": { + "1733": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.computeCalcExpression" }, - "1666": { + "1734": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.inlineCssVariables" }, - "1667": { + "1735": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removeEmpty" }, - "1668": { + "1736": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.removePrefix" }, - "1669": { + "1737": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "MinifyOptions.pass" }, - "1671": { + "1739": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.validation" }, - "1672": { + "1740": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ValidationOptions.lenient" }, - "1679": { + "1747": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.beautify" }, - "1680": { + "1748": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.preserveLicense" }, - "1681": { + "1749": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.indent" }, - "1682": { + "1750": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.newLine" }, - "1683": { + "1751": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.removeComments" }, - "1684": { + "1752": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.convertColor" }, - "1685": { + "1753": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.withParents" }, - "1686": { + "1754": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderOptions.output" }, - "1687": { + "1755": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TransformResult" }, - "1688": { + "1756": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "TransformResult.stats" }, - "1689": { + "1757": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type" }, - "1690": { + "1758": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.src" }, - "1691": { + "1759": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.bytesIn" }, - "1692": { + "1760": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.bytesOut" }, - "1693": { + "1761": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.importedBytesIn" }, - "1694": { + "1762": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.parse" }, - "1695": { + "1763": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.minify" }, - "1696": { + "1764": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.render" }, - "1697": { + "1765": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.total" }, - "1698": { + "1766": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "__type.imports" }, - "1699": { + "1767": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResult.ast" }, - "1700": { + "1768": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "ParseResult.errors" }, - "1701": { + "1769": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResult.mapping" + }, + "1770": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResult.cssModuleVariables" + }, + "1771": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/@types/index.d.ts", + "qualifiedName": "ParseResult.importMapping" + }, + "1773": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult.code" }, - "1702": { + "1774": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "RenderResult.map" }, - "1737": { + "1809": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "walk" }, - "1738": { + "1810": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "walk" }, - "1739": { + "1811": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "node" }, - "1740": { + "1812": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "filter" }, - "1741": { + "1813": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "reverse" }, - "1742": { + "1814": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "walkValues" }, - "1743": { + "1815": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "walkValues" }, - "1744": { + "1816": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "values" }, - "1745": { + "1817": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "root" }, - "1746": { + "1818": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "filter" }, - "1747": { + "1819": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "__type" }, - "1748": { + "1820": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "__type.event" }, - "1749": { + "1821": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "__type.fn" }, - "1750": { + "1822": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "__type.type" }, - "1751": { + "1823": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "__type" }, - "1752": { + "1824": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "__type" }, - "1753": { + "1825": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "token" }, - "1754": { + "1826": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "reverse" }, - "1768": { + "1840": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/parser/parse.ts", "qualifiedName": "parseDeclarations" }, - "1769": { + "1841": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/parser/parse.ts", "qualifiedName": "parseDeclarations" }, - "1770": { + "1842": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/parser/parse.ts", "qualifiedName": "declaration" }, - "1771": { + "1843": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken" }, - "1772": { + "1844": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.CommentTokenType" }, - "1773": { + "1845": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.CDOCOMMTokenType" }, - "1774": { + "1846": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.StyleSheetNodeType" }, - "1775": { + "1847": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.AtRuleNodeType" }, - "1776": { + "1848": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.RuleNodeType" }, - "1777": { + "1849": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DeclarationNodeType" }, - "1778": { + "1850": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.LiteralTokenType" }, - "1779": { + "1851": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.IdenTokenType" }, - "1780": { + "1852": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DashedIdenTokenType" }, - "1781": { + "1853": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.CommaTokenType" }, - "1782": { + "1854": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ColonTokenType" }, - "1783": { + "1855": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.SemiColonTokenType" }, - "1784": { + "1856": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.NumberTokenType" }, - "1785": { + "1857": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.AtRuleTokenType" }, - "1786": { + "1858": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.PercentageTokenType" }, - "1787": { + "1859": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.FunctionTokenType" }, - "1788": { + "1860": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.TimelineFunctionTokenType" }, - "1789": { + "1861": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.TimingFunctionTokenType" }, - "1790": { + "1862": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.UrlFunctionTokenType" }, - "1791": { + "1863": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ImageFunctionTokenType" }, - "1792": { + "1864": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.StringTokenType" }, - "1793": { + "1865": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.UnclosedStringTokenType" }, - "1794": { + "1866": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DimensionTokenType" }, - "1795": { + "1867": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.LengthTokenType" }, - "1796": { + "1868": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.AngleTokenType" }, - "1797": { + "1869": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.TimeTokenType" }, - "1798": { + "1870": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.FrequencyTokenType" }, - "1799": { + "1871": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ResolutionTokenType" }, - "1800": { + "1872": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.HashTokenType" }, - "1801": { + "1873": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BlockStartTokenType" }, - "1802": { + "1874": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BlockEndTokenType" }, - "1803": { + "1875": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.AttrStartTokenType" }, - "1804": { + "1876": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.AttrEndTokenType" }, - "1805": { + "1877": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.StartParensTokenType" }, - "1806": { + "1878": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.EndParensTokenType" }, - "1807": { + "1879": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ParensTokenType" }, - "1808": { + "1880": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.WhitespaceTokenType" }, - "1809": { + "1881": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.IncludeMatchTokenType" }, - "1810": { + "1882": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DashMatchTokenType" }, - "1811": { + "1883": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.EqualMatchTokenType" }, - "1812": { + "1884": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.LtTokenType" }, - "1813": { + "1885": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.LteTokenType" }, - "1814": { + "1886": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.GtTokenType" }, - "1815": { + "1887": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.GteTokenType" }, - "1816": { + "1888": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.PseudoClassTokenType" }, - "1817": { + "1889": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.PseudoClassFuncTokenType" }, - "1818": { + "1890": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DelimTokenType" }, - "1819": { + "1891": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.UrlTokenTokenType" }, - "1820": { + "1892": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.EOFTokenType" }, - "1821": { + "1893": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ImportantTokenType" }, - "1822": { + "1894": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ColorTokenType" }, - "1823": { + "1895": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.AttrTokenType" }, - "1824": { + "1896": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BadCommentTokenType" }, - "1825": { + "1897": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BadCdoTokenType" }, - "1826": { + "1898": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BadUrlTokenType" }, - "1827": { + "1899": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BadStringTokenType" }, - "1828": { + "1900": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.BinaryExpressionTokenType" }, - "1829": { + "1901": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.UnaryExpressionTokenType" }, - "1830": { + "1902": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.FlexTokenType" }, - "1831": { + "1903": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ListToken" }, - "1832": { + "1904": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Add" }, - "1833": { + "1905": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Mul" }, - "1834": { + "1906": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Div" }, - "1835": { + "1907": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Sub" }, - "1836": { + "1908": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ColumnCombinatorTokenType" }, - "1837": { + "1909": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ContainMatchTokenType" }, - "1838": { + "1910": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.StartMatchTokenType" }, - "1839": { + "1911": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.EndMatchTokenType" }, - "1840": { + "1912": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MatchExpressionTokenType" }, - "1841": { + "1913": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.NameSpaceAttributeTokenType" }, - "1842": { + "1914": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.FractionTokenType" }, - "1843": { + "1915": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.IdenListTokenType" }, - "1844": { + "1916": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.GridTemplateFuncTokenType" }, - "1845": { + "1917": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.KeyFramesRuleNodeType" }, - "1846": { + "1918": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ClassSelectorTokenType" }, - "1847": { + "1919": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.UniversalSelectorTokenType" }, - "1848": { + "1920": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ChildCombinatorTokenType" }, - "1849": { + "1921": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DescendantCombinatorTokenType" }, - "1850": { + "1922": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.NextSiblingCombinatorTokenType" }, - "1851": { + "1923": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.SubsequentSiblingCombinatorTokenType" }, - "1852": { + "1924": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.NestingSelectorTokenType" }, - "1853": { + "1925": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.InvalidRuleTokenType" }, - "1854": { + "1926": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.InvalidClassSelectorTokenType" }, - "1855": { + "1927": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.InvalidAttrTokenType" }, - "1856": { + "1928": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.InvalidAtRuleTokenType" }, - "1857": { + "1929": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MediaQueryConditionTokenType" }, - "1858": { + "1930": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MediaFeatureTokenType" }, - "1859": { + "1931": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MediaFeatureOnlyTokenType" }, - "1860": { + "1932": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MediaFeatureNotTokenType" }, - "1861": { + "1933": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MediaFeatureAndTokenType" }, - "1862": { + "1934": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.MediaFeatureOrTokenType" }, - "1863": { + "1935": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.PseudoPageTokenType" }, - "1864": { + "1936": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.PseudoElementTokenType" }, - "1865": { + "1937": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.KeyframesAtRuleNodeType" }, - "1866": { + "1938": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.InvalidDeclarationNodeType" }, - "1867": { + "1939": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "EnumToken.ComposesSelectorNodeType" + }, + "1940": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "EnumToken.CssVariableTokenType" + }, + "1941": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "EnumToken.CssVariableImportTokenType" + }, + "1942": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "EnumToken.CssVariableDeclarationMapTokenType" + }, + "1943": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Time" }, - "1868": { + "1944": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Iden" }, - "1869": { + "1945": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.EOF" }, - "1870": { + "1946": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Hash" }, - "1871": { + "1947": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Flex" }, - "1872": { + "1948": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Angle" }, - "1873": { + "1949": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Color" }, - "1874": { + "1950": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Comma" }, - "1875": { + "1951": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.String" }, - "1876": { + "1952": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Length" }, - "1877": { + "1953": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Number" }, - "1878": { + "1954": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Perc" }, - "1879": { + "1955": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Literal" }, - "1880": { + "1956": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Comment" }, - "1881": { + "1957": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.UrlFunc" }, - "1882": { + "1958": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Dimension" }, - "1883": { + "1959": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Frequency" }, - "1884": { + "1960": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Resolution" }, - "1885": { + "1961": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.Whitespace" }, - "1886": { + "1962": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.IdenList" }, - "1887": { + "1963": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.DashedIden" }, - "1888": { + "1964": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.GridTemplateFunc" }, - "1889": { + "1965": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.ImageFunc" }, - "1890": { + "1966": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.CommentNodeType" }, - "1891": { + "1967": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.CDOCOMMNodeType" }, - "1892": { + "1968": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.TimingFunction" }, - "1893": { + "1969": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "EnumToken.TimelineFunction" }, - "1894": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel" - }, - "1895": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel.None" - }, - "1896": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel.Selector" - }, - "1897": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel.AtRule" - }, - "1898": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel.Declaration" - }, - "1899": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel.Default" - }, - "1900": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/types.ts", - "qualifiedName": "ValidationLevel.All" - }, - "1901": { + "1970": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType" }, - "1902": { + "1971": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.SYS" }, - "1903": { + "1972": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.DPSYS" }, - "1904": { + "1973": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.LIT" }, - "1905": { + "1974": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.HEX" }, - "1906": { + "1975": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.RGBA" }, - "1907": { + "1976": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.HSLA" }, - "1908": { + "1977": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.HWB" }, - "1909": { + "1978": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.CMYK" }, - "1910": { + "1979": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.OKLAB" }, - "1911": { + "1980": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.OKLCH" }, - "1912": { + "1981": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.LAB" }, - "1913": { + "1982": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.LCH" }, - "1914": { + "1983": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.COLOR" }, - "1915": { + "1984": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.SRGB" }, - "1916": { + "1985": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.PROPHOTO_RGB" }, - "1917": { + "1986": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.A98_RGB" }, - "1918": { + "1987": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.REC2020" }, - "1919": { + "1988": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.DISPLAY_P3" }, - "1920": { + "1989": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.SRGB_LINEAR" }, - "1921": { + "1990": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.XYZ_D50" }, - "1922": { + "1991": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.XYZ_D65" }, - "1923": { + "1992": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.LIGHT_DARK" }, - "1924": { + "1993": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.COLOR_MIX" }, - "1925": { + "1994": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.RGB" }, - "1926": { + "1995": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.HSL" }, - "1927": { + "1996": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.XYZ" }, - "1928": { + "1997": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/types.ts", "qualifiedName": "ColorType.DEVICE_CMYK" }, - "1929": { + "1998": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap" }, - "1932": { + "2001": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.lastLocation" }, - "1937": { + "2006": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.add" }, - "1938": { + "2007": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.add" }, - "1939": { + "2008": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "source" }, - "1940": { + "2009": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "original" }, - "1941": { + "2010": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.toUrl" }, - "1942": { + "2011": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.toUrl" }, - "1943": { + "2012": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.toJSON" }, - "1944": { + "2013": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/renderer/sourcemap/sourcemap.ts", "qualifiedName": "SourceMap.toJSON" }, - "1945": { + "2014": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerEvent" }, - "1946": { + "2015": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerEvent.Enter" }, - "1947": { + "2016": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerEvent.Leave" }, - "1948": { + "2017": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel" + }, + "2018": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel.None" + }, + "2019": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel.Selector" + }, + "2020": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel.AtRule" + }, + "2021": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel.Declaration" + }, + "2022": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel.Default" + }, + "2023": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ValidationLevel.All" + }, + "2024": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerOptionEnum" }, - "1949": { + "2025": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerOptionEnum.Ignore" }, - "1950": { + "2026": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerOptionEnum.Stop" }, - "1951": { + "2027": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerOptionEnum.Children" }, - "1952": { + "2028": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/ast/walk.ts", "qualifiedName": "WalkerOptionEnum.IgnoreChildren" }, - "1953": { + "2029": { "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/features/type.ts", - "qualifiedName": "FeatureWalkMode" + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleScopeEnumOptions" }, - "1954": { + "2030": { "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/features/type.ts", - "qualifiedName": "FeatureWalkMode.Pre" + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleScopeEnumOptions.Global" }, - "1955": { + "2031": { "packageName": "@tbela99/css-parser", - "packagePath": "src/lib/ast/features/type.ts", - "qualifiedName": "FeatureWalkMode.Post" + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleScopeEnumOptions.Local" }, - "1967": { + "2032": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleScopeEnumOptions.Pure" + }, + "2033": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleScopeEnumOptions.ICSS" + }, + "2034": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleCaseTransformEnum" + }, + "2035": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleCaseTransformEnum.IgnoreCase" + }, + "2036": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleCaseTransformEnum.CamelCase" + }, + "2037": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleCaseTransformEnum.CamelCaseOnly" + }, + "2038": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleCaseTransformEnum.DashCase" + }, + "2039": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/lib/ast/types.ts", + "qualifiedName": "ModuleCaseTransformEnum.DashCaseOnly" + }, + "2054": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/types.ts", + "qualifiedName": "ResponseType" + }, + "2055": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/types.ts", + "qualifiedName": "ResponseType.Text" + }, + "2056": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/types.ts", + "qualifiedName": "ResponseType.ReadableStream" + }, + "2057": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/types.ts", + "qualifiedName": "ResponseType.ArrayBuffer" + }, + "2058": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/syntax/syntax.ts", "qualifiedName": "mathFuncs" }, - "1968": { + "2059": { "packageName": "@tbela99/css-parser", "packagePath": "src/lib/syntax/syntax.ts", "qualifiedName": "transformFunctions" }, - "1969": { + "2060": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "AstNode" }, - "1970": { + "2061": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "ParseResult" }, - "1971": { + "2062": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "ParserOptions" }, - "1972": { + "2063": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "RenderOptions" }, - "1973": { + "2064": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "RenderResult" }, - "1974": { + "2065": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "TransformOptions" }, - "1975": { + "2066": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "TransformResult" }, - "1981": { + "2072": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "walk" }, - "1982": { + "2073": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "walkValues" }, - "1986": { + "2077": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "parseDeclarations" }, - "1987": { + "2078": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "EnumToken" }, - "1988": { - "packageName": "@tbela99/css-parser", - "packagePath": "src/web.ts", - "qualifiedName": "ValidationLevel" - }, - "1989": { + "2079": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "ColorType" }, - "1990": { + "2080": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "SourceMap" }, - "1991": { + "2081": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "WalkerEvent" }, - "1992": { + "2082": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "ValidationLevel" + }, + "2083": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", "qualifiedName": "WalkerOptionEnum" }, - "1993": { + "2084": { "packageName": "@tbela99/css-parser", "packagePath": "src/web.ts", - "qualifiedName": "FeatureWalkMode" + "qualifiedName": "ModuleScopeEnumOptions" }, - "1996": { + "2085": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "ModuleCaseTransformEnum" + }, + "2089": { + "packageName": "@tbela99/css-parser", + "packagePath": "src/web.ts", + "qualifiedName": "ResponseType" + }, + "2090": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "mathFuncs" }, - "1997": { + "2091": { "packageName": "@tbela99/css-parser", "packagePath": "src/@types/index.d.ts", "qualifiedName": "transformFunctions" @@ -59838,33 +60265,35 @@ "6": "files/transform.md", "7": "files/ast.md", "8": "files/validation.md", - "9": "docs/modules/node.html", - "10": "docs/modules/web.html", - "11": "files/index.md", - "12": "docs/interfaces/node.VisitorNodeMap.html", - "13": "docs/enums/node.EnumToken.html", - "14": "docs/interfaces/node.AstStyleSheet.html", - "15": "docs/interfaces/node.AstRule.html", - "16": "docs/interfaces/node.AstAtRule.html", - "17": "docs/interfaces/node.AstDeclaration.html", - "18": "docs/interfaces/node.AstComment.html", - "19": "docs/interfaces/node.AstInvalidRule.html", - "20": "docs/interfaces/node.AstInvalidAtRule.html", - "21": "docs/interfaces/node.AstInvalidDeclaration.html", - "22": "docs/types/node.Token.html", - "23": "docs/functions/node.walk.html", - "24": "docs/media/node.walk.html", - "25": "docs/types/node.WalkerOption.html", - "26": "docs/functions/node.walkValues.html", - "27": "docs/interfaces/node.ParserOptions.html", - "28": "docs/enums/node.ValidationLevel.html", - "29": "docs/media/node.ValidationLevel.html", - "30": "docs/interfaces/node.ParseResult.html", - "31": "docs/interfaces/node.TransformResult.html", - "32": "docs/interfaces/node.ErrorDescription.html", - "33": "src/node.ts", - "34": "src/web.ts", - "35": "files" + "9": "files/css-module.md", + "10": "docs/modules/node.html", + "11": "docs/modules/web.html", + "12": "files/index.md", + "13": "docs/documents/Guide.html", + "14": "docs/interfaces/node.VisitorNodeMap.html", + "15": "docs/enums/node.EnumToken.html", + "16": "docs/interfaces/node.AstStyleSheet.html", + "17": "docs/interfaces/node.AstRule.html", + "18": "docs/interfaces/node.AstAtRule.html", + "19": "docs/interfaces/node.AstDeclaration.html", + "20": "docs/interfaces/node.AstComment.html", + "21": "docs/interfaces/node.AstInvalidRule.html", + "22": "docs/interfaces/node.AstInvalidAtRule.html", + "23": "docs/interfaces/node.AstInvalidDeclaration.html", + "24": "docs/types/node.Token.html", + "25": "docs/functions/node.walk.html", + "26": "docs/media/node.walk.html", + "27": "docs/types/node.WalkerOption.html", + "28": "docs/functions/node.walkValues.html", + "29": "docs/interfaces/node.ParserOptions.html", + "30": "docs/enums/node.ValidationLevel.html", + "31": "docs/media/node.ValidationLevel.html", + "32": "docs/interfaces/node.ParseResult.html", + "33": "docs/interfaces/node.TransformResult.html", + "34": "docs/interfaces/node.ErrorDescription.html", + "35": "src/node.ts", + "36": "src/web.ts", + "37": "files" }, "reflections": { "1": 2, @@ -59875,10 +60304,11 @@ "6": 7, "7": 8, "8": 9, - "11": 0, - "33": 10, - "34": 38, - "35": 0 + "9": 10, + "12": 0, + "35": 11, + "36": 43, + "37": 0 } } } diff --git a/docs/types/node.AstNode.html b/docs/types/node.AstNode.html index c7cd1011..f3bc7339 100644 --- a/docs/types/node.AstNode.html +++ b/docs/types/node.AstNode.html @@ -156,8 +156,8 @@ --md-sys-color-surface-container-high: #efe7de; --md-sys-color-surface-container-highest: #e9e1d9 } -

                              Type Alias AstNode

                              AstNode:
                                  | AstStyleSheet
                                  | AstRuleList
                                  | AstComment
                                  | AstAtRule
                                  | AstRule
                                  | AstDeclaration
                                  | AstKeyframesAtRule
                                  | AstKeyFrameRule
                                  | AstInvalidRule
                                  | AstInvalidAtRule
                                  | AstInvalidDeclaration

                              ast node

                              -

                              Type Alias AstNode

                              AstNode:
                                  | AstStyleSheet
                                  | AstRuleList
                                  | AstComment
                                  | AstAtRule
                                  | AstRule
                                  | AstDeclaration
                                  | AstKeyframesAtRule
                                  | AstKeyFrameRule
                                  | AstInvalidRule
                                  | AstInvalidAtRule
                                  | AstInvalidDeclaration
                                  | CssVariableToken
                                  | CssVariableImportTokenType

                              ast node

                              +

                              Type Alias AstRuleList

                              AstRuleList:
                                  | AstStyleSheet
                                  | AstAtRule
                                  | AstRule
                                  | AstKeyframesAtRule
                                  | AstKeyFrameRule
                                  | AstInvalidRule

                              rule list node

                              -

                              Type Alias AtRuleVisitorHandler

                              AtRuleVisitorHandler: GenericVisitorHandler<AstAtRule>

                              AtRule visitor handler

                              -

                              Type Alias BinaryExpressionNode

                              BinaryExpressionNode:
                                  | NumberToken
                                  | DimensionToken
                                  | PercentageToken
                                  | FlexToken
                                  | FractionToken
                                  | AngleToken
                                  | LengthToken
                                  | FrequencyToken
                                  | BinaryExpressionToken
                                  | FunctionToken
                                  | ParensToken

                              Binary expression node

                              -

                              Type Alias DeclarationVisitorHandler

                              DeclarationVisitorHandler: GenericVisitorHandler<AstDeclaration>

                              Declaration visitor handler

                              -

                              Type Alias GenericVisitorAstNodeHandlerMap<T>

                              GenericVisitorAstNodeHandlerMap:
                                  | Record<string, GenericVisitorHandler<T>>
                                  | GenericVisitorHandler<T>
                                  | { handler: GenericVisitorHandler<T>; type: WalkerEvent }
                                  | { handler: Record<string, GenericVisitorHandler<T>>; type: WalkerEvent }

                              Type Parameters

                              • T

                              Type Alias GenericVisitorAstNodeHandlerMap<T>

                              GenericVisitorAstNodeHandlerMap:
                                  | Record<string, GenericVisitorHandler<T>>
                                  | GenericVisitorHandler<T>
                                  | { handler: GenericVisitorHandler<T>; type: WalkerEvent }
                                  | { handler: Record<string, GenericVisitorHandler<T>>; type: WalkerEvent }

                              Type Parameters

                              • T

                              Type Alias GenericVisitorHandler<T>

                              GenericVisitorHandler: (
                                  node: T,
                                  parent?: AstNode | Token,
                                  root?: AstNode | Token,
                              ) => GenericVisitorResult<T>

                              Type Parameters

                              • T

                              Type Declaration

                              Type Alias GenericVisitorHandler<T>

                              GenericVisitorHandler: (
                                  node: T,
                                  parent?: AstNode | Token,
                                  root?: AstNode | Token,
                              ) => GenericVisitorResult<T>

                              Type Parameters

                              • T

                              Type Declaration

                              Type Alias GenericVisitorResult<T>

                              GenericVisitorResult: T | T[] | Promise<T> | Promise<T[]> | null | Promise<null>

                              Type Parameters

                              • T

                              Type Alias GenericVisitorResult<T>

                              GenericVisitorResult: T | T[] | Promise<T> | Promise<T[]> | null | Promise<null>

                              Type Parameters

                              • T

                              Type Alias LoadResult

                              LoadResult:
                                  | Promise<ReadableStream<Uint8Array>>
                                  | ReadableStream<Uint8Array>
                                  | string
                                  | Promise<string>

                              Type Alias LoadResult

                              LoadResult:
                                  | Promise<ReadableStream<Uint8Array>>
                                  | ReadableStream<Uint8Array>
                                  | string
                                  | Promise<string>

                              Type Alias RawSelectorTokens

                              RawSelectorTokens: string[][]

                              raw selector tokens

                              -

                              Type Alias RuleVisitorHandler

                              RuleVisitorHandler: GenericVisitorHandler<AstRule>

                              Rule visitor handler

                              -

                              Type Alias Token

                              Token:
                                  | InvalidClassSelectorToken
                                  | InvalidAttrToken
                                  | LiteralToken
                                  | IdentToken
                                  | IdentListToken
                                  | DashedIdentToken
                                  | CommaToken
                                  | ColonToken
                                  | SemiColonToken
                                  | ClassSelectorToken
                                  | UniversalSelectorToken
                                  | ChildCombinatorToken
                                  | DescendantCombinatorToken
                                  | NextSiblingCombinatorToken
                                  | SubsequentCombinatorToken
                                  | ColumnCombinatorToken
                                  | NestingSelectorToken
                                  | MediaQueryConditionToken
                                  | MediaFeatureToken
                                  | MediaFeatureNotToken
                                  | MediaFeatureOnlyToken
                                  | MediaFeatureAndToken
                                  | MediaFeatureOrToken
                                  | AstDeclaration
                                  | NumberToken
                                  | AtRuleToken
                                  | PercentageToken
                                  | FlexToken
                                  | FunctionURLToken
                                  | FunctionImageToken
                                  | TimingFunctionToken
                                  | TimelineFunctionToken
                                  | FunctionToken
                                  | GridTemplateFuncToken
                                  | DimensionToken
                                  | LengthToken
                                  | AngleToken
                                  | StringToken
                                  | TimeToken
                                  | FrequencyToken
                                  | ResolutionToken
                                  | UnclosedStringToken
                                  | HashToken
                                  | BadStringToken
                                  | BlockStartToken
                                  | BlockEndToken
                                  | AttrStartToken
                                  | AttrEndToken
                                  | ParensStartToken
                                  | ParensEndToken
                                  | ParensToken
                                  | CDOCommentToken
                                  | BadCDOCommentToken
                                  | CommentToken
                                  | BadCommentToken
                                  | WhitespaceToken
                                  | IncludeMatchToken
                                  | StartMatchToken
                                  | EndMatchToken
                                  | ContainMatchToken
                                  | MatchExpressionToken
                                  | NameSpaceAttributeToken
                                  | DashMatchToken
                                  | EqualMatchToken
                                  | LessThanToken
                                  | LessThanOrEqualToken
                                  | GreaterThanToken
                                  | GreaterThanOrEqualToken
                                  | ListToken
                                  | PseudoClassToken
                                  | PseudoPageToken
                                  | PseudoElementToken
                                  | PseudoClassFunctionToken
                                  | DelimToken
                                  | BinaryExpressionToken
                                  | UnaryExpression
                                  | FractionToken
                                  | AddToken
                                  | SubToken
                                  | DivToken
                                  | MulToken
                                  | BadUrlToken
                                  | UrlToken
                                  | ImportantToken
                                  | ColorToken
                                  | AttrToken
                                  | EOFToken

                              Token

                              -

                              Type Alias Token

                              Token:
                                  | InvalidClassSelectorToken
                                  | InvalidAttrToken
                                  | LiteralToken
                                  | IdentToken
                                  | IdentListToken
                                  | DashedIdentToken
                                  | CommaToken
                                  | ColonToken
                                  | SemiColonToken
                                  | ClassSelectorToken
                                  | UniversalSelectorToken
                                  | ChildCombinatorToken
                                  | DescendantCombinatorToken
                                  | NextSiblingCombinatorToken
                                  | SubsequentCombinatorToken
                                  | ColumnCombinatorToken
                                  | NestingSelectorToken
                                  | MediaQueryConditionToken
                                  | MediaFeatureToken
                                  | MediaFeatureNotToken
                                  | MediaFeatureOnlyToken
                                  | MediaFeatureAndToken
                                  | MediaFeatureOrToken
                                  | AstDeclaration
                                  | NumberToken
                                  | AtRuleToken
                                  | PercentageToken
                                  | FlexToken
                                  | FunctionURLToken
                                  | FunctionImageToken
                                  | TimingFunctionToken
                                  | TimelineFunctionToken
                                  | FunctionToken
                                  | GridTemplateFuncToken
                                  | DimensionToken
                                  | LengthToken
                                  | AngleToken
                                  | StringToken
                                  | TimeToken
                                  | FrequencyToken
                                  | ResolutionToken
                                  | UnclosedStringToken
                                  | HashToken
                                  | BadStringToken
                                  | BlockStartToken
                                  | BlockEndToken
                                  | AttrStartToken
                                  | AttrEndToken
                                  | ParensStartToken
                                  | ParensEndToken
                                  | ParensToken
                                  | CDOCommentToken
                                  | BadCDOCommentToken
                                  | CommentToken
                                  | BadCommentToken
                                  | WhitespaceToken
                                  | IncludeMatchToken
                                  | StartMatchToken
                                  | EndMatchToken
                                  | ContainMatchToken
                                  | MatchExpressionToken
                                  | NameSpaceAttributeToken
                                  | ComposesSelectorToken
                                  | CssVariableToken
                                  | DashMatchToken
                                  | EqualMatchToken
                                  | LessThanToken
                                  | LessThanOrEqualToken
                                  | GreaterThanToken
                                  | GreaterThanOrEqualToken
                                  | ListToken
                                  | PseudoClassToken
                                  | PseudoPageToken
                                  | PseudoElementToken
                                  | PseudoClassFunctionToken
                                  | DelimToken
                                  | BinaryExpressionToken
                                  | UnaryExpression
                                  | FractionToken
                                  | AddToken
                                  | SubToken
                                  | DivToken
                                  | MulToken
                                  | BadUrlToken
                                  | UrlToken
                                  | ImportantToken
                                  | ColorToken
                                  | AttrToken
                                  | EOFToken

                              Token

                              +

                              Type Alias UnaryExpressionNode

                              UnaryExpressionNode:
                                  | BinaryExpressionNode
                                  | NumberToken
                                  | DimensionToken
                                  | TimeToken
                                  | LengthToken
                                  | AngleToken
                                  | FrequencyToken

                              Unary expression node

                              -

                              Type Alias ValueVisitorHandler

                              ValueVisitorHandler: GenericVisitorHandler<Token>

                              Type Alias ValueVisitorHandler

                              ValueVisitorHandler: GenericVisitorHandler<Token>

                              Type Alias WalkerOption

                              WalkerOption: WalkerOptionEnum | AstNode | Token | null

                              node walker option

                              -

                              Type Alias WalkerValueFilter

                              WalkerValueFilter: (
                                  node: AstNode | Token,
                                  parent?: AstNode | Token | null,
                                  event?: WalkerEvent,
                              ) => WalkerOption | null

                              filter nod

                              -

                              Type Declaration

                              Type Alias WalkerValueFilter

                              WalkerValueFilter: (
                                  node: AstNode | Token,
                                  parent?: AstNode | Token | AstNode[] | Token[] | null,
                                  event?: WalkerEvent,
                              ) => WalkerOption | null

                              filter nodes

                              +

                              Type Declaration

                              Variable mathFuncsConst Internal

                              mathFuncs: string[] = ...

                              supported math functions

                              -

                              Variable transformFunctionsConst Internal

                              transformFunctions: string[] = ...

                              supported transform functions

                              -
                              ``` + +------ +[← Features](./features.md) | [Usage →](./usage.md) \ No newline at end of file diff --git a/files/minification.md b/files/minification.md index 9ad0f126..97ba8537 100644 --- a/files/minification.md +++ b/files/minification.md @@ -1,7 +1,6 @@ --- title: Minification group: Documents -slug: /minification category: Guides --- @@ -816,3 +815,6 @@ list of computed shorthands properties: - [x] text-decoration - [x] text-emphasis - [x] transition + +------ +[← Usage](./usage.md) | [Custom transform →](./transform.md) \ No newline at end of file diff --git a/files/transform.md b/files/transform.md index ac1f5d5d..4021dc9a 100644 --- a/files/transform.md +++ b/files/transform.md @@ -1,7 +1,6 @@ --- title: Custom transform group: Documents -slug: /transform category: Guides --- @@ -15,6 +14,47 @@ visitors can be called when the node is entered, visited or left. ```ts +const options: ParserOptions = { + + visitor: [ + { + + AtRule: [ + // called when entering a node + { + type: WalkerEvent.Enter, + handler: (node: AstAtRule): AstAtRule => { + + console.error(`> enter '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`); + return node + } + }, + // called when leaving a node + { + + type: WalkerEvent.Leave, + handler: (node: AstAtRule): AstAtRule => { + + console.error(`> leaving '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`) + return node + } + }, + // called after node enter handlers but before node leave handlers + (node: AstAtRule): AstAtRule => { + + console.error(`> visiting '@${node.nam}' node at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`); + return node + } + } + ] + } + ] +} +``` + +### Examples +```ts + import {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from "@tbela99/css-parser"; const options: ParserOptions = { @@ -321,6 +361,21 @@ const result = await transform(css, { the value visitor is called on each token of the selector node, declaration value and the at-rule prelude, etc. +```ts + +import {AstAtRule, ParserOptions, transform, VisitorNodeMap, WalkerEvent} from "@tbela99/css-parser"; +const options: ParserOptions = { + + visitor: { + + Value: (node: Token): Token => { + + console.error(`> visiting token at position ${node.loc!.sta.lin}:${node.loc!.sta.col}`); + return node + } + } as VisitorNodeMap +}; +``` ### Generic visitor generic token visitor is a function whose name is a keyof [EnumToken](../docs/enums/node.EnumToken.html). it is called for every token of the specified type. @@ -365,4 +420,95 @@ body { color: color(from var(--base-color) display-p3 r calc(g + 0.24) calc(b console.debug(await transform(css, options)); // body {color:#f3fff0} -``` \ No newline at end of file +``` + +### Example of visitor + +a visitor that inlines all images under a specific size + +```ts +import { + EnumToken, + FunctionURLToken, + load, + StringToken, + Token, + transform, + UrlToken, + ResponseType, + AstDeclaration, + AstNode +} from "@tbela99/css-parser"; +const css = ` +.goal .bg-indigo { + background: url(/img/animatecss-opengraph.jpg); +} +`; + +// 35 kb or something +const maxSize = 35 * 1024; +// accepted images +const extensions = ['jpg', 'gif', 'png', 'webp'] +const result = await transform(css, { + visitor: { + UrlFunctionTokenType: async (node: FunctionURLToken, parent : AstNode) => { + + if (parent.typ == EnumToken.DeclarationNodeType) { + + const t = node.chi.find(t => t.typ != EnumToken.WhitespaceTokenType && t.typ != EnumToken.CommaTokenType) as Token; + + if (t == null) { + + return; + } + + const url = t.typ == EnumToken.StringTokenType ? (t as StringToken).val.slice(1, -1) : (t as UrlToken).val; + + if (url.startsWith('data:')) { + + return; + } + + const matches = /(.*?\/)?([^/.]+)\.([^?#]+)([?#].*)?$/.exec(url); + + if (matches == null || !extensions.includes(matches[3].toLowerCase())) { + + return; + } + + const buffer = await load(url, '.', ResponseType.ArrayBuffer) as ArrayBuffer ; + + if (buffer.byteLength > maxSize) { + + return + } + + Object.assign(t, {typ: EnumToken.StringTokenType, val: `"data:image/${matches[3].toLowerCase()};base64,${toBase64(new Uint8Array(buffer))}"`}) + } + } + } +}); + +function toBase64(arraybuffer: Uint8Array) { + + // @ts-ignore + if (typeof Uint8Array.prototype.toBase64! == 'function') { + + // @ts-ignore + return arraybuffer.toBase64(); + } + + let binary = ''; + for (const byte of arraybuffer) { + binary += String.fromCharCode( byte); + } + + return btoa( binary ); +} + +console.error(result.code); +// .goal .bg-indigo{background:url("data:image/jpg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QugRXhpZgAA ...")} +``` + +------ +[← Minification](./minification.md) | [Ast →](./ast.md) \ No newline at end of file diff --git a/files/usage.md b/files/usage.md index 922d1340..fe2ffa2e 100644 --- a/files/usage.md +++ b/files/usage.md @@ -1,12 +1,10 @@ --- title: Usage group: Documents -slug: /usage category: Guides --- ## Usage - ### From node, bun or deno ```ts @@ -70,7 +68,7 @@ console.debug(result.code); ``` -load as umd module +load as an umd module ```html @@ -112,7 +110,7 @@ load as umd module ### Parsing -parsing is achieved using the parse() or transform() function. the transform() function will also provide the css code as a result which comes handing if you do not want an additional step of rendering the ast. +parsing is achieved using the parse() or transform() or the corresponding parseFile() and transformFile() functions. the transform() function will also provide the css code as a result which comes handing if you do not want an additional step of rendering the ast. ```ts import {parse, render} from '@tbela99/css-parser'; @@ -269,5 +267,8 @@ console.log(result.code); // background-color: rgb(0 226 226) // } ``` +. +------ +[← Getting started](../../docs/documents/Guide.Getting_started.html) | [Minification →]( ../../docs/documents/Guide.Minification.html ) diff --git a/files/validation.md b/files/validation.md index c285395b..fa126e32 100644 --- a/files/validation.md +++ b/files/validation.md @@ -1,7 +1,6 @@ --- title: Validation group: Documents -slug: /validation category: Guides --- @@ -57,7 +56,7 @@ console.debug(result.code); the parser is lenient. this means that invalid nodes are kept in the ast but they are not rendered. this behavior can be changed using the [lenient](../docs/interfaces/node.ParserOptions.html#lenient) option. -## Validation Errors +## Validation errors validation errors are returned with [parse result](../docs/interfaces/node.ParseResult.html) or [transform result](../docs/interfaces/node.TransformResult.html). check the [typescript definition](../docs/interfaces/node.ErrorDescription.html) of ErrorDescription for more details. @@ -123,4 +122,6 @@ const result = await transform(css, options); //> found 'InvalidDeclarationNodeType' in '' at 8:13 //> found 'InvalidAtRuleTokenType' in '' at 13:1 -``` \ No newline at end of file +``` +------ +[← Ast](./ast.md) | [CSS Modules](./css-module.md) \ No newline at end of file diff --git a/jsr.json b/jsr.json index aef1f655..d1ecadc4 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@tbela99/css-parser", - "version": "1.3.4", + "version": "1.4.0", "publish": { "include": [ "src", diff --git a/package.json b/package.json index 393e7190..7cc1cff3 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": "v1.3.4", + "version": "v1.4.0", "exports": { ".": "./dist/node.js", "./node": "./dist/node.js", @@ -15,15 +15,15 @@ }, "scripts": { "doc": "typedoc --tsconfig typedoc-tsconfig.jsonc", - "build": "rollup -c;./build.sh dist/index.d.ts 'declare interface' 'declare type'", - "test": "web-test-runner \"test/**/web.spec.js\" --timeout=10000 --node-resolve --playwright --browsers chromium firefox webkit --root-dir=.; mocha --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"", - "test:web": "web-test-runner \"test/**/web.spec.js\" --timeout 30000 --node-resolve --playwright --browsers chromium firefox webkit --root-dir=.", + "build": "rollup -c;./build.sh ./dist/index.d.ts 'declare interface' 'declare type'", + "test": "web-test-runner \"./test/**/web.spec.js\" --timeout=10000 --node-resolve --playwright --browsers chromium firefox webkit --root-dir=.; mocha --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"", + "test:web": "web-test-runner \"./test/**/web.spec.js\" --timeout 30000 --node-resolve --playwright --browsers chromium firefox webkit --root-dir=.", "test:node": "mocha -p --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"", "test:cov": "c8 -x 'test/specs/**/*.js' --reporter=html --reporter=text --reporter=json-summary mocha --reporter-options='maxDiffSize=1801920' --timeout=10000 \"test/**/node.spec.js\"", "test:web-cov": "web-test-runner -x 'test/specs/**/*.js' \"test/**/web.spec.js\" --node-resolve --playwright --browsers chromium firefox webkit --root-dir=. --coverage", "profile": "node --enable-source-maps --inspect-brk test/inspect.js", "syntax-update": "esno tools/validation.ts", - "debug": "web-test-runner \"test/**/web.spec.js\" --manual --open --node-resolve --root-dir=." + "debug": "web-test-runner \"./test/**/web.spec.js\" --manual --open --node-resolve --root-dir=." }, "repository": { "type": "git", @@ -55,24 +55,24 @@ "homepage": "https://github.com/tbela99/css-parser#readme", "devDependencies": { "@esm-bundle/chai": "^4.3.4-fix.0", - "@rollup/plugin-commonjs": "^28.0.6", + "@rollup/plugin-commonjs": "^28.0.8", "@rollup/plugin-json": "^6.1.0", - "@rollup/plugin-node-resolve": "^16.0.1", - "@rollup/plugin-typescript": "^12.1.4", - "@types/chai": "^5.2.2", + "@rollup/plugin-node-resolve": "^16.0.3", + "@rollup/plugin-typescript": "^12.3.0", + "@types/chai": "^5.2.3", "@types/mocha": "^10.0.10", - "@types/node": "^24.0.10", - "@types/web": "^0.0.245", + "@types/node": "^24.9.1", + "@types/web": "^0.0.274", "@web/test-runner": "^0.20.2", "@web/test-runner-playwright": "^0.11.1", "c8": "^10.1.3", "esno": "^4.8.0", - "mocha": "^11.7.1", - "playwright": "^1.55.0", - "rollup": "^4.48.0", - "rollup-plugin-dts": "^6.2.1", + "mocha": "^11.7.4", + "playwright": "^1.56.1", + "rollup": "^4.52.5", + "rollup-plugin-dts": "^6.2.3", "tslib": "^2.8.1", - "typedoc": "^0.28.13", + "typedoc": "^0.28.14", "typedoc-material-theme": "^1.4.0" } } diff --git a/src/@types/ast.d.ts b/src/@types/ast.d.ts index d001bf2a..042f9d62 100644 --- a/src/@types/ast.d.ts +++ b/src/@types/ast.d.ts @@ -237,4 +237,6 @@ export declare type AstNode = | AstKeyFrameRule | AstInvalidRule | AstInvalidAtRule - | AstInvalidDeclaration; + | AstInvalidDeclaration + | CssVariableToken + | CssVariableImportTokenType; diff --git a/src/@types/index.d.ts b/src/@types/index.d.ts index 0b0e91c1..79b673bb 100644 --- a/src/@types/index.d.ts +++ b/src/@types/index.d.ts @@ -2,8 +2,8 @@ import type {VisitorNodeMap} from "./visitor.d.ts"; import type {AstAtRule, AstDeclaration, AstNode, AstRule, AstStyleSheet, Location, Position} from "./ast.d.ts"; import {SourceMap} from "../lib/renderer/sourcemap/index.ts"; import type {PropertyListOptions} from "./parse.d.ts"; -import {ColorType, EnumToken, ValidationLevel} from "../lib/index.ts"; -import type {Token} from "./token.d.ts"; +import {ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions, ValidationLevel} from "../lib/index.ts"; +import type {CssVariableToken, Token} from "./token.d.ts"; import {FeatureWalkMode} from "../lib/ast/features/type.ts"; import {mathFuncs, transformFunctions} from "../lib/syntax/syntax.ts"; @@ -194,6 +194,126 @@ export declare type LoadResult = | string | Promise; +export declare interface ModuleOptions { + + /** + * use local scope vs global scope + */ + scoped?: boolean | ModuleScopeEnumOptions; + + /** + * module output file path. it is used to generate the scoped name. if not provided, [options.src](../docs/interfaces/node.ParserOptions.html#src) will be used + */ + filePath?: string; + + /** + * generated scope hash length. the default is 5 + */ + hashLength?: number; + + /** + * the pattern used to generate scoped names. the supported placeholders are: + * - name: the file base name without the extension + * - hash: the file path hash + * - local: the local name + * - path: the file path + * - folder: the folder name + * - ext: the file extension + * + * the pattern can optionally have a maximum number of characters: + * ``` + * pattern: '[local:2]-[hash:5]' + * ``` + * the hash pattern can take an algorithm, a maximum number of characters or both: + * ``` + * pattern: '[local]-[hash:base64:5]' + * ``` + * or + * ``` + * pattern: '[local]-[hash:5]' + * ``` + * or + * ``` + * pattern: '[local]-[hash:sha1]' + * ``` + * + * supported hash algorithms are: + * - base64 + * - hex + * - base64url + * - sha1 + * - sha256 + * - sha384 + * - sha512 + * + * ```typescript + * + * import {transform, ModuleCaseTransformEnum} from '@tbela99/css-parser'; + * import type {TransformResult} from '@tbela99/css-parser'; + * css = ` + * :local(.className) { + * background: red; + * color: yellow; + * } + * + * :local(.subClass) { + * composes: className; + * background: blue; + * } + * `; + * + * let result: TransformResult = await transform(css, { + * + * beautify:true, + * module: { + * pattern: '[local]-[hash:sha256]' + * } + * + * }); + * + * console.log(result.code); + * ``` + * generated css + * + * ```css + * .className-b629f { + * background: red; + * color: #ff0 + * } + * .subClass-a0c35 { + * background: blue + * } + * ``` + */ + pattern?: string; + + /** + * optional. function change the case of the scoped name and the class mapping + * + * - {@link ModuleCaseTransformEnum.IgnoreCase}: do not change case + * - {@link ModuleCaseTransformEnum.CamelCase}: camelCase {@link ParseResult.mapping} key name + * - {@link ModuleCaseTransformEnum.CamelCaseOnly}: camelCase {@link ParseResult.mapping} key name and the scoped class name + * - {@link ModuleCaseTransformEnum.DashCase}: dashCase {@link ParseResult.mapping} key name + * - {@link ModuleCaseTransformEnum.DashCaseOnly}: dashCase {@link ParseResult.mapping} key name and the scoped class name + * + */ + naming?: ModuleCaseTransformEnum, + + /** + * optional function to generate scoped name + * @param localName + * @param filePath + * @param pattern see {@link ModuleOptions.pattern} + * @param hashLength + */ + generateScopedName?: ( + localName: string, + filePath: string, + pattern: string, + hashLength?: number + ) => string | Promise; +} + /** * parser options */ @@ -232,7 +352,7 @@ export declare interface ParserOptions extends MinifyOptions, MinifyFeatureOptio * @param asStream * */ - load?: (url: string, currentUrl: string, asStream?: boolean) => LoadResult; + load?: (url: string, currentUrl?: string, asStream?: boolean) => LoadResult; /** * get directory name * @param path @@ -286,6 +406,11 @@ export declare interface ParserOptions extends MinifyOptions, MinifyFeatureOptio * @private */ cache?: WeakMap; + + /** + * css modules options + */ + module?: boolean | ModuleCaseTransformEnum | ModuleScopeEnumOptions | ModuleOptions } /** @@ -462,13 +587,17 @@ export declare interface ParseResultStats { */ importedBytesIn: number; /** - * parse time + * parse processing time */ parse: string; /** - * minify time + * minify processing time */ minify: string; + /** + * module processing time + */ + module?: string; /** * total time */ @@ -504,7 +633,22 @@ export declare interface ParseResult { /** * parse stats */ - stats: ParseResultStats + stats: ParseResultStats; + + /** + * css module mapping + */ + mapping?: Record; + + cssModuleVariables?: Record; + + importMapping?: Record>; + + /** + * css module reverse mapping + * @private + */ + revMapping?: Record; } /** diff --git a/src/@types/parse.d.ts b/src/@types/parse.d.ts index abefc954..276b8f28 100644 --- a/src/@types/parse.d.ts +++ b/src/@types/parse.d.ts @@ -27,4 +27,9 @@ export declare interface ParseInfo { * current parsing position */ currentPosition: Position; + + /** + * offset + */ + offset: number; } diff --git a/src/@types/token.d.ts b/src/@types/token.d.ts index 407be931..acaf6193 100644 --- a/src/@types/token.d.ts +++ b/src/@types/token.d.ts @@ -159,7 +159,7 @@ export declare interface FunctionURLToken extends BaseToken { typ: EnumToken.UrlFunctionTokenType, val: 'url'; - chi: Array; + chi: Array; } /** @@ -774,6 +774,40 @@ export declare interface ListToken extends BaseToken { chi: Token[]; } +/** + * Composes selector token + */ +export declare interface ComposesSelectorToken extends BaseToken { + + typ: EnumToken.ComposesSelectorTokenType; + l: Token[]; + r: Token | null; +} + +/** + * Css variable token + */ +export declare interface CssVariableToken extends BaseToken { + + typ: EnumToken.CssVariableTokenType; + nam: string; + val: Token[]; +} + +export declare interface CssVariableImportTokenType extends BaseToken { + + typ: EnumToken.CssVariableImportTokenType; + nam: string; + val: Token[]; +} + +export declare interface CssVariableMapTokenType extends BaseToken { + + typ: EnumToken.CssVariableMapTokenType; + vars: Token[]; + from: Token[]; +} + /** * Unary expression node */ @@ -865,6 +899,8 @@ export declare type Token = | ContainMatchToken | MatchExpressionToken | NameSpaceAttributeToken + | ComposesSelectorToken + | CssVariableToken | DashMatchToken | EqualMatchToken diff --git a/src/@types/visitor.d.ts b/src/@types/visitor.d.ts index 678d7e92..6093cfde 100644 --- a/src/@types/visitor.d.ts +++ b/src/@types/visitor.d.ts @@ -276,5 +276,5 @@ export declare interface VisitorNodeMap { * // body {color:#f3fff0} * ``` */ - [key: keyof typeof EnumToken]: GenericVisitorAstNodeHandlerMap | GenericVisitorAstNodeHandlerMap; + [key : keyof typeof EnumToken]: GenericVisitorAstNodeHandlerMap | GenericVisitorAstNodeHandlerMap; } diff --git a/src/@types/walker.d.ts b/src/@types/walker.d.ts index 02bce269..e5854d25 100644 --- a/src/@types/walker.d.ts +++ b/src/@types/walker.d.ts @@ -18,9 +18,9 @@ export declare type WalkerOption = WalkerOptionEnum | AstNode | Token | null; export declare type WalkerFilter = (node: AstNode) => WalkerOption; /** - * filter nod + * filter nodes */ -export declare type WalkerValueFilter = (node: AstNode | Token, parent?: AstNode | Token | null, event?: WalkerEvent) => WalkerOption | null; +export declare type WalkerValueFilter = (node: AstNode | Token, parent?: AstNode | Token | AstNode[] | Token[] | null, event?: WalkerEvent) => WalkerOption | null; export declare interface WalkResult { node: AstNode; diff --git a/src/config.json b/src/config.json index 7ce59e88..e5220d28 100644 --- a/src/config.json +++ b/src/config.json @@ -544,6 +544,9 @@ }, "animation": { "shorthand": "animation", + "separator": { + "typ": "Comma" + }, "pattern": "animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline", "default": [ "1", diff --git a/src/lib/ast/features/calc.ts b/src/lib/ast/features/calc.ts index 00eeb8af..62cf423f 100644 --- a/src/lib/ast/features/calc.ts +++ b/src/lib/ast/features/calc.ts @@ -125,7 +125,7 @@ export class ComputeCalcExpressionFeature { if (children[i] == value) { - children.splice(i, 1, !(parent.typ == EnumToken.FunctionTokenType && parent.val == 'calc') && (typeof (values[0] as NumberToken).val != 'number' && !(values[0].typ == EnumToken.FunctionTokenType && mathFuncs.includes((values[0] as FunctionToken).val))) ? { + children.splice(i, 1, !(parent.typ == EnumToken.FunctionTokenType && (parent as FunctionToken).val == 'calc') && (typeof (values[0] as NumberToken).val != 'number' && !(values[0].typ == EnumToken.FunctionTokenType && mathFuncs.includes((values[0] as FunctionToken).val))) ? { typ: EnumToken.FunctionTokenType, val: 'calc', chi: values diff --git a/src/lib/ast/features/inlinecssvariables.ts b/src/lib/ast/features/inlinecssvariables.ts index c09e1693..4fb05297 100644 --- a/src/lib/ast/features/inlinecssvariables.ts +++ b/src/lib/ast/features/inlinecssvariables.ts @@ -10,6 +10,7 @@ import type { CommentToken, DashedIdentToken, FunctionToken, + ParensToken, ParserOptions, Token, VariableScopeInfo @@ -30,7 +31,7 @@ function inlineExpression(token: Token): Token[] { result.push({ typ: EnumToken.ParensTokenType, chi: [...inlineExpression((token as BinaryExpressionToken).l), {typ: (token as BinaryExpressionToken).op}, ...inlineExpression((token as BinaryExpressionToken).r)] - }); + } as ParensToken); } else { diff --git a/src/lib/ast/features/prefix.ts b/src/lib/ast/features/prefix.ts index 938d941d..d28bac79 100644 --- a/src/lib/ast/features/prefix.ts +++ b/src/lib/ast/features/prefix.ts @@ -6,7 +6,9 @@ import type { AstRule, FunctionToken, IdentToken, + MediaQueryConditionToken, ParserOptions, + PseudoClassToken, Token } from "../../../@types/index.d.ts"; import {getSyntaxConfig, ValidationSyntaxGroupEnum} from '../../validation/index.ts'; @@ -49,19 +51,19 @@ function replaceAstNodes(tokens: Token[], root?: AstNode): boolean { if (value.typ == EnumToken.IdenTokenType || value.typ == EnumToken.PseudoClassFuncTokenType || value.typ == EnumToken.PseudoClassTokenType || value.typ == EnumToken.PseudoElementTokenType) { - let key: string = value.val + (value.typ == EnumToken.PseudoClassFuncTokenType ? '()' : ''); + let key: string = (value as IdentToken | PseudoClassToken).val + (value.typ == EnumToken.PseudoClassFuncTokenType ? '()' : ''); if (key in pseudoAliasMap) { const isPseudClass: boolean = pseudoAliasMap[key].startsWith('::'); - value.val = pseudoAliasMap[key]; + (value as PseudoClassToken).val = pseudoAliasMap[key]; if (value.typ == EnumToken.IdenTokenType && - ['min-resolution', 'max-resolution'].includes(value.val) && + ['min-resolution', 'max-resolution'].includes((value as IdentToken).val) && parent?.typ == EnumToken.MediaQueryConditionTokenType && - parent.r?.[0]?.typ == EnumToken.NumberTokenType) { + (parent as MediaQueryConditionToken).r?.[0]?.typ == EnumToken.NumberTokenType) { - Object.assign(parent.r?.[0], { + Object.assign((parent as MediaQueryConditionToken).r?.[0], { typ: EnumToken.ResolutionTokenType, unit: 'x', diff --git a/src/lib/ast/features/transform.ts b/src/lib/ast/features/transform.ts index 338a4355..589d4df3 100644 --- a/src/lib/ast/features/transform.ts +++ b/src/lib/ast/features/transform.ts @@ -60,7 +60,7 @@ export class TransformCssFeature { const children: Token[] = []; for (const child of (node as AstDeclaration).val as Token[]) { - children.push(child.typ == EnumToken.FunctionTokenType ? minifyTransformFunctions(child) : child); + children.push(child.typ == EnumToken.FunctionTokenType ? minifyTransformFunctions(child as FunctionToken) : child); } consumeWhitespace(children); diff --git a/src/lib/ast/features/type.ts b/src/lib/ast/features/type.ts index 9bf1416e..3198790e 100644 --- a/src/lib/ast/features/type.ts +++ b/src/lib/ast/features/type.ts @@ -1,7 +1,7 @@ /** * feature walk mode * - * @internal + * @private */ export enum FeatureWalkMode { diff --git a/src/lib/ast/math/expression.ts b/src/lib/ast/math/expression.ts index adf51936..f38ee482 100644 --- a/src/lib/ast/math/expression.ts +++ b/src/lib/ast/math/expression.ts @@ -461,7 +461,7 @@ export function inlineExpression(token: Token): Token[] { result.push(token); } else { - result.push(...inlineExpression((token as BinaryExpressionToken).l), {typ: (token as BinaryExpressionToken).op}, ...inlineExpression((token as BinaryExpressionToken).r)); + result.push(...inlineExpression((token as BinaryExpressionToken).l), {typ: (token as BinaryExpressionToken).op} as Token, ...inlineExpression((token as BinaryExpressionToken).r)); } } else { diff --git a/src/lib/ast/minify.ts b/src/lib/ast/minify.ts index b1ff1faa..7ce3a9a4 100644 --- a/src/lib/ast/minify.ts +++ b/src/lib/ast/minify.ts @@ -655,7 +655,7 @@ function doMinify(ast: AstNode, options: ParserOptions = {}, recursive: boolean if (recursive && node != null && ('chi' in node)) { - if (node.typ == EnumToken.KeyframesAtRuleNodeType || !node.chi!.some(n => n.typ == EnumToken.DeclarationNodeType)) { + if (node.typ == EnumToken.KeyframesAtRuleNodeType || !(node as AstAtRule).chi!.some((n : AstNode) => n.typ == EnumToken.DeclarationNodeType)) { if (!(node.typ == EnumToken.AtRuleNodeType && (node).nam != 'font-face')) { diff --git a/src/lib/ast/types.ts b/src/lib/ast/types.ts index 66c0af83..8ea2687c 100644 --- a/src/lib/ast/types.ts +++ b/src/lib/ast/types.ts @@ -428,7 +428,31 @@ export enum EnumToken { * invalid declaration node type */ InvalidDeclarationNodeType, + + /* css module nodes */ + + /** + * composes token node type + */ + ComposesSelectorNodeType, + + /** + * css variable token type + */ + CssVariableTokenType, + + /** + * css variable import token type + */ + CssVariableImportTokenType, + + /** + * css variable declaration map token type + */ + CssVariableDeclarationMapTokenType, + /* aliases */ + /** * alias for time token type */ @@ -545,7 +569,7 @@ export enum EnumToken { export enum ColorType { /** - * system colors + * deprecated system colors */ SYS, /** @@ -553,7 +577,7 @@ export enum ColorType { */ DPSYS, /** - * colors as literals + * named colors */ LIT, /** @@ -652,4 +676,47 @@ export enum ColorType { * alias for cmyk */ DEVICE_CMYK = CMYK +} + +export enum ModuleCaseTransformEnum { + + /** + * export class names as-is + */ + IgnoreCase = 0x1, + /** + * transform mapping key name to camel case + */ + CamelCase = 0x2, + /** + * transform class names and mapping key name to camel case + */ + CamelCaseOnly = 0x4, + /** + * transform mapping key name to dash case + */ + DashCase = 0x8, + /** + * transform class names and mapping key name to dash case + */ + DashCaseOnly = 0x10 +} + +export enum ModuleScopeEnumOptions { + /** + * use the global scope + */ + Global = 0x20, + /** + * use the local scope + */ + Local = 0x40, + /** + * do not allow selector without an id or class + */ + Pure = 0x80, + /** + * export using ICSS module format + */ + ICSS = 0x100 } \ No newline at end of file diff --git a/src/lib/ast/walk.ts b/src/lib/ast/walk.ts index c9386d5b..1a6fe788 100644 --- a/src/lib/ast/walk.ts +++ b/src/lib/ast/walk.ts @@ -227,7 +227,6 @@ export function* walkValues(values: Token[], root: AstNode | Token | null = null type?: EnumToken | EnumToken[] | ((token: Token) => boolean) }, reverse?: boolean): Generator { - // const set = new Set(); const stack: Token[] = values.slice(); const map: Map = new Map; @@ -277,9 +276,16 @@ export function* walkValues(values: Token[], root: AstNode | Token | null = null } // @ts-ignore - if (option != null && typeof option == 'object' && 'typ' in option) { + if (option != null && typeof option == 'object' && ('typ' in option || Array.isArray(option))) { - map.set(option as Token, map.get(value) ?? root as FunctionToken | ParensToken); + const op = Array.isArray(option) ? option : [option]; + + for (const o of op) { + + map.set(o as Token, map.get(value) ?? root as FunctionToken | ParensToken); + } + + stack[reverse ? 'push' : 'unshift'](...op); } } } @@ -311,14 +317,14 @@ export function* walkValues(values: Token[], root: AstNode | Token | null = null if ('l' in value && value.l != null) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.l); + values.push(value.l); // @ts-ignore map.set(value.l, value); } if ('op' in value && typeof value.op == 'object') { - values[reverse ? 'push' : 'unshift'](value.op); + values.push(value.op); // @ts-ignore map.set(value.op, value); } @@ -330,14 +336,14 @@ export function* walkValues(values: Token[], root: AstNode | Token | null = null for (const r of value.r) { // @ts-ignore - values[reverse ? 'push' : 'unshift'](r); + values.push(r); // @ts-ignore map.set(r, value); } } else { // @ts-ignore - values[reverse ? 'push' : 'unshift'](value.r); + values.push(value.r); // @ts-ignore map.set(value.r, value); } @@ -360,9 +366,16 @@ export function* walkValues(values: Token[], root: AstNode | Token | null = null option = filter.fn(value, map.get(value), WalkerEvent.Leave); // @ts-ignore - if (option != null && 'typ' in option) { + if (option != null && ('typ' in option || Array.isArray(option))) { + + const op = Array.isArray(option) ? option : [option]; + + for (const o of op) { + + map.set(o as Token, map.get(value) ?? root as FunctionToken | ParensToken); + } - map.set(option as Token, map.get(value) ?? root as FunctionToken | ParensToken); + stack[reverse ? 'push' : 'unshift'](...op); } } } diff --git a/src/lib/fs/resolve.ts b/src/lib/fs/resolve.ts index ea04028e..75f0649f 100644 --- a/src/lib/fs/resolve.ts +++ b/src/lib/fs/resolve.ts @@ -13,6 +13,11 @@ export function dirname(path: string): string { // return path; // } + if (path === '') { + + return ''; + } + let i: number = 0; let parts: string[] = ['']; @@ -25,9 +30,9 @@ export function dirname(path: string): string { parts.push('') } - // else if (chr == '?' || chr == '#') { - // - // break; + // else if (chr == '?' || chr == '#') { + // + // break; // } else { @@ -47,6 +52,16 @@ export function dirname(path: string): string { */ function splitPath(result: string): { i: number, parts: string[] } { + if (result.length == 0) { + + return {parts: [], i: 0}; + } + + if (result === '/') { + + return {parts: ['/'], i: 0}; + } + const parts: string[] = ['']; let i: number = 0; @@ -102,9 +117,29 @@ export function resolve(url: string, currentDirectory: string, cwd?: string): { cwd ??= ''; currentDirectory ??= ''; + if (currentDirectory !== '' && url.startsWith(currentDirectory + '/')) { + + return { + absolute: url, + relative: url.slice(currentDirectory.length + 1) + }; + } + + if (currentDirectory === '' && cwd !== '' && url.startsWith(cwd == '/' ? cwd : cwd + '/')) { + + cwd = normalize(cwd); + const absolute: string = normalize(url); + const prefix: string = cwd == '/' ? cwd : cwd + '/'; + + return { + absolute, + relative: absolute.startsWith(prefix) ? absolute.slice(prefix.length) : diff(absolute, cwd) + }; + } + if (matchUrl.test(currentDirectory)) { - const path = new URL(url, currentDirectory).href; + const path: string = new URL(url, currentDirectory).href; return { absolute: path, @@ -122,24 +157,65 @@ export function resolve(url: string, currentDirectory: string, cwd?: string): { result = dirname(currentDirectory) + '/' + url; } - let {parts, i} = splitPath(result); + const absolute = normalize(result); + + return { + absolute, + relative: absolute === '' ? '' : diff(absolute, cwd ?? currentDirectory), + } +} - const absolute = parts.join('/'); - const {parts: dirs} = splitPath(cwd ?? currentDirectory); +function diff(path1: string, path2: string) { + let {parts} = splitPath(path1); + const {parts: dirs} = splitPath(path2); for (const p of dirs) { - if (parts[0] == p) { - parts.shift(); } else { - parts.unshift('..'); } } - return { - absolute, - relative: parts.join('/') + (i < result.length ? result.slice(i) : '') + return parts.join('/'); +} + +function normalize(path: string) { + + let parts: string[] = []; + let i: number = 0; + + for (; i < path.length; i++) { + + const chr: string = path.charAt(i); + + if (chr == '/') { + + if (parts.length == 0 || parts[parts.length - 1] !== '') { + + parts.push(''); + } + + } else if (chr == '?' || chr == '#') { + + break; + } else { + + parts[parts.length - 1] += chr; + } + } + + let k: number = -1; + + while (++k < parts.length) { + + if (parts[k] == '.') { + parts.splice(k--, 1); + } else if (parts[k] == '..') { + parts.splice(k - 1, 2); + k -= 2; + } } + + return (path.charAt(0) == '/' ? '/' : '') + parts.join('/'); } \ No newline at end of file diff --git a/src/lib/parser/declaration/list.ts b/src/lib/parser/declaration/list.ts index 28274591..83b850fc 100644 --- a/src/lib/parser/declaration/list.ts +++ b/src/lib/parser/declaration/list.ts @@ -37,9 +37,15 @@ export class PropertyList { add(...declarations: AstNode[]) { + let name: string | null; + for (const declaration of declarations) { + + name = declaration.typ != EnumToken.DeclarationNodeType ? null : (declaration as AstDeclaration).nam.toLowerCase(); + if (declaration.typ != EnumToken.DeclarationNodeType || - (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === (declaration as AstDeclaration).nam.toLowerCase()) || + 'composes' === name || + (typeof this.options.removeDuplicateDeclarations === 'string' && this.options.removeDuplicateDeclarations === name) || (Array.isArray(this.options.removeDuplicateDeclarations) ? this.options.removeDuplicateDeclarations.includes((declaration).nam) : !this.options.removeDuplicateDeclarations)) { this.declarations.set(Number(Math.random().toString().slice(2)).toString(36), declaration); diff --git a/src/lib/parser/parse.ts b/src/lib/parser/parse.ts index 434923bf..afdf3d39 100644 --- a/src/lib/parser/parse.ts +++ b/src/lib/parser/parse.ts @@ -16,7 +16,7 @@ import { parseDimension, pseudoElements } from "../syntax/index.ts"; -import {parseDeclarationNode} from './utils/index.ts'; +import {camelize, dasherize, parseDeclarationNode} from './utils/index.ts'; import {renderToken} from "../renderer/index.ts"; import {COLORS_NAMES} from "../syntax/color/index.ts"; import { @@ -26,6 +26,8 @@ import { EnumToken, expand, minify, + ModuleCaseTransformEnum, + ModuleScopeEnumOptions, SyntaxValidationResult, ValidationLevel, walk, @@ -55,10 +57,16 @@ import type { BinaryExpressionToken, BlockEndToken, BlockStartToken, + ClassSelectorToken, ColonToken, ColorToken, CommaToken, + ComposesSelectorToken, ContainMatchToken, + CssVariableImportTokenType, + CssVariableMapTokenType, + CssVariableToken, + DashedIdentToken, DashMatchToken, DelimToken, DimensionToken, @@ -81,6 +89,7 @@ import type { Location, MatchExpressionToken, MediaQueryConditionToken, + ModuleOptions, NameSpaceAttributeToken, NumberToken, ParensEndToken, @@ -121,6 +130,7 @@ import {validateKeyframeSelector} from "../validation/syntaxes/index.ts"; import {evaluateSyntax, isNodeAllowedInContext} from "../validation/syntax.ts"; import {splitTokenList} from "../validation/utils/index.ts"; import {buildExpression} from "../ast/math/index.ts"; +import {hash, hashAlgorithms} from "../parser/utils/hash.ts"; declare type T = AstDeclaration | AstAtRule | AstRule | AstKeyframesRule | AstKeyframesAtRule; @@ -146,11 +156,12 @@ function reject(reason?: any) { throw new Error(reason ?? 'Parsing aborted'); } -function normalizeVisitorKeyName(keyName: string): string { - - return keyName.replace(/-([a-z])/g, (all: string, one: string): string => one.toUpperCase()); -} - +/** + * replace token in its parent node + * @param parent + * @param value + * @param replacement + */ export function replaceToken(parent: BinaryExpressionToken | (AstNode & ({ chi: Token[] } | { val: Token[] })), value: Token, replacement: Token | Token[]) { @@ -176,7 +187,7 @@ export function replaceToken(parent: BinaryExpressionToken | (AstNode & ({ chi: } } else { - const target = 'val' in parent! && Array.isArray(parent.val) ? parent.val : (parent as FunctionToken | ParensToken | AstAtRule | AstKeyframesAtRule | AstKeyFrameRule | AstRule | AstKeyframesRule).chi as Token[]; + const target = 'val' in parent! && Array.isArray((parent as AstDeclaration).val) ? (parent as AstDeclaration).val : (parent as FunctionToken | ParensToken | AstAtRule | AstKeyframesAtRule | AstKeyFrameRule | AstRule | AstKeyframesRule).chi as Token[]; // @ts-ignore const index: number = target.indexOf(value); @@ -190,11 +201,184 @@ export function replaceToken(parent: BinaryExpressionToken | (AstNode & ({ chi: } } +/** + * transform case of key name + * @param key + * @param how + * + * @throws Error + * @private + */ +export function getKeyName(key: string, how: ModuleCaseTransformEnum) { + + switch (how) { + + case ModuleCaseTransformEnum.CamelCase: + case ModuleCaseTransformEnum.CamelCaseOnly: + + return camelize(key); + + case ModuleCaseTransformEnum.DashCase: + case ModuleCaseTransformEnum.DashCaseOnly: + return dasherize(key); + } + + return key; +} + +/** + * generate scoped name + * @param localName + * @param filePath + * @param pattern + * @param hashLength + * + * @throws Error + * @private + */ +export async function generateScopedName( + localName: string, + filePath: string, + pattern: string, + hashLength = 5, +): Promise { + + if (localName.startsWith('--')) { + + localName = localName.slice(2); + } + + const matches = /.*?(([^/]+)\/)?([^/\\]*?)(\.([^?/]+))?([?].*)?$/.exec(filePath); + const folder = matches?.[2]?.replace?.(/[^A-Za-z0-9_-]/g, "_") ?? ''; + const fileBase = matches?.[3] ?? ''; + const ext = matches?.[5] ?? ''; + const path = filePath.replace(/[^A-Za-z0-9_-]/g, "_"); + // sanitize localName for safe char set (replace spaces/illegal chars) + const safeLocal: string = localName.replace(/[^A-Za-z0-9_-]/g, "_"); + const hashString: string = `${localName}::${filePath}`; + + let result: string = ''; + let inParens: number = 0; + let key: string = ''; + let position: number = 0; + + // Compose final scoped name. Ensure the entire class doesn't start with digit: + for (const char of pattern) { + + position += char.length; + + if (char == '[') { + + inParens++; + + if (inParens != 1) { + + throw new Error(`Unexpected character: '${char} at position ${position - 1}' in pattern '${pattern}'`); + } + + continue; + } + + if (char == ']') { + + inParens--; + + if (inParens != 0) { + + throw new Error(`Unexpected character: '${char}:${position - 1}'`); + } + + let hashAlgo: string | null = null; + let length: number | null = null; + + if (key.includes(':')) { + + const parts: string[] = key.split(':'); + + if (parts.length == 2) { + + // @ts-ignore + [key, length] = parts; + + // @ts-ignore + if (key == 'hash' && hashAlgorithms.includes(length as string)) { + + // @ts-ignore + hashAlgo = length; + length = null; + } + } + + if (parts.length == 3) { + + // @ts-ignore + [key, hashAlgo, length] = parts; + } + + if (length != null && !Number.isInteger(+length)) { + + throw new Error(`Unsupported hash length: '${length}'. expecting format [hash:length] or [hash:hash-algo:length]`); + } + } + + switch (key) { + + case 'hash': + + result += await hash(hashString, length ?? hashLength, hashAlgo as string); + break; + + case 'name': + + result += length != null ? fileBase.slice(0, +length) : fileBase; + break; + + case 'local': + + result += length != null ? safeLocal.slice(0, +length) : localName; + break; + + case 'ext': + + result += length != null ? ext.slice(0, +length) : ext; + break; + + case 'path': + result += length != null ? path.slice(0, +length) : path; + break; + + case 'folder': + result += length != null ? folder.slice(0, +length) : folder; + break; + + default: + + throw new Error(`Unsupported key: '${key}'`); + } + + key = ''; + continue; + } + + if (inParens > 0) { + + key += char; + } else { + + result += char; + } + } + + // if leading char is digit, prefix underscore (very rare) + return (/^[0-9]/.test(result) ? '_' : '') + result; +} + /** * parse css string * @param iter * @param options * + * @throws Error * @private */ export async function doParse(iter: Generator | AsyncGenerator, options: ParserOptions = {}): Promise { @@ -232,6 +416,11 @@ export async function doParse(iter: Generator | AsyncGenerator | AsyncGenerator>>; - preValuesHandlers = new Map as Map>>; - postValuesHandlers = new Map as Map>>; + valuesHandlers = new Map as Map>>; + preValuesHandlers = new Map as Map>>; + postValuesHandlers = new Map as Map>>; - preVisitorsHandlersMap = new Map ; - visitorsHandlersMap = new Map ; - postVisitorsHandlersMap = new Map; + preVisitorsHandlersMap = new Map; + visitorsHandlersMap = new Map; + postVisitorsHandlersMap = new Map; const visitors = Object.entries(options.visitor); let key: string; @@ -430,7 +619,6 @@ export async function doParse(iter: Generator | AsyncGenerator | AsyncGenerator | AsyncGenerator | AsyncGenerator 0) { - node = parseNode(tokens, context, options, errors, src, map, rawTokens, stats); + node = parseNode(tokens, context, options as ParserOptions, errors, src, map, rawTokens, stats); rawTokens.length = 0; if (node != null) { @@ -602,13 +790,14 @@ export async function doParse(iter: Generator | AsyncGenerator | AsyncGenerator; + callable = typeof handler == 'function' ? handler : handler[camelize(node.typ == EnumToken.DeclarationNodeType || node.typ == EnumToken.AtRuleNodeType ? node.nam : (node as AstKeyframesAtRule).val)] as GenericVisitorHandler; if (callable == null) { @@ -763,165 +952,873 @@ export async function doParse(iter: Generator | AsyncGenerator 0) { + + let node: Token | AstNode | null = null; + + node = result.node; + + if (valuesHandlers!.has(node.typ)) { + + for (const valueHandler of valuesHandlers!.get(node.typ)!) { + + callable = valueHandler as GenericVisitorHandler; + replacement = callable(node as T, result.parent); + + if (replacement == null) { + + continue; + } + + isAsync = replacement instanceof Promise || Object.getPrototypeOf(replacement).constructor.name == 'AsyncFunction'; + + if (isAsync) { + + replacement = await replacement; + } + + if (replacement != null && replacement != node) { + + node = replacement as AstNode; + } + } + } + + if (node != result.node) { + + // @ts-ignore + replaceToken(result.parent, value, node); + } + + const tokens: Token[] = 'tokens' in result.node ? result.node.tokens as Token[] : []; + + if ('val' in result.node && Array.isArray(result.node.val)) { + + tokens.push(...result.node.val as Token[]); + } + + if (tokens.length == 0) { + continue; + } + + for (const {value, parent, root} of walkValues(tokens, result.node)) { + + node = value; + + if (valuesHandlers!.has(node!.typ)) { + + for (const valueHandler of valuesHandlers!.get(node!.typ)!) { + + callable = valueHandler as GenericVisitorHandler; + let result: GenericVisitorResult = callable(node as T, parent, root); + + if (result == null) { + + continue; + } + + isAsync = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction'; + + if (isAsync) { + + result = await result; + } + + if (result != null && result != node) { + + node = result as Token; + } + + // + if (Array.isArray(node)) { + + break; + } + } + } + + if (node != value) { + + // @ts-ignore + replaceToken(parent, value, node); + } + } + } + } + } + } + + if (options.minify) { + + if (ast.chi.length > 0) { + + let passes: number = options.pass ?? 1 as number; + + while (passes--) { + + minify(ast, options, true, errors, false); + } + } + } + + stats.bytesIn += stats.importedBytesIn; + + let endTime: number = performance.now(); + const result = { + ast, + errors, + stats: { + ...stats, + parse: `${(endParseTime - startTime).toFixed(2)}ms`, + minify: `${(endTime - endParseTime).toFixed(2)}ms`, + total: `${(endTime - startTime).toFixed(2)}ms` + } + } as ParseResult; + + if (options.module) { + + const moduleSettings = { + hashLength: 5, + filePath: '', + scoped: ModuleScopeEnumOptions.Local, + naming: ModuleCaseTransformEnum.IgnoreCase, + pattern: '', + generateScopedName, + ...(typeof options.module != 'object' ? {} : options.module) + } as ModuleOptions; + + const parseModuleTime: number = performance.now(); + const namesMapping: Record = {}; + const global = new Set; + const processed = new Set; + const pattern: string | null = typeof options.module == 'boolean' ? null : moduleSettings.pattern as string; + const importMapping: Record> = {} as Record>; + const cssVariablesMap: Record> = {}; + const importedCssVariables: Record = {}; + let mapping: Record = {}; + let revMapping = {} as Record; + let filePath: string = typeof options.module == 'boolean' ? options.src as string : (moduleSettings.filePath ?? options.src) as string; + + filePath = filePath === '' ? options.src as string : options.resolve!(filePath, options.dirname!(options.src as string), options.cwd).relative; + + if (typeof options.module == 'number') { + + if (options.module & ModuleCaseTransformEnum.CamelCase) { + + moduleSettings.naming = ModuleCaseTransformEnum.CamelCase; + } else if (options.module & ModuleCaseTransformEnum.CamelCaseOnly) { + + moduleSettings.naming = ModuleCaseTransformEnum.CamelCaseOnly; + } else if (options.module & ModuleCaseTransformEnum.DashCase) { + + moduleSettings.naming = ModuleCaseTransformEnum.DashCase; + } else if (options.module & ModuleCaseTransformEnum.DashCaseOnly) { + + moduleSettings.naming = ModuleCaseTransformEnum.DashCaseOnly; + } + + if (options.module & ModuleScopeEnumOptions.Global) { + + moduleSettings.scoped = ModuleScopeEnumOptions.Global; + } + + if (options.module & ModuleScopeEnumOptions.Pure) { + + // @ts-ignore + moduleSettings.scoped |= ModuleScopeEnumOptions.Pure; + } + + if (options.module & ModuleScopeEnumOptions.ICSS) { + + // @ts-ignore + moduleSettings.scoped |= ModuleScopeEnumOptions.ICSS; + } + } + + if (typeof moduleSettings.scoped == 'boolean') { + + moduleSettings.scoped = moduleSettings.scoped ? ModuleScopeEnumOptions.Local : ModuleScopeEnumOptions.Global; + } + + moduleSettings.filePath = filePath; + moduleSettings.pattern = pattern != null && pattern !== '' ? pattern : (filePath === '' ? `[local]_[hash]` : `[local]_[hash]_[name]`); + + for (const {node, parent} of walk(ast)) { + + if (node.typ == EnumToken.CssVariableImportTokenType) { + + const url: string = ((node as CssVariableImportTokenType).val.find(t => t.typ == EnumToken.StringTokenType) as StringToken).val.slice(1, -1); + const src = options.resolve!(url, options.dirname!(options.src as string), options.cwd); + const result = options.load!(url, options.src) as LoadResult; + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root: ParseResult = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ + stream, + buffer: '', + offset: 0, + position: {ind: 0, lin: 1, col: 1}, + currentPosition: {ind: -1, lin: 1, col: 0} + } as ParseInfo), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + }) as ParserOptions); + + cssVariablesMap[(node as CssVariableImportTokenType).nam] = root.cssModuleVariables!; + parent!.chi!.splice(parent!.chi!.indexOf(node), 1); + continue; + } + + if (node.typ == EnumToken.CssVariableDeclarationMapTokenType) { + + const from = (node as CssVariableMapTokenType).from.find(t => t.typ == EnumToken.IdenTokenType || isIdentColor(t)) as IdentToken; + + if (!(from.val in cssVariablesMap)) { + + errors.push({ + node, + message: `could not resolve @value import from '${from.val}'`, + action: 'drop' + }); + } else { + + for (const token of (node as CssVariableMapTokenType).vars) { + + if (token.typ == EnumToken.IdenTokenType || isIdentColor(token)) { + + if (!((token as IdentToken).val in cssVariablesMap[from.val])) { + + errors.push({ + node, + message: `value '${(token as IdentToken).val}' is not exported from '${from.val}'`, + action: 'drop' + }); + + continue; + } + + result.cssModuleVariables ??= {}; + result.cssModuleVariables[(token as IdentToken).val] = importedCssVariables[(token as IdentToken).val] = cssVariablesMap[from.val][(token as IdentToken).val]; + } + } + } + + parent!.chi!.splice(parent!.chi!.indexOf(node), 1); + continue; + } + + if (node.typ == EnumToken.CssVariableTokenType) { + + if (parent?.typ == EnumToken.StyleSheetNodeType) { + + if (result.cssModuleVariables == null) { + + result.cssModuleVariables = {} as Record; + } + + result.cssModuleVariables[node.nam] = node; + } + parent!.chi!.splice(parent!.chi!.indexOf(node), 1); + continue; + } + + if (node.typ == EnumToken.DeclarationNodeType) { + + if (node.nam.startsWith('--')) { + + if (!(node.nam in namesMapping)) { + + let result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? node.nam : moduleSettings.generateScopedName!(node.nam, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + let value: string = result instanceof Promise ? await result : result; + + mapping[node.nam] = '--' + (moduleSettings.naming! & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming! & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming as ModuleCaseTransformEnum) : value); + revMapping[node.nam] = node.nam; + } + + node.nam = mapping[node.nam]; + } + + if ('composes' == node.nam.toLowerCase()) { + + const tokens = [] as ComposesSelectorToken[]; + let isValid: boolean = true; + + for (const token of node.val) { + + if (token.typ == EnumToken.ComposesSelectorNodeType) { + + if (!((token as ComposesSelectorToken).r == null || (token as ComposesSelectorToken).r!.typ == EnumToken.StringTokenType || (token as ComposesSelectorToken).r!.typ == EnumToken.IdenTokenType)) { + + errors.push({ + action: 'drop', + message: `composes '${EnumToken[(token.r! as IdentToken).typ]}' is not supported`, + node + }); + + isValid = false; + break; + } + tokens.push(token as ComposesSelectorToken) + } + } + + // find parent rule + let parentRule = node.parent as AstRule; + + while (parentRule != null && parentRule.typ != EnumToken.RuleNodeType) { + + parentRule = parentRule.parent as AstRule; + } + + if (!isValid || tokens.length == 0) { + + if (tokens.length == 0) { + + errors.push({ + action: 'drop', + message: `composes is empty`, + node + }); + } + + (parentRule as AstRule).chi.splice((parentRule as AstRule).chi.indexOf(node), 1); + continue; + } + + for (const token of tokens) { + + // composes: a b c; + if (token.r == null) { + + for (const rule of token.l) { + + if (rule.typ == EnumToken.WhitespaceTokenType || rule.typ == EnumToken.CommentTokenType) { + + continue; + } + + if (!((rule as IdentToken).val in mapping)) { + + let result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? (rule as IdentToken).val : moduleSettings.generateScopedName!((rule as IdentToken).val, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + let value: string = result instanceof Promise ? await result : result; + + mapping[(rule as DashedIdentToken).val] = (rule.typ == EnumToken.DashedIdenTokenType ? '--' : '') + (moduleSettings.naming! & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming! & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming as ModuleCaseTransformEnum) : value); + revMapping[mapping[(rule as DashedIdentToken).val]] = (rule as DashedIdentToken).val; + } + + if (parentRule != null) { + + for (const tk of (parentRule as AstRule).tokens!) { + + if (tk.typ == EnumToken.ClassSelectorTokenType) { + + const val: string = (tk as ClassSelectorToken).val.slice(1); + + if (val in revMapping) { + + const key = revMapping[val] as string; + mapping[key] = [...new Set([...mapping[key].split(' '), mapping[(rule as IdentToken).val]])].join(' '); + } + } + } + } + } + } + // composes: a b c from 'file.css'; + else if (token.r.typ == EnumToken.String) { + + const url: string = (token.r as StringToken).val.slice(1, -1); + const src = options.resolve!(url, options.dirname!(options.src as string), options.cwd); + const result = options.load!(url, options.src) as LoadResult; + const stream = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction' ? await result : result; + const root: ParseResult = await doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ + stream, + buffer: '', + offset: 0, + position: {ind: 0, lin: 1, col: 1}, + currentPosition: {ind: -1, lin: 1, col: 0} + } as ParseInfo), Object.assign({}, options, { + minify: false, + setParent: false, + src: src.relative + }) as ParserOptions); + + const srcIndex: string = (src.relative.startsWith('/') || src.relative.startsWith('../') ? '' : './') + src.relative; + + if (Object.keys(root.mapping as Record).length > 0) { + importMapping[srcIndex] = {} as Record; + } + + if (parentRule != null) { + + for (const tk of (parentRule as AstRule).tokens!) { + + if (tk.typ == EnumToken.ClassSelectorTokenType) { + + const val: string = (tk as ClassSelectorToken).val.slice(1); + + if (val in revMapping) { + + const key = revMapping[val] as string; + const values = [] as string[]; + + for (const iden of token.l) { + + if (iden.typ != EnumToken.IdenTokenType && iden.typ != EnumToken.DashedIdenTokenType) { + + continue; + } + + if (!((iden as IdentToken | DashedIdentToken).val in root.mapping!)) { + + const result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? (iden as IdentToken | DashedIdentToken).val : moduleSettings.generateScopedName!((iden as IdentToken | DashedIdentToken).val, srcIndex, moduleSettings.pattern as string, moduleSettings.hashLength); + + let value: string = result instanceof Promise ? await result : result; + + root.mapping![(iden as IdentToken | DashedIdentToken).val] = (moduleSettings.naming! & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming! & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming as ModuleCaseTransformEnum) : value); + root.revMapping![root.mapping![(iden as IdentToken | DashedIdentToken).val]] = (iden as IdentToken | DashedIdentToken).val; + } + + importMapping[srcIndex][(iden as IdentToken | DashedIdentToken).val] = root.mapping![(iden as IdentToken | DashedIdentToken).val]; + values.push(root.mapping![(iden as IdentToken | DashedIdentToken).val]); + } + + mapping[key] = [...new Set([...mapping[key].split(' '), ...values])].join(' '); + } + } + } + } + } + + // composes: a b c from global; + else if (token.r.typ == EnumToken.IdenTokenType) { + + // global + if (parentRule != null) { + + if ('global' == (token.r as IdentToken).val.toLowerCase()) { + + for (const tk of (parentRule as AstRule).tokens!) { + + if (tk.typ == EnumToken.ClassSelectorTokenType) { + + const val: string = (tk as ClassSelectorToken).val.slice(1); + + if (val in revMapping) { + + const key = revMapping[val] as string; + mapping[key] = [...new Set([...mapping[key].split(' '), ...((token as ComposesSelectorToken).l.reduce((acc, curr) => { + + if (curr.typ == EnumToken.IdenTokenType) { + + acc.push((curr as IdentToken).val); + } + + return acc; + }, [] as string[]))])].join(' '); + } + } + } + + } else { + + errors.push({ + action: 'drop', + message: `composes '${(token.r as IdentToken).val}' is not supported`, + node + }); + } + } + } + } + + (parentRule as AstRule).chi.splice((parentRule as AstRule).chi.indexOf(node), 1); + } + + if (node.typ == EnumToken.DeclarationNodeType && ['grid-column', 'grid-column-start', 'grid-column-end', 'grid-row', 'grid-row-start', 'grid-row-end', 'grid-template', 'grid-template-columns', 'grid-template-rows'].includes(node.nam)) { + + for (const {value} of walkValues(node.val, node)) { + + if (value.typ != EnumToken.IdenTokenType) { + + continue; + } + + let idenToken = (value as IdentToken).val; + let suffix: string = ''; + + if (idenToken.endsWith('-start')) { + + suffix = '-start'; + idenToken = idenToken.slice(0, -6); + } else if (idenToken.endsWith('-end')) { + + suffix = '-end'; + idenToken = idenToken.slice(0, -4); + } + + if (!(idenToken in mapping)) { + + let result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? idenToken : moduleSettings.generateScopedName!(idenToken, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + + if (result instanceof Promise) { + + result = await result; + } + + mapping[idenToken] = result; + revMapping[result] = idenToken; + + if (suffix !== '') { + + idenToken += suffix; + + if (!(idenToken in mapping)) { + + mapping[idenToken] = result + suffix; + revMapping[result + suffix] = idenToken; + } + } + } + + (value as IdentToken).val = mapping[idenToken]; + } + + } else if (node.nam == 'grid-template-areas' || node.nam == 'grid-template') { + + for (let i = 0; i < node.val.length; i++) { + + if (node.val[i].typ == EnumToken.String) { + + const tokens = parseString((node.val[i] as StringToken).val.slice(1, -1), {location: true}); + + for (const {value} of walkValues(tokens)) { + + if (value.typ == EnumToken.IdenTokenType || value.typ == EnumToken.DashedIdenTokenType) { + + if ((value as IdentToken).val in mapping) { + + (value as IdentToken).val = mapping[(value as IdentToken).val]; + } else { + + let result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? (value as IdentToken).val : moduleSettings.generateScopedName!((value as IdentToken).val, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + + if (result instanceof Promise) { + + result = await result; + } + + mapping[(value as IdentToken).val] = result; + revMapping[result] = (value as IdentToken).val; + (value as IdentToken).val = result; + } + } + } + + (node.val[i] as StringToken).val = (node.val[i] as StringToken).val.charAt(0) + tokens.reduce((acc, curr) => acc + renderToken(curr), '') + (node.val[i] as StringToken).val.charAt((node.val[i] as StringToken).val.length - 1); + } + } + } else if (node.nam == 'animation' || node.nam == 'animation-name') { + + for (const {value} of walkValues(node.val, node)) { + + if (value.typ == EnumToken.IdenTokenType && ![ + 'none', 'infinite', 'normal', 'reverse', 'alternate', + 'alternate-reverse', 'forwards', 'backwards', 'both', + 'running', 'paused', 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', + 'step-start', 'step-end', 'jump-start', 'jump-end', + 'jump-none', 'jump-both', 'start', 'end', + 'inherit', 'initial', 'unset' + ].includes((value as IdentToken).val)) { + + if (!((value as IdentToken).val in mapping)) { + + const result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? (value as IdentToken).val : moduleSettings.generateScopedName!((value as IdentToken).val, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + mapping[(value as IdentToken).val] = result instanceof Promise ? await result : result; + revMapping[mapping[(value as IdentToken).val]] = (value as IdentToken).val; + } + + (value as IdentToken).val = mapping[(value as IdentToken).val]; + } + } + } + + for (const {value, parent} of walkValues(node.val, node)) { + + if (value.typ == EnumToken.DashedIdenTokenType) { + + if (!((value as DashedIdentToken).val in mapping)) { + + const result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? (value as DashedIdentToken).val : moduleSettings.generateScopedName!((value as DashedIdentToken).val, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + let val: string = result instanceof Promise ? await result : result; + + mapping[(value as DashedIdentToken).val] = '--' + (moduleSettings.naming! & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming! & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming as ModuleCaseTransformEnum) : val); + revMapping[mapping[(value as DashedIdentToken).val]] = (value as DashedIdentToken).val; + } + + (value as DashedIdentToken).val = mapping[(value as DashedIdentToken).val]; + } else if ((value.typ == EnumToken.IdenTokenType || isIdentColor(value)) && (value as IdentToken).val in importedCssVariables) { + + replaceToken(parent, value, importedCssVariables[(value as IdentToken).val].val) + } + } + + } else if (node.typ == EnumToken.RuleNodeType) { + + if (node.tokens == null) { + + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + value: parseSelector(parseString(node.sel, {location: true})) + }); + } + + let hasIdOrClass: boolean = false; + + for (const {value} of walkValues((node as AstRule).tokens as Token[], node, + // @ts-ignore + (value: Token, parent: AstRule) => { + + if (value.typ == EnumToken.PseudoClassTokenType) { + + const val: string = (value as PseudoClassToken).val.toLowerCase(); + switch (val) { + + case ':local': + case ':global': { + + + let index: number = (parent as AstRule).tokens!.indexOf(value); + + (parent as AstRule).tokens!.splice(index, 1); + + if ((parent as AstRule).tokens![index]?.typ == EnumToken.WhitespaceTokenType || (parent as AstRule).tokens![index]?.typ == EnumToken.DescendantCombinatorTokenType) { + + (parent as AstRule).tokens!.splice(index, 1); + } + + if (val == ':global') { + + for (; index < (parent as AstRule).tokens!.length; index++) { + + if ((parent as AstRule).tokens![index].typ == EnumToken.CommaTokenType || + ( + [EnumToken.PseudoClassFuncTokenType, EnumToken.PseudoClassTokenType].includes((parent as AstRule).tokens![index].typ) && + [':global', ':local'].includes(((parent as AstRule).tokens![index] as PseudoClassToken).val.toLowerCase()) + ) + ) { + + break; + } + + global.add((parent as AstRule).tokens![index]); + } + } + } + + break; + } + + } else if (value.typ == EnumToken.PseudoClassFuncTokenType) { + + switch ((value as FunctionToken).val.toLowerCase()) { + + case ':global': - isAsync = replacement instanceof Promise || Object.getPrototypeOf(replacement).constructor.name == 'AsyncFunction'; + for (const token of (value as FunctionToken).chi) { - if (replacement) { + global.add(token); + } - replacement = await replacement; - } + (parent as AstRule).tokens!.splice((parent as AstRule).tokens!.indexOf(value), 1, ...(value as FunctionToken).chi); + break; - if (replacement == null || replacement == node) { + case ':local': - continue; + (parent as AstRule).tokens!.splice((parent as AstRule).tokens!.indexOf(value), 1, ...(value as FunctionToken).chi); + break; + } } - // @ts-ignore - node = replacement as AstNode; + })) { - // - if (Array.isArray(node)) { + if (value.typ == EnumToken.HashTokenType || value.typ == EnumToken.ClassSelectorTokenType) { - break; - } + hasIdOrClass = true; } - // @ts-ignore - if (node != result.node) { + if (processed.has(value)) { - // @ts-ignore - replaceToken(result.parent, result.node, node); + continue; } - } else if (valuesHandlers!.size > 0) { - - let node: Token | AstNode | null = null; - node = result.node; + processed.add(value); - if (valuesHandlers!.has(node.typ)) { + if (value.typ == EnumToken.PseudoClassTokenType) { - for (const valueHandler of valuesHandlers!.get(node.typ)!) { + } else if (value.typ == EnumToken.PseudoClassFuncTokenType) { - callable = valueHandler as GenericVisitorHandler; - replacement = callable(node as T, result.parent); + } else { - if (replacement == null) { + if (global.has(value)) { - continue; - } + continue; + } - isAsync = replacement instanceof Promise || Object.getPrototypeOf(replacement).constructor.name == 'AsyncFunction'; + if (value.typ == EnumToken.ClassSelectorTokenType) { - if (isAsync) { + const val: string = (value as ClassSelectorToken).val.slice(1); - replacement = await replacement; - } + if (!(val in mapping)) { - if (replacement != null && replacement != node) { + const result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? val : moduleSettings.generateScopedName!(val, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + let value: string = result instanceof Promise ? await result : result; - node = replacement as AstNode; + mapping[val] = (moduleSettings.naming! & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming! & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(value, moduleSettings.naming as ModuleCaseTransformEnum) : value); + revMapping[mapping[val]] = val; } + + (value as ClassSelectorToken).val = '.' + mapping[val]; } } + } - if (node != result.node) { + if (moduleSettings.scoped! & ModuleScopeEnumOptions.Pure) { - // @ts-ignore - replaceToken(result.parent, value, node); + if (!hasIdOrClass) { + + throw new Error(`pure module: No id or class found in selector '${node.sel}' at '${node.loc?.src ?? ''}':${node.loc?.sta?.lin ?? ''}:${node.loc?.sta?.col ?? ''}`); } + } - const tokens: Token[] = 'tokens' in result.node ? result.node.tokens as Token[] : []; + node.sel = ''; - if ('val' in result.node && Array.isArray(result.node.val)) { + for (const token of node.tokens! as Token[]) { - tokens.push(...result.node.val as Token[]); - } + node.sel += renderToken(token); + } + } else if (node.typ == EnumToken.AtRuleNodeType || node.typ == EnumToken.KeyframesAtRuleNodeType) { - if (tokens.length == 0) { - continue; - } + const val: string = node.nam.toLowerCase(); - for (const {value, parent, root} of walkValues(tokens, result.node)) { + if (node.tokens == null) { - node = value; + Object.defineProperty(node, 'tokens', { + ...definedPropertySettings, + // @ts-ignore + value: parseAtRulePrelude(parseString(node.val), node) + }); + } - if (valuesHandlers!.has(node!.typ)) { + if (val == 'property' || val == 'keyframes') { - for (const valueHandler of valuesHandlers!.get(node!.typ)!) { + const prefix: string = val == 'property' ? '--' : ''; - callable = valueHandler as GenericVisitorHandler; - let result: GenericVisitorResult = callable(node as T, parent, root); + for (const value of node.tokens as Token[]) { - if (result == null) { + if ((prefix == '--' && value.typ == EnumToken.DashedIdenTokenType) || (prefix == '' && value.typ == EnumToken.IdenTokenType)) { - continue; - } + if (!((value as DashedIdentToken | IdentToken).val in mapping)) { - isAsync = result instanceof Promise || Object.getPrototypeOf(result).constructor.name == 'AsyncFunction'; + const result = (moduleSettings.scoped! & ModuleScopeEnumOptions.Global) ? (value as DashedIdentToken | IdentToken).val : moduleSettings.generateScopedName!((value as DashedIdentToken).val, moduleSettings.filePath as string, moduleSettings.pattern as string, moduleSettings.hashLength); + let val: string = result instanceof Promise ? await result : result; - if (isAsync) { + mapping[(value as DashedIdentToken | IdentToken).val] = prefix + (moduleSettings.naming! & ModuleCaseTransformEnum.DashCaseOnly || moduleSettings.naming! & ModuleCaseTransformEnum.CamelCaseOnly ? getKeyName(val, moduleSettings.naming as ModuleCaseTransformEnum) : val); + revMapping[mapping[(value as DashedIdentToken).val]] = (value as DashedIdentToken).val; + } - result = await result; - } + (value as DashedIdentToken).val = mapping[(value as DashedIdentToken).val]; + } + } - if (result != null && result != node) { + (node as AstAtRule).val = node.tokens!.reduce((a: string, b: Token) => a + renderToken(b), ''); + } else { - node = result as Token; - } + let isReplaced: boolean = false; - // - if (Array.isArray(node)) { + for (const {value, parent} of walkValues(node.tokens, node)) { - break; - } + if (EnumToken.MediaQueryConditionTokenType == parent.typ && value != (parent as MediaQueryConditionToken).l) { + + if ((value.typ == EnumToken.IdenTokenType || isIdentColor(value)) && (value as IdentToken).val in importedCssVariables) { + + isReplaced = true; + (parent as MediaQueryConditionToken).r.splice((parent as MediaQueryConditionToken).r.indexOf(value), 1, ...importedCssVariables[(value as IdentToken).val].val); } } + } - if (node != value) { + if (isReplaced) { - // @ts-ignore - replaceToken(parent, value, node); - } + node.val = node.tokens!.reduce((a: string, b: Token) => a + renderToken(b), ''); } } } } - } - if (options.minify) { + if (moduleSettings.naming != ModuleCaseTransformEnum.IgnoreCase) { - if (ast.chi.length > 0) { + revMapping = {}; + mapping = Object.entries(mapping).reduce((acc: Record, [key, value]: [string, string]) => { - let passes: number = options.pass ?? 1 as number; + const keyName = getKeyName(key, moduleSettings.naming!); - while (passes--) { + acc[keyName] = value; + revMapping[value] = keyName; - minify(ast, options, true, errors, false); - } + return acc; + }, {} as Record) } - } - const endTime: number = performance.now(); + result.mapping = mapping; + result.revMapping = revMapping; - if (options.signal != null) { + if ((moduleSettings.scoped! & ModuleScopeEnumOptions.ICSS) && Object.keys(importMapping).length > 0) { - options.signal.removeEventListener('abort', reject); + result.importMapping = importMapping; + } + + endTime = performance.now(); + result.stats.module = `${(endTime - parseModuleTime).toFixed(2)}ms`; + result.stats.total = `${(endTime - startTime).toFixed(2)}ms`; } - stats.bytesIn += stats.importedBytesIn; + if (options.signal != null) { - return { - ast, - errors, - stats: { - ...stats, - parse: `${(endParseTime - startTime).toFixed(2)}ms`, - minify: `${(endTime - endParseTime).toFixed(2)}ms`, - total: `${(endTime - startTime).toFixed(2)}ms` - } + options.signal.removeEventListener('abort', reject); } + + return result; } function getLastNode(context: AstRuleList | AstInvalidRule | AstInvalidAtRule): AstNode | null { @@ -1230,6 +2127,203 @@ function parseNode(results: TokenizeResult[], context: AstRuleList, options: Par } } + if (node.nam == 'value') { + + let i: number = 0; + + while (i < tokens.length) { + + if (tokens[i].typ == EnumToken.WhitespaceTokenType || tokens[i].typ == EnumToken.CommentTokenType) { + + i++; + continue; + } + + break; + } + + if (i < tokens.length) { + + if (tokens[i].typ == EnumToken.IdenTokenType || isIdentColor(tokens[i])) { + + let k: number = i + 1; + + while (k < tokens.length) { + + if (tokens[k].typ == EnumToken.WhitespaceTokenType || tokens[k].typ == EnumToken.CommentTokenType) { + + k++; + continue; + } + + // var or import + if (tokens[k].typ == EnumToken.ColonTokenType) { + + let j: number = k; + while (++j < tokens.length) { + + if (tokens[j].typ != EnumToken.WhitespaceTokenType && tokens[j].typ != EnumToken.CommentTokenType) { + + break; + } + } + + let offset = k + 1; + while (offset < tokens.length && tokens[offset].typ == EnumToken.WhitespaceTokenType) { + + offset++; + } + + if (tokens[j].typ == EnumToken.StringTokenType) { + + Object.assign(node, { + typ: EnumToken.CssVariableImportTokenType, + nam: (tokens[i] as IdentToken).val, + val: tokens.slice(offset) + }); + delete node.tokens; + // @ts-ignore + delete node.raw!; + context.chi!.push(node); + return null; + } + + Object.assign(node, { + typ: EnumToken.CssVariableTokenType, + nam: (tokens[i] as IdentToken).val, + val: tokens.slice(offset) + }); + context.chi!.push(node); + return null; + } + + if (tokens[k].typ == EnumToken.PseudoClassTokenType) { + + Object.assign(tokens[k], { + typ: EnumToken.IdenTokenType, + val: (tokens[k] as IdentToken).val.slice(1) + }); + Object.assign(node, { + typ: EnumToken.CssVariableTokenType, + nam: (tokens[i] as IdentToken).val, + val: tokens.slice(k) as Token[] + }); + context.chi!.push(node); + return null; + } + + if (tokens[k].typ == EnumToken.CommaTokenType) { + + let j: number = i; + + while (++j < tokens.length) { + + if (tokens[j].typ == EnumToken.IdenTokenType && (tokens[j] as IdentToken).val.toLowerCase() == 'from') { + + const vars: Token[] = tokens.slice(i, j); + const from: Token[] = tokens.slice(j + 1); + let l: number = 0; + + let expect: EnumToken = EnumToken.IdenTokenType; + + for (; l < vars.length; l++) { + + if (vars[l].typ == EnumToken.WhitespaceTokenType || vars[l].typ == EnumToken.CommentTokenType) { + + continue; + } + + if (expect == vars[l].typ || (expect == EnumToken.IdenTokenType && isIdentColor(vars[l]))) { + + expect = expect == EnumToken.CommaTokenType ? EnumToken.IdenTokenType : EnumToken.CommaTokenType; + continue; + } + + errors.push({ + + action: 'drop', + node: node, + location: map.get(vars[l]) ?? location, + message: `expecting '${EnumToken[expect]}' but found ${renderToken(vars[l])}` + }); + + return null; + } + + l = 0; + expect = EnumToken.IdenTokenType; + + for (; l < from.length; l++) { + + if (from[l].typ == EnumToken.WhitespaceTokenType || from[l].typ == EnumToken.CommentTokenType) { + + continue; + } + + if (expect == from[l].typ || isIdentColor(from[l])) { + + while (++l < from.length) { + + if (from[l].typ == EnumToken.WhitespaceTokenType || from[l].typ == EnumToken.CommentTokenType) { + + continue; + } + + errors.push({ + + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `unexpected '${renderToken(from[l])}'` + }); + + return null + } + + break; + } + + errors.push({ + + action: 'drop', + node: node, + location: map.get(from[l]) ?? location, + message: `expecting but found ${renderToken(from[l])}` + }); + + return null; + } + + // @ts-ignore + delete node.nam; + // @ts-ignore + delete node.val; + + Object.assign(node, { + typ: EnumToken.CssVariableDeclarationMapTokenType, + vars, + from + }); + context.chi!.push(node); + return null; + } + } + } + + k++; + } + + Object.assign(node, { + typ: EnumToken.CssVariableTokenType, + nam: (tokens[i] as IdentToken).val, + val: tokens.slice(k) + }); + context.chi!.push(node); + return null; + } + } + } + // @ts-ignore const skipValidate: boolean = (options.validation & ValidationLevel.AtRule) == 0; const isAllowed: boolean = skipValidate || isNodeAllowedInContext(node, context as AstNode); @@ -1325,7 +2419,7 @@ function parseNode(results: TokenizeResult[], context: AstRuleList, options: Par if (options.minify) { - if (curr.typ == EnumToken.PseudoClassFuncTokenType && curr.val == ':nth-child') { + if (curr.typ == EnumToken.PseudoClassFuncTokenType && (curr as PseudoClassFunctionToken).val == ':nth-child') { let i: number = 0; @@ -1627,13 +2721,14 @@ function parseNode(results: TokenizeResult[], context: AstRuleList, options: Par if ((node as LiteralToken).val[0] == '/' || (node as LiteralToken).val[0] == '*') { - (parent as FunctionToken).chi.splice((parent as FunctionToken).chi.indexOf(node), 1, {typ: (node as LiteralToken).val[0] == '/' ? EnumToken.Div : EnumToken.Mul}, ...parseString((node as LiteralToken).val.slice(1))); + (parent as FunctionToken).chi.splice((parent as FunctionToken).chi.indexOf(node), 1, {typ: (node as LiteralToken).val[0] == '/' ? EnumToken.Div : EnumToken.Mul} as Token, ...parseString((node as LiteralToken).val.slice(1))); } } } } } + const node: AstDeclaration = { typ: EnumToken.DeclarationNodeType, nam, @@ -1655,7 +2750,6 @@ function parseNode(results: TokenizeResult[], context: AstRuleList, options: Par stats.nodesCount++; return null; } - const result: AstDeclaration | null = parseDeclarationNode(node, errors, location); Object.defineProperty(result, 'parent', {...definedPropertySettings, value: context}); @@ -1726,12 +2820,12 @@ export function parseAtRulePrelude(tokens: Token[], atRule: AtRuleToken | AstAtR if (parent?.typ == EnumToken.ParensTokenType) { - const index: number = parent.chi.indexOf(value); + const index: number = (parent as ParensToken).chi.indexOf(value); let i: number = index; while (i--) { - if (parent.chi[i].typ == EnumToken.IdenTokenType || parent.chi[i].typ == EnumToken.DashedIdenTokenType) { + if ((parent as ParensToken).chi[i].typ == EnumToken.IdenTokenType || (parent as ParensToken).chi[i].typ == EnumToken.DashedIdenTokenType) { break; } @@ -1739,20 +2833,20 @@ export function parseAtRulePrelude(tokens: Token[], atRule: AtRuleToken | AstAtR if (i >= 0) { - const token: Token = getTokenType((parent.chi[index] as PseudoClassToken | PseudoClassFunctionToken).val.slice(1) + (funcLike.includes(parent.chi[index].typ) ? '(' : '')); + const token: Token = getTokenType(((parent as ParensToken).chi[index] as PseudoClassToken | PseudoClassFunctionToken).val.slice(1) + (funcLike.includes((parent as ParensToken).chi[index].typ) ? '(' : '')); - (parent.chi[index] as PseudoClassToken | PseudoClassFunctionToken).val = (token as PseudoClassToken | PseudoClassFunctionToken).val; - (parent.chi[index] as PseudoClassToken | PseudoClassFunctionToken).typ = (token as PseudoClassToken | PseudoClassFunctionToken).typ; + ((parent as ParensToken).chi[index] as PseudoClassToken | PseudoClassFunctionToken).val = (token as PseudoClassToken | PseudoClassFunctionToken).val; + ((parent as ParensToken).chi[index] as PseudoClassToken | PseudoClassFunctionToken).typ = (token as PseudoClassToken | PseudoClassFunctionToken).typ; - if (parent.chi[index].typ == EnumToken.FunctionTokenType && isColor(parent.chi[index])) { + if ((parent as ParensToken).chi[index].typ == EnumToken.FunctionTokenType && isColor((parent as ParensToken).chi[index])) { - parseColor(parent.chi[index]); + parseColor((parent as ParensToken).chi[index]); } - parent.chi.splice(i, index - i + 1, { + (parent as ParensToken).chi.splice(i, index - i + 1, { typ: EnumToken.MediaQueryConditionTokenType, - l: parent.chi[i], - r: parent.chi.slice(index), + l: (parent as ParensToken).chi[i], + r: (parent as ParensToken).chi.slice(index), op: { typ: EnumToken.ColonTokenType } as ColonToken @@ -1845,9 +2939,9 @@ export function parseAtRulePrelude(tokens: Token[], atRule: AtRuleToken | AstAtR } } - if (value.typ == EnumToken.FunctionTokenType && value.val == 'selector') { + if (value.typ == EnumToken.FunctionTokenType && (value as FunctionToken).val == 'selector') { - parseSelector(value.chi); + parseSelector((value as FunctionToken).chi); } if (value.typ == EnumToken.ParensTokenType || (value.typ == EnumToken.FunctionTokenType && ['media', 'supports', 'style', 'scroll-state'].includes((value).val))) { @@ -1981,6 +3075,7 @@ export async function parseDeclarations(declaration: string): Promise { @@ -2135,6 +3230,7 @@ export function parseString(src: string, options: { location: boolean } = {locat const parseInfo: ParseInfo = { stream: src, buffer: '', + offset: 0, position: {ind: 0, lin: 1, col: 1}, currentPosition: {ind: -1, lin: 1, col: 0} } @@ -2283,14 +3379,11 @@ export function getTokenType(val: string, hint?: EnumToken): Token { } } - // if (isDimension(val)) { - - const dimension = parseDimension(val); + const dimension = parseDimension(val); - if (dimension != null) { - return dimension; - } - // } + if (dimension != null) { + return dimension; + } const v: string = val.toLowerCase(); if (v == 'currentcolor' || v == 'transparent' || v in COLORS_NAMES) { @@ -2325,6 +3418,14 @@ export function getTokenType(val: string, hint?: EnumToken): Token { } } + if (val.charAt(0) == '.' && isIdent(val.slice(1))) { + + return { + typ: EnumToken.ClassSelectorTokenType, + val + } + } + if (val.charAt(0) == '#' && isHexColor(val)) { return { @@ -2380,6 +3481,79 @@ export function parseTokens(tokens: Token[], options: ParseTokenOptions = {}): T const t: Token = tokens[i]; + if (t.typ == EnumToken.IdenTokenType && (t as IdentToken).val == 'from' && i > 0) { + + const left: Token[] = []; + const right: Token[] = []; + + let foundLeft: number = 0; + let foundRight: number = 0; + let k: number = i; + let l: number = i; + + while (k > 0) { + + if (tokens[k - 1].typ == EnumToken.CommentTokenType || tokens[k - 1].typ == EnumToken.WhitespaceTokenType) { + + left.push(tokens[--k]); + continue; + } + + if (tokens[k - 1].typ == EnumToken.IdenTokenType || tokens[k - 1].typ == EnumToken.DashedIdenTokenType) { + + foundLeft++; + left.push(tokens[--k]); + continue; + } + + break; + } + + while (++l < tokens.length) { + + if (tokens[l].typ == EnumToken.CommentTokenType || tokens[l].typ == EnumToken.WhitespaceTokenType) { + + right.push(tokens[l]); + continue; + } + + if (tokens[l].typ == EnumToken.IdenTokenType || tokens[l].typ == EnumToken.StringTokenType) { + + foundRight++; + right.push(tokens[l]); + continue; + } + + break; + } + + if (foundLeft > 0 && foundRight == 1) { + + while (left?.[0].typ == EnumToken.WhitespaceTokenType) { + + left.shift(); + } + + while (left.at(-1)?.typ == EnumToken.WhitespaceTokenType) { + + left.pop(); + } + + tokens.splice(k, l - k + 1, { + + typ: EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a: Token | null, b: Token) => { + + return a == null ? b : b.typ == EnumToken.IdenTokenType || b.typ == EnumToken.StringTokenType ? b : a; + }, null) + }); + + i = k; + continue; + } + } + if (t.typ == EnumToken.WhitespaceTokenType && ((i == 0 || i + 1 == tokens.length || [EnumToken.CommaTokenType, EnumToken.GteTokenType, EnumToken.LteTokenType, EnumToken.ColumnCombinatorTokenType].includes(tokens[i + 1].typ)) || @@ -2684,7 +3858,7 @@ export function parseTokens(tokens: Token[], options: ParseTokenOptions = {}): T } } - t.chi = splitTokenList(t.chi).reduce((acc: Token[], t: Token[]): Token[] => { + (t as FunctionToken).chi = splitTokenList((t as FunctionToken).chi).reduce((acc: Token[], t: Token[]): Token[] => { if (acc.length > 0) { acc.push({typ: EnumToken.CommaTokenType}); diff --git a/src/lib/parser/tokenize.ts b/src/lib/parser/tokenize.ts index f5025e10..b0f903ee 100644 --- a/src/lib/parser/tokenize.ts +++ b/src/lib/parser/tokenize.ts @@ -175,33 +175,37 @@ function* consumeString(quoteStr: '"' | "'", buffer: string, parseInfo: ParseInf function match(parseInfo: ParseInfo, input: string): boolean { - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + input.length + 1) == input; + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + input.length + 1) == input; } function peek(parseInfo: ParseInfo, count: number = 1): string { if (count == 1) { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1); + return parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset + 1); } - return parseInfo.stream.slice(parseInfo.currentPosition.ind + 1, parseInfo.currentPosition.ind + count + 1); + const position = parseInfo.currentPosition.ind - parseInfo.offset; + return parseInfo.stream.slice(position + 1, position + count + 1); } function prev(parseInfo: ParseInfo): string { - return parseInfo.stream.charAt(parseInfo.currentPosition.ind - 1); + return parseInfo.offset == parseInfo.currentPosition.ind ? parseInfo.buffer.slice(-1) : parseInfo.stream.charAt(parseInfo.currentPosition.ind - parseInfo.offset - 1); } function next(parseInfo: ParseInfo, count: number = 1): string { let char: string = ''; let chr: string = ''; + let position = parseInfo.currentPosition.ind - parseInfo.offset; - while (count-- && (chr = parseInfo.stream.charAt(parseInfo.currentPosition.ind + 1))) { + while (count-- && (chr = parseInfo.stream.charAt(position + 1))) { char += chr; - const codepoint: number = parseInfo.stream.charCodeAt(++parseInfo.currentPosition.ind); + const codepoint: number = parseInfo.stream.charCodeAt(++position); + ++parseInfo.currentPosition.ind; if (isNewLine(codepoint)) { @@ -815,6 +819,7 @@ export async function* tokenizeStream(input: ReadableStream): AsyncGenerator 2) { + + parseInfo.stream = parseInfo.stream.slice(-2) + stream; + parseInfo.offset = parseInfo.currentPosition.ind - 1; + } + + else { + + parseInfo.stream = stream; + parseInfo.offset = Math.max(0, parseInfo.currentPosition.ind); + } + } - parseInfo.stream += ArrayBuffer.isView(value) ? decoder.decode(value, {stream: true}) : value; yield* tokenize(parseInfo, done); if (done) { diff --git a/src/lib/parser/utils/declaration.ts b/src/lib/parser/utils/declaration.ts index 09746dfc..9d5711ac 100644 --- a/src/lib/parser/utils/declaration.ts +++ b/src/lib/parser/utils/declaration.ts @@ -3,6 +3,7 @@ import type { AttrToken, ErrorDescription, FunctionToken, + IdentToken, Location, ParensToken, StringToken, @@ -28,6 +29,90 @@ export function parseDeclarationNode(node: AstDeclaration, errors: ErrorDescript return null; } + if ('composes' == node.nam.toLowerCase()) { + + let left: Token[] = []; + let right: Token[] = []; + let current: number = 0; + let start:number = 0; + let isLeft: boolean = true; + let hasFrom: number = 0; + + for (; current < node.val.length; current++ ) { + + if (EnumToken.WhitespaceTokenType == node.val[current].typ || EnumToken.CommentTokenType == node.val[current].typ) { + + if (!hasFrom) { + + left.push(node.val[current]); + } + + else { + + right.push(node.val[current]); + } + + continue; + } + + if (EnumToken.IdenTokenType == node.val[current].typ || EnumToken.DashedIdenTokenType == node.val[current].typ || EnumToken.StringTokenType == node.val[current].typ ) { + + if (EnumToken.IdenTokenType == node.val[current].typ) { + + if ('from' == (node.val[current] as IdentToken).val) { + + if (hasFrom) { + + return null; + } + + start = current + 1; + hasFrom++; + continue; + } + } + + if (hasFrom) { + + right.push(node.val[current]); + } + + else { + + left.push(node.val[current]); + } + + continue; + } + + break; + } + + if (hasFrom <= 1 && current > 0) { + + if (hasFrom == 0) { + + node.val.splice(0, left.length, { + typ: EnumToken.ComposesSelectorNodeType, + l: left, + r: null + }); + } + + else { + + node.val.splice(0,current, { + typ: EnumToken.ComposesSelectorNodeType, + l: left, + r: right.reduce((a: Token | null, b: Token) => { + + return a == null ? b : b.typ == EnumToken.WhitespaceTokenType || b.typ == EnumToken.CommentTokenType ? a : b; + }, null) + }); + } + } + } + for (const {value: val, parent} of walkValues(node.val, node)) { if (val.typ == EnumToken.AttrTokenType && (val as AttrToken).chi.every((t: Token) => [EnumToken.IdenTokenType, EnumToken.WhitespaceTokenType, EnumToken.CommentTokenType].includes(t.typ))) { diff --git a/src/lib/parser/utils/hash.ts b/src/lib/parser/utils/hash.ts new file mode 100644 index 00000000..ecb1c2ba --- /dev/null +++ b/src/lib/parser/utils/hash.ts @@ -0,0 +1,115 @@ +// Alphabet: a-z, A-Z, 0-9, _, - +const LOWER = "abcdefghijklmnopqrstuvwxyz"; +const DIGITS = "0123456789"; + +const FULL_ALPHABET: string[] = (LOWER + DIGITS).split(""); // 64 chars +const FIRST_ALPHABET: string[] = (LOWER).split(""); // 54 chars (no digits) + +/** + * supported hash algorithms + */ +export const hashAlgorithms: string[] = ['hex', 'base64', 'base64url', 'sha1', 'sha256', 'sha384', 'sha512']; + +// simple deterministic hash → number +function hashCode(str: string) { + let hash: number = 0; + let l: number = str.length; + let i: number = 0; + + while (i < l) { + + hash = (hash * 31 + str.charCodeAt(i++)) >>> 0; + } + + return hash; +} + +/** + * generate a hash id + * @param input + * @param length + */ +export function hashId(input: string, length: number = 6): string { + + let n: number = hashCode(input); + const chars: string[] = []; + + // First character: must not be a digit + chars.push(FIRST_ALPHABET[n % FIRST_ALPHABET.length]); + + // Remaining characters + for (let i = 1; i < length; i++) { + n = (n + chars.length + i) % FULL_ALPHABET.length; + chars.push(FULL_ALPHABET[n]); + } + + return chars.join(""); +} + +/** + * convert input to hex + * @param input + */ +function toHex(input: ArrayBuffer | string) { + + let result = ''; + + if (input instanceof ArrayBuffer || ArrayBuffer.isView(input)) { + + for (const byte of Array.from(new Uint8Array(input as ArrayBuffer))) { + + result += byte.toString(16).padStart(2, '0'); + } + } else { + + for (const char of String(input)) { + + result += char.charCodeAt(0).toString(16).padStart(2, '0'); + } + } + + return result; +} + +/** + * generate a hash + * @param input + * @param length + * @param algo + */ +export async function hash(input: string, length: number = 6, algo?: string) { + + let result: string; + + if (algo != null) { + + switch (algo) { + + case 'hex': + + return toHex(input).slice(0, length); + + case 'base64': + case 'base64url': + + result = btoa(input); + + if (algo == 'base64url') { + result = result.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); + } + + return result.slice(0, length); + + case 'sha1': + case 'sha256': + case 'sha384': + case 'sha512': + return toHex(await crypto.subtle.digest(algo.replace('sha', 'SHA-'), new TextEncoder().encode(input))).slice(0, length); + + default: + throw new Error(`Unsupported hash algorithm: ${algo}`); + } + } + + return hashId(input, length); +} \ No newline at end of file diff --git a/src/lib/parser/utils/index.ts b/src/lib/parser/utils/index.ts index 9b9d8fbb..1043c571 100644 --- a/src/lib/parser/utils/index.ts +++ b/src/lib/parser/utils/index.ts @@ -1,4 +1,5 @@ export * from './config.ts'; export * from './type.ts'; -export * from './declaration.ts'; \ No newline at end of file +export * from './declaration.ts'; +export * from './text.ts'; \ No newline at end of file diff --git a/src/lib/parser/utils/text.ts b/src/lib/parser/utils/text.ts new file mode 100644 index 00000000..1ceb1252 --- /dev/null +++ b/src/lib/parser/utils/text.ts @@ -0,0 +1,11 @@ + + +export function dasherize(value: string) { + + return value.replace(/([A-Z])/g, (all, one) => `-${one.toLowerCase()}`); +} + +export function camelize(value: string) { + + return value.replace(/-([a-z])/g, (all, one) => one.toUpperCase()); +} \ No newline at end of file diff --git a/src/lib/renderer/render.ts b/src/lib/renderer/render.ts index a72651fd..52286650 100644 --- a/src/lib/renderer/render.ts +++ b/src/lib/renderer/render.ts @@ -13,6 +13,10 @@ import type { ClassSelectorToken, ColorToken, CommentToken, + ComposesSelectorToken, + CssVariableImportTokenType, + CssVariableMapTokenType, + CssVariableToken, DashedIdentToken, ErrorDescription, FractionToken, @@ -74,9 +78,13 @@ function update(position: Position, str: string) { * render ast * @param data * @param options + * @param mapping * @private */ -export function doRender(data: AstNode, options: RenderOptions = {}): RenderResult { +export function doRender(data: AstNode, options: RenderOptions = {}, mapping?: { + mapping: Record; + importMapping: Record> | null; +} | null): RenderResult { const minify: boolean = options.minify ?? true; const beautify: boolean = options.beautify ?? !minify; @@ -110,7 +118,7 @@ export function doRender(data: AstNode, options: RenderOptions = {}): RenderResu while (data.parent != null) { // @ts-ignore - parent = {...data.parent, chi: [{...data}]}; + parent = { ...data.parent, chi: [{ ...data }] }; // @ts-ignore parent.parent = data.parent.parent; @@ -127,13 +135,31 @@ export function doRender(data: AstNode, options: RenderOptions = {}): RenderResu [key: string]: any } = Object.create(null); - const result: RenderResult = { - code: renderAstNode(options.expandNestingRules && [EnumToken.StyleSheetNodeType, EnumToken.AtRuleNodeType, EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data as AstStyleSheet | AstAtRule | AstRule) : data, options, sourcemap, { + const position = { + + ind: 0, + lin: 1, + col: 1 + } as Position; + + let code: string = ''; + + if (mapping != null) { + + if (mapping.importMapping != null) { - ind: 0, - lin: 1, - col: 1 - } as Position, errors, function reducer(acc: string, curr: Token): string { + for (const [key, value] of Object.entries(mapping.importMapping)) { + + code += `:import("${key}")${options.indent}{${options.newLine}${Object.entries(value).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${v}:${options.indent}${k};`, '')}${options.newLine}}${options.newLine}`; + } + } + + code += `:export${options.indent}{${options.newLine}${Object.entries(mapping.mapping).reduce((acc, [k, v]) => acc + (acc.length > 0 ? options.newLine : '') + `${options.indent}${k}:${options.indent}${v};`, '')}${options.newLine}}${options.newLine}`; + update(position, code); + } + + const result: RenderResult = { + code: code + renderAstNode(options.expandNestingRules && [EnumToken.StyleSheetNodeType, EnumToken.AtRuleNodeType, EnumToken.RuleNodeType].includes(data.typ) && 'chi' in data ? expand(data as AstStyleSheet | AstAtRule | AstRule) : data, options, sourcemap, position, errors, function reducer(acc: string, curr: Token): string { if (curr.typ == EnumToken.CommentTokenType && options.removeComments) { @@ -207,7 +233,7 @@ function updateSourceMap(node: AstRuleList | AstComment, options: RenderOptions, } // @ts-ignore - sourcemap.add({src: cache[output], sta: {...position}}, { + sourcemap.add({ src: cache[output], sta: { ...position } }, { ...node.loc, // @ts-ignore src: options.resolve(cache[src], options.cwd).relative @@ -269,7 +295,7 @@ function renderAstNode(data: AstNode, options: RenderOptions, sourcemap: SourceM return (data).chi.reduce((css: string, node: AstRuleList | AstComment) => { - const str: string = renderAstNode(node, options, sourcemap, {...position}, errors, reducer, cache, level, indents); + const str: string = renderAstNode(node, options, sourcemap, { ...position }, errors, reducer, cache, level, indents); if (str === '') { @@ -333,7 +359,7 @@ function renderAstNode(data: AstNode, options: RenderOptions, sourcemap: SourceM str = `${(node).val === '' ? '' : options.indent || ' '}${(node).val};`; } else { - str = renderAstNode(node, options, sourcemap, {...position}, errors, reducer, cache, level + 1, indents); + str = renderAstNode(node, options, sourcemap, { ...position }, errors, reducer, cache, level + 1, indents); } if (css === '') { @@ -366,6 +392,16 @@ function renderAstNode(data: AstNode, options: RenderOptions, sourcemap: SourceM return (data).sel + `${options.indent}{${options.newLine}` + (children === '' ? '' : indentSub + children + options.newLine) + indent + `}`; + + case EnumToken.CssVariableTokenType: + case EnumToken.CssVariableImportTokenType: + + return `@value ${(data).nam}:${options.indent}${filterValues((options.minify ? (data).val : (data).val)).reduce(reducer, '').trim()};`; + + case EnumToken.CssVariableDeclarationMapTokenType: + + return `@value ${filterValues((data as CssVariableMapTokenType).vars).reduce((acc, curr) => acc + renderToken(curr), '').trim()} from ${filterValues((data as CssVariableMapTokenType).from).reduce((acc, curr) => acc + renderToken(curr), '').trim()};`; + case EnumToken.InvalidDeclarationNodeType: case EnumToken.InvalidRuleTokenType: case EnumToken.InvalidAtRuleTokenType: @@ -526,7 +562,7 @@ export function renderToken(token: Token, options: RenderOptions = {}, cache: { if (options.convertColor !== false) { - const value: ColorToken | null = convertColor(token, typeof options.convertColor == 'boolean' ? ColorType.HEX : ColorType[(ColorType[options.convertColor ?? 'HEX'] as string)?.toUpperCase?.().replaceAll?.('-', '_') as keyof typeof ColorType] ?? ColorType.HEX); + const value: ColorToken | null = convertColor(token as ColorToken, typeof options.convertColor == 'boolean' ? ColorType.HEX : ColorType[(ColorType[options.convertColor ?? 'HEX'] as string)?.toUpperCase?.().replaceAll?.('-', '_') as keyof typeof ColorType] ?? ColorType.HEX); // if (value != null) { @@ -609,6 +645,10 @@ export function renderToken(token: Token, options: RenderOptions = {}, cache: { return ((token as NameSpaceAttributeToken).l == null ? '' : renderToken((token as NameSpaceAttributeToken).l as Token, options, cache, reducer, errors)) + '|' + renderToken((token as NameSpaceAttributeToken).r, options, cache, reducer, errors); + case EnumToken.ComposesSelectorNodeType: + + return (token as ComposesSelectorToken).l.reduce((acc: string, curr: Token) => acc + renderToken(curr, options, cache), '') + ((token as ComposesSelectorToken).r == null ? '' : ' from ' + renderToken((token as ComposesSelectorToken).r as Token, options, cache, reducer, errors)); + case EnumToken.BlockStartTokenType: return '{'; @@ -935,7 +975,7 @@ export function renderToken(token: Token, options: RenderOptions = {}, cache: { return 'or'; } - errors?.push({action: 'ignore', message: `render: unexpected token ${JSON.stringify(token, null, 1)}`}); + errors?.push({ action: 'ignore', message: `render: unexpected token ${JSON.stringify(token, null, 1)}` }); return ''; } diff --git a/src/lib/syntax/color/color.ts b/src/lib/syntax/color/color.ts index 5bf02615..115dff78 100644 --- a/src/lib/syntax/color/color.ts +++ b/src/lib/syntax/color/color.ts @@ -227,9 +227,9 @@ export function convertColor(token: ColorToken, to: ColorType): ColorToken | nul for (const chi of (token as ColorToken).chi as Token[]) { - if (chi.typ == EnumToken.NumberTokenType && typeof chi.val == 'number') { + if (chi.typ == EnumToken.NumberTokenType && typeof (chi as NumberToken).val == 'number') { - chi.val = toPrecisionValue(getNumber(chi)) as number; + (chi as NumberToken).val = toPrecisionValue(getNumber(chi as NumberToken)) as number; } } diff --git a/src/lib/syntax/color/relativecolor.ts b/src/lib/syntax/color/relativecolor.ts index f508fe40..3be76d2a 100644 --- a/src/lib/syntax/color/relativecolor.ts +++ b/src/lib/syntax/color/relativecolor.ts @@ -1,4 +1,5 @@ import type { + AngleToken, BinaryExpressionToken, ColorToken, FunctionToken, @@ -62,7 +63,7 @@ export function parseRelativeColor(relativeKeys: string, original: ColorToken, r alpha: alpha == null ? { typ: EnumToken.NumberTokenType, val: 1 - } : (alpha.typ == EnumToken.IdenTokenType && alpha.val == 'none') ? { + } : (alpha.typ == EnumToken.IdenTokenType && (alpha as IdentToken).val == 'none') ? { typ: EnumToken.NumberTokenType, val: 0 } : (alpha.typ == EnumToken.PercentageTokenType ? { @@ -79,7 +80,7 @@ export function parseRelativeColor(relativeKeys: string, original: ColorToken, r alpha: getValue(aExp == null ? { typ: EnumToken.NumberTokenType, val: 1 - } : (aExp.typ == EnumToken.IdenTokenType && aExp.val == 'none') ? { + } : (aExp.typ == EnumToken.IdenTokenType && (aExp as IdentToken).val == 'none') ? { typ: EnumToken.NumberTokenType, val: 0 } : aExp) @@ -119,12 +120,9 @@ function computeComponentValue(expr: Record, converte // normalize hue for (const k of walkValues([object.h as Token])) { - if (k.value.typ == EnumToken.AngleTokenType && k.value.unit == 'deg') { + if (k.value.typ == EnumToken.AngleTokenType && (k.value as AngleToken).unit == 'deg') { - // @ts-ignore k.value.typ = EnumToken.NumberTokenType; - // @ts-ignore - delete k.value.unit; } } } @@ -134,9 +132,9 @@ function computeComponentValue(expr: Record, converte if ([EnumToken.NumberTokenType, EnumToken.PercentageTokenType, EnumToken.AngleTokenType, EnumToken.LengthTokenType].includes(exp.typ)) { - } else if (exp.typ == EnumToken.IdenTokenType && exp.val in values) { + } else if (exp.typ == EnumToken.IdenTokenType && (exp as IdentToken).val in values) { - expr[key] = values[exp.val]; + expr[key] = values[(exp as IdentToken).val]; } else if (exp.typ == EnumToken.FunctionTokenType && mathFuncs.includes((exp as FunctionToken).val)) { diff --git a/src/lib/syntax/color/utils/components.ts b/src/lib/syntax/color/utils/components.ts index bdf0ff4a..3ae789b6 100644 --- a/src/lib/syntax/color/utils/components.ts +++ b/src/lib/syntax/color/utils/components.ts @@ -1,4 +1,4 @@ -import type {ColorToken, NumberToken, Token} from "../../../../@types/index.d.ts"; +import type {ColorToken, FunctionToken, NumberToken, Token} from "../../../../@types/index.d.ts"; import {ColorType, EnumToken, walkValues} from "../../../ast/index.ts"; import {COLORS_NAMES} from "./constants.ts"; import {expandHexValue} from "../hex.ts"; @@ -27,14 +27,14 @@ export function getComponents(token: ColorToken): Token[] | null { if (child.typ == EnumToken.FunctionTokenType) { - if ('var' == child.val.toLowerCase()) { + if ('var' == (child as FunctionToken).val.toLowerCase()) { return null; } else { - for (const {value} of walkValues(child.chi)) { + for (const {value} of walkValues((child as FunctionToken).chi)) { - if (value.typ == EnumToken.FunctionTokenType && 'var' === value.val.toLowerCase()) { + if (value.typ == EnumToken.FunctionTokenType && 'var' === (value as FunctionToken).val.toLowerCase()) { return null; } diff --git a/src/lib/validation/config.json b/src/lib/validation/config.json index de45b4b9..bdc1dfd7 100644 --- a/src/lib/validation/config.json +++ b/src/lib/validation/config.json @@ -754,7 +754,7 @@ "syntax": "[ ? ]+ | none" }, "cursor": { - "syntax": "[ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" + "syntax": "[ [ [ ]? , ]* ] [ [ [ ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]" }, "cx": { "syntax": " | " @@ -1982,6 +1982,12 @@ }, "white-space-trim": { "syntax": "none | discard-before || discard-after || discard-inner" + }, + "composes": { + "syntax": "#" + }, + "composes-selector": { + "syntax": "+ [from [global&&]]?" } }, "functions": { @@ -2007,7 +2013,7 @@ "syntax": "atan2( , )" }, "attr": { - "syntax": "attr( ? [, ]? )" + "syntax": "attr( ? , ? )" }, "blur": { "syntax": "blur( ? )" @@ -2360,7 +2366,7 @@ "syntax": "scroll | fixed | local" }, "attr()": { - "syntax": "attr( ? [, ]? )" + "syntax": "attr( ? , ? )" }, "attr-matcher": { "syntax": "[ '~' | '|' | '^' | '$' | '*' ]? '='" @@ -2368,6 +2374,9 @@ "attr-modifier": { "syntax": "i | s" }, + "attr-type": { + "syntax": "type( ) | raw-string | number | " + }, "attribute-selector": { "syntax": "'[' ']' | '[' [ | ] ? ']'" }, @@ -2581,6 +2590,9 @@ "cubic-bezier-easing-function": { "syntax": "ease | ease-in | ease-out | ease-in-out | cubic-bezier( , , , )" }, + "cursor-predefined": { + "syntax": "auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing" + }, "custom-color-space": { "syntax": "" }, diff --git a/src/lib/validation/syntax.ts b/src/lib/validation/syntax.ts index 02621f26..9ec9d04e 100644 --- a/src/lib/validation/syntax.ts +++ b/src/lib/validation/syntax.ts @@ -912,6 +912,7 @@ function matchPropertyType(syntax: ValidationPropertyToken, context: Context 0) || (token.typ == EnumToken.FunctionTokenType && mathFuncs.includes((token as FunctionToken).val.toLowerCase()) || (token.typ == EnumToken.FunctionTokenType && wildCardFuncs.includes((token as FunctionToken).val))); + success = (token.typ == EnumToken.NumberTokenType && /^[+-]?\d+$/.test((token as NumberToken).val.toString())) || (token.typ == EnumToken.FunctionTokenType && mathFuncs.includes((token as FunctionToken).val.toLowerCase()) || (token.typ == EnumToken.FunctionTokenType && wildCardFuncs.includes((token as FunctionToken).val))); if ('range' in syntax) { diff --git a/src/lib/validation/syntaxes/bg-layer.ts b/src/lib/validation/syntaxes/bg-layer.ts index d7d43aec..2ba157cb 100644 --- a/src/lib/validation/syntaxes/bg-layer.ts +++ b/src/lib/validation/syntaxes/bg-layer.ts @@ -5,14 +5,11 @@ import {SyntaxValidationResult} from "../../ast/index.ts"; export function validateBGLayers(tokens: Token[], root?: AstAtRule | AstRule, options?: ValidationSelectorOptions): ValidationSyntaxResult { + // @ts-ignore return { valid: SyntaxValidationResult.Valid, - matches: [], - // @ts-ignore node: root, - // @ts-ignore syntax: null, - error: '', - tokens + error: '' } } diff --git a/src/lib/validation/syntaxes/compound-selector.ts b/src/lib/validation/syntaxes/compound-selector.ts index 9f33c2f8..f75fee43 100644 --- a/src/lib/validation/syntaxes/compound-selector.ts +++ b/src/lib/validation/syntaxes/compound-selector.ts @@ -30,8 +30,7 @@ export function validateCompoundSelector(tokens: Token[], root?: AstAtRule | Ast node: root, // @ts-ignore syntax: null, - error: 'expected selector', - tokens + error: 'expected selector' } } diff --git a/src/lib/validation/syntaxes/relative-selector-list.ts b/src/lib/validation/syntaxes/relative-selector-list.ts index b45434bb..0662101d 100644 --- a/src/lib/validation/syntaxes/relative-selector-list.ts +++ b/src/lib/validation/syntaxes/relative-selector-list.ts @@ -18,14 +18,11 @@ export function validateRelativeSelectorList(tokens: Token[], root?: AstAtRule | } } + // @ts-ignore return { valid: SyntaxValidationResult.Valid, - matches: [], - // @ts-ignore node: root, - // @ts-ignore syntax: null, - error: '', - tokens + error: '' } } \ No newline at end of file diff --git a/src/node.ts b/src/node.ts index 0a7938e5..7bc581ea 100644 --- a/src/node.ts +++ b/src/node.ts @@ -10,11 +10,12 @@ import type { TransformResult } from "./@types/index.d.ts"; import process from 'node:process'; -import {doParse, doRender, tokenize, tokenizeStream} from "./lib/index.ts"; +import {doParse, doRender, ModuleScopeEnumOptions, tokenize, tokenizeStream} from "./lib/index.ts"; import {dirname, matchUrl, resolve} from "./lib/fs/index.ts"; import {Readable} from "node:stream"; import {createReadStream} from "node:fs"; import {lstat, readFile} from "node:fs/promises"; +import {ResponseType} from "./types.ts"; export type * from "./@types/index.d.ts"; export type * from "./@types/ast.d.ts"; @@ -45,53 +46,73 @@ export { okLabDistance, parseDeclarations, EnumToken, - ValidationLevel, ColorType, SourceMap, WalkerEvent, - WalkerOptionEnum + ValidationLevel, + WalkerOptionEnum, + ModuleScopeEnumOptions, + ModuleCaseTransformEnum } from './lib/index.ts'; export {FeatureWalkMode} from './lib/ast/features/type.ts'; -export {dirname, resolve}; +export {dirname, resolve, ResponseType}; /** * load file or url as stream * @param url * @param currentFile - * @param asStream + * @param responseType * @throws Error file not found * * @private */ -export async function load(url: string, currentFile: string = '.', asStream: boolean = false): Promise>> { +export async function load(url: string, currentFile: string = '.', responseType: boolean | ResponseType = false): Promise>> { const resolved = resolve(url, currentFile); + if (typeof responseType == 'boolean') { + + responseType = responseType ? ResponseType.ReadableStream : ResponseType.Text; + } + if (matchUrl.test(resolved.absolute)) { - return fetch(resolved.absolute).then(async (response: Response): Promise>> => { + return fetch(resolved.absolute).then(async (response: Response): Promise>> => { if (!response.ok) { throw new Error(`${response.status} ${response.statusText} ${response.url}`) } - return asStream ? response.body as ReadableStream> : await response.text(); + if (responseType == ResponseType.ArrayBuffer) { + + return response.arrayBuffer(); + } + + return responseType == ResponseType.ReadableStream ? response.body as ReadableStream> : await response.text(); }); } try { - if (!asStream) { + if (responseType == ResponseType.Text) { return readFile(resolved.absolute, 'utf-8'); } + if (responseType == ResponseType.ArrayBuffer) { + + return readFile(resolved.absolute).then(buffer => buffer.buffer); + } + const stats = await lstat(resolved.absolute); if (stats.isFile()) { - return Readable.toWeb(createReadStream(resolved.absolute, {encoding: 'utf-8', highWaterMark: 64 * 1024})) as ReadableStream; + return Readable.toWeb(createReadStream(resolved.absolute, { + encoding: 'utf-8', + highWaterMark: 64 * 1024 + })) as ReadableStream; } } catch (error) { @@ -106,6 +127,7 @@ export async function load(url: string, currentFile: string = '.', asStream: boo * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -130,9 +152,12 @@ export async function load(url: string, currentFile: string = '.', asStream: boo * // } * ``` */ -export function render(data: AstNode, options: RenderOptions = {}): RenderResult { +export function render(data: AstNode, options: RenderOptions = {}, mapping?: { + mapping: Record; + importMapping: Record> | null; +} | null): RenderResult { - return doRender(data, Object.assign(options, {resolve, dirname, cwd: options.cwd ?? process.cwd()})); + return doRender(data, Object.assign(options, {resolve, dirname, cwd: options.cwd ?? process.cwd()}), mapping); } /** @@ -206,14 +231,25 @@ export async function parseFile(file: string, options: ParserOptions = {}, asStr * console.log(result.ast); * ``` */ + export async function parse(stream: string | ReadableStream, options: ParserOptions = {}): Promise { return doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ stream, buffer: '', + offset: 0, position: {ind: 0, lin: 1, col: 1}, currentPosition: {ind: -1, lin: 1, col: 0} - } as ParseInfo), Object.assign(options, {load, resolve, dirname, cwd: options.cwd ?? process.cwd()})); + } as ParseInfo), Object.assign(options, { + load, + resolve, + dirname, + cwd: options.cwd ?? process.cwd() + })).then(result => { + + const {revMapping, ...res} = result; + return res as ParseResult; + }); } /** @@ -241,7 +277,7 @@ export async function parse(stream: string | ReadableStream, options */ export async function transformFile(file: string, options: TransformOptions = {}, asStream: boolean = false): Promise { - return Promise.resolve(((options.load ?? load) as (file: string, currentFile: string, asStream: boolean) => LoadResult)(file,'.', asStream)).then(stream => transform(stream, {src: file, ...options})); + return Promise.resolve(((options.load ?? load) as (file: string, currentFile: string, asStream: boolean) => LoadResult)(file, '.', asStream)).then(stream => transform(stream, {src: file, ...options})); } /** @@ -294,8 +330,22 @@ export async function transform(css: string | ReadableStream, option const startTime: number = performance.now(); return parse(css, options).then((parseResult: ParseResult) => { + let mapping: Record | null = null; + let importMapping: Record> | null = null; + + if (typeof options.module == 'number' && (options.module & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping as Record; + importMapping = parseResult.importMapping as Record>; + } else if (typeof options.module == 'object' && typeof options.module.scoped == 'number' && (options.module.scoped & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping as Record; + importMapping = parseResult.importMapping as Record>; + } + // ast already expanded by parse - const rendered: RenderResult = render(parseResult.ast, {...options, expandNestingRules: false}); + const rendered: RenderResult = render(parseResult.ast, { + ...options, + expandNestingRules: false + }, mapping != null ? {mapping, importMapping} : null); return { ...parseResult, @@ -309,4 +359,4 @@ export async function transform(css: string | ReadableStream, option } } as TransformResult }); -} \ No newline at end of file +} diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 00000000..05bbcbce --- /dev/null +++ b/src/types.ts @@ -0,0 +1,18 @@ +/** + * response type + */ +export enum ResponseType { + + /** + * return text + */ + Text, + /** + * return a readable stream + */ + ReadableStream, + /** + * return an arraybuffer + */ + ArrayBuffer +} \ No newline at end of file diff --git a/src/web.ts b/src/web.ts index eee9a9c5..172de234 100644 --- a/src/web.ts +++ b/src/web.ts @@ -10,8 +10,9 @@ import type { TransformResult } from "./@types/index.d.ts"; -import {doParse, doRender, tokenize, tokenizeStream} from "./lib/index.ts"; +import {doParse, doRender, ModuleScopeEnumOptions, tokenize, tokenizeStream} from "./lib/index.ts"; import {dirname, matchUrl, resolve} from "./lib/fs/index.ts"; +import {ResponseType} from "./types.ts"; export type * from "./@types/index.d.ts"; export type * from "./@types/ast.d.ts"; @@ -42,24 +43,31 @@ export { okLabDistance, parseDeclarations, EnumToken, - ValidationLevel, ColorType, SourceMap, WalkerEvent, + ValidationLevel, WalkerOptionEnum, + ModuleScopeEnumOptions, + ModuleCaseTransformEnum, } from './lib/index.ts'; export {FeatureWalkMode} from './lib/ast/features/type.ts'; -export {dirname, resolve}; +export {dirname, resolve, ResponseType}; /** * default file or url loader * @param url * @param currentFile * - * @param asStream + * @param responseType * @private */ -export async function load(url: string, currentFile: string = '.', asStream: boolean = false): Promise>> { +export async function load(url: string, currentFile: string = '.', responseType: boolean | ResponseType = false): Promise>> { + + if (typeof responseType == 'boolean') { + + responseType = responseType ? ResponseType.ReadableStream : ResponseType.Text; + } let t: URL; @@ -82,14 +90,20 @@ export async function load(url: string, currentFile: string = '.', asStream: boo throw new Error(`${response.status} ${response.statusText} ${response.url}`) } - return asStream ? response.body : await response.text(); - }) as Promise>>; + if (responseType == ResponseType.ArrayBuffer) { + + return response.arrayBuffer(); + } + + return responseType == ResponseType.ReadableStream ? response.body : await response.text(); + }) as Promise>>; } /** * render the ast tree * @param data * @param options + * @param mapping * * Example: * @@ -114,13 +128,16 @@ export async function load(url: string, currentFile: string = '.', asStream: boo * // } * ``` */ -export function render(data: AstNode, options: RenderOptions = {}): RenderResult { +export function render(data: AstNode, options: RenderOptions = {}, mapping?: { + mapping: Record; + importMapping: Record> | null; +} | null): RenderResult { return doRender(data, Object.assign(options, { resolve, dirname, cwd: options.cwd ?? self.location.pathname.endsWith('/') ? self.location.pathname : dirname(self.location.pathname) - })); + }), mapping); } @@ -185,6 +202,7 @@ export async function parse(stream: string | ReadableStream, options return doParse(stream instanceof ReadableStream ? tokenizeStream(stream) : tokenize({ stream, buffer: '', + offset: 0, position: {ind: 0, lin: 1, col: 1}, currentPosition: {ind: -1, lin: 1, col: 0} } as ParseInfo), Object.assign(options, { @@ -192,7 +210,11 @@ export async function parse(stream: string | ReadableStream, options resolve, dirname, cwd: options.cwd ?? self.location.pathname.endsWith('/') ? self.location.pathname : dirname(self.location.pathname) - })); + })).then(result => { + + const {revMapping, ...res} = result; + return res as ParseResult; + }); } /** @@ -250,8 +272,23 @@ export async function transform(css: string | ReadableStream, option return parse(css, options).then((parseResult: ParseResult) => { + let mapping: Record | null = null; + ; + let importMapping: Record> | null = null; + + if (typeof options.module == 'number' && (options.module & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping as Record; + importMapping = parseResult.importMapping as Record>; + } else if (typeof options.module == 'object' && typeof options.module.scoped == 'number' && (options.module.scoped & ModuleScopeEnumOptions.ICSS)) { + mapping = parseResult.mapping as Record; + importMapping = parseResult.importMapping as Record>; + } + // ast already expanded by parse - const rendered: RenderResult = render(parseResult.ast, {...options, expandNestingRules: false}); + const rendered: RenderResult = render(parseResult.ast, { + ...options, + expandNestingRules: false + }, mapping != null ? {mapping, importMapping} : null); return { ...parseResult, diff --git a/test/css-modules/button.css b/test/css-modules/button.css new file mode 100644 index 00000000..63887cd1 --- /dev/null +++ b/test/css-modules/button.css @@ -0,0 +1,57 @@ +/* Button.module.css file */ + +.button { + background-color: #007bff; + color: #ffffff; + padding: 10px 20px; + border: none; + cursor: pointer; + border-radius: 4px; +} + +.button:hover { + background-color: #0056b3; +} + +@property --progress { + syntax: ""; + inherits: false; + initial-value: 25%; +} + +.bar { + display: inline-block; + --progress: 25%; + width: 100%; + height: 5px; + background: linear-gradient( + to right, + #00d230 var(--progress), + black var(--progress) + ); + animation: progressAnimation 2.5s ease infinite; +} + +@keyframes progressAnimation { + to { + --progress: 100%; + } +} + +.body { + background: #6e28d9; + padding: 0 24px; + color: white; /* Change my color to yellow */ + margin: 0; + height: 100vh; + justify-content: center; + align-items: center; + +} + +.animation { + display: block; + width: var(--progress); + animation: progressAnimation infinite alternate 3s; + background: red; +} diff --git a/test/css-modules/color.css b/test/css-modules/color.css new file mode 100644 index 00000000..0fd734d2 --- /dev/null +++ b/test/css-modules/color.css @@ -0,0 +1,4 @@ + +@value blue: #0c77f8; +@value red: #ff0020; +@value green: #aaf201; diff --git a/test/css-modules/mixins.css b/test/css-modules/mixins.css new file mode 100644 index 00000000..131f57ec --- /dev/null +++ b/test/css-modules/mixins.css @@ -0,0 +1,18 @@ + +/* mixins.css */ +.title { + color: black; + font-size: 40px; +} + +.title:hover { + color: red; +} + +.button { + background: #fff; + border: 1px solid #000; +} +.cell { + margin: 10px; +} diff --git a/test/css-modules/style.css b/test/css-modules/style.css new file mode 100644 index 00000000..40d99c69 --- /dev/null +++ b/test/css-modules/style.css @@ -0,0 +1,29 @@ +.className { + color: green; +} + +.className:hover { + color: red; +} + +.otherClassName { + composes: className; + background: black; +} + +:global { + .selector { + & :local { + animation: yourAnimation 1s ease; + } + } +} + +@keyframes yourAnimation { + 0% { + opacity: 0; + } + to { + opacity: 1; + } +} \ No newline at end of file diff --git a/test/css-modules/styles.css b/test/css-modules/styles.css new file mode 100644 index 00000000..eb66c7e4 --- /dev/null +++ b/test/css-modules/styles.css @@ -0,0 +1,80 @@ +/* styles.css */ +:root { + --accent-color: hotpink; +} + +.button { + background: var(--accent-color); +} +.button { + width: var(--progress from './button.css'); +} + +.button { + color: var(--color from global); +} +@property --box-color { + syntax: ""; + inherits: false; + initial-value: teal; +} + +.parent { + --box-color: green; + background-color: var(--box-color); +} + +.child { + width: 80%; + height: 40%; + background-color: var(--box-color); +} + +.grid { + grid-template-areas: 'nav main'; +} + +.nav { + grid-column-start: nav-start; +} + +:global .page :local(.page) { + padding: 20px; +} + +:global(.external) { color: green; } + +.title { + composes: title button cell from "./mixins.css"; + color: green; +} + +.composed-title { + + composes: title from "./mixins.css"; +} + +.composed-heading { + + composes: nav; +} + +.article { + font-size: 16px; +} + +/* component/text.css */ +.text { + color: #777; + font-weight: 24px; +} + +.text:hover { + color: #f60; +} + + +.border-wall { + color: #777; + font-weight: 24px; +} \ No newline at end of file diff --git a/test/specs/code/index.js b/test/specs/code/index.js index 2dc7fd6f..9b87eed8 100644 --- a/test/specs/code/index.js +++ b/test/specs/code/index.js @@ -35,4 +35,5 @@ export * as validation from './validation.js'; export * as atRules from './at-rules.js'; export * as lenient from './lenient.js'; export * as minify from './minify.js'; -export * as transform from './transform.js'; \ No newline at end of file +export * as transform from './transform.js'; +export * as modules from './modules.js'; \ No newline at end of file diff --git a/test/specs/code/modules.js b/test/specs/code/modules.js new file mode 100644 index 00000000..e73d1ad2 --- /dev/null +++ b/test/specs/code/modules.js @@ -0,0 +1,704 @@ +import {ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions} from "../../../dist/lib/ast/types.js"; + +export function run(describe, expect, it, transform, parse, render, dirname, readFile) { + + describe('css modules', function () { + + it('module #1', function () { + return transform(` +.goal .bg-indigo { + background: indigo; +} + +.indigo-white { + composes: bg-indigo title; + color: white; +} +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + goal: "goal_r7bhp", + "bg-indigo": "bg-indigo_gy28g", + "indigo-white": "indigo-white_wims0 bg-indigo_gy28g title_qw06e", + title: "title_qw06e", + }); + expect(result.code).equals(`.goal_r7bhp .bg-indigo_gy28g { + background: indigo +} +.indigo-white_wims0 { + color: #fff +}`) + }) + }); + + it('module #2', function () { + return transform(` +:root { + --accent-color: hotpink; +} + +.button { + background: var(--accent-color); +} + +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + "--accent-color": "--accent-color_yosy6", button: "button_oims0", + }); + + expect(result.code).equals(`:root { + --accent-color_yosy6: hotpink +} +.button_oims0 { + background: var(--accent-color_yosy6) +}`) + }) + }); + + + it('module #3', function () { + return transform(` +.goal .bg-indigo { + background: indigo; +} + +.indigo-white { + composes: bg-indigo; + composes: title block ruler from global; + color: white; +} +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + goal: "goal_r7bhp", + "bg-indigo": "bg-indigo_gy28g", + "indigo-white": "indigo-white_wims0 bg-indigo_gy28g ruler block title", + }); + + expect(result.code).equals(`.goal_r7bhp .bg-indigo_gy28g { + background: indigo +} +.indigo-white_wims0 { + color: #fff +}`) + }) + }); + + it('module #4', function () { + return transform(` +.goal .bg-indigo { + background: indigo; +} + +.indigo-white { + composes: bg-indigo; +composes: button cell title from "${dirname(new URL(import.meta.url).pathname)}/../../css-modules/mixins.css"; color: white; +} +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + goal: "goal_r7bhp", + "bg-indigo": "bg-indigo_gy28g", + "indigo-white": "indigo-white_wims0 bg-indigo_gy28g title_fnrx5_mixins cell_dptz7_mixins button_rptz7_mixins", + }); + + expect(result.code).equals(`.goal_r7bhp .bg-indigo_gy28g { + background: indigo +} +.indigo-white_wims0 { + color: #fff +}`) + }) + }); + + it('module @keyframes and @property #5', function () { + return transform(` + +@property --progress { + syntax: ""; + inherits: false; + initial-value: 25%; +} + +.bar { + display: inline-block; + --progress: 25%; + width: 100%; + height: 5px; + background: linear-gradient( + to right, + #00d230 var(--progress), + black var(--progress) + ); + animation: progressAnimation 2.5s ease infinite; +} + +@keyframes progressAnimation { + to { + --progress: 100%; + } +} + +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + "--progress": "--progress_rlpv3", bar: "bar_dnrx5", progressAnimation: "progressAnimation_nrv19", + }); + + expect(result.code).equals(`@property --progress_rlpv3 { + syntax: ""; + inherits: false; + initial-value: 25% +} +.bar_dnrx5 { + display: inline-block; + --progress_rlpv3: 25%; + width: 100%; + height: 5px; + background: linear-gradient(to right,#00d230 var(--progress_rlpv3),#000 var(--progress_rlpv3)); + animation: progressAnimation_nrv19 2.5s infinite +} +@keyframes progressAnimation_nrv19 { + to { + --progress_rlpv3: 100% + } +}`) + }) + }); + + it('module @keyframes and @property #6', function () { + return transform(` +:root { + overflow: hidden; + background-color: lightblue; + display: flex; + justify-content: center; +} + +.sun { + background-color: yellow; + border-radius: 50%; + height: 100vh; + aspect-ratio: 1 / 1; + /* + animations declared later in the cascade will override the + properties of previously declared animations + */ + /* bounce 'overwrites' the transform set by rise, hence the sun only moves horizontally */ + animation: + 4s linear 0s infinite alternate rise, + 4s linear 0s infinite alternate bounce; +} + +@keyframes rise { + from { + transform: translateY(110vh); + } + to { + transform: translateY(0); + } +} + +@keyframes bounce { + from { + transform: translateX(-50vw); + } + to { + transform: translateX(50vw); + } +} + +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + sun: "sun_ckou2", rise: "rise_jtx3b", bounce: "bounce_gw06e", + }); + + expect(result.code).equals(`:root { + overflow: hidden; + background-color: #add8e6; + display: flex; + justify-content: center +} +.sun_ckou2 { + background-color: #ff0; + border-radius: 50%; + height: 100vh; + aspect-ratio: 1 / 1; + animation: 4s linear infinite alternate rise_jtx3b,4s linear 0s infinite alternate bounce_gw06e +} +@keyframes rise_jtx3b { + 0% { + transform: translateY(110vh) + } + to { + transform: none + } +} +@keyframes bounce_gw06e { + 0% { + transform: translateX(-50vw) + } + to { + transform: translateX(50vw) + } +}`) + }) + }); + + it('module :local :global #7', function () { + return transform(` +:local(.className) { + background: red; +} +:local .className { + color: green; +} +:local(.className .subClass) { + color: green; +} +:local .className .subClass :global(.global-class-name) { + color: blue; +} + +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + className: "className_vjnt1", subClass: "subClass_sgkqy", + }); + + expect(result.code).equals(`.className_vjnt1 { + background: red +} +.className_vjnt1,.className_vjnt1 .subClass_sgkqy { + color: green +} +.className_vjnt1 .subClass_sgkqy .global-class-name { + color: blue +}`) + }) + }); + + it('module composes #8', function () { + return transform(` +:local(.className) { + background: red; + color: yellow; +} + +:local(.subClass) { + composes: className; + background: blue; +} +`, { + module: true, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + className: "className_vjnt1", subClass: "subClass_sgkqy className_vjnt1", + }); + + expect(result.code).equals(`.className_vjnt1 { + background: red; + color: #ff0 +} +.subClass_sgkqy { + background: blue +}`) + }) + }); + + it('module dash case only #9', function () { + return transform(` +:local(.className) { + background: red; + color: yellow; +} + +:local(.subClass) { + composes: className; + background: blue; +} +`, { + module: ModuleCaseTransformEnum.DashCaseOnly, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + "class-name": "class-name_vjnt1", "sub-class": "sub-class_sgkqy class-name_vjnt1", + }); + + expect(result.code).equals(`.class-name_vjnt1 { + background: red; + color: #ff0 +} +.sub-class_sgkqy { + background: blue +}`) + }) + }); + + it('module dash case #10', function () { + return transform(` +:local(.className) { + background: red; + color: yellow; +} + +:local(.subClass) { + composes: className; + background: blue; +} +`, { + module: ModuleCaseTransformEnum.DashCase, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + "class-name": "className_vjnt1", "sub-class": "subClass_sgkqy className_vjnt1", + }); + + expect(result.code).equals(`.className_vjnt1 { + background: red; + color: #ff0 +} +.subClass_sgkqy { + background: blue +}`) + }) + }); + + it('module camel case only #11', function () { + return transform(` +:local(.class-name) { + background: red; + color: yellow; +} + +:local(.sub-class) { + composes: class-name; + background: blue; +} +`, { + module: ModuleCaseTransformEnum.CamelCaseOnly, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + className: "className_agkqy", subClass: "subClass_nfjpx className_agkqy", + }); + + expect(result.code).equals(`.className_agkqy { + background: red; + color: #ff0 +} +.subClass_nfjpx { + background: blue +}`) + }) + }); + + it('module camel case #12', function () { + return transform(` +:local(.class-name) { + background: red; + color: yellow; +} + +:local(.sub-class) { + composes: class-name; + background: blue; +} +`, { + module: ModuleCaseTransformEnum.CamelCase, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + className: "class-name_agkqy", subClass: "sub-class_nfjpx class-name_agkqy", + }); + + expect(result.code).equals(`.class-name_agkqy { + background: red; + color: #ff0 +} +.sub-class_nfjpx { + background: blue +}`) + }) + }); + + it('module case ignore #13', function () { + return transform(` +:local(.className) { + background: red; + color: yellow; +} + +:local(.subClass) { + composes: className; + background: blue; +} +`, { + module: ModuleCaseTransformEnum.IgnoreCase, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + className: "className_vjnt1", subClass: "subClass_sgkqy className_vjnt1", + }); + + expect(result.code).equals(`.className_vjnt1 { + background: red; + color: #ff0 +} +.subClass_sgkqy { + background: blue +}`) + }) + }); + + it('module case ignore #14', function () { + return transform(` +:local(.class-name) { + background: red; + color: yellow; +} + +:local(.sub-class) { + composes: class-name; + background: blue; +} +`, { + module: ModuleCaseTransformEnum.IgnoreCase, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + "class-name": "class-name_agkqy", "sub-class": "sub-class_nfjpx class-name_agkqy", + }); + + expect(result.code).equals(`.class-name_agkqy { + background: red; + color: #ff0 +} +.sub-class_nfjpx { + background: blue +}`) + }) + }); + + it('module mode global #15', function () { + return transform(` +:local(.class-name) { + background: red; + color: yellow; +} + +:local(.sub-class) { + composes: class-name; + background: blue; +} +`, { + module: ModuleScopeEnumOptions.Global, beautify: true + }).then((result) => { + + expect(result.mapping).deep.equals({ + "class-name": "class-name", "sub-class": "sub-class class-name", + }); + + expect(result.code).equals(`.class-name { + background: red; + color: #ff0 +} +.sub-class { + background: blue +}`) + }) + }); + + it('module mode global #16', function () { + + transform(` +:local(.class-name) { + background: red; + color: yellow; +} + +:local(.sub-class) { + composes: class-name; + background: blue; +} +a span { + + text-transform: uppercase; +} +`, { + module: ModuleScopeEnumOptions.Pure | ModuleScopeEnumOptions.Global, beautify: true + }).catch(error => error).then(error => expect(error).to.be.an('error')); + + }); + + it('module mode ICSS #17', function () { + + transform(` + + .goal .bg-indigo { + background: indigo; + } + + + .indigo-white { + composes: bg-indigo; + composes: title block ruler from global; + color: white; + } + + .indigo-white { + composes: bg-indigo; + composes: button cell title from "${dirname(new URL(import.meta.url).pathname)}/../../css-modules/mixins.css"; color: white; + } +`, { + module: ModuleScopeEnumOptions.ICSS, beautify: true + }).then(result => { + + expect(result.importMapping).deep.equals({ + "./test/css-modules/mixins.css": { + title: "title_seiow_mixins", cell: "cell_s04ai_mixins", button: "button_egkqy_mixins", + } + }); + + expect(result.mapping).deep.equals({ + goal: "goal_r7bhp", + "bg-indigo": "bg-indigo_gy28g", + "indigo-white": "indigo-white_wims0 bg-indigo_gy28g ruler block title title_seiow_mixins cell_s04ai_mixins button_egkqy_mixins", + }); + expect(result.code).equals(`:import("./test/css-modules/mixins.css") { + title_seiow_mixins: title; + cell_s04ai_mixins: cell; + button_egkqy_mixins: button; +} +:export { + goal: goal_r7bhp; + bg-indigo: bg-indigo_gy28g; + indigo-white: indigo-white_wims0 bg-indigo_gy28g ruler block title title_seiow_mixins cell_s04ai_mixins button_egkqy_mixins; +} +.goal_r7bhp .bg-indigo_gy28g { + background: indigo +} +.indigo-white_wims0 { + color: #fff +}`) + }); + + }); + + it('module export variables #18', function () { + + return transform(` + + @value blue: #0c77f8; + @value red: #ff0000; + @value green: #aaf200; +`, { + module: ModuleScopeEnumOptions.ICSS, beautify: true + }).then(result => expect(result.cssModuleVariables).deep.equals({ + "blue": { + "typ": EnumToken.CssVariableTokenType, "nam": "blue", "val": [{ + "typ": EnumToken.ColorTokenType, "val": "#0c77f8", "kin": ColorType.HEX + }] + }, "red": { + "typ": EnumToken.CssVariableTokenType, "nam": "red", "val": [{ + "typ": EnumToken.ColorTokenType, "val": "#ff0000", "kin": ColorType.HEX + }] + }, "green": { + "typ": EnumToken.CssVariableTokenType, "nam": "green", "val": [{ + "typ": EnumToken.ColorTokenType, "val": "#aaf200", "kin": ColorType.HEX + }] + } + })) + }); + + it('module import variables #19', function () { + + transform(` + + /* import your colors... */ + @value colors: "${dirname(new URL(import.meta.url).pathname)}/../../css-modules/color.css"; + @value blue, red, green from colors; + + .button { + color: light-dark(blue , red); + display: inline-block; + } + + @supports (border-color: green) or (color:color(from green srgb r g b / 0.5)) { + + .green { + + .button { + color: green; + } + + } +`, { + module: ModuleScopeEnumOptions.ICSS, beautify: true + }).then(result => { + + expect(result.code).equals(`:export { + button: button_oims0; + green: green_znrx5; +} +.button_oims0 { + color: light-dark(#0c77f8,#ff0020); + display: inline-block +} +@supports (border-color:#aaf201) or (color:#00800080) { + .green_znrx5 .button_oims0 { + color: #aaf201 + } +}`); + }); + + }); + + it('module grid #19', function () { + + transform(` +.grid { + grid-template-areas: 'nav main'; + grid-template-columns: [line-name1] 100px [line-name2 line-name3]; +} + +.nav { + grid-column-start: nav-start; + grid-column-end: nav-end; +} +`, { + module: { + pattern: '[local]-[hash:sha256]' + }, beautify: true + }).then(result => { + + expect(result.code).equals(`.grid-8aab4 { + grid-template-areas: 'nav-7fb75 main-2d42c'; + grid-template-columns: [line-name1-bd45b] 100px [line-name2-d3d89 line-name3-3258b] +} +.nav-7fb75 { + grid-column-start: nav-7fb75; + grid-column-end: nav-7fb75 +}`); + }); + + }); + }); +} \ No newline at end of file diff --git a/test/specs/node.spec.js b/test/specs/node.spec.js index 8f98e21a..bffc921d 100644 --- a/test/specs/node.spec.js +++ b/test/specs/node.spec.js @@ -1,14 +1,14 @@ import {parse, render, resolve, transform} from '../../dist/node.js'; +import {ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions} from '../../dist/lib/ast/types.js' import * as tests from './code/index.js'; import {expect} from "@esm-bundle/chai"; import {readFile} from "node:fs/promises"; import {dirname} from 'node:path'; -// import {describe, it} from 'node:test'; // // run(describe, expect, transform, parse, render); for (const test of Object.values(tests)) { - test.run(describe, expect, it, transform, parse, render, dirname, async (path) => readFile(path, { encoding: 'utf-8' }), resolve); + test.run(describe, expect, it, transform, parse, render, dirname, async (path) => readFile(path, { encoding: 'utf-8' }), resolve, ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions); } \ No newline at end of file diff --git a/test/specs/web.spec.js b/test/specs/web.spec.js index e5c4e8ec..2aa64563 100644 --- a/test/specs/web.spec.js +++ b/test/specs/web.spec.js @@ -1,4 +1,5 @@ import {dirname, parse, render, resolve, transform} from '../../dist/web.js'; +import {ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions} from '../../dist/lib/ast/types.js'; import {expect} from "@esm-bundle/chai"; import * as tests from './code/index.js'; @@ -16,5 +17,5 @@ for (const [name,test] of Object.entries(tests)) { continue; } - test.run(describe, expect, it, transform, parse, render, dirname, readFile, resolve); + test.run(describe, expect, it, transform, parse, render, dirname, readFile, resolve, ColorType, EnumToken, ModuleCaseTransformEnum, ModuleScopeEnumOptions); } \ No newline at end of file diff --git a/tools/local-patch.json b/tools/local-patch.json index 420451ab..2b548efa 100644 --- a/tools/local-patch.json +++ b/tools/local-patch.json @@ -33,6 +33,11 @@ "text-align": { "comment": "extend with -non-standard-text-align", "syntax": "| <-non-standard-text-align>" + }, + "composes": { + "syntax": "#"}, + "composes-selector": { + "syntax": "+ [from [global&&]]?" } }, "types": { diff --git a/tools/shorthand.ts b/tools/shorthand.ts index 03f4497e..99de70d6 100644 --- a/tools/shorthand.ts +++ b/tools/shorthand.ts @@ -286,6 +286,9 @@ export const map: ShorthandMapType = ([ [ { shorthand: 'animation', + separator: { + typ: 'Comma' + }, pattern: 'animation-name animation-duration animation-timing-function animation-delay animation-iteration-count animation-direction animation-fill-mode animation-play-state animation-timeline', default: ['1', '0s', '0ms', 'none', 'ease', 'normal', 'running', 'auto'] },