@will1123/lx-ui-utils 1.0.3 → 1.0.5
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/dist/index.esm.js +130 -75
- package/dist/dist/index.esm.min.js +3746 -3707
- package/dist/dist/index.esm.min.js.map +1 -1
- package/dist/dist/index.umd.js +130 -75
- package/dist/dist/index.umd.min.js +29 -29
- package/dist/dist/index.umd.min.js.map +1 -1
- package/dist/es/markdown.js +1 -1
- package/dist/es/markdown.js.map +1 -1
- package/dist/es/sse.js +2 -2
- package/dist/es/sse.js.map +1 -1
- package/dist/lib/markdown.js +1 -1
- package/dist/lib/markdown.js.map +1 -1
- package/dist/lib/sse.js +2 -2
- package/dist/lib/sse.js.map +1 -1
- package/dist/types/sse.d.ts +4 -4
- package/dist/types/sse.d.ts.map +1 -1
- package/package.json +9 -2
package/dist/dist/index.umd.js
CHANGED
|
@@ -237,7 +237,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
237
237
|
}
|
|
238
238
|
function sse(config, handlers) {
|
|
239
239
|
return __async(this, null, function* () {
|
|
240
|
-
const { url, method = "POST", headers = {},
|
|
240
|
+
const { url, method = "POST", headers = {}, params, signal, token, openWhenHidden = true } = config;
|
|
241
241
|
const requestHeaders = __spreadValues({
|
|
242
242
|
"Content-Type": "application/json;charset=utf-8"
|
|
243
243
|
}, headers);
|
|
@@ -247,7 +247,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
247
247
|
yield fetchEventSource(url, {
|
|
248
248
|
method,
|
|
249
249
|
headers: requestHeaders,
|
|
250
|
-
body: JSON.stringify(
|
|
250
|
+
body: JSON.stringify(params),
|
|
251
251
|
signal,
|
|
252
252
|
openWhenHidden,
|
|
253
253
|
onopen(response) {
|
|
@@ -3410,7 +3410,7 @@ ${text2}</tr>
|
|
|
3410
3410
|
}
|
|
3411
3411
|
return mode;
|
|
3412
3412
|
}
|
|
3413
|
-
var version = "11.11.1";
|
|
3413
|
+
var version$1 = "11.11.1";
|
|
3414
3414
|
class HTMLInjectionError extends Error {
|
|
3415
3415
|
constructor(reason, html2) {
|
|
3416
3416
|
super(reason);
|
|
@@ -4036,7 +4036,7 @@ ${text2}</tr>
|
|
|
4036
4036
|
hljs2.safeMode = function() {
|
|
4037
4037
|
SAFE_MODE = true;
|
|
4038
4038
|
};
|
|
4039
|
-
hljs2.versionString = version;
|
|
4039
|
+
hljs2.versionString = version$1;
|
|
4040
4040
|
hljs2.regex = {
|
|
4041
4041
|
concat,
|
|
4042
4042
|
lookahead,
|
|
@@ -11126,14 +11126,14 @@ ${text2}</tr>
|
|
|
11126
11126
|
keywords: CRYSTAL_KEYWORDS
|
|
11127
11127
|
};
|
|
11128
11128
|
function recursiveParen(begin, end) {
|
|
11129
|
-
const
|
|
11129
|
+
const contains = [
|
|
11130
11130
|
{
|
|
11131
11131
|
begin,
|
|
11132
11132
|
end
|
|
11133
11133
|
}
|
|
11134
11134
|
];
|
|
11135
|
-
|
|
11136
|
-
return
|
|
11135
|
+
contains[0].contains = contains;
|
|
11136
|
+
return contains;
|
|
11137
11137
|
}
|
|
11138
11138
|
const STRING = {
|
|
11139
11139
|
className: "string",
|
|
@@ -54575,9 +54575,6 @@ ${text2}</tr>
|
|
|
54575
54575
|
}
|
|
54576
54576
|
}
|
|
54577
54577
|
ParseError.prototype.__proto__ = Error.prototype;
|
|
54578
|
-
var contains = function contains2(list2, elem) {
|
|
54579
|
-
return list2.indexOf(elem) !== -1;
|
|
54580
|
-
};
|
|
54581
54578
|
var deflt = function deflt2(setting, defaultIfUndefined) {
|
|
54582
54579
|
return setting === void 0 ? defaultIfUndefined : setting;
|
|
54583
54580
|
};
|
|
@@ -54639,7 +54636,6 @@ ${text2}</tr>
|
|
|
54639
54636
|
return protocol[1].toLowerCase();
|
|
54640
54637
|
};
|
|
54641
54638
|
var utils = {
|
|
54642
|
-
contains,
|
|
54643
54639
|
deflt,
|
|
54644
54640
|
escape,
|
|
54645
54641
|
hyphenate,
|
|
@@ -55183,7 +55179,6 @@ ${text2}</tr>
|
|
|
55183
55179
|
}
|
|
55184
55180
|
};
|
|
55185
55181
|
class DocumentFragment {
|
|
55186
|
-
// HtmlDomNode
|
|
55187
55182
|
// Never used; needed for satisfying interface.
|
|
55188
55183
|
constructor(children) {
|
|
55189
55184
|
this.children = void 0;
|
|
@@ -55200,7 +55195,7 @@ ${text2}</tr>
|
|
|
55200
55195
|
this.style = {};
|
|
55201
55196
|
}
|
|
55202
55197
|
hasClass(className) {
|
|
55203
|
-
return
|
|
55198
|
+
return this.classes.includes(className);
|
|
55204
55199
|
}
|
|
55205
55200
|
/** Convert the fragment into a node. */
|
|
55206
55201
|
toNode() {
|
|
@@ -57891,6 +57886,7 @@ ${text2}</tr>
|
|
|
57891
57886
|
}
|
|
57892
57887
|
return node;
|
|
57893
57888
|
};
|
|
57889
|
+
var invalidAttributeNameRegex = /[\s"'>/=\x00-\x1f]/;
|
|
57894
57890
|
var toMarkup = function toMarkup2(tagName) {
|
|
57895
57891
|
var markup = "<" + tagName;
|
|
57896
57892
|
if (this.classes.length) {
|
|
@@ -57907,6 +57903,9 @@ ${text2}</tr>
|
|
|
57907
57903
|
}
|
|
57908
57904
|
for (var attr in this.attributes) {
|
|
57909
57905
|
if (this.attributes.hasOwnProperty(attr)) {
|
|
57906
|
+
if (invalidAttributeNameRegex.test(attr)) {
|
|
57907
|
+
throw new ParseError("Invalid attribute name '" + attr + "'");
|
|
57908
|
+
}
|
|
57910
57909
|
markup += " " + attr + '="' + utils.escape(this.attributes[attr]) + '"';
|
|
57911
57910
|
}
|
|
57912
57911
|
}
|
|
@@ -57939,7 +57938,7 @@ ${text2}</tr>
|
|
|
57939
57938
|
this.attributes[attribute] = value;
|
|
57940
57939
|
}
|
|
57941
57940
|
hasClass(className) {
|
|
57942
|
-
return
|
|
57941
|
+
return this.classes.includes(className);
|
|
57943
57942
|
}
|
|
57944
57943
|
toNode() {
|
|
57945
57944
|
return toNode.call(this, "span");
|
|
@@ -57965,7 +57964,7 @@ ${text2}</tr>
|
|
|
57965
57964
|
this.attributes[attribute] = value;
|
|
57966
57965
|
}
|
|
57967
57966
|
hasClass(className) {
|
|
57968
|
-
return
|
|
57967
|
+
return this.classes.includes(className);
|
|
57969
57968
|
}
|
|
57970
57969
|
toNode() {
|
|
57971
57970
|
return toNode.call(this, "a");
|
|
@@ -57989,7 +57988,7 @@ ${text2}</tr>
|
|
|
57989
57988
|
this.style = style;
|
|
57990
57989
|
}
|
|
57991
57990
|
hasClass(className) {
|
|
57992
|
-
return
|
|
57991
|
+
return this.classes.includes(className);
|
|
57993
57992
|
}
|
|
57994
57993
|
toNode() {
|
|
57995
57994
|
var node = document.createElement("img");
|
|
@@ -58054,7 +58053,7 @@ ${text2}</tr>
|
|
|
58054
58053
|
}
|
|
58055
58054
|
}
|
|
58056
58055
|
hasClass(className) {
|
|
58057
|
-
return
|
|
58056
|
+
return this.classes.includes(className);
|
|
58058
58057
|
}
|
|
58059
58058
|
/**
|
|
58060
58059
|
* Creates a text node or span from a symbol node. Note that a span is only
|
|
@@ -58797,6 +58796,7 @@ ${text2}</tr>
|
|
|
58797
58796
|
defineSymbol(math, main, inner, "⋯", "\\@cdots", true);
|
|
58798
58797
|
defineSymbol(math, main, inner, "⋱", "\\ddots", true);
|
|
58799
58798
|
defineSymbol(math, main, textord, "⋮", "\\varvdots");
|
|
58799
|
+
defineSymbol(text, main, textord, "⋮", "\\varvdots");
|
|
58800
58800
|
defineSymbol(math, main, accent, "ˊ", "\\acute");
|
|
58801
58801
|
defineSymbol(math, main, accent, "ˋ", "\\grave");
|
|
58802
58802
|
defineSymbol(math, main, accent, "¨", "\\ddot");
|
|
@@ -59415,6 +59415,10 @@ ${text2}</tr>
|
|
|
59415
59415
|
variant: "italic",
|
|
59416
59416
|
fontName: "Math-Italic"
|
|
59417
59417
|
},
|
|
59418
|
+
"mathsfit": {
|
|
59419
|
+
variant: "sans-serif-italic",
|
|
59420
|
+
fontName: "SansSerif-Italic"
|
|
59421
|
+
},
|
|
59418
59422
|
// "boldsymbol" is missing because they require the use of multiple fonts:
|
|
59419
59423
|
// Math-BoldItalic and Main-Bold. This is handled by a special case in
|
|
59420
59424
|
// makeOrd which ends up calling boldsymbol.
|
|
@@ -59683,9 +59687,9 @@ ${text2}</tr>
|
|
|
59683
59687
|
traverseNonSpaceNodes(groups, (node2, prev) => {
|
|
59684
59688
|
var prevType = prev.classes[0];
|
|
59685
59689
|
var type = node2.classes[0];
|
|
59686
|
-
if (prevType === "mbin" &&
|
|
59690
|
+
if (prevType === "mbin" && binRightCanceller.includes(type)) {
|
|
59687
59691
|
prev.classes[0] = "mord";
|
|
59688
|
-
} else if (type === "mbin" &&
|
|
59692
|
+
} else if (type === "mbin" && binLeftCanceller.includes(prevType)) {
|
|
59689
59693
|
node2.classes[0] = "mord";
|
|
59690
59694
|
}
|
|
59691
59695
|
}, {
|
|
@@ -59901,7 +59905,15 @@ ${text2}</tr>
|
|
|
59901
59905
|
node.className = createClass(this.classes);
|
|
59902
59906
|
}
|
|
59903
59907
|
for (var i2 = 0; i2 < this.children.length; i2++) {
|
|
59904
|
-
|
|
59908
|
+
if (this.children[i2] instanceof TextNode && this.children[i2 + 1] instanceof TextNode) {
|
|
59909
|
+
var text2 = this.children[i2].toText() + this.children[++i2].toText();
|
|
59910
|
+
while (this.children[i2 + 1] instanceof TextNode) {
|
|
59911
|
+
text2 += this.children[++i2].toText();
|
|
59912
|
+
}
|
|
59913
|
+
node.appendChild(new TextNode(text2).toNode());
|
|
59914
|
+
} else {
|
|
59915
|
+
node.appendChild(this.children[i2].toNode());
|
|
59916
|
+
}
|
|
59905
59917
|
}
|
|
59906
59918
|
return node;
|
|
59907
59919
|
}
|
|
@@ -60073,6 +60085,8 @@ ${text2}</tr>
|
|
|
60073
60085
|
return "bold";
|
|
60074
60086
|
} else if (font === "mathbb") {
|
|
60075
60087
|
return "double-struck";
|
|
60088
|
+
} else if (font === "mathsfit") {
|
|
60089
|
+
return "sans-serif-italic";
|
|
60076
60090
|
} else if (font === "mathfrak") {
|
|
60077
60091
|
return "fraktur";
|
|
60078
60092
|
} else if (font === "mathscr" || font === "mathcal") {
|
|
@@ -60083,7 +60097,7 @@ ${text2}</tr>
|
|
|
60083
60097
|
return "monospace";
|
|
60084
60098
|
}
|
|
60085
60099
|
var text2 = group.text;
|
|
60086
|
-
if (
|
|
60100
|
+
if (["\\imath", "\\jmath"].includes(text2)) {
|
|
60087
60101
|
return null;
|
|
60088
60102
|
}
|
|
60089
60103
|
if (symbols[mode][text2] && symbols[mode][text2].replace) {
|
|
@@ -60095,6 +60109,20 @@ ${text2}</tr>
|
|
|
60095
60109
|
}
|
|
60096
60110
|
return null;
|
|
60097
60111
|
};
|
|
60112
|
+
function isNumberPunctuation(group) {
|
|
60113
|
+
if (!group) {
|
|
60114
|
+
return false;
|
|
60115
|
+
}
|
|
60116
|
+
if (group.type === "mi" && group.children.length === 1) {
|
|
60117
|
+
var child = group.children[0];
|
|
60118
|
+
return child instanceof TextNode && child.text === ".";
|
|
60119
|
+
} else if (group.type === "mo" && group.children.length === 1 && group.getAttribute("separator") === "true" && group.getAttribute("lspace") === "0em" && group.getAttribute("rspace") === "0em") {
|
|
60120
|
+
var _child = group.children[0];
|
|
60121
|
+
return _child instanceof TextNode && _child.text === ",";
|
|
60122
|
+
} else {
|
|
60123
|
+
return false;
|
|
60124
|
+
}
|
|
60125
|
+
}
|
|
60098
60126
|
var buildExpression = function buildExpression2(expression, options, isOrdgroup) {
|
|
60099
60127
|
if (expression.length === 1) {
|
|
60100
60128
|
var group = buildGroup(expression[0], options);
|
|
@@ -60115,18 +60143,24 @@ ${text2}</tr>
|
|
|
60115
60143
|
} else if (_group.type === "mn" && lastGroup.type === "mn") {
|
|
60116
60144
|
lastGroup.children.push(..._group.children);
|
|
60117
60145
|
continue;
|
|
60118
|
-
} else if (_group
|
|
60119
|
-
|
|
60120
|
-
|
|
60121
|
-
|
|
60122
|
-
|
|
60146
|
+
} else if (isNumberPunctuation(_group) && lastGroup.type === "mn") {
|
|
60147
|
+
lastGroup.children.push(..._group.children);
|
|
60148
|
+
continue;
|
|
60149
|
+
} else if (_group.type === "mn" && isNumberPunctuation(lastGroup)) {
|
|
60150
|
+
_group.children = [...lastGroup.children, ..._group.children];
|
|
60151
|
+
groups.pop();
|
|
60152
|
+
} else if ((_group.type === "msup" || _group.type === "msub") && _group.children.length >= 1 && (lastGroup.type === "mn" || isNumberPunctuation(lastGroup))) {
|
|
60153
|
+
var base = _group.children[0];
|
|
60154
|
+
if (base instanceof MathNode && base.type === "mn") {
|
|
60155
|
+
base.children = [...lastGroup.children, ...base.children];
|
|
60156
|
+
groups.pop();
|
|
60123
60157
|
}
|
|
60124
60158
|
} else if (lastGroup.type === "mi" && lastGroup.children.length === 1) {
|
|
60125
60159
|
var lastChild = lastGroup.children[0];
|
|
60126
60160
|
if (lastChild instanceof TextNode && lastChild.text === "̸" && (_group.type === "mo" || _group.type === "mi" || _group.type === "mn")) {
|
|
60127
|
-
var
|
|
60128
|
-
if (
|
|
60129
|
-
|
|
60161
|
+
var child = _group.children[0];
|
|
60162
|
+
if (child instanceof TextNode && child.text.length > 0) {
|
|
60163
|
+
child.text = child.text.slice(0, 1) + "̸" + child.text.slice(1);
|
|
60130
60164
|
groups.pop();
|
|
60131
60165
|
}
|
|
60132
60166
|
}
|
|
@@ -60154,7 +60188,7 @@ ${text2}</tr>
|
|
|
60154
60188
|
function buildMathML(tree, texExpression, options, isDisplayMode, forMathmlOnly) {
|
|
60155
60189
|
var expression = buildExpression(tree, options);
|
|
60156
60190
|
var wrapper;
|
|
60157
|
-
if (expression.length === 1 && expression[0] instanceof MathNode &&
|
|
60191
|
+
if (expression.length === 1 && expression[0] instanceof MathNode && ["mrow", "mtable"].includes(expression[0].type)) {
|
|
60158
60192
|
wrapper = expression[0];
|
|
60159
60193
|
} else {
|
|
60160
60194
|
wrapper = new mathMLTree.MathNode("mrow", expression);
|
|
@@ -60321,7 +60355,7 @@ ${text2}</tr>
|
|
|
60321
60355
|
function buildSvgSpan_() {
|
|
60322
60356
|
var viewBoxWidth = 4e5;
|
|
60323
60357
|
var label = group.label.slice(1);
|
|
60324
|
-
if (
|
|
60358
|
+
if (["widehat", "widecheck", "widetilde", "utilde"].includes(label)) {
|
|
60325
60359
|
var grp = group;
|
|
60326
60360
|
var numChars = groupLength(grp.base);
|
|
60327
60361
|
var viewBoxHeight;
|
|
@@ -61676,11 +61710,11 @@ ${text2}</tr>
|
|
|
61676
61710
|
top = "\\Uparrow";
|
|
61677
61711
|
repeat = "‖";
|
|
61678
61712
|
bottom = "\\Downarrow";
|
|
61679
|
-
} else if (
|
|
61713
|
+
} else if (verts.includes(delim)) {
|
|
61680
61714
|
repeat = "∣";
|
|
61681
61715
|
svgLabel = "vert";
|
|
61682
61716
|
viewBoxWidth = 333;
|
|
61683
|
-
} else if (
|
|
61717
|
+
} else if (doubleVerts.includes(delim)) {
|
|
61684
61718
|
repeat = "∥";
|
|
61685
61719
|
svgLabel = "doublevert";
|
|
61686
61720
|
viewBoxWidth = 556;
|
|
@@ -61909,9 +61943,9 @@ ${text2}</tr>
|
|
|
61909
61943
|
} else if (delim === ">" || delim === "\\gt" || delim === "⟩") {
|
|
61910
61944
|
delim = "\\rangle";
|
|
61911
61945
|
}
|
|
61912
|
-
if (
|
|
61946
|
+
if (stackLargeDelimiters.includes(delim) || stackNeverDelimiters.includes(delim)) {
|
|
61913
61947
|
return makeLargeDelim(delim, size, false, options, mode, classes);
|
|
61914
|
-
} else if (
|
|
61948
|
+
} else if (stackAlwaysDelimiters.includes(delim)) {
|
|
61915
61949
|
return makeStackedDelim(delim, sizeToMaxHeight[size], false, options, mode, classes);
|
|
61916
61950
|
} else {
|
|
61917
61951
|
throw new ParseError("Illegal delimiter: '" + delim + "'");
|
|
@@ -62011,9 +62045,9 @@ ${text2}</tr>
|
|
|
62011
62045
|
delim = "\\rangle";
|
|
62012
62046
|
}
|
|
62013
62047
|
var sequence;
|
|
62014
|
-
if (
|
|
62048
|
+
if (stackNeverDelimiters.includes(delim)) {
|
|
62015
62049
|
sequence = stackNeverDelimiterSequence;
|
|
62016
|
-
} else if (
|
|
62050
|
+
} else if (stackLargeDelimiters.includes(delim)) {
|
|
62017
62051
|
sequence = stackLargeDelimiterSequence;
|
|
62018
62052
|
} else {
|
|
62019
62053
|
sequence = stackAlwaysDelimiterSequence;
|
|
@@ -62123,7 +62157,7 @@ ${text2}</tr>
|
|
|
62123
62157
|
var delimiters = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
|
|
62124
62158
|
function checkDelimiter(delim, context) {
|
|
62125
62159
|
var symDelim = checkSymbolNodeType(delim);
|
|
62126
|
-
if (symDelim &&
|
|
62160
|
+
if (symDelim && delimiters.includes(symDelim.text)) {
|
|
62127
62161
|
return symDelim;
|
|
62128
62162
|
} else if (symDelim) {
|
|
62129
62163
|
throw new ParseError("Invalid delimiter '" + symDelim.text + "' after '" + context.funcName + "'", delim);
|
|
@@ -63412,7 +63446,7 @@ ${text2}</tr>
|
|
|
63412
63446
|
numArgs: 0
|
|
63413
63447
|
},
|
|
63414
63448
|
handler(context) {
|
|
63415
|
-
if (
|
|
63449
|
+
if (["gather", "gather*"].includes(context.envName)) {
|
|
63416
63450
|
validateAmsEnvironmentContext(context);
|
|
63417
63451
|
}
|
|
63418
63452
|
var res = {
|
|
@@ -63565,6 +63599,7 @@ ${text2}</tr>
|
|
|
63565
63599
|
"\\mathit",
|
|
63566
63600
|
"\\mathbf",
|
|
63567
63601
|
"\\mathnormal",
|
|
63602
|
+
"\\mathsfit",
|
|
63568
63603
|
// families
|
|
63569
63604
|
"\\mathbb",
|
|
63570
63605
|
"\\mathcal",
|
|
@@ -64364,11 +64399,14 @@ ${text2}</tr>
|
|
|
64364
64399
|
case "\\htmlData": {
|
|
64365
64400
|
var data = value.split(",");
|
|
64366
64401
|
for (var i2 = 0; i2 < data.length; i2++) {
|
|
64367
|
-
var
|
|
64368
|
-
|
|
64369
|
-
|
|
64402
|
+
var item = data[i2];
|
|
64403
|
+
var firstEquals = item.indexOf("=");
|
|
64404
|
+
if (firstEquals < 0) {
|
|
64405
|
+
throw new ParseError("\\htmlData key/value '" + item + "' missing equals sign");
|
|
64370
64406
|
}
|
|
64371
|
-
|
|
64407
|
+
var key = item.slice(0, firstEquals);
|
|
64408
|
+
var _value = item.slice(firstEquals + 1);
|
|
64409
|
+
attributes["data-" + key.trim()] = _value;
|
|
64372
64410
|
}
|
|
64373
64411
|
trustContext = {
|
|
64374
64412
|
command: "\\htmlData",
|
|
@@ -64866,7 +64904,7 @@ ${text2}</tr>
|
|
|
64866
64904
|
}
|
|
64867
64905
|
var style = options.style;
|
|
64868
64906
|
var large = false;
|
|
64869
|
-
if (style.size === Style$1.DISPLAY.size && group.symbol && !
|
|
64907
|
+
if (style.size === Style$1.DISPLAY.size && group.symbol && !noSuccessor.includes(group.name)) {
|
|
64870
64908
|
large = true;
|
|
64871
64909
|
}
|
|
64872
64910
|
var base;
|
|
@@ -64932,7 +64970,7 @@ ${text2}</tr>
|
|
|
64932
64970
|
var node;
|
|
64933
64971
|
if (group.symbol) {
|
|
64934
64972
|
node = new MathNode("mo", [makeText(group.name, group.mode)]);
|
|
64935
|
-
if (
|
|
64973
|
+
if (noSuccessor.includes(group.name)) {
|
|
64936
64974
|
node.setAttribute("largeop", "false");
|
|
64937
64975
|
}
|
|
64938
64976
|
} else if (group.body) {
|
|
@@ -65071,7 +65109,8 @@ ${text2}</tr>
|
|
|
65071
65109
|
type: "op",
|
|
65072
65110
|
names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
|
|
65073
65111
|
props: {
|
|
65074
|
-
numArgs: 0
|
|
65112
|
+
numArgs: 0,
|
|
65113
|
+
allowedInArgument: true
|
|
65075
65114
|
},
|
|
65076
65115
|
handler(_ref5) {
|
|
65077
65116
|
var {
|
|
@@ -65414,7 +65453,8 @@ ${text2}</tr>
|
|
|
65414
65453
|
names: ["\\relax"],
|
|
65415
65454
|
props: {
|
|
65416
65455
|
numArgs: 0,
|
|
65417
|
-
allowedInText: true
|
|
65456
|
+
allowedInText: true,
|
|
65457
|
+
allowedInArgument: true
|
|
65418
65458
|
},
|
|
65419
65459
|
handler(_ref) {
|
|
65420
65460
|
var {
|
|
@@ -65432,6 +65472,8 @@ ${text2}</tr>
|
|
|
65432
65472
|
props: {
|
|
65433
65473
|
numArgs: 2,
|
|
65434
65474
|
numOptionalArgs: 1,
|
|
65475
|
+
allowedInText: true,
|
|
65476
|
+
allowedInMath: true,
|
|
65435
65477
|
argTypes: ["size", "size", "size"]
|
|
65436
65478
|
},
|
|
65437
65479
|
handler(_ref, args, optArgs) {
|
|
@@ -66550,7 +66592,7 @@ ${text2}</tr>
|
|
|
66550
66592
|
}
|
|
66551
66593
|
return "\\@char{" + number + "}";
|
|
66552
66594
|
});
|
|
66553
|
-
var newcommand = (context, existsOK, nonexistsOK) => {
|
|
66595
|
+
var newcommand = (context, existsOK, nonexistsOK, skipIfExists) => {
|
|
66554
66596
|
var arg = context.consumeArg().tokens;
|
|
66555
66597
|
if (arg.length !== 1) {
|
|
66556
66598
|
throw new ParseError("\\newcommand's first argument must be a macro name");
|
|
@@ -66578,15 +66620,17 @@ ${text2}</tr>
|
|
|
66578
66620
|
numArgs = parseInt(argText);
|
|
66579
66621
|
arg = context.consumeArg().tokens;
|
|
66580
66622
|
}
|
|
66581
|
-
|
|
66582
|
-
|
|
66583
|
-
|
|
66584
|
-
|
|
66623
|
+
if (!(exists && skipIfExists)) {
|
|
66624
|
+
context.macros.set(name, {
|
|
66625
|
+
tokens: arg,
|
|
66626
|
+
numArgs
|
|
66627
|
+
});
|
|
66628
|
+
}
|
|
66585
66629
|
return "";
|
|
66586
66630
|
};
|
|
66587
|
-
defineMacro("\\newcommand", (context) => newcommand(context, false, true));
|
|
66588
|
-
defineMacro("\\renewcommand", (context) => newcommand(context, true, false));
|
|
66589
|
-
defineMacro("\\providecommand", (context) => newcommand(context, true, true));
|
|
66631
|
+
defineMacro("\\newcommand", (context) => newcommand(context, false, true, false));
|
|
66632
|
+
defineMacro("\\renewcommand", (context) => newcommand(context, true, false, false));
|
|
66633
|
+
defineMacro("\\providecommand", (context) => newcommand(context, true, true, true));
|
|
66590
66634
|
defineMacro("\\message", (context) => {
|
|
66591
66635
|
var arg = context.consumeArgs(1)[0];
|
|
66592
66636
|
console.log(arg.reverse().map((token) => token.text).join(""));
|
|
@@ -66658,7 +66702,7 @@ ${text2}</tr>
|
|
|
66658
66702
|
defineMacro("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');
|
|
66659
66703
|
defineMacro("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');
|
|
66660
66704
|
defineMacro("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');
|
|
66661
|
-
defineMacro("\\vdots", "
|
|
66705
|
+
defineMacro("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");
|
|
66662
66706
|
defineMacro("⋮", "\\vdots");
|
|
66663
66707
|
defineMacro("\\varGamma", "\\mathit{\\Gamma}");
|
|
66664
66708
|
defineMacro("\\varDelta", "\\mathit{\\Delta}");
|
|
@@ -66677,6 +66721,8 @@ ${text2}</tr>
|
|
|
66677
66721
|
defineMacro("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
|
|
66678
66722
|
defineMacro("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
|
|
66679
66723
|
defineMacro("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
|
|
66724
|
+
defineMacro("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");
|
|
66725
|
+
defineMacro("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
|
|
66680
66726
|
var dotsByToken = {
|
|
66681
66727
|
",": "\\dotsc",
|
|
66682
66728
|
"\\not": "\\dotsb",
|
|
@@ -66740,7 +66786,7 @@ ${text2}</tr>
|
|
|
66740
66786
|
} else if (next.slice(0, 4) === "\\not") {
|
|
66741
66787
|
thedots = "\\dotsb";
|
|
66742
66788
|
} else if (next in symbols.math) {
|
|
66743
|
-
if (
|
|
66789
|
+
if (["bin", "rel"].includes(symbols.math[next].group)) {
|
|
66744
66790
|
thedots = "\\dotsb";
|
|
66745
66791
|
}
|
|
66746
66792
|
}
|
|
@@ -67200,7 +67246,7 @@ ${text2}</tr>
|
|
|
67200
67246
|
}
|
|
67201
67247
|
this.pushToken(new Token("EOF", end.loc));
|
|
67202
67248
|
this.pushTokens(tokens);
|
|
67203
|
-
return
|
|
67249
|
+
return new Token("", SourceLocation.range(start, end));
|
|
67204
67250
|
}
|
|
67205
67251
|
/**
|
|
67206
67252
|
* Consume all following space tokens, without expansion.
|
|
@@ -68162,7 +68208,11 @@ ${text2}</tr>
|
|
|
68162
68208
|
var symbol = symbolToken.text;
|
|
68163
68209
|
this.consume();
|
|
68164
68210
|
this.consumeSpaces();
|
|
68165
|
-
var group
|
|
68211
|
+
var group;
|
|
68212
|
+
do {
|
|
68213
|
+
var _group;
|
|
68214
|
+
group = this.parseGroup(name);
|
|
68215
|
+
} while (((_group = group) == null ? void 0 : _group.type) === "internal");
|
|
68166
68216
|
if (!group) {
|
|
68167
68217
|
throw new ParseError("Expected group after '" + symbol + "'", symbolToken);
|
|
68168
68218
|
}
|
|
@@ -68199,6 +68249,9 @@ ${text2}</tr>
|
|
|
68199
68249
|
*/
|
|
68200
68250
|
parseAtom(breakOnTokenText) {
|
|
68201
68251
|
var base = this.parseGroup("atom", breakOnTokenText);
|
|
68252
|
+
if ((base == null ? void 0 : base.type) === "internal") {
|
|
68253
|
+
return base;
|
|
68254
|
+
}
|
|
68202
68255
|
if (this.mode === "text") {
|
|
68203
68256
|
return base;
|
|
68204
68257
|
}
|
|
@@ -68410,11 +68463,11 @@ ${text2}</tr>
|
|
|
68410
68463
|
if (optional2) {
|
|
68411
68464
|
throw new ParseError("A primitive argument cannot be optional");
|
|
68412
68465
|
}
|
|
68413
|
-
var
|
|
68414
|
-
if (
|
|
68466
|
+
var _group2 = this.parseGroup(name);
|
|
68467
|
+
if (_group2 == null) {
|
|
68415
68468
|
throw new ParseError("Expected group as " + name, this.fetch());
|
|
68416
68469
|
}
|
|
68417
|
-
return
|
|
68470
|
+
return _group2;
|
|
68418
68471
|
}
|
|
68419
68472
|
case "original":
|
|
68420
68473
|
case null:
|
|
@@ -68479,7 +68532,7 @@ ${text2}</tr>
|
|
|
68479
68532
|
if (res == null) {
|
|
68480
68533
|
return null;
|
|
68481
68534
|
}
|
|
68482
|
-
var match = /^(#[a-f0-9]{3}
|
|
68535
|
+
var match = /^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);
|
|
68483
68536
|
if (!match) {
|
|
68484
68537
|
throw new ParseError("Invalid color: '" + res.text + "'", res);
|
|
68485
68538
|
}
|
|
@@ -68842,11 +68895,20 @@ ${text2}</tr>
|
|
|
68842
68895
|
return renderError(error2, expression, settings);
|
|
68843
68896
|
}
|
|
68844
68897
|
};
|
|
68898
|
+
var version = "0.16.27";
|
|
68899
|
+
var __domTree = {
|
|
68900
|
+
Span,
|
|
68901
|
+
Anchor,
|
|
68902
|
+
SymbolNode,
|
|
68903
|
+
SvgNode,
|
|
68904
|
+
PathNode,
|
|
68905
|
+
LineNode
|
|
68906
|
+
};
|
|
68845
68907
|
var katex = {
|
|
68846
68908
|
/**
|
|
68847
68909
|
* Current KaTeX version
|
|
68848
68910
|
*/
|
|
68849
|
-
version
|
|
68911
|
+
version,
|
|
68850
68912
|
/**
|
|
68851
68913
|
* Renders the given LaTeX into an HTML+MathML combination, and adds
|
|
68852
68914
|
* it as a child to the specified DOM node.
|
|
@@ -68862,7 +68924,7 @@ ${text2}</tr>
|
|
|
68862
68924
|
*/
|
|
68863
68925
|
ParseError,
|
|
68864
68926
|
/**
|
|
68865
|
-
* The
|
|
68927
|
+
* The schema of Settings
|
|
68866
68928
|
*/
|
|
68867
68929
|
SETTINGS_SCHEMA,
|
|
68868
68930
|
/**
|
|
@@ -68914,18 +68976,11 @@ ${text2}</tr>
|
|
|
68914
68976
|
/**
|
|
68915
68977
|
* Expose the dom tree node types, which can be useful for type checking nodes.
|
|
68916
68978
|
*
|
|
68917
|
-
* NOTE:
|
|
68979
|
+
* NOTE: These methods are not currently recommended for public use.
|
|
68918
68980
|
* The internal tree representation is unstable and is very likely
|
|
68919
68981
|
* to change. Use at your own risk.
|
|
68920
68982
|
*/
|
|
68921
|
-
__domTree
|
|
68922
|
-
Span,
|
|
68923
|
-
Anchor,
|
|
68924
|
-
SymbolNode,
|
|
68925
|
-
SvgNode,
|
|
68926
|
-
PathNode,
|
|
68927
|
-
LineNode
|
|
68928
|
-
}
|
|
68983
|
+
__domTree
|
|
68929
68984
|
};
|
|
68930
68985
|
function copyToClipboard(text2) {
|
|
68931
68986
|
return __async(this, null, function* () {
|
|
@@ -69151,7 +69206,7 @@ ${text2}</tr>
|
|
|
69151
69206
|
const codeBox = copyButton.closest(".lx-ui-code-box");
|
|
69152
69207
|
const codeElement = codeBox == null ? void 0 : codeBox.querySelector(".lx-ui-code-box-content");
|
|
69153
69208
|
if (codeElement) {
|
|
69154
|
-
const text2 = codeElement.textContent || "";
|
|
69209
|
+
const text2 = (codeElement.textContent || "").trim();
|
|
69155
69210
|
const success = yield copyToClipboard(text2);
|
|
69156
69211
|
if (success) {
|
|
69157
69212
|
onCopySuccess == null ? void 0 : onCopySuccess(text2);
|