katex 0.10.1 → 0.12.0
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 +141 -0
- package/LICENSE +1 -1
- package/README.md +6 -6
- package/cli.js +0 -0
- package/contrib/auto-render/auto-render.js +12 -3
- package/contrib/copy-tex/README.md +3 -5
- package/contrib/mathtex-script-type/README.md +12 -14
- package/contrib/mhchem/README.md +3 -1
- package/contrib/render-a11y-string/render-a11y-string.js +712 -0
- package/contrib/render-a11y-string/test/render-a11y-string-spec.js +526 -0
- package/dist/README.md +6 -6
- package/dist/contrib/auto-render.js +14 -3
- package/dist/contrib/auto-render.min.js +1 -1
- package/dist/contrib/auto-render.mjs +14 -3
- package/dist/contrib/mhchem.min.js +1 -1
- package/dist/contrib/render-a11y-string.js +870 -0
- package/dist/contrib/render-a11y-string.min.js +1 -0
- package/dist/contrib/render-a11y-string.mjs +753 -0
- package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/katex.css +34 -10
- package/dist/katex.js +2906 -2115
- package/dist/katex.min.css +1 -1
- package/dist/katex.min.js +1 -1
- package/dist/katex.mjs +2809 -2020
- package/package.json +12 -11
- package/src/Lexer.js +1 -0
- package/src/MacroExpander.js +39 -10
- package/src/Options.js +15 -75
- package/src/Parser.js +152 -115
- package/src/Settings.js +70 -7
- package/src/Token.js +2 -0
- package/src/buildCommon.js +24 -90
- package/src/buildHTML.js +31 -31
- package/src/buildMathML.js +52 -9
- package/src/buildTree.js +13 -6
- package/src/defineFunction.js +7 -22
- package/src/delimiter.js +66 -27
- package/src/domTree.js +71 -4
- package/src/environments/array.js +235 -25
- package/src/fontMetrics.js +11 -2
- package/src/functions/accent.js +9 -9
- package/src/functions/accentunder.js +2 -2
- package/src/functions/arrow.js +15 -5
- package/src/functions/color.js +9 -38
- package/src/functions/def.js +184 -0
- package/src/functions/delimsizing.js +32 -8
- package/src/functions/enclose.js +33 -6
- package/src/functions/font.js +4 -1
- package/src/functions/genfrac.js +39 -27
- package/src/functions/horizBrace.js +6 -7
- package/src/functions/href.js +16 -0
- package/src/functions/html.js +102 -0
- package/src/functions/includegraphics.js +153 -0
- package/src/functions/lap.js +4 -7
- package/src/functions/math.js +1 -5
- package/src/functions/mclass.js +41 -2
- package/src/functions/op.js +27 -111
- package/src/functions/operatorname.js +136 -92
- package/src/functions/ordgroup.js +1 -1
- package/src/functions/overline.js +3 -2
- package/src/functions/phantom.js +5 -2
- package/src/functions/raisebox.js +4 -16
- package/src/functions/rule.js +20 -9
- package/src/functions/styling.js +0 -9
- package/src/functions/supsub.js +27 -7
- package/src/functions/symbolsOp.js +4 -0
- package/src/functions/tag.js +20 -4
- package/src/functions/text.js +4 -3
- package/src/functions/underline.js +3 -2
- package/src/functions/utils/assembleSupSub.js +110 -0
- package/src/functions.js +3 -0
- package/src/katex.less +45 -9
- package/src/macros.js +259 -98
- package/src/mathMLTree.js +6 -4
- package/src/parseNode.js +37 -57
- package/src/stretchy.js +3 -1
- package/src/svgGeometry.js +136 -44
- package/src/symbols.js +52 -69
- package/src/tree.js +2 -2
- package/src/types.js +2 -1
- package/src/unicodeAccents.js +3 -1
- package/src/unicodeSymbols.js +30 -321
- package/src/utils.js +10 -0
- package/src/wide-character.js +2 -2
- package/src/unicodeMake.js +0 -70
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "katex",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Fast math typesetting for the web.",
|
|
5
5
|
"main": "dist/katex.js",
|
|
6
6
|
"homepage": "https://katex.org",
|
|
@@ -28,19 +28,20 @@
|
|
|
28
28
|
"babel-jest": "^24.1.0",
|
|
29
29
|
"babel-loader": "^8.0.5",
|
|
30
30
|
"babel-plugin-istanbul": "^5.1.1",
|
|
31
|
+
"babel-plugin-preval": "^3.0.1",
|
|
31
32
|
"babel-plugin-version-inline": "^1.0.0",
|
|
32
33
|
"benchmark": "^2.1.4",
|
|
33
|
-
"browserslist": "^4.
|
|
34
|
-
"caniuse-lite": "^1.0.
|
|
34
|
+
"browserslist": "^4.7.1",
|
|
35
|
+
"caniuse-lite": "^1.0.30001002",
|
|
35
36
|
"codecov": "^3.2.0",
|
|
36
|
-
"css-loader": "^
|
|
37
|
+
"css-loader": "^3.0.0",
|
|
37
38
|
"cssnano": "^4.1.10",
|
|
38
39
|
"eslint": "^5.14.1",
|
|
39
40
|
"eslint-plugin-flowtype": "^3.4.2",
|
|
40
41
|
"eslint-plugin-react": "^7.12.4",
|
|
41
42
|
"eslint-plugin-transform-runtime-aliasing": "^2.0.0",
|
|
42
43
|
"file-loader": "^3.0.1",
|
|
43
|
-
"flow-bin": "^0.
|
|
44
|
+
"flow-bin": "^0.102.0",
|
|
44
45
|
"fs-extra": "^7.0.1",
|
|
45
46
|
"husky": "^1.3.1",
|
|
46
47
|
"istanbul-api": "^2.1.1",
|
|
@@ -56,6 +57,7 @@
|
|
|
56
57
|
"mkdirp": "^0.5.1",
|
|
57
58
|
"pako": "^1.0.8",
|
|
58
59
|
"postcss-loader": "^3.0.0",
|
|
60
|
+
"prettier": "^1.18.2",
|
|
59
61
|
"query-string": "^6.2.0",
|
|
60
62
|
"rimraf": "^2.6.3",
|
|
61
63
|
"rollup": "^1.2.2",
|
|
@@ -74,7 +76,7 @@
|
|
|
74
76
|
},
|
|
75
77
|
"bin": "cli.js",
|
|
76
78
|
"scripts": {
|
|
77
|
-
"test": "yarn
|
|
79
|
+
"test": "yarn test:lint && yarn test:flow && yarn test:jest",
|
|
78
80
|
"test:lint": "yarn test:lint:js && yarn test:lint:css",
|
|
79
81
|
"test:lint:js": "eslint *.js src static test contrib dockers website",
|
|
80
82
|
"test:lint:css": "stylelint src/katex.less static/main.css contrib/**/*.css website/static/**/*.css",
|
|
@@ -84,14 +86,13 @@
|
|
|
84
86
|
"test:jest:update": "jest --updateSnapshot",
|
|
85
87
|
"test:jest:coverage": "jest --coverage",
|
|
86
88
|
"test:screenshots": "yarn test:screenshots:update --verify",
|
|
87
|
-
"test:screenshots:update": "
|
|
88
|
-
"test:perf": "
|
|
89
|
+
"test:screenshots:update": "dockers/screenshotter/screenshotter.sh",
|
|
90
|
+
"test:perf": "NODE_ENV=test node test/perf-test.js",
|
|
89
91
|
"clean": "rm -rf dist/ node_modules/",
|
|
90
92
|
"clean-install": "yarn clean && yarn",
|
|
91
|
-
"prestart": "node src/unicodeMake.js",
|
|
92
93
|
"start": "webpack-dev-server --hot --config webpack.dev.js",
|
|
93
94
|
"analyze": "webpack --config webpack.analyze.js",
|
|
94
|
-
"build": "
|
|
95
|
+
"build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack",
|
|
95
96
|
"watch": "yarn build --watch",
|
|
96
97
|
"dist": "yarn test && yarn build && yarn dist:zip",
|
|
97
98
|
"dist:zip": "rimraf katex/ katex.tar.gz katex.zip && cp -R dist katex && tar czf katex.tar.gz katex && zip -rq katex.zip katex && rimraf katex/"
|
|
@@ -110,7 +111,7 @@
|
|
|
110
111
|
"collectCoverageFrom": [
|
|
111
112
|
"src/**/*.js",
|
|
112
113
|
"contrib/**/*.js",
|
|
113
|
-
"!src/
|
|
114
|
+
"!src/unicodeSymbols.js",
|
|
114
115
|
"!contrib/mhchem/**"
|
|
115
116
|
],
|
|
116
117
|
"setupFilesAfterEnv": [
|
package/src/Lexer.js
CHANGED
|
@@ -51,6 +51,7 @@ const tokenRegexString = `(${spaceRegexString}+)|` + // whitespace
|
|
|
51
51
|
`${combiningDiacriticalMarkString}*` + // ...plus accents
|
|
52
52
|
"|\\\\verb\\*([^]).*?\\3" + // \verb*
|
|
53
53
|
"|\\\\verb([^*a-zA-Z]).*?\\4" + // \verb unstarred
|
|
54
|
+
"|\\\\operatorname\\*" + // \operatorname*
|
|
54
55
|
`|${controlWordWhitespaceRegexString}` + // \macroName + spaces
|
|
55
56
|
`|${controlSymbolRegexString})`; // \\, \', etc.
|
|
56
57
|
|
package/src/MacroExpander.js
CHANGED
|
@@ -180,13 +180,19 @@ export default class MacroExpander implements MacroContextInterface {
|
|
|
180
180
|
* At the moment, macro expansion doesn't handle delimited macros,
|
|
181
181
|
* i.e. things like those defined by \def\foo#1\end{…}.
|
|
182
182
|
* See the TeX book page 202ff. for details on how those should behave.
|
|
183
|
+
*
|
|
184
|
+
* If expandableOnly, only expandable tokens are expanded and
|
|
185
|
+
* an undefined control sequence results in an error.
|
|
183
186
|
*/
|
|
184
|
-
expandOnce(): Token | Token[] {
|
|
187
|
+
expandOnce(expandableOnly?: boolean): Token | Token[] {
|
|
185
188
|
const topToken = this.popToken();
|
|
186
189
|
const name = topToken.text;
|
|
187
|
-
const expansion = this._getExpansion(name);
|
|
188
|
-
if (expansion == null
|
|
189
|
-
|
|
190
|
+
const expansion = !topToken.noexpand ? this._getExpansion(name) : null;
|
|
191
|
+
if (expansion == null || (expandableOnly && expansion.unexpandable)) {
|
|
192
|
+
if (expandableOnly && expansion == null &&
|
|
193
|
+
name[0] === "\\" && !this.isDefined(name)) {
|
|
194
|
+
throw new ParseError("Undefined control sequence: " + name);
|
|
195
|
+
}
|
|
190
196
|
this.pushToken(topToken);
|
|
191
197
|
return topToken;
|
|
192
198
|
}
|
|
@@ -248,7 +254,9 @@ export default class MacroExpander implements MacroContextInterface {
|
|
|
248
254
|
if (expanded instanceof Token) {
|
|
249
255
|
// \relax stops the expansion, but shouldn't get returned (a
|
|
250
256
|
// null return value couldn't get implemented as a function).
|
|
251
|
-
|
|
257
|
+
// the token after \noexpand is interpreted as if its meaning
|
|
258
|
+
// were ‘\relax’
|
|
259
|
+
if (expanded.text === "\\relax" || expanded.treatAsRelax) {
|
|
252
260
|
this.stack.pop();
|
|
253
261
|
} else {
|
|
254
262
|
return this.stack.pop(); // === expanded
|
|
@@ -266,16 +274,26 @@ export default class MacroExpander implements MacroContextInterface {
|
|
|
266
274
|
* tokens, or return `undefined` if no such macro is defined.
|
|
267
275
|
*/
|
|
268
276
|
expandMacro(name: string): Token[] | void {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
277
|
+
return this.macros.has(name)
|
|
278
|
+
? this.expandTokens([new Token(name)]) : undefined;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Fully expand the given token stream and return the resulting list of tokens
|
|
283
|
+
*/
|
|
284
|
+
expandTokens(tokens: Token[]): Token[] {
|
|
272
285
|
const output = [];
|
|
273
286
|
const oldStackLength = this.stack.length;
|
|
274
|
-
this.
|
|
287
|
+
this.pushTokens(tokens);
|
|
275
288
|
while (this.stack.length > oldStackLength) {
|
|
276
|
-
const expanded = this.expandOnce();
|
|
289
|
+
const expanded = this.expandOnce(true); // expand only expandable tokens
|
|
277
290
|
// expandOnce returns Token if and only if it's fully expanded.
|
|
278
291
|
if (expanded instanceof Token) {
|
|
292
|
+
if (expanded.treatAsRelax) {
|
|
293
|
+
// the expansion of \noexpand is the token itself
|
|
294
|
+
expanded.noexpand = false;
|
|
295
|
+
expanded.treatAsRelax = false;
|
|
296
|
+
}
|
|
279
297
|
output.push(this.stack.pop());
|
|
280
298
|
}
|
|
281
299
|
}
|
|
@@ -342,4 +360,15 @@ export default class MacroExpander implements MacroContextInterface {
|
|
|
342
360
|
symbols.text.hasOwnProperty(name) ||
|
|
343
361
|
implicitCommands.hasOwnProperty(name);
|
|
344
362
|
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Determine whether a command is expandable.
|
|
366
|
+
*/
|
|
367
|
+
isExpandable(name: string): boolean {
|
|
368
|
+
const macro = this.macros.get(name);
|
|
369
|
+
return macro != null ? typeof macro === "string"
|
|
370
|
+
|| typeof macro === "function" || !macro.unexpandable
|
|
371
|
+
// TODO(ylem): #2085
|
|
372
|
+
: functions.hasOwnProperty(name)/* && !functions[name].primitive*/;
|
|
373
|
+
}
|
|
345
374
|
}
|
package/src/Options.js
CHANGED
|
@@ -36,6 +36,10 @@ const sizeAtStyle = function(size: number, style: StyleInterface): number {
|
|
|
36
36
|
return style.size < 2 ? size : sizeStyleMap[size - 1][style.size - 1];
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
// In these types, "" (empty string) means "no change".
|
|
40
|
+
export type FontWeight = "textbf" | "textmd" | "";
|
|
41
|
+
export type FontShape = "textit" | "textup" | "";
|
|
42
|
+
|
|
39
43
|
export type OptionsData = {
|
|
40
44
|
style: StyleInterface;
|
|
41
45
|
color?: string | void;
|
|
@@ -44,10 +48,11 @@ export type OptionsData = {
|
|
|
44
48
|
phantom?: boolean;
|
|
45
49
|
font?: string;
|
|
46
50
|
fontFamily?: string;
|
|
47
|
-
fontWeight?:
|
|
48
|
-
fontShape?:
|
|
51
|
+
fontWeight?: FontWeight;
|
|
52
|
+
fontShape?: FontShape;
|
|
49
53
|
sizeMultiplier?: number;
|
|
50
54
|
maxSize: number;
|
|
55
|
+
minRuleThickness: number;
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
/**
|
|
@@ -68,10 +73,11 @@ class Options {
|
|
|
68
73
|
// See: https://tex.stackexchange.com/questions/22350/difference-between-textrm-and-mathrm
|
|
69
74
|
font: string;
|
|
70
75
|
fontFamily: string;
|
|
71
|
-
fontWeight:
|
|
72
|
-
fontShape:
|
|
76
|
+
fontWeight: FontWeight;
|
|
77
|
+
fontShape: FontShape;
|
|
73
78
|
sizeMultiplier: number;
|
|
74
79
|
maxSize: number;
|
|
80
|
+
minRuleThickness: number;
|
|
75
81
|
_fontMetrics: FontMetrics | void;
|
|
76
82
|
|
|
77
83
|
/**
|
|
@@ -91,6 +97,7 @@ class Options {
|
|
|
91
97
|
this.fontShape = data.fontShape || '';
|
|
92
98
|
this.sizeMultiplier = sizeMultipliers[this.size - 1];
|
|
93
99
|
this.maxSize = data.maxSize;
|
|
100
|
+
this.minRuleThickness = data.minRuleThickness;
|
|
94
101
|
this._fontMetrics = undefined;
|
|
95
102
|
}
|
|
96
103
|
|
|
@@ -110,6 +117,7 @@ class Options {
|
|
|
110
117
|
fontWeight: this.fontWeight,
|
|
111
118
|
fontShape: this.fontShape,
|
|
112
119
|
maxSize: this.maxSize,
|
|
120
|
+
minRuleThickness: this.minRuleThickness,
|
|
113
121
|
};
|
|
114
122
|
|
|
115
123
|
for (const key in extension) {
|
|
@@ -244,7 +252,7 @@ class Options {
|
|
|
244
252
|
/**
|
|
245
253
|
* Creates a new options object with the given font weight
|
|
246
254
|
*/
|
|
247
|
-
withTextFontWeight(fontWeight:
|
|
255
|
+
withTextFontWeight(fontWeight: FontWeight): Options {
|
|
248
256
|
return this.extend({
|
|
249
257
|
fontWeight,
|
|
250
258
|
font: "",
|
|
@@ -254,7 +262,7 @@ class Options {
|
|
|
254
262
|
/**
|
|
255
263
|
* Creates a new options object with the given font weight
|
|
256
264
|
*/
|
|
257
|
-
withTextFontShape(fontShape:
|
|
265
|
+
withTextFontShape(fontShape: FontShape): Options {
|
|
258
266
|
return this.extend({
|
|
259
267
|
fontShape,
|
|
260
268
|
font: "",
|
|
@@ -295,81 +303,13 @@ class Options {
|
|
|
295
303
|
return this._fontMetrics;
|
|
296
304
|
}
|
|
297
305
|
|
|
298
|
-
/**
|
|
299
|
-
* A map of color names to CSS colors.
|
|
300
|
-
* TODO(emily): Remove this when we have real macros
|
|
301
|
-
*/
|
|
302
|
-
static colorMap = {
|
|
303
|
-
"katex-blue": "#6495ed",
|
|
304
|
-
"katex-orange": "#ffa500",
|
|
305
|
-
"katex-pink": "#ff00af",
|
|
306
|
-
"katex-red": "#df0030",
|
|
307
|
-
"katex-green": "#28ae7b",
|
|
308
|
-
"katex-gray": "gray",
|
|
309
|
-
"katex-purple": "#9d38bd",
|
|
310
|
-
"katex-blueA": "#ccfaff",
|
|
311
|
-
"katex-blueB": "#80f6ff",
|
|
312
|
-
"katex-blueC": "#63d9ea",
|
|
313
|
-
"katex-blueD": "#11accd",
|
|
314
|
-
"katex-blueE": "#0c7f99",
|
|
315
|
-
"katex-tealA": "#94fff5",
|
|
316
|
-
"katex-tealB": "#26edd5",
|
|
317
|
-
"katex-tealC": "#01d1c1",
|
|
318
|
-
"katex-tealD": "#01a995",
|
|
319
|
-
"katex-tealE": "#208170",
|
|
320
|
-
"katex-greenA": "#b6ffb0",
|
|
321
|
-
"katex-greenB": "#8af281",
|
|
322
|
-
"katex-greenC": "#74cf70",
|
|
323
|
-
"katex-greenD": "#1fab54",
|
|
324
|
-
"katex-greenE": "#0d923f",
|
|
325
|
-
"katex-goldA": "#ffd0a9",
|
|
326
|
-
"katex-goldB": "#ffbb71",
|
|
327
|
-
"katex-goldC": "#ff9c39",
|
|
328
|
-
"katex-goldD": "#e07d10",
|
|
329
|
-
"katex-goldE": "#a75a05",
|
|
330
|
-
"katex-redA": "#fca9a9",
|
|
331
|
-
"katex-redB": "#ff8482",
|
|
332
|
-
"katex-redC": "#f9685d",
|
|
333
|
-
"katex-redD": "#e84d39",
|
|
334
|
-
"katex-redE": "#bc2612",
|
|
335
|
-
"katex-maroonA": "#ffbde0",
|
|
336
|
-
"katex-maroonB": "#ff92c6",
|
|
337
|
-
"katex-maroonC": "#ed5fa6",
|
|
338
|
-
"katex-maroonD": "#ca337c",
|
|
339
|
-
"katex-maroonE": "#9e034e",
|
|
340
|
-
"katex-purpleA": "#ddd7ff",
|
|
341
|
-
"katex-purpleB": "#c6b9fc",
|
|
342
|
-
"katex-purpleC": "#aa87ff",
|
|
343
|
-
"katex-purpleD": "#7854ab",
|
|
344
|
-
"katex-purpleE": "#543b78",
|
|
345
|
-
"katex-mintA": "#f5f9e8",
|
|
346
|
-
"katex-mintB": "#edf2df",
|
|
347
|
-
"katex-mintC": "#e0e5cc",
|
|
348
|
-
"katex-grayA": "#f6f7f7",
|
|
349
|
-
"katex-grayB": "#f0f1f2",
|
|
350
|
-
"katex-grayC": "#e3e5e6",
|
|
351
|
-
"katex-grayD": "#d6d8da",
|
|
352
|
-
"katex-grayE": "#babec2",
|
|
353
|
-
"katex-grayF": "#888d93",
|
|
354
|
-
"katex-grayG": "#626569",
|
|
355
|
-
"katex-grayH": "#3b3e40",
|
|
356
|
-
"katex-grayI": "#21242c",
|
|
357
|
-
"katex-kaBlue": "#314453",
|
|
358
|
-
"katex-kaGreen": "#71B307",
|
|
359
|
-
};
|
|
360
306
|
|
|
361
307
|
/**
|
|
362
|
-
* Gets the CSS color of the current options object
|
|
363
|
-
* `colorMap`.
|
|
308
|
+
* Gets the CSS color of the current options object
|
|
364
309
|
*/
|
|
365
310
|
getColor(): string | void {
|
|
366
311
|
if (this.phantom) {
|
|
367
312
|
return "transparent";
|
|
368
|
-
} else if (
|
|
369
|
-
this.color != null &&
|
|
370
|
-
Options.colorMap.hasOwnProperty(this.color)
|
|
371
|
-
) {
|
|
372
|
-
return Options.colorMap[this.color];
|
|
373
313
|
} else {
|
|
374
314
|
return this.color;
|
|
375
315
|
}
|