katex 0.16.14 → 0.16.16

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/dist/katex.mjs CHANGED
@@ -5960,6 +5960,10 @@ var fontMap = {
5960
5960
  variant: "italic",
5961
5961
  fontName: "Math-Italic"
5962
5962
  },
5963
+ "mathsfit": {
5964
+ variant: "sans-serif-italic",
5965
+ fontName: "SansSerif-Italic"
5966
+ },
5963
5967
  // "boldsymbol" is missing because they require the use of multiple fonts:
5964
5968
  // Math-BoldItalic and Main-Bold. This is handled by a special case in
5965
5969
  // makeOrd which ends up calling boldsymbol.
@@ -6912,6 +6916,8 @@ var getVariant = function getVariant(group, options) {
6912
6916
  return "bold";
6913
6917
  } else if (font === "mathbb") {
6914
6918
  return "double-struck";
6919
+ } else if (font === "mathsfit") {
6920
+ return "sans-serif-italic";
6915
6921
  } else if (font === "mathfrak") {
6916
6922
  return "fraktur";
6917
6923
  } else if (font === "mathscr" || font === "mathcal") {
@@ -11556,7 +11562,7 @@ var fontAliases = {
11556
11562
  defineFunction({
11557
11563
  type: "font",
11558
11564
  names: [// styles, except \boldsymbol defined below
11559
- "\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", // families
11565
+ "\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", "\\mathsfit", // families
11560
11566
  "\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf", "\\mathtt", // aliases, except \bm defined below
11561
11567
  "\\Bbb", "\\bold", "\\frak"],
11562
11568
  props: {
@@ -18365,11 +18371,21 @@ var renderToHTMLTree = function renderToHTMLTree(expression, options) {
18365
18371
  }
18366
18372
  };
18367
18373
 
18374
+ var version = "0.16.16";
18375
+ var __domTree = {
18376
+ Span,
18377
+ Anchor,
18378
+ SymbolNode,
18379
+ SvgNode,
18380
+ PathNode,
18381
+ LineNode
18382
+ }; // ESM exports
18383
+
18368
18384
  var katex = {
18369
18385
  /**
18370
18386
  * Current KaTeX version
18371
18387
  */
18372
- version: "0.16.14",
18388
+ version,
18373
18389
 
18374
18390
  /**
18375
18391
  * Renders the given LaTeX into an HTML+MathML combination, and adds
@@ -18389,7 +18405,7 @@ var katex = {
18389
18405
  ParseError,
18390
18406
 
18391
18407
  /**
18392
- * The shema of Settings
18408
+ * The schema of Settings
18393
18409
  */
18394
18410
  SETTINGS_SCHEMA,
18395
18411
 
@@ -18449,18 +18465,11 @@ var katex = {
18449
18465
  /**
18450
18466
  * Expose the dom tree node types, which can be useful for type checking nodes.
18451
18467
  *
18452
- * NOTE: This method is not currently recommended for public use.
18468
+ * NOTE: These methods are not currently recommended for public use.
18453
18469
  * The internal tree representation is unstable and is very likely
18454
18470
  * to change. Use at your own risk.
18455
18471
  */
18456
- __domTree: {
18457
- Span,
18458
- Anchor,
18459
- SymbolNode,
18460
- SvgNode,
18461
- PathNode,
18462
- LineNode
18463
- }
18472
+ __domTree
18464
18473
  };
18465
18474
 
18466
- export { katex as default };
18475
+ export { ParseError, SETTINGS_SCHEMA, defineFunction as __defineFunction, defineMacro as __defineMacro, defineSymbol as __defineSymbol, __domTree, generateParseTree as __parse, renderToDomTree as __renderToDomTree, renderToHTMLTree as __renderToHTMLTree, setFontMetrics as __setFontMetrics, katex as default, render, renderToString, version };
package/katex.js CHANGED
@@ -138,11 +138,40 @@ const renderToHTMLTree = function(
138
138
  }
139
139
  };
140
140
 
141
+ const version = __VERSION__;
142
+
143
+ const __domTree = {
144
+ Span,
145
+ Anchor,
146
+ SymbolNode,
147
+ SvgNode,
148
+ PathNode,
149
+ LineNode,
150
+ };
151
+
152
+ // ESM exports
153
+ export {
154
+ version,
155
+ render,
156
+ renderToString,
157
+ ParseError,
158
+ SETTINGS_SCHEMA,
159
+ generateParseTree as __parse,
160
+ renderToDomTree as __renderToDomTree,
161
+ renderToHTMLTree as __renderToHTMLTree,
162
+ setFontMetrics as __setFontMetrics,
163
+ defineSymbol as __defineSymbol,
164
+ defineFunction as __defineFunction,
165
+ defineMacro as __defineMacro,
166
+ __domTree,
167
+ };
168
+
169
+ // CJS exports and ESM default export
141
170
  export default {
142
171
  /**
143
172
  * Current KaTeX version
144
173
  */
145
- version: __VERSION__,
174
+ version,
146
175
  /**
147
176
  * Renders the given LaTeX into an HTML+MathML combination, and adds
148
177
  * it as a child to the specified DOM node.
@@ -158,7 +187,7 @@ export default {
158
187
  */
159
188
  ParseError,
160
189
  /**
161
- * The shema of Settings
190
+ * The schema of Settings
162
191
  */
163
192
  SETTINGS_SCHEMA,
164
193
  /**
@@ -210,16 +239,9 @@ export default {
210
239
  /**
211
240
  * Expose the dom tree node types, which can be useful for type checking nodes.
212
241
  *
213
- * NOTE: This method is not currently recommended for public use.
242
+ * NOTE: These methods are not currently recommended for public use.
214
243
  * The internal tree representation is unstable and is very likely
215
244
  * to change. Use at your own risk.
216
245
  */
217
- __domTree: {
218
- Span,
219
- Anchor,
220
- SymbolNode,
221
- SvgNode,
222
- PathNode,
223
- LineNode,
224
- },
246
+ __domTree,
225
247
  };
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "katex",
3
- "version": "0.16.14",
3
+ "version": "0.16.16",
4
4
  "description": "Fast math typesetting for the web.",
5
5
  "main": "dist/katex.js",
6
6
  "exports": {
7
7
  ".": {
8
- "require": "./dist/katex.js",
9
- "import": "./dist/katex.mjs"
8
+ "require": {
9
+ "types": "./types/katex.d.ts",
10
+ "default": "./dist/katex.js"
11
+ },
12
+ "import": {
13
+ "types": "./types/katex.d.ts",
14
+ "default": "./dist/katex.mjs"
15
+ }
10
16
  },
11
17
  "./contrib/auto-render": {
12
18
  "require": "./dist/contrib/auto-render.js",
@@ -700,7 +700,10 @@ const fontMap: {[string]: {| variant: FontVariant, fontName: string |}} = {
700
700
  variant: "italic",
701
701
  fontName: "Math-Italic",
702
702
  },
703
-
703
+ "mathsfit": {
704
+ variant: "sans-serif-italic",
705
+ fontName: "SansSerif-Italic",
706
+ },
704
707
  // "boldsymbol" is missing because they require the use of multiple fonts:
705
708
  // Math-BoldItalic and Main-Bold. This is handled by a special case in
706
709
  // makeOrd which ends up calling boldsymbol.
@@ -98,6 +98,8 @@ export const getVariant = function(
98
98
  return "bold";
99
99
  } else if (font === "mathbb") {
100
100
  return "double-struck";
101
+ } else if (font === "mathsfit") {
102
+ return "sans-serif-italic";
101
103
  } else if (font === "mathfrak") {
102
104
  return "fraktur";
103
105
  } else if (font === "mathscr" || font === "mathcal") {
@@ -33,7 +33,7 @@ defineFunction({
33
33
  type: "font",
34
34
  names: [
35
35
  // styles, except \boldsymbol defined below
36
- "\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal",
36
+ "\\mathrm", "\\mathit", "\\mathbf", "\\mathnormal", "\\mathsfit",
37
37
 
38
38
  // families
39
39
  "\\mathbb", "\\mathcal", "\\mathfrak", "\\mathscr", "\\mathsf",
@@ -158,6 +158,7 @@ $display-margin: 1em 0 !default;
158
158
  font-weight: bold;
159
159
  }
160
160
 
161
+ .mathsfit,
161
162
  .mathitsf,
162
163
  .textitsf {
163
164
  font-family: KaTeX_SansSerif;