1
0

add initial marp implementation with sample content and build configuration

This commit is contained in:
2025-09-13 18:13:22 +02:00
parent dcacc9b409
commit e5f219507f
10319 changed files with 1402023 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { PropertyList, Property } from '../Tree/Node.js';
export declare const INHERIT = "_inherit_";
export declare class Attributes {
protected attributes: PropertyList;
protected inherited: PropertyList;
protected defaults: PropertyList;
protected global: PropertyList;
constructor(defaults: PropertyList, global: PropertyList);
set(name: string, value: Property): void;
setList(list: PropertyList): void;
get(name: string): Property;
getExplicit(name: string): Property;
getList(...names: string[]): PropertyList;
setInherited(name: string, value: Property): void;
getInherited(name: string): Property;
getDefault(name: string): Property;
isSet(name: string): boolean;
hasDefault(name: string): boolean;
getExplicitNames(): string[];
getInheritedNames(): string[];
getDefaultNames(): string[];
getGlobalNames(): string[];
getAllAttributes(): PropertyList;
getAllInherited(): PropertyList;
getAllDefaults(): PropertyList;
getAllGlobals(): PropertyList;
}

107
node_modules/mathjax-full/js/core/MmlTree/Attributes.js generated vendored Normal file
View File

@@ -0,0 +1,107 @@
"use strict";
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Attributes = exports.INHERIT = void 0;
exports.INHERIT = '_inherit_';
var Attributes = (function () {
function Attributes(defaults, global) {
this.global = global;
this.defaults = Object.create(global);
this.inherited = Object.create(this.defaults);
this.attributes = Object.create(this.inherited);
Object.assign(this.defaults, defaults);
}
Attributes.prototype.set = function (name, value) {
this.attributes[name] = value;
};
Attributes.prototype.setList = function (list) {
Object.assign(this.attributes, list);
};
Attributes.prototype.get = function (name) {
var value = this.attributes[name];
if (value === exports.INHERIT) {
value = this.global[name];
}
return value;
};
Attributes.prototype.getExplicit = function (name) {
if (!this.attributes.hasOwnProperty(name)) {
return undefined;
}
return this.attributes[name];
};
Attributes.prototype.getList = function () {
var e_1, _a;
var names = [];
for (var _i = 0; _i < arguments.length; _i++) {
names[_i] = arguments[_i];
}
var values = {};
try {
for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
var name_1 = names_1_1.value;
values[name_1] = this.get(name_1);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (names_1_1 && !names_1_1.done && (_a = names_1.return)) _a.call(names_1);
}
finally { if (e_1) throw e_1.error; }
}
return values;
};
Attributes.prototype.setInherited = function (name, value) {
this.inherited[name] = value;
};
Attributes.prototype.getInherited = function (name) {
return this.inherited[name];
};
Attributes.prototype.getDefault = function (name) {
return this.defaults[name];
};
Attributes.prototype.isSet = function (name) {
return this.attributes.hasOwnProperty(name) || this.inherited.hasOwnProperty(name);
};
Attributes.prototype.hasDefault = function (name) {
return (name in this.defaults);
};
Attributes.prototype.getExplicitNames = function () {
return Object.keys(this.attributes);
};
Attributes.prototype.getInheritedNames = function () {
return Object.keys(this.inherited);
};
Attributes.prototype.getDefaultNames = function () {
return Object.keys(this.defaults);
};
Attributes.prototype.getGlobalNames = function () {
return Object.keys(this.global);
};
Attributes.prototype.getAllAttributes = function () {
return this.attributes;
};
Attributes.prototype.getAllInherited = function () {
return this.inherited;
};
Attributes.prototype.getAllDefaults = function () {
return this.defaults;
};
Attributes.prototype.getAllGlobals = function () {
return this.global;
};
return Attributes;
}());
exports.Attributes = Attributes;
//# sourceMappingURL=Attributes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Attributes.js","sourceRoot":"","sources":["../../../ts/core/MmlTree/Attributes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AA4Ba,QAAA,OAAO,GAAG,WAAW,CAAC;AAUnC;IAwBE,oBAAY,QAAsB,EAAE,MAAoB;QACtD,IAAI,CAAC,MAAM,GAAG,MAAM,C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S,CAAC;IACxB,CAAC;IAKM,mCAAc,GAArB;QACE,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAKM,kCAAa,GAApB;QACE,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAEH,iBAAC;AAAD,CAAC,AApLD,IAoLC;AApLY,gCAAU"}

View File

@@ -0,0 +1,33 @@
import { PropertyList } from '../Tree/Node.js';
import { MmlVisitor } from './MmlVisitor.js';
import { MmlNode, TextNode, XMLNode } from './MmlNode.js';
export declare type MmlNodeJSON = {
kind: string;
texClass: number;
isEmbellished?: boolean;
isSpacelike?: boolean;
isInferred?: boolean;
childNodes: MmlJSON[];
attributes: PropertyList;
inherited: PropertyList;
properties: PropertyList;
};
export declare type MmlTextJSON = {
kind: string;
text: string;
};
export declare type MmlXmlJSON = {
kind: string;
xml: any;
};
export declare type MmlJSON = MmlNodeJSON | MmlTextJSON | MmlXmlJSON;
export declare class JsonMmlVisitor extends MmlVisitor {
visitTree(node: MmlNode): MmlJSON;
visitTextNode(node: TextNode): MmlTextJSON;
visitXMLNode(node: XMLNode): MmlXmlJSON;
visitDefault(node: MmlNode): MmlJSON;
getChildren(node: MmlNode): MmlJSON[];
getAttributes(node: MmlNode): PropertyList;
getInherited(node: MmlNode): PropertyList;
getProperties(node: MmlNode): PropertyList;
}

View File

