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

14
node_modules/mathjax-full/js/output/svg/FontCache.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import { SVG } from '../svg.js';
export declare class FontCache<N, T, D> {
protected jax: SVG<N, T, D>;
protected cache: Map<string, string>;
protected defs: N;
protected localID: string;
protected nextID: number;
constructor(jax: SVG<N, T, D>);
cachePath(variant: string, C: string, path: string): string;
clearLocalID(): void;
useLocalID(id?: string): void;
clearCache(): void;
getCache(): N;
}

37
node_modules/mathjax-full/js/output/svg/FontCache.js generated vendored Normal file
View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FontCache = void 0;
var FontCache = (function () {
function FontCache(jax) {
this.cache = new Map();
this.defs = null;
this.localID = '';
this.nextID = 0;
this.jax = jax;
}
FontCache.prototype.cachePath = function (variant, C, path) {
var id = 'MJX-' + this.localID + (this.jax.font.getVariant(variant).cacheID || '') + '-' + C;
if (!this.cache.has(id)) {
this.cache.set(id, path);
this.jax.adaptor.append(this.defs, this.jax.svg('path', { id: id, d: path }));
}
return id;
};
FontCache.prototype.clearLocalID = function () {
this.localID = '';
};
FontCache.prototype.useLocalID = function (id) {
if (id === void 0) { id = null; }
this.localID = (id == null ? ++this.nextID : id) + (id === '' ? '' : '-');
};
FontCache.prototype.clearCache = function () {
this.cache = new Map();
this.defs = this.jax.svg('defs');
};
FontCache.prototype.getCache = function () {
return this.defs;
};
return FontCache;
}());
exports.FontCache = FontCache;
//# sourceMappingURL=FontCache.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FontCache.js","sourceRoot":"","sources":["../../../ts/output/svg/FontCache.ts"],"names":[],"mappings":";;;AAyBA;IA8BE,mBAAY,GAAiB;QApBnB,UAAK,GAAwB,IAAI,GAAG,EAAE,CAAC;QAKvC,SAAI,GAAM,IAAI,CAAC;QA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CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAKM,4BAAQ,GAAf;QACE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAEH,gBAAC;AAAD,CAAC,AAjFD,IAiFC;AAjFY,8BAAS"}

25
node_modules/mathjax-full/js/output/svg/FontData.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import { CharMap, CharOptions, CharData, VariantData, DelimiterData, FontData } from '../common/FontData.js';
export * from '../common/FontData.js';
export declare type CharStringMap = {
[name: number]: string;
};
export interface SVGCharOptions extends CharOptions {
c?: string;
p?: string;
}
export declare type SVGCharMap = CharMap<SVGCharOptions>;
export declare type SVGCharData = CharData<SVGCharOptions>;
export interface SVGVariantData extends VariantData<SVGCharOptions> {
cacheID: string;
}
export interface SVGDelimiterData extends DelimiterData {
}
export declare class SVGFontData extends FontData<SVGCharOptions, SVGVariantData, SVGDelimiterData> {
static OPTIONS: {
dynamicPrefix: string;
};
static JAX: string;
static charOptions(font: SVGCharMap, n: number): SVGCharOptions;
}
export declare type SVGFontDataClass = typeof SVGFontData;
export declare function AddPaths(font: SVGCharMap, paths: CharStringMap, content: CharStringMap): SVGCharMap;

103
node_modules/mathjax-full/js/output/svg/FontData.js generated vendored Normal file
View File

@@ -0,0 +1,103 @@
"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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
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.AddPaths = exports.SVGFontData = void 0;
var FontData_js_1 = require("../common/FontData.js");
__exportStar(require("../common/FontData.js"), exports);
var SVGFontData = (function (_super) {
__extends(SVGFontData, _super);
function SVGFontData() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGFontData.charOptions = function (font, n) {
return _super.charOptions.call(this, font, n);
};
SVGFontData.OPTIONS = __assign(__assign({}, FontData_js_1.FontData.OPTIONS), { dynamicPrefix: './output/svg/fonts' });
SVGFontData.JAX = 'SVG';
return SVGFontData;
}(FontData_js_1.FontData));
exports.SVGFontData = SVGFontData;
function AddPaths(font, paths, content) {
var e_1, _a, e_2, _b;
try {
for (var _c = __values(Object.keys(paths)), _d = _c.next(); !_d.done; _d = _c.next()) {
var c = _d.value;
var n = parseInt(c);
SVGFontData.charOptions(font, n).p = paths[n];
}
}
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; }
}
try {
for (var _e = __values(Object.keys(content)), _f = _e.next(); !_f.done; _f = _e.next()) {
var c = _f.value;
var n = parseInt(c);
SVGFontData.charOptions(font, n).c = content[n];
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
}
finally { if (e_2) throw e_2.error; }
}
return font;
}
exports.AddPaths = AddPaths;
//# sourceMappingURL=FontData.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"FontData.js","sourceRoot":"","sources":["../../../ts/output/svg/FontData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,qDAA2G;AAC3G,wDAAsC;AAqCtC;IAAiC,+BAA0D;IAA3F;;IAsBA,CAAC;IAJe,uBAAW,GAAzB,UAA0B,IAAgB,EAAE,CAAS;QACnD,OAAO,OAAM,WAAW,YAAC,IAAI,EAAE,CAAC,CAAmB,CAAC;IACtD,CAAC;IAfa,mBAAO,yBAChB,sBAAQ,CAAC,OAAO,KACnB,aAAa,EAAE,oBAAoB,IACnC;IAKY,eAAG,GAAG,KAAK,CAAC;IAS5B,kBAAC;CAAA,AAtBD,CAAiC,sBAAQ,GAsBxC;AAtBY,kCAAW;AAkCxB,SAAgB,QAAQ,CAAC,IAAgB,EAAE,KAAoB,EAAE,OAAsB;;;QACrF,KAAgB,IAAA,KAAA,SAAA,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA,gBAAA,4BAAE;YAA/B,IAAM,CAAC,WAAA;YACV,IAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtB,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;SAC/C;;;;;;;;;;QACD,KAAgB,IAAA,KAAA,SAAA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA,gBAAA,4BAAE;YAAjC,IAAM,CAAC,WAAA;YACV,IAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;YACtB,WAAW,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;SACjD;;;;;;;;;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAVD,4BAUC"}

19
node_modules/mathjax-full/js/output/svg/Notation.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import { SVGmenclose } from './Wrappers/menclose.js';
import * as Notation from '../common/Notation.js';
export * from '../common/Notation.js';
export declare type Menclose = SVGmenclose<any, any, any>;
export declare type RENDERER<N, T, D> = Notation.Renderer<SVGmenclose<N, T, D>, N>;
export declare type DEFPAIR<N, T, D> = Notation.DefPair<SVGmenclose<N, T, D>, N>;
export declare type LineName = Notation.Side | ('vertical' | 'horizontal' | 'up' | 'down');
export declare type LineData = [number, number, number, number];
export declare const computeLineData: {
[kind: string]: (h: number, d: number, w: number, t: number) => LineData;
};
export declare const lineData: (node: Menclose, kind: LineName, offset?: string) => LineData;
export declare const lineOffset: (data: LineData, node: Menclose, offset: string) => LineData;
export declare const RenderLine: <N, T, D>(line: LineName, offset?: string) => RENDERER<N, T, D>;
export declare const Border: <N, T, D>(side: Notation.Side) => DEFPAIR<N, T, D>;
export declare const Border2: <N, T, D>(name: string, side1: Notation.Side, side2: Notation.Side) => DEFPAIR<N, T, D>;
export declare const DiagonalStrike: <N, T, D>(name: LineName) => DEFPAIR<N, T, D>;
export declare const DiagonalArrow: <N, T, D>(name: string) => DEFPAIR<N, T, D>;
export declare const Arrow: <N, T, D>(name: string) => DEFPAIR<N, T, D>;

105
node_modules/mathjax-full/js/output/svg/Notation.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Arrow = exports.DiagonalArrow = exports.DiagonalStrike = exports.Border2 = exports.Border = exports.RenderLine = exports.lineOffset = exports.lineData = exports.computeLineData = void 0;
var Notation = __importStar(require("../common/Notation.js"));
__exportStar(require("../common/Notation.js"), exports);
exports.computeLineData = {
top: function (h, _d, w, t) { return [0, h - t, w, h - t]; },
right: function (h, d, w, t) { return [w - t, -d, w - t, h]; },
bottom: function (_h, d, w, t) { return [0, t - d, w, t - d]; },
left: function (h, d, _w, t) { return [t, -d, t, h]; },
vertical: function (h, d, w, _t) { return [w / 2, h, w / 2, -d]; },
horizontal: function (h, d, w, _t) { return [0, (h - d) / 2, w, (h - d) / 2]; },
up: function (h, d, w, t) { return [t, t - d, w - t, h - t]; },
down: function (h, d, w, t) { return [t, h - t, w - t, t - d]; }
};
var lineData = function (node, kind, offset) {
if (offset === void 0) { offset = ''; }
var _a = node.getBBox(), h = _a.h, d = _a.d, w = _a.w;
var t = node.thickness / 2;
return (0, exports.lineOffset)(exports.computeLineData[kind](h, d, w, t), node, offset);
};
exports.lineData = lineData;
var lineOffset = function (data, node, offset) {
if (offset) {
var d = node.getOffset(offset);
if (d) {
if (offset === 'X') {
data[0] -= d;
data[2] -= d;
}
else {
data[1] -= d;
data[3] -= d;
}
}
}
return data;
};
exports.lineOffset = lineOffset;
var RenderLine = function (line, offset) {
if (offset === void 0) { offset = ''; }
return (function (node, _child) {
var L = node.line((0, exports.lineData)(node, line, offset));
node.adaptor.append(node.element, L);
});
};
exports.RenderLine = RenderLine;
var Border = function (side) {
return Notation.CommonBorder(function (node, _child) {
node.adaptor.append(node.element, node.line((0, exports.lineData)(node, side)));
})(side);
};
exports.Border = Border;
var Border2 = function (name, side1, side2) {
return Notation.CommonBorder2(function (node, _child) {
node.adaptor.append(node.element, node.line((0, exports.lineData)(node, side1)));
node.adaptor.append(node.element, node.line((0, exports.lineData)(node, side2)));
})(name, side1, side2);
};
exports.Border2 = Border2;
var DiagonalStrike = function (name) {
return Notation.CommonDiagonalStrike(function (_cname) { return function (node, _child) {
node.adaptor.append(node.element, node.line((0, exports.lineData)(node, name)));
}; })(name);
};
exports.DiagonalStrike = DiagonalStrike;
var DiagonalArrow = function (name) {
return Notation.CommonDiagonalArrow(function (node, arrow) {
node.adaptor.append(node.element, arrow);
})(name);
};
exports.DiagonalArrow = DiagonalArrow;
var Arrow = function (name) {
return Notation.CommonArrow(function (node, arrow) {
node.adaptor.append(node.element, arrow);
})(name);
};
exports.Arrow = Arrow;
//# sourceMappingURL=Notation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Notation.js","sourceRoot":"","sources":["../../../ts/output/svg/Notation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,8DAAkD;AAClD,wDAAsC;AA6BzB,QAAA,eAAe,GAAG;IAC7B,GAAG,EAAE,UAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,EAAE,CAAC,GAAG,CAA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AC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,IAAA,gBAAQ,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IACrE,CAAC,EAFiF,CAEjF,CAAC,CAAC,IAAI,CAAC,CAAC;AACX,CAAC,CAAC;AAJW,QAAA,cAAc,kBAIzB;AAQK,IAAM,aAAa,GAAG,UAAkB,IAAY;IACzD,OAAO,QAAQ,CAAC,mBAAmB,CAA0B,UAAC,IAAI,EAAE,KAAK;QACvE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACX,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB;AAMK,IAAM,KAAK,GAAG,UAAkB,IAAY;IACjD,OAAO,QAAQ,CAAC,WAAW,CAA0B,UAAC,IAAI,EAAE,KAAK;QAC/D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACX,CAAC,CAAC;AAJW,QAAA,KAAK,SAIhB"}

43
node_modules/mathjax-full/js/output/svg/Wrapper.d.ts generated vendored Normal file
View File

@@ -0,0 +1,43 @@
import { OptionList } from '../../util/Options.js';
import { CommonWrapper, AnyWrapperClass, Constructor } from '../common/Wrapper.js';
import { SVG } from '../svg.js';
import { SVGWrapperFactory } from './WrapperFactory.js';
import { SVGFontData, SVGDelimiterData, SVGCharOptions } from './FontData.js';
export { Constructor, StringMap } from '../common/Wrapper.js';
export declare type SVGConstructor<N, T, D> = Constructor<SVGWrapper<N, T, D>>;
export interface SVGWrapperClass extends AnyWrapperClass {
kind: string;
}
export declare class SVGWrapper<N, T, D> extends CommonWrapper<SVG<N, T, D>, SVGWrapper<N, T, D>, SVGWrapperClass, SVGCharOptions, SVGDelimiterData, SVGFontData> {
static kind: string;
static borderFuzz: number;
protected factory: SVGWrapperFactory<N, T, D>;
parent: SVGWrapper<N, T, D>;
childNodes: SVGWrapper<N, T, D>[];
element: N;
dx: number;
font: SVGFontData;
toSVG(parent: N): void;
addChildren(parent: N): void;
protected standardSVGnode(parent: N): N;
protected createSVGnode(parent: N): N;
protected handleStyles(): void;
protected handleScale(): void;
protected handleColor(): void;
protected handleBorder(): void;
protected addBorderSolid(path: number[][], color: string, child: N): void;
protected addBorderBroken(path: number[][], color: string, style: string, t: number, i: number): void;
protected handleAttributes(): void;
place(x: number, y: number, element?: N): void;
protected handleId(y: number): number;
firstChild(): N;
placeChar(n: number, x: number, y: number, parent: N, variant?: string): number;
protected charNode(variant: string, C: string, path: string): N;
protected pathNode(C: string, path: string): N;
protected useNode(variant: string, C: string, path: string): N;
drawBBox(): void;
html(type: string, def?: OptionList, content?: (N | T)[]): N;
svg(type: string, def?: OptionList, content?: (N | T)[]): N;
text(text: string): T;
fixed(x: number, n?: number): string;
}

437
node_modules/mathjax-full/js/output/svg/Wrapper.js generated vendored Normal file
View File

