add initial marp implementation with sample content and build configuration
This commit is contained in:
3
node_modules/mathjax-full/js/handlers/html.d.ts
generated
vendored
Normal file
3
node_modules/mathjax-full/js/handlers/html.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { HTMLHandler } from './html/HTMLHandler.js';
|
||||
import { DOMAdaptor } from '../core/DOMAdaptor.js';
|
||||
export declare function RegisterHTMLHandler<N, T, D>(adaptor: DOMAdaptor<N, T, D>): HTMLHandler<N, T, D>;
|
||||
12
node_modules/mathjax-full/js/handlers/html.js
generated
vendored
Normal file
12
node_modules/mathjax-full/js/handlers/html.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.RegisterHTMLHandler = void 0;
|
||||
var mathjax_js_1 = require("../mathjax.js");
|
||||
var HTMLHandler_js_1 = require("./html/HTMLHandler.js");
|
||||
function RegisterHTMLHandler(adaptor) {
|
||||
var handler = new HTMLHandler_js_1.HTMLHandler(adaptor);
|
||||
mathjax_js_1.mathjax.handlers.register(handler);
|
||||
return handler;
|
||||
}
|
||||
exports.RegisterHTMLHandler = RegisterHTMLHandler;
|
||||
//# sourceMappingURL=html.js.map
|
||||
1
node_modules/mathjax-full/js/handlers/html.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/handlers/html.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"html.js","sourceRoot":"","sources":["../../ts/handlers/html.ts"],"names":[],"mappings":";;;AAuBA,4CAAsC;AACtC,wDAAkD;AAalD,SAAgB,mBAAmB,CAAU,OAA4B;IACvE,IAAM,OAAO,GAAG,IAAI,4BAAW,CAAU,OAAO,CAAC,CAAC;IAClD,oBAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,OAAO,CAAC;AACjB,CAAC;AAJD,kDAIC"}
|
||||
28
node_modules/mathjax-full/js/handlers/html/HTMLDocument.d.ts
generated
vendored
Normal file
28
node_modules/mathjax-full/js/handlers/html/HTMLDocument.d.ts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
import { AbstractMathDocument } from '../../core/MathDocument.js';
|
||||
import { OptionList } from '../../util/Options.js';
|
||||
import { HTMLMathItem } from './HTMLMathItem.js';
|
||||
import { HTMLDomStrings } from './HTMLDomStrings.js';
|
||||
import { DOMAdaptor } from '../../core/DOMAdaptor.js';
|
||||
import { InputJax } from '../../core/InputJax.js';
|
||||
import { ProtoItem, Location } from '../../core/MathItem.js';
|
||||
import { StyleList } from '../../util/StyleList.js';
|
||||
export declare type HTMLNodeArray<N, T> = [N | T, number][][];
|
||||
export declare class HTMLDocument<N, T, D> extends AbstractMathDocument<N, T, D> {
|
||||
static KIND: string;
|
||||
static OPTIONS: OptionList;
|
||||
protected styles: StyleList[];
|
||||
domStrings: HTMLDomStrings<N, T, D>;
|
||||
constructor(document: any, adaptor: DOMAdaptor<N, T, D>, options: OptionList);
|
||||
protected findPosition(N: number, index: number, delim: string, nodes: HTMLNodeArray<N, T>): Location<N, T>;
|
||||
protected mathItem(item: ProtoItem<N, T>, jax: InputJax<N, T, D>, nodes: HTMLNodeArray<N, T>): HTMLMathItem<N, T, D>;
|
||||
findMath(options: OptionList): this;
|
||||
updateDocument(): this;
|
||||
protected addPageElements(): void;
|
||||
addStyleSheet(): void;
|
||||
protected findSheet(head: N, id: string): N;
|
||||
removeFromDocument(restore?: boolean): this;
|
||||
documentStyleSheet(): N;
|
||||
documentPageElements(): N;
|
||||
addStyles(styles: StyleList): void;
|
||||
getStyles(): StyleList[];
|
||||
}
|
||||
263
node_modules/mathjax-full/js/handlers/html/HTMLDocument.js
generated
vendored
Normal file
263
node_modules/mathjax-full/js/handlers/html/HTMLDocument.js
generated
vendored
Normal file
@@ -0,0 +1,263 @@
|
||||
"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.HTMLDocument = void 0;
|
||||
var MathDocument_js_1 = require("../../core/MathDocument.js");
|
||||
var Options_js_1 = require("../../util/Options.js");
|
||||
var HTMLMathItem_js_1 = require("./HTMLMathItem.js");
|
||||
var HTMLMathList_js_1 = require("./HTMLMathList.js");
|
||||
var HTMLDomStrings_js_1 = require("./HTMLDomStrings.js");
|
||||
var MathItem_js_1 = require("../../core/MathItem.js");
|
||||
var HTMLDocument = (function (_super) {
|
||||
__extends(HTMLDocument, _super);
|
||||
function HTMLDocument(document, adaptor, options) {
|
||||
var _this = this;
|
||||
var _a = __read((0, Options_js_1.separateOptions)(options, HTMLDomStrings_js_1.HTMLDomStrings.OPTIONS), 2), html = _a[0], dom = _a[1];
|
||||
_this = _super.call(this, document, adaptor, html) || this;
|
||||
_this.domStrings = _this.options['DomStrings'] || new HTMLDomStrings_js_1.HTMLDomStrings(dom);
|
||||
_this.domStrings.adaptor = adaptor;
|
||||
_this.styles = [];
|
||||
return _this;
|
||||
}
|
||||
HTMLDocument.prototype.findPosition = function (N, index, delim, nodes) {
|
||||
var e_1, _a;
|
||||
var adaptor = this.adaptor;
|
||||
try {
|
||||
for (var _b = __values(nodes[N]), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var list = _c.value;
|
||||
var _d = __read(list, 2), node = _d[0], n = _d[1];
|
||||
if (index <= n && adaptor.kind(node) === '#text') {
|
||||
return { node: node, n: Math.max(index, 0), delim: delim };
|
||||
}
|
||||
index -= n;
|
||||
}
|
||||
}
|
||||
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 { node: null, n: 0, delim: delim };
|
||||
};
|
||||
HTMLDocument.prototype.mathItem = function (item, jax, nodes) {
|
||||
var math = item.math;
|
||||
var start = this.findPosition(item.n, item.start.n, item.open, nodes);
|
||||
var end = this.findPosition(item.n, item.end.n, item.close, nodes);
|
||||
return new this.options.MathItem(math, jax, item.display, start, end);
|
||||
};
|
||||
HTMLDocument.prototype.findMath = function (options) {
|
||||
var e_2, _a, e_3, _b, _c, e_4, _d, e_5, _e;
|
||||
if (!this.processed.isSet('findMath')) {
|
||||
this.adaptor.document = this.document;
|
||||
options = (0, Options_js_1.userOptions)({ elements: this.options.elements || [this.adaptor.body(this.document)] }, options);
|
||||
try {
|
||||
for (var _f = __values(this.adaptor.getElements(options['elements'], this.document)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
||||
var container = _g.value;
|
||||
var _h = __read([null, null], 2), strings = _h[0], nodes = _h[1];
|
||||
try {
|
||||
for (var _j = (e_3 = void 0, __values(this.inputJax)), _k = _j.next(); !_k.done; _k = _j.next()) {
|
||||
var jax = _k.value;
|
||||
var list = new (this.options['MathList'])();
|
||||
if (jax.processStrings) {
|
||||
if (strings === null) {
|
||||
_c = __read(this.domStrings.find(container), 2), strings = _c[0], nodes = _c[1];
|
||||
}
|
||||
try {
|
||||
for (var _l = (e_4 = void 0, __values(jax.findMath(strings))), _m = _l.next(); !_m.done; _m = _l.next()) {
|
||||
var math = _m.value;
|
||||
list.push(this.mathItem(math, jax, nodes));
|
||||
}
|
||||
}
|
||||
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_m && !_m.done && (_d = _l.return)) _d.call(_l);
|
||||
}
|
||||
finally { if (e_4) throw e_4.error; }
|
||||
}
|
||||
}
|
||||
else {
|
||||
try {
|
||||
for (var _o = (e_5 = void 0, __values(jax.findMath(container))), _p = _o.next(); !_p.done; _p = _o.next()) {
|
||||
var math = _p.value;
|
||||
var item = new this.options.MathItem(math.math, jax, math.display, math.start, math.end);
|
||||
list.push(item);
|
||||
}
|
||||
}
|
||||
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_p && !_p.done && (_e = _o.return)) _e.call(_o);
|
||||
}
|
||||
finally { if (e_5) throw e_5.error; }
|
||||
}
|
||||
}
|
||||
this.math.merge(list);
|
||||
}
|
||||
}
|
||||
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_k && !_k.done && (_b = _j.return)) _b.call(_j);
|
||||
}
|
||||
finally { if (e_3) throw e_3.error; }
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
||||
finally {
|
||||
try {
|
||||
if (_g && !_g.done && (_a = _f.return)) _a.call(_f);
|
||||
}
|
||||
finally { if (e_2) throw e_2.error; }
|
||||
}
|
||||
this.processed.set('findMath');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
HTMLDocument.prototype.updateDocument = function () {
|
||||
if (!this.processed.isSet('updateDocument')) {
|
||||
this.addPageElements();
|
||||
this.addStyleSheet();
|
||||
_super.prototype.updateDocument.call(this);
|
||||
this.processed.set('updateDocument');
|
||||
}
|
||||
return this;
|
||||
};
|
||||
HTMLDocument.prototype.addPageElements = function () {
|
||||
var body = this.adaptor.body(this.document);
|
||||
var node = this.documentPageElements();
|
||||
if (node) {
|
||||
this.adaptor.append(body, node);
|
||||
}
|
||||
};
|
||||
HTMLDocument.prototype.addStyleSheet = function () {
|
||||
var sheet = this.documentStyleSheet();
|
||||
var adaptor = this.adaptor;
|
||||
if (sheet && !adaptor.parent(sheet)) {
|
||||
var head = adaptor.head(this.document);
|
||||
var styles = this.findSheet(head, adaptor.getAttribute(sheet, 'id'));
|
||||
if (styles) {
|
||||
adaptor.replace(sheet, styles);
|
||||
}
|
||||
else {
|
||||
adaptor.append(head, sheet);
|
||||
}
|
||||
}
|
||||
};
|
||||
HTMLDocument.prototype.findSheet = function (head, id) {
|
||||
var e_6, _a;
|
||||
if (id) {
|
||||
try {
|
||||
for (var _b = __values(this.adaptor.tags(head, 'style')), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var sheet = _c.value;
|
||||
if (this.adaptor.getAttribute(sheet, 'id') === id) {
|
||||
return sheet;
|
||||
}
|
||||
}
|
||||
}
|
||||
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; }
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
HTMLDocument.prototype.removeFromDocument = function (restore) {
|
||||
var e_7, _a;
|
||||
if (restore === void 0) { restore = false; }
|
||||
if (this.processed.isSet('updateDocument')) {
|
||||
try {
|
||||
for (var _b = __values(this.math), _c = _b.next(); !_c.done; _c = _b.next()) {
|
||||
var math = _c.value;
|
||||
if (math.state() >= MathItem_js_1.STATE.INSERTED) {
|
||||
math.state(MathItem_js_1.STATE.TYPESET, restore);
|
||||
}
|
||||
}
|
||||
}
|
||||
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; }
|
||||
}
|
||||
}
|
||||
this.processed.clear('updateDocument');
|
||||
return this;
|
||||
};
|
||||
HTMLDocument.prototype.documentStyleSheet = function () {
|
||||
return this.outputJax.styleSheet(this);
|
||||
};
|
||||
HTMLDocument.prototype.documentPageElements = function () {
|
||||
return this.outputJax.pageElements(this);
|
||||
};
|
||||
HTMLDocument.prototype.addStyles = function (styles) {
|
||||
this.styles.push(styles);
|
||||
};
|
||||
HTMLDocument.prototype.getStyles = function () {
|
||||
return this.styles;
|
||||
};
|
||||
HTMLDocument.KIND = 'HTML';
|
||||
HTMLDocument.OPTIONS = __assign(__assign({}, MathDocument_js_1.AbstractMathDocument.OPTIONS), { renderActions: (0, Options_js_1.expandable)(__assign(__assign({}, MathDocument_js_1.AbstractMathDocument.OPTIONS.renderActions), { styles: [MathItem_js_1.STATE.INSERTED + 1, '', 'updateStyleSheet', false] })), MathList: HTMLMathList_js_1.HTMLMathList, MathItem: HTMLMathItem_js_1.HTMLMathItem, DomStrings: null });
|
||||
return HTMLDocument;
|
||||
}(MathDocument_js_1.AbstractMathDocument));
|
||||
exports.HTMLDocument = HTMLDocument;
|
||||
//# sourceMappingURL=HTMLDocument.js.map
|
||||
1
node_modules/mathjax-full/js/handlers/html/HTMLDocument.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/handlers/html/HTMLDocument.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
26
node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.d.ts
generated
vendored
Normal file
26
node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import { OptionList } from '../../util/Options.js';
|
||||
import { DOMAdaptor } from '../../core/DOMAdaptor.js';
|
||||
export declare type HTMLNodeList<N, T> = [N | T, number][];
|
||||
export declare class HTMLDomStrings<N, T, D> {
|
||||
static OPTIONS: OptionList;
|
||||
protected options: OptionList;
|
||||
protected strings: string[];
|
||||
protected string: string;
|
||||
protected snodes: HTMLNodeList<N, T>;
|
||||
protected nodes: HTMLNodeList<N, T>[];
|
||||
protected stack: [N | T, boolean][];
|
||||
protected skipHtmlTags: RegExp;
|
||||
protected ignoreHtmlClass: RegExp;
|
||||
protected processHtmlClass: RegExp;
|
||||
adaptor: DOMAdaptor<N, T, D>;
|
||||
constructor(options?: OptionList);
|
||||
protected init(): void;
|
||||
protected getPatterns(): void;
|
||||
protected pushString(): void;
|
||||
protected extendString(node: N | T, text: string): void;
|
||||
protected handleText(node: T, ignore: boolean): N | T;
|
||||
protected handleTag(node: N, ignore: boolean): N | T;
|
||||
protected handleContainer(node: N, ignore: boolean): [N | T, boolean];
|
||||
protected handleOther(node: N, _ignore: boolean): N | T;
|
||||
find(node: N | T): [string[], HTMLNodeList<N, T>[]];
|
||||
}
|
||||
131
node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.js
generated
vendored
Normal file
131
node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.js
generated
vendored
Normal file
@@ -0,0 +1,131 @@
|
||||
"use strict";
|
||||
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.HTMLDomStrings = void 0;
|
||||
var Options_js_1 = require("../../util/Options.js");
|
||||
var HTMLDomStrings = (function () {
|
||||
function HTMLDomStrings(options) {
|
||||
if (options === void 0) { options = null; }
|
||||
var CLASS = this.constructor;
|
||||
this.options = (0, Options_js_1.userOptions)((0, Options_js_1.defaultOptions)({}, CLASS.OPTIONS), options);
|
||||
this.init();
|
||||
this.getPatterns();
|
||||
}
|
||||
HTMLDomStrings.prototype.init = function () {
|
||||
this.strings = [];
|
||||
this.string = '';
|
||||
this.snodes = [];
|
||||
this.nodes = [];
|
||||
this.stack = [];
|
||||
};
|
||||
HTMLDomStrings.prototype.getPatterns = function () {
|
||||
var skip = (0, Options_js_1.makeArray)(this.options['skipHtmlTags']);
|
||||
var ignore = (0, Options_js_1.makeArray)(this.options['ignoreHtmlClass']);
|
||||
var process = (0, Options_js_1.makeArray)(this.options['processHtmlClass']);
|
||||
this.skipHtmlTags = new RegExp('^(?:' + skip.join('|') + ')$', 'i');
|
||||
this.ignoreHtmlClass = new RegExp('(?:^| )(?:' + ignore.join('|') + ')(?: |$)');
|
||||
this.processHtmlClass = new RegExp('(?:^| )(?:' + process + ')(?: |$)');
|
||||
};
|
||||
HTMLDomStrings.prototype.pushString = function () {
|
||||
if (this.string.match(/\S/)) {
|
||||
this.strings.push(this.string);
|
||||
this.nodes.push(this.snodes);
|
||||
}
|
||||
this.string = '';
|
||||
this.snodes = [];
|
||||
};
|
||||
HTMLDomStrings.prototype.extendString = function (node, text) {
|
||||
this.snodes.push([node, text.length]);
|
||||
this.string += text;
|
||||
};
|
||||
HTMLDomStrings.prototype.handleText = function (node, ignore) {
|
||||
if (!ignore) {
|
||||
this.extendString(node, this.adaptor.value(node));
|
||||
}
|
||||
return this.adaptor.next(node);
|
||||
};
|
||||
HTMLDomStrings.prototype.handleTag = function (node, ignore) {
|
||||
if (!ignore) {
|
||||
var text = this.options['includeHtmlTags'][this.adaptor.kind(node)];
|
||||
this.extendString(node, text);
|
||||
}
|
||||
return this.adaptor.next(node);
|
||||
};
|
||||
HTMLDomStrings.prototype.handleContainer = function (node, ignore) {
|
||||
this.pushString();
|
||||
var cname = this.adaptor.getAttribute(node, 'class') || '';
|
||||
var tname = this.adaptor.kind(node) || '';
|
||||
var process = this.processHtmlClass.exec(cname);
|
||||
var next = node;
|
||||
if (this.adaptor.firstChild(node) && !this.adaptor.getAttribute(node, 'data-MJX') &&
|
||||
(process || !this.skipHtmlTags.exec(tname))) {
|
||||
if (this.adaptor.next(node)) {
|
||||
this.stack.push([this.adaptor.next(node), ignore]);
|
||||
}
|
||||
next = this.adaptor.firstChild(node);
|
||||
ignore = (ignore || this.ignoreHtmlClass.exec(cname)) && !process;
|
||||
}
|
||||
else {
|
||||
next = this.adaptor.next(node);
|
||||
}
|
||||
return [next, ignore];
|
||||
};
|
||||
HTMLDomStrings.prototype.handleOther = function (node, _ignore) {
|
||||
this.pushString();
|
||||
return this.adaptor.next(node);
|
||||
};
|
||||
HTMLDomStrings.prototype.find = function (node) {
|
||||
var _a, _b;
|
||||
this.init();
|
||||
var stop = this.adaptor.next(node);
|
||||
var ignore = false;
|
||||
var include = this.options['includeHtmlTags'];
|
||||
while (node && node !== stop) {
|
||||
var kind = this.adaptor.kind(node);
|
||||
if (kind === '#text') {
|
||||
node = this.handleText(node, ignore);
|
||||
}
|
||||
else if (include.hasOwnProperty(kind)) {
|
||||
node = this.handleTag(node, ignore);
|
||||
}
|
||||
else if (kind) {
|
||||
_a = __read(this.handleContainer(node, ignore), 2), node = _a[0], ignore = _a[1];
|
||||
}
|
||||
else {
|
||||
node = this.handleOther(node, ignore);
|
||||
}
|
||||
if (!node && this.stack.length) {
|
||||
this.pushString();
|
||||
_b = __read(this.stack.pop(), 2), node = _b[0], ignore = _b[1];
|
||||
}
|
||||
}
|
||||
this.pushString();
|
||||
var result = [this.strings, this.nodes];
|
||||
this.init();
|
||||
return result;
|
||||
};
|
||||
HTMLDomStrings.OPTIONS = {
|
||||
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code', 'annotation', 'annotation-xml'],
|
||||
includeHtmlTags: { br: '\n', wbr: '', '#comment': '' },
|
||||
ignoreHtmlClass: 'mathjax_ignore',
|
||||
processHtmlClass: 'mathjax_process'
|
||||
};
|
||||
return HTMLDomStrings;
|
||||
}());
|
||||
exports.HTMLDomStrings = HTMLDomStrings;
|
||||
//# sourceMappingURL=HTMLDomStrings.js.map
|
||||
1
node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/handlers/html/HTMLDomStrings.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HTMLDomStrings.js","sourceRoot":"","sources":["../../../ts/handlers/html/HTMLDomStrings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAuBA,oDAAyF;AAqBzF;IA+EE,wBAAY,OAA0B;QAA1B,wBAAA,EAAA,cAA0B;QACpC,IAAI,KAAK,GAAG,IAAI,CAAC,WAAoC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,IAAA,wBAAW,EAAC,IAAA,2BAAc,EAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC;QACvE,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,C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AE,gBAAgB;QAKjC,gBAAgB,EAAE,iBAAiB;KAIpC,CAAC;IA2OJ,qBAAC;CAAA,AAlQD,IAkQC;AAlQY,wCAAc"}
|
||||
10
node_modules/mathjax-full/js/handlers/html/HTMLHandler.d.ts
generated
vendored
Normal file
10
node_modules/mathjax-full/js/handlers/html/HTMLHandler.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { AbstractHandler } from '../../core/Handler.js';
|
||||
import { MinHTMLAdaptor } from '../../adaptors/HTMLAdaptor.js';
|
||||
import { HTMLDocument } from './HTMLDocument.js';
|
||||
import { OptionList } from '../../util/Options.js';
|
||||
export declare class HTMLHandler<N, T, D> extends AbstractHandler<N, T, D> {
|
||||
adaptor: MinHTMLAdaptor<N, T, D>;
|
||||
documentClass: typeof HTMLDocument;
|
||||
handlesDocument(document: any): boolean;
|
||||
create(document: any, options: OptionList): HTMLDocument<N, T, D>;
|
||||
}
|
||||
59
node_modules/mathjax-full/js/handlers/html/HTMLHandler.js
generated
vendored
Normal file
59
node_modules/mathjax-full/js/handlers/html/HTMLHandler.js
generated
vendored
Normal 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 __());
|
||||
};
|
||||
})();
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.HTMLHandler = void 0;
|
||||
var Handler_js_1 = require("../../core/Handler.js");
|
||||
var HTMLDocument_js_1 = require("./HTMLDocument.js");
|
||||
var HTMLHandler = (function (_super) {
|
||||
__extends(HTMLHandler, _super);
|
||||
function HTMLHandler() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.documentClass = HTMLDocument_js_1.HTMLDocument;
|
||||
return _this;
|
||||
}
|
||||
HTMLHandler.prototype.handlesDocument = function (document) {
|
||||
var adaptor = this.adaptor;
|
||||
if (typeof (document) === 'string') {
|
||||
try {
|
||||
document = adaptor.parse(document, 'text/html');
|
||||
}
|
||||
catch (err) { }
|
||||
}
|
||||
if (document instanceof adaptor.window.Document ||
|
||||
document instanceof adaptor.window.HTMLElement ||
|
||||
document instanceof adaptor.window.DocumentFragment) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
HTMLHandler.prototype.create = function (document, options) {
|
||||
var adaptor = this.adaptor;
|
||||
if (typeof (document) === 'string') {
|
||||
document = adaptor.parse(document, 'text/html');
|
||||
}
|
||||
else if (document instanceof adaptor.window.HTMLElement ||
|
||||
document instanceof adaptor.window.DocumentFragment) {
|
||||
var child = document;
|
||||
document = adaptor.parse('', 'text/html');
|
||||
adaptor.append(adaptor.body(document), child);
|
||||
}
|
||||
return _super.prototype.create.call(this, document, options);
|
||||
};
|
||||
return HTMLHandler;
|
||||
}(Handler_js_1.AbstractHandler));
|
||||
exports.HTMLHandler = HTMLHandler;
|
||||
//# sourceMappingURL=HTMLHandler.js.map
|
||||
1
node_modules/mathjax-full/js/handlers/html/HTMLHandler.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/handlers/html/HTMLHandler.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HTMLHandler.js","sourceRoot":"","sources":["../../../ts/handlers/html/HTMLHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,oDAAsD;AAEtD,qDAA+C;AAW/C;IAA0C,+BAAwB;IAAlE;QAAA,qE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e,GAiDxD;AAjDY,kCAAW"}
|
||||
10
node_modules/mathjax-full/js/handlers/html/HTMLMathItem.d.ts
generated
vendored
Normal file
10
node_modules/mathjax-full/js/handlers/html/HTMLMathItem.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { AbstractMathItem, Location } from '../../core/MathItem.js';
|
||||
import { InputJax } from '../../core/InputJax.js';
|
||||
import { HTMLDocument } from './HTMLDocument.js';
|
||||
export declare class HTMLMathItem<N, T, D> extends AbstractMathItem<N, T, D> {
|
||||
get adaptor(): import("../../core/DOMAdaptor.js").DOMAdaptor<N, T, D>;
|
||||
constructor(math: string, jax: InputJax<N, T, D>, display?: boolean, start?: Location<N, T>, end?: Location<N, T>);
|
||||
updateDocument(_html: HTMLDocument<N, T, D>): void;
|
||||
updateStyleSheet(document: HTMLDocument<N, T, D>): void;
|
||||
removeFromDocument(restore?: boolean): void;
|
||||
}
|
||||
101
node_modules/mathjax-full/js/handlers/html/HTMLMathItem.js
generated
vendored
Normal file
101
node_modules/mathjax-full/js/handlers/html/HTMLMathItem.js
generated
vendored
Normal file
@@ -0,0 +1,101 @@
|
||||
"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.HTMLMathItem = void 0;
|
||||
var MathItem_js_1 = require("../../core/MathItem.js");
|
||||
var HTMLMathItem = (function (_super) {
|
||||
__extends(HTMLMathItem, _super);
|
||||
function HTMLMathItem(math, jax, display, start, end) {
|
||||
if (display === void 0) { display = true; }
|
||||
if (start === void 0) { start = { node: null, n: 0, delim: '' }; }
|
||||
if (end === void 0) { end = { node: null, n: 0, delim: '' }; }
|
||||
return _super.call(this, math, jax, display, start, end) || this;
|
||||
}
|
||||
Object.defineProperty(HTMLMathItem.prototype, "adaptor", {
|
||||
get: function () {
|
||||
return this.inputJax.adaptor;
|
||||
},
|
||||
enumerable: false,
|
||||
configurable: true
|
||||
});
|
||||
HTMLMathItem.prototype.updateDocument = function (_html) {
|
||||
if (this.state() < MathItem_js_1.STATE.INSERTED) {
|
||||
if (this.inputJax.processStrings) {
|
||||
var node = this.start.node;
|
||||
if (node === this.end.node) {
|
||||
if (this.end.n && this.end.n < this.adaptor.value(this.end.node).length) {
|
||||
this.adaptor.split(this.end.node, this.end.n);
|
||||
}
|
||||
if (this.start.n) {
|
||||
node = this.adaptor.split(this.start.node, this.start.n);
|
||||
}
|
||||
this.adaptor.replace(this.typesetRoot, node);
|
||||
}
|
||||
else {
|
||||
if (this.start.n) {
|
||||
node = this.adaptor.split(node, this.start.n);
|
||||
}
|
||||
while (node !== this.end.node) {
|
||||
var next = this.adaptor.next(node);
|
||||
this.adaptor.remove(node);
|
||||
node = next;
|
||||
}
|
||||
this.adaptor.insert(this.typesetRoot, node);
|
||||
if (this.end.n < this.adaptor.value(node).length) {
|
||||
this.adaptor.split(node, this.end.n);
|
||||
}
|
||||
this.adaptor.remove(node);
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.adaptor.replace(this.typesetRoot, this.start.node);
|
||||
}
|
||||
this.start.node = this.end.node = this.typesetRoot;
|
||||
this.start.n = this.end.n = 0;
|
||||
this.state(MathItem_js_1.STATE.INSERTED);
|
||||
}
|
||||
};
|
||||
HTMLMathItem.prototype.updateStyleSheet = function (document) {
|
||||
document.addStyleSheet();
|
||||
};
|
||||
HTMLMathItem.prototype.removeFromDocument = function (restore) {
|
||||
if (restore === void 0) { restore = false; }
|
||||
if (this.state() >= MathItem_js_1.STATE.TYPESET) {
|
||||
var adaptor = this.adaptor;
|
||||
var node = this.start.node;
|
||||
var math = adaptor.text('');
|
||||
if (restore) {
|
||||
var text = this.start.delim + this.math + this.end.delim;
|
||||
if (this.inputJax.processStrings) {
|
||||
math = adaptor.text(text);
|
||||
}
|
||||
else {
|
||||
var doc = adaptor.parse(text, 'text/html');
|
||||
math = adaptor.firstChild(adaptor.body(doc));
|
||||
}
|
||||
}
|
||||
if (adaptor.parent(node)) {
|
||||
adaptor.replace(math, node);
|
||||
}
|
||||
this.start.node = this.end.node = math;
|
||||
this.start.n = this.end.n = 0;
|
||||
}
|
||||
};
|
||||
return HTMLMathItem;
|
||||
}(MathItem_js_1.AbstractMathItem));
|
||||
exports.HTMLMathItem = HTMLMathItem;
|
||||
//# sourceMappingURL=HTMLMathItem.js.map
|
||||
1
node_modules/mathjax-full/js/handlers/html/HTMLMathItem.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/handlers/html/HTMLMathItem.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HTMLMathItem.js","sourceRoot":"","sources":["../../../ts/handlers/html/HTMLMathItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,sDAAyE;AAYzE;IAA2C,gCAAyB;IAYlE,sBAAY,IAAY,EAAE,GAAsB,EAAE,OAAuB,EAC7D,KAAqD,EACrD,GAAmD;QAFb,wBAAA,EAAA,cAAuB;QAC7D,sBAAA,EAAA,UAAyB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAC;QACrD,oBAAA,EAAA,QAAuB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAC;eAC7D,kBAAM,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,K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AAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;YAC3B,IAAI,IAAI,GAAU,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnC,IAAI,OAAO,EAAE;gBACX,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;gBACzD,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE;oBAChC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBAC3B;qBAAM;oBACL,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;oBAC7C,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;iBAC9C;aACF;YACD,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;gBACxB,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;aAC7B;YACD,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC;YACvC,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;SAC/B;IACH,CAAC;IAEH,mBAAC;AAAD,CAAC,AAzGD,CAA2C,8BAAgB,GAyG1D;AAzGY,oCAAY"}
|
||||
3
node_modules/mathjax-full/js/handlers/html/HTMLMathList.d.ts
generated
vendored
Normal file
3
node_modules/mathjax-full/js/handlers/html/HTMLMathList.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import { AbstractMathList } from '../../core/MathList.js';
|
||||
export declare class HTMLMathList<N, T, D> extends AbstractMathList<N, T, D> {
|
||||
}
|
||||
28
node_modules/mathjax-full/js/handlers/html/HTMLMathList.js
generated
vendored
Normal file
28
node_modules/mathjax-full/js/handlers/html/HTMLMathList.js
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
"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.HTMLMathList = void 0;
|
||||
var MathList_js_1 = require("../../core/MathList.js");
|
||||
var HTMLMathList = (function (_super) {
|
||||
__extends(HTMLMathList, _super);
|
||||
function HTMLMathList() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
return HTMLMathList;
|
||||
}(MathList_js_1.AbstractMathList));
|
||||
exports.HTMLMathList = HTMLMathList;
|
||||
//# sourceMappingURL=HTMLMathList.js.map
|
||||
1
node_modules/mathjax-full/js/handlers/html/HTMLMathList.js.map
generated
vendored
Normal file
1
node_modules/mathjax-full/js/handlers/html/HTMLMathList.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"HTMLMathList.js","sourceRoot":"","sources":["../../../ts/handlers/html/HTMLMathList.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,sDAAwD;AAUxD;IAA2C,gCAAyB;IAApE;;IACA,CAAC;IAAD,mBAAC;AAAD,CAAC,AADD,CAA2C,8BAAgB,GAC1D;AADY,oCAAY"}
|
||||
Reference in New Issue
Block a user