@tbela99/css-parser 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +192 -2
- package/README.md +69 -1120
- package/dist/config.json.js +43 -2
- package/dist/index-umd-web.js +17226 -15037
- package/dist/index.cjs +16889 -14705
- package/dist/index.d.ts +1804 -1684
- package/dist/lib/ast/clone.js +4 -3
- package/dist/lib/ast/expand.js +2 -2
- package/dist/lib/ast/features/calc.js +59 -54
- package/dist/lib/ast/features/if.js +22 -16
- package/dist/lib/ast/features/inlinecssvariables.js +2 -2
- package/dist/lib/ast/features/prefix.js +343 -6
- package/dist/lib/ast/features/transform.js +7 -4
- package/dist/lib/ast/find.js +5 -5
- package/dist/lib/ast/math/expression.js +12 -8
- package/dist/lib/ast/minify.js +28 -33
- package/dist/lib/ast/transform/minify.js +135 -131
- package/dist/lib/ast/transform/utils.js +3 -2
- package/dist/lib/ast/types.js +69 -8
- package/dist/lib/ast/walk.js +4 -5
- package/dist/lib/fs/resolve.js +71 -57
- package/dist/lib/parser/declaration/list.js +92 -3
- package/dist/lib/parser/declaration/map.js +5 -5
- package/dist/lib/parser/parse.js +528 -466
- package/dist/lib/parser/tokenize.js +110 -4
- package/dist/lib/parser/utils/angle.js +29 -0
- package/dist/lib/parser/utils/at-rule-container.js +2 -2
- package/dist/lib/parser/utils/at-rule-font-feature-values.js +2 -2
- package/dist/lib/parser/utils/at-rule-generic.js +1 -1
- package/dist/lib/parser/utils/at-rule-media.js +2 -2
- package/dist/lib/parser/utils/at-rule-support.js +73 -8
- package/dist/lib/parser/utils/at-rule-when-else.js +2 -2
- package/dist/lib/parser/utils/at-rule.js +2 -8
- package/dist/lib/parser/utils/declaration.js +179 -76
- package/dist/lib/parser/utils/selector.js +53 -11
- package/dist/lib/parser/utils/token.js +13 -11
- package/dist/lib/renderer/render.js +501 -59
- package/dist/lib/syntax/color/alpha.js +64 -0
- package/dist/lib/syntax/color/cmyk.js +2 -2
- package/dist/lib/syntax/color/color-mix.js +283 -220
- package/dist/lib/syntax/color/color.js +37 -28
- package/dist/lib/syntax/color/hex.js +2 -2
- package/dist/lib/syntax/color/hsl.js +3 -3
- package/dist/lib/syntax/color/hwb.js +7 -7
- package/dist/lib/syntax/color/lab.js +5 -5
- package/dist/lib/syntax/color/lch.js +4 -4
- package/dist/lib/syntax/color/oklab.js +3 -3
- package/dist/lib/syntax/color/oklch.js +3 -3
- package/dist/lib/syntax/color/relativecolor.js +97 -12
- package/dist/lib/syntax/color/srgb.js +5 -5
- package/dist/lib/syntax/color/utils/color-type.js +18 -0
- package/dist/lib/syntax/color/utils/colorspace.js +46 -0
- package/dist/lib/syntax/color/utils/components.js +7 -3
- package/dist/lib/syntax/color/utils/distance.js +21 -4
- package/dist/lib/syntax/color/utils/make-color.js +56 -0
- package/dist/lib/syntax/color/xyz.js +2 -2
- package/dist/lib/syntax/constants.js +29 -1
- package/dist/lib/syntax/syntax.js +307 -39
- package/dist/lib/validation/config.js +2 -2
- package/dist/lib/validation/config.json.js +32 -17
- package/dist/lib/validation/match.js +239 -104
- package/dist/lib/validation/parser/parse.js +0 -1
- package/dist/lib/validation/parser/typedef.js +6 -0
- package/dist/node.js +64 -22
- package/dist/web.js +65 -18
- package/package.json +26 -15
- package/.nyc_output/4874b20e-6f53-4d7a-be5a-cf68316925f2.json +0 -1
- package/.nyc_output/6193bc4c-6f5f-4898-8950-c628825e6342.json +0 -1
- package/.nyc_output/processinfo/4874b20e-6f53-4d7a-be5a-cf68316925f2.json +0 -1
- package/.nyc_output/processinfo/6193bc4c-6f5f-4898-8950-c628825e6342.json +0 -1
- package/.repl_history +0 -4
- package/badges/coverage.svg +0 -20
- package/deno.lock +0 -2861
- package/dist/lib/ast/clone.d.ts +0 -10
- package/dist/lib/ast/expand.d.ts +0 -14
- package/dist/lib/ast/features/calc.d.ts +0 -10
- package/dist/lib/ast/features/if.d.ts +0 -10
- package/dist/lib/ast/features/index.d.ts +0 -6
- package/dist/lib/ast/features/inlinecssvariables.d.ts +0 -15
- package/dist/lib/ast/features/prefix.d.ts +0 -8
- package/dist/lib/ast/features/shorthand.d.ts +0 -12
- package/dist/lib/ast/features/transform.d.ts +0 -10
- package/dist/lib/ast/features/type.d.ts +0 -15
- package/dist/lib/ast/find.d.ts +0 -165
- package/dist/lib/ast/math/expression.d.ts +0 -18
- package/dist/lib/ast/math/math.d.ts +0 -6
- package/dist/lib/ast/minify.d.ts +0 -19
- package/dist/lib/ast/transform/compute.d.ts +0 -8
- package/dist/lib/ast/transform/matrix.d.ts +0 -22
- package/dist/lib/ast/transform/minify.d.ts +0 -5
- package/dist/lib/ast/transform/perspective.d.ts +0 -3
- package/dist/lib/ast/transform/rotate.d.ts +0 -12
- package/dist/lib/ast/transform/scale.d.ts +0 -6
- package/dist/lib/ast/transform/skew.d.ts +0 -4
- package/dist/lib/ast/transform/translate.d.ts +0 -6
- package/dist/lib/ast/transform/utils.d.ts +0 -9
- package/dist/lib/ast/types.d.ts +0 -903
- package/dist/lib/ast/walk.d.ts +0 -162
- package/dist/lib/fs/resolve.d.ts +0 -20
- package/dist/lib/parser/declaration/list.d.ts +0 -16
- package/dist/lib/parser/declaration/map.d.ts +0 -15
- package/dist/lib/parser/declaration/set.d.ts +0 -9
- package/dist/lib/parser/node.d.ts +0 -7
- package/dist/lib/parser/parse.d.ts +0 -107
- package/dist/lib/parser/tokenize.d.ts +0 -57
- package/dist/lib/parser/utils/at-rule-container.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-font-feature-values.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-generic.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-import.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-media.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-page.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-page.js +0 -28
- package/dist/lib/parser/utils/at-rule-support.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule-token.d.ts +0 -1
- package/dist/lib/parser/utils/at-rule-when-else.d.ts +0 -5
- package/dist/lib/parser/utils/at-rule.d.ts +0 -13
- package/dist/lib/parser/utils/cache.d.ts +0 -6
- package/dist/lib/parser/utils/config.d.ts +0 -2
- package/dist/lib/parser/utils/declaration-list.d.ts +0 -5
- package/dist/lib/parser/utils/declaration.d.ts +0 -18
- package/dist/lib/parser/utils/eq.d.ts +0 -1
- package/dist/lib/parser/utils/hash.d.ts +0 -21
- package/dist/lib/parser/utils/selector.d.ts +0 -5
- package/dist/lib/parser/utils/text.d.ts +0 -3
- package/dist/lib/parser/utils/token.d.ts +0 -14
- package/dist/lib/parser/utils/type.d.ts +0 -2
- package/dist/lib/renderer/render.d.ts +0 -28
- package/dist/lib/renderer/sourcemap/lib/encode.d.ts +0 -1
- package/dist/lib/renderer/sourcemap/sourcemap.d.ts +0 -26
- package/dist/lib/syntax/color/a98rgb.d.ts +0 -2
- package/dist/lib/syntax/color/cmyk.d.ts +0 -10
- package/dist/lib/syntax/color/color-mix.d.ts +0 -2
- package/dist/lib/syntax/color/color.d.ts +0 -42
- package/dist/lib/syntax/color/hex.d.ts +0 -16
- package/dist/lib/syntax/color/hsl.d.ts +0 -20
- package/dist/lib/syntax/color/hsv.d.ts +0 -2
- package/dist/lib/syntax/color/hwb.d.ts +0 -21
- package/dist/lib/syntax/color/lab.d.ts +0 -25
- package/dist/lib/syntax/color/lch.d.ts +0 -23
- package/dist/lib/syntax/color/oklab.d.ts +0 -22
- package/dist/lib/syntax/color/oklch.d.ts +0 -20
- package/dist/lib/syntax/color/p3.d.ts +0 -6
- package/dist/lib/syntax/color/prophotorgb.d.ts +0 -2
- package/dist/lib/syntax/color/rec2020.d.ts +0 -2
- package/dist/lib/syntax/color/relativecolor.d.ts +0 -13
- package/dist/lib/syntax/color/rgb.d.ts +0 -20
- package/dist/lib/syntax/color/srgb.d.ts +0 -23
- package/dist/lib/syntax/color/utils/components.d.ts +0 -2
- package/dist/lib/syntax/color/utils/distance.d.ts +0 -18
- package/dist/lib/syntax/color/utils/matrix.d.ts +0 -6
- package/dist/lib/syntax/color/xyz.d.ts +0 -5
- package/dist/lib/syntax/color/xyzd50.d.ts +0 -4
- package/dist/lib/syntax/constants.d.ts +0 -67
- package/dist/lib/syntax/syntax.d.ts +0 -38
- package/dist/lib/validation/config.d.ts +0 -14
- package/dist/lib/validation/json.d.ts +0 -2
- package/dist/lib/validation/match.d.ts +0 -38
- package/dist/lib/validation/parser/parse.d.ts +0 -8
- package/dist/lib/validation/parser/typedef.d.ts +0 -95
- package/dist/lib/validation/utils/list.d.ts +0 -4
- package/dist/lib/validation/utils/whitespace.d.ts +0 -2
- package/dist/node.d.ts +0 -207
- package/dist/web.d.ts +0 -169
- package/playground/index.html +0 -1328
- package/playground/sw.js +0 -55
- package/playground/tree.js +0 -176
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/token.d.ts";
|
|
2
|
-
export declare function rgb2cmykToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function hsl2cmykToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hwb2cmykToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function lab2cmykToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function lch2cmykToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function oklab2cmyk(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function oklch2cmykToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function color2cmykToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function srgb2cmykvalues(r: number, g: number, b: number, a?: number | null): number[];
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { ColorToken, IdentToken, NumberToken, PercentageToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function colorMix(colorSpace: IdentToken, hueInterpolationMethod: IdentToken | null, color1: ColorToken, percentage1: PercentageToken | NumberToken | null, color2: ColorToken, percentage2: PercentageToken | NumberToken | null): ColorToken | null;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { AngleToken, ColorToken, FractionToken, IdentToken, NumberToken, PercentageToken } from "../../../@types/index.d.ts";
|
|
2
|
-
import { ColorType } from "../../ast/types.ts";
|
|
3
|
-
/**
|
|
4
|
-
* Converts a color to another color space
|
|
5
|
-
* @param token
|
|
6
|
-
* @param to
|
|
7
|
-
*
|
|
8
|
-
* @private
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
*
|
|
12
|
-
* const token = {typ: EnumToken.ColorTokenType, kin: ColorType.HEX, val: '#F00'}
|
|
13
|
-
* const result = convertColor(token, ColorType.LCH);
|
|
14
|
-
*
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export declare function convertColor(token: ColorToken, to: ColorType): ColorToken | null;
|
|
18
|
-
export declare function hex2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
19
|
-
export declare function rgb2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
20
|
-
export declare function hsl2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
21
|
-
export declare function hwb2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
22
|
-
export declare function cmyk2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
23
|
-
export declare function lab2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
24
|
-
export declare function oklab2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
25
|
-
export declare function lch2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
26
|
-
export declare function oklch2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
27
|
-
export declare function color2colorToken(token: ColorToken, to: ColorType): ColorToken | null;
|
|
28
|
-
export declare function minmax(value: number, min: number, max: number): number;
|
|
29
|
-
export declare function color2srgbvalues(token: ColorToken): number[] | null;
|
|
30
|
-
/**
|
|
31
|
-
* clamp color values
|
|
32
|
-
* @param token
|
|
33
|
-
*/
|
|
34
|
-
export declare function clamp(token: ColorToken): ColorToken;
|
|
35
|
-
export declare function getNumber(token: NumberToken | PercentageToken | IdentToken | FractionToken): number;
|
|
36
|
-
/**
|
|
37
|
-
* convert angle to turn
|
|
38
|
-
* @param token
|
|
39
|
-
*/
|
|
40
|
-
export declare function getAngle(token: NumberToken | AngleToken | IdentToken): number;
|
|
41
|
-
export declare function toPrecisionValue(value: number): number;
|
|
42
|
-
export declare function toPrecisionAngle(angle: number): number;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function reduceHexValue(value: string): string;
|
|
3
|
-
export declare function expandHexValue(value: string): string;
|
|
4
|
-
export declare function rgb2HexToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function hsl2HexToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function cmyk2HexToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function hwb2HexToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function color2HexToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function oklab2HexToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function oklch2HexToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function lab2HexToken(token: ColorToken): ColorToken | null;
|
|
12
|
-
export declare function lch2HexToken(token: ColorToken): ColorToken | null;
|
|
13
|
-
export declare function rgb2hexvalues(token: ColorToken): string | null;
|
|
14
|
-
export declare function hsl2hexvalues(token: ColorToken): string | null;
|
|
15
|
-
export declare function hwb2hexvalues(token: ColorToken): string | null;
|
|
16
|
-
export declare function cmyk2hexvalues(token: ColorToken): string | null;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function hex2HslToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function rgb2HslToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hwb2HslToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function cmyk2HslToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function oklab2HslToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function oklch2HslToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function lab2HslToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function lch2HslToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function color2HslToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function rgb2hslvalues(token: ColorToken): number[] | null;
|
|
12
|
-
export declare function hsv2hsl(h: number, s: number, v: number, a?: number): number[];
|
|
13
|
-
export declare function cmyk2hslvalues(token: ColorToken): number[];
|
|
14
|
-
export declare function hwb2hslvalues(token: ColorToken): [number, number, number, number];
|
|
15
|
-
export declare function lab2hslvalues(token: ColorToken): number[] | null;
|
|
16
|
-
export declare function lch2hslvalues(token: ColorToken): number[] | null;
|
|
17
|
-
export declare function oklab2hslvalues(token: ColorToken): number[] | null;
|
|
18
|
-
export declare function oklch2hslvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function rgbvalues2hslvalues(r: number, g: number, b: number, a?: number | null): number[];
|
|
20
|
-
export declare function srgb2hslvalues(r: number, g: number, b: number, a?: number | null): number[];
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function rgb2hwbToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function hsl2hwbToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function cmyk2hwbToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function oklab2hwbToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function oklch2hwbToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function lab2hwbToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function lch2hwbToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function color2hwbToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function hwbToken(values: number[]): ColorToken;
|
|
11
|
-
export declare function rgb2hwbvalues(token: ColorToken): number[];
|
|
12
|
-
export declare function cmyk2hwbvalues(token: ColorToken): number[];
|
|
13
|
-
export declare function hsl2hwbvalues(token: ColorToken): number[];
|
|
14
|
-
export declare function lab2hwbvalues(token: ColorToken): number[] | null;
|
|
15
|
-
export declare function lch2hwbvalues(token: ColorToken): number[] | null;
|
|
16
|
-
export declare function oklab2hwbvalues(token: ColorToken): number[] | null;
|
|
17
|
-
export declare function oklch2hwbvalues(token: ColorToken): number[];
|
|
18
|
-
export declare function color2hwbvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function srgb2hwb(r: number, g: number, b: number, a?: number | null, fallback?: number): number[];
|
|
20
|
-
export declare function hsv2hwb(h: number, s: number, v: number, a?: number | null): number[];
|
|
21
|
-
export declare function hslvalues2hwbvalues(h: number, s: number, l: number, a?: number | null): number[];
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function hex2labToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function rgb2labToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hsl2labToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function hwb2labToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function cmyk2labToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function lch2labToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function oklab2labToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function oklch2labToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function color2labToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function hex2labvalues(token: ColorToken): number[] | null;
|
|
12
|
-
export declare function rgb2labvalues(token: ColorToken): number[] | null;
|
|
13
|
-
export declare function cmyk2labvalues(token: ColorToken): number[] | null;
|
|
14
|
-
export declare function hsl2labvalues(token: ColorToken): number[] | null;
|
|
15
|
-
export declare function hwb2labvalues(token: ColorToken): number[] | null;
|
|
16
|
-
export declare function lch2labvalues(token: ColorToken): number[] | null;
|
|
17
|
-
export declare function oklab2labvalues(token: ColorToken): number[] | null;
|
|
18
|
-
export declare function oklch2labvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function color2labvalues(token: ColorToken): number[] | null;
|
|
20
|
-
export declare function srgb2labvalues(r: number, g: number, b: number, a: number | null): number[];
|
|
21
|
-
export declare function xyz2lab(x: number, y: number, z: number, a?: number | null): number[];
|
|
22
|
-
export declare function lchvalues2labvalues(l: number, c: number, h: number, a?: number | null): number[];
|
|
23
|
-
export declare function getLABComponents(token: ColorToken): number[] | null;
|
|
24
|
-
export declare function Lab_to_sRGB(l: number, a: number, b: number): number[];
|
|
25
|
-
export declare function Lab_to_XYZ(l: number, a: number, b: number): number[];
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function hex2lchToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function rgb2lchToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hsl2lchToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function hwb2lchToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function cmyk2lchToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function lab2lchToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function oklab2lchToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function oklch2lchToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function color2lchToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function hex2lchvalues(token: ColorToken): number[] | null;
|
|
12
|
-
export declare function rgb2lchvalues(token: ColorToken): number[] | null;
|
|
13
|
-
export declare function hsl2lchvalues(token: ColorToken): number[] | null;
|
|
14
|
-
export declare function hwb2lchvalues(token: ColorToken): number[] | null;
|
|
15
|
-
export declare function lab2lchvalues(token: ColorToken): number[] | null;
|
|
16
|
-
export declare function srgb2lch(r: number, g: number, blue: number, alpha: number | null): number[];
|
|
17
|
-
export declare function oklab2lchvalues(token: ColorToken): number[] | null;
|
|
18
|
-
export declare function cmyk2lchvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function oklch2lchvalues(token: ColorToken): number[] | null;
|
|
20
|
-
export declare function color2lchvalues(token: ColorToken): number[] | null;
|
|
21
|
-
export declare function labvalues2lchvalues(l: number, a: number, b: number, alpha?: number | null): number[];
|
|
22
|
-
export declare function xyz2lchvalues(x: number, y: number, z: number, alpha?: number): number[];
|
|
23
|
-
export declare function getLCHComponents(token: ColorToken): number[] | null;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function hex2oklabToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function rgb2oklabToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hsl2oklabToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function hwb2oklabToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function cmyk2oklabToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function lab2oklabToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function lch2oklabToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function oklch2oklabToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function color2oklabToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function hex2oklabvalues(token: ColorToken): number[] | null;
|
|
12
|
-
export declare function rgb2oklabvalues(token: ColorToken): number[] | null;
|
|
13
|
-
export declare function hsl2oklabvalues(token: ColorToken): number[] | null;
|
|
14
|
-
export declare function hwb2oklabvalues(token: ColorToken): number[];
|
|
15
|
-
export declare function cmyk2oklabvalues(token: ColorToken): number[] | null;
|
|
16
|
-
export declare function lab2oklabvalues(token: ColorToken): number[] | null;
|
|
17
|
-
export declare function lch2oklabvalues(token: ColorToken): number[] | null;
|
|
18
|
-
export declare function oklch2oklabvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function srgb2oklab(r: number, g: number, blue: number, alpha: number | null): number[];
|
|
20
|
-
export declare function getOKLABComponents(token: ColorToken): number[] | null;
|
|
21
|
-
export declare function OKLab_to_XYZ(l: number, a: number, b: number, alpha?: number | null): number[];
|
|
22
|
-
export declare function OKLab_to_sRGB(l: number, a: number, b: number): number[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function hex2oklchToken(token: ColorToken): ColorToken | null;
|
|
3
|
-
export declare function rgb2oklchToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hsl2oklchToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function hwb2oklchToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function cmyk2oklchToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function lab2oklchToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function oklab2oklchToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function lch2oklchToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function color2oklchToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function hex2oklchvalues(token: ColorToken): number[];
|
|
12
|
-
export declare function rgb2oklchvalues(token: ColorToken): number[] | null;
|
|
13
|
-
export declare function hsl2oklchvalues(token: ColorToken): number[];
|
|
14
|
-
export declare function hwb2oklchvalues(token: ColorToken): number[];
|
|
15
|
-
export declare function cmyk2oklchvalues(token: ColorToken): number[];
|
|
16
|
-
export declare function lab2oklchvalues(token: ColorToken): number[] | null;
|
|
17
|
-
export declare function lch2oklchvalues(token: ColorToken): number[] | null;
|
|
18
|
-
export declare function oklab2oklchvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function srgb2oklch(r: number, g: number, blue: number, alpha: number | null): number[];
|
|
20
|
-
export declare function getOKLCHComponents(token: ColorToken): number[] | null;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare function p32srgbvalues(r: number, g: number, b: number, alpha?: number): number[];
|
|
2
|
-
export declare function srgb2p3values(r: number, g: number, b: number, alpha?: number): number[];
|
|
3
|
-
export declare function p32lp3(r: number, g: number, b: number, alpha?: number): number[];
|
|
4
|
-
export declare function lp32p3(r: number, g: number, b: number, alpha?: number): number[];
|
|
5
|
-
export declare function lp32xyz(r: number, g: number, b: number, alpha?: number): number[];
|
|
6
|
-
export declare function xyz2lp3(x: number, y: number, z: number, alpha?: number): number[];
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { BinaryExpressionToken, ColorToken, FunctionToken, ParensToken, Token } from "../../../@types/index.d.ts";
|
|
2
|
-
type RGBKeyType = "r" | "g" | "b" | "alpha";
|
|
3
|
-
type HSLKeyType = "h" | "s" | "l" | "alpha";
|
|
4
|
-
type HWBKeyType = "h" | "w" | "b" | "alpha";
|
|
5
|
-
type LABKeyType = "l" | "a" | "b" | "alpha";
|
|
6
|
-
type OKLABKeyType = "l" | "a" | "b" | "alpha";
|
|
7
|
-
type XYZKeyType = "x" | "y" | "z" | "alpha";
|
|
8
|
-
type LCHKeyType = "l" | "c" | "h" | "alpha";
|
|
9
|
-
type OKLCHKeyType = "l" | "c" | "h" | "alpha";
|
|
10
|
-
export type RelativeColorTypes = RGBKeyType | HSLKeyType | HWBKeyType | LABKeyType | OKLABKeyType | LCHKeyType | OKLCHKeyType | XYZKeyType;
|
|
11
|
-
export declare function parseRelativeColor(relativeKeys: string, original: ColorToken, rExp: Token, gExp: Token, bExp: Token, aExp: Token | null): Record<RelativeColorTypes, Token> | null;
|
|
12
|
-
export declare function replaceValue(parent: FunctionToken | ParensToken | BinaryExpressionToken, value: Token, newValue: Token): void;
|
|
13
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function srgb2rgb(value: number): number;
|
|
3
|
-
export declare function hex2RgbToken(token: ColorToken): ColorToken | null;
|
|
4
|
-
export declare function hsl2RgbToken(token: ColorToken): ColorToken | null;
|
|
5
|
-
export declare function hwb2RgbToken(token: ColorToken): ColorToken | null;
|
|
6
|
-
export declare function cmyk2RgbToken(token: ColorToken): ColorToken | null;
|
|
7
|
-
export declare function oklab2RgbToken(token: ColorToken): ColorToken | null;
|
|
8
|
-
export declare function oklch2RgbToken(token: ColorToken): ColorToken | null;
|
|
9
|
-
export declare function lab2RgbToken(token: ColorToken): ColorToken | null;
|
|
10
|
-
export declare function lch2RgbToken(token: ColorToken): ColorToken | null;
|
|
11
|
-
export declare function color2RgbToken(token: ColorToken): ColorToken | null;
|
|
12
|
-
export declare function hex2rgbvalues(token: ColorToken): number[];
|
|
13
|
-
export declare function hwb2rgbvalues(token: ColorToken): number[] | null;
|
|
14
|
-
export declare function hsl2rgbvalues(token: ColorToken): number[] | null;
|
|
15
|
-
export declare function hsl2srgbvalues(token: ColorToken): number[] | null;
|
|
16
|
-
export declare function cmyk2rgbvalues(token: ColorToken): number[] | null;
|
|
17
|
-
export declare function oklab2rgbvalues(token: ColorToken): number[] | null;
|
|
18
|
-
export declare function oklch2rgbvalues(token: ColorToken): number[] | null;
|
|
19
|
-
export declare function lab2rgbvalues(token: ColorToken): number[] | null;
|
|
20
|
-
export declare function lch2rgbvalues(token: ColorToken): number[] | null;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { ColorToken, IdentToken } from "../../../@types/index.d.ts";
|
|
2
|
-
export declare function srgbvalues(token: ColorToken | IdentToken): number[] | null;
|
|
3
|
-
export declare function rgb2srgb(token: ColorToken): number[] | null;
|
|
4
|
-
export declare function rgb2srgbvalues(token: ColorToken): number[] | null;
|
|
5
|
-
export declare function rgbvalues2srgbvalues(r: number, g: number, b: number, a?: number | null): number[] | null;
|
|
6
|
-
export declare function hex2srgbvalues(token: ColorToken): number[];
|
|
7
|
-
export declare function xyz2srgb(x: number, y: number, z: number, alpha?: number | null): number[];
|
|
8
|
-
export declare function hwb2srgbvalues(token: ColorToken): number[] | null;
|
|
9
|
-
export declare function hsl2srgb(token: ColorToken): number[] | null;
|
|
10
|
-
export declare function cmyk2srgbvalues(token: ColorToken): number[] | null;
|
|
11
|
-
export declare function oklab2srgbvalues(token: ColorToken): number[] | null;
|
|
12
|
-
export declare function oklch2srgbvalues(token: ColorToken): number[] | null;
|
|
13
|
-
export declare function hslvalues(token: ColorToken): {
|
|
14
|
-
h: number;
|
|
15
|
-
s: number;
|
|
16
|
-
l: number;
|
|
17
|
-
a?: number | null;
|
|
18
|
-
} | null;
|
|
19
|
-
export declare function hslvalues2srgbvalues(h: number, s: number, l: number, a?: number | null): number[];
|
|
20
|
-
export declare function lab2srgbvalues(token: ColorToken): number[] | null;
|
|
21
|
-
export declare function lch2srgbvalues(token: ColorToken): number[] | null;
|
|
22
|
-
export declare function srgb2lsrgbvalues(r: number, g: number, b: number, a?: number | null): number[];
|
|
23
|
-
export declare function lsrgb2srgbvalues(r: number, g: number, b: number, alpha?: number | null): number[];
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ColorToken } from "../../../../@types/index.d.ts";
|
|
2
|
-
/**
|
|
3
|
-
* Calculate the distance between two okLab colors.
|
|
4
|
-
* @param okLab1
|
|
5
|
-
* @param okLab2
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
*/
|
|
9
|
-
export declare function okLabDistance(okLab1: [number, number, number], okLab2: [number, number, number]): number;
|
|
10
|
-
/**
|
|
11
|
-
* Check if two colors are close in okLab space.
|
|
12
|
-
* @param color1
|
|
13
|
-
* @param color2
|
|
14
|
-
* @param threshold
|
|
15
|
-
*
|
|
16
|
-
* @private
|
|
17
|
-
*/
|
|
18
|
-
export declare function isOkLabClose(color1: ColorToken, color2: ColorToken, threshold?: number): boolean;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function lab2xyz(l: number, a: number, b: number, alpha?: number): number[];
|
|
2
|
-
export declare function XYZ_to_lin_sRGB(x: number, y: number, z: number, alpha?: number | null): number[];
|
|
3
|
-
export declare function XYZ_D50_to_D65(x: number, y: number, z: number): number[];
|
|
4
|
-
export declare function srgb2xyz(r: number, g: number, b: number, alpha?: number): number[];
|
|
5
|
-
export declare function srgb2xyz_d50(r: number, g: number, b: number, alpha?: number): number[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function srgb2xyzd50values(r: number, g: number, b: number, alpha?: number | null): number[];
|
|
2
|
-
export declare function xyzd502lch(x: number, y: number, z: number, alpha?: number): number[];
|
|
3
|
-
export declare function XYZ_D65_to_D50(x: number, y: number, z: number, alpha?: number | null): number[];
|
|
4
|
-
export declare function xyzd502srgb(x: number, y: number, z: number, alpha?: number | null): number[];
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { EnumToken } from "../ast/types.ts";
|
|
2
|
-
export declare const mFLT: Set<EnumToken>;
|
|
3
|
-
export declare const mFGT: Set<EnumToken>;
|
|
4
|
-
export declare const tokensMap: Map<EnumToken, EnumToken>;
|
|
5
|
-
export declare const urlTokenMatcher: RegExp;
|
|
6
|
-
export declare const tokensfuncDefMap: Map<EnumToken, EnumToken>;
|
|
7
|
-
export declare const tokensfuncSet: Set<EnumToken>;
|
|
8
|
-
export declare const colorPrecision = 6;
|
|
9
|
-
export declare const anglePrecision = 0.001;
|
|
10
|
-
export declare const colorRange: {
|
|
11
|
-
lab: {
|
|
12
|
-
l: number[];
|
|
13
|
-
a: number[];
|
|
14
|
-
b: number[];
|
|
15
|
-
};
|
|
16
|
-
lch: {
|
|
17
|
-
l: number[];
|
|
18
|
-
c: number[];
|
|
19
|
-
h: number[];
|
|
20
|
-
};
|
|
21
|
-
oklab: {
|
|
22
|
-
l: number[];
|
|
23
|
-
a: number[];
|
|
24
|
-
b: number[];
|
|
25
|
-
};
|
|
26
|
-
oklch: {
|
|
27
|
-
l: number[];
|
|
28
|
-
a: number[];
|
|
29
|
-
b: number[];
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export declare const wildCardFuncs: string[];
|
|
33
|
-
export declare const mathFuncs: string[];
|
|
34
|
-
export declare const mediaTypes: string[];
|
|
35
|
-
export declare const pageMarginBoxType: Set<string>;
|
|
36
|
-
export declare const urlFunc: string[];
|
|
37
|
-
export declare const timelineFunc: string[];
|
|
38
|
-
export declare const gridTemplateFunc: string[];
|
|
39
|
-
export declare const generalEnclosedFunc: string[];
|
|
40
|
-
export declare const supportFunc: string[];
|
|
41
|
-
export declare const whenElseFunc: string[];
|
|
42
|
-
export declare const containerFunc: string[];
|
|
43
|
-
export declare const timingFunc: string[];
|
|
44
|
-
export declare const colorsFunc: string[];
|
|
45
|
-
export declare const imageFunc: string[];
|
|
46
|
-
export declare const transformFunctions: string[];
|
|
47
|
-
export declare const funcLike: EnumToken[];
|
|
48
|
-
export declare const colorFuncColorSpace: string[];
|
|
49
|
-
export declare const D50: number[];
|
|
50
|
-
export declare const k: number;
|
|
51
|
-
export declare const e: number;
|
|
52
|
-
export declare const nonStandardColors: Set<string>;
|
|
53
|
-
export declare const systemColors: Set<string>;
|
|
54
|
-
export declare const deprecatedSystemColors: Set<string>;
|
|
55
|
-
export declare const COLORS_NAMES: {
|
|
56
|
-
[key: string]: string;
|
|
57
|
-
};
|
|
58
|
-
export declare const NAMES_COLORS: {
|
|
59
|
-
[key: string]: string;
|
|
60
|
-
};
|
|
61
|
-
export declare const trimTokenSpace: Set<EnumToken>;
|
|
62
|
-
export declare const definedPropertySettings: {
|
|
63
|
-
configurable: boolean;
|
|
64
|
-
enumerable: boolean;
|
|
65
|
-
writable: boolean;
|
|
66
|
-
};
|
|
67
|
-
export declare const combinators: string[];
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { AngleToken, DimensionToken, ErrorDescription, FlexToken, FrequencyToken, LengthToken, ResolutionToken, TimeToken, Token } from "../../@types/index.d.ts";
|
|
2
|
-
export declare const dimensionUnits: Set<string>;
|
|
3
|
-
export declare const pseudoElements: string[];
|
|
4
|
-
export declare const pseudoAliasMap: Record<string, string>;
|
|
5
|
-
export declare const webkitExtensions: Set<string>;
|
|
6
|
-
export declare const mozExtensions: Set<string>;
|
|
7
|
-
export declare const renamedStandardProperties: Map<string, string>;
|
|
8
|
-
export declare function isLength(dimension: DimensionToken): boolean;
|
|
9
|
-
export declare function isResolution(dimension: DimensionToken): boolean;
|
|
10
|
-
export declare function isAngle(dimension: DimensionToken): boolean;
|
|
11
|
-
export declare function isTime(dimension: DimensionToken): boolean;
|
|
12
|
-
export declare function isFrequency(dimension: DimensionToken): boolean;
|
|
13
|
-
export declare function isColorspace(token: Token): boolean;
|
|
14
|
-
export declare function isRectangularOrthogonalColorspace(token: Token): boolean;
|
|
15
|
-
export declare function isPolarColorspace(token: Token): boolean;
|
|
16
|
-
export declare function isHueInterpolationMethod(token: Token | Token[]): boolean;
|
|
17
|
-
export declare function isIdentColor(token: Token): boolean;
|
|
18
|
-
export declare function isPercentageToken(token: Token): boolean;
|
|
19
|
-
export declare function isColor(token: Token, errors?: ErrorDescription[]): boolean;
|
|
20
|
-
export declare function parseColor(token: Token): Token;
|
|
21
|
-
export declare function isLetter(codepoint: number): boolean;
|
|
22
|
-
export declare function isIdentStart(codepoint: number): boolean;
|
|
23
|
-
export declare function isDigit(codepoint: number): boolean;
|
|
24
|
-
export declare function isIdentCodepoint(codepoint: number): boolean;
|
|
25
|
-
export declare function isIdent(name: string): boolean;
|
|
26
|
-
export declare function isNonPrintable(codepoint: number): boolean;
|
|
27
|
-
export declare function isPseudo(name: string): boolean;
|
|
28
|
-
export declare function isHash(name: string): boolean;
|
|
29
|
-
export declare function isNumber(name: string): boolean;
|
|
30
|
-
export declare function isPercentage(name: string): boolean;
|
|
31
|
-
export declare function isFlex(dimension: DimensionToken): boolean;
|
|
32
|
-
export declare function parseDimension(name: string): DimensionToken | LengthToken | AngleToken | FlexToken | TimeToken | ResolutionToken | FrequencyToken | null;
|
|
33
|
-
export declare function isHexColor(name: string): boolean;
|
|
34
|
-
export declare function isFunction(name: string): boolean;
|
|
35
|
-
export declare function isAtKeyword(name: string): boolean;
|
|
36
|
-
export declare function isNewLine(codepoint: number): boolean;
|
|
37
|
-
export declare function isWhiteSpace(codepoint: number): boolean;
|
|
38
|
-
export declare function isValue(token: Token): boolean;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ValidationConfiguration } from "../../@types/validation.d.ts";
|
|
2
|
-
import type { ValidationToken } from "./parser/types.d.ts";
|
|
3
|
-
export interface ValidationSyntaxRule {
|
|
4
|
-
acceptAnyDeclarations: boolean;
|
|
5
|
-
acceptAnyRules: boolean;
|
|
6
|
-
getRules: () => ValidationToken[];
|
|
7
|
-
getBlockRules: () => ValidationToken[] | null;
|
|
8
|
-
getPreludeRules: () => ValidationToken[] | null;
|
|
9
|
-
getPropertyDescriptors: () => Record<string, ValidationToken[]> | null;
|
|
10
|
-
}
|
|
11
|
-
export declare function getSyntaxConfig(): ValidationConfiguration;
|
|
12
|
-
export declare const getSyntax: (...args: any[]) => any;
|
|
13
|
-
export declare const getParsedSyntax: (...args: any[]) => any;
|
|
14
|
-
export declare const getSyntaxRule: (...args: any[]) => any;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ErrorDescription, ParserOptions, Token, ValidationOptions } from "../../@types/index.d.ts";
|
|
2
|
-
import { EnumToken } from "../ast/types.ts";
|
|
3
|
-
import type { ValidationToken } from "./parser/types.d.ts";
|
|
4
|
-
import type { ValidationContext, ValidationMatch } from "./types.d.ts";
|
|
5
|
-
import type { ValidationMediaFeature } from "../../@types/validation.d.ts";
|
|
6
|
-
export declare const funcTypes: EnumToken[];
|
|
7
|
-
export declare function trimArray(tokens: Token[]): Token[];
|
|
8
|
-
export declare function isMFName(featureName: string): boolean;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param featureName
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
export declare function getMFInfo(featureName: string): ValidationMediaFeature | null;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @param featureName
|
|
18
|
-
* @param tokens
|
|
19
|
-
* @returns object with:
|
|
20
|
-
* - valid: boolean. true the media feaure is known or is a custom property. false otherwise
|
|
21
|
-
* - success: boolean. validation result
|
|
22
|
-
*/
|
|
23
|
-
export declare function isMFValue(featureName: string, tokens: Token[], isMFRange?: boolean): {
|
|
24
|
-
valid: boolean;
|
|
25
|
-
success: boolean;
|
|
26
|
-
isValueAllowed?: boolean;
|
|
27
|
-
};
|
|
28
|
-
export declare function isStyleRangeValue(tokens: Token[]): {
|
|
29
|
-
success: boolean;
|
|
30
|
-
errors: ErrorDescription[];
|
|
31
|
-
};
|
|
32
|
-
export declare function createValidationContext(tokens: Token[]): ValidationContext;
|
|
33
|
-
export declare function matchSelectorSyntax(stream: Token[], errors: ErrorDescription[], options: ParserOptions | ValidationOptions, nested?: boolean): {
|
|
34
|
-
success: boolean;
|
|
35
|
-
errors: ErrorDescription[];
|
|
36
|
-
};
|
|
37
|
-
export declare function matchAllSyntax(syntaxes: ValidationToken[] | null, context: ValidationContext, options: ParserOptions): ValidationMatch;
|
|
38
|
-
export declare function matchOccurenceSyntax(syntax: ValidationToken, context: ValidationContext, options: ValidationOptions | ParserOptions): ValidationMatch;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Position, ValidationToken } from "./types.d.ts";
|
|
2
|
-
export declare function trimSyntaxArray(tokens: ValidationToken[]): ValidationToken[];
|
|
3
|
-
export declare function tokenizeSyntax(syntax: string, position?: Position, currentPosition?: Position): Generator<ValidationToken>;
|
|
4
|
-
export declare function parseSyntax(syntax: string): ValidationToken[];
|
|
5
|
-
export declare function renderSyntax(token: ValidationToken, options?: {
|
|
6
|
-
minify?: boolean;
|
|
7
|
-
indent?: number;
|
|
8
|
-
}): string;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
export declare enum ValidationTokenEnum {
|
|
2
|
-
Root = 0,
|
|
3
|
-
Keyword = 1,
|
|
4
|
-
PropertyType = 2,
|
|
5
|
-
DeclarationType = 3,
|
|
6
|
-
AtRule = 4,
|
|
7
|
-
FunctionDefinition = 5,
|
|
8
|
-
OpenBracket = 6,
|
|
9
|
-
CloseBracket = 7,
|
|
10
|
-
OpenParenthesis = 8,
|
|
11
|
-
CloseParenthesis = 9,
|
|
12
|
-
Comma = 10,
|
|
13
|
-
Pipe = 11,
|
|
14
|
-
Column = 12,
|
|
15
|
-
Star = 13,
|
|
16
|
-
OpenCurlyBrace = 14,
|
|
17
|
-
CloseCurlyBrace = 15,
|
|
18
|
-
HashMark = 16,
|
|
19
|
-
QuestionMark = 17,
|
|
20
|
-
Function = 18,
|
|
21
|
-
Number = 19,
|
|
22
|
-
Whitespace = 20,
|
|
23
|
-
Parenthesis = 21,
|
|
24
|
-
Bracket = 22,
|
|
25
|
-
Block = 23,
|
|
26
|
-
Plus = 24,
|
|
27
|
-
Separator = 25,
|
|
28
|
-
Exclamation = 26,
|
|
29
|
-
Ampersand = 27,
|
|
30
|
-
PipeToken = 28,
|
|
31
|
-
ColumnToken = 29,
|
|
32
|
-
AmpersandToken = 30,
|
|
33
|
-
Parens = 31,
|
|
34
|
-
PseudoClassToken = 32,
|
|
35
|
-
PseudoClassFunctionToken = 33,
|
|
36
|
-
StringToken = 34,
|
|
37
|
-
AtRuleDefinition = 35,
|
|
38
|
-
DeclarationNameToken = 36,
|
|
39
|
-
DeclarationDefinitionToken = 37,
|
|
40
|
-
SemiColon = 38,
|
|
41
|
-
Character = 39,
|
|
42
|
-
InfinityToken = 40,
|
|
43
|
-
LessThan = 41,
|
|
44
|
-
GreaterThan = 42,
|
|
45
|
-
/**
|
|
46
|
-
* end of token stream
|
|
47
|
-
*/
|
|
48
|
-
EOF = 43,
|
|
49
|
-
/**
|
|
50
|
-
* optional group or tokens, used to group validation tokens
|
|
51
|
-
*
|
|
52
|
-
* ```ts
|
|
53
|
-
* // <bg-layer>#? , <final-bg-layer> -> [<bg-layer>#? ,]? <final-bg-layer>
|
|
54
|
-
* // , <angular-color-stop> ]#? -> [, <angular-color-stop> ]#?]?
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
OptionalGroupToken = 44,
|
|
58
|
-
/**
|
|
59
|
-
* dimension token
|
|
60
|
-
*
|
|
61
|
-
* ```ts
|
|
62
|
-
* // <time [0s,∞]> -> {
|
|
63
|
-
* // typ: ValidationTokenEnum.PropertyType
|
|
64
|
-
* // val: 'time',
|
|
65
|
-
* // range: {
|
|
66
|
-
* // min: ValidationNumberToken,
|
|
67
|
-
* // max: null | ValidationNumberToken | ValidationInfinityToken
|
|
68
|
-
* // }
|
|
69
|
-
* // }
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
Dimension = 45,
|
|
73
|
-
DisallowWhitespace = 46,
|
|
74
|
-
Colon = 47
|
|
75
|
-
}
|
|
76
|
-
export declare enum ValidationSyntaxGroupEnum {
|
|
77
|
-
Declarations = "declarations",
|
|
78
|
-
Functions = "functions",
|
|
79
|
-
Syntaxes = "syntaxes",
|
|
80
|
-
Selectors = "selectors",
|
|
81
|
-
AtRules = "atRules",
|
|
82
|
-
Units = "units",
|
|
83
|
-
Languages = "languages",
|
|
84
|
-
mediaFeatures = "mediaFeatures"
|
|
85
|
-
}
|
|
86
|
-
export declare enum MediaFeatureType {
|
|
87
|
-
BooleanType = "boolean",
|
|
88
|
-
IntergerType = "integer",
|
|
89
|
-
KeywordType = "keyword",
|
|
90
|
-
LengthType = "length",
|
|
91
|
-
NumberType = "number",
|
|
92
|
-
RatioType = "ratio",
|
|
93
|
-
ResolutionType = "resolution",
|
|
94
|
-
StringType = "string"
|
|
95
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { EnumToken } from "../../ast/types.ts";
|
|
2
|
-
import type { Token } from "../../../@types/index.d.ts";
|
|
3
|
-
export declare function stripCommaToken(tokenList: Token[]): Token[] | null;
|
|
4
|
-
export declare function splitTokenList(tokenList: Token[], split?: EnumToken[], includeSplitToken?: boolean): Token[][];
|