@tbela99/css-parser 1.4.1 → 1.4.3
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/.nyc_output/4874b20e-6f53-4d7a-be5a-cf68316925f2.json +1 -0
- package/.nyc_output/6193bc4c-6f5f-4898-8950-c628825e6342.json +1 -0
- package/.nyc_output/processinfo/4874b20e-6f53-4d7a-be5a-cf68316925f2.json +1 -0
- package/.nyc_output/processinfo/6193bc4c-6f5f-4898-8950-c628825e6342.json +1 -0
- package/.repl_history +4 -0
- package/CHANGELOG.md +168 -4
- package/README.md +82 -0
- package/badges/coverage.svg +20 -0
- package/deno.lock +2861 -0
- package/dist/config.json.js +33 -1
- package/dist/index-umd-web.js +24393 -18479
- package/dist/index.cjs +27430 -21519
- package/dist/index.d.ts +1403 -933
- package/dist/lib/ast/clone.d.ts +10 -0
- package/dist/lib/ast/clone.js +45 -0
- package/dist/lib/ast/expand.d.ts +14 -0
- package/dist/lib/ast/expand.js +89 -64
- package/dist/lib/ast/features/calc.d.ts +10 -0
- package/dist/lib/ast/features/calc.js +62 -24
- package/dist/lib/ast/features/if.d.ts +10 -0
- package/dist/lib/ast/features/if.js +215 -0
- package/dist/lib/ast/features/index.d.ts +6 -0
- package/dist/lib/ast/features/index.js +1 -0
- package/dist/lib/ast/features/inlinecssvariables.d.ts +15 -0
- package/dist/lib/ast/features/inlinecssvariables.js +32 -27
- package/dist/lib/ast/features/prefix.d.ts +8 -0
- package/dist/lib/ast/features/prefix.js +68 -43
- package/dist/lib/ast/features/shorthand.d.ts +12 -0
- package/dist/lib/ast/features/shorthand.js +6 -9
- package/dist/lib/ast/features/transform.d.ts +10 -0
- package/dist/lib/ast/features/transform.js +9 -13
- package/dist/lib/ast/features/type.d.ts +15 -0
- package/dist/lib/ast/find.d.ts +165 -0
- package/dist/lib/ast/find.js +175 -0
- package/dist/lib/ast/math/expression.d.ts +18 -0
- package/dist/lib/ast/math/expression.js +140 -98
- package/dist/lib/ast/math/math.d.ts +6 -0
- package/dist/lib/ast/math/math.js +30 -41
- package/dist/lib/ast/minify.d.ts +19 -0
- package/dist/lib/ast/minify.js +543 -215
- package/dist/lib/ast/transform/compute.d.ts +8 -0
- package/dist/lib/ast/transform/compute.js +82 -69
- package/dist/lib/ast/transform/matrix.d.ts +22 -0
- package/dist/lib/ast/transform/matrix.js +12 -26
- package/dist/lib/ast/transform/minify.d.ts +5 -0
- package/dist/lib/ast/transform/minify.js +20 -20
- package/dist/lib/ast/transform/perspective.d.ts +3 -0
- package/dist/lib/ast/transform/perspective.js +1 -1
- package/dist/lib/ast/transform/rotate.d.ts +12 -0
- package/dist/lib/ast/transform/rotate.js +1 -1
- package/dist/lib/ast/transform/scale.d.ts +6 -0
- package/dist/lib/ast/transform/scale.js +1 -1
- package/dist/lib/ast/transform/skew.d.ts +4 -0
- package/dist/lib/ast/transform/skew.js +1 -1
- package/dist/lib/ast/transform/translate.d.ts +6 -0
- package/dist/lib/ast/transform/translate.js +1 -1
- package/dist/lib/ast/transform/utils.d.ts +9 -0
- package/dist/lib/ast/types.d.ts +903 -0
- package/dist/lib/ast/types.js +277 -23
- package/dist/lib/ast/walk.d.ts +162 -0
- package/dist/lib/ast/walk.js +116 -60
- package/dist/lib/fs/resolve.d.ts +20 -0
- package/dist/lib/fs/resolve.js +37 -45
- package/dist/lib/parser/declaration/list.d.ts +16 -0
- package/dist/lib/parser/declaration/list.js +26 -24
- package/dist/lib/parser/declaration/map.d.ts +15 -0
- package/dist/lib/parser/declaration/map.js +140 -95
- package/dist/lib/parser/declaration/set.d.ts +9 -0
- package/dist/lib/parser/declaration/set.js +30 -25
- package/dist/lib/parser/node.d.ts +7 -0
- package/dist/lib/parser/parse.d.ts +107 -0
- package/dist/lib/parser/parse.js +1454 -1445
- package/dist/lib/parser/tokenize.d.ts +57 -0
- package/dist/lib/parser/tokenize.js +557 -404
- package/dist/lib/parser/utils/at-rule-container.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-container.js +486 -0
- package/dist/lib/parser/utils/at-rule-font-feature-values.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-font-feature-values.js +13 -0
- package/dist/lib/parser/utils/at-rule-generic.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-generic.js +118 -0
- package/dist/lib/parser/utils/at-rule-import.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-import.js +393 -0
- package/dist/lib/parser/utils/at-rule-media.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-media.js +603 -0
- package/dist/lib/parser/utils/at-rule-page.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-page.js +28 -0
- package/dist/lib/parser/utils/at-rule-support.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-support.js +366 -0
- package/dist/lib/parser/utils/at-rule-token.d.ts +1 -0
- package/dist/lib/parser/utils/at-rule-when-else.d.ts +5 -0
- package/dist/lib/parser/utils/at-rule-when-else.js +363 -0
- package/dist/lib/parser/utils/at-rule.d.ts +13 -0
- package/dist/lib/parser/utils/at-rule.js +37 -0
- package/dist/lib/parser/utils/cache.d.ts +6 -0
- package/dist/lib/parser/utils/cache.js +19 -0
- package/dist/lib/parser/utils/config.d.ts +2 -0
- package/dist/lib/parser/utils/config.js +1 -0
- package/dist/lib/parser/utils/declaration-list.d.ts +5 -0
- package/dist/lib/parser/utils/declaration.d.ts +18 -0
- package/dist/lib/parser/utils/declaration.js +569 -91
- package/dist/lib/parser/utils/eq.d.ts +1 -0
- package/dist/lib/parser/utils/hash.d.ts +21 -0
- package/dist/lib/parser/utils/hash.js +1 -1
- package/dist/lib/parser/utils/selector.d.ts +5 -0
- package/dist/lib/parser/utils/selector.js +476 -0
- package/dist/lib/parser/utils/text.d.ts +3 -0
- package/dist/lib/parser/utils/text.js +17 -1
- package/dist/lib/parser/utils/token.d.ts +14 -0
- package/dist/lib/parser/utils/token.js +102 -0
- package/dist/lib/parser/utils/type.d.ts +2 -0
- package/dist/lib/parser/utils/type.js +29 -18
- package/dist/lib/renderer/render.d.ts +28 -0
- package/dist/lib/renderer/render.js +421 -262
- package/dist/lib/renderer/sourcemap/lib/encode.d.ts +1 -0
- package/dist/lib/renderer/sourcemap/sourcemap.d.ts +26 -0
- package/dist/lib/renderer/sourcemap/sourcemap.js +17 -7
- package/dist/lib/syntax/color/a98rgb.d.ts +2 -0
- package/dist/lib/syntax/color/a98rgb.js +8 -12
- package/dist/lib/syntax/color/cmyk.d.ts +10 -0
- package/dist/lib/syntax/color/cmyk.js +23 -21
- package/dist/lib/syntax/color/color-mix.d.ts +2 -0
- package/dist/lib/syntax/color/color-mix.js +88 -77
- package/dist/lib/syntax/color/color.d.ts +42 -0
- package/dist/lib/syntax/color/color.js +65 -68
- package/dist/lib/syntax/color/hex.d.ts +16 -0
- package/dist/lib/syntax/color/hex.js +27 -31
- package/dist/lib/syntax/color/hsl.d.ts +20 -0
- package/dist/lib/syntax/color/hsl.js +5 -12
- package/dist/lib/syntax/color/hsv.d.ts +2 -0
- package/dist/lib/syntax/color/hwb.d.ts +21 -0
- package/dist/lib/syntax/color/hwb.js +8 -21
- package/dist/lib/syntax/color/lab.d.ts +25 -0
- package/dist/lib/syntax/color/lab.js +20 -21
- package/dist/lib/syntax/color/lch.d.ts +23 -0
- package/dist/lib/syntax/color/lch.js +13 -15
- package/dist/lib/syntax/color/oklab.d.ts +22 -0
- package/dist/lib/syntax/color/oklab.js +20 -39
- package/dist/lib/syntax/color/oklch.d.ts +20 -0
- package/dist/lib/syntax/color/oklch.js +14 -16
- package/dist/lib/syntax/color/p3.d.ts +6 -0
- package/dist/lib/syntax/color/p3.js +0 -8
- package/dist/lib/syntax/color/prophotorgb.d.ts +2 -0
- package/dist/lib/syntax/color/rec2020.d.ts +2 -0
- package/dist/lib/syntax/color/rec2020.js +9 -13
- package/dist/lib/syntax/color/relativecolor.d.ts +13 -0
- package/dist/lib/syntax/color/relativecolor.js +68 -41
- package/dist/lib/syntax/color/rgb.d.ts +20 -0
- package/dist/lib/syntax/color/rgb.js +14 -18
- package/dist/lib/syntax/color/srgb.d.ts +23 -0
- package/dist/lib/syntax/color/srgb.js +27 -26
- package/dist/lib/syntax/color/utils/components.d.ts +2 -0
- package/dist/lib/syntax/color/utils/components.js +30 -14
- package/dist/lib/syntax/color/utils/distance.d.ts +18 -0
- package/dist/lib/syntax/color/utils/distance.js +1 -8
- package/dist/lib/syntax/color/utils/matrix.d.ts +6 -0
- package/dist/lib/syntax/color/xyz.d.ts +5 -0
- package/dist/lib/syntax/color/xyz.js +8 -20
- package/dist/lib/syntax/color/xyzd50.d.ts +4 -0
- package/dist/lib/syntax/color/xyzd50.js +6 -20
- package/dist/lib/syntax/constants.d.ts +67 -0
- package/dist/lib/syntax/constants.js +436 -0
- package/dist/lib/syntax/syntax.d.ts +38 -0
- package/dist/lib/syntax/syntax.js +533 -568
- package/dist/lib/validation/config.d.ts +14 -0
- package/dist/lib/validation/config.js +72 -33
- package/dist/lib/validation/config.json.js +1159 -74
- package/dist/lib/validation/json.d.ts +2 -0
- package/dist/lib/validation/match.d.ts +38 -0
- package/dist/lib/validation/match.js +2985 -0
- package/dist/lib/validation/parser/parse.d.ts +8 -0
- package/dist/lib/validation/parser/parse.js +684 -935
- package/dist/lib/validation/parser/typedef.d.ts +95 -0
- package/dist/lib/validation/parser/typedef.js +100 -0
- package/dist/lib/validation/utils/list.d.ts +4 -0
- package/dist/lib/validation/utils/list.js +4 -11
- package/dist/lib/validation/utils/whitespace.d.ts +2 -0
- package/dist/lib/validation/utils/whitespace.js +2 -8
- package/dist/node.d.ts +207 -0
- package/dist/node.js +53 -47
- package/dist/web.d.ts +169 -0
- package/dist/web.js +50 -41
- package/package.json +18 -13
- package/playground/index.html +1328 -0
- package/playground/sw.js +55 -0
- package/playground/tree.js +176 -0
- package/dist/lib/syntax/color/utils/constants.js +0 -214
- package/dist/lib/syntax/utils.js +0 -70
- package/dist/lib/validation/at-rules/container.js +0 -342
- package/dist/lib/validation/at-rules/counter-style.js +0 -90
- package/dist/lib/validation/at-rules/custom-media.js +0 -50
- package/dist/lib/validation/at-rules/document.js +0 -89
- package/dist/lib/validation/at-rules/else.js +0 -5
- package/dist/lib/validation/at-rules/font-feature-values.js +0 -63
- package/dist/lib/validation/at-rules/import.js +0 -150
- package/dist/lib/validation/at-rules/keyframes.js +0 -67
- package/dist/lib/validation/at-rules/layer.js +0 -41
- package/dist/lib/validation/at-rules/media.js +0 -255
- package/dist/lib/validation/at-rules/namespace.js +0 -81
- package/dist/lib/validation/at-rules/page-margin-box.js +0 -64
- package/dist/lib/validation/at-rules/page.js +0 -100
- package/dist/lib/validation/at-rules/supports.js +0 -295
- package/dist/lib/validation/at-rules/when.js +0 -185
- package/dist/lib/validation/atrule.js +0 -184
- package/dist/lib/validation/selector.js +0 -36
- package/dist/lib/validation/syntax.js +0 -1073
- package/dist/lib/validation/syntaxes/complex-selector-list.js +0 -27
- package/dist/lib/validation/syntaxes/complex-selector.js +0 -52
- package/dist/lib/validation/syntaxes/compound-selector.js +0 -196
- package/dist/lib/validation/syntaxes/family-name.js +0 -57
- package/dist/lib/validation/syntaxes/keyframe-selector.js +0 -36
- package/dist/lib/validation/syntaxes/layer-name.js +0 -57
- package/dist/lib/validation/syntaxes/relative-selector-list.js +0 -31
- package/dist/lib/validation/syntaxes/relative-selector.js +0 -38
- package/dist/lib/validation/syntaxes/selector-list.js +0 -5
- package/dist/lib/validation/syntaxes/selector.js +0 -5
- package/dist/lib/validation/syntaxes/url.js +0 -40
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { e, k, D50 } from '
|
|
1
|
+
import { e, k, D50 } from '../constants.js';
|
|
2
2
|
import { getComponents } from './utils/components.js';
|
|
3
|
-
import {
|
|
4
|
-
import { getOKLABComponents, OKLab_to_XYZ } from './oklab.js';
|
|
5
|
-
import { EnumToken, ColorType } from '../../ast/types.js';
|
|
6
|
-
import '../../ast/minify.js';
|
|
7
|
-
import '../../ast/walk.js';
|
|
8
|
-
import '../../parser/parse.js';
|
|
9
|
-
import '../../parser/tokenize.js';
|
|
10
|
-
import '../../parser/utils/config.js';
|
|
3
|
+
import { srgb2xyz_d50, XYZ_D50_to_D65 } from './xyz.js';
|
|
11
4
|
import { oklch2srgbvalues, cmyk2srgbvalues, hwb2srgbvalues, hsl2srgb, rgb2srgb, hex2srgbvalues, xyz2srgb } from './srgb.js';
|
|
12
5
|
import { getLCHComponents } from './lch.js';
|
|
13
|
-
import {
|
|
6
|
+
import { getOKLABComponents, OKLab_to_XYZ } from './oklab.js';
|
|
7
|
+
import { color2srgbvalues, toPrecisionValue, getNumber } from './color.js';
|
|
8
|
+
import { EnumToken, ColorType } from '../../ast/types.js';
|
|
14
9
|
import { XYZ_D65_to_D50 } from './xyzd50.js';
|
|
15
|
-
import '../../renderer/sourcemap/lib/encode.js';
|
|
16
10
|
|
|
17
11
|
function hex2labToken(token) {
|
|
18
12
|
const values = hex2labvalues(token);
|
|
@@ -81,16 +75,16 @@ function labToken(values) {
|
|
|
81
75
|
{ typ: EnumToken.NumberTokenType, val: toPrecisionValue(values[2]) },
|
|
82
76
|
];
|
|
83
77
|
if (values.length == 4) {
|
|
84
|
-
chi.push({ typ: EnumToken.LiteralTokenType, val:
|
|
78
|
+
chi.push({ typ: EnumToken.LiteralTokenType, val: "/" }, {
|
|
85
79
|
typ: EnumToken.PercentageTokenType,
|
|
86
|
-
val: values[3] * 100
|
|
80
|
+
val: values[3] * 100,
|
|
87
81
|
});
|
|
88
82
|
}
|
|
89
83
|
return {
|
|
90
84
|
typ: EnumToken.ColorTokenType,
|
|
91
|
-
val:
|
|
85
|
+
val: "lab",
|
|
92
86
|
chi,
|
|
93
|
-
kin: ColorType.LAB
|
|
87
|
+
kin: ColorType.LAB,
|
|
94
88
|
};
|
|
95
89
|
}
|
|
96
90
|
// L: 0% = 0.0, 100% = 100.0
|
|
@@ -177,11 +171,11 @@ function xyz2lab(x, y, z, a = null) {
|
|
|
177
171
|
// compute xyz, which is XYZ scaled relative to reference white
|
|
178
172
|
const xyz = [x, y, z].map((value, i) => value / D50[i]);
|
|
179
173
|
// now compute f
|
|
180
|
-
const f = xyz.map((value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116);
|
|
174
|
+
const f = xyz.map((value) => (value > e ? Math.cbrt(value) : (k * value + 16) / 116));
|
|
181
175
|
const result = [
|
|
182
|
-
|
|
176
|
+
116 * f[1] - 16, // L
|
|
183
177
|
500 * (f[0] - f[1]), // a
|
|
184
|
-
200 * (f[1] - f[2]) // b
|
|
178
|
+
200 * (f[1] - f[2]), // b
|
|
185
179
|
];
|
|
186
180
|
// L in range [0,100]. For use in CSS, add a percent
|
|
187
181
|
if (a != null && a != 1) {
|
|
@@ -191,7 +185,7 @@ function xyz2lab(x, y, z, a = null) {
|
|
|
191
185
|
}
|
|
192
186
|
function lchvalues2labvalues(l, c, h, a = null) {
|
|
193
187
|
// l, c * Math.cos(360 * h * Math.PI / 180), c * Math.sin(360 * h * Math.PI / 180
|
|
194
|
-
const result = [l, c * Math.cos(h * Math.PI / 180), c * Math.sin(h * Math.PI / 180)];
|
|
188
|
+
const result = [l, c * Math.cos((h * Math.PI) / 180), c * Math.sin((h * Math.PI) / 180)];
|
|
195
189
|
if (a != null) {
|
|
196
190
|
result.push(a);
|
|
197
191
|
}
|
|
@@ -203,7 +197,12 @@ function getLABComponents(token) {
|
|
|
203
197
|
return null;
|
|
204
198
|
}
|
|
205
199
|
for (let i = 0; i < components.length; i++) {
|
|
206
|
-
if (![
|
|
200
|
+
if (![
|
|
201
|
+
EnumToken.NumberTokenType,
|
|
202
|
+
EnumToken.PercentageTokenType,
|
|
203
|
+
EnumToken.AngleTokenType,
|
|
204
|
+
EnumToken.IdenTokenType,
|
|
205
|
+
].includes(components[i].typ)) {
|
|
207
206
|
return null;
|
|
208
207
|
}
|
|
209
208
|
}
|
|
@@ -253,7 +252,7 @@ function Lab_to_XYZ(l, a, b) {
|
|
|
253
252
|
const xyz = [
|
|
254
253
|
Math.pow(f[0], 3) > e ? Math.pow(f[0], 3) : (116 * f[0] - 16) / k,
|
|
255
254
|
l > k * e ? Math.pow((l + 16) / 116, 3) : l / k,
|
|
256
|
-
Math.pow(f[2], 3) > e ? Math.pow(f[2], 3) : (116 * f[2] - 16) / k
|
|
255
|
+
Math.pow(f[2], 3) > e ? Math.pow(f[2], 3) : (116 * f[2] - 16) / k,
|
|
257
256
|
];
|
|
258
257
|
// Compute XYZ by scaling xyz by reference white
|
|
259
258
|
return xyz.map((value, i) => value * D50[i]);
|
|
@@ -0,0 +1,23 @@
|
|
|
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,15 +1,8 @@
|
|
|
1
|
-
import './utils/constants.js';
|
|
2
1
|
import { getComponents } from './utils/components.js';
|
|
3
2
|
import { color2srgbvalues, toPrecisionAngle, toPrecisionValue, getNumber, getAngle } from './color.js';
|
|
4
|
-
import { cmyk2srgbvalues } from './srgb.js';
|
|
5
3
|
import { EnumToken, ColorType } from '../../ast/types.js';
|
|
6
|
-
import '../../ast/minify.js';
|
|
7
|
-
import '../../ast/walk.js';
|
|
8
|
-
import '../../parser/parse.js';
|
|
9
|
-
import '../../parser/tokenize.js';
|
|
10
|
-
import '../../parser/utils/config.js';
|
|
11
4
|
import { srgb2labvalues, xyz2lab, oklch2labvalues, oklab2labvalues, getLABComponents, hwb2labvalues, hsl2labvalues, rgb2labvalues, hex2labvalues } from './lab.js';
|
|
12
|
-
import '
|
|
5
|
+
import { cmyk2srgbvalues } from './srgb.js';
|
|
13
6
|
|
|
14
7
|
function hex2lchToken(token) {
|
|
15
8
|
const values = hex2lchvalues(token);
|
|
@@ -82,16 +75,16 @@ function lchToken(values) {
|
|
|
82
75
|
{ typ: EnumToken.NumberTokenType, val: values[2] },
|
|
83
76
|
];
|
|
84
77
|
if (values.length == 4) {
|
|
85
|
-
chi.push({ typ: EnumToken.LiteralTokenType, val:
|
|
78
|
+
chi.push({ typ: EnumToken.LiteralTokenType, val: "/" }, {
|
|
86
79
|
typ: EnumToken.PercentageTokenType,
|
|
87
|
-
val: values[3] * 100
|
|
80
|
+
val: values[3] * 100,
|
|
88
81
|
});
|
|
89
82
|
}
|
|
90
83
|
return {
|
|
91
84
|
typ: EnumToken.ColorTokenType,
|
|
92
|
-
val:
|
|
85
|
+
val: "lch",
|
|
93
86
|
chi,
|
|
94
|
-
kin: ColorType.LCH
|
|
87
|
+
kin: ColorType.LCH,
|
|
95
88
|
};
|
|
96
89
|
}
|
|
97
90
|
function hex2lchvalues(token) {
|
|
@@ -151,11 +144,11 @@ function color2lchvalues(token) {
|
|
|
151
144
|
}
|
|
152
145
|
function labvalues2lchvalues(l, a, b, alpha = null) {
|
|
153
146
|
let c = Math.sqrt(a * a + b * b);
|
|
154
|
-
let h = Math.atan2(b, a) * 180 / Math.PI;
|
|
147
|
+
let h = (Math.atan2(b, a) * 180) / Math.PI;
|
|
155
148
|
if (h < 0) {
|
|
156
149
|
h += 360;
|
|
157
150
|
}
|
|
158
|
-
if (c < .0001) {
|
|
151
|
+
if (c < 0.0001) {
|
|
159
152
|
c = h = 0;
|
|
160
153
|
}
|
|
161
154
|
return alpha == null ? [l, c, h] : [l, c, h, alpha];
|
|
@@ -171,7 +164,12 @@ function getLCHComponents(token) {
|
|
|
171
164
|
return null;
|
|
172
165
|
}
|
|
173
166
|
for (let i = 0; i < components.length; i++) {
|
|
174
|
-
if (![
|
|
167
|
+
if (![
|
|
168
|
+
EnumToken.NumberTokenType,
|
|
169
|
+
EnumToken.PercentageTokenType,
|
|
170
|
+
EnumToken.AngleTokenType,
|
|
171
|
+
EnumToken.IdenTokenType,
|
|
172
|
+
].includes(components[i].typ)) {
|
|
175
173
|
return null;
|
|
176
174
|
}
|
|
177
175
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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,17 +1,10 @@
|
|
|
1
|
-
import { multiplyMatrices } from './utils/matrix.js';
|
|
2
|
-
import './utils/constants.js';
|
|
3
1
|
import { getComponents } from './utils/components.js';
|
|
4
|
-
import {
|
|
2
|
+
import { multiplyMatrices } from './utils/matrix.js';
|
|
5
3
|
import { srgb2lsrgbvalues, lch2srgbvalues, lab2srgbvalues, cmyk2srgbvalues, hwb2srgbvalues, hsl2srgb, rgb2srgb, hex2srgbvalues, lsrgb2srgbvalues } from './srgb.js';
|
|
4
|
+
import { color2srgbvalues, toPrecisionValue, getNumber } from './color.js';
|
|
6
5
|
import { EnumToken, ColorType } from '../../ast/types.js';
|
|
7
|
-
import '../../ast/minify.js';
|
|
8
|
-
import '../../ast/walk.js';
|
|
9
|
-
import '../../parser/parse.js';
|
|
10
|
-
import '../../parser/tokenize.js';
|
|
11
|
-
import '../../parser/utils/config.js';
|
|
12
|
-
import { lchvalues2labvalues } from './lab.js';
|
|
13
6
|
import { getOKLCHComponents } from './oklch.js';
|
|
14
|
-
import '
|
|
7
|
+
import { lchvalues2labvalues } from './lab.js';
|
|
15
8
|
|
|
16
9
|
function hex2oklabToken(token) {
|
|
17
10
|
const values = hex2oklabvalues(token);
|
|
@@ -83,16 +76,16 @@ function oklabToken(values) {
|
|
|
83
76
|
{ typ: EnumToken.NumberTokenType, val: toPrecisionValue(values[2]) },
|
|
84
77
|
];
|
|
85
78
|
if (values.length == 4) {
|
|
86
|
-
chi.push({ typ: EnumToken.LiteralTokenType, val:
|
|
79
|
+
chi.push({ typ: EnumToken.LiteralTokenType, val: "/" }, {
|
|
87
80
|
typ: EnumToken.PercentageTokenType,
|
|
88
|
-
val: values[3] * 100
|
|
81
|
+
val: values[3] * 100,
|
|
89
82
|
});
|
|
90
83
|
}
|
|
91
84
|
return {
|
|
92
85
|
typ: EnumToken.ColorTokenType,
|
|
93
|
-
val:
|
|
86
|
+
val: "oklab",
|
|
94
87
|
chi,
|
|
95
|
-
kin: ColorType.OKLAB
|
|
88
|
+
kin: ColorType.OKLAB,
|
|
96
89
|
};
|
|
97
90
|
}
|
|
98
91
|
function hex2oklabvalues(token) {
|
|
@@ -173,11 +166,11 @@ function getOKLABComponents(token) {
|
|
|
173
166
|
// @ts-ignore
|
|
174
167
|
t = components[1];
|
|
175
168
|
// @ts-ignore
|
|
176
|
-
const a = getNumber(t) * (t.typ == EnumToken.PercentageTokenType ? .4 : 1);
|
|
169
|
+
const a = getNumber(t) * (t.typ == EnumToken.PercentageTokenType ? 0.4 : 1);
|
|
177
170
|
// @ts-ignore
|
|
178
171
|
t = components[2];
|
|
179
172
|
// @ts-ignore
|
|
180
|
-
const b = getNumber(t) * (t.typ == EnumToken.PercentageTokenType ? .4 : 1);
|
|
173
|
+
const b = getNumber(t) * (t.typ == EnumToken.PercentageTokenType ? 0.4 : 1);
|
|
181
174
|
// @ts-ignore
|
|
182
175
|
let alpha = null;
|
|
183
176
|
if (components.length > 3) {
|
|
@@ -193,13 +186,13 @@ function OKLab_to_XYZ(l, a, b, alpha = null) {
|
|
|
193
186
|
// Given OKLab, convert to XYZ relative to D65
|
|
194
187
|
const LMStoXYZ = [
|
|
195
188
|
[1.2268798758459243, -0.5578149944602171, 0.2813910456659647],
|
|
196
|
-
[-0.0405757452148008, 1.
|
|
197
|
-
[-0.0763729366746601, -0.4214933324022432, 1.5869240198367816]
|
|
189
|
+
[-0.0405757452148008, 1.112286803280317, -0.0717110580655164],
|
|
190
|
+
[-0.0763729366746601, -0.4214933324022432, 1.5869240198367816],
|
|
198
191
|
];
|
|
199
192
|
const OKLabtoLMS = [
|
|
200
|
-
[1.
|
|
201
|
-
[1.
|
|
202
|
-
[1.
|
|
193
|
+
[1.0, 0.3963377773761749, 0.2158037573099136],
|
|
194
|
+
[1.0, -0.1055613458156586, -0.0638541728258133],
|
|
195
|
+
[1.0, -0.0894841775298119, -1.2914855480194092],
|
|
203
196
|
];
|
|
204
197
|
const LMSnl = multiplyMatrices(OKLabtoLMS, [l, a, b]);
|
|
205
198
|
const xyz = multiplyMatrices(LMStoXYZ, LMSnl.map((c) => c ** 3));
|
|
@@ -210,28 +203,16 @@ function OKLab_to_XYZ(l, a, b, alpha = null) {
|
|
|
210
203
|
}
|
|
211
204
|
// from https://www.w3.org/TR/css-color-4/#color-conversion-code
|
|
212
205
|
function OKLab_to_sRGB(l, a, b) {
|
|
213
|
-
let L = Math.pow(l * 0.99999999845051981432 +
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
let M = Math.pow(l * 1.0000000088817607767 -
|
|
217
|
-
0.1055613423236563494 * a -
|
|
218
|
-
0.063854174771705903402 * b, 3);
|
|
219
|
-
let S = Math.pow(l * 1.0000000546724109177 -
|
|
220
|
-
0.089484182094965759684 * a -
|
|
221
|
-
1.2914855378640917399 * b, 3);
|
|
206
|
+
let L = Math.pow(l * 0.99999999845051981432 + 0.39633779217376785678 * a + 0.21580375806075880339 * b, 3);
|
|
207
|
+
let M = Math.pow(l * 1.0000000088817607767 - 0.1055613423236563494 * a - 0.063854174771705903402 * b, 3);
|
|
208
|
+
let S = Math.pow(l * 1.0000000546724109177 - 0.089484182094965759684 * a - 1.2914855378640917399 * b, 3);
|
|
222
209
|
return lsrgb2srgbvalues(
|
|
223
210
|
/* r: */
|
|
224
|
-
4.076741661347994 * L -
|
|
225
|
-
3.307711590408193 * M +
|
|
226
|
-
0.230969928729428 * S,
|
|
211
|
+
4.076741661347994 * L - 3.307711590408193 * M + 0.230969928729428 * S,
|
|
227
212
|
/* g: */
|
|
228
|
-
-1.2684380040921763 * L +
|
|
229
|
-
2.6097574006633715 * M -
|
|
230
|
-
0.3413193963102197 * S,
|
|
213
|
+
-1.2684380040921763 * L + 2.6097574006633715 * M - 0.3413193963102197 * S,
|
|
231
214
|
/* b: */
|
|
232
|
-
-0.004196086541837188 * L -
|
|
233
|
-
0.7034186144594493 * M +
|
|
234
|
-
1.7076147009309444 * S);
|
|
215
|
+
-0.004196086541837188 * L - 0.7034186144594493 * M + 1.7076147009309444 * S);
|
|
235
216
|
}
|
|
236
217
|
|
|
237
218
|
export { OKLab_to_XYZ, OKLab_to_sRGB, cmyk2oklabToken, cmyk2oklabvalues, color2oklabToken, getOKLABComponents, hex2oklabToken, hex2oklabvalues, hsl2oklabToken, hsl2oklabvalues, hwb2oklabToken, hwb2oklabvalues, lab2oklabToken, lab2oklabvalues, lch2oklabToken, lch2oklabvalues, oklch2oklabToken, oklch2oklabvalues, rgb2oklabToken, rgb2oklabvalues, srgb2oklab };
|
|
@@ -0,0 +1,20 @@
|
|
|
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,16 +1,9 @@
|
|
|
1
|
-
import './utils/constants.js';
|
|
2
1
|
import { getComponents } from './utils/components.js';
|
|
3
2
|
import { color2srgbvalues, toPrecisionAngle, toPrecisionValue, getNumber, getAngle } from './color.js';
|
|
4
|
-
import { srgb2oklab, lch2oklabvalues, getOKLABComponents, lab2oklabvalues, hwb2oklabvalues, hsl2oklabvalues, rgb2oklabvalues, hex2oklabvalues } from './oklab.js';
|
|
5
3
|
import { EnumToken, ColorType } from '../../ast/types.js';
|
|
6
|
-
import '../../ast/minify.js';
|
|
7
|
-
import '../../ast/walk.js';
|
|
8
|
-
import '../../parser/parse.js';
|
|
9
|
-
import '../../parser/tokenize.js';
|
|
10
|
-
import '../../parser/utils/config.js';
|
|
11
|
-
import { cmyk2srgbvalues } from './srgb.js';
|
|
12
4
|
import { labvalues2lchvalues } from './lch.js';
|
|
13
|
-
import '
|
|
5
|
+
import { srgb2oklab, lch2oklabvalues, getOKLABComponents, lab2oklabvalues, hwb2oklabvalues, hsl2oklabvalues, rgb2oklabvalues, hex2oklabvalues } from './oklab.js';
|
|
6
|
+
import { cmyk2srgbvalues } from './srgb.js';
|
|
14
7
|
|
|
15
8
|
function hex2oklchToken(token) {
|
|
16
9
|
const values = hex2oklchvalues(token);
|
|
@@ -81,16 +74,16 @@ function oklchToken(values) {
|
|
|
81
74
|
{ typ: EnumToken.NumberTokenType, val: values[2] },
|
|
82
75
|
];
|
|
83
76
|
if (values.length == 4) {
|
|
84
|
-
chi.push({ typ: EnumToken.LiteralTokenType, val:
|
|
77
|
+
chi.push({ typ: EnumToken.LiteralTokenType, val: "/" }, {
|
|
85
78
|
typ: EnumToken.PercentageTokenType,
|
|
86
|
-
val: values[3] * 100
|
|
79
|
+
val: values[3] * 100,
|
|
87
80
|
});
|
|
88
81
|
}
|
|
89
82
|
return {
|
|
90
83
|
typ: EnumToken.ColorTokenType,
|
|
91
|
-
val:
|
|
84
|
+
val: "oklch",
|
|
92
85
|
chi,
|
|
93
|
-
kin: ColorType.OKLCH
|
|
86
|
+
kin: ColorType.OKLCH,
|
|
94
87
|
};
|
|
95
88
|
}
|
|
96
89
|
function hex2oklchvalues(token) {
|
|
@@ -152,7 +145,12 @@ function getOKLCHComponents(token) {
|
|
|
152
145
|
return null;
|
|
153
146
|
}
|
|
154
147
|
for (let i = 0; i < components.length; i++) {
|
|
155
|
-
if (![
|
|
148
|
+
if (![
|
|
149
|
+
EnumToken.NumberTokenType,
|
|
150
|
+
EnumToken.PercentageTokenType,
|
|
151
|
+
EnumToken.AngleTokenType,
|
|
152
|
+
EnumToken.IdenTokenType,
|
|
153
|
+
].includes(components[i].typ)) {
|
|
156
154
|
return [];
|
|
157
155
|
}
|
|
158
156
|
}
|
|
@@ -163,7 +161,7 @@ function getOKLCHComponents(token) {
|
|
|
163
161
|
// @ts-ignore
|
|
164
162
|
t = components[1];
|
|
165
163
|
// @ts-ignore
|
|
166
|
-
const c = getNumber(t) * (t.typ == EnumToken.PercentageTokenType ? .4 : 1);
|
|
164
|
+
const c = getNumber(t) * (t.typ == EnumToken.PercentageTokenType ? 0.4 : 1);
|
|
167
165
|
// @ts-ignore
|
|
168
166
|
t = components[2];
|
|
169
167
|
// @ts-ignore
|
|
@@ -171,7 +169,7 @@ function getOKLCHComponents(token) {
|
|
|
171
169
|
// @ts-ignore
|
|
172
170
|
t = components[3];
|
|
173
171
|
// @ts-ignore
|
|
174
|
-
const alpha = t == null || (t.typ == EnumToken.IdenTokenType && t.val ==
|
|
172
|
+
const alpha = t == null || (t.typ == EnumToken.IdenTokenType && t.val == "none") ? 1 : getNumber(t);
|
|
175
173
|
return [l, c, h, alpha];
|
|
176
174
|
}
|
|
177
175
|
|
|
@@ -0,0 +1,6 @@
|
|
|
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,14 +1,6 @@
|
|
|
1
1
|
import { lsrgb2srgbvalues, xyz2srgb, srgb2lsrgbvalues } from './srgb.js';
|
|
2
2
|
import { multiplyMatrices } from './utils/matrix.js';
|
|
3
|
-
import './utils/constants.js';
|
|
4
|
-
import '../../ast/types.js';
|
|
5
|
-
import '../../ast/minify.js';
|
|
6
|
-
import '../../ast/walk.js';
|
|
7
|
-
import '../../parser/parse.js';
|
|
8
|
-
import '../../parser/tokenize.js';
|
|
9
|
-
import '../../parser/utils/config.js';
|
|
10
3
|
import { srgb2xyz } from './xyz.js';
|
|
11
|
-
import '../../renderer/sourcemap/lib/encode.js';
|
|
12
4
|
|
|
13
5
|
function p32srgbvalues(r, g, b, alpha) {
|
|
14
6
|
// @ts-ignore
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { xyz2srgb } from './srgb.js';
|
|
2
2
|
import { multiplyMatrices } from './utils/matrix.js';
|
|
3
|
-
import './utils/constants.js';
|
|
4
|
-
import '../../ast/types.js';
|
|
5
|
-
import '../../ast/minify.js';
|
|
6
|
-
import '../../ast/walk.js';
|
|
7
|
-
import '../../parser/parse.js';
|
|
8
|
-
import '../../parser/tokenize.js';
|
|
9
|
-
import '../../parser/utils/config.js';
|
|
10
3
|
import { srgb2xyz } from './xyz.js';
|
|
11
|
-
import '../../renderer/sourcemap/lib/encode.js';
|
|
12
4
|
|
|
13
5
|
function rec20202srgb(r, g, b, a) {
|
|
14
6
|
// @ts-ignore
|
|
@@ -24,14 +16,16 @@ function rec20202lrec2020(r, g, b, a) {
|
|
|
24
16
|
// ITU-R BT.2020-2 p.4
|
|
25
17
|
const alpha = 1.09929682680944;
|
|
26
18
|
const beta = 0.018053968510807;
|
|
27
|
-
return [r, g, b]
|
|
19
|
+
return [r, g, b]
|
|
20
|
+
.map(function (val) {
|
|
28
21
|
let sign = val < 0 ? -1 : 1;
|
|
29
22
|
let abs = Math.abs(val);
|
|
30
23
|
if (abs < beta * 4.5) {
|
|
31
24
|
return val / 4.5;
|
|
32
25
|
}
|
|
33
|
-
return sign *
|
|
34
|
-
})
|
|
26
|
+
return sign * Math.pow((abs + alpha - 1) / alpha, 1 / 0.45);
|
|
27
|
+
})
|
|
28
|
+
.concat([] );
|
|
35
29
|
}
|
|
36
30
|
function lrec20202rec2020(r, g, b, a) {
|
|
37
31
|
// convert an array of linear-light rec2020 RGB in the range 0.0-1.0
|
|
@@ -39,14 +33,16 @@ function lrec20202rec2020(r, g, b, a) {
|
|
|
39
33
|
// ITU-R BT.2020-2 p.4
|
|
40
34
|
const alpha = 1.09929682680944;
|
|
41
35
|
const beta = 0.018053968510807;
|
|
42
|
-
return [r, g, b]
|
|
36
|
+
return [r, g, b]
|
|
37
|
+
.map(function (val) {
|
|
43
38
|
let sign = val < 0 ? -1 : 1;
|
|
44
39
|
let abs = Math.abs(val);
|
|
45
40
|
if (abs > beta) {
|
|
46
41
|
return sign * (alpha * Math.pow(abs, 0.45) - (alpha - 1));
|
|
47
42
|
}
|
|
48
43
|
return 4.5 * val;
|
|
49
|
-
})
|
|
44
|
+
})
|
|
45
|
+
.concat(a == null || a == 1 ? [] : [a]);
|
|
50
46
|
}
|
|
51
47
|
function lrec20202xyz(r, g, b, a) {
|
|
52
48
|
// convert an array of linear-light rec2020 values to CIE XYZ
|
|
@@ -0,0 +1,13 @@
|
|
|
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 {};
|