@@ -0,0 +1,437 @@
"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.");
};
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.SVGWrapper = void 0;
var BBox_js_1 = require("../../util/BBox.js");
var Wrapper_js_1 = require("../common/Wrapper.js");
var svg_js_1 = require("../svg.js");
var SVGWrapper = (function (_super) {
__extends(SVGWrapper, _super);
function SVGWrapper() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.element = null;
_this.dx = 0;
return _this;
}
SVGWrapper.prototype.toSVG = function (parent) {
this.addChildren(this.standardSVGnode(parent));
};
SVGWrapper.prototype.addChildren = function (parent) {
var e_1, _a;
var x = 0;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
child.toSVG(parent);
var bbox = child.getOuterBBox();
if (child.element) {
child.place(x + bbox.L * bbox.rscale, 0);
}
x += (bbox.L + bbox.w + bbox.R) * bbox.rscale;
}
}
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; }
}
};
SVGWrapper.prototype.standardSVGnode = function (parent) {
var svg = this.createSVGnode(parent);
this.handleStyles();
this.handleScale();
this.handleBorder();
this.handleColor();
this.handleAttributes();
return svg;
};
SVGWrapper.prototype.createSVGnode = function (parent) {
this.element = this.svg('g', { 'data-mml-node': this.node.kind });
var href = this.node.attributes.get('href');
if (href) {
parent = this.adaptor.append(parent, this.svg('a', { href: href }));
var _a = this.getOuterBBox(), h = _a.h, d = _a.d, w = _a.w;
this.adaptor.append(this.element, this.svg('rect', {
'data-hitbox': true, fill: 'none', stroke: 'none', 'pointer-events': 'all',
width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d)
}));
}
this.adaptor.append(parent, this.element);
return this.element;
};
SVGWrapper.prototype.handleStyles = function () {
var _this = this;
if (!this.styles)
return;
var styles = this.styles.cssText;
if (styles) {
this.adaptor.setAttribute(this.element, 'style', styles);
}
BBox_js_1.BBox.StyleAdjust.forEach(function (_a) {
var _b = __read(_a, 3), name = _b[0], lr = _b[2];
if (lr !== 0)
return;
var x = _this.styles.get(name);
if (x) {
_this.dx += _this.length2em(x, 1, _this.bbox.rscale);
}
});
};
SVGWrapper.prototype.handleScale = function () {
if (this.bbox.rscale !== 1) {
var scale = 'scale(' + this.fixed(this.bbox.rscale / 1000, 3) + ')';
this.adaptor.setAttribute(this.element, 'transform', scale);
}
};
SVGWrapper.prototype.handleColor = function () {
var _a;
var adaptor = this.adaptor;
var attributes = this.node.attributes;
var mathcolor = attributes.getExplicit('mathcolor');
var color = attributes.getExplicit('color');
var mathbackground = attributes.getExplicit('mathbackground');
var background = attributes.getExplicit('background');
var bgcolor = (((_a = this.styles) === null || _a === void 0 ? void 0 : _a.get('background-color')) || '');
if (mathcolor || color) {
adaptor.setAttribute(this.element, 'fill', mathcolor || color);
adaptor.setAttribute(this.element, 'stroke', mathcolor || color);
}
if (mathbackground || background || bgcolor) {
var _b = this.getOuterBBox(), h = _b.h, d = _b.d, w = _b.w;
var rect = this.svg('rect', {
fill: mathbackground || background || bgcolor,
x: this.fixed(-this.dx), y: this.fixed(-d),
width: this.fixed(w),
height: this.fixed(h + d),
'data-bgcolor': true
});
var child = adaptor.firstChild(this.element);
if (child) {
adaptor.insert(rect, child);
}
else {
adaptor.append(this.element, rect);
}
}
};
SVGWrapper.prototype.handleBorder = function () {
var e_2, _a, e_3, _b;
if (!this.styles)
return;
var width = Array(4).fill(0);
var style = Array(4);
var color = Array(4);
try {
for (var _c = __values([['Top', 0], ['Right', 1], ['Bottom', 2], ['Left', 3]]), _d = _c.next(); !_d.done; _d = _c.next()) {
var _e = __read(_d.value, 2), name_1 = _e[0], i = _e[1];
var key = 'border' + name_1;
var w_1 = this.styles.get(key + 'Width');
if (!w_1)
continue;
width[i] = Math.max(0, this.length2em(w_1, 1, this.bbox.rscale));
style[i] = this.styles.get(key + 'Style') || 'solid';
color[i] = this.styles.get(key + 'Color') || 'currentColor';
}
}
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; }
}
var f = SVGWrapper.borderFuzz;
var bbox = this.getOuterBBox();
var _f = __read([bbox.h + f, bbox.d + f, bbox.w + f], 3), h = _f[0], d = _f[1], w = _f[2];
var outerRT = [w, h];
var outerLT = [-f, h];
var outerRB = [w, -d];
var outerLB = [-f, -d];
var innerRT = [w - width[1], h - width[0]];
var innerLT = [-f + width[3], h - width[0]];
var innerRB = [w - width[1], -d + width[2]];
var innerLB = [-f + width[3], -d + width[2]];
var paths = [
[outerLT, outerRT, innerRT, innerLT],
[outerRB, outerRT, innerRT, innerRB],
[outerLB, outerRB, innerRB, innerLB],
[outerLB, outerLT, innerLT, innerLB]
];
var adaptor = this.adaptor;
var child = adaptor.firstChild(this.element);
try {
for (var _g = __values([0, 1, 2, 3]), _h = _g.next(); !_h.done; _h = _g.next()) {
var i = _h.value;
if (!width[i])
continue;
var path = paths[i];
if (style[i] === 'dashed' || style[i] === 'dotted') {
this.addBorderBroken(path, color[i], style[i], width[i], i);
}
else {
this.addBorderSolid(path, color[i], child);
}
}
}
catch (e_3_1) { e_3 = { error: e_3_1 }; }
finally {
try {
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
}
finally { if (e_3) throw e_3.error; }
}
};
SVGWrapper.prototype.addBorderSolid = function (path, color, child) {
var _this = this;
var border = this.svg('polygon', {
points: path.map(function (_a) {
var _b = __read(_a, 2), x = _b[0], y = _b[1];
return "".concat(_this.fixed(x - _this.dx), ",").concat(_this.fixed(y));
}).join(' '),
stroke: 'none',
fill: color
});
if (child) {
this.adaptor.insert(border, child);
}
else {
this.adaptor.append(this.element, border);
}
};
SVGWrapper.prototype.addBorderBroken = function (path, color, style, t, i) {
var dot = (style === 'dotted');
var t2 = t / 2;
var _a = __read([[t2, -t2, -t2, -t2], [-t2, t2, -t2, -t2], [t2, t2, -t2, t2], [t2, t2, t2, -t2]][i], 4), tx1 = _a[0], ty1 = _a[1], tx2 = _a[2], ty2 = _a[3];
var _b = __read(path, 2), A = _b[0], B = _b[1];
var x1 = A[0] + tx1 - this.dx, y1 = A[1] + ty1;
var x2 = B[0] + tx2 - this.dx, y2 = B[1] + ty2;
var W = Math.abs(i % 2 ? y2 - y1 : x2 - x1);
var n = (dot ? Math.ceil(W / (2 * t)) : Math.ceil((W - t) / (4 * t)));
var m = W / (4 * n + 1);
var line = this.svg('line', {
x1: this.fixed(x1), y1: this.fixed(y1),
x2: this.fixed(x2), y2: this.fixed(y2),
'stroke-width': this.fixed(t), stroke: color, 'stroke-linecap': dot ? 'round' : 'square',
'stroke-dasharray': dot ? [1, this.fixed(W / n - .002)].join(' ') : [this.fixed(m), this.fixed(3 * m)].join(' ')
});
var adaptor = this.adaptor;
var child = adaptor.firstChild(this.element);
if (child) {
adaptor.insert(line, child);
}
else {
adaptor.append(this.element, line);
}
};
SVGWrapper.prototype.handleAttributes = function () {
var e_4, _a, e_5, _b;
var attributes = this.node.attributes;
var defaults = attributes.getAllDefaults();
var skip = SVGWrapper.skipAttributes;
try {
for (var _c = __values(attributes.getExplicitNames()), _d = _c.next(); !_d.done; _d = _c.next()) {
var name_2 = _d.value;
if (skip[name_2] === false || (!(name_2 in defaults) && !skip[name_2] &&
!this.adaptor.hasAttribute(this.element, name_2))) {
this.adaptor.setAttribute(this.element, name_2, attributes.getExplicit(name_2));
}
}
}
catch (e_4_1) { e_4 = { error: e_4_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_4) throw e_4.error; }
}
if (attributes.get('class')) {
var names = attributes.get('class').trim().split(/ +/);
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_3 = names_1_1.value;
this.adaptor.addClass(this.element, name_3);
}
}
catch (e_5_1) { e_5 = { error: e_5_1 }; }
finally {
try {
if (names_1_1 && !names_1_1.done && (_b = names_1.return)) _b.call(names_1);
}
finally { if (e_5) throw e_5.error; }
}
}
};
SVGWrapper.prototype.place = function (x, y, element) {
if (element === void 0) { element = null; }
x += this.dx;
if (!(x || y))
return;
if (!element) {
element = this.element;
y = this.handleId(y);
}
var translate = "translate(".concat(this.fixed(x), ",").concat(this.fixed(y), ")");
var transform = this.adaptor.getAttribute(element, 'transform') || '';
this.adaptor.setAttribute(element, 'transform', translate + (transform ? ' ' + transform : ''));
};
SVGWrapper.prototype.handleId = function (y) {
if (!this.node.attributes || !this.node.attributes.get('id')) {
return y;
}
var adaptor = this.adaptor;
var h = this.getBBox().h;
var children = adaptor.childNodes(this.element);
children.forEach(function (child) { return adaptor.remove(child); });
var g = this.svg('g', { 'data-idbox': true, transform: "translate(0,".concat(this.fixed(-h), ")") }, children);
adaptor.append(this.element, this.svg('text', { 'data-id-align': true }, [this.text('')]));
adaptor.append(this.element, g);
return y + h;
};
SVGWrapper.prototype.firstChild = function () {
var adaptor = this.adaptor;
var child = adaptor.firstChild(this.element);
if (child && adaptor.kind(child) === 'text' && adaptor.getAttribute(child, 'data-id-align')) {
child = adaptor.firstChild(adaptor.next(child));
}
if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-hitbox')) {
child = adaptor.next(child);
}
return child;
};
SVGWrapper.prototype.placeChar = function (n, x, y, parent, variant) {
var e_6, _a;
if (variant === void 0) { variant = null; }
if (variant === null) {
variant = this.variant;
}
var C = n.toString(16).toUpperCase();
var _b = __read(this.getVariantChar(variant, n), 4), w = _b[2], data = _b[3];
if ('p' in data) {
var path = (data.p ? 'M' + data.p + 'Z' : '');
this.place(x, y, this.adaptor.append(parent, this.charNode(variant, C, path)));
}
else if ('c' in data) {
var g = this.adaptor.append(parent, this.svg('g', { 'data-c': C }));
this.place(x, y, g);
x = 0;
try {
for (var _c = __values(this.unicodeChars(data.c, variant)), _d = _c.next(); !_d.done; _d = _c.next()) {
var n_1 = _d.value;
x += this.placeChar(n_1, x, y, g, variant);
}
}
catch (e_6_1) { e_6 = { error: e_6_1 }; }
finally {
try {
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
}
finally { if (e_6) throw e_6.error; }
}
}
else if (data.unknown) {
var char = String.fromCodePoint(n);
var text = this.adaptor.append(parent, this.jax.unknownText(char, variant));
this.place(x, y, text);
return this.jax.measureTextNodeWithCache(text, char, variant).w;
}
return w;
};
SVGWrapper.prototype.charNode = function (variant, C, path) {
var cache = this.jax.options.fontCache;
return (cache !== 'none' ? this.useNode(variant, C, path) : this.pathNode(C, path));
};
SVGWrapper.prototype.pathNode = function (C, path) {
return this.svg('path', { 'data-c': C, d: path });
};
SVGWrapper.prototype.useNode = function (variant, C, path) {
var use = this.svg('use', { 'data-c': C });
var id = '#' + this.jax.fontCache.cachePath(variant, C, path);
this.adaptor.setAttribute(use, 'href', id, svg_js_1.XLINKNS);
return use;
};
SVGWrapper.prototype.drawBBox = function () {
var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;
var box = this.svg('g', { style: {
opacity: .25
} }, [
this.svg('rect', {
fill: 'red',
height: this.fixed(h),
width: this.fixed(w)
}),
this.svg('rect', {
fill: 'green',
height: this.fixed(d),
width: this.fixed(w),
y: this.fixed(-d)
})
]);
var node = this.element || this.parent.element;
this.adaptor.append(node, box);
};
SVGWrapper.prototype.html = function (type, def, content) {
if (def === void 0) { def = {}; }
if (content === void 0) { content = []; }
return this.jax.html(type, def, content);
};
SVGWrapper.prototype.svg = function (type, def, content) {
if (def === void 0) { def = {}; }
if (content === void 0) { content = []; }
return this.jax.svg(type, def, content);
};
SVGWrapper.prototype.text = function (text) {
return this.jax.text(text);
};
SVGWrapper.prototype.fixed = function (x, n) {
if (n === void 0) { n = 1; }
return this.jax.fixed(x * 1000, n);
};
SVGWrapper.kind = 'unknown';
SVGWrapper.borderFuzz = 0.005;
return SVGWrapper;
}(Wrapper_js_1.CommonWrapper));
exports.SVGWrapper = SVGWrapper;
//# sourceMappingURL=Wrapper.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,10 @@
import { SVG } from '../svg.js';
import { CommonWrapperFactory } from '../common/WrapperFactory.js';
import { SVGWrapper, SVGWrapperClass } from './Wrapper.js';
import { SVGCharOptions, SVGDelimiterData, SVGFontData } from './FontData.js';
export declare class SVGWrapperFactory<N, T, D> extends CommonWrapperFactory<SVG<N, T, D>, SVGWrapper<N, T, D>, SVGWrapperClass, SVGCharOptions, SVGDelimiterData, SVGFontData> {
static defaultNodes: {
[kind: string]: import("../common/Wrapper.js").WrapperConstructor;
};
jax: SVG<N, T, D>;
}

View File

@@ -0,0 +1,32 @@
"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.SVGWrapperFactory = void 0;
var WrapperFactory_js_1 = require("../common/WrapperFactory.js");
var Wrappers_js_1 = require("./Wrappers.js");
var SVGWrapperFactory = (function (_super) {
__extends(SVGWrapperFactory, _super);
function SVGWrapperFactory() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.jax = null;
return _this;
}
SVGWrapperFactory.defaultNodes = Wrappers_js_1.SVGWrappers;
return SVGWrapperFactory;
}(WrapperFactory_js_1.CommonWrapperFactory));
exports.SVGWrapperFactory = SVGWrapperFactory;
//# sourceMappingURL=WrapperFactory.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"WrapperFactory.js","sourceRoot":"","sources":["../../../ts/output/svg/WrapperFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,iEAAiE;AAEjE,6CAA0C;AAW1C;IACA,qCAOC;IARD;QAAA,qEAoBC;QAFQ,SAAG,GAAiB,IAAI,CAAC;;IAElC,CAAC;IAPe,8BAAY,GAAG,yBAAW,CAAC;IAO3C,wBAAC;CAAA,AApBD,CACA,wCAAoB,GAmBnB;AApBY,8CAAiB"}

View File

@@ -0,0 +1,4 @@
import { WrapperConstructor } from '../common/Wrapper.js';
export declare const SVGWrappers: {
[kind: string]: WrapperConstructor;
};

72
node_modules/mathjax-full/js/output/svg/Wrappers.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SVGWrappers = void 0;
var Wrapper_js_1 = require("./Wrapper.js");
var math_js_1 = require("./Wrappers/math.js");
var mrow_js_1 = require("./Wrappers/mrow.js");
var mi_js_1 = require("./Wrappers/mi.js");
var mo_js_1 = require("./Wrappers/mo.js");
var mn_js_1 = require("./Wrappers/mn.js");
var ms_js_1 = require("./Wrappers/ms.js");
var mtext_js_1 = require("./Wrappers/mtext.js");
var merror_js_1 = require("./Wrappers/merror.js");
var mspace_js_1 = require("./Wrappers/mspace.js");
var mpadded_js_1 = require("./Wrappers/mpadded.js");
var mphantom_js_1 = require("./Wrappers/mphantom.js");
var mfrac_js_1 = require("./Wrappers/mfrac.js");
var msqrt_js_1 = require("./Wrappers/msqrt.js");
var mroot_js_1 = require("./Wrappers/mroot.js");
var mfenced_js_1 = require("./Wrappers/mfenced.js");
var msubsup_js_1 = require("./Wrappers/msubsup.js");
var munderover_js_1 = require("./Wrappers/munderover.js");
var mmultiscripts_js_1 = require("./Wrappers/mmultiscripts.js");
var mtable_js_1 = require("./Wrappers/mtable.js");
var mtr_js_1 = require("./Wrappers/mtr.js");
var mtd_js_1 = require("./Wrappers/mtd.js");
var maction_js_1 = require("./Wrappers/maction.js");
var menclose_js_1 = require("./Wrappers/menclose.js");
var semantics_js_1 = require("./Wrappers/semantics.js");
var mglyph_js_1 = require("./Wrappers/mglyph.js");
var TeXAtom_js_1 = require("./Wrappers/TeXAtom.js");
var TextNode_js_1 = require("./Wrappers/TextNode.js");
exports.SVGWrappers = (_a = {},
_a[math_js_1.SVGmath.kind] = math_js_1.SVGmath,
_a[mrow_js_1.SVGmrow.kind] = mrow_js_1.SVGmrow,
_a[mrow_js_1.SVGinferredMrow.kind] = mrow_js_1.SVGinferredMrow,
_a[mi_js_1.SVGmi.kind] = mi_js_1.SVGmi,
_a[mo_js_1.SVGmo.kind] = mo_js_1.SVGmo,
_a[mn_js_1.SVGmn.kind] = mn_js_1.SVGmn,
_a[ms_js_1.SVGms.kind] = ms_js_1.SVGms,
_a[mtext_js_1.SVGmtext.kind] = mtext_js_1.SVGmtext,
_a[merror_js_1.SVGmerror.kind] = merror_js_1.SVGmerror,
_a[mspace_js_1.SVGmspace.kind] = mspace_js_1.SVGmspace,
_a[mpadded_js_1.SVGmpadded.kind] = mpadded_js_1.SVGmpadded,
_a[mphantom_js_1.SVGmphantom.kind] = mphantom_js_1.SVGmphantom,
_a[mfrac_js_1.SVGmfrac.kind] = mfrac_js_1.SVGmfrac,
_a[msqrt_js_1.SVGmsqrt.kind] = msqrt_js_1.SVGmsqrt,
_a[mroot_js_1.SVGmroot.kind] = mroot_js_1.SVGmroot,
_a[mfenced_js_1.SVGmfenced.kind] = mfenced_js_1.SVGmfenced,
_a[msubsup_js_1.SVGmsub.kind] = msubsup_js_1.SVGmsub,
_a[msubsup_js_1.SVGmsup.kind] = msubsup_js_1.SVGmsup,
_a[msubsup_js_1.SVGmsubsup.kind] = msubsup_js_1.SVGmsubsup,
_a[munderover_js_1.SVGmunder.kind] = munderover_js_1.SVGmunder,
_a[munderover_js_1.SVGmover.kind] = munderover_js_1.SVGmover,
_a[munderover_js_1.SVGmunderover.kind] = munderover_js_1.SVGmunderover,
_a[mmultiscripts_js_1.SVGmmultiscripts.kind] = mmultiscripts_js_1.SVGmmultiscripts,
_a[mtable_js_1.SVGmtable.kind] = mtable_js_1.SVGmtable,
_a[mtr_js_1.SVGmtr.kind] = mtr_js_1.SVGmtr,
_a[mtr_js_1.SVGmlabeledtr.kind] = mtr_js_1.SVGmlabeledtr,
_a[mtd_js_1.SVGmtd.kind] = mtd_js_1.SVGmtd,
_a[maction_js_1.SVGmaction.kind] = maction_js_1.SVGmaction,
_a[menclose_js_1.SVGmenclose.kind] = menclose_js_1.SVGmenclose,
_a[semantics_js_1.SVGsemantics.kind] = semantics_js_1.SVGsemantics,
_a[semantics_js_1.SVGannotation.kind] = semantics_js_1.SVGannotation,
_a[semantics_js_1.SVGannotationXML.kind] = semantics_js_1.SVGannotationXML,
_a[semantics_js_1.SVGxml.kind] = semantics_js_1.SVGxml,
_a[mglyph_js_1.SVGmglyph.kind] = mglyph_js_1.SVGmglyph,
_a[TeXAtom_js_1.SVGTeXAtom.kind] = TeXAtom_js_1.SVGTeXAtom,
_a[TextNode_js_1.SVGTextNode.kind] = TextNode_js_1.SVGTextNode,
_a[Wrapper_js_1.SVGWrapper.kind] = Wrapper_js_1.SVGWrapper,
_a);
//# sourceMappingURL=Wrappers.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Wrappers.js","sourceRoot":"","sources":["../../../ts/output/svg/Wrappers.ts"],"names":[],"mappings":";;;;AAwBA,2CAAwC;AACxC,8CAA2C;AAC3C,8CAA4D;AAC5D,0CAAuC;AACvC,0CAAuC;AACvC,0CAAuC;AACvC,0CAAuC;AACvC,gDAA6C;AAC7C,kDAA+C;AAC/C,kDAA+C;AAC/C,oDAAiD;AACjD,sDAAmD;AACnD,gDAA6C;AAC7C,gDAA6C;AAC7C,gDAA6C;AAC7C,oDAAiD;AACjD,oDAAmE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AC,qBAAS,CAAC,IAAI,IAAG,qBAAS;IAC3B,GAAC,eAAM,CAAC,IAAI,IAAG,eAAM;IACrB,GAAC,sBAAa,CAAC,IAAI,IAAG,sBAAa;IACnC,GAAC,eAAM,CAAC,IAAI,IAAG,eAAM;IACrB,GAAC,uBAAU,CAAC,IAAI,IAAG,uBAAU;IAC7B,GAAC,yBAAW,CAAC,IAAI,IAAG,yBAAW;IAC/B,GAAC,2BAAY,CAAC,IAAI,IAAG,2BAAY;IACjC,GAAC,4BAAa,CAAC,IAAI,IAAG,4BAAa;IACnC,GAAC,+BAAgB,CAAC,IAAI,IAAG,+BAAgB;IACzC,GAAC,qBAAM,CAAC,IAAI,IAAG,qBAAM;IACrB,GAAC,qBAAS,CAAC,IAAI,IAAG,qBAAS;IAC3B,GAAC,uBAAU,CAAC,IAAI,IAAG,uBAAU;IAC7B,GAAC,yBAAW,CAAC,IAAI,IAAG,yBAAW;IAC/B,GAAC,uBAAU,CAAC,IAAI,IAAG,uBAAU;QAC7B"}