@@ -0,0 +1,95 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.JsonMmlVisitor = void 0;
var MmlVisitor_js_1 = require("./MmlVisitor.js");
var JsonMmlVisitor = (function (_super) {
__extends(JsonMmlVisitor, _super);
function JsonMmlVisitor() {
return _super !== null && _super.apply(this, arguments) || this;
}
JsonMmlVisitor.prototype.visitTree = function (node) {
return this.visitNode(node);
};
JsonMmlVisitor.prototype.visitTextNode = function (node) {
return { kind: node.kind, text: node.getText() };
};
JsonMmlVisitor.prototype.visitXMLNode = function (node) {
return { kind: node.kind, xml: node.getXML() };
};
JsonMmlVisitor.prototype.visitDefault = function (node) {
var json = {
kind: node.kind.replace(/inferredM/, 'm'),
texClass: node.texClass,
attributes: this.getAttributes(node),
inherited: this.getInherited(node),
properties: this.getProperties(node),
childNodes: this.getChildren(node)
};
if (node.isInferred) {
json.isInferred = true;
}
if (node.isEmbellished) {
json.isEmbellished = true;
}
if (node.isSpacelike) {
json.isSpacelike = true;
}
return json;
};
JsonMmlVisitor.prototype.getChildren = function (node) {
var e_1, _a;
var children = [];
try {
for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
children.push(this.visitNode(child));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return children;
};
JsonMmlVisitor.prototype.getAttributes = function (node) {
return Object.assign({}, node.attributes.getAllAttributes());
};
JsonMmlVisitor.prototype.getInherited = function (node) {
return Object.assign({}, node.attributes.getAllInherited());
};
JsonMmlVisitor.prototype.getProperties = function (node) {
return Object.assign({}, node.getAllProperties());
};
return JsonMmlVisitor;
}(MmlVisitor_js_1.MmlVisitor));
exports.JsonMmlVisitor = JsonMmlVisitor;
//# sourceMappingURL=JsonMmlVisitor.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"JsonMmlVisitor.js","sourceRoot":"","sources":["../../../ts/core/MmlTree/JsonMmlVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,iDAA2C;AAgC3C;IAAoC,kCAAU;IAA9C;;IA8FA,CAAC;IAvFQ,kCAAS,GAAhB,UAAiB,IAAa;QAC5B,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;IAMM,sCAAa,GAApB,UAAqB,IAAc;QACjC,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,EAAE,EAAC,CAAC;IACjD,CAAC;IAMM,qCAAY,GAAnB,UAAoB,IAAa;QAC/B,OAAO,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE,EAAC,CAAC;IAC/C,CAAC;IAYM,qCAAY,GAAnB,UAAoB,IAAa;QAC/B,IAAI,IAAI,GAAY;YAClB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,GAAG,CAAC;YACzC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YACpC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;YAClC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;YACpC,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;SACnC,CAAC;QACF,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;SACxB;QACD,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;SAC3B;QACD,IAAI,IAAI,CAAC,WAAW,EAAE;YACpB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;SACzB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAMM,oCAAW,GAAlB,UAAmB,IAAa;;QAC9B,IAAI,QAAQ,GAAG,EAAE,CAAC;;YAClB,KAAoB,IAAA,KAAA,SAAA,IAAI,CAAC,UAAU,CAAA,gBAAA,4BAAE;gBAAhC,IAAM,KAAK,WAAA;gBACd,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;aACtC;;;;;;;;;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAMM,sCAAa,GAApB,UAAqB,IAAa;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAC/D,CAAC;IAMM,qCAAY,GAAnB,UAAoB,IAAa;QAC/B,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9D,CAAC;IAMM,sCAAa,GAApB,UAAqB,IAAa;QAChC,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACpD,CAAC;IAEH,qBAAC;AAAD,CAAC,AA9FD,CAAoC,0BAAU,GA8F7C;AA9FY,wCAAc"}

View File

@@ -0,0 +1,11 @@
import { MmlVisitor } from './MmlVisitor.js';
import { MmlNode, TextNode, XMLNode } from './MmlNode.js';
export declare class LegacyMmlVisitor extends MmlVisitor {
visitTree(node: MmlNode): any;
visitTextNode(node: TextNode, parent: any): void;
visitXMLNode(node: XMLNode, parent: any): void;
visitInferredMrowNode(node: MmlNode, parent: any): void;
visitDefault(node: MmlNode, parent: any): void;
addAttributes(node: MmlNode, mml: any): void;
addProperties(node: MmlNode, mml: any): void;
}

View File

@@ -0,0 +1,124 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.LegacyMmlVisitor = void 0;
var MmlVisitor_js_1 = require("./MmlVisitor.js");
var MML = MathJax.ElementJax.mml;
var LegacyMmlVisitor = (function (_super) {
__extends(LegacyMmlVisitor, _super);
function LegacyMmlVisitor() {
return _super !== null && _super.apply(this, arguments) || this;
}
LegacyMmlVisitor.prototype.visitTree = function (node) {
var root = MML.mrow();
this.visitNode(node, root);
root = root.data[0];
root.parent = null;
return root;
};
LegacyMmlVisitor.prototype.visitTextNode = function (node, parent) {
parent.Append(MML.chars(node.getText()));
};
LegacyMmlVisitor.prototype.visitXMLNode = function (node, parent) {
parent.Append(MML.xml(node.getXML()));
};
LegacyMmlVisitor.prototype.visitInferredMrowNode = function (node, parent) {
var e_1, _a;
try {
for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
this.visitNode(child, parent);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
};
LegacyMmlVisitor.prototype.visitDefault = function (node, parent) {
var e_2, _a;
var mml = MML[node.kind]();
this.addAttributes(node, mml);
this.addProperties(node, mml);
try {
for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
this.visitNode(child, mml);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
parent.Append(mml);
};
LegacyMmlVisitor.prototype.addAttributes = function (node, mml) {
var e_3, _a;
var attributes = node.attributes;
var names = attributes.getExplicitNames();
try {
for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
var name_1 = names_1_1.value;
mml[name_1] = attributes.getExplicit(name_1);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (names_1_1 && !names_1_1.done && (_a = names_1.return)) _a.call(names_1);
}
finally { if (e_3) throw e_3.error; }
}
};
LegacyMmlVisitor.prototype.addProperties = function (node, mml) {
var e_4, _a;
var names = node.getPropertyNames();
try {
for (var names_2 = __values(names), names_2_1 = names_2.next(); !names_2_1.done; names_2_1 = names_2.next()) {
var name_2 = names_2_1.value;
mml[name_2] = node.getProperty(name_2);
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (names_2_1 && !names_2_1.done && (_a = names_2.return)) _a.call(names_2);
}
finally { if (e_4) throw e_4.error; }
}
};
return LegacyMmlVisitor;
}(MmlVisitor_js_1.MmlVisitor));
exports.LegacyMmlVisitor = LegacyMmlVisitor;
//# sourceMappingURL=LegacyMmlVisitor.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"LegacyMmlVisitor.js","sourceRoot":"","sources":["../../../ts/core/MmlTree/LegacyMmlVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,iDAA2C;AAO3C,IAAI,GAAG,GAAG,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hC,IAAM,KAAK,WAAA;gBACd,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;aAC5B;;;;;;;;;QACD,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAMM,wCAAa,GAApB,UAAqB,IAAa,EAAE,GAAQ;;QAC1C,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjC,IAAI,KAAK,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;;YAC1C,KAAmB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE;gBAArB,IAAM,MAAI,kBAAA;gBACb,GAAG,CAAC,MAAI,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,MAAI,CAAC,CAAC;aAC1C;;;;;;;;;IACH,CAAC;IAMM,wCAAa,GAApB,UAAqB,IAAa,EAAE,GAAQ;;QAC1C,IAAI,KAAK,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;;YACpC,KAAmB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE;gBAArB,IAAM,MAAI,kBAAA;gBACb,GAAG,CAAC,MAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAI,CAAC,CAAC;aACpC;;;;;;;;;IACH,CAAC;IAEH,uBAAC;AAAD,CAAC,AA1FD,CAAsC,0BAAU,GA0F/C;AA1FY,4CAAgB"}

4
node_modules/mathjax-full/js/core/MmlTree/MML.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import { MmlNodeClass } from './MmlNode.js';
export declare let MML: {
[kind: string]: MmlNodeClass;
};

80
node_modules/mathjax-full/js/core/MmlTree/MML.js generated vendored Normal file
View File

@@ -0,0 +1,80 @@
"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MML = void 0;
var MmlNode_js_1 = require("./MmlNode.js");
var math_js_1 = require("./MmlNodes/math.js");
var mi_js_1 = require("./MmlNodes/mi.js");
var mn_js_1 = require("./MmlNodes/mn.js");
var mo_js_1 = require("./MmlNodes/mo.js");
var mtext_js_1 = require("./MmlNodes/mtext.js");
var mspace_js_1 = require("./MmlNodes/mspace.js");
var ms_js_1 = require("./MmlNodes/ms.js");
var mrow_js_1 = require("./MmlNodes/mrow.js");
var mfrac_js_1 = require("./MmlNodes/mfrac.js");
var msqrt_js_1 = require("./MmlNodes/msqrt.js");
var mroot_js_1 = require("./MmlNodes/mroot.js");
var mstyle_js_1 = require("./MmlNodes/mstyle.js");
var merror_js_1 = require("./MmlNodes/merror.js");
var mpadded_js_1 = require("./MmlNodes/mpadded.js");
var mphantom_js_1 = require("./MmlNodes/mphantom.js");
var mfenced_js_1 = require("./MmlNodes/mfenced.js");
var menclose_js_1 = require("./MmlNodes/menclose.js");
var maction_js_1 = require("./MmlNodes/maction.js");
var msubsup_js_1 = require("./MmlNodes/msubsup.js");
var munderover_js_1 = require("./MmlNodes/munderover.js");
var mmultiscripts_js_1 = require("./MmlNodes/mmultiscripts.js");
var mtable_js_1 = require("./MmlNodes/mtable.js");
var mtr_js_1 = require("./MmlNodes/mtr.js");
var mtd_js_1 = require("./MmlNodes/mtd.js");
var maligngroup_js_1 = require("./MmlNodes/maligngroup.js");
var malignmark_js_1 = require("./MmlNodes/malignmark.js");
var mglyph_js_1 = require("./MmlNodes/mglyph.js");
var semantics_js_1 = require("./MmlNodes/semantics.js");
var TeXAtom_js_1 = require("./MmlNodes/TeXAtom.js");
var mathchoice_js_1 = require("./MmlNodes/mathchoice.js");
exports.MML = (_a = {},
_a[math_js_1.MmlMath.prototype.kind] = math_js_1.MmlMath,
_a[mi_js_1.MmlMi.prototype.kind] = mi_js_1.MmlMi,
_a[mn_js_1.MmlMn.prototype.kind] = mn_js_1.MmlMn,
_a[mo_js_1.MmlMo.prototype.kind] = mo_js_1.MmlMo,
_a[mtext_js_1.MmlMtext.prototype.kind] = mtext_js_1.MmlMtext,
_a[mspace_js_1.MmlMspace.prototype.kind] = mspace_js_1.MmlMspace,
_a[ms_js_1.MmlMs.prototype.kind] = ms_js_1.MmlMs,
_a[mrow_js_1.MmlMrow.prototype.kind] = mrow_js_1.MmlMrow,
_a[mrow_js_1.MmlInferredMrow.prototype.kind] = mrow_js_1.MmlInferredMrow,
_a[mfrac_js_1.MmlMfrac.prototype.kind] = mfrac_js_1.MmlMfrac,
_a[msqrt_js_1.MmlMsqrt.prototype.kind] = msqrt_js_1.MmlMsqrt,
_a[mroot_js_1.MmlMroot.prototype.kind] = mroot_js_1.MmlMroot,
_a[mstyle_js_1.MmlMstyle.prototype.kind] = mstyle_js_1.MmlMstyle,
_a[merror_js_1.MmlMerror.prototype.kind] = merror_js_1.MmlMerror,
_a[mpadded_js_1.MmlMpadded.prototype.kind] = mpadded_js_1.MmlMpadded,
_a[mphantom_js_1.MmlMphantom.prototype.kind] = mphantom_js_1.MmlMphantom,
_a[mfenced_js_1.MmlMfenced.prototype.kind] = mfenced_js_1.MmlMfenced,
_a[menclose_js_1.MmlMenclose.prototype.kind] = menclose_js_1.MmlMenclose,
_a[maction_js_1.MmlMaction.prototype.kind] = maction_js_1.MmlMaction,
_a[msubsup_js_1.MmlMsub.prototype.kind] = msubsup_js_1.MmlMsub,
_a[msubsup_js_1.MmlMsup.prototype.kind] = msubsup_js_1.MmlMsup,
_a[msubsup_js_1.MmlMsubsup.prototype.kind] = msubsup_js_1.MmlMsubsup,
_a[munderover_js_1.MmlMunder.prototype.kind] = munderover_js_1.MmlMunder,
_a[munderover_js_1.MmlMover.prototype.kind] = munderover_js_1.MmlMover,
_a[munderover_js_1.MmlMunderover.prototype.kind] = munderover_js_1.MmlMunderover,
_a[mmultiscripts_js_1.MmlMmultiscripts.prototype.kind] = mmultiscripts_js_1.MmlMmultiscripts,
_a[mmultiscripts_js_1.MmlMprescripts.prototype.kind] = mmultiscripts_js_1.MmlMprescripts,
_a[mmultiscripts_js_1.MmlNone.prototype.kind] = mmultiscripts_js_1.MmlNone,
_a[mtable_js_1.MmlMtable.prototype.kind] = mtable_js_1.MmlMtable,
_a[mtr_js_1.MmlMlabeledtr.prototype.kind] = mtr_js_1.MmlMlabeledtr,
_a[mtr_js_1.MmlMtr.prototype.kind] = mtr_js_1.MmlMtr,
_a[mtd_js_1.MmlMtd.prototype.kind] = mtd_js_1.MmlMtd,
_a[maligngroup_js_1.MmlMaligngroup.prototype.kind] = maligngroup_js_1.MmlMaligngroup,
_a[malignmark_js_1.MmlMalignmark.prototype.kind] = malignmark_js_1.MmlMalignmark,
_a[mglyph_js_1.MmlMglyph.prototype.kind] = mglyph_js_1.MmlMglyph,
_a[semantics_js_1.MmlSemantics.prototype.kind] = semantics_js_1.MmlSemantics,
_a[semantics_js_1.MmlAnnotation.prototype.kind] = semantics_js_1.MmlAnnotation,
_a[semantics_js_1.MmlAnnotationXML.prototype.kind] = semantics_js_1.MmlAnnotationXML,
_a[TeXAtom_js_1.TeXAtom.prototype.kind] = TeXAtom_js_1.TeXAtom,
_a[mathchoice_js_1.MathChoice.prototype.kind] = mathchoice_js_1.MathChoice,
_a[MmlNode_js_1.TextNode.prototype.kind] = MmlNode_js_1.TextNode,
_a[MmlNode_js_1.XMLNode.prototype.kind] = MmlNode_js_1.XMLNode,
_a);
//# sourceMappingURL=MML.js.map

1
node_modules/mathjax-full/js/core/MmlTree/MML.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MML.js","sourceRoot":"","sources":["../../../ts/core/MmlTree/MML.ts"],"names":[],"mappings":";;;;AAuBA,2CAA6D;AAE7D,8CAAgD;AAEhD,0CAA8C;AAC9C,0CAA8C;AAC9C,0CAA8C;AAC9C,gDAAiD;AACjD,kDAAkD;AAClD,0CAA8C;AAE9C,8CAA4D;AAC5D,gDAAiD;AACjD,gDAAiD;AACjD,gDAAiD;AACjD,kDAAkD;AAClD,kDAAkD;AAClD,oDAAmD;AACnD,sDAAoD;AACpD,oDAAmD;AACnD,sDAAoD;AAEpD,oDAAmD;AAEnD,oDAAyE;AACzE,0DAA4E;AAC5E,gEAAsF;AAE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SAAS,CAAC,IAAI,IAAG,qBAAQ;IACnC,GAAC,oBAAO,CAAC,SAAS,CAAC,IAAI,IAAG,oBAAO;QACjC"}

View File

@@ -0,0 +1,11 @@
import { MmlVisitor } from './MmlVisitor.js';
import { MmlNode, TextNode, XMLNode } from './MmlNode.js';
export declare class MathMLVisitor extends MmlVisitor {
protected document: Document;
visitTree(node: MmlNode, document: Document): Node;
visitTextNode(node: TextNode, parent: Element): void;
visitXMLNode(node: XMLNode, parent: Element): void;
visitInferredMrowNode(node: MmlNode, parent: Element): void;
visitDefault(node: MmlNode, parent: Element): void;
addAttributes(node: MmlNode, mml: Element): void;
}

View File

@@ -0,0 +1,107 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MathMLVisitor = void 0;
var MmlVisitor_js_1 = require("./MmlVisitor.js");
var MathMLVisitor = (function (_super) {
__extends(MathMLVisitor, _super);
function MathMLVisitor() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.document = null;
return _this;
}
MathMLVisitor.prototype.visitTree = function (node, document) {
this.document = document;
var root = document.createElement('top');
this.visitNode(node, root);
this.document = null;
return root.firstChild;
};
MathMLVisitor.prototype.visitTextNode = function (node, parent) {
parent.appendChild(this.document.createTextNode(node.getText()));
};
MathMLVisitor.prototype.visitXMLNode = function (node, parent) {
parent.appendChild(node.getXML().cloneNode(true));
};
MathMLVisitor.prototype.visitInferredMrowNode = function (node, parent) {
var e_1, _a;
try {
for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
this.visitNode(child, parent);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
};
MathMLVisitor.prototype.visitDefault = function (node, parent) {
var e_2, _a;
var mml = this.document.createElement(node.kind);
this.addAttributes(node, mml);
try {
for (var _b = __values(node.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
this.visitNode(child, mml);
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
parent.appendChild(mml);
};
MathMLVisitor.prototype.addAttributes = function (node, mml) {
var e_3, _a;
var attributes = node.attributes;
var names = attributes.getExplicitNames();
try {
for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {
var name_1 = names_1_1.value;
mml.setAttribute(name_1, attributes.getExplicit(name_1).toString());
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (names_1_1 && !names_1_1.done && (_a = names_1.return)) _a.call(names_1);
}
finally { if (e_3) throw e_3.error; }
}
};
return MathMLVisitor;
}(MmlVisitor_js_1.MmlVisitor));
exports.MathMLVisitor = MathMLVisitor;
//# sourceMappingURL=MathMLVisitor.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MathMLVisitor.js","sourceRoot":"","sources":["../../../ts/core/MmlTree/MathMLVisitor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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AC,UAAU,CAAA,gBAAA,4BAAE;gBAAhC,IAAM,KAAK,WAAA;gBACd,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;aAC5B;;;;;;;;;QACD,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;IAKM,qCAAa,GAApB,UAAqB,IAAa,EAAE,GAAY;;QAC9C,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACjC,IAAI,KAAK,GAAG,UAAU,CAAC,gBAAgB,EAAE,CAAC;;YAC1C,KAAmB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE;gBAArB,IAAM,MAAI,kBAAA;gBACb,GAAG,CAAC,YAAY,CAAC,MAAI,EAAE,UAAU,CAAC,WAAW,CAAC,MAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;aACjE;;;;;;;;;IACH,CAAC;IAEH,oBAAC;AAAD,CAAC,AAhFD,CAAmC,0BAAU,GAgF5C;AAhFY,sCAAa"}

View File

@@ -0,0 +1,8 @@
import { AbstractNodeFactory } from '../Tree/NodeFactory.js';
import { MmlNode, MmlNodeClass } from './MmlNode.js';
export declare class MmlFactory extends AbstractNodeFactory<MmlNode, MmlNodeClass> {
static defaultNodes: {
[kind: string]: MmlNodeClass;
};
get MML(): Object;
}

View File

@@ -0,0 +1,37 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlFactory = void 0;
var NodeFactory_js_1 = require("../Tree/NodeFactory.js");
var MML_js_1 = require("./MML.js");
var MmlFactory = (function (_super) {
__extends(MmlFactory, _super);
function MmlFactory() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlFactory.prototype, "MML", {
get: function () {
return this.node;
},
enumerable: false,
configurable: true
});
MmlFactory.defaultNodes = MML_js_1.MML;
return MmlFactory;
}(NodeFactory_js_1.AbstractNodeFactory));
exports.MmlFactory = MmlFactory;
//# sourceMappingURL=MmlFactory.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MmlFactory.js","sourceRoot":"","sources":["../../../ts/core/MmlTree/MmlFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,yDAA2D;AAE3D,mCAA6B;AAO7B;IAAgC,8BAA0C;IAA1E;;IAeA,CAAC;IAJC,sBAAI,2BAAG;aAAP;YACE,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;;;OAAA;IARa,uBAAY,GAAG,YAAG,CAAC;IAUnC,iBAAC;CAAA,AAfD,CAAgC,oCAAmB,GAelD;AAfY,gCAAU"}

175
node_modules/mathjax-full/js/core/MmlTree/MmlNode.d.ts generated vendored Normal file
View File

@@ -0,0 +1,175 @@
import { Attributes } from './Attributes.js';
import { Property, PropertyList, Node, AbstractNode, AbstractEmptyNode, NodeClass } from '../Tree/Node.js';
import { MmlFactory } from './MmlFactory.js';
import { DOMAdaptor } from '../DOMAdaptor.js';
export declare type AttributeList = {
[attribute: string]: [string, Property];
};
export declare const TEXCLASS: {
ORD: number;
OP: number;
BIN: number;
REL: number;
OPEN: number;
CLOSE: number;
PUNCT: number;
INNER: number;
VCENTER: number;
NONE: number;
};
export declare const TEXCLASSNAMES: string[];
export declare const indentAttributes: string[];
export declare type MMLNODE = MmlNode | TextNode | XMLNode;
export interface MmlNode extends Node {
readonly isToken: boolean;
readonly isEmbellished: boolean;
readonly isSpacelike: boolean;
readonly linebreakContainer: boolean;
readonly hasNewLine: boolean;
readonly arity: number;
readonly isInferred: boolean;
readonly Parent: MmlNode;
readonly notParent: boolean;
parent: MmlNode;
texClass: number;
prevClass: number;
prevLevel: number;
attributes: Attributes;
core(): MmlNode;
coreMO(): MmlNode;
coreIndex(): number;
childPosition(): number;
setTeXclass(prev: MmlNode): MmlNode;
texSpacing(): string;
hasSpacingAttributes(): boolean;
setInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
inheritAttributesFrom(node: MmlNode): void;
mError(message: string, options: PropertyList, short?: boolean): MmlNode;
verifyTree(options?: PropertyList): void;
}
export interface MmlNodeClass extends NodeClass {
defaults?: PropertyList;
new (factory: MmlFactory, attributes?: PropertyList, children?: MmlNode[]): MmlNode;
}
export declare abstract class AbstractMmlNode extends AbstractNode implements MmlNode {
static defaults: PropertyList;
static noInherit: {
[node1: string]: {
[node2: string]: {
[attribute: string]: boolean;
};
};
};
static alwaysInherit: {
[name: string]: boolean;
};
static verifyDefaults: PropertyList;
prevClass: number;
prevLevel: number;
attributes: Attributes;
childNodes: MmlNode[];
parent: MmlNode;
readonly factory: MmlFactory;
protected texclass: number;
constructor(factory: MmlFactory, attributes?: PropertyList, children?: MmlNode[]);
copy(keepIds?: boolean): AbstractMmlNode;
get texClass(): number;
set texClass(texClass: number);
get isToken(): boolean;
get isEmbellished(): boolean;
get isSpacelike(): boolean;
get linebreakContainer(): boolean;
get hasNewLine(): boolean;
get arity(): number;
get isInferred(): boolean;
get Parent(): MmlNode;
get notParent(): boolean;
setChildren(children: MmlNode[]): void;
appendChild(child: MmlNode): Node;
replaceChild(newChild: MmlNode, oldChild: MmlNode): Node;
core(): MmlNode;
coreMO(): MmlNode;
coreIndex(): number;
childPosition(): number;
setTeXclass(prev: MmlNode): MmlNode;
protected updateTeXclass(core: MmlNode): void;
protected getPrevClass(prev: MmlNode): void;
texSpacing(): string;
hasSpacingAttributes(): boolean;
setInheritedAttributes(attributes?: AttributeList, display?: boolean, level?: number, prime?: boolean): void;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
protected addInheritedAttributes(current: AttributeList, attributes: PropertyList): AttributeList;
inheritAttributesFrom(node: MmlNode): void;
verifyTree(options?: PropertyList): void;
protected verifyAttributes(options: PropertyList): void;
protected verifyChildren(options: PropertyList): void;
mError(message: string, options: PropertyList, short?: boolean): MmlNode;
}
export declare abstract class AbstractMmlTokenNode extends AbstractMmlNode {
static defaults: PropertyList;
get isToken(): boolean;
getText(): string;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
walkTree(func: (node: Node, data?: any) => void, data?: any): any;
}
export declare abstract class AbstractMmlLayoutNode extends AbstractMmlNode {
static defaults: PropertyList;
get isSpacelike(): boolean;
get isEmbellished(): boolean;
get arity(): number;
core(): MmlNode;
coreMO(): MmlNode;
setTeXclass(prev: MmlNode): MmlNode;
}
export declare abstract class AbstractMmlBaseNode extends AbstractMmlNode {
static defaults: PropertyList;
get isEmbellished(): boolean;
core(): MmlNode;
coreMO(): MmlNode;
setTeXclass(prev: MmlNode): MmlNode;
}
export declare abstract class AbstractMmlEmptyNode extends AbstractEmptyNode implements MmlNode {
parent: MmlNode;
get isToken(): boolean;
get isEmbellished(): boolean;
get isSpacelike(): boolean;
get linebreakContainer(): boolean;
get hasNewLine(): boolean;
get arity(): number;
get isInferred(): boolean;
get notParent(): boolean;
get Parent(): MmlNode;
get texClass(): number;
get prevClass(): number;
get prevLevel(): number;
hasSpacingAttributes(): boolean;
get attributes(): Attributes;
core(): MmlNode;
coreMO(): MmlNode;
coreIndex(): number;
childPosition(): number;
setTeXclass(prev: MmlNode): MmlNode;
texSpacing(): string;
setInheritedAttributes(_attributes: AttributeList, _display: boolean, _level: number, _prime: boolean): void;
inheritAttributesFrom(_node: MmlNode): void;
verifyTree(_options: PropertyList): void;
mError(_message: string, _options: PropertyList, _short?: boolean): MmlNode;
}
export declare class TextNode extends AbstractMmlEmptyNode {
protected text: string;
get kind(): string;
getText(): string;
setText(text: string): TextNode;
copy(): TextNode;
toString(): string;
}
export declare class XMLNode extends AbstractMmlEmptyNode {
protected xml: Object;
protected adaptor: DOMAdaptor<any, any, any>;
get kind(): string;
getXML(): Object;
setXML(xml: Object, adaptor?: DOMAdaptor<any, any, any>): XMLNode;
getSerializedXML(): string;
copy(): XMLNode;
toString(): string;
}

924
node_modules/mathjax-full/js/core/MmlTree/MmlNode.js generated vendored Normal file
View File

@@ -0,0 +1,924 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.XMLNode = exports.TextNode = exports.AbstractMmlEmptyNode = exports.AbstractMmlBaseNode = exports.AbstractMmlLayoutNode = exports.AbstractMmlTokenNode = exports.AbstractMmlNode = exports.indentAttributes = exports.TEXCLASSNAMES = exports.TEXCLASS = void 0;
var Attributes_js_1 = require("./Attributes.js");
var Node_js_1 = require("../Tree/Node.js");
exports.TEXCLASS = {
ORD: 0,
OP: 1,
BIN: 2,
REL: 3,
OPEN: 4,
CLOSE: 5,
PUNCT: 6,
INNER: 7,
VCENTER: 8,
NONE: -1
};
exports.TEXCLASSNAMES = ['ORD', 'OP', 'BIN', 'REL', 'OPEN', 'CLOSE', 'PUNCT', 'INNER', 'VCENTER'];
var TEXSPACELENGTH = ['', 'thinmathspace', 'mediummathspace', 'thickmathspace'];
var TEXSPACE = [
[0, -1, 2, 3, 0, 0, 0, 1],
[-1, -1, 0, 3, 0, 0, 0, 1],
[2, 2, 0, 0, 2, 0, 0, 2],
[3, 3, 0, 0, 3, 0, 0, 3],
[0, 0, 0, 0, 0, 0, 0, 0],
[0, -1, 2, 3, 0, 0, 0, 1],
[1, 1, 0, 1, 1, 1, 1, 1],
[1, -1, 2, 3, 1, 0, 1, 1]
];
exports.indentAttributes = [
'indentalign', 'indentalignfirst',
'indentshift', 'indentshiftfirst'
];
var AbstractMmlNode = (function (_super) {
__extends(AbstractMmlNode, _super);
function AbstractMmlNode(factory, attributes, children) {
if (attributes === void 0) { attributes = {}; }
if (children === void 0) { children = []; }
var _this = _super.call(this, factory) || this;
_this.prevClass = null;
_this.prevLevel = null;
_this.texclass = null;
if (_this.arity < 0) {
_this.childNodes = [factory.create('inferredMrow')];
_this.childNodes[0].parent = _this;
}
_this.setChildren(children);
_this.attributes = new Attributes_js_1.Attributes(factory.getNodeClass(_this.kind).defaults, factory.getNodeClass('math').defaults);
_this.attributes.setList(attributes);
return _this;
}
AbstractMmlNode.prototype.copy = function (keepIds) {
var e_1, _a, e_2, _b;
if (keepIds === void 0) { keepIds = false; }
var node = this.factory.create(this.kind);
node.properties = __assign({}, this.properties);
if (this.attributes) {
var attributes = this.attributes.getAllAttributes();
try {
for (var _c = __values(Object.keys(attributes)), _d = _c.next(); !_d.done; _d = _c.next()) {
var name_1 = _d.value;
if (name_1 !== 'id' || keepIds) {
node.attributes.set(name_1, attributes[name_1]);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
}
if (this.childNodes && this.childNodes.length) {
var children = this.childNodes;
if (children.length === 1 && children[0].isInferred) {
children = children[0].childNodes;
}
try {
for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {
var child = children_1_1.value;
if (child) {
node.appendChild(child.copy());
}
else {
node.childNodes.push(null);
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (children_1_1 && !children_1_1.done && (_b = children_1.return)) _b.call(children_1);
}
finally { if (e_2) throw e_2.error; }
}
}
return node;
};
Object.defineProperty(AbstractMmlNode.prototype, "texClass", {
get: function () {
return this.texclass;
},
set: function (texClass) {
this.texclass = texClass;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "isToken", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "isEmbellished", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "isSpacelike", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "linebreakContainer", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "hasNewLine", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "arity", {
get: function () {
return Infinity;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "isInferred", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "Parent", {
get: function () {
var parent = this.parent;
while (parent && parent.notParent) {
parent = parent.Parent;
}
return parent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlNode.prototype, "notParent", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
AbstractMmlNode.prototype.setChildren = function (children) {
if (this.arity < 0) {
return this.childNodes[0].setChildren(children);
}
return _super.prototype.setChildren.call(this, children);
};
AbstractMmlNode.prototype.appendChild = function (child) {
var e_3, _a;
var _this = this;
if (this.arity < 0) {
this.childNodes[0].appendChild(child);
return child;
}
if (child.isInferred) {
if (this.arity === Infinity) {
child.childNodes.forEach(function (node) { return _super.prototype.appendChild.call(_this, node); });
return child;
}
var original = child;
child = this.factory.create('mrow');
child.setChildren(original.childNodes);
child.attributes = original.attributes;
try {
for (var _b = __values(original.getPropertyNames()), _c = _b.next(); !_c.done; _c = _b.next()) {
var name_2 = _c.value;
child.setProperty(name_2, original.getProperty(name_2));
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
}
return _super.prototype.appendChild.call(this, child);
};
AbstractMmlNode.prototype.replaceChild = function (newChild, oldChild) {
if (this.arity < 0) {
this.childNodes[0].replaceChild(newChild, oldChild);
return newChild;
}
return _super.prototype.replaceChild.call(this, newChild, oldChild);
};
AbstractMmlNode.prototype.core = function () {
return this;
};
AbstractMmlNode.prototype.coreMO = function () {
return this;
};
AbstractMmlNode.prototype.coreIndex = function () {
return 0;
};
AbstractMmlNode.prototype.childPosition = function () {
var e_4, _a;
var child = this;
var parent = child.parent;
while (parent && parent.notParent) {
child = parent;
parent = parent.parent;
}
if (parent) {
var i = 0;
try {
for (var _b = __values(parent.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var node = _c.value;
if (node === child) {
return i;
}
i++;
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_4) throw e_4.error; }
}
}
return null;
};
AbstractMmlNode.prototype.setTeXclass = function (prev) {
this.getPrevClass(prev);
return (this.texClass != null ? this : prev);
};
AbstractMmlNode.prototype.updateTeXclass = function (core) {
if (core) {
this.prevClass = core.prevClass;
this.prevLevel = core.prevLevel;
core.prevClass = core.prevLevel = null;
this.texClass = core.texClass;
}
};
AbstractMmlNode.prototype.getPrevClass = function (prev) {
if (prev) {
this.prevClass = prev.texClass;
this.prevLevel = prev.attributes.get('scriptlevel');
}
};
AbstractMmlNode.prototype.texSpacing = function () {
var prevClass = (this.prevClass != null ? this.prevClass : exports.TEXCLASS.NONE);
var texClass = this.texClass || exports.TEXCLASS.ORD;
if (prevClass === exports.TEXCLASS.NONE || texClass === exports.TEXCLASS.NONE) {
return '';
}
if (prevClass === exports.TEXCLASS.VCENTER) {
prevClass = exports.TEXCLASS.ORD;
}
if (texClass === exports.TEXCLASS.VCENTER) {
texClass = exports.TEXCLASS.ORD;
}
var space = TEXSPACE[prevClass][texClass];
if ((this.prevLevel > 0 || this.attributes.get('scriptlevel') > 0) && space >= 0) {
return '';
}
return TEXSPACELENGTH[Math.abs(space)];
};
AbstractMmlNode.prototype.hasSpacingAttributes = function () {
return this.isEmbellished && this.coreMO().hasSpacingAttributes();
};
AbstractMmlNode.prototype.setInheritedAttributes = function (attributes, display, level, prime) {
var e_5, _a;
if (attributes === void 0) { attributes = {}; }
if (display === void 0) { display = false; }
if (level === void 0) { level = 0; }
if (prime === void 0) { prime = false; }
var defaults = this.attributes.getAllDefaults();
try {
for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
var key = _c.value;
if (defaults.hasOwnProperty(key) || AbstractMmlNode.alwaysInherit.hasOwnProperty(key)) {
var _d = __read(attributes[key], 2), node = _d[0], value = _d[1];
var noinherit = (AbstractMmlNode.noInherit[node] || {})[this.kind] || {};
if (!noinherit[key]) {
this.attributes.setInherited(key, value);
}
}
}
}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_5) throw e_5.error; }
}
var displaystyle = this.attributes.getExplicit('displaystyle');
if (displaystyle === undefined) {
this.attributes.setInherited('displaystyle', display);
}
var scriptlevel = this.attributes.getExplicit('scriptlevel');
if (scriptlevel === undefined) {
this.attributes.setInherited('scriptlevel', level);
}
if (prime) {
this.setProperty('texprimestyle', prime);
}
var arity = this.arity;
if (arity >= 0 && arity !== Infinity && ((arity === 1 && this.childNodes.length === 0) ||
(arity !== 1 && this.childNodes.length !== arity))) {
if (arity < this.childNodes.length) {
this.childNodes = this.childNodes.slice(0, arity);
}
else {
while (this.childNodes.length < arity) {
this.appendChild(this.factory.create('mrow'));
}
}
}
this.setChildInheritedAttributes(attributes, display, level, prime);
};
AbstractMmlNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
var e_6, _a;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
child.setInheritedAttributes(attributes, display, level, prime);
}
}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_6) throw e_6.error; }
}
};
AbstractMmlNode.prototype.addInheritedAttributes = function (current, attributes) {
var e_7, _a;
var updated = __assign({}, current);
try {
for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {
var name_3 = _c.value;
if (name_3 !== 'displaystyle' && name_3 !== 'scriptlevel' && name_3 !== 'style') {
updated[name_3] = [this.kind, attributes[name_3]];
}
}
}
catch (e_7_1) { e_7 = { error: e_7_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_7) throw e_7.error; }
}
return updated;
};
AbstractMmlNode.prototype.inheritAttributesFrom = function (node) {
var attributes = node.attributes;
var display = attributes.get('displaystyle');
var scriptlevel = attributes.get('scriptlevel');
var defaults = (!attributes.isSet('mathsize') ? {} : {
mathsize: ['math', attributes.get('mathsize')]
});
var prime = node.getProperty('texprimestyle') || false;
this.setInheritedAttributes(defaults, display, scriptlevel, prime);
};
AbstractMmlNode.prototype.verifyTree = function (options) {
if (options === void 0) { options = null; }
if (options === null) {
return;
}
this.verifyAttributes(options);
var arity = this.arity;
if (options['checkArity']) {
if (arity >= 0 && arity !== Infinity &&
((arity === 1 && this.childNodes.length === 0) ||
(arity !== 1 && this.childNodes.length !== arity))) {
this.mError('Wrong number of children for "' + this.kind + '" node', options, true);
}
}
this.verifyChildren(options);
};
AbstractMmlNode.prototype.verifyAttributes = function (options) {
var e_8, _a;
if (options['checkAttributes']) {
var attributes = this.attributes;
var bad = [];
try {
for (var _b = __values(attributes.getExplicitNames()), _c = _b.next(); !_c.done; _c = _b.next()) {
var name_4 = _c.value;
if (name_4.substr(0, 5) !== 'data-' && attributes.getDefault(name_4) === undefined &&
!name_4.match(/^(?:class|style|id|(?:xlink:)?href)$/)) {
bad.push(name_4);
}
}
}
catch (e_8_1) { e_8 = { error: e_8_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_8) throw e_8.error; }
}
if (bad.length) {
this.mError('Unknown attributes for ' + this.kind + ' node: ' + bad.join(', '), options);
}
}
};
AbstractMmlNode.prototype.verifyChildren = function (options) {
var e_9, _a;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
child.verifyTree(options);
}
}
catch (e_9_1) { e_9 = { error: e_9_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_9) throw e_9.error; }
}
};
AbstractMmlNode.prototype.mError = function (message, options, short) {
if (short === void 0) { short = false; }
if (this.parent && this.parent.isKind('merror')) {
return null;
}
var merror = this.factory.create('merror');
merror.attributes.set('data-mjx-message', message);
if (options['fullErrors'] || short) {
var mtext = this.factory.create('mtext');
var text = this.factory.create('text');
text.setText(options['fullErrors'] ? message : this.kind);
mtext.appendChild(text);
merror.appendChild(mtext);
this.parent.replaceChild(merror, this);
}
else {
this.parent.replaceChild(merror, this);
merror.appendChild(this);
}
return merror;
};
AbstractMmlNode.defaults = {
mathbackground: Attributes_js_1.INHERIT,
mathcolor: Attributes_js_1.INHERIT,
mathsize: Attributes_js_1.INHERIT,
dir: Attributes_js_1.INHERIT
};
AbstractMmlNode.noInherit = {
mstyle: {
mpadded: { width: true, height: true, depth: true, lspace: true, voffset: true },
mtable: { width: true, height: true, depth: true, align: true }
},
maligngroup: {
mrow: { groupalign: true },
mtable: { groupalign: true }
}
};
AbstractMmlNode.alwaysInherit = {
scriptminsize: true,
scriptsizemultiplier: true
};
AbstractMmlNode.verifyDefaults = {
checkArity: true,
checkAttributes: false,
fullErrors: false,
fixMmultiscripts: true,
fixMtables: true
};
return AbstractMmlNode;
}(Node_js_1.AbstractNode));
exports.AbstractMmlNode = AbstractMmlNode;
var AbstractMmlTokenNode = (function (_super) {
__extends(AbstractMmlTokenNode, _super);
function AbstractMmlTokenNode() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(AbstractMmlTokenNode.prototype, "isToken", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
AbstractMmlTokenNode.prototype.getText = function () {
var e_10, _a;
var text = '';
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child instanceof TextNode) {
text += child.getText();
}
}
}
catch (e_10_1) { e_10 = { error: e_10_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_10) throw e_10.error; }
}
return text;
};
AbstractMmlTokenNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
var e_11, _a;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child instanceof AbstractMmlNode) {
child.setInheritedAttributes(attributes, display, level, prime);
}
}
}
catch (e_11_1) { e_11 = { error: e_11_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_11) throw e_11.error; }
}
};
AbstractMmlTokenNode.prototype.walkTree = function (func, data) {
var e_12, _a;
func(this, data);
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child instanceof AbstractMmlNode) {
child.walkTree(func, data);
}
}
}
catch (e_12_1) { e_12 = { error: e_12_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_12) throw e_12.error; }
}
return data;
};
AbstractMmlTokenNode.defaults = __assign(__assign({}, AbstractMmlNode.defaults), { mathvariant: 'normal', mathsize: Attributes_js_1.INHERIT });
return AbstractMmlTokenNode;
}(AbstractMmlNode));
exports.AbstractMmlTokenNode = AbstractMmlTokenNode;
var AbstractMmlLayoutNode = (function (_super) {
__extends(AbstractMmlLayoutNode, _super);
function AbstractMmlLayoutNode() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(AbstractMmlLayoutNode.prototype, "isSpacelike", {
get: function () {
return this.childNodes[0].isSpacelike;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlLayoutNode.prototype, "isEmbellished", {
get: function () {
return this.childNodes[0].isEmbellished;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlLayoutNode.prototype, "arity", {
get: function () {
return -1;
},
enumerable: false,
configurable: true
});
AbstractMmlLayoutNode.prototype.core = function () {
return this.childNodes[0];
};
AbstractMmlLayoutNode.prototype.coreMO = function () {
return this.childNodes[0].coreMO();
};
AbstractMmlLayoutNode.prototype.setTeXclass = function (prev) {
prev = this.childNodes[0].setTeXclass(prev);
this.updateTeXclass(this.childNodes[0]);
return prev;
};
AbstractMmlLayoutNode.defaults = AbstractMmlNode.defaults;
return AbstractMmlLayoutNode;
}(AbstractMmlNode));
exports.AbstractMmlLayoutNode = AbstractMmlLayoutNode;
var AbstractMmlBaseNode = (function (_super) {
__extends(AbstractMmlBaseNode, _super);
function AbstractMmlBaseNode() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(AbstractMmlBaseNode.prototype, "isEmbellished", {
get: function () {
return this.childNodes[0].isEmbellished;
},
enumerable: false,
configurable: true
});
AbstractMmlBaseNode.prototype.core = function () {
return this.childNodes[0];
};
AbstractMmlBaseNode.prototype.coreMO = function () {
return this.childNodes[0].coreMO();
};
AbstractMmlBaseNode.prototype.setTeXclass = function (prev) {
var e_13, _a;
this.getPrevClass(prev);
this.texClass = exports.TEXCLASS.ORD;
var base = this.childNodes[0];
if (base) {
if (this.isEmbellished || base.isKind('mi')) {
prev = base.setTeXclass(prev);
this.updateTeXclass(this.core());
}
else {
base.setTeXclass(null);
prev = this;
}
}
else {
prev = this;
}
try {
for (var _b = __values(this.childNodes.slice(1)), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child) {
child.setTeXclass(null);
}
}
}
catch (e_13_1) { e_13 = { error: e_13_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_13) throw e_13.error; }
}
return prev;
};
AbstractMmlBaseNode.defaults = AbstractMmlNode.defaults;
return AbstractMmlBaseNode;
}(AbstractMmlNode));
exports.AbstractMmlBaseNode = AbstractMmlBaseNode;
var AbstractMmlEmptyNode = (function (_super) {
__extends(AbstractMmlEmptyNode, _super);
function AbstractMmlEmptyNode() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(AbstractMmlEmptyNode.prototype, "isToken", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "isEmbellished", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "isSpacelike", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "linebreakContainer", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "hasNewLine", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "arity", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "isInferred", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "notParent", {
get: function () {
return false;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "Parent", {
get: function () {
return this.parent;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "texClass", {
get: function () {
return exports.TEXCLASS.NONE;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "prevClass", {
get: function () {
return exports.TEXCLASS.NONE;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AbstractMmlEmptyNode.prototype, "prevLevel", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
AbstractMmlEmptyNode.prototype.hasSpacingAttributes = function () {
return false;
};
Object.defineProperty(AbstractMmlEmptyNode.prototype, "attributes", {
get: function () {
return null;
},
enumerable: false,
configurable: true
});
AbstractMmlEmptyNode.prototype.core = function () {
return this;
};
AbstractMmlEmptyNode.prototype.coreMO = function () {
return this;
};
AbstractMmlEmptyNode.prototype.coreIndex = function () {
return 0;
};
AbstractMmlEmptyNode.prototype.childPosition = function () {
return 0;
};
AbstractMmlEmptyNode.prototype.setTeXclass = function (prev) {
return prev;
};
AbstractMmlEmptyNode.prototype.texSpacing = function () {
return '';
};
AbstractMmlEmptyNode.prototype.setInheritedAttributes = function (_attributes, _display, _level, _prime) { };
AbstractMmlEmptyNode.prototype.inheritAttributesFrom = function (_node) { };
AbstractMmlEmptyNode.prototype.verifyTree = function (_options) { };
AbstractMmlEmptyNode.prototype.mError = function (_message, _options, _short) {
if (_short === void 0) { _short = false; }
return null;
};
return AbstractMmlEmptyNode;
}(Node_js_1.AbstractEmptyNode));
exports.AbstractMmlEmptyNode = AbstractMmlEmptyNode;
var TextNode = (function (_super) {
__extends(TextNode, _super);
function TextNode() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.text = '';
return _this;
}
Object.defineProperty(TextNode.prototype, "kind", {
get: function () {
return 'text';
},
enumerable: false,
configurable: true
});
TextNode.prototype.getText = function () {
return this.text;
};
TextNode.prototype.setText = function (text) {
this.text = text;
return this;
};
TextNode.prototype.copy = function () {
return this.factory.create(this.kind).setText(this.getText());
};
TextNode.prototype.toString = function () {
return this.text;
};
return TextNode;
}(AbstractMmlEmptyNode));
exports.TextNode = TextNode;
var XMLNode = (function (_super) {
__extends(XMLNode, _super);
function XMLNode() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.xml = null;
_this.adaptor = null;
return _this;
}
Object.defineProperty(XMLNode.prototype, "kind", {
get: function () {
return 'XML';
},
enumerable: false,
configurable: true
});
XMLNode.prototype.getXML = function () {
return this.xml;
};
XMLNode.prototype.setXML = function (xml, adaptor) {
if (adaptor === void 0) { adaptor = null; }
this.xml = xml;
this.adaptor = adaptor;
return this;
};
XMLNode.prototype.getSerializedXML = function () {
return this.adaptor.serializeXML(this.xml);
};
XMLNode.prototype.copy = function () {
return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml));
};
XMLNode.prototype.toString = function () {
return 'XML data';
};
return XMLNode;
}(AbstractMmlEmptyNode));
exports.XMLNode = XMLNode;
//# sourceMappingURL=MmlNode.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
import { MmlFactory } from '../MmlFactory.js';
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlBaseNode, MmlNode } from '../MmlNode.js';
export declare class TeXAtom extends AbstractMmlBaseNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
get arity(): number;
get notParent(): boolean;
constructor(factory: MmlFactory, attributes: PropertyList, children: MmlNode[]);
setTeXclass(prev: MmlNode): MmlNode;
adjustTeXclass(prev: MmlNode): MmlNode;
}

View File

@@ -0,0 +1,73 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TeXAtom = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var mo_js_1 = require("./mo.js");
var TeXAtom = (function (_super) {
__extends(TeXAtom, _super);
function TeXAtom(factory, attributes, children) {
var _this = _super.call(this, factory, attributes, children) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
_this.setProperty('texClass', _this.texClass);
return _this;
}
Object.defineProperty(TeXAtom.prototype, "kind", {
get: function () {
return 'TeXAtom';
},
enumerable: false,
configurable: true
});
Object.defineProperty(TeXAtom.prototype, "arity", {
get: function () {
return -1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TeXAtom.prototype, "notParent", {
get: function () {
return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
},
enumerable: false,
configurable: true
});
TeXAtom.prototype.setTeXclass = function (prev) {
this.childNodes[0].setTeXclass(null);
return this.adjustTeXclass(prev);
};
TeXAtom.prototype.adjustTeXclass = function (prev) {
return prev;
};
TeXAtom.defaults = __assign({}, MmlNode_js_1.AbstractMmlBaseNode.defaults);
return TeXAtom;
}(MmlNode_js_1.AbstractMmlBaseNode));
exports.TeXAtom = TeXAtom;
TeXAtom.prototype.adjustTeXclass = mo_js_1.MmlMo.prototype.adjustTeXclass;
//# sourceMappingURL=TeXAtom.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TeXAtom.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/TeXAtom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,4CAAqE;AACrE,iCAA8B;AAO9B;IAA6B,2BAAmB;IAwC9C,iBAAY,OAAmB,EAAE,UAAwB,EAAE,QAAmB;QAA9E,YACE,kBAAM,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,SAErC;QA/BS,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;QA8BhC,KAAI,CAAC,WAAW,CAAC,UAAU,EAAE,KAAI,CAAC,QAAQ,CAAC,CAAC;;IAC9C,CAAC;IA1BD,sBAAW,yBAAI;aAAf;YACE,OAAO,SAAS,CAAC;QACnB,CAAC;;;OAAA;IAMD,sBAAW,0BAAK;aAAhB;YACE,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;;;OAAA;IAMD,sBAAW,8BAAS;aAApB;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;QAC1E,CAAC;;;OAAA;IAaM,6BAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAOM,gCAAc,GAArB,UAAsB,IAAa;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAvDa,gBAAQ,gBACjB,gCAAmB,CAAC,QAAQ,EAC/B;IAuDJ,cAAC;CAAA,AA9DD,CAA6B,gCAAmB,GA8D/C;AA9DY,0BAAO;AAkEpB,OAAO,CAAC,SAAS,CAAC,cAAc,GAAG,aAAK,CAAC,SAAS,CAAC,cAAc,CAAC"}

View File

@@ -0,0 +1,15 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode } from '../MmlNode.js';
export declare class MmlMaction extends AbstractMmlNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get selected(): MmlNode;
get isEmbellished(): boolean;
get isSpacelike(): boolean;
core(): MmlNode;
coreMO(): MmlNode;
protected verifyAttributes(options: PropertyList): void;
setTeXclass(prev: MmlNode): MmlNode;
nextToggleSelection(): void;
}

View File

@@ -0,0 +1,107 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMaction = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMaction = (function (_super) {
__extends(MmlMaction, _super);
function MmlMaction() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMaction.prototype, "kind", {
get: function () {
return 'maction';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMaction.prototype, "arity", {
get: function () {
return 1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMaction.prototype, "selected", {
get: function () {
var selection = this.attributes.get('selection');
var i = Math.max(1, Math.min(this.childNodes.length, selection)) - 1;
return this.childNodes[i] || this.factory.create('mrow');
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMaction.prototype, "isEmbellished", {
get: function () {
return this.selected.isEmbellished;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMaction.prototype, "isSpacelike", {
get: function () {
return this.selected.isSpacelike;
},
enumerable: false,
configurable: true
});
MmlMaction.prototype.core = function () {
return this.selected.core();
};
MmlMaction.prototype.coreMO = function () {
return this.selected.coreMO();
};
MmlMaction.prototype.verifyAttributes = function (options) {
_super.prototype.verifyAttributes.call(this, options);
if (this.attributes.get('actiontype') !== 'toggle' &&
this.attributes.getExplicit('selection') !== undefined) {
var attributes = this.attributes.getAllAttributes();
delete attributes.selection;
}
};
MmlMaction.prototype.setTeXclass = function (prev) {
if (this.attributes.get('actiontype') === 'tooltip' && this.childNodes[1]) {
this.childNodes[1].setTeXclass(null);
}
var selected = this.selected;
prev = selected.setTeXclass(prev);
this.updateTeXclass(selected);
return prev;
};
MmlMaction.prototype.nextToggleSelection = function () {
var selection = Math.max(1, this.attributes.get('selection') + 1);
if (selection > this.childNodes.length) {
selection = 1;
}
this.attributes.set('selection', selection);
};
MmlMaction.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlNode.defaults), { actiontype: 'toggle', selection: 1 });
return MmlMaction;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMaction = MmlMaction;
//# sourceMappingURL=maction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"maction.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/maction.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,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AAgB,EAAE,CAAC;YACtD,OAAO,UAAU,CAAC,SAAS,CAAC;SAC7B;IACH,CAAC;IAQM,gCAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;YACzE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACtC;QACD,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,GAAG,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAKM,wCAAmB,GAA1B;QACE,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,CAAY,GAAG,CAAC,CAAC,CAAC;QAC9E,IAAI,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE;YACtC,SAAS,GAAG,CAAC,CAAC;SACf;QACD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC;IA/Fa,mBAAQ,yBACjB,4BAAe,CAAC,QAAQ,KAC3B,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,CAAC,IACZ;IA6FJ,iBAAC;CAAA,AAtGD,CAAgC,4BAAe,GAsG9C;AAtGY,gCAAU"}

View File

@@ -0,0 +1,8 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlLayoutNode, AttributeList } from '../MmlNode.js';
export declare class MmlMaligngroup extends AbstractMmlLayoutNode {
static defaults: PropertyList;
get kind(): string;
get isSpacelike(): boolean;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}

View File

@@ -0,0 +1,59 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMaligngroup = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var Attributes_js_1 = require("../Attributes.js");
var MmlMaligngroup = (function (_super) {
__extends(MmlMaligngroup, _super);
function MmlMaligngroup() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMaligngroup.prototype, "kind", {
get: function () {
return 'maligngroup';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMaligngroup.prototype, "isSpacelike", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMaligngroup.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
_super.prototype.setChildInheritedAttributes.call(this, attributes, display, level, prime);
};
MmlMaligngroup.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults), { groupalign: Attributes_js_1.INHERIT });
return MmlMaligngroup;
}(MmlNode_js_1.AbstractMmlLayoutNode));
exports.MmlMaligngroup = MmlMaligngroup;
//# sourceMappingURL=maligngroup.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"maligngroup.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/maligngroup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAmE;AACnE,kDAAyC;AAOzC;IAAoC,kCAAqB;IAAzD;;IAkCA,CAAC;IArBC,sBAAW,gCAAI;aAAf;YACE,OAAO,aAAa,CAAC;QACvB,CAAC;;;OAAA;IAMD,sBAAW,uCAAW;aAAtB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAMS,oDAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QAC9G,UAAU,GAAG,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACzF,iBAAM,2BAA2B,YAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACvE,CAAC;IA3Ba,uBAAQ,yBACjB,kCAAqB,CAAC,QAAQ,KACjC,UAAU,EAAE,uBAAO,IACnB;IA0BJ,qBAAC;CAAA,AAlCD,CAAoC,kCAAqB,GAkCxD;AAlCY,wCAAc"}

View File

@@ -0,0 +1,8 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlNode } from '../MmlNode.js';
export declare class MmlMalignmark extends AbstractMmlNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get isSpacelike(): boolean;
}

View File

@@ -0,0 +1,61 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMalignmark = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMalignmark = (function (_super) {
__extends(MmlMalignmark, _super);
function MmlMalignmark() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMalignmark.prototype, "kind", {
get: function () {
return 'malignmark';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMalignmark.prototype, "arity", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMalignmark.prototype, "isSpacelike", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMalignmark.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlNode.defaults), { edge: 'left' });
return MmlMalignmark;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMalignmark = MmlMalignmark;
//# sourceMappingURL=malignmark.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"malignmark.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/malignmark.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA8C;AAO9C;IAAmC,iCAAe;IAAlD;;IAiCA,CAAC;IApBC,sBAAW,+BAAI;aAAf;YACE,OAAO,YAAY,CAAC;QACtB,CAAC;;;OAAA;IAMD,sBAAW,gCAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAMD,sBAAW,sCAAW;aAAtB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IA1Ba,sBAAQ,yBACjB,4BAAe,CAAC,QAAQ,KAC3B,IAAI,EAAE,MAAM,IACZ;IAyBJ,oBAAC;CAAA,AAjCD,CAAmC,4BAAe,GAiCjD;AAjCY,sCAAa"}

View File

@@ -0,0 +1,8 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlLayoutNode, AttributeList } from '../MmlNode.js';
export declare class MmlMath extends AbstractMmlLayoutNode {
static defaults: PropertyList;
get kind(): string;
get linebreakContainer(): boolean;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}

View File

@@ -0,0 +1,66 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMath = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMath = (function (_super) {
__extends(MmlMath, _super);
function MmlMath() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMath.prototype, "kind", {
get: function () {
return 'math';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMath.prototype, "linebreakContainer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMath.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
if (this.attributes.get('mode') === 'display') {
this.attributes.setInherited('display', 'block');
}
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
display = (!!this.attributes.get('displaystyle') ||
(!this.attributes.get('displaystyle') && this.attributes.get('display') === 'block'));
this.attributes.setInherited('displaystyle', display);
level = (this.attributes.get('scriptlevel') ||
this.constructor.defaults['scriptlevel']);
_super.prototype.setChildInheritedAttributes.call(this, attributes, display, level, prime);
};
MmlMath.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults), { mathvariant: 'normal', mathsize: 'normal', mathcolor: '', mathbackground: 'transparent', dir: 'ltr', scriptlevel: 0, displaystyle: false, display: 'inline', maxwidth: '', overflow: 'linebreak', altimg: '', 'altimg-width': '', 'altimg-height': '', 'altimg-valign': '', alttext: '', cdgroup: '', scriptsizemultiplier: 1 / Math.sqrt(2), scriptminsize: '8px', infixlinebreakstyle: 'before', lineleading: '1ex', linebreakmultchar: '\u2062', indentshift: 'auto', indentalign: 'auto', indenttarget: '', indentalignfirst: 'indentalign', indentshiftfirst: 'indentshift', indentalignlast: 'indentalign', indentshiftlast: 'indentshift' });
return MmlMath;
}(MmlNode_js_1.AbstractMmlLayoutNode));
exports.MmlMath = MmlMath;
//# sourceMappingURL=math.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/math.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAmE;AAOnE;IAA6B,2BAAqB;IAAlD;;IAwEA,CAAC;IAhCC,sBAAW,yBAAI;aAAf;YACE,OAAO,MAAM,CAAC;QAChB,CAAC;;;OAAA;IAMD,sBAAW,uCAAkB;aAA7B;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IASS,6CAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QAC9G,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE;YAC7C,IAAI,CAAC,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ACpB,mBAAmB,EAAE,QAAQ,EAC7B,WAAW,EAAE,KAAK,EAClB,iBAAiB,EAAE,QAAQ,EAC3B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,EAAE,EAChB,gBAAgB,EAAE,aAAa,EAC/B,gBAAgB,EAAE,aAAa,EAC/B,eAAe,EAAG,aAAa,EAC/B,eAAe,EAAG,aAAa,IAC/B;IAqCJ,cAAC;CAAA,AAxED,CAA6B,kCAAqB,GAwEjD;AAxEY,0BAAO"}

View File

@@ -0,0 +1,9 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlBaseNode, AttributeList } from '../MmlNode.js';
export declare class MathChoice extends AbstractMmlBaseNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get notParent(): boolean;
setInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}

View File

@@ -0,0 +1,67 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MathChoice = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MathChoice = (function (_super) {
__extends(MathChoice, _super);
function MathChoice() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MathChoice.prototype, "kind", {
get: function () {
return 'MathChoice';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MathChoice.prototype, "arity", {
get: function () {
return 4;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MathChoice.prototype, "notParent", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MathChoice.prototype.setInheritedAttributes = function (attributes, display, level, prime) {
var selection = (display ? 0 : Math.max(0, Math.min(level, 2)) + 1);
var child = this.childNodes[selection] || this.factory.create('mrow');
this.parent.replaceChild(child, this);
child.setInheritedAttributes(attributes, display, level, prime);
};
MathChoice.defaults = __assign({}, MmlNode_js_1.AbstractMmlBaseNode.defaults);
return MathChoice;
}(MmlNode_js_1.AbstractMmlBaseNode));
exports.MathChoice = MathChoice;
//# sourceMappingURL=mathchoice.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mathchoice.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mathchoice.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAiE;AAUjE;IAAgC,8BAAmB;IAAnD;;IA6CA,CAAC;IAjCC,sBAAW,4BAAI;aAAf;YACE,OAAO,YAAY,CAAC;QACtB,CAAC;;;OAAA;IAMD,sBAAW,6BAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAMD,sBAAW,iCAAS;aAApB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAQM,2CAAsB,GAA7B,UAA8B,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QACtG,IAAM,SAAS,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtE,IAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACtC,KAAK,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClE,CAAC;IAtCa,mBAAQ,gBACjB,gCAAmB,CAAC,QAAQ,EAC/B;IAsCJ,iBAAC;CAAA,AA7CD,CAAgC,gCAAmB,GA6ClD;AA7CY,gCAAU"}

View File

@@ -0,0 +1,10 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode } from '../MmlNode.js';
export declare class MmlMenclose extends AbstractMmlNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
get arity(): number;
get linebreakContininer(): boolean;
setTeXclass(prev: MmlNode): MmlNode;
}

View File

@@ -0,0 +1,68 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMenclose = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMenclose = (function (_super) {
__extends(MmlMenclose, _super);
function MmlMenclose() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMenclose.prototype, "kind", {
get: function () {
return 'menclose';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMenclose.prototype, "arity", {
get: function () {
return -1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMenclose.prototype, "linebreakContininer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMenclose.prototype.setTeXclass = function (prev) {
prev = this.childNodes[0].setTeXclass(prev);
this.updateTeXclass(this.childNodes[0]);
return prev;
};
MmlMenclose.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlNode.defaults), { notation: 'longdiv' });
return MmlMenclose;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMenclose = MmlMenclose;
//# sourceMappingURL=menclose.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"menclose.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/menclose.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAiE;AAOjE;IAAiC,+BAAe;IAAhD;QAAA,qEAgDC;QAnCW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IAmCpC,CAAC;IA7BC,sBAAW,6BAAI;aAAf;YACE,OAAO,UAAU,CAAC;QACpB,CAAC;;;OAAA;IAMD,sBAAW,8BAAK;aAAhB;YACE,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;;;OAAA;IAMD,sBAAW,4CAAmB;aAA9B;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAKM,iCAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC;IACd,CAAC;IAzCa,oBAAQ,yBACjB,4BAAe,CAAC,QAAQ,KAC3B,QAAQ,EAAE,SAAS,IACnB;IAwCJ,kBAAC;CAAA,AAhDD,CAAiC,4BAAe,GAgD/C;AAhDY,kCAAW"}

View File

@@ -0,0 +1,9 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlNode } from '../MmlNode.js';
export declare class MmlMerror extends AbstractMmlNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
get arity(): number;
get linebreakContainer(): boolean;
}

View File

@@ -0,0 +1,63 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMerror = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMerror = (function (_super) {
__extends(MmlMerror, _super);
function MmlMerror() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMerror.prototype, "kind", {
get: function () {
return 'merror';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMerror.prototype, "arity", {
get: function () {
return -1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMerror.prototype, "linebreakContainer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMerror.defaults = __assign({}, MmlNode_js_1.AbstractMmlNode.defaults);
return MmlMerror;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMerror = MmlMerror;
//# sourceMappingURL=merror.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"merror.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/merror.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAwD;AAOxD;IAA+B,6BAAe;IAA9C;QAAA,qEAqCC;QAzBW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IAyBpC,CAAC;IApBC,sBAAW,2BAAI;aAAf;YACE,OAAO,QAAQ,CAAC;QAClB,CAAC;;;OAAA;IAMD,sBAAW,4BAAK;aAAhB;YACE,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;;;OAAA;IAMD,sBAAW,yCAAkB;aAA7B;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IA9Ba,kBAAQ,gBACjB,4BAAe,CAAC,QAAQ,EAC3B;IA8BJ,gBAAC;CAAA,AArCD,CAA+B,4BAAe,GAqC7C;AArCY,8BAAS"}

View File

@@ -0,0 +1,14 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode, AttributeList } from '../MmlNode.js';
export declare class MmlMfenced extends AbstractMmlNode {
static defaults: PropertyList;
protected texclass: number;
separators: MmlNode[];
open: MmlNode;
close: MmlNode;
get kind(): string;
setTeXclass(prev: MmlNode): MmlNode;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
protected addFakeNodes(): void;
protected fakeNode(c: string, properties?: PropertyList, texClass?: number): MmlNode;
}

View File

@@ -0,0 +1,148 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMfenced = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMfenced = (function (_super) {
__extends(MmlMfenced, _super);
function MmlMfenced() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.INNER;
_this.separators = [];
_this.open = null;
_this.close = null;
return _this;
}
Object.defineProperty(MmlMfenced.prototype, "kind", {
get: function () {
return 'mfenced';
},
enumerable: false,
configurable: true
});
MmlMfenced.prototype.setTeXclass = function (prev) {
this.getPrevClass(prev);
if (this.open) {
prev = this.open.setTeXclass(prev);
}
if (this.childNodes[0]) {
prev = this.childNodes[0].setTeXclass(prev);
}
for (var i = 1, m = this.childNodes.length; i < m; i++) {
if (this.separators[i - 1]) {
prev = this.separators[i - 1].setTeXclass(prev);
}
if (this.childNodes[i]) {
prev = this.childNodes[i].setTeXclass(prev);
}
}
if (this.close) {
prev = this.close.setTeXclass(prev);
}
this.updateTeXclass(this.open);
return prev;
};
MmlMfenced.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
var e_1, _a;
this.addFakeNodes();
try {
for (var _b = __values([this.open, this.close].concat(this.separators)), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child) {
child.setInheritedAttributes(attributes, display, level, prime);
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
_super.prototype.setChildInheritedAttributes.call(this, attributes, display, level, prime);
};
MmlMfenced.prototype.addFakeNodes = function () {
var e_2, _a;
var _b = this.attributes.getList('open', 'close', 'separators'), open = _b.open, close = _b.close, separators = _b.separators;
open = open.replace(/[ \t\n\r]/g, '');
close = close.replace(/[ \t\n\r]/g, '');
separators = separators.replace(/[ \t\n\r]/g, '');
if (open) {
this.open = this.fakeNode(open, { fence: true, form: 'prefix' }, MmlNode_js_1.TEXCLASS.OPEN);
}
if (separators) {
while (separators.length < this.childNodes.length - 1) {
separators += separators.charAt(separators.length - 1);
}
var i = 0;
try {
for (var _c = __values(this.childNodes.slice(1)), _d = _c.next(); !_d.done; _d = _c.next()) {
var child = _d.value;
if (child) {
this.separators.push(this.fakeNode(separators.charAt(i++)));
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_2) throw e_2.error; }
}
}
if (close) {
this.close = this.fakeNode(close, { fence: true, form: 'postfix' }, MmlNode_js_1.TEXCLASS.CLOSE);
}
};
MmlMfenced.prototype.fakeNode = function (c, properties, texClass) {
if (properties === void 0) { properties = {}; }
if (texClass === void 0) { texClass = null; }
var text = this.factory.create('text').setText(c);
var node = this.factory.create('mo', properties, [text]);
node.texClass = texClass;
node.parent = this;
return node;
};
MmlMfenced.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlNode.defaults), { open: '(', close: ')', separators: ',' });
return MmlMfenced;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMfenced = MmlMfenced;
//# sourceMappingURL=mfenced.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mfenced.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mfenced.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA0F;AAO1F;IAAgC,8BAAe;IAA/C;QAAA,qEAqIC;QAtHW,cAAQ,GAAG,qBAAQ,CAAC,KAAK,CAAC;QAK7B,gBAAU,GAAc,EAAE,CAAC;QAI3B,UAAI,GAAY,IAAI,CAAC;QAIrB,WAAK,GAAY,IAAI,CAAC;;IAyG/B,CAAC;IApGC,sBAAW,4BAAI;aAAf;YACE,OAAO,SAAS,CAAC;QACnB,CAAC;;;OAAA;IAQM,gCAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACpC;QACD,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE;YACtB,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SAC7C;QACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YACtD,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC1B,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACjD;YACD,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC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,IAAI,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;IA9Ha,mBAAQ,yBACjB,4BAAe,CAAC,QAAQ,KAC3B,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,GAAG,IACf;IA2HJ,iBAAC;CAAA,AArID,CAAgC,4BAAe,GAqI9C;AArIY,gCAAU"}

View File

@@ -0,0 +1,10 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlBaseNode, AttributeList } from '../MmlNode.js';
export declare class MmlMfrac extends AbstractMmlBaseNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get linebreakContainer(): boolean;
setTeXclass(prev: MmlNode): this;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}

View File

@@ -0,0 +1,97 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMfrac = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMfrac = (function (_super) {
__extends(MmlMfrac, _super);
function MmlMfrac() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMfrac.prototype, "kind", {
get: function () {
return 'mfrac';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMfrac.prototype, "arity", {
get: function () {
return 2;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMfrac.prototype, "linebreakContainer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMfrac.prototype.setTeXclass = function (prev) {
var e_1, _a;
this.getPrevClass(prev);
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
child.setTeXclass(null);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return this;
};
MmlMfrac.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
if (!display || level > 0) {
level++;
}
this.childNodes[0].setInheritedAttributes(attributes, false, level, prime);
this.childNodes[1].setInheritedAttributes(attributes, false, level, true);
};
MmlMfrac.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlBaseNode.defaults), { linethickness: 'medium', numalign: 'center', denomalign: 'center', bevelled: false });
return MmlMfrac;
}(MmlNode_js_1.AbstractMmlBaseNode));
exports.MmlMfrac = MmlMfrac;
//# sourceMappingURL=mfrac.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mfrac.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mfrac.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA0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../MmlNode.js';
export declare class MmlMglyph extends AbstractMmlTokenNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
verifyAttributes(options: PropertyList): void;
}

View File

@@ -0,0 +1,58 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMglyph = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMglyph = (function (_super) {
__extends(MmlMglyph, _super);
function MmlMglyph() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMglyph.prototype, "kind", {
get: function () {
return 'mglyph';
},
enumerable: false,
configurable: true
});
MmlMglyph.prototype.verifyAttributes = function (options) {
var _a = this.attributes.getList('src', 'fontfamily', 'index'), src = _a.src, fontfamily = _a.fontfamily, index = _a.index;
if (src === '' && (fontfamily === '' || index === '')) {
this.mError('mglyph must have either src or fontfamily and index attributes', options, true);
}
else {
_super.prototype.verifyAttributes.call(this, options);
}
};
MmlMglyph.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlTokenNode.defaults), { alt: '', src: '', index: '', width: 'auto', height: 'auto', valign: '0em' });
return MmlMglyph;
}(MmlNode_js_1.AbstractMmlTokenNode));
exports.MmlMglyph = MmlMglyph;
//# sourceMappingURL=mglyph.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mglyph.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mglyph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA6D;AAO7D;IAA+B,6BAAoB;IAAnD;QAAA,qEAuCC;QArBW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IAqBpC,CAAC;IAhBC,sBAAW,2BAAI;aAAf;YACE,OAAO,QAAQ,CAAC;QAClB,CAAC;;;OAAA;IAKM,oCAAgB,GAAvB,UAAwB,OAAqB;QACrC,IAAA,KAA2B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,CAAC,EAA/E,GAAG,SAAA,EAAE,UAAU,gBAAA,EAAE,KAAK,WAAyD,CAAC;QACvF,IAAI,GAAG,KAAK,EAAE,IAAI,CAAC,UAAU,KAAK,EAAE,IAAI,KAAK,KAAK,EAAE,CAAC,EAAE;YACrD,IAAI,CAAC,MAAM,CAAC,gEAAgE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SAC9F;aAAM;YACL,iBAAM,gBAAgB,YAAC,OAAO,CAAC,CAAC;SACjC;IACH,CAAC;IAhCa,kBAAQ,yBACjB,iCAAoB,CAAC,QAAQ,KAChC,GAAG,EAAE,EAAE,EACP,GAAG,EAAE,EAAE,EACP,KAAK,EAAE,EAAE,EACT,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,KAAK,IACb;IA0BJ,gBAAC;CAAA,AAvCD,CAA+B,iCAAoB,GAuClD;AAvCY,8BAAS"}

View File

@@ -0,0 +1,11 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlTokenNode, AbstractMmlNode, AttributeList } from '../MmlNode.js';
export declare class MmlMi extends AbstractMmlTokenNode {
static defaults: PropertyList;
static operatorName: RegExp;
static singleCharacter: RegExp;
protected texclass: number;
get kind(): string;
setInheritedAttributes(attributes?: AttributeList, display?: boolean, level?: number, prime?: boolean): void;
setTeXclass(prev: AbstractMmlNode): this;
}

View File

@@ -0,0 +1,74 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMi = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMi = (function (_super) {
__extends(MmlMi, _super);
function MmlMi() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMi.prototype, "kind", {
get: function () {
return 'mi';
},
enumerable: false,
configurable: true
});
MmlMi.prototype.setInheritedAttributes = function (attributes, display, level, prime) {
if (attributes === void 0) { attributes = {}; }
if (display === void 0) { display = false; }
if (level === void 0) { level = 0; }
if (prime === void 0) { prime = false; }
_super.prototype.setInheritedAttributes.call(this, attributes, display, level, prime);
var text = this.getText();
if (text.match(MmlMi.singleCharacter) && !attributes.mathvariant) {
this.attributes.setInherited('mathvariant', 'italic');
}
};
MmlMi.prototype.setTeXclass = function (prev) {
this.getPrevClass(prev);
var name = this.getText();
if (name.length > 1 && name.match(MmlMi.operatorName) &&
this.attributes.get('mathvariant') === 'normal' &&
this.getProperty('autoOP') === undefined &&
this.getProperty('texClass') === undefined) {
this.texClass = MmlNode_js_1.TEXCLASS.OP;
this.setProperty('autoOP', true);
}
return this;
};
MmlMi.defaults = __assign({}, MmlNode_js_1.AbstractMmlTokenNode.defaults);
MmlMi.operatorName = /^[a-z][a-z0-9]*$/i;
MmlMi.singleCharacter = /^[\uD800-\uDBFF]?.[\u0300-\u036F\u1AB0-\u1ABE\u1DC0-\u1DFF\u20D0-\u20EF]*$/;
return MmlMi;
}(MmlNode_js_1.AbstractMmlTokenNode));
exports.MmlMi = MmlMi;
//# sourceMappingURL=mi.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mi.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA6F;AAO7F;IAA2B,yBAAoB;IAA/C;QAAA,qEAgEC;QA1CW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IA0CpC,CAAC;IArCC,sBAAW,uBAAI;aAAf;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAQM,sCAAsB,GAA7B,UAA8B,UAA8B,EAC9B,OAAwB,EAAE,KAAiB,EAAE,KAAsB;QADnE,2BAAA,EAAA,eAA8B;QAC9B,wBAAA,EAAA,eAAwB;QAAE,sBAAA,EAAA,SAAiB;QAAE,sBAAA,EAAA,aAAsB;QAC/F,iBAAM,sBAAsB,YAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAChE,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE;YAChE,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;SACvD;IACH,CAAC;IAOM,2BAAW,GAAlB,UAAmB,IAAqB;QACtC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC1B,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC;YACjD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,KAAK,QAAQ;YAC/C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,SAAS;YACxC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,SAAS,EAAE;YAC9C,IAAI,CAAC,QAAQ,GAAG,qBAAQ,CAAC,EAAE,CAAC;YAC5B,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAzDa,cAAQ,gBACjB,iCAAoB,CAAC,QAAQ,EAChC;IAKY,kBAAY,GAAW,mBAAmB,CAAC;IAI3C,qBAAe,GAC3B,4EAA4E,CAAC;IA+CjF,YAAC;CAAA,AAhED,CAA2B,iCAAoB,GAgE9C;AAhEY,sBAAK"}

View File

@@ -0,0 +1,22 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlNode, AttributeList } from '../MmlNode.js';
import { MmlMsubsup } from './msubsup.js';
export declare class MmlMmultiscripts extends MmlMsubsup {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
protected verifyChildren(options: PropertyList): void;
}
export declare class MmlMprescripts extends AbstractMmlNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
verifyTree(options: PropertyList): void;
}
export declare class MmlNone extends AbstractMmlNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
verifyTree(options: PropertyList): void;
}

View File

@@ -0,0 +1,162 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlNone = exports.MmlMprescripts = exports.MmlMmultiscripts = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var msubsup_js_1 = require("./msubsup.js");
var MmlMmultiscripts = (function (_super) {
__extends(MmlMmultiscripts, _super);
function MmlMmultiscripts() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMmultiscripts.prototype, "kind", {
get: function () {
return 'mmultiscripts';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMmultiscripts.prototype, "arity", {
get: function () {
return 1;
},
enumerable: false,
configurable: true
});
MmlMmultiscripts.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
this.childNodes[0].setInheritedAttributes(attributes, display, level, prime);
var prescripts = false;
for (var i = 1, n = 0; i < this.childNodes.length; i++) {
var child = this.childNodes[i];
if (child.isKind('mprescripts')) {
if (!prescripts) {
prescripts = true;
if (i % 2 === 0) {
var mrow = this.factory.create('mrow');
this.childNodes.splice(i, 0, mrow);
mrow.parent = this;
i++;
}
}
}
else {
var primestyle = prime || (n % 2 === 0);
child.setInheritedAttributes(attributes, false, level + 1, primestyle);
n++;
}
}
if (this.childNodes.length % 2 === (prescripts ? 1 : 0)) {
this.appendChild(this.factory.create('mrow'));
this.childNodes[this.childNodes.length - 1].setInheritedAttributes(attributes, false, level + 1, prime);
}
};
MmlMmultiscripts.prototype.verifyChildren = function (options) {
var prescripts = false;
var fix = options['fixMmultiscripts'];
for (var i = 0; i < this.childNodes.length; i++) {
var child = this.childNodes[i];
if (child.isKind('mprescripts')) {
if (prescripts) {
child.mError(child.kind + ' can only appear once in ' + this.kind, options, true);
}
else {
prescripts = true;
if (i % 2 === 0 && !fix) {
this.mError('There must be an equal number of prescripts of each type', options);
}
}
}
}
if (this.childNodes.length % 2 === (prescripts ? 1 : 0) && !fix) {
this.mError('There must be an equal number of scripts of each type', options);
}
_super.prototype.verifyChildren.call(this, options);
};
MmlMmultiscripts.defaults = __assign({}, msubsup_js_1.MmlMsubsup.defaults);
return MmlMmultiscripts;
}(msubsup_js_1.MmlMsubsup));
exports.MmlMmultiscripts = MmlMmultiscripts;
var MmlMprescripts = (function (_super) {
__extends(MmlMprescripts, _super);
function MmlMprescripts() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMprescripts.prototype, "kind", {
get: function () {
return 'mprescripts';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMprescripts.prototype, "arity", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
MmlMprescripts.prototype.verifyTree = function (options) {
_super.prototype.verifyTree.call(this, options);
if (this.parent && !this.parent.isKind('mmultiscripts')) {
this.mError(this.kind + ' must be a child of mmultiscripts', options, true);
}
};
MmlMprescripts.defaults = __assign({}, MmlNode_js_1.AbstractMmlNode.defaults);
return MmlMprescripts;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMprescripts = MmlMprescripts;
var MmlNone = (function (_super) {
__extends(MmlNone, _super);
function MmlNone() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlNone.prototype, "kind", {
get: function () {
return 'none';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlNone.prototype, "arity", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
MmlNone.prototype.verifyTree = function (options) {
_super.prototype.verifyTree.call(this, options);
if (this.parent && !this.parent.isKind('mmultiscripts')) {
this.mError(this.kind + ' must be a child of mmultiscripts', options, true);
}
};
MmlNone.defaults = __assign({}, MmlNode_js_1.AbstractMmlNode.defaults);
return MmlNone;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlNone = MmlNone;
//# sourceMappingURL=mmultiscripts.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mmultiscripts.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mmultiscripts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA6D;AAC7D,2CAAwC;AAOxC;IAAsC,oCAAU;IAAhD;;IAsFA,CAAC;IA1EC,sBAAW,kCAAI;aAAf;YACE,OAAO,eAAe,CAAC;QACzB,CAAC;;;OAAA;IAMD,sBAAW,mCAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAUS,sDAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QAC9G,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QAC7E,IAAI,UAAU,GAAG,KAAK,CAAC;QACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACtD,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE;gBAC/B,IA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,CAAC,IAAI,CAAC,IAAI,GAAG,mCAAmC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SAC7E;IACH,CAAC;IA5Ba,uBAAQ,gBACjB,4BAAe,CAAC,QAAQ,EAC3B;IA4BJ,qBAAC;CAAA,AAnCD,CAAoC,4BAAe,GAmClD;AAnCY,wCAAc;AA0C3B;IAA6B,2BAAe;IAA5C;;IAmCA,CAAC;IAvBC,sBAAW,yBAAI;aAAf;YACE,OAAO,MAAM,CAAC;QAChB,CAAC;;;OAAA;IAKD,sBAAW,0BAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAOM,4BAAU,GAAjB,UAAkB,OAAqB;QACrC,iBAAM,UAAU,YAAC,OAAO,CAAC,CAAC;QAC1B,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;YACvD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,mCAAmC,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;SAC7E;IACH,CAAC;IA5Ba,gBAAQ,gBACjB,4BAAe,CAAC,QAAQ,EAC3B;IA4BJ,cAAC;CAAA,AAnCD,CAA6B,4BAAe,GAmC3C;AAnCY,0BAAO"}

View File

@@ -0,0 +1,7 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlTokenNode } from '../MmlNode.js';
export declare class MmlMn extends AbstractMmlTokenNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
}

View File

@@ -0,0 +1,49 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMn = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMn = (function (_super) {
__extends(MmlMn, _super);
function MmlMn() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMn.prototype, "kind", {
get: function () {
return 'mn';
},
enumerable: false,
configurable: true
});
MmlMn.defaults = __assign({}, MmlNode_js_1.AbstractMmlTokenNode.defaults);
return MmlMn;
}(MmlNode_js_1.AbstractMmlTokenNode));
exports.MmlMn = MmlMn;
//# sourceMappingURL=mn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mn.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA6D;AAO7D;IAA2B,yBAAoB;IAA/C;QAAA,qEAqBC;QATW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IASpC,CAAC;IAJC,sBAAW,uBAAI;aAAf;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAda,cAAQ,gBACjB,iCAAoB,CAAC,QAAQ,EAChC;IAcJ,YAAC;CAAA,AArBD,CAA2B,iCAAoB,GAqB9C;AArBY,sBAAK"}

View File

@@ -0,0 +1,37 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlTokenNode, MmlNode, AttributeList } from '../MmlNode.js';
import { OperatorList } from '../OperatorDictionary.js';
export declare class MmlMo extends AbstractMmlTokenNode {
static defaults: PropertyList;
static MMLSPACING: number[][];
static OPTABLE: {
[form: string]: OperatorList;
};
static pseudoScripts: RegExp;
protected static primes: RegExp;
protected static remapPrimes: {
[n: number]: number;
};
protected static mathaccents: RegExp;
_texClass: number;
get texClass(): number;
set texClass(value: number);
lspace: number;
rspace: number;
get kind(): string;
get isEmbellished(): boolean;
get hasNewLine(): boolean;
coreParent(): MmlNode;
coreText(parent: MmlNode): string;
hasSpacingAttributes(): boolean;
get isAccent(): boolean;
setTeXclass(prev: MmlNode): MmlNode;
adjustTeXclass(prev: MmlNode): MmlNode;
setInheritedAttributes(attributes?: AttributeList, display?: boolean, level?: number, prime?: boolean): void;
protected checkOperatorTable(mo: string): void;
getForms(): [string, string, string];
protected handleExplicitForm(forms: string[]): string[];
protected checkPseudoScripts(mo: string): void;
protected checkPrimes(mo: string): void;
protected checkMathAccent(mo: string): void;
}

View File

@@ -0,0 +1,383 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMo = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var OperatorDictionary_js_1 = require("../OperatorDictionary.js");
var string_js_1 = require("../../../util/string.js");
var MmlMo = (function (_super) {
__extends(MmlMo, _super);
function MmlMo() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._texClass = null;
_this.lspace = 5 / 18;
_this.rspace = 5 / 18;
return _this;
}
Object.defineProperty(MmlMo.prototype, "texClass", {
get: function () {
if (this._texClass === null) {
var mo = this.getText();
var _a = __read(this.handleExplicitForm(this.getForms()), 3), form1 = _a[0], form2 = _a[1], form3 = _a[2];
var OPTABLE_1 = this.constructor.OPTABLE;
var def = OPTABLE_1[form1][mo] || OPTABLE_1[form2][mo] || OPTABLE_1[form3][mo];
return def ? def[2] : MmlNode_js_1.TEXCLASS.REL;
}
return this._texClass;
},
set: function (value) {
this._texClass = value;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMo.prototype, "kind", {
get: function () {
return 'mo';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMo.prototype, "isEmbellished", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMo.prototype, "hasNewLine", {
get: function () {
return this.attributes.get('linebreak') === 'newline';
},
enumerable: false,
configurable: true
});
MmlMo.prototype.coreParent = function () {
var embellished = this;
var parent = this;
var math = this.factory.getNodeClass('math');
while (parent && parent.isEmbellished && parent.coreMO() === this && !(parent instanceof math)) {
embellished = parent;
parent = parent.parent;
}
return embellished;
};
MmlMo.prototype.coreText = function (parent) {
if (!parent) {
return '';
}
if (parent.isEmbellished) {
return parent.coreMO().getText();
}
while ((((parent.isKind('mrow') ||
(parent.isKind('TeXAtom') && parent.texClass !== MmlNode_js_1.TEXCLASS.VCENTER) ||
parent.isKind('mstyle') ||
parent.isKind('mphantom')) && parent.childNodes.length === 1) ||
parent.isKind('munderover')) && parent.childNodes[0]) {
parent = parent.childNodes[0];
}
return (parent.isToken ? parent.getText() : '');
};
MmlMo.prototype.hasSpacingAttributes = function () {
return this.attributes.isSet('lspace') ||
this.attributes.isSet('rspace');
};
Object.defineProperty(MmlMo.prototype, "isAccent", {
get: function () {
var accent = false;
var node = this.coreParent().parent;
if (node) {
var key = (node.isKind('mover') ?
(node.childNodes[node.over].coreMO() ?
'accent' : '') :
node.isKind('munder') ?
(node.childNodes[node.under].coreMO() ?
'accentunder' : '') :
node.isKind('munderover') ?
(this === node.childNodes[node.over].coreMO() ?
'accent' :
this === node.childNodes[node.under].coreMO() ?
'accentunder' : '') :
'');
if (key) {
var value = node.attributes.getExplicit(key);
accent = (value !== undefined ? accent : this.attributes.get('accent'));
}
}
return accent;
},
enumerable: false,
configurable: true
});
MmlMo.prototype.setTeXclass = function (prev) {
var _a = this.attributes.getList('form', 'fence'), form = _a.form, fence = _a.fence;
if (this.getProperty('texClass') === undefined &&
(this.attributes.isSet('lspace') || this.attributes.isSet('rspace'))) {
return null;
}
if (fence && this.texClass === MmlNode_js_1.TEXCLASS.REL) {
if (form === 'prefix') {
this.texClass = MmlNode_js_1.TEXCLASS.OPEN;
}
if (form === 'postfix') {
this.texClass = MmlNode_js_1.TEXCLASS.CLOSE;
}
}
return this.adjustTeXclass(prev);
};
MmlMo.prototype.adjustTeXclass = function (prev) {
var texClass = this.texClass;
var prevClass = this.prevClass;
if (texClass === MmlNode_js_1.TEXCLASS.NONE) {
return prev;
}
if (prev) {
if (prev.getProperty('autoOP') && (texClass === MmlNode_js_1.TEXCLASS.BIN || texClass === MmlNode_js_1.TEXCLASS.REL)) {
prevClass = prev.texClass = MmlNode_js_1.TEXCLASS.ORD;
}
prevClass = this.prevClass = (prev.texClass || MmlNode_js_1.TEXCLASS.ORD);
this.prevLevel = this.attributes.getInherited('scriptlevel');
}
else {
prevClass = this.prevClass = MmlNode_js_1.TEXCLASS.NONE;
}
if (texClass === MmlNode_js_1.TEXCLASS.BIN &&
(prevClass === MmlNode_js_1.TEXCLASS.NONE || prevClass === MmlNode_js_1.TEXCLASS.BIN || prevClass === MmlNode_js_1.TEXCLASS.OP ||
prevClass === MmlNode_js_1.TEXCLASS.REL || prevClass === MmlNode_js_1.TEXCLASS.OPEN || prevClass === MmlNode_js_1.TEXCLASS.PUNCT)) {
this.texClass = MmlNode_js_1.TEXCLASS.ORD;
}
else if (prevClass === MmlNode_js_1.TEXCLASS.BIN &&
(texClass === MmlNode_js_1.TEXCLASS.REL || texClass === MmlNode_js_1.TEXCLASS.CLOSE || texClass === MmlNode_js_1.TEXCLASS.PUNCT)) {
prev.texClass = this.prevClass = MmlNode_js_1.TEXCLASS.ORD;
}
else if (texClass === MmlNode_js_1.TEXCLASS.BIN) {
var child = this;
var parent_1 = this.parent;
while (parent_1 && parent_1.parent && parent_1.isEmbellished &&
(parent_1.childNodes.length === 1 ||
(!parent_1.isKind('mrow') && parent_1.core() === child))) {
child = parent_1;
parent_1 = parent_1.parent;
}
if (parent_1.childNodes[parent_1.childNodes.length - 1] === child) {
this.texClass = MmlNode_js_1.TEXCLASS.ORD;
}
}
return this;
};
MmlMo.prototype.setInheritedAttributes = function (attributes, display, level, prime) {
if (attributes === void 0) { attributes = {}; }
if (display === void 0) { display = false; }
if (level === void 0) { level = 0; }
if (prime === void 0) { prime = false; }
_super.prototype.setInheritedAttributes.call(this, attributes, display, level, prime);
var mo = this.getText();
this.checkOperatorTable(mo);
this.checkPseudoScripts(mo);
this.checkPrimes(mo);
this.checkMathAccent(mo);
};
MmlMo.prototype.checkOperatorTable = function (mo) {
var e_1, _a;
var _b = __read(this.handleExplicitForm(this.getForms()), 3), form1 = _b[0], form2 = _b[1], form3 = _b[2];
this.attributes.setInherited('form', form1);
var OPTABLE = this.constructor.OPTABLE;
var def = OPTABLE[form1][mo] || OPTABLE[form2][mo] || OPTABLE[form3][mo];
if (def) {
if (this.getProperty('texClass') === undefined) {
this.texClass = def[2];
}
try {
for (var _c = __values(Object.keys(def[3] || {})), _d = _c.next(); !_d.done; _d = _c.next()) {
var name_1 = _d.value;
this.attributes.setInherited(name_1, def[3][name_1]);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_1) throw e_1.error; }
}
this.lspace = (def[0] + 1) / 18;
this.rspace = (def[1] + 1) / 18;
}
else {
var range = (0, OperatorDictionary_js_1.getRange)(mo);
if (range) {
if (this.getProperty('texClass') === undefined) {
this.texClass = range[2];
}
var spacing = this.constructor.MMLSPACING[range[2]];
this.lspace = (spacing[0] + 1) / 18;
this.rspace = (spacing[1] + 1) / 18;
}
}
};
MmlMo.prototype.getForms = function () {
var core = this;
var parent = this.parent;
var Parent = this.Parent;
while (Parent && Parent.isEmbellished) {
core = parent;
parent = Parent.parent;
Parent = Parent.Parent;
}
if (parent && parent.isKind('mrow') && parent.nonSpaceLength() !== 1) {
if (parent.firstNonSpace() === core) {
return ['prefix', 'infix', 'postfix'];
}
if (parent.lastNonSpace() === core) {
return ['postfix', 'infix', 'prefix'];
}
}
return ['infix', 'prefix', 'postfix'];
};
MmlMo.prototype.handleExplicitForm = function (forms) {
if (this.attributes.isSet('form')) {
var form_1 = this.attributes.get('form');
forms = [form_1].concat(forms.filter(function (name) { return (name !== form_1); }));
}
return forms;
};
MmlMo.prototype.checkPseudoScripts = function (mo) {
var PSEUDOSCRIPTS = this.constructor.pseudoScripts;
if (!mo.match(PSEUDOSCRIPTS))
return;
var parent = this.coreParent().Parent;
var isPseudo = !parent || !(parent.isKind('msubsup') && !parent.isKind('msub'));
this.setProperty('pseudoscript', isPseudo);
if (isPseudo) {
this.attributes.setInherited('lspace', 0);
this.attributes.setInherited('rspace', 0);
}
};
MmlMo.prototype.checkPrimes = function (mo) {
var PRIMES = this.constructor.primes;
if (!mo.match(PRIMES))
return;
var REMAP = this.constructor.remapPrimes;
var primes = (0, string_js_1.unicodeString)((0, string_js_1.unicodeChars)(mo).map(function (c) { return REMAP[c]; }));
this.setProperty('primes', primes);
};
MmlMo.prototype.checkMathAccent = function (mo) {
var parent = this.Parent;
if (this.getProperty('mathaccent') !== undefined || !parent || !parent.isKind('munderover'))
return;
var base = parent.childNodes[0];
if (base.isEmbellished && base.coreMO() === this)
return;
var MATHACCENT = this.constructor.mathaccents;
if (mo.match(MATHACCENT)) {
this.setProperty('mathaccent', true);
}
};
MmlMo.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlTokenNode.defaults), { form: 'infix', fence: false, separator: false, lspace: 'thickmathspace', rspace: 'thickmathspace', stretchy: false, symmetric: false, maxsize: 'infinity', minsize: '0em', largeop: false, movablelimits: false, accent: false, linebreak: 'auto', lineleading: '1ex', linebreakstyle: 'before', indentalign: 'auto', indentshift: '0', indenttarget: '', indentalignfirst: 'indentalign', indentshiftfirst: 'indentshift', indentalignlast: 'indentalign', indentshiftlast: 'indentshift' });
MmlMo.MMLSPACING = OperatorDictionary_js_1.MMLSPACING;
MmlMo.OPTABLE = OperatorDictionary_js_1.OPTABLE;
MmlMo.pseudoScripts = new RegExp([
'^["\'*`',
'\u00AA',
'\u00B0',
'\u00B2-\u00B4',
'\u00B9',
'\u00BA',
'\u2018-\u201F',
'\u2032-\u2037\u2057',
'\u2070\u2071',
'\u2074-\u207F',
'\u2080-\u208E',
']+$'
].join(''));
MmlMo.primes = new RegExp([
'^["\'`',
'\u2018-\u201F',
']+$'
].join(''));
MmlMo.remapPrimes = {
0x0022: 0x2033,
0x0027: 0x2032,
0x0060: 0x2035,
0x2018: 0x2035,
0x2019: 0x2032,
0x201A: 0x2032,
0x201B: 0x2035,
0x201C: 0x2036,
0x201D: 0x2033,
0x201E: 0x2033,
0x201F: 0x2036,
};
MmlMo.mathaccents = new RegExp([
'^[',
'\u00B4\u0301\u02CA',
'\u0060\u0300\u02CB',
'\u00A8\u0308',
'\u007E\u0303\u02DC',
'\u00AF\u0304\u02C9',
'\u02D8\u0306',
'\u02C7\u030C',
'\u005E\u0302\u02C6',
'\u2192\u20D7',
'\u02D9\u0307',
'\u02DA\u030A',
'\u20DB',
'\u20DC',
']$'
].join(''));
return MmlMo;
}(MmlNode_js_1.AbstractMmlTokenNode));
exports.MmlMo = MmlMo;
//# sourceMappingURL=mo.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlLayoutNode } from '../MmlNode.js';
export declare class MmlMpadded extends AbstractMmlLayoutNode {
static defaults: PropertyList;
get kind(): string;
}

View File

@@ -0,0 +1,47 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMpadded = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMpadded = (function (_super) {
__extends(MmlMpadded, _super);
function MmlMpadded() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMpadded.prototype, "kind", {
get: function () {
return 'mpadded';
},
enumerable: false,
configurable: true
});
MmlMpadded.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults), { width: '', height: '', depth: '', lspace: 0, voffset: 0 });
return MmlMpadded;
}(MmlNode_js_1.AbstractMmlLayoutNode));
exports.MmlMpadded = MmlMpadded;
//# sourceMappingURL=mpadded.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mpadded.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mpadded.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAoD;AAOpD;IAAgC,8BAAqB;IAArD;;IAqBA,CAAC;IAJC,sBAAW,4BAAI;aAAf;YACE,OAAO,SAAS,CAAC;QACnB,CAAC;;;OAAA;IAda,mBAAQ,yBACjB,kCAAqB,CAAC,QAAQ,KACjC,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,CAAC,EACT,OAAO,EAAE,CAAC,IACV;IASJ,iBAAC;CAAA,AArBD,CAAgC,kCAAqB,GAqBpD;AArBY,gCAAU"}

View File

@@ -0,0 +1,7 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlLayoutNode } from '../MmlNode.js';
export declare class MmlMphantom extends AbstractMmlLayoutNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
}

View File

@@ -0,0 +1,49 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMphantom = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMphantom = (function (_super) {
__extends(MmlMphantom, _super);
function MmlMphantom() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMphantom.prototype, "kind", {
get: function () {
return 'mphantom';
},
enumerable: false,
configurable: true
});
MmlMphantom.defaults = __assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults);
return MmlMphantom;
}(MmlNode_js_1.AbstractMmlLayoutNode));
exports.MmlMphantom = MmlMphantom;
//# sourceMappingURL=mphantom.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mphantom.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mphantom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA8D;AAO9D;IAAiC,+BAAqB;IAAtD;QAAA,qEAqBC;QATW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IASpC,CAAC;IAJC,sBAAW,6BAAI;aAAf;YACE,OAAO,UAAU,CAAC;QACpB,CAAC;;;OAAA;IAda,oBAAQ,gBACjB,kCAAqB,CAAC,QAAQ,EACjC;IAcJ,kBAAC;CAAA,AArBD,CAAiC,kCAAqB,GAqBrD;AArBY,kCAAW"}

View File

@@ -0,0 +1,10 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode, AttributeList } from '../MmlNode.js';
export declare class MmlMroot extends AbstractMmlNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
get arity(): number;
setTeXclass(prev: MmlNode): this;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}

View File

@@ -0,0 +1,66 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMroot = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMroot = (function (_super) {
__extends(MmlMroot, _super);
function MmlMroot() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMroot.prototype, "kind", {
get: function () {
return 'mroot';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMroot.prototype, "arity", {
get: function () {
return 2;
},
enumerable: false,
configurable: true
});
MmlMroot.prototype.setTeXclass = function (prev) {
this.getPrevClass(prev);
this.childNodes[0].setTeXclass(null);
this.childNodes[1].setTeXclass(null);
return this;
};
MmlMroot.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
this.childNodes[0].setInheritedAttributes(attributes, display, level, true);
this.childNodes[1].setInheritedAttributes(attributes, false, level + 2, prime);
};
MmlMroot.defaults = __assign({}, MmlNode_js_1.AbstractMmlNode.defaults);
return MmlMroot;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMroot = MmlMroot;
//# sourceMappingURL=mroot.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mroot.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mroot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAgF;AAOhF;IAA8B,4BAAe;IAA7C;QAAA,qEAoDC;QAxCW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IAwCpC,CAAC;IAnCC,sBAAW,0BAAI;aAAf;YACE,OAAO,OAAO,CAAC;QACjB,CAAC;;;OAAA;IAMD,sBAAW,2BAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAQM,8BAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAOS,8CAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QAC9G,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;QAC5E,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACjF,CAAC;IA7Ca,iBAAQ,gBACjB,4BAAe,CAAC,QAAQ,EAC3B;IA6CJ,eAAC;CAAA,AApDD,CAA8B,4BAAe,GAoD5C;AApDY,4BAAQ"}

View File

@@ -0,0 +1,22 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode } from '../MmlNode.js';
export declare class MmlMrow extends AbstractMmlNode {
static defaults: PropertyList;
protected _core: number;
get kind(): string;
get isSpacelike(): boolean;
get isEmbellished(): boolean;
core(): MmlNode;
coreMO(): MmlNode;
nonSpaceLength(): number;
firstNonSpace(): MmlNode | null;
lastNonSpace(): MmlNode | null;
setTeXclass(prev: MmlNode): MmlNode;
}
export declare class MmlInferredMrow extends MmlMrow {
static defaults: PropertyList;
get kind(): string;
get isInferred(): boolean;
get notParent(): boolean;
toString(): string;
}

View File

@@ -0,0 +1,254 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlInferredMrow = exports.MmlMrow = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMrow = (function (_super) {
__extends(MmlMrow, _super);
function MmlMrow() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._core = null;
return _this;
}
Object.defineProperty(MmlMrow.prototype, "kind", {
get: function () {
return 'mrow';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMrow.prototype, "isSpacelike", {
get: function () {
var e_1, _a;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (!child.isSpacelike) {
return false;
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_1) throw e_1.error; }
}
return true;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMrow.prototype, "isEmbellished", {
get: function () {
var e_2, _a;
var embellished = false;
var i = 0;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child) {
if (child.isEmbellished) {
if (embellished) {
return false;
}
embellished = true;
this._core = i;
}
else if (!child.isSpacelike) {
return false;
}
}
i++;
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_2) throw e_2.error; }
}
return embellished;
},
enumerable: false,
configurable: true
});
MmlMrow.prototype.core = function () {
if (!this.isEmbellished || this._core == null) {
return this;
}
return this.childNodes[this._core];
};
MmlMrow.prototype.coreMO = function () {
if (!this.isEmbellished || this._core == null) {
return this;
}
return this.childNodes[this._core].coreMO();
};
MmlMrow.prototype.nonSpaceLength = function () {
var e_3, _a;
var n = 0;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child && !child.isSpacelike) {
n++;
}
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_3) throw e_3.error; }
}
return n;
};
MmlMrow.prototype.firstNonSpace = function () {
var e_4, _a;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
if (child && !child.isSpacelike) {
return child;
}
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_4) throw e_4.error; }
}
return null;
};
MmlMrow.prototype.lastNonSpace = function () {
var i = this.childNodes.length;
while (--i >= 0) {
var child = this.childNodes[i];
if (child && !child.isSpacelike) {
return child;
}
}
return null;
};
MmlMrow.prototype.setTeXclass = function (prev) {
var e_5, _a, e_6, _b;
if (this.getProperty('open') != null || this.getProperty('close') != null) {
this.getPrevClass(prev);
prev = null;
try {
for (var _c = __values(this.childNodes), _d = _c.next(); !_d.done; _d = _c.next()) {
var child = _d.value;
prev = child.setTeXclass(prev);
}
}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_5) throw e_5.error; }
}
if (this.texClass == null) {
this.texClass = MmlNode_js_1.TEXCLASS.INNER;
}
}
else {
try {
for (var _e = __values(this.childNodes), _f = _e.next(); !_f.done; _f = _e.next()) {
var child = _f.value;
prev = child.setTeXclass(prev);
}
}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {
try {
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
}
finally { if (e_6) throw e_6.error; }
}
if (this.childNodes[0]) {
this.updateTeXclass(this.childNodes[0]);
}
}
return prev;
};
MmlMrow.defaults = __assign({}, MmlNode_js_1.AbstractMmlNode.defaults);
return MmlMrow;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMrow = MmlMrow;
var MmlInferredMrow = (function (_super) {
__extends(MmlInferredMrow, _super);
function MmlInferredMrow() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlInferredMrow.prototype, "kind", {
get: function () {
return 'inferredMrow';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlInferredMrow.prototype, "isInferred", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlInferredMrow.prototype, "notParent", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlInferredMrow.prototype.toString = function () {
return '[' + this.childNodes.join(',') + ']';
};
MmlInferredMrow.defaults = MmlMrow.defaults;
return MmlInferredMrow;
}(MmlMrow));
exports.MmlInferredMrow = MmlInferredMrow;
//# sourceMappingURL=mrow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mrow.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mrow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAiE;AAOjE;IAA6B,2BAAe;IAA5C;QAAA,qEA0JC;QA9IW,WAAK,GAAW,IAAI,CAAC;;IA8IjC,CAAC;IAzIC,sBAAW,yBAAI;aAAf;YACE,OAAO,MAAM,CAAC;QAChB,CAAC;;;OAAA;IAOD,sBAAW,gCAAW;aAAtB;;;gBACE,KAAoB,IAAA,KAAA,SAAA,IAAI,CAAC,UAAU,CAAA,gBAAA,4BAAE;oBAAhC,IAAM,KAAK,WAAA;oBACd,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;wBACtB,OAAO,KAAK,CAAC;qBACd;iBACF;;;;;;;;;YACD,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAQD,sBAAW,kCAAa;aAAxB;;YACE,IAAI,WAAW,GAAG,KAAK,CAAC;YACxB,IAAI,CAAC,GAAG,CAAC,CAAC;;gBACV,KAAoB,IAAA,KAAA,SAAA,IAAI,CAAC,UAAU,CAAA,gBAAA,4BAAE;oBAAhC,IAAM,KAAK,WAAA;oBACd,IAAI,KAAK,EAAE;wBACT,IAAI,KAAK,CAAC,aAAa,EAAE;4BACvB,IAAI,WAAW,EAAE;gCACf,OAAO,KAAK,CAAC;6BACd;4BACD,WAAW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CAAA,AA1JD,CAA6B,4BAAe,GA0J3C;AA1JY,0BAAO;AAkKpB;IAAqC,mCAAO;IAA5C;;IAmCA,CAAC;IAzBC,sBAAW,iCAAI;aAAf;YACE,OAAO,cAAc,CAAC;QACxB,CAAC;;;OAAA;IAKD,sBAAW,uCAAU;aAArB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAKD,sBAAW,sCAAS;aAApB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAKM,kCAAQ,GAAf;QACE,OAAO,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IAC/C,CAAC;IA5Ba,wBAAQ,GAAiB,OAAO,CAAC,QAAQ,CAAC;IA8B1D,sBAAC;CAAA,AAnCD,CAAqC,OAAO,GAmC3C;AAnCY,0CAAe"}

View File

@@ -0,0 +1,7 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlTokenNode } from '../MmlNode.js';
export declare class MmlMs extends AbstractMmlTokenNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
}