View File

@@ -0,0 +1,7 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGTeXAtom_base: import("../../common/Wrappers/TeXAtom.js").TeXAtomConstructor & SVGConstructor<any, any, any>;
export declare class SVGTeXAtom<N, T, D> extends SVGTeXAtom_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

View File

@@ -0,0 +1,44 @@
"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.SVGTeXAtom = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var TeXAtom_js_1 = require("../../common/Wrappers/TeXAtom.js");
var TeXAtom_js_2 = require("../../../core/MmlTree/MmlNodes/TeXAtom.js");
var MmlNode_js_1 = require("../../../core/MmlTree/MmlNode.js");
var SVGTeXAtom = (function (_super) {
__extends(SVGTeXAtom, _super);
function SVGTeXAtom() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGTeXAtom.prototype.toSVG = function (parent) {
_super.prototype.toSVG.call(this, parent);
this.adaptor.setAttribute(this.element, 'data-mjx-texclass', MmlNode_js_1.TEXCLASSNAMES[this.node.texClass]);
if (this.node.texClass === MmlNode_js_1.TEXCLASS.VCENTER) {
var bbox = this.childNodes[0].getBBox();
var h = bbox.h, d = bbox.d;
var a = this.font.params.axis_height;
var dh = ((h + d) / 2 + a) - h;
var translate = 'translate(0 ' + this.fixed(dh) + ')';
this.adaptor.setAttribute(this.element, 'transform', translate);
}
};
SVGTeXAtom.kind = TeXAtom_js_2.TeXAtom.prototype.kind;
return SVGTeXAtom;
}((0, TeXAtom_js_1.CommonTeXAtomMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGTeXAtom = SVGTeXAtom;
//# sourceMappingURL=TeXAtom.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TeXAtom.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/TeXAtom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,+DAAoE;AACpE,wEAAkE;AAClE,+DAAyE;AAWzE;IACA,8BAA6D;IAD7D;;IA2BA,CAAC;IAhBQ,0BAAK,GAAZ,UAAa,MAAS;QACpB,iBAAM,KAAK,YAAC,MAAM,CAAC,CAAC;QACpB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,mBAAmB,EAAE,0BAAa,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAIhG,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,qBAAQ,CAAC,OAAO,EAAE;YAC3C,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;YACnC,IAAA,CAAC,GAAO,IAAI,EAAX,EAAE,CAAC,GAAI,IAAI,EAAR,CAAS;YACpB,IAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;YACvC,IAAM,EAAE,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;YACjC,IAAM,SAAS,GAAG,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC;YACxD,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;SACjE;IACH,CAAC;IAnBa,eAAI,GAAG,oBAAO,CAAC,SAAS,CAAC,IAAI,CAAC;IAqB9C,iBAAC;CAAA,AA3BD,CACA,IAAA,+BAAkB,EAAgC,uBAAU,CAAC,GA0B5D;AA3BY,gCAAU"}

View File

@@ -0,0 +1,9 @@
import { SVGConstructor } from '../Wrapper.js';
import { StyleList } from '../../../util/StyleList.js';
declare const SVGTextNode_base: import("../../common/Wrappers/TextNode.js").TextNodeConstructor & SVGConstructor<any, any, any>;
export declare class SVGTextNode<N, T, D> extends SVGTextNode_base {
static kind: string;
static styles: StyleList;
toSVG(parent: N): void;
}
export {};

View File

@@ -0,0 +1,77 @@
"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.SVGTextNode = void 0;
var MmlNode_js_1 = require("../../../core/MmlTree/MmlNode.js");
var Wrapper_js_1 = require("../Wrapper.js");
var TextNode_js_1 = require("../../common/Wrappers/TextNode.js");
var SVGTextNode = (function (_super) {
__extends(SVGTextNode, _super);
function SVGTextNode() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGTextNode.prototype.toSVG = function (parent) {
var e_1, _a;
var text = this.node.getText();
var variant = this.parent.variant;
if (text.length === 0)
return;
if (variant === '-explicitFont') {
this.element = this.adaptor.append(parent, this.jax.unknownText(text, variant));
}
else {
var chars = this.remappedText(text, variant);
if (this.parent.childNodes.length > 1) {
parent = this.element = this.adaptor.append(parent, this.svg('g', { 'data-mml-node': 'text' }));
}
var x = 0;
try {
for (var chars_1 = __values(chars), chars_1_1 = chars_1.next(); !chars_1_1.done; chars_1_1 = chars_1.next()) {
var n = chars_1_1.value;
x += this.placeChar(n, x, 0, parent, variant);
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (chars_1_1 && !chars_1_1.done && (_a = chars_1.return)) _a.call(chars_1);
}
finally { if (e_1) throw e_1.error; }
}
}
};
SVGTextNode.kind = MmlNode_js_1.TextNode.prototype.kind;
SVGTextNode.styles = {
'mjx-container[jax="SVG"] path[data-c], mjx-container[jax="SVG"] use[data-c]': {
'stroke-width': 3
}
};
return SVGTextNode;
}((0, TextNode_js_1.CommonTextNodeMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGTextNode = SVGTextNode;
//# sourceMappingURL=TextNode.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"TextNode.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/TextNode.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,+DAA0D;AAC1D,4CAAyD;AACzD,iEAAsE;AAYtE;IACA,+BAA8D;IAD9D;;IAsCA,CAAC;IAlBQ,2BAAK,GAAZ,UAAa,MAAS;;QACpB,IAAM,IAAI,GAAI,IAAI,CAAC,IAAiB,CAAC,OAAO,EAAE,CAAC;QAC/C,IAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;QACpC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QAC9B,IAAI,OAAO,KAAK,eAAe,EAAE;YAC/B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;SACjF;aAAM;YACL,IAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC/C,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;gBACrC,MAAM,GAAG,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,EAAC,eAAe,EAAE,MAAM,EAAC,CAAC,CAAC,CAAC;aAC/F;YACD,IAAI,CAAC,GAAG,CAAC,CAAC;;gBACV,KAAgB,IAAA,UAAA,SAAA,KAAK,CAAA,4BAAA,+CAAE;oBAAlB,IAAM,CAAC,kBAAA;oBACV,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;iBAC/C;;;;;;;;;SACF;IACH,CAAC;IA9Ba,gBAAI,GAAG,qBAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;IAK/B,kBAAM,GAAc;QAChC,6EAA6E,EAAE;YAC7E,cAAc,EAAE,CAAC;SAClB;KACF,CAAC;IAuBJ,kBAAC;CAAA,AAtCD,CACA,IAAA,iCAAmB,EAAgC,uBAAU,CAAC,GAqC7D;AAtCY,kCAAW"}

View File

@@ -0,0 +1,12 @@
import { SVGWrapper, SVGConstructor } from '../Wrapper.js';
import { EventHandler } from '../../common/Wrappers/maction.js';
import { StyleList } from '../../../util/StyleList.js';
declare const SVGmaction_base: import("../../common/Wrappers/maction.js").MactionConstructor<SVGWrapper<any, any, any>> & SVGConstructor<any, any, any>;
export declare class SVGmaction<N, T, D> extends SVGmaction_base {
static kind: string;
static styles: StyleList;
static actions: Map<string, [import("../../common/Wrappers/maction.js").ActionHandler<SVGmaction<any, any, any>>, import("../../common/Wrappers/maction.js").ActionData]>;
toSVG(parent: N): void;
setEventHandler(type: string, handler: EventHandler): void;
}
export {};

View File

@@ -0,0 +1,168 @@
"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.SVGmaction = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var maction_js_1 = require("../../common/Wrappers/maction.js");
var maction_js_2 = require("../../common/Wrappers/maction.js");
var maction_js_3 = require("../../../core/MmlTree/MmlNodes/maction.js");
var SVGmaction = (function (_super) {
__extends(SVGmaction, _super);
function SVGmaction() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmaction.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
var child = this.selected;
var _a = child.getOuterBBox(), h = _a.h, d = _a.d, w = _a.w;
this.adaptor.append(this.element, this.svg('rect', {
width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d),
fill: 'none', 'pointer-events': 'all'
}));
child.toSVG(svg);
var bbox = child.getOuterBBox();
if (child.element) {
child.place(bbox.L * bbox.rscale, 0);
}
this.action(this, this.data);
};
SVGmaction.prototype.setEventHandler = function (type, handler) {
this.element.addEventListener(type, handler);
};
SVGmaction.kind = maction_js_3.MmlMaction.prototype.kind;
SVGmaction.styles = {
'[jax="SVG"] mjx-tool': {
display: 'inline-block',
position: 'relative',
width: 0, height: 0
},
'[jax="SVG"] mjx-tool > mjx-tip': {
position: 'absolute',
top: 0, left: 0
},
'mjx-tool > mjx-tip': {
display: 'inline-block',
padding: '.2em',
border: '1px solid #888',
'font-size': '70%',
'background-color': '#F8F8F8',
color: 'black',
'box-shadow': '2px 2px 5px #AAAAAA'
},
'g[data-mml-node="maction"][data-toggle]': {
cursor: 'pointer'
},
'mjx-status': {
display: 'block',
position: 'fixed',
left: '1em',
bottom: '1em',
'min-width': '25%',
padding: '.2em .4em',
border: '1px solid #888',
'font-size': '90%',
'background-color': '#F8F8F8',
color: 'black'
}
};
SVGmaction.actions = new Map([
['toggle', [function (node, _data) {
node.adaptor.setAttribute(node.element, 'data-toggle', node.node.attributes.get('selection'));
var math = node.factory.jax.math;
var document = node.factory.jax.document;
var mml = node.node;
node.setEventHandler('click', function (event) {
if (!math.end.node) {
math.start.node = math.end.node = math.typesetRoot;
math.start.n = math.end.n = 0;
}
mml.nextToggleSelection();
math.rerender(document);
event.stopPropagation();
});
}, {}]],
['tooltip', [function (node, data) {
var tip = node.childNodes[1];
if (!tip)
return;
var rect = node.firstChild();
if (tip.node.isKind('mtext')) {
var text = tip.node.getText();
node.adaptor.insert(node.svg('title', {}, [node.text(text)]), rect);
}
else {
var adaptor_1 = node.adaptor;
var container_1 = node.jax.container;
var math = node.node.factory.create('math', {}, [node.childNodes[1].node]);
var tool_1 = node.html('mjx-tool', {}, [node.html('mjx-tip')]);
var hidden_1 = adaptor_1.append(rect, node.svg('foreignObject', { style: { display: 'none' } }, [tool_1]));
node.jax.processMath(math, adaptor_1.firstChild(tool_1));
node.childNodes[1].node.parent = node.node;
node.setEventHandler('mouseover', function (event) {
data.stopTimers(node, data);
data.hoverTimer.set(node, setTimeout(function () {
adaptor_1.setStyle(tool_1, 'left', '0');
adaptor_1.setStyle(tool_1, 'top', '0');
adaptor_1.append(container_1, tool_1);
var tbox = adaptor_1.nodeBBox(tool_1);
var nbox = adaptor_1.nodeBBox(node.element);
var dx = (nbox.right - tbox.left) / node.metrics.em + node.dx;
var dy = (nbox.bottom - tbox.bottom) / node.metrics.em + node.dy;
adaptor_1.setStyle(tool_1, 'left', node.px(dx));
adaptor_1.setStyle(tool_1, 'top', node.px(dy));
}, data.postDelay));
event.stopPropagation();
});
node.setEventHandler('mouseout', function (event) {
data.stopTimers(node, data);
var timer = setTimeout(function () { return adaptor_1.append(hidden_1, tool_1); }, data.clearDelay);
data.clearTimer.set(node, timer);
event.stopPropagation();
});
}
}, maction_js_2.TooltipData]],
['statusline', [function (node, data) {
var tip = node.childNodes[1];
if (!tip)
return;
if (tip.node.isKind('mtext')) {
var adaptor_2 = node.adaptor;
var text_1 = tip.node.getText();
adaptor_2.setAttribute(node.element, 'data-statusline', text_1);
node.setEventHandler('mouseover', function (event) {
if (data.status === null) {
var body = adaptor_2.body(adaptor_2.document);
data.status = adaptor_2.append(body, node.html('mjx-status', {}, [node.text(text_1)]));
}
event.stopPropagation();
});
node.setEventHandler('mouseout', function (event) {
if (data.status) {
adaptor_2.remove(data.status);
data.status = null;
}
event.stopPropagation();
});
}
}, {
status: null
}]]
]);
return SVGmaction;
}((0, maction_js_1.CommonMactionMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmaction = SVGmaction;
//# sourceMappingURL=maction.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,13 @@
import { SVGConstructor } from '../Wrapper.js';
import { StyleList } from '../../../util/StyleList.js';
declare const SVGmath_base: import("../../common/Wrappers/math.js").MathConstructor & SVGConstructor<any, any, any>;
export declare class SVGmath<N, T, D> extends SVGmath_base {
static kind: string;
static styles: StyleList;
toSVG(parent: N): void;
protected handleDisplay(): void;
protected handleSpeech(): void;
protected getTitleID(): string;
setChildPWidths(recompute: boolean, w?: number, _clear?: boolean): boolean;
}
export {};

View File

@@ -0,0 +1,146 @@
"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 __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.SVGmath = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var math_js_1 = require("../../common/Wrappers/math.js");
var math_js_2 = require("../../../core/MmlTree/MmlNodes/math.js");
var BBox_js_1 = require("../../../util/BBox.js");
var SVGmath = (function (_super) {
__extends(SVGmath, _super);
function SVGmath() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmath.prototype.toSVG = function (parent) {
_super.prototype.toSVG.call(this, parent);
var adaptor = this.adaptor;
var display = (this.node.attributes.get('display') === 'block');
if (display) {
adaptor.setAttribute(this.jax.container, 'display', 'true');
this.handleDisplay();
}
if (this.jax.document.options.internalSpeechTitles) {
this.handleSpeech();
}
};
SVGmath.prototype.handleDisplay = function () {
var _a = __read(this.getAlignShift(), 2), align = _a[0], shift = _a[1];
if (align !== 'center') {
this.adaptor.setAttribute(this.jax.container, 'justify', align);
}
if (this.bbox.pwidth === BBox_js_1.BBox.fullWidth) {
this.adaptor.setAttribute(this.jax.container, 'width', 'full');
if (this.jax.table) {
var _b = this.jax.table.getOuterBBox(), L = _b.L, w = _b.w, R = _b.R;
if (align === 'right') {
R = Math.max(R || -shift, -shift);
}
else if (align === 'left') {
L = Math.max(L || shift, shift);
}
else if (align === 'center') {
w += 2 * Math.abs(shift);
}
this.jax.minwidth = Math.max(0, L + w + R);
}
}
else {
this.jax.shift = shift;
}
};
SVGmath.prototype.handleSpeech = function () {
var e_1, _a;
var adaptor = this.adaptor;
var attributes = this.node.attributes;
var speech = (attributes.get('aria-label') || attributes.get('data-semantic-speech'));
if (speech) {
var id = this.getTitleID();
var label = this.svg('title', { id: id }, [this.text(speech)]);
adaptor.insert(label, adaptor.firstChild(this.element));
adaptor.setAttribute(this.element, 'aria-labeledby', id);
adaptor.removeAttribute(this.element, 'aria-label');
try {
for (var _b = __values(this.childNodes[0].childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
adaptor.setAttribute(child.element, 'aria-hidden', 'true');
}
}
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; }
}
}
};
SVGmath.prototype.getTitleID = function () {
return 'mjx-svg-title-' + String(this.jax.options.titleID++);
};
SVGmath.prototype.setChildPWidths = function (recompute, w, _clear) {
if (w === void 0) { w = null; }
if (_clear === void 0) { _clear = true; }
return _super.prototype.setChildPWidths.call(this, recompute, this.parent ? w : this.metrics.containerWidth / this.jax.pxPerEm, false);
};
SVGmath.kind = math_js_2.MmlMath.prototype.kind;
SVGmath.styles = {
'mjx-container[jax="SVG"][display="true"]': {
display: 'block',
'text-align': 'center',
margin: '1em 0'
},
'mjx-container[jax="SVG"][display="true"][width="full"]': {
display: 'flex'
},
'mjx-container[jax="SVG"][justify="left"]': {
'text-align': 'left'
},
'mjx-container[jax="SVG"][justify="right"]': {
'text-align': 'right'
}
};
return SVGmath;
}((0, math_js_1.CommonMathMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmath = SVGmath;
//# sourceMappingURL=math.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"math.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/math.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,yDAA8D;AAC9D,kEAA+D;AAE/D,iDAA2C;AAW3C;IACA,2BAA0D;IAD1D;;IA0GA,CAAC;IA3EQ,uBAAK,GAAZ,UAAa,MAAS;QACpB,iBAAM,KAAK,YAAC,MAAM,CAAC,CAAC;QACpB,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,CAAC;QAClE,IAAI,OAAO,EAAE;YACX,OAAO,CAAC,YAAY,CAA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IAKS,4BAAU,GAApB;QACE,OAAO,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/D,CAAC;IAKM,iCAAe,GAAtB,UAAuB,SAAkB,EAAE,CAAgB,EAAE,MAAsB;QAAxC,kBAAA,EAAA,QAAgB;QAAE,uBAAA,EAAA,aAAsB;QACjF,OAAO,iBAAM,eAAe,YAAC,SAAS,EACT,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAChE,KAAK,CAAC,CAAC;IACtC,CAAC;IAlGa,YAAI,GAAG,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC;IAK9B,cAAM,GAAc;QAChC,0CAA0C,EAAE;YAC1C,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,QAAQ;YACtB,MAAM,EAAE,OAAO;SAChB;QACD,wDAAwD,EAAE;YACxD,OAAO,EAAE,MAAM;SAChB;QACD,0CAA0C,EAAE;YAC1C,YAAY,EAAE,MAAM;SACrB;QACD,2CAA2C,EAAE;YAC3C,YAAY,EAAE,OAAO;SACtB;KACF,CAAC;IAgFJ,cAAC;CAAA,AA1GD,CACA,IAAA,yBAAe,EAAgC,uBAAU,CAAC,GAyGzD;AA1GY,0BAAO"}

View File

@@ -0,0 +1,16 @@
import { SVGWrapper, SVGConstructor } from '../Wrapper.js';
import { SVGmsqrt } from './msqrt.js';
import * as Notation from '../Notation.js';
declare const SVGmenclose_base: import("../../common/Wrappers/menclose.js").MencloseConstructor<SVGWrapper<any, any, any>, SVGmsqrt<any, any, any>, any> & SVGConstructor<any, any, any>;
export declare class SVGmenclose<N, T, D> extends SVGmenclose_base {
static kind: string;
static notations: Notation.DefList<SVGmenclose<any, any, any>, any>;
toSVG(parent: N): void;
arrow(W: number, a: number, double: boolean, offset?: string, dist?: number): N;
line(pq: [number, number, number, number]): N;
box(w: number, h: number, d: number, r?: number): N;
ellipse(w: number, h: number, d: number): N;
path(join: string, ...P: (string | number)[]): N;
fill(...P: (string | number)[]): N;
}
export {};

View File

@@ -0,0 +1,286 @@
"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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
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.SVGmenclose = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var menclose_js_1 = require("../../common/Wrappers/menclose.js");
var Notation = __importStar(require("../Notation.js"));
var menclose_js_2 = require("../../../core/MmlTree/MmlNodes/menclose.js");
var SVGmenclose = (function (_super) {
__extends(SVGmenclose, _super);
function SVGmenclose() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmenclose.prototype.toSVG = function (parent) {
var e_1, _a;
var svg = this.standardSVGnode(parent);
var left = this.getBBoxExtenders()[3];
var def = {};
if (left > 0) {
def.transform = 'translate(' + this.fixed(left) + ', 0)';
}
var block = this.adaptor.append(svg, this.svg('g', def));
if (this.renderChild) {
this.renderChild(this, block);
}
else {
this.childNodes[0].toSVG(block);
}
try {
for (var _b = __values(Object.keys(this.notations)), _c = _b.next(); !_c.done; _c = _b.next()) {
var name_1 = _c.value;
var notation = this.notations[name_1];
!notation.renderChild && notation.renderer(this, svg);
}
}
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; }
}
};
SVGmenclose.prototype.arrow = function (W, a, double, offset, dist) {
if (offset === void 0) { offset = ''; }
if (dist === void 0) { dist = 0; }
var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;
var dw = (W - w) / 2;
var m = (h - d) / 2;
var t = this.thickness;
var t2 = t / 2;
var _b = __read([t * this.arrowhead.x, t * this.arrowhead.y, t * this.arrowhead.dx], 3), x = _b[0], y = _b[1], dx = _b[2];
var arrow = (double ?
this.fill('M', w + dw, m, 'l', -(x + dx), y, 'l', dx, t2 - y, 'L', x - dw, m + t2, 'l', dx, y - t2, 'l', -(x + dx), -y, 'l', x + dx, -y, 'l', -dx, y - t2, 'L', w + dw - x, m - t2, 'l', -dx, t2 - y, 'Z') :
this.fill('M', w + dw, m, 'l', -(x + dx), y, 'l', dx, t2 - y, 'L', -dw, m + t2, 'l', 0, -t, 'L', w + dw - x, m - t2, 'l', -dx, t2 - y, 'Z'));
var transform = [];
if (dist) {
transform.push(offset === 'X' ? "translate(".concat(this.fixed(-dist), " 0)") : "translate(0 ".concat(this.fixed(dist), ")"));
}
if (a) {
var A = this.jax.fixed(-a * 180 / Math.PI);
transform.push("rotate(".concat(A, " ").concat(this.fixed(w / 2), " ").concat(this.fixed(m), ")"));
}
if (transform.length) {
this.adaptor.setAttribute(arrow, 'transform', transform.join(' '));
}
return arrow;
};
SVGmenclose.prototype.line = function (pq) {
var _a = __read(pq, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];
return this.svg('line', {
x1: this.fixed(x1), y1: this.fixed(y1),
x2: this.fixed(x2), y2: this.fixed(y2),
'stroke-width': this.fixed(this.thickness)
});
};
SVGmenclose.prototype.box = function (w, h, d, r) {
if (r === void 0) { r = 0; }
var t = this.thickness;
var def = {
x: this.fixed(t / 2), y: this.fixed(t / 2 - d),
width: this.fixed(w - t), height: this.fixed(h + d - t),
fill: 'none', 'stroke-width': this.fixed(t)
};
if (r) {
def.rx = this.fixed(r);
}
return this.svg('rect', def);
};
SVGmenclose.prototype.ellipse = function (w, h, d) {
var t = this.thickness;
return this.svg('ellipse', {
rx: this.fixed((w - t) / 2), ry: this.fixed((h + d - t) / 2),
cx: this.fixed(w / 2), cy: this.fixed((h - d) / 2),
'fill': 'none', 'stroke-width': this.fixed(t)
});
};
SVGmenclose.prototype.path = function (join) {
var _this = this;
var P = [];
for (var _i = 1; _i < arguments.length; _i++) {
P[_i - 1] = arguments[_i];
}
return this.svg('path', {
d: P.map(function (x) { return (typeof x === 'string' ? x : _this.fixed(x)); }).join(' '),
style: { 'stroke-width': this.fixed(this.thickness) },
'stroke-linecap': 'round', 'stroke-linejoin': join,
fill: 'none'
});
};
SVGmenclose.prototype.fill = function () {
var _this = this;
var P = [];
for (var _i = 0; _i < arguments.length; _i++) {
P[_i] = arguments[_i];
}
return this.svg('path', {
d: P.map(function (x) { return (typeof x === 'string' ? x : _this.fixed(x)); }).join(' ')
});
};
SVGmenclose.kind = menclose_js_2.MmlMenclose.prototype.kind;
SVGmenclose.notations = new Map([
Notation.Border('top'),
Notation.Border('right'),
Notation.Border('bottom'),
Notation.Border('left'),
Notation.Border2('actuarial', 'top', 'right'),
Notation.Border2('madruwb', 'bottom', 'right'),
Notation.DiagonalStrike('up'),
Notation.DiagonalStrike('down'),
['horizontalstrike', {
renderer: Notation.RenderLine('horizontal', 'Y'),
bbox: function (node) { return [0, node.padding, 0, node.padding]; }
}],
['verticalstrike', {
renderer: Notation.RenderLine('vertical', 'X'),
bbox: function (node) { return [node.padding, 0, node.padding, 0]; }
}],
['box', {
renderer: function (node, _child) {
var _a = node.getBBox(), w = _a.w, h = _a.h, d = _a.d;
node.adaptor.append(node.element, node.box(w, h, d));
},
bbox: Notation.fullBBox,
border: Notation.fullBorder,
remove: 'left right top bottom'
}],
['roundedbox', {
renderer: function (node, _child) {
var _a = node.getBBox(), w = _a.w, h = _a.h, d = _a.d;
var r = node.thickness + node.padding;
node.adaptor.append(node.element, node.box(w, h, d, r));
},
bbox: Notation.fullBBox
}],
['circle', {
renderer: function (node, _child) {
var _a = node.getBBox(), w = _a.w, h = _a.h, d = _a.d;
node.adaptor.append(node.element, node.ellipse(w, h, d));
},
bbox: Notation.fullBBox
}],
['phasorangle', {
renderer: function (node, _child) {
var _a = node.getBBox(), w = _a.w, h = _a.h, d = _a.d;
var a = node.getArgMod(1.75 * node.padding, h + d)[0];
var t = node.thickness / 2;
var HD = h + d;
var cos = Math.cos(a);
node.adaptor.append(node.element, node.path('mitre', 'M', w, t - d, 'L', t + cos * t, t - d, 'L', cos * HD + t, HD - d - t));
},
bbox: function (node) {
var p = node.padding / 2;
var t = node.thickness;
return [2 * p, p, p + t, 3 * p + t];
},
border: function (node) { return [0, 0, node.thickness, 0]; },
remove: 'bottom'
}],
Notation.Arrow('up'),
Notation.Arrow('down'),
Notation.Arrow('left'),
Notation.Arrow('right'),
Notation.Arrow('updown'),
Notation.Arrow('leftright'),
Notation.DiagonalArrow('updiagonal'),
Notation.DiagonalArrow('northeast'),
Notation.DiagonalArrow('southeast'),
Notation.DiagonalArrow('northwest'),
Notation.DiagonalArrow('southwest'),
Notation.DiagonalArrow('northeastsouthwest'),
Notation.DiagonalArrow('northwestsoutheast'),
['longdiv', {
renderer: function (node, _child) {
var _a = node.getBBox(), w = _a.w, h = _a.h, d = _a.d;
var t = node.thickness / 2;
var p = node.padding;
node.adaptor.append(node.element, node.path('round', 'M', t, t - d, 'a', p - t / 2, (h + d) / 2 - 4 * t, 0, '0,1', 0, h + d - 2 * t, 'L', w - t, h - t));
},
bbox: function (node) {
var p = node.padding;
var t = node.thickness;
return [p + t, p, p, 2 * p + t / 2];
}
}],
['radical', {
renderer: function (node, child) {
node.msqrt.toSVG(child);
var left = node.sqrtTRBL()[3];
node.place(-left, 0, child);
},
init: function (node) {
node.msqrt = node.createMsqrt(node.childNodes[0]);
},
bbox: function (node) { return node.sqrtTRBL(); },
renderChild: true
}]
]);
return SVGmenclose;
}((0, menclose_js_1.CommonMencloseMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmenclose = SVGmenclose;
//# sourceMappingURL=menclose.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
import { SVGWrapper } from '../Wrapper.js';
import { StyleList } from '../../../util/StyleList.js';
export declare class SVGmerror<N, T, D> extends SVGWrapper<N, T, D> {
static kind: string;
static styles: StyleList;
toSVG(parent: N): void;
}

View File

@@ -0,0 +1,53 @@
"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.SVGmerror = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var merror_js_1 = require("../../../core/MmlTree/MmlNodes/merror.js");
var SVGmerror = (function (_super) {
__extends(SVGmerror, _super);
function SVGmerror() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmerror.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;
this.adaptor.append(this.element, this.svg('rect', {
'data-background': true,
width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d)
}));
var title = this.node.attributes.get('title');
if (title) {
this.adaptor.append(this.element, this.svg('title', {}, [this.adaptor.text(title)]));
}
this.addChildren(svg);
};
SVGmerror.kind = merror_js_1.MmlMerror.prototype.kind;
SVGmerror.styles = {
'g[data-mml-node="merror"] > g': {
fill: 'red',
stroke: 'red'
},
'g[data-mml-node="merror"] > rect[data-background]': {
fill: 'yellow',
stroke: 'none'
}
};
return SVGmerror;
}(Wrapper_js_1.SVGWrapper));
exports.SVGmerror = SVGmerror;
//# sourceMappingURL=merror.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"merror.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/merror.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyC;AACzC,sEAAmE;AAWnE;IAAwC,6BAAmB;IAA3D;;IAsCA,CAAC;IAdQ,yBAAK,GAAZ,UAAa,MAAS;QACpB,I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{ SVGinferredMrow } from './mrow.js';
declare const SVGmfenced_base: import("../../common/Wrappers/mfenced.js").MfencedConstructor & SVGConstructor<any, any, any>;
export declare class SVGmfenced<N, T, D> extends SVGmfenced_base {
static kind: string;
mrow: SVGinferredMrow<N, T, D>;
toSVG(parent: N): void;
protected setChildrenParent(parent: SVGWrapper<N, T, D>): void;
}
export {};

View File

@@ -0,0 +1,64 @@
"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.SVGmfenced = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mfenced_js_1 = require("../../common/Wrappers/mfenced.js");
var mfenced_js_2 = require("../../../core/MmlTree/MmlNodes/mfenced.js");
var SVGmfenced = (function (_super) {
__extends(SVGmfenced, _super);
function SVGmfenced() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmfenced.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
this.setChildrenParent(this.mrow);
this.mrow.toSVG(svg);
this.setChildrenParent(this);
};
SVGmfenced.prototype.setChildrenParent = function (parent) {
var e_1, _a;
try {
for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {
var child = _c.value;
child.parent = 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; }
}
};
SVGmfenced.kind = mfenced_js_2.MmlMfenced.prototype.kind;
return SVGmfenced;
}((0, mfenced_js_1.CommonMfencedMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmfenced = SVGmfenced;
//# sourceMappingURL=mfenced.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mfenced.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mfenced.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,+DAAoE;AACpE,wEAAqE;AAWrE;IAAyC,8BAA6D;IAAtG;;IA+BA,CAAC;IAhBQ,0BAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAKS,sCAAiB,GAA3B,UAA4B,MAA2B;;;YACrD,KAAoB,IAAA,KAAA,SAAA,IAAI,CAAC,UAAU,CAAA,gBAAA,4BAAE;gBAAhC,IAAM,KAAK,WAAA;gBACd,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;aACvB;;;;;;;;;IACH,CAAC;IAxBa,eAAI,GAAG,uBAAU,CAAC,SAAS,CAAC,IAAI,CAAC;IA0BjD,iBAAC;CAAA,AA/BD,CAAyC,IAAA,+BAAkB,EAAgC,uBAAU,CAAC,GA+BrG;AA/BY,gCAAU"}

View File

@@ -0,0 +1,12 @@
import { SVGConstructor } from '../Wrapper.js';
import { SVGmo } from './mo.js';
declare const SVGmfrac_base: import("../../common/Wrappers/mfrac.js").MfracConstructor & SVGConstructor<any, any, any>;
export declare class SVGmfrac<N, T, D> extends SVGmfrac_base {
static kind: string;
bevel: SVGmo<N, T, D>;
toSVG(parent: N): void;
protected makeFraction(display: boolean, t: number): void;
protected makeAtop(display: boolean): void;
protected makeBevelled(display: boolean): void;
}
export {};

View File

@@ -0,0 +1,116 @@
"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 __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.SVGmfrac = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mfrac_js_1 = require("../../common/Wrappers/mfrac.js");
var mfrac_js_2 = require("../../../core/MmlTree/MmlNodes/mfrac.js");
var SVGmfrac = (function (_super) {
__extends(SVGmfrac, _super);
function SVGmfrac() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmfrac.prototype.toSVG = function (parent) {
this.standardSVGnode(parent);
var _a = this.node.attributes.getList('linethickness', 'bevelled'), linethickness = _a.linethickness, bevelled = _a.bevelled;
var display = this.isDisplay();
if (bevelled) {
this.makeBevelled(display);
}
else {
var thickness = this.length2em(String(linethickness), .06);
if (thickness === 0) {
this.makeAtop(display);
}
else {
this.makeFraction(display, thickness);
}
}
};
SVGmfrac.prototype.makeFraction = function (display, t) {
var svg = this.element;
var _a = this.node.attributes.getList('numalign', 'denomalign'), numalign = _a.numalign, denomalign = _a.denomalign;
var _b = __read(this.childNodes, 2), num = _b[0], den = _b[1];
var nbox = num.getOuterBBox();
var dbox = den.getOuterBBox();
var tex = this.font.params;
var a = tex.axis_height;
var d = .1;
var pad = (this.node.getProperty('withDelims') ? 0 : tex.nulldelimiterspace);
var W = Math.max((nbox.L + nbox.w + nbox.R) * nbox.rscale, (dbox.L + dbox.w + dbox.R) * dbox.rscale);
var nx = this.getAlignX(W, nbox, numalign) + d + pad;
var dx = this.getAlignX(W, dbox, denomalign) + d + pad;
var _c = this.getTUV(display, t), T = _c.T, u = _c.u, v = _c.v;
num.toSVG(svg);
num.place(nx, a + T + Math.max(nbox.d * nbox.rscale, u));
den.toSVG(svg);
den.place(dx, a - T - Math.max(dbox.h * dbox.rscale, v));
this.adaptor.append(svg, this.svg('rect', {
width: this.fixed(W + 2 * d), height: this.fixed(t),
x: this.fixed(pad), y: this.fixed(a - t / 2)
}));
};
SVGmfrac.prototype.makeAtop = function (display) {
var svg = this.element;
var _a = this.node.attributes.getList('numalign', 'denomalign'), numalign = _a.numalign, denomalign = _a.denomalign;
var _b = __read(this.childNodes, 2), num = _b[0], den = _b[1];
var nbox = num.getOuterBBox();
var dbox = den.getOuterBBox();
var tex = this.font.params;
var pad = (this.node.getProperty('withDelims') ? 0 : tex.nulldelimiterspace);
var W = Math.max((nbox.L + nbox.w + nbox.R) * nbox.rscale, (dbox.L + dbox.w + dbox.R) * dbox.rscale);
var nx = this.getAlignX(W, nbox, numalign) + pad;
var dx = this.getAlignX(W, dbox, denomalign) + pad;
var _c = this.getUVQ(display), u = _c.u, v = _c.v;
num.toSVG(svg);
num.place(nx, u);
den.toSVG(svg);
den.place(dx, -v);
};
SVGmfrac.prototype.makeBevelled = function (display) {
var svg = this.element;
var _a = __read(this.childNodes, 2), num = _a[0], den = _a[1];
var _b = this.getBevelData(display), u = _b.u, v = _b.v, delta = _b.delta, nbox = _b.nbox, dbox = _b.dbox;
var w = (nbox.L + nbox.w + nbox.R) * nbox.rscale;
num.toSVG(svg);
this.bevel.toSVG(svg);
den.toSVG(svg);
num.place(nbox.L * nbox.rscale, u);
this.bevel.place(w - delta / 2, 0);
den.place(w + this.bevel.getOuterBBox().w + dbox.L * dbox.rscale - delta, v);
};
SVGmfrac.kind = mfrac_js_2.MmlMfrac.prototype.kind;
return SVGmfrac;
}((0, mfrac_js_1.CommonMfracMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmfrac = SVGmfrac;
//# sourceMappingURL=mfrac.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mfrac.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mfrac.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,2DAAgE;AAChE,oEAAiE;AAWjE;IAAuC,4BAA2D;IAAlG;;IAiHA,CAAC;IAhGQ,wBAAK,GAAZ,UAAa,MAAS;QACpB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACvB,IAAA,KAA4B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,eAAe,EAAE,UAAU,CAAC,EAApF,aAAa,mBAAA,EAAE,QAAQ,cAA6D,CAAC;QAC5F,IAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QACjC,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAC5B;aAAM;YACL,IAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,GAAG,CAAC,CAAC;YAC7D,IAAI,SAAS,KAAK,CAAC,EAAE;gBACnB,IAAI,CA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0 +1,7 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmglyph_base: import("../../common/Wrappers/mglyph.js").MglyphConstructor & SVGConstructor<any, any, any>;
export declare class SVGmglyph<N, T, D> extends SVGmglyph_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

View File

@@ -0,0 +1,51 @@
"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.SVGmglyph = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mglyph_js_1 = require("../../common/Wrappers/mglyph.js");
var mglyph_js_2 = require("../../../core/MmlTree/MmlNodes/mglyph.js");
var SVGmglyph = (function (_super) {
__extends(SVGmglyph, _super);
function SVGmglyph() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmglyph.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
if (this.charWrapper) {
this.charWrapper.toSVG(svg);
return;
}
var _a = this.node.attributes.getList('src', 'alt'), src = _a.src, alt = _a.alt;
var h = this.fixed(this.height);
var w = this.fixed(this.width);
var y = this.fixed(this.height + (this.valign || 0));
var properties = {
width: w, height: h,
transform: 'translate(0 ' + y + ') matrix(1 0 0 -1 0 0)',
preserveAspectRatio: 'none',
'aria-label': alt,
href: src
};
var img = this.svg('image', properties);
this.adaptor.append(svg, img);
};
SVGmglyph.kind = mglyph_js_2.MmlMglyph.prototype.kind;
return SVGmglyph;
}((0, mglyph_js_1.CommonMglyphMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmglyph = SVGmglyph;
//# sourceMappingURL=mglyph.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mglyph.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mglyph.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,6DAAkE;AAClE,sEAAmE;AAanE;IACA,6BAA4D;IAD5D;;IAgCA,CAAC;IArBQ,yBAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,IAAI,CAAC,WAAW,EAAE;YACnB,IAAI,CAAC,WAAoC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACtD,OAAO;SACR;QACK,IAAA,KAAa,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,EAAtD,GAAG,SAAA,EAAE,GAAG,SAA8C,CAAC;QAC9D,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAClC,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC;QACvD,IAAM,UAAU,GAAe;YAC7B,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;YACnB,SAAS,EAAE,cAAc,GAAG,CAAC,GAAG,wBAAwB;YACxD,mBAAmB,EAAE,MAAM;YAC3B,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,GAAG;SACV,CAAC;QACF,IAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC;IAxBa,cAAI,GAAG,qBAAS,CAAC,SAAS,CAAC,IAAI,CAAC;IA0BhD,gBAAC;CAAA,AAhCD,CACA,IAAA,6BAAiB,EAAgC,uBAAU,CAAC,GA+B3D;AAhCY,8BAAS"}

View File

@@ -0,0 +1,6 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmi_base: import("../../common/Wrappers/mi.js").MiConstructor & SVGConstructor<any, any, any>;
export declare class SVGmi<N, T, D> extends SVGmi_base {
static kind: string;
}
export {};

31
node_modules/mathjax-full/js/output/svg/Wrappers/mi.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"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.SVGmi = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mi_js_1 = require("../../common/Wrappers/mi.js");
var mi_js_2 = require("../../../core/MmlTree/MmlNodes/mi.js");
var SVGmi = (function (_super) {
__extends(SVGmi, _super);
function SVGmi() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmi.kind = mi_js_2.MmlMi.prototype.kind;
return SVGmi;
}((0, mi_js_1.CommonMiMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmi = SVGmi;
//# sourceMappingURL=mi.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mi.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,qDAA0D;AAC1D,8DAA2D;AAW3D;IACA,yBAAwD;IADxD;;IAQA,CAAC;IAFe,UAAI,GAAG,aAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IAE5C,YAAC;CAAA,AARD,CACA,IAAA,qBAAa,EAAgC,uBAAU,CAAC,GAOvD;AARY,sBAAK"}

View File

@@ -0,0 +1,11 @@
import { SVGWrapper, Constructor } from '../Wrapper.js';
import { SVGmsubsup } from './msubsup.js';
export declare type AlignFunction = (w: number, W: number) => number;
export declare function AlignX(align: string): AlignFunction;
declare const SVGmmultiscripts_base: import("../../common/Wrappers/mmultiscripts.js").MmultiscriptsConstructor<SVGWrapper<any, any, any>> & Constructor<SVGmsubsup<any, any, any>>;
export declare class SVGmmultiscripts<N, T, D> extends SVGmmultiscripts_base {
static kind: string;
toSVG(parent: N): void;
protected addScripts(x: number, u: number, v: number, i: number, n: number, align: string): number;
}
export {};

View File

@@ -0,0 +1,98 @@
"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 __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.SVGmmultiscripts = exports.AlignX = void 0;
var msubsup_js_1 = require("./msubsup.js");
var mmultiscripts_js_1 = require("../../common/Wrappers/mmultiscripts.js");
var mmultiscripts_js_2 = require("../../../core/MmlTree/MmlNodes/mmultiscripts.js");
var string_js_1 = require("../../../util/string.js");
function AlignX(align) {
return {
left: function (_w, _W) { return 0; },
center: function (w, W) { return (W - w) / 2; },
right: function (w, W) { return W - w; }
}[align] || (function (_w, _W) { return 0; });
}
exports.AlignX = AlignX;
var SVGmmultiscripts = (function (_super) {
__extends(SVGmmultiscripts, _super);
function SVGmmultiscripts() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmmultiscripts.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
var data = this.scriptData;
var scriptalign = this.node.getProperty('scriptalign') || 'right left';
var _a = __read((0, string_js_1.split)(scriptalign + ' ' + scriptalign), 2), preAlign = _a[0], postAlign = _a[1];
var sub = this.combinePrePost(data.sub, data.psub);
var sup = this.combinePrePost(data.sup, data.psup);
var _b = __read(this.getUVQ(sub, sup), 2), u = _b[0], v = _b[1];
var x = 0;
if (data.numPrescripts) {
x = this.addScripts(.05, u, v, this.firstPrescript, data.numPrescripts, preAlign);
}
var base = this.baseChild;
base.toSVG(svg);
base.place(x, 0);
x += base.getOuterBBox().w;
if (data.numScripts) {
this.addScripts(x, u, v, 1, data.numScripts, postAlign);
}
};
SVGmmultiscripts.prototype.addScripts = function (x, u, v, i, n, align) {
var adaptor = this.adaptor;
var alignX = AlignX(align);
var supRow = adaptor.append(this.element, this.svg('g'));
var subRow = adaptor.append(this.element, this.svg('g'));
this.place(x, u, supRow);
this.place(x, v, subRow);
var m = i + 2 * n;
var dx = 0;
while (i < m) {
var _a = __read([this.childNodes[i++], this.childNodes[i++]], 2), sub = _a[0], sup = _a[1];
var _b = __read([sub.getOuterBBox(), sup.getOuterBBox()], 2), subbox = _b[0], supbox = _b[1];
var _c = __read([subbox.rscale, supbox.rscale], 2), subr = _c[0], supr = _c[1];
var w = Math.max(subbox.w * subr, supbox.w * supr);
sub.toSVG(subRow);
sup.toSVG(supRow);
sub.place(dx + alignX(subbox.w * subr, w), 0);
sup.place(dx + alignX(supbox.w * supr, w), 0);
dx += w;
}
return x + dx;
};
SVGmmultiscripts.kind = mmultiscripts_js_2.MmlMmultiscripts.prototype.kind;
return SVGmmultiscripts;
}((0, mmultiscripts_js_1.CommonMmultiscriptsMixin)(msubsup_js_1.SVGmsubsup)));
exports.SVGmmultiscripts = SVGmmultiscripts;
//# sourceMappingURL=mmultiscripts.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mmultiscripts.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mmultiscripts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,2CAAwC;AACxC,2EAAgF;AAChF,oFAAiF;AACjF,qDAA8C;AAY9C,SAAgB,MAAM,CAAC,KAAa;IAClC,OAAQ;QACN,IAAI,EAAE,UAAC,EAAE,EAAE,EAAE,IAAK,OAAA,CAAC,EAAD,CAAC;QACnB,MAAM,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAX,CAAW;QAC7B,KAAK,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,CAAC,GAAG,CAAC,EAAL,CAAK;KACa,CAAC,KAAK,CAAC,IAAI,CAAC,UAAC,EAAE,EAAE,EAAE,IAAK,OAAA,CAAC,EAAD,CAAC,CAAkB,CAAC;AACnF,CAAC;AAND,wBAMC;AAWD;IACA,oCAAuG;IADvG;;IA4EA,CAAC;IAjEQ,gCAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACzC,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;QAI7B,IAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,CAA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C,KAAK,CAAC,MAAM,CAAC,CAAC;YAClB,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC9C,GAAG,CAAC,KAAK,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YAC9C,EAAE,IAAI,CAAC,CAAC;SACT;QACD,OAAO,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;IApEa,qBAAI,GAAG,mCAAgB,CAAC,SAAS,CAAC,IAAI,CAAC;IAsEvD,uBAAC;CAAA,AA5ED,CACA,IAAA,2CAAwB,EAAoE,uBAAU,CAAC,GA2EtG;AA5EY,4CAAgB"}

View File

@@ -0,0 +1,6 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmn_base: import("../../common/Wrappers/mn.js").MnConstructor & SVGConstructor<any, any, any>;
export declare class SVGmn<N, T, D> extends SVGmn_base {
static kind: string;
}
export {};

31
node_modules/mathjax-full/js/output/svg/Wrappers/mn.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"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.SVGmn = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mn_js_1 = require("../../common/Wrappers/mn.js");
var mn_js_2 = require("../../../core/MmlTree/MmlNodes/mn.js");
var SVGmn = (function (_super) {
__extends(SVGmn, _super);
function SVGmn() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmn.kind = mn_js_2.MmlMn.prototype.kind;
return SVGmn;
}((0, mn_js_1.CommonMnMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmn = SVGmn;
//# sourceMappingURL=mn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mn.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,qDAA0D;AAC1D,8DAA2D;AAW3D;IACA,yBAAwD;IADxD;;IAQA,CAAC;IAFe,UAAI,GAAG,aAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IAE5C,YAAC;CAAA,AARD,CACA,IAAA,qBAAa,EAAgC,uBAAU,CAAC,GAOvD;AARY,sBAAK"}

View File

@@ -0,0 +1,23 @@
import { SVGConstructor } from '../Wrapper.js';
import { BBox } from '../../../util/BBox.js';
import { SVGCharData } from '../FontData.js';
declare const SVGmo_base: import("../../common/Wrappers/mo.js").MoConstructor & SVGConstructor<any, any, any>;
export declare class SVGmo<N, T, D> extends SVGmo_base {
static kind: string;
toSVG(parent: N): void;
protected stretchSVG(): void;
protected getStretchVariants(): string[];
protected stretchVertical(stretch: number[], variant: string[], bbox: BBox): void;
protected stretchHorizontal(stretch: number[], variant: string[], bbox: BBox): void;
protected getChar(n: number, variant: string): SVGCharData;
protected addGlyph(n: number, variant: string, x: number, y: number, parent?: N): number;
protected addTop(n: number, v: string, H: number, W: number): number;
protected addExtV(n: number, v: string, H: number, D: number, T: number, B: number, W: number): void;
protected addBot(n: number, v: string, D: number, W: number): number;
protected addMidV(n: number, v: string, W: number): [number, number];
protected addLeft(n: number, v: string): number;
protected addExtH(n: number, v: string, W: number, L: number, R: number, x?: number): void;
protected addRight(n: number, v: string, W: number): number;
protected addMidH(n: number, v: string, W: number): [number, number];
}
export {};

231
node_modules/mathjax-full/js/output/svg/Wrappers/mo.js generated vendored Normal file
View File

@@ -0,0 +1,231 @@
"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.");
};
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.SVGmo = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mo_js_1 = require("../../common/Wrappers/mo.js");
var mo_js_2 = require("../../../core/MmlTree/MmlNodes/mo.js");
var VFUZZ = 0.1;
var HFUZZ = 0.1;
var SVGmo = (function (_super) {
__extends(SVGmo, _super);
function SVGmo() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmo.prototype.toSVG = function (parent) {
var attributes = this.node.attributes;
var symmetric = attributes.get('symmetric') && this.stretch.dir !== 2;
var stretchy = this.stretch.dir !== 0;
if (stretchy && this.size === null) {
this.getStretchedVariant([]);
}
var svg = this.standardSVGnode(parent);
if (stretchy && this.size < 0) {
this.stretchSVG();
}
else {
var u = (symmetric || attributes.get('largeop') ? this.fixed(this.getCenterOffset()) : '0');
var v = (this.node.getProperty('mathaccent') ? this.fixed(this.getAccentOffset()) : '0');
if (u !== '0' || v !== '0') {
this.adaptor.setAttribute(svg, 'transform', "translate(".concat(v, " ").concat(u, ")"));
}
this.addChildren(svg);
}
};
SVGmo.prototype.stretchSVG = function () {
var stretch = this.stretch.stretch;
var variants = this.getStretchVariants();
var bbox = this.getBBox();
if (this.stretch.dir === 1) {
this.stretchVertical(stretch, variants, bbox);
}
else {
this.stretchHorizontal(stretch, variants, bbox);
}
};
SVGmo.prototype.getStretchVariants = function () {
var e_1, _a;
var c = this.stretch.c || this.getText().codePointAt(0);
var variants = [];
try {
for (var _b = __values(this.stretch.stretch.keys()), _c = _b.next(); !_c.done; _c = _b.next()) {
var i = _c.value;
variants[i] = this.font.getStretchVariant(c, i);
}
}
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 variants;
};
SVGmo.prototype.stretchVertical = function (stretch, variant, bbox) {
var h = bbox.h, d = bbox.d, w = bbox.w;
var T = this.addTop(stretch[0], variant[0], h, w);
var B = this.addBot(stretch[2], variant[2], d, w);
if (stretch.length === 4) {
var _a = __read(this.addMidV(stretch[3], variant[3], w), 2), H = _a[0], D = _a[1];
this.addExtV(stretch[1], variant[1], h, 0, T, H, w);
this.addExtV(stretch[1], variant[1], 0, d, D, B, w);
}
else {
this.addExtV(stretch[1], variant[1], h, d, T, B, w);
}
};
SVGmo.prototype.stretchHorizontal = function (stretch, variant, bbox) {
var w = bbox.w;
var L = this.addLeft(stretch[0], variant[0]);
var R = this.addRight(stretch[2], variant[2], w);
if (stretch.length === 4) {
var _a = __read(this.addMidH(stretch[3], variant[3], w), 2), x1 = _a[0], x2 = _a[1];
var w2 = w / 2;
this.addExtH(stretch[1], variant[1], w2, L, w2 - x1);
this.addExtH(stretch[1], variant[1], w2, x2 - w2, R, w2);
}
else {
this.addExtH(stretch[1], variant[1], w, L, R);
}
};
SVGmo.prototype.getChar = function (n, variant) {
var char = this.font.getChar(variant, n) || [0, 0, 0, null];
return [char[0], char[1], char[2], char[3] || {}];
};
SVGmo.prototype.addGlyph = function (n, variant, x, y, parent) {
if (parent === void 0) { parent = null; }
return this.placeChar(n, x, y, parent || this.element, variant);
};
SVGmo.prototype.addTop = function (n, v, H, W) {
if (!n)
return 0;
var _a = __read(this.getChar(n, v), 3), h = _a[0], d = _a[1], w = _a[2];
this.addGlyph(n, v, (W - w) / 2, H - h);
return h + d;
};
SVGmo.prototype.addExtV = function (n, v, H, D, T, B, W) {
var _this = this;
if (!n)
return;
T = Math.max(0, T - VFUZZ);
B = Math.max(0, B - VFUZZ);
var adaptor = this.adaptor;
var _a = __read(this.getChar(n, v), 3), h = _a[0], d = _a[1], w = _a[2];
var Y = H + D - T - B;
var s = 1.5 * Y / (h + d);
var y = (s * (h - d) - Y) / 2;
if (Y <= 0)
return;
var svg = this.svg('svg', {
width: this.fixed(w), height: this.fixed(Y),
y: this.fixed(B - D), x: this.fixed((W - w) / 2),
viewBox: [0, y, w, Y].map(function (x) { return _this.fixed(x); }).join(' ')
});
this.addGlyph(n, v, 0, 0, svg);
var glyph = adaptor.lastChild(svg);
adaptor.setAttribute(glyph, 'transform', "scale(1,".concat(this.jax.fixed(s), ")"));
adaptor.append(this.element, svg);
};
SVGmo.prototype.addBot = function (n, v, D, W) {
if (!n)
return 0;
var _a = __read(this.getChar(n, v), 3), h = _a[0], d = _a[1], w = _a[2];
this.addGlyph(n, v, (W - w) / 2, d - D);
return h + d;
};
SVGmo.prototype.addMidV = function (n, v, W) {
if (!n)
return [0, 0];
var _a = __read(this.getChar(n, v), 3), h = _a[0], d = _a[1], w = _a[2];
var y = (d - h) / 2 + this.font.params.axis_height;
this.addGlyph(n, v, (W - w) / 2, y);
return [h + y, d - y];
};
SVGmo.prototype.addLeft = function (n, v) {
return (n ? this.addGlyph(n, v, 0, 0) : 0);
};
SVGmo.prototype.addExtH = function (n, v, W, L, R, x) {
var _this = this;
if (x === void 0) { x = 0; }
if (!n)
return;
R = Math.max(0, R - HFUZZ);
L = Math.max(0, L - HFUZZ);
var adaptor = this.adaptor;
var _a = __read(this.getChar(n, v), 3), h = _a[0], d = _a[1], w = _a[2];
var X = W - L - R;
var Y = h + d + 2 * VFUZZ;
var s = 1.5 * (X / w);
var D = -(d + VFUZZ);
if (X <= 0)
return;
var svg = this.svg('svg', {
width: this.fixed(X), height: this.fixed(Y),
x: this.fixed(x + L), y: this.fixed(D),
viewBox: [(s * w - X) / 2, D, X, Y].map(function (x) { return _this.fixed(x); }).join(' ')
});
this.addGlyph(n, v, 0, 0, svg);
var glyph = adaptor.lastChild(svg);
adaptor.setAttribute(glyph, 'transform', 'scale(' + this.jax.fixed(s) + ',1)');
adaptor.append(this.element, svg);
};
SVGmo.prototype.addRight = function (n, v, W) {
if (!n)
return 0;
var w = this.getChar(n, v)[2];
return this.addGlyph(n, v, W - w, 0);
};
SVGmo.prototype.addMidH = function (n, v, W) {
if (!n)
return [0, 0];
var w = this.getChar(n, v)[2];
this.addGlyph(n, v, (W - w) / 2, 0);
return [(W - w) / 2, (W + w) / 2];
};
SVGmo.kind = mo_js_2.MmlMo.prototype.kind;
return SVGmo;
}((0, mo_js_1.CommonMoMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmo = SVGmo;
//# sourceMappingURL=mo.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,7 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmpadded_base: import("../../common/Wrappers/mpadded.js").MpaddedConstructor & SVGConstructor<any, any, any>;
export declare class SVGmpadded<N, T, D> extends SVGmpadded_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

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 __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.SVGmpadded = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mpadded_js_1 = require("../../common/Wrappers/mpadded.js");
var mpadded_js_2 = require("../../../core/MmlTree/MmlNodes/mpadded.js");
var SVGmpadded = (function (_super) {
__extends(SVGmpadded, _super);
function SVGmpadded() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmpadded.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
var _a = __read(this.getDimens(), 9), dw = _a[5], x = _a[6], y = _a[7], dx = _a[8];
var align = this.node.attributes.get('data-align') || 'left';
var X = x + dx - (dw < 0 && align !== 'left' ? align === 'center' ? dw / 2 : dw : 0);
if (X || y) {
svg = this.adaptor.append(svg, this.svg('g'));
this.place(X, y, svg);
}
this.addChildren(svg);
};
SVGmpadded.kind = mpadded_js_2.MmlMpadded.prototype.kind;
return SVGmpadded;
}((0, mpadded_js_1.CommonMpaddedMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmpadded = SVGmpadded;
//# sourceMappingURL=mpadded.js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gCAAU"}

View File

@@ -0,0 +1,5 @@
import { SVGWrapper } from '../Wrapper.js';
export declare class SVGmphantom<N, T, D> extends SVGWrapper<N, T, D> {
static kind: string;
toSVG(parent: N): void;
}

View File

@@ -0,0 +1,33 @@
"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.SVGmphantom = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mphantom_js_1 = require("../../../core/MmlTree/MmlNodes/mphantom.js");
var SVGmphantom = (function (_super) {
__extends(SVGmphantom, _super);
function SVGmphantom() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmphantom.prototype.toSVG = function (parent) {
this.standardSVGnode(parent);
};
SVGmphantom.kind = mphantom_js_1.MmlMphantom.prototype.kind;
return SVGmphantom;
}(Wrapper_js_1.SVGWrapper));
exports.SVGmphantom = SVGmphantom;
//# sourceMappingURL=mphantom.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mphantom.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mphantom.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyC;AACzC,0EAAuE;AAUvE;IAA0C,+BAAmB;IAA7D;;IAcA,CAAC;IAJQ,2BAAK,GAAZ,UAAa,MAAS;QACpB,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;IAPa,gBAAI,GAAG,yBAAW,CAAC,SAAS,CAAC,IAAI,CAAC;IASlD,kBAAC;CAAA,AAdD,CAA0C,uBAAU,GAcnD;AAdY,kCAAW"}

View File

@@ -0,0 +1,9 @@
import { SVGWrapper, Constructor } from '../Wrapper.js';
import { SVGmsqrt } from './msqrt.js';
import { BBox } from '../../../util/BBox.js';
declare const SVGmroot_base: import("../../common/Wrappers/mroot.js").MrootConstructor & Constructor<SVGmsqrt<any, any, any>>;
export declare class SVGmroot<N, T, D> extends SVGmroot_base {
static kind: string;
protected addRoot(ROOT: N, root: SVGWrapper<N, T, D>, sbox: BBox, H: number): void;
}
export {};

View File

@@ -0,0 +1,54 @@
"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 __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.SVGmroot = void 0;
var msqrt_js_1 = require("./msqrt.js");
var mroot_js_1 = require("../../common/Wrappers/mroot.js");
var mroot_js_2 = require("../../../core/MmlTree/MmlNodes/mroot.js");
var SVGmroot = (function (_super) {
__extends(SVGmroot, _super);
function SVGmroot() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmroot.prototype.addRoot = function (ROOT, root, sbox, H) {
root.toSVG(ROOT);
var _a = __read(this.getRootDimens(sbox, H), 3), x = _a[0], h = _a[1], dx = _a[2];
var bbox = root.getOuterBBox();
root.place(dx * bbox.rscale, h);
this.dx = x;
};
SVGmroot.kind = mroot_js_2.MmlMroot.prototype.kind;
return SVGmroot;
}((0, mroot_js_1.CommonMrootMixin)(msqrt_js_1.SVGmsqrt)));
exports.SVGmroot = SVGmroot;
//# sourceMappingURL=mroot.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mroot.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mroot.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,uCAAoC;AACpC,2DAAgE;AAEhE,oEAAiE;AAUjE;IAAuC,4BAAgE;IAAvG;;IAkBA,CAAC;IARW,0BAAO,GAAjB,UAAkB,IAAO,EAAE,IAAyB,EAAE,IAAU,EAAE,CAAS;QACzE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACX,IAAA,KAAA,OAAa,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,IAAA,EAAvC,CAAC,QAAA,EAAE,CAAC,QAAA,EAAE,EAAE,QAA+B,CAAC;QAC/C,IAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;IACd,CAAC;IAXa,aAAI,GAAG,mBAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;IAa/C,eAAC;CAAA,AAlBD,CAAuC,IAAA,2BAAgB,EAAuC,mBAAQ,CAAC,GAkBtG;AAlBY,4BAAQ"}

View File

@@ -0,0 +1,11 @@
import { SVGConstructor, Constructor } from '../Wrapper.js';
declare const SVGmrow_base: import("../../common/Wrappers/mrow.js").MrowConstructor & SVGConstructor<any, any, any>;
export declare class SVGmrow<N, T, D> extends SVGmrow_base {
static kind: string;
toSVG(parent: N): void;
}
declare const SVGinferredMrow_base: import("../../common/Wrappers/mrow.js").InferredMrowConstructor & Constructor<SVGmrow<any, any, any>>;
export declare class SVGinferredMrow<N, T, D> extends SVGinferredMrow_base {
static kind: string;
}
export {};

View File

@@ -0,0 +1,45 @@
"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.SVGinferredMrow = exports.SVGmrow = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mrow_js_1 = require("../../common/Wrappers/mrow.js");
var mrow_js_2 = require("../../common/Wrappers/mrow.js");
var mrow_js_3 = require("../../../core/MmlTree/MmlNodes/mrow.js");
var SVGmrow = (function (_super) {
__extends(SVGmrow, _super);
function SVGmrow() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmrow.prototype.toSVG = function (parent) {
var svg = (this.node.isInferred ? (this.element = parent) : this.standardSVGnode(parent));
this.addChildren(svg);
};
SVGmrow.kind = mrow_js_3.MmlMrow.prototype.kind;
return SVGmrow;
}((0, mrow_js_1.CommonMrowMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmrow = SVGmrow;
var SVGinferredMrow = (function (_super) {
__extends(SVGinferredMrow, _super);
function SVGinferredMrow() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGinferredMrow.kind = mrow_js_3.MmlInferredMrow.prototype.kind;
return SVGinferredMrow;
}((0, mrow_js_2.CommonInferredMrowMixin)(SVGmrow)));
exports.SVGinferredMrow = SVGinferredMrow;
//# sourceMappingURL=mrow.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mrow.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mrow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAsE;AACtE,yDAA8D;AAC9D,yDAAsE;AACtE,kEAAgF;AAWhF;IACA,2BAA0D;IAD1D;;IAiBA,CAAC;IANQ,uBAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;QAC5F,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAExB,CAAC;IATa,YAAI,GAAG,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC;IAW9C,cAAC;CAAA,AAjBD,CACA,IAAA,yBAAe,EAAgC,uBAAU,CAAC,GAgBzD;AAjBY,0BAAO;AA4BpB;IACA,mCAAqE;IADrE;;IAQA,CAAC;IAFe,oBAAI,GAAG,yBAAe,CAAC,SAAS,CAAC,IAAI,CAAC;IAEtD,sBAAC;CAAA,AARD,CACA,IAAA,iCAAuB,EAAsC,OAAO,CAAC,GAOpE;AARY,0CAAe"}

View File

@@ -0,0 +1,6 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGms_base: import("../../common/Wrappers/ms.js").MsConstructor & SVGConstructor<any, any, any>;
export declare class SVGms<N, T, D> extends SVGms_base {
static kind: string;
}
export {};

31
node_modules/mathjax-full/js/output/svg/Wrappers/ms.js generated vendored Normal file
View File

@@ -0,0 +1,31 @@
"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.SVGms = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var ms_js_1 = require("../../common/Wrappers/ms.js");
var ms_js_2 = require("../../../core/MmlTree/MmlNodes/ms.js");
var SVGms = (function (_super) {
__extends(SVGms, _super);
function SVGms() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGms.kind = ms_js_2.MmlMs.prototype.kind;
return SVGms;
}((0, ms_js_1.CommonMsMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGms = SVGms;
//# sourceMappingURL=ms.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ms.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/ms.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,qDAA0D;AAC1D,8DAA2D;AAW3D;IACA,yBAAwD;IADxD;;IAQA,CAAC;IAFe,UAAI,GAAG,aAAK,CAAC,SAAS,CAAC,IAAI,CAAC;IAE5C,YAAC;CAAA,AARD,CACA,IAAA,qBAAa,EAAgC,uBAAU,CAAC,GAOvD;AARY,sBAAK"}

View File

@@ -0,0 +1,6 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmspace_base: import("../../common/Wrappers/mspace.js").MspaceConstructor & SVGConstructor<any, any, any>;
export declare class SVGmspace<N, T, D> extends SVGmspace_base {
static kind: string;
}
export {};

View File

@@ -0,0 +1,31 @@
"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.SVGmspace = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mspace_js_1 = require("../../common/Wrappers/mspace.js");
var mspace_js_2 = require("../../../core/MmlTree/MmlNodes/mspace.js");
var SVGmspace = (function (_super) {
__extends(SVGmspace, _super);
function SVGmspace() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmspace.kind = mspace_js_2.MmlMspace.prototype.kind;
return SVGmspace;
}((0, mspace_js_1.CommonMspaceMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmspace = SVGmspace;
//# sourceMappingURL=mspace.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mspace.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mspace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,6DAAkE;AAClE,sEAAmE;AAWnE;IACA,6BAA4D;IAD5D;;IAQA,CAAC;IAFe,cAAI,GAAG,qBAAS,CAAC,SAAS,CAAC,IAAI,CAAC;IAEhD,gBAAC;CAAA,AARD,CACA,IAAA,6BAAiB,EAAgC,uBAAU,CAAC,GAO3D;AARY,8BAAS"}

View File

@@ -0,0 +1,10 @@
import { SVGWrapper, SVGConstructor } from '../Wrapper.js';
import { BBox } from '../../../util/BBox.js';
declare const SVGmsqrt_base: import("../../common/Wrappers/msqrt.js").MsqrtConstructor & SVGConstructor<any, any, any>;
export declare class SVGmsqrt<N, T, D> extends SVGmsqrt_base {
static kind: string;
dx: number;
toSVG(parent: N): void;
protected addRoot(_ROOT: N, _root: SVGWrapper<N, T, D>, _sbox: BBox, _H: number): void;
}
export {};

View File

@@ -0,0 +1,56 @@
"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.SVGmsqrt = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var msqrt_js_1 = require("../../common/Wrappers/msqrt.js");
var msqrt_js_2 = require("../../../core/MmlTree/MmlNodes/msqrt.js");
var SVGmsqrt = (function (_super) {
__extends(SVGmsqrt, _super);
function SVGmsqrt() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.dx = 0;
return _this;
}
SVGmsqrt.prototype.toSVG = function (parent) {
var surd = this.childNodes[this.surd];
var base = this.childNodes[this.base];
var root = (this.root ? this.childNodes[this.root] : null);
var sbox = surd.getBBox();
var bbox = base.getOuterBBox();
var q = this.getPQ(sbox)[1];
var t = this.font.params.rule_thickness * this.bbox.scale;
var H = bbox.h + q + t;
var SVG = this.standardSVGnode(parent);
var BASE = this.adaptor.append(SVG, this.svg('g'));
this.addRoot(SVG, root, sbox, H);
surd.toSVG(SVG);
surd.place(this.dx, H - sbox.h);
base.toSVG(BASE);
base.place(this.dx + sbox.w, 0);
this.adaptor.append(SVG, this.svg('rect', {
width: this.fixed(bbox.w), height: this.fixed(t),
x: this.fixed(this.dx + sbox.w), y: this.fixed(H - t)
}));
};
SVGmsqrt.prototype.addRoot = function (_ROOT, _root, _sbox, _H) {
};
SVGmsqrt.kind = msqrt_js_2.MmlMsqrt.prototype.kind;
return SVGmsqrt;
}((0, msqrt_js_1.CommonMsqrtMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmsqrt = SVGmsqrt;
//# sourceMappingURL=msqrt.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"msqrt.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/msqrt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,2DAAgE;AAEhE,oEAAiE;AAUjE;IAAuC,4BAA2D;IAAlG;QAAA,qEAyDC;QA/CQ,QAAE,GAAW,CAAC,CAAC;;IA+CxB,CAAC;IA1CQ,wBAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,IAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxC,IAAM,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAI7D,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAM,IAAI,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACjC,IAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;QAC5D,IAAM,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAIzB,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACzC,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;QAIrD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACjB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE;YACxC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAChD,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;SACtD,CAAC,CAAC,CAAC;IACN,CAAC;IAUS,0BAAO,GAAjB,UAAkB,KAAQ,EAAE,KAA0B,EAAE,KAAW,EAAE,EAAU;IAC/E,CAAC;IAlDa,aAAI,GAAG,mBAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;IAoD/C,eAAC;CAAA,AAzDD,CAAuC,IAAA,2BAAgB,EAAgC,uBAAU,CAAC,GAyDjG;AAzDY,4BAAQ"}

View File

@@ -0,0 +1,16 @@
import { SVGWrapper, Constructor } from '../Wrapper.js';
import { SVGscriptbase } from './scriptbase.js';
declare const SVGmsub_base: import("../../common/Wrappers/msubsup.js").MsubConstructor<SVGWrapper<any, any, any>> & Constructor<SVGscriptbase<any, any, any>>;
export declare class SVGmsub<N, T, D> extends SVGmsub_base {
static kind: string;
}
declare const SVGmsup_base: import("../../common/Wrappers/msubsup.js").MsupConstructor<SVGWrapper<any, any, any>> & Constructor<SVGscriptbase<any, any, any>>;
export declare class SVGmsup<N, T, D> extends SVGmsup_base {
static kind: string;
}
declare const SVGmsubsup_base: import("../../common/Wrappers/msubsup.js").MsubsupConstructor<SVGWrapper<any, any, any>> & Constructor<SVGscriptbase<any, any, any>>;
export declare class SVGmsubsup<N, T, D> extends SVGmsubsup_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

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 __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.SVGmsubsup = exports.SVGmsup = exports.SVGmsub = void 0;
var scriptbase_js_1 = require("./scriptbase.js");
var msubsup_js_1 = require("../../common/Wrappers/msubsup.js");
var msubsup_js_2 = require("../../common/Wrappers/msubsup.js");
var msubsup_js_3 = require("../../common/Wrappers/msubsup.js");
var msubsup_js_4 = require("../../../core/MmlTree/MmlNodes/msubsup.js");
var SVGmsub = (function (_super) {
__extends(SVGmsub, _super);
function SVGmsub() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmsub.kind = msubsup_js_4.MmlMsub.prototype.kind;
return SVGmsub;
}((0, msubsup_js_1.CommonMsubMixin)(scriptbase_js_1.SVGscriptbase)));
exports.SVGmsub = SVGmsub;
var SVGmsup = (function (_super) {
__extends(SVGmsup, _super);
function SVGmsup() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmsup.kind = msubsup_js_4.MmlMsup.prototype.kind;
return SVGmsup;
}((0, msubsup_js_2.CommonMsupMixin)(scriptbase_js_1.SVGscriptbase)));
exports.SVGmsup = SVGmsup;
var SVGmsubsup = (function (_super) {
__extends(SVGmsubsup, _super);
function SVGmsubsup() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmsubsup.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
var _a = __read([this.baseChild, this.supChild, this.subChild], 3), base = _a[0], sup = _a[1], sub = _a[2];
var w = this.getBaseWidth();
var x = this.getAdjustedIc();
var _b = __read(this.getUVQ(), 2), u = _b[0], v = _b[1];
base.toSVG(svg);
sup.toSVG(svg);
sub.toSVG(svg);
sub.place(w, v);
sup.place(w + x, u);
};
SVGmsubsup.kind = msubsup_js_4.MmlMsubsup.prototype.kind;
return SVGmsubsup;
}((0, msubsup_js_3.CommonMsubsupMixin)(scriptbase_js_1.SVGscriptbase)));
exports.SVGmsubsup = SVGmsubsup;
//# sourceMappingURL=msubsup.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"msubsup.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/msubsup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,iDAA8C;AAC9C,+DAAiE;AACjE,+DAAiE;AACjE,+DAAoE;AACpE,wEAAuF;AAWvF;IACA,2BAAoG;IADpG;;IAQA,CAAC;IAFe,YAAI,GAAG,oBAAO,CAAC,SAAS,CAAC,IAAI,CAAC;IA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 +1,32 @@
import { SVGWrapper, SVGConstructor } from '../Wrapper.js';
import { SVGWrapperFactory } from '../WrapperFactory.js';
import { SVGmtr } from './mtr.js';
import { SVGmtd } from './mtd.js';
import { MmlNode } from '../../../core/MmlTree/MmlNode.js';
import { OptionList } from '../../../util/Options.js';
import { StyleList } from '../../../util/StyleList.js';
declare const SVGmtable_base: import("../../common/Wrappers/mtable.js").MtableConstructor<SVGmtd<any, any, any>, SVGmtr<any, any, any>> & SVGConstructor<any, any, any>;
export declare class SVGmtable<N, T, D> extends SVGmtable_base {
static kind: string;
static styles: StyleList;
labels: N;
constructor(factory: SVGWrapperFactory<N, T, D>, node: MmlNode, parent?: SVGWrapper<N, T, D>);
toSVG(parent: N): void;
protected placeRows(svg: N): void;
protected getRowHD(equal: boolean, HD: number, H: number, D: number): [number, number];
handleColor(): void;
protected handleColumnLines(svg: N): void;
protected handleRowLines(svg: N): void;
protected handleFrame(svg: N): void;
protected handlePWidth(svg: N): number;
protected lineClass(style: string): string;
protected makeFrame(w: number, h: number, d: number, style: string): N;
protected makeVLine(x: number, style: string, t: number): N;
protected makeHLine(y: number, style: string, t: number): N;
protected setLineThickness(t: number, style: string, properties: OptionList): OptionList;
protected handleLabels(svg: N, _parent: N, dx: number): void;
protected spaceLabels(): void;
protected topTable(svg: N, labels: N, side: string): void;
protected subTable(svg: N, labels: N, side: string, dx: number): void;
}
export {};

View File

@@ -0,0 +1,289 @@
"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 __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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SVGmtable = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mtable_js_1 = require("../../common/Wrappers/mtable.js");
var mtable_js_2 = require("../../../core/MmlTree/MmlNodes/mtable.js");
var CLASSPREFIX = 'mjx-';
var SVGmtable = (function (_super) {
__extends(SVGmtable, _super);
function SVGmtable(factory, node, parent) {
if (parent === void 0) { parent = null; }
var _this = _super.call(this, factory, node, parent) || this;
var def = { 'data-labels': true };
if (_this.isTop) {
def.transform = 'matrix(1 0 0 -1 0 0)';
}
_this.labels = _this.svg('g', def);
return _this;
}
SVGmtable.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
this.placeRows(svg);
this.handleColumnLines(svg);
this.handleRowLines(svg);
this.handleFrame(svg);
var dx = this.handlePWidth(svg);
this.handleLabels(svg, parent, dx);
};
SVGmtable.prototype.placeRows = function (svg) {
var _a, _b, _c;
var equal = this.node.attributes.get('equalrows');
var _d = this.getTableData(), H = _d.H, D = _d.D;
var HD = this.getEqualRowHeight();
var rSpace = this.getRowHalfSpacing();
var rLines = __spreadArray(__spreadArray([this.fLine], __read(this.rLines), false), [this.fLine], false);
var y = this.getBBox().h - rLines[0];
for (var i = 0; i < this.numRows; i++) {
var row = this.childNodes[i];
_a = __read(this.getRowHD(equal, HD, H[i], D[i]), 2), row.H = _a[0], row.D = _a[1];
_b = __read([rSpace[i], rSpace[i + 1]], 2), row.tSpace = _b[0], row.bSpace = _b[1];
_c = __read([rLines[i], rLines[i + 1]], 2), row.tLine = _c[0], row.bLine = _c[1];
row.toSVG(svg);
row.place(0, y - rSpace[i] - row.H);
y -= rSpace[i] + row.H + row.D + rSpace[i + 1] + rLines[i + 1];
}
};
SVGmtable.prototype.getRowHD = function (equal, HD, H, D) {
return (equal ? [(HD + H - D) / 2, (HD - H + D) / 2] : [H, D]);
};
SVGmtable.prototype.handleColor = function () {
_super.prototype.handleColor.call(this);
var rect = this.firstChild();
if (rect) {
this.adaptor.setAttribute(rect, 'width', this.fixed(this.getWidth()));
}
};
SVGmtable.prototype.handleColumnLines = function (svg) {
if (this.node.attributes.get('columnlines') === 'none')
return;
var lines = this.getColumnAttributes('columnlines');
if (!lines)
return;
var cSpace = this.getColumnHalfSpacing();
var cLines = this.cLines;
var cWidth = this.getComputedWidths();
var x = this.fLine;
for (var i = 0; i < lines.length; i++) {
x += cSpace[i] + cWidth[i] + cSpace[i + 1];
if (lines[i] !== 'none') {
this.adaptor.append(svg, this.makeVLine(x, lines[i], cLines[i]));
}
x += cLines[i];
}
};
SVGmtable.prototype.handleRowLines = function (svg) {
if (this.node.attributes.get('rowlines') === 'none')
return;
var lines = this.getRowAttributes('rowlines');
if (!lines)
return;
var equal = this.node.attributes.get('equalrows');
var _a = this.getTableData(), H = _a.H, D = _a.D;
var HD = this.getEqualRowHeight();
var rSpace = this.getRowHalfSpacing();
var rLines = this.rLines;
var y = this.getBBox().h - this.fLine;
for (var i = 0; i < lines.length; i++) {
var _b = __read(this.getRowHD(equal, HD, H[i], D[i]), 2), rH = _b[0], rD = _b[1];
y -= rSpace[i] + rH + rD + rSpace[i + 1];
if (lines[i] !== 'none') {
this.adaptor.append(svg, this.makeHLine(y, lines[i], rLines[i]));
}
y -= rLines[i];
}
};
SVGmtable.prototype.handleFrame = function (svg) {
if (this.frame && this.fLine) {
var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;
var style = this.node.attributes.get('frame');
this.adaptor.append(svg, this.makeFrame(w, h, d, style));
}
};
SVGmtable.prototype.handlePWidth = function (svg) {
if (!this.pWidth) {
return 0;
}
var _a = this.getBBox(), w = _a.w, L = _a.L, R = _a.R;
var W = L + this.pWidth + R;
var align = this.getAlignShift()[0];
var CW = Math.max(this.isTop ? W : 0, this.container.getWrapWidth(this.containerI)) - L - R;
var dw = w - (this.pWidth > CW ? CW : this.pWidth);
var dx = (align === 'left' ? 0 : align === 'right' ? dw : dw / 2);
if (dx) {
var table = this.svg('g', {}, this.adaptor.childNodes(svg));
this.place(dx, 0, table);
this.adaptor.append(svg, table);
}
return dx;
};
SVGmtable.prototype.lineClass = function (style) {
return CLASSPREFIX + style;
};
SVGmtable.prototype.makeFrame = function (w, h, d, style) {
var t = this.fLine;
return this.svg('rect', this.setLineThickness(t, style, {
'data-frame': true, 'class': this.lineClass(style),
width: this.fixed(w - t), height: this.fixed(h + d - t),
x: this.fixed(t / 2), y: this.fixed(t / 2 - d)
}));
};
SVGmtable.prototype.makeVLine = function (x, style, t) {
var _a = this.getBBox(), h = _a.h, d = _a.d;
var dt = (style === 'dotted' ? t / 2 : 0);
var X = this.fixed(x + t / 2);
return this.svg('line', this.setLineThickness(t, style, {
'data-line': 'v', 'class': this.lineClass(style),
x1: X, y1: this.fixed(dt - d), x2: X, y2: this.fixed(h - dt)
}));
};
SVGmtable.prototype.makeHLine = function (y, style, t) {
var w = this.getBBox().w;
var dt = (style === 'dotted' ? t / 2 : 0);
var Y = this.fixed(y - t / 2);
return this.svg('line', this.setLineThickness(t, style, {
'data-line': 'h', 'class': this.lineClass(style),
x1: this.fixed(dt), y1: Y, x2: this.fixed(w - dt), y2: Y
}));
};
SVGmtable.prototype.setLineThickness = function (t, style, properties) {
if (t !== .07) {
properties['stroke-thickness'] = this.fixed(t);
if (style !== 'solid') {
properties['stroke-dasharray'] = (style === 'dotted' ? '0,' : '') + this.fixed(2 * t);
}
}
return properties;
};
SVGmtable.prototype.handleLabels = function (svg, _parent, dx) {
if (!this.hasLabels)
return;
var labels = this.labels;
var attributes = this.node.attributes;
var side = attributes.get('side');
this.spaceLabels();
this.isTop ? this.topTable(svg, labels, side) : this.subTable(svg, labels, side, dx);
};
SVGmtable.prototype.spaceLabels = function () {
var adaptor = this.adaptor;
var h = this.getBBox().h;
var L = this.getTableData().L;
var space = this.getRowHalfSpacing();
var y = h - this.fLine;
var current = adaptor.firstChild(this.labels);
for (var i = 0; i < this.numRows; i++) {
var row = this.childNodes[i];
if (row.node.isKind('mlabeledtr')) {
var cell = row.childNodes[0];
y -= space[i] + row.H;
row.placeCell(cell, { x: 0, y: y, w: L, lSpace: 0, rSpace: 0, lLine: 0, rLine: 0 });
y -= row.D + space[i + 1] + this.rLines[i];
current = adaptor.next(current);
}
else {
y -= space[i] + row.H + row.D + space[i + 1] + this.rLines[i];
}
}
};
SVGmtable.prototype.topTable = function (svg, labels, side) {
var adaptor = this.adaptor;
var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w, L = _a.L, R = _a.R;
var W = L + (this.pWidth || w) + R;
var LW = this.getTableData().L;
var _b = __read(this.getPadAlignShift(side), 3), align = _b[1], shift = _b[2];
var dx = shift + (align === 'right' ? -W : align === 'center' ? -W / 2 : 0) + L;
var matrix = 'matrix(1 0 0 -1 0 0)';
var scale = "scale(".concat(this.jax.fixed((this.font.params.x_height * 1000) / this.metrics.ex, 2), ")");
var transform = "translate(0 ".concat(this.fixed(h), ") ").concat(matrix, " ").concat(scale);
var table = this.svg('svg', {
'data-table': true,
preserveAspectRatio: (align === 'left' ? 'xMinYMid' : align === 'right' ? 'xMaxYMid' : 'xMidYMid'),
viewBox: [this.fixed(-dx), this.fixed(-h), 1, this.fixed(h + d)].join(' ')
}, [
this.svg('g', { transform: matrix }, adaptor.childNodes(svg))
]);
labels = this.svg('svg', {
'data-labels': true,
preserveAspectRatio: (side === 'left' ? 'xMinYMid' : 'xMaxYMid'),
viewBox: [side === 'left' ? 0 : this.fixed(LW), this.fixed(-h), 1, this.fixed(h + d)].join(' ')
}, [labels]);
adaptor.append(svg, this.svg('g', { transform: transform }, [table, labels]));
this.place(-L, 0, svg);
};
SVGmtable.prototype.subTable = function (svg, labels, side, dx) {
var adaptor = this.adaptor;
var _a = this.getBBox(), w = _a.w, L = _a.L, R = _a.R;
var W = L + (this.pWidth || w) + R;
var labelW = this.getTableData().L;
var align = this.getAlignShift()[0];
var CW = Math.max(W, this.container.getWrapWidth(this.containerI));
this.place(side === 'left' ?
(align === 'left' ? 0 : align === 'right' ? W - CW + dx : (W - CW) / 2 + dx) - L :
(align === 'left' ? CW : align === 'right' ? W + dx : (CW + W) / 2 + dx) - L - labelW, 0, labels);
adaptor.append(svg, labels);
};
SVGmtable.kind = mtable_js_2.MmlMtable.prototype.kind;
SVGmtable.styles = {
'g[data-mml-node="mtable"] > line[data-line], svg[data-table] > g > line[data-line]': {
'stroke-width': '70px',
fill: 'none'
},
'g[data-mml-node="mtable"] > rect[data-frame], svg[data-table] > g > rect[data-frame]': {
'stroke-width': '70px',
fill: 'none'
},
'g[data-mml-node="mtable"] > .mjx-dashed, svg[data-table] > g > .mjx-dashed': {
'stroke-dasharray': '140'
},
'g[data-mml-node="mtable"] > .mjx-dotted, svg[data-table] > g > .mjx-dotted': {
'stroke-linecap': 'round',
'stroke-dasharray': '0,140'
},
'g[data-mml-node="mtable"] > g > svg': {
overflow: 'visible'
}
};
return SVGmtable;
}((0, mtable_js_1.CommonMtableMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmtable = SVGmtable;
//# sourceMappingURL=mtable.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmtd_base: import("../../common/Wrappers/mtd.js").MtdConstructor & SVGConstructor<any, any, any>;
export declare class SVGmtd<N, T, D> extends SVGmtd_base {
static kind: string;
placeCell(x: number, y: number, W: number, H: number, D: number): [number, number];
placeColor(x: number, y: number, W: number, H: number): void;
}
export {};

View File

@@ -0,0 +1,52 @@
"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.SVGmtd = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mtd_js_1 = require("../../common/Wrappers/mtd.js");
var mtd_js_2 = require("../../../core/MmlTree/MmlNodes/mtd.js");
var SVGmtd = (function (_super) {
__extends(SVGmtd, _super);
function SVGmtd() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmtd.prototype.placeCell = function (x, y, W, H, D) {
var bbox = this.getBBox();
var h = Math.max(bbox.h, .75);
var d = Math.max(bbox.d, .25);
var calign = this.node.attributes.get('columnalign');
var ralign = this.node.attributes.get('rowalign');
var alignX = this.getAlignX(W, bbox, calign);
var alignY = this.getAlignY(H, D, h, d, ralign);
this.place(x + alignX, y + alignY);
return [alignX, alignY];
};
SVGmtd.prototype.placeColor = function (x, y, W, H) {
var adaptor = this.adaptor;
var child = this.firstChild();
if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-bgcolor')) {
adaptor.setAttribute(child, 'x', this.fixed(x));
adaptor.setAttribute(child, 'y', this.fixed(y));
adaptor.setAttribute(child, 'width', this.fixed(W));
adaptor.setAttribute(child, 'height', this.fixed(H));
}
};
SVGmtd.kind = mtd_js_2.MmlMtd.prototype.kind;
return SVGmtd;
}((0, mtd_js_1.CommonMtdMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmtd = SVGmtd;
//# sourceMappingURL=mtd.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mtd.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mtd.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,uDAA4D;AAC5D,gEAA6D;AAW7D;IACA,0BAAyD;IADzD;;IA6CA,CAAC;IA7BQ,0BAAS,GAAhB,UAAiB,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;QACpE,IAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAChC,IAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;QAChC,IAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAW,CAAC;QACjE,IAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,UAAU,CAAW,CAAC;QAC9D,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC/C,IAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;QACnC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,CAAC;IAQM,2BAAU,GAAjB,UAAkB,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS;QAC1D,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,KAAK,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAChC,IAAI,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,EAAE;YAC1F,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACpD,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;SACtD;IACH,CAAC;IArCa,WAAI,GAAG,eAAM,CAAC,SAAS,CAAC,IAAI,CAAC;IAuC7C,aAAC;CAAA,AA7CD,CACA,IAAA,uBAAc,EAAgC,uBAAU,CAAC,GA4CxD;AA7CY,wBAAM"}

View File

@@ -0,0 +1,6 @@
import { SVGConstructor } from '../Wrapper.js';
declare const SVGmtext_base: import("../../common/Wrappers/mtext.js").MtextConstructor & SVGConstructor<any, any, any>;
export declare class SVGmtext<N, T, D> extends SVGmtext_base {
static kind: string;
}
export {};

View File

@@ -0,0 +1,31 @@
"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.SVGmtext = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mtext_js_1 = require("../../common/Wrappers/mtext.js");
var mtext_js_2 = require("../../../core/MmlTree/MmlNodes/mtext.js");
var SVGmtext = (function (_super) {
__extends(SVGmtext, _super);
function SVGmtext() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmtext.kind = mtext_js_2.MmlMtext.prototype.kind;
return SVGmtext;
}((0, mtext_js_1.CommonMtextMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmtext = SVGmtext;
//# sourceMappingURL=mtext.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mtext.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mtext.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAuBA,4CAAyD;AACzD,2DAAgE;AAChE,oEAAiE;AAWjE;IACA,4BAA2D;IAD3D;;IAQA,CAAC;IAFe,aAAI,GAAG,mBAAQ,CAAC,SAAS,CAAC,IAAI,CAAC;IAE/C,eAAC;CAAA,AARD,CACA,IAAA,2BAAgB,EAAgC,uBAAU,CAAC,GAO1D;AARY,4BAAQ"}

View File

@@ -0,0 +1,31 @@
import { SVGConstructor, Constructor } from '../Wrapper.js';
import { SVGmtd } from './mtd.js';
export declare type SizeData = {
x: number;
y: number;
w: number;
lSpace: number;
rSpace: number;
lLine: number;
rLine: number;
};
declare const SVGmtr_base: import("../../common/Wrappers/mtr.js").MtrConstructor<SVGmtd<any, any, any>> & SVGConstructor<any, any, any>;
export declare class SVGmtr<N, T, D> extends SVGmtr_base {
static kind: string;
H: number;
D: number;
tSpace: number;
bSpace: number;
tLine: number;
bLine: number;
toSVG(parent: N): void;
protected placeCells(svg: N): void;
placeCell(cell: SVGmtd<N, T, D>, sizes: SizeData): number;
protected placeColor(): void;
}
declare const SVGmlabeledtr_base: import("../../common/Wrappers/mtr.js").MlabeledtrConstructor<SVGmtd<any, any, any>> & Constructor<SVGmtr<any, any, any>>;
export declare class SVGmlabeledtr<N, T, D> extends SVGmlabeledtr_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

116
node_modules/mathjax-full/js/output/svg/Wrappers/mtr.js generated vendored Normal file
View File

@@ -0,0 +1,116 @@
"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 __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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
if (ar || !(i in from)) {
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
ar[i] = from[i];
}
}
return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.SVGmlabeledtr = exports.SVGmtr = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var mtr_js_1 = require("../../common/Wrappers/mtr.js");
var mtr_js_2 = require("../../common/Wrappers/mtr.js");
var mtr_js_3 = require("../../../core/MmlTree/MmlNodes/mtr.js");
var SVGmtr = (function (_super) {
__extends(SVGmtr, _super);
function SVGmtr() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmtr.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
this.placeCells(svg);
this.placeColor();
};
SVGmtr.prototype.placeCells = function (svg) {
var cSpace = this.parent.getColumnHalfSpacing();
var cLines = __spreadArray(__spreadArray([this.parent.fLine], __read(this.parent.cLines), false), [this.parent.fLine], false);
var cWidth = this.parent.getComputedWidths();
var scale = 1 / this.getBBox().rscale;
var x = cLines[0];
for (var i = 0; i < this.numCells; i++) {
var child = this.getChild(i);
child.toSVG(svg);
x += this.placeCell(child, {
x: x, y: 0, lSpace: cSpace[i] * scale, rSpace: cSpace[i + 1] * scale, w: cWidth[i] * scale,
lLine: cLines[i] * scale, rLine: cLines[i + 1] * scale
});
}
};
SVGmtr.prototype.placeCell = function (cell, sizes) {
var x = sizes.x, y = sizes.y, lSpace = sizes.lSpace, w = sizes.w, rSpace = sizes.rSpace, lLine = sizes.lLine, rLine = sizes.rLine;
var scale = 1 / this.getBBox().rscale;
var _a = __read([this.H * scale, this.D * scale], 2), h = _a[0], d = _a[1];
var _b = __read([this.tSpace * scale, this.bSpace * scale], 2), t = _b[0], b = _b[1];
var _c = __read(cell.placeCell(x + lSpace, y, w, h, d), 2), dx = _c[0], dy = _c[1];
var W = lSpace + w + rSpace;
cell.placeColor(-(dx + lSpace + lLine / 2), -(d + b + dy), W + (lLine + rLine) / 2, h + d + t + b);
return W + rLine;
};
SVGmtr.prototype.placeColor = function () {
var scale = 1 / this.getBBox().rscale;
var adaptor = this.adaptor;
var child = this.firstChild();
if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-bgcolor')) {
var _a = __read([(this.tLine / 2) * scale, (this.bLine / 2) * scale], 2), TL = _a[0], BL = _a[1];
var _b = __read([this.tSpace * scale, this.bSpace * scale], 2), TS = _b[0], BS = _b[1];
var _c = __read([this.H * scale, this.D * scale], 2), H = _c[0], D = _c[1];
adaptor.setAttribute(child, 'y', this.fixed(-(D + BS + BL)));
adaptor.setAttribute(child, 'width', this.fixed(this.parent.getWidth() * scale));
adaptor.setAttribute(child, 'height', this.fixed(TL + TS + H + D + BS + BL));
}
};
SVGmtr.kind = mtr_js_3.MmlMtr.prototype.kind;
return SVGmtr;
}((0, mtr_js_1.CommonMtrMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGmtr = SVGmtr;
var SVGmlabeledtr = (function (_super) {
__extends(SVGmlabeledtr, _super);
function SVGmlabeledtr() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmlabeledtr.prototype.toSVG = function (parent) {
_super.prototype.toSVG.call(this, parent);
var child = this.childNodes[0];
if (child) {
child.toSVG(this.parent.labels);
}
};
SVGmlabeledtr.kind = mtr_js_3.MmlMlabeledtr.prototype.kind;
return SVGmlabeledtr;
}((0, mtr_js_2.CommonMlabeledtrMixin)(SVGmtr)));
exports.SVGmlabeledtr = SVGmlabeledtr;
//# sourceMappingURL=mtr.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mtr.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/mtr.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4CAAsE;AACtE,uDAA4D;AAC5D,uDAAmE;AAEnE,gEAA4E;AAwB5E;IACA,0BAAgF;IADhF;;IAgGA,CAAC;IA5DQ,sBAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACzC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,UAAU,EAAE,CAAC;IACpB,CAAC;IAOS,2BAAU,GAApB,UAAqB,GAAM;QACzB,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAC;QAClD,IAAM,MAAM,gCAAI,IAAI,CAAC,MAAM,CAAC,KAAK,UAAK,IAAI,CA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,CAAC,CAAC;QACpB,IAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACjC,IAAI,KAAK,EAAE;YACT,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;SACjC;IACH,CAAC;IAXa,kBAAI,GAAG,sBAAa,CAAC,SAAS,CAAC,IAAI,CAAC;IAapD,oBAAC;CAAA,AAnBD,CACA,IAAA,8BAAqB,EAA4D,MAAM,CAAC,GAkBvF;AAnBY,sCAAa"}

View File

@@ -0,0 +1,18 @@
import { SVGWrapper, Constructor } from '../Wrapper.js';
import { SVGmsubsup, SVGmsub, SVGmsup } from './msubsup.js';
declare const SVGmunder_base: import("../../common/Wrappers/munderover.js").MunderConstructor<SVGWrapper<any, any, any>> & Constructor<SVGmsub<any, any, any>>;
export declare class SVGmunder<N, T, D> extends SVGmunder_base {
static kind: string;
toSVG(parent: N): void;
}
declare const SVGmover_base: import("../../common/Wrappers/munderover.js").MoverConstructor<SVGWrapper<any, any, any>> & Constructor<SVGmsup<any, any, any>>;
export declare class SVGmover<N, T, D> extends SVGmover_base {
static kind: string;
toSVG(parent: N): void;
}
declare const SVGmunderover_base: import("../../common/Wrappers/munderover.js").MunderoverConstructor<SVGWrapper<any, any, any>> & Constructor<SVGmsubsup<any, any, any>>;
export declare class SVGmunderover<N, T, D> extends SVGmunderover_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

View File

@@ -0,0 +1,118 @@
"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 __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.SVGmunderover = exports.SVGmover = exports.SVGmunder = void 0;
var msubsup_js_1 = require("./msubsup.js");
var munderover_js_1 = require("../../common/Wrappers/munderover.js");
var munderover_js_2 = require("../../common/Wrappers/munderover.js");
var munderover_js_3 = require("../../common/Wrappers/munderover.js");
var munderover_js_4 = require("../../../core/MmlTree/MmlNodes/munderover.js");
var SVGmunder = (function (_super) {
__extends(SVGmunder, _super);
function SVGmunder() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmunder.prototype.toSVG = function (parent) {
if (this.hasMovableLimits()) {
_super.prototype.toSVG.call(this, parent);
return;
}
var svg = this.standardSVGnode(parent);
var _a = __read([this.baseChild, this.scriptChild], 2), base = _a[0], script = _a[1];
var _b = __read([base.getOuterBBox(), script.getOuterBBox()], 2), bbox = _b[0], sbox = _b[1];
base.toSVG(svg);
script.toSVG(svg);
var delta = (this.isLineBelow ? 0 : this.getDelta(true));
var v = this.getUnderKV(bbox, sbox)[1];
var _c = __read(this.getDeltaW([bbox, sbox], [0, -delta]), 2), bx = _c[0], sx = _c[1];
base.place(bx, 0);
script.place(sx, v);
};
SVGmunder.kind = munderover_js_4.MmlMunder.prototype.kind;
return SVGmunder;
}((0, munderover_js_1.CommonMunderMixin)(msubsup_js_1.SVGmsub)));
exports.SVGmunder = SVGmunder;
var SVGmover = (function (_super) {
__extends(SVGmover, _super);
function SVGmover() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmover.prototype.toSVG = function (parent) {
if (this.hasMovableLimits()) {
_super.prototype.toSVG.call(this, parent);
return;
}
var svg = this.standardSVGnode(parent);
var _a = __read([this.baseChild, this.scriptChild], 2), base = _a[0], script = _a[1];
var _b = __read([base.getOuterBBox(), script.getOuterBBox()], 2), bbox = _b[0], sbox = _b[1];
base.toSVG(svg);
script.toSVG(svg);
var delta = (this.isLineAbove ? 0 : this.getDelta());
var u = this.getOverKU(bbox, sbox)[1];
var _c = __read(this.getDeltaW([bbox, sbox], [0, delta]), 2), bx = _c[0], sx = _c[1];
base.place(bx, 0);
script.place(sx, u);
};
SVGmover.kind = munderover_js_4.MmlMover.prototype.kind;
return SVGmover;
}((0, munderover_js_2.CommonMoverMixin)(msubsup_js_1.SVGmsup)));
exports.SVGmover = SVGmover;
var SVGmunderover = (function (_super) {
__extends(SVGmunderover, _super);
function SVGmunderover() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGmunderover.prototype.toSVG = function (parent) {
if (this.hasMovableLimits()) {
_super.prototype.toSVG.call(this, parent);
return;
}
var svg = this.standardSVGnode(parent);
var _a = __read([this.baseChild, this.overChild, this.underChild], 3), base = _a[0], over = _a[1], under = _a[2];
var _b = __read([base.getOuterBBox(), over.getOuterBBox(), under.getOuterBBox()], 3), bbox = _b[0], obox = _b[1], ubox = _b[2];
base.toSVG(svg);
under.toSVG(svg);
over.toSVG(svg);
var delta = this.getDelta();
var u = this.getOverKU(bbox, obox)[1];
var v = this.getUnderKV(bbox, ubox)[1];
var _c = __read(this.getDeltaW([bbox, ubox, obox], [0, this.isLineBelow ? 0 : -delta, this.isLineAbove ? 0 : delta]), 3), bx = _c[0], ux = _c[1], ox = _c[2];
base.place(bx, 0);
under.place(ux, v);
over.place(ox, u);
};
SVGmunderover.kind = munderover_js_4.MmlMunderover.prototype.kind;
return SVGmunderover;
}((0, munderover_js_3.CommonMunderoverMixin)(msubsup_js_1.SVGmsubsup)));
exports.SVGmunderover = SVGmunderover;
//# sourceMappingURL=munderover.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"munderover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AM,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACnC,IAAA,KAAA,OAAe,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAClB,CAAC,CAAC,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAA,EAD9F,EAAE,QAAA,EAAE,EAAE,QAAA,EAAE,EAAE,QACoF,CAAC;QAEtG,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAClB,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACpB,CAAC;IA3Ba,kBAAI,GAAG,6BAAa,CAAC,SAAS,CAAC,IAAI,CAAC;IA6BpD,oBAAC;CAAA,AAnCD,CACA,IAAA,qCAAqB,EAAoE,uBAAU,CAAC,GAkCnG;AAnCY,sCAAa"}

View File

@@ -0,0 +1,7 @@
import { SVGWrapper, SVGConstructor } from '../Wrapper.js';
declare const SVGscriptbase_base: import("../../common/Wrappers/scriptbase.js").ScriptbaseConstructor<SVGWrapper<any, any, any>> & SVGConstructor<any, any, any>;
export declare class SVGscriptbase<N, T, D> extends SVGscriptbase_base {
static kind: string;
toSVG(parent: N): void;
}
export {};

View File

@@ -0,0 +1,54 @@
"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 __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.SVGscriptbase = void 0;
var Wrapper_js_1 = require("../Wrapper.js");
var scriptbase_js_1 = require("../../common/Wrappers/scriptbase.js");
var SVGscriptbase = (function (_super) {
__extends(SVGscriptbase, _super);
function SVGscriptbase() {
return _super !== null && _super.apply(this, arguments) || this;
}
SVGscriptbase.prototype.toSVG = function (parent) {
var svg = this.standardSVGnode(parent);
var w = this.getBaseWidth();
var _a = __read(this.getOffset(), 2), x = _a[0], v = _a[1];
this.baseChild.toSVG(svg);
this.scriptChild.toSVG(svg);
this.scriptChild.place(w + x, v);
};
SVGscriptbase.kind = 'scriptbase';
return SVGscriptbase;
}((0, scriptbase_js_1.CommonScriptbaseMixin)(Wrapper_js_1.SVGWrapper)));
exports.SVGscriptbase = SVGscriptbase;
//# sourceMappingURL=scriptbase.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"scriptbase.js","sourceRoot":"","sources":["../../../../ts/output/svg/Wrappers/scriptbase.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,4CAAyD;AACzD,qEAA0E;AAY1E;IACA,iCAA2F;IAD3F;;IAuBA,CAAC;IATQ,6BAAK,GAAZ,UAAa,MAAS;QACpB,IAAM,GAAG,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QACzC,IAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACxB,IAAA,KAAA,OAAS,IAAI,CAAC,SAAS,EAAE,IAAA,EAAxB,CAAC,QAAA,EAAE,CAAC,QAAoB,CAAC;QAChC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACnC,CAAC;IAfa,kBAAI,GAAG,YAAY,CAAC;IAiBpC,oBAAC;CAAA,AAvBD,CACA,IAAA,qCAAqB,EAA2D,uBAAU,CAAC,GAsB1F;AAvBY,sCAAa"}

View File

@@ -0,0 +1,27 @@
import { SVGWrapper, SVGConstructor } from '../Wrapper.js';
import { BBox } from '../../../util/BBox.js';
import { StyleList } from '../../../util/StyleList.js';
declare const SVGsemantics_base: import("../../common/Wrappers/semantics.js").SemanticsConstructor & SVGConstructor<any, any, any>;
export declare class SVGsemantics<N, T, D> extends SVGsemantics_base {
static kind: string;
toSVG(parent: N): void;
}
export declare class SVGannotation<N, T, D> extends SVGWrapper<N, T, D> {
static kind: string;
toSVG(parent: N): void;
computeBBox(): BBox;
}
export declare class SVGannotationXML<N, T, D> extends SVGWrapper<N, T, D> {
static kind: string;
static styles: StyleList;
}
export declare class SVGxml<N, T, D> extends SVGWrapper<N, T, D> {
static kind: string;
static autoStyle: boolean;
toSVG(parent: N): void;
computeBBox(bbox: BBox, _recompute?: boolean): void;
protected getStyles(): void;
protected getScale(): void;
protected getVariant(): void;
}
export {};

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