View File

@@ -0,0 +1,49 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMs = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMs = (function (_super) {
__extends(MmlMs, _super);
function MmlMs() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMs.prototype, "kind", {
get: function () {
return 'ms';
},
enumerable: false,
configurable: true
});
MmlMs.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlTokenNode.defaults), { lquote: '"', rquote: '"' });
return MmlMs;
}(MmlNode_js_1.AbstractMmlTokenNode));
exports.MmlMs = MmlMs;
//# sourceMappingURL=ms.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ms.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/ms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA6D;AAO7D;IAA2B,yBAAoB;IAA/C;QAAA,qEAuBC;QATW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IASpC,CAAC;IAJC,sBAAW,uBAAI;aAAf;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAhBa,cAAQ,yBACjB,iCAAoB,CAAC,QAAQ,KAChC,MAAM,EAAE,GAAG,EACX,MAAM,EAAE,GAAG,IACX;IAcJ,YAAC;CAAA,AAvBD,CAA2B,iCAAoB,GAuB9C;AAvBY,sBAAK"}

View File

@@ -0,0 +1,11 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlTokenNode } from '../MmlNode.js';
export declare class MmlMspace extends AbstractMmlTokenNode {
static defaults: PropertyList;
protected texclass: number;
setTeXclass(prev: MmlNode): MmlNode;
get kind(): string;
get arity(): number;
get isSpacelike(): boolean;
get hasNewline(): boolean;
}

View File

@@ -0,0 +1,75 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMspace = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMspace = (function (_super) {
__extends(MmlMspace, _super);
function MmlMspace() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.NONE;
return _this;
}
MmlMspace.prototype.setTeXclass = function (prev) {
return prev;
};
Object.defineProperty(MmlMspace.prototype, "kind", {
get: function () {
return 'mspace';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMspace.prototype, "arity", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMspace.prototype, "isSpacelike", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMspace.prototype, "hasNewline", {
get: function () {
var attributes = this.attributes;
return (attributes.getExplicit('width') == null && attributes.getExplicit('height') == null &&
attributes.getExplicit('depth') == null && attributes.get('linebreak') === 'newline');
},
enumerable: false,
configurable: true
});
MmlMspace.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlTokenNode.defaults), { width: '0em', height: '0ex', depth: '0ex', linebreak: 'auto' });
return MmlMspace;
}(MmlNode_js_1.AbstractMmlTokenNode));
exports.MmlMspace = MmlMspace;
//# sourceMappingURL=mspace.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mspace.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mspace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAsE;AAOtE;IAA+B,6BAAoB;IAAnD;QAAA,qEA0DC;QA1CW,cAAQ,GAAG,qBAAQ,CAAC,IAAI,CAAC;;IA0CrC,CAAC;IArCQ,+BAAW,GAAlB,UAAmB,IAAa;QAC9B,OAAO,IAAI,CAAC;IACd,CAAC;IAKD,sBAAW,2BAAI;aAAf;YACE,OAAO,QAAQ,CAAC;QAClB,CAAC;;;OAAA;IAMD,sBAAW,4BAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAKD,sBAAW,kCAAW;aAAtB;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAOD,sBAAW,iCAAU;aAArB;YACE,IAAI,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YACjC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,IAAI;gBACnF,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,UAAU,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,CAAC,CAAC;QAChG,CAAC;;;OAAA;IAnDa,kBAAQ,yBACjB,iCAAoB,CAAC,QAAQ,KAChC,KAAK,EAAG,KAAK,EACb,MAAM,EAAE,KAAK,EACb,KAAK,EAAG,KAAK,EACb,SAAS,EAAE,MAAM,IACjB;IA+CJ,gBAAC;CAAA,AA1DD,CAA+B,iCAAoB,GA0DlD;AA1DY,8BAAS"}

View File

@@ -0,0 +1,11 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode, AttributeList } from '../MmlNode.js';
export declare class MmlMsqrt extends AbstractMmlNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
get arity(): number;
get linebreakContainer(): boolean;
setTeXclass(prev: MmlNode): this;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, _prime: boolean): void;
}

View File

@@ -0,0 +1,71 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMsqrt = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMsqrt = (function (_super) {
__extends(MmlMsqrt, _super);
function MmlMsqrt() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMsqrt.prototype, "kind", {
get: function () {
return 'msqrt';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsqrt.prototype, "arity", {
get: function () {
return -1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsqrt.prototype, "linebreakContainer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMsqrt.prototype.setTeXclass = function (prev) {
this.getPrevClass(prev);
this.childNodes[0].setTeXclass(null);
return this;
};
MmlMsqrt.prototype.setChildInheritedAttributes = function (attributes, display, level, _prime) {
this.childNodes[0].setInheritedAttributes(attributes, display, level, true);
};
MmlMsqrt.defaults = __assign({}, MmlNode_js_1.AbstractMmlNode.defaults);
return MmlMsqrt;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMsqrt = MmlMsqrt;
//# sourceMappingURL=msqrt.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"msqrt.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/msqrt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAgF;AAOhF;IAA8B,4BAAe;IAA7C;QAAA,qEAuDC;QA3CW,cAAQ,GAAG,qBAAQ,CAAC,GAAG,CAAC;;IA2CpC,CAAC;IAtCC,sBAAW,0BAAI;aAAf;YACE,OAAO,OAAO,CAAC;QACjB,CAAC;;;OAAA;IAMD,sBAAW,2BAAK;aAAhB;YACE,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;;;OAAA;IAMD,sBAAW,wCAAkB;aAA7B;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAKM,8BAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IAOS,8CAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,MAAe;QAC/G,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC9E,CAAC;IAhDa,iBAAQ,gBACjB,4BAAe,CAAC,QAAQ,EAC3B;IAgDJ,eAAC;CAAA,AAvDD,CAA8B,4BAAe,GAuD5C;AAvDY,4BAAQ"}

View File

@@ -0,0 +1,8 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlLayoutNode, AttributeList } from '../MmlNode.js';
export declare class MmlMstyle extends AbstractMmlLayoutNode {
static defaults: PropertyList;
get kind(): string;
get notParent(): boolean;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}

View File

@@ -0,0 +1,79 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMstyle = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var Attributes_js_1 = require("../Attributes.js");
var MmlMstyle = (function (_super) {
__extends(MmlMstyle, _super);
function MmlMstyle() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMstyle.prototype, "kind", {
get: function () {
return 'mstyle';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMstyle.prototype, "notParent", {
get: function () {
return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
},
enumerable: false,
configurable: true
});
MmlMstyle.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
var scriptlevel = this.attributes.getExplicit('scriptlevel');
if (scriptlevel != null) {
scriptlevel = scriptlevel.toString();
if (scriptlevel.match(/^\s*[-+]/)) {
level += parseInt(scriptlevel);
}
else {
level = parseInt(scriptlevel);
}
prime = false;
}
var displaystyle = this.attributes.getExplicit('displaystyle');
if (displaystyle != null) {
display = (displaystyle === true);
prime = false;
}
var cramped = this.attributes.getExplicit('data-cramped');
if (cramped != null) {
prime = cramped;
}
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
this.childNodes[0].setInheritedAttributes(attributes, display, level, prime);
};
MmlMstyle.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlLayoutNode.defaults), { scriptlevel: Attributes_js_1.INHERIT, displaystyle: Attributes_js_1.INHERIT, scriptsizemultiplier: 1 / Math.sqrt(2), scriptminsize: '8px', mathbackground: Attributes_js_1.INHERIT, mathcolor: Attributes_js_1.INHERIT, dir: Attributes_js_1.INHERIT, infixlinebreakstyle: 'before' });
return MmlMstyle;
}(MmlNode_js_1.AbstractMmlLayoutNode));
exports.MmlMstyle = MmlMstyle;
//# sourceMappingURL=mstyle.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mstyle.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mstyle.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAmE;AACnE,kDAAyC;AAOzC;IAA+B,6BAAqB;IAApD;;IA4DA,CAAC;IAxCC,sBAAW,2BAAI;aAAf;YACE,OAAO,QAAQ,CAAC;QAClB,CAAC;;;OAAA;IAKD,sBAAW,gCAAS;aAApB;YACE,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;QAC1E,CAAC;;;OAAA;IAOS,+CAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QAC9G,IAAI,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC;QAC7D,IAAI,WAAW,IAAI,IAAI,EAAE;YACvB,WAAW,GAAG,WAA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/Node.js';
import { AbstractMmlBaseNode, AttributeList } from '../MmlNode.js';
export declare class MmlMsubsup extends AbstractMmlBaseNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get base(): number;
get sub(): number;
get sup(): number;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
}
export declare class MmlMsub extends MmlMsubsup {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
}
export declare class MmlMsup extends MmlMsubsup {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get sup(): number;
get sub(): number;
}

View File

@@ -0,0 +1,144 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMsup = exports.MmlMsub = exports.MmlMsubsup = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var MmlMsubsup = (function (_super) {
__extends(MmlMsubsup, _super);
function MmlMsubsup() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMsubsup.prototype, "kind", {
get: function () {
return 'msubsup';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsubsup.prototype, "arity", {
get: function () {
return 3;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsubsup.prototype, "base", {
get: function () {
return 0;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsubsup.prototype, "sub", {
get: function () {
return 1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsubsup.prototype, "sup", {
get: function () {
return 2;
},
enumerable: false,
configurable: true
});
MmlMsubsup.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {
var nodes = this.childNodes;
nodes[0].setInheritedAttributes(attributes, display, level, prime);
nodes[1].setInheritedAttributes(attributes, false, level + 1, prime || this.sub === 1);
if (!nodes[2]) {
return;
}
nodes[2].setInheritedAttributes(attributes, false, level + 1, prime || this.sub === 2);
};
MmlMsubsup.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlBaseNode.defaults), { subscriptshift: '', superscriptshift: '' });
return MmlMsubsup;
}(MmlNode_js_1.AbstractMmlBaseNode));
exports.MmlMsubsup = MmlMsubsup;
var MmlMsub = (function (_super) {
__extends(MmlMsub, _super);
function MmlMsub() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMsub.prototype, "kind", {
get: function () {
return 'msub';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsub.prototype, "arity", {
get: function () {
return 2;
},
enumerable: false,
configurable: true
});
MmlMsub.defaults = __assign({}, MmlMsubsup.defaults);
return MmlMsub;
}(MmlMsubsup));
exports.MmlMsub = MmlMsub;
var MmlMsup = (function (_super) {
__extends(MmlMsup, _super);
function MmlMsup() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMsup.prototype, "kind", {
get: function () {
return 'msup';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsup.prototype, "arity", {
get: function () {
return 2;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsup.prototype, "sup", {
get: function () {
return 1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMsup.prototype, "sub", {
get: function () {
return 2;
},
enumerable: false,
configurable: true
});
MmlMsup.defaults = __assign({}, MmlMsubsup.defaults);
return MmlMsup;
}(MmlMsubsup));
exports.MmlMsup = MmlMsup;
//# sourceMappingURL=msubsup.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"msubsup.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/msubsup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAiE;AAOjE;IAAgC,8BAAmB;IAAnD;;IA8DA,CAAC;IAhDC,sBAAW,4BAAI;aAAf;YACE,OAAO,SAAS,CAAC;QACnB,CAAC;;;OAAA;IAMD,sBAAW,6BAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAKD,sBAAW,4BAAI;aAAf;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAKD,sBAAW,2BAAG;aAAd;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAKD,sBAAW,2BAAG;aAAd;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAOS,gDAA2B,GAArC,UAAsC,UAAyB,EAAE,OAAgB,EAAE,KAAa,EAAE,KAAc;QAC9G,IAAI,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC;QAC5B,KAAK,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACnE,KAAK,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACvF,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YACb,OAAO;SACR;QACD,KAAK,CAAC,CAAC,CAAC,CAAC,sBAAsB,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;IACzF,CAAC;IAvDa,mBAAQ,yBACjB,gCAAmB,CAAC,QAAQ,KAC/B,cAAc,EAAE,EAAE,EAClB,gBAAgB,EAAE,EAAE,IACpB;IAqDJ,iBAAC;CAAA,AA9DD,CAAgC,gCAAmB,GA8DlD;AA9DY,gCAAU;AAqEvB;IAA6B,2BAAU;IAAvC;;IAwBA,CAAC;IAZC,sBAAW,yBAAI;aAAf;YACE,OAAO,MAAM,CAAC;QAChB,CAAC;;;OAAA;IAMD,sBAAW,0BAAK;aAAhB;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAjBa,gBAAQ,gBACjB,UAAU,CAAC,QAAQ,EACtB;IAiBJ,cAAC;CAAA,AAxBD,CAA6B,UAAU,GAwBtC;AAxBY,0BAAO;AA+BpB;IAA6B,2BAAU;IAAvC;;IAwCA,CAAC;IA5BC,sBAAW,yBAAI;aAAf;YACE,OAAO,MAAM,CAAC;QAChB,CAAC;;;OAAA;IAMD,sBAAI,0BAAK;aAAT;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAMD,sBAAI,wBAAG;aAAP;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAMD,sBAAI,wBAAG;aAAP;YACE,OAAO,CAAC,CAAC;QACX,CAAC;;;OAAA;IAjCa,gBAAQ,gBACjB,UAAU,CAAC,QAAQ,EACtB;IAiCJ,cAAC;CAAA,AAxCD,CAA6B,UAAU,GAwCtC;AAxCY,0BAAO"}

View File

@@ -0,0 +1,15 @@
import { PropertyList } from '../../Tree/Node.js';
import { MmlNode, AbstractMmlNode, AttributeList } from '../MmlNode.js';
export declare class MmlMtable extends AbstractMmlNode {
static defaults: PropertyList;
properties: {
useHeight: boolean;
};
protected texclass: number;
get kind(): string;
get linebreakContainer(): boolean;
setInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean): void;
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, _prime: boolean): void;
protected verifyChildren(options: PropertyList): void;
setTeXclass(prev: MmlNode): this;
}

View File

@@ -0,0 +1,181 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __values = (this && this.__values) || function(o) {
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
if (m) return m.call(o);
if (o && typeof o.length === "number") return {
next: function () {
if (o && i >= o.length) o = void 0;
return { value: o && o[i++], done: !o };
}
};
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMtable = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var string_js_1 = require("../../../util/string.js");
var MmlMtable = (function (_super) {
__extends(MmlMtable, _super);
function MmlMtable() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.properties = {
useHeight: true
};
_this.texclass = MmlNode_js_1.TEXCLASS.ORD;
return _this;
}
Object.defineProperty(MmlMtable.prototype, "kind", {
get: function () {
return 'mtable';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMtable.prototype, "linebreakContainer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMtable.prototype.setInheritedAttributes = function (attributes, display, level, prime) {
var e_1, _a;
try {
for (var indentAttributes_1 = __values(MmlNode_js_1.indentAttributes), indentAttributes_1_1 = indentAttributes_1.next(); !indentAttributes_1_1.done; indentAttributes_1_1 = indentAttributes_1.next()) {
var name_1 = indentAttributes_1_1.value;
if (attributes[name_1]) {
this.attributes.setInherited(name_1, attributes[name_1][1]);
}
if (this.attributes.getExplicit(name_1) !== undefined) {
delete (this.attributes.getAllAttributes())[name_1];
}
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (indentAttributes_1_1 && !indentAttributes_1_1.done && (_a = indentAttributes_1.return)) _a.call(indentAttributes_1);
}
finally { if (e_1) throw e_1.error; }
}
_super.prototype.setInheritedAttributes.call(this, attributes, display, level, prime);
};
MmlMtable.prototype.setChildInheritedAttributes = function (attributes, display, level, _prime) {
var e_2, _a, e_3, _b;
try {
for (var _c = __values(this.childNodes), _d = _c.next(); !_d.done; _d = _c.next()) {
var child = _d.value;
if (!child.isKind('mtr')) {
this.replaceChild(this.factory.create('mtr'), child)
.appendChild(child);
}
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_2) throw e_2.error; }
}
level = this.getProperty('scriptlevel') || level;
display = !!(this.attributes.getExplicit('displaystyle') || this.attributes.getDefault('displaystyle'));
attributes = this.addInheritedAttributes(attributes, {
columnalign: this.attributes.get('columnalign'),
rowalign: 'center'
});
var cramped = this.attributes.getExplicit('data-cramped');
var ralign = (0, string_js_1.split)(this.attributes.get('rowalign'));
try {
for (var _e = __values(this.childNodes), _f = _e.next(); !_f.done; _f = _e.next()) {
var child = _f.value;
attributes.rowalign[1] = ralign.shift() || attributes.rowalign[1];
child.setInheritedAttributes(attributes, display, level, !!cramped);
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
}
finally { if (e_3) throw e_3.error; }
}
};
MmlMtable.prototype.verifyChildren = function (options) {
var mtr = null;
var factory = this.factory;
for (var i = 0; i < this.childNodes.length; i++) {
var child = this.childNodes[i];
if (child.isKind('mtr')) {
mtr = null;
}
else {
var isMtd = child.isKind('mtd');
if (mtr) {
this.removeChild(child);
i--;
}
else {
mtr = this.replaceChild(factory.create('mtr'), child);
}
mtr.appendChild(isMtd ? child : factory.create('mtd', {}, [child]));
if (!options['fixMtables']) {
child.parent.removeChild(child);
child.parent = this;
isMtd && mtr.appendChild(factory.create('mtd'));
var merror = child.mError('Children of ' + this.kind + ' must be mtr or mlabeledtr', options, isMtd);
mtr.childNodes[mtr.childNodes.length - 1].appendChild(merror);
}
}
}
_super.prototype.verifyChildren.call(this, options);
};
MmlMtable.prototype.setTeXclass = function (prev) {
var e_4, _a;
this.getPrevClass(prev);
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
child.setTeXclass(null);
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
}
finally { if (e_4) throw e_4.error; }
}
return this;
};
MmlMtable.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlNode.defaults), { align: 'axis', rowalign: 'baseline', columnalign: 'center', groupalign: '{left}', alignmentscope: true, columnwidth: 'auto', width: 'auto', rowspacing: '1ex', columnspacing: '.8em', rowlines: 'none', columnlines: 'none', frame: 'none', framespacing: '0.4em 0.5ex', equalrows: false, equalcolumns: false, displaystyle: false, side: 'right', minlabelspacing: '0.8em' });
return MmlMtable;
}(MmlNode_js_1.AbstractMmlNode));
exports.MmlMtable = MmlMtable;
//# sourceMappingURL=mtable.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mtable.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mtable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAkG;AAClG,qDAA8C;AAO9C;IAA+B,6BAAe;IAA9C;QAAA,qEAqJC;QAvHQ,gBAAU,GAAG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AU,CAAA,gBAAA,4BAAE;gBAAhC,IAAM,KAAK,WAAA;gBACd,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;aACzB;;;;;;;;;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IA9Ia,kBAAQ,yBACjB,4BAAe,CAAC,QAAQ,KAC3B,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,UAAU,EACpB,WAAW,EAAE,QAAQ,EACrB,UAAU,EAAE,QAAQ,EACpB,cAAc,EAAE,IAAI,EACpB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,KAAK,EACjB,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,aAAa,EAC3B,SAAS,EAAE,KAAK,EAChB,YAAY,EAAE,KAAK,EACnB,YAAY,EAAE,KAAK,EACnB,IAAI,EAAE,OAAO,EACb,eAAe,EAAE,OAAO,IACxB;IA4HJ,gBAAC;CAAA,AArJD,CAA+B,4BAAe,GAqJ7C;AArJY,8BAAS"}

View File

@@ -0,0 +1,10 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlBaseNode, MmlNode } from '../MmlNode.js';
export declare class MmlMtd extends AbstractMmlBaseNode {
static defaults: PropertyList;
get kind(): string;
get arity(): number;
get linebreakContainer(): boolean;
protected verifyChildren(options: PropertyList): void;
setTeXclass(prev: MmlNode): this;
}

View File

@@ -0,0 +1,74 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.MmlMtd = void 0;
var MmlNode_js_1 = require("../MmlNode.js");
var Attributes_js_1 = require("../Attributes.js");
var MmlMtd = (function (_super) {
__extends(MmlMtd, _super);
function MmlMtd() {
return _super !== null && _super.apply(this, arguments) || this;
}
Object.defineProperty(MmlMtd.prototype, "kind", {
get: function () {
return 'mtd';
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMtd.prototype, "arity", {
get: function () {
return -1;
},
enumerable: false,
configurable: true
});
Object.defineProperty(MmlMtd.prototype, "linebreakContainer", {
get: function () {
return true;
},
enumerable: false,
configurable: true
});
MmlMtd.prototype.verifyChildren = function (options) {
if (this.parent && !this.parent.isKind('mtr')) {
this.mError(this.kind + ' can only be a child of an mtr or mlabeledtr', options, true);
return;
}
_super.prototype.verifyChildren.call(this, options);
};
MmlMtd.prototype.setTeXclass = function (prev) {
this.getPrevClass(prev);
this.childNodes[0].setTeXclass(null);
return this;
};
MmlMtd.defaults = __assign(__assign({}, MmlNode_js_1.AbstractMmlBaseNode.defaults), { rowspan: 1, columnspan: 1, rowalign: Attributes_js_1.INHERIT, columnalign: Attributes_js_1.INHERIT, groupalign: Attributes_js_1.INHERIT });
return MmlMtd;
}(MmlNode_js_1.AbstractMmlBaseNode));
exports.MmlMtd = MmlMtd;
//# sourceMappingURL=mtd.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mtd.js","sourceRoot":"","sources":["../../../../ts/core/MmlTree/MmlNodes/mtd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAA2D;AAC3D,kDAAyC;AAOzC;IAA4B,0BAAmB;IAA/C;;IA2DA,CAAC;IA1CC,sBAAW,wBAAI;aAAf;YACE,OAAO,KAAK,CAAC;QACf,CAAC;;;OAAA;IAMD,sBAAW,yBAAK;aAAhB;YACE,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;;;OAAA;IAMD,sBAAW,sCAAkB;aAA7B;YACE,OAAO,IAAI,CAAC;QACd,CAAC;;;OAAA;IAOS,+BAAc,GAAxB,UAAyB,OAAqB;QAC5C,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YAC7C,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,8CAA8C,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YACvF,OAAO;SACR;QACD,iBAAM,cAAc,YAAC,OAAO,CAAC,CAAC;IAChC,CAAC;IAKM,4BAAW,GAAlB,UAAmB,IAAa;QAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,IAAI,CAAC;IACd,CAAC;IApDa,eAAQ,yBACjB,gCAAmB,CAAC,QAAQ,KAC/B,OAAO,EAAE,CAAC,EACV,UAAU,EAAE,CAAC,EACb,QAAQ,EAAE,uBAAO,EACjB,WAAW,EAAE,uBAAO,EACpB,UAAU,EAAE,uBAAO,IACnB;IA+CJ,aAAC;CAAA,AA3DD,CAA4B,gCAAmB,GA2D9C;AA3DY,wBAAM"}

View File

@@ -0,0 +1,8 @@
import { PropertyList } from '../../Tree/Node.js';
import { AbstractMmlTokenNode } from '../MmlNode.js';
export declare class MmlMtext extends AbstractMmlTokenNode {
static defaults: PropertyList;
protected texclass: number;
get kind(): string;
get isSpacelike(): boolean;
}

Some files were not shown because too many files have changed in this diff Show More