@pie-element/math-templated 8.0.6-next.20261018193205 → 8.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +2 -2
- package/dist/browser/controller/index.js +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/author/index.js +2 -2
- package/dist/browser/editor-runtime/controller/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/{horizontal-keypad-BQdPpS_s.js → horizontal-keypad-D71I_hsg.js} +55 -55
- package/dist/browser/editor-runtime/{horizontal-keypad-BQdPpS_s.js.map → horizontal-keypad-D71I_hsg.js.map} +1 -1
- package/dist/browser/editor-runtime/{main-BLy9kMHK.js → main-CjydLdRr.js} +2 -2
- package/dist/browser/editor-runtime/{main-BLy9kMHK.js.map → main-CjydLdRr.js.map} +1 -1
- package/dist/browser/editor-runtime/{mathjax-CptWnMbQ-DlzgkqoE.js → mathjax-DqXi3q4c-M53s6mdE.js} +3 -3
- package/dist/browser/editor-runtime/{mathjax-CptWnMbQ-DlzgkqoE.js.map → mathjax-DqXi3q4c-M53s6mdE.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +3 -3
- package/dist/browser/{horizontal-keypad-nLQVahKw.js → horizontal-keypad-DXhquYz2.js} +55 -55
- package/dist/browser/{horizontal-keypad-nLQVahKw.js.map → horizontal-keypad-DXhquYz2.js.map} +1 -1
- package/dist/browser/{main-CezVjYSb.js → main-CwjSoHLf.js} +2 -2
- package/dist/browser/{main-CezVjYSb.js.map → main-CwjSoHLf.js.map} +1 -1
- package/dist/browser/{mathjax-CptWnMbQ-DdmHhmSv.js → mathjax-DqXi3q4c-CBcqCJT1.js} +3 -3
- package/dist/browser/{mathjax-CptWnMbQ-DdmHhmSv.js.map → mathjax-DqXi3q4c-CBcqCJT1.js.map} +1 -1
- package/dist/browser/print/index.js +3 -3
- package/dist/index.iife.js +1 -1
- package/dist/schemas/configuration.schema.json +1 -1
- package/dist/schemas/model.schema.json +1 -1
- package/dist/schemas/session.schema.json +1 -1
- package/module/print.js +31 -31
- package/module/print.js.map +1 -1
- package/package.json +17 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-templated@8.0.6
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-templated@8.0.6/dist/schemas/configuration.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"ignoreOrder": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-templated@8.0.6
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-templated@8.0.6/dist/schemas/model.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-templated@8.0.6
|
|
3
|
+
"$id": "https://cdn.jsdelivr.net/npm/@pie-element/math-templated@8.0.6/dist/schemas/session.schema.json",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
6
|
"id": {
|
package/module/print.js
CHANGED
|
@@ -20344,36 +20344,36 @@ var ST = {
|
|
|
20344
20344
|
abs: ["\\left|#1\\right|", 1],
|
|
20345
20345
|
perpendicular: "\\perp",
|
|
20346
20346
|
divide: "\\div"
|
|
20347
|
-
}, CT =
|
|
20347
|
+
}, CT = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, wT = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, TT = /\\embed\{newLine\}\[\]/g, ET = [
|
|
20348
20348
|
["$$", "$$"],
|
|
20349
20349
|
["$", "$"],
|
|
20350
20350
|
["\\[", "\\]"],
|
|
20351
20351
|
["\\(", "\\)"]
|
|
20352
|
-
]
|
|
20352
|
+
];
|
|
20353
|
+
function DT(e) {
|
|
20354
|
+
for (let [t, n] of ET) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
|
|
20355
|
+
return e;
|
|
20356
|
+
}
|
|
20357
|
+
function OT(e) {
|
|
20358
|
+
return `\\(${DT(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e)}\\)`.replace(TT, "\\newline ");
|
|
20359
|
+
}
|
|
20360
|
+
var kT = "mathjax_ignore", AT = "mathjax_process", jT = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", MT = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), NT = "MJX-CHTML-styles", PT = "PIE-MJX-SVG-styles", FT = "PIE-MathJax-Menu-Settings", IT = { "mjx-container[overflow=\"linebreak\"][display]": {
|
|
20353
20361
|
overflow: "auto clip",
|
|
20354
20362
|
"min-width": "initial !important"
|
|
20355
|
-
} },
|
|
20356
|
-
function
|
|
20363
|
+
} }, LT = 200, RT = 201, zT = 202;
|
|
20364
|
+
function BT(e) {
|
|
20357
20365
|
let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
|
|
20358
20366
|
for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
|
|
20359
20367
|
}
|
|
20360
|
-
function LT(e) {
|
|
20361
|
-
for (let [t, n] of DT) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
|
|
20362
|
-
return e;
|
|
20363
|
-
}
|
|
20364
|
-
function RT(e) {
|
|
20365
|
-
return LT(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
|
|
20366
|
-
}
|
|
20367
|
-
var zT = "mathjax_ignore", BT = "mathjax_process";
|
|
20368
20368
|
function VT(e, t) {
|
|
20369
|
-
let n = e.closest(`.${
|
|
20370
|
-
return n !== null && t.contains(n) && !n.classList.contains(
|
|
20369
|
+
let n = e.closest(`.${kT}, .${AT}`);
|
|
20370
|
+
return n !== null && t.contains(n) && !n.classList.contains("mathjax_process");
|
|
20371
20371
|
}
|
|
20372
20372
|
function HT(e) {
|
|
20373
20373
|
for (let t of e.querySelectorAll("[data-latex]")) {
|
|
20374
20374
|
if (t.dataset.mathHandled || t.closest("mjx-container") || VT(t, e)) continue;
|
|
20375
20375
|
let n = t.textContent;
|
|
20376
|
-
n && (t.textContent =
|
|
20376
|
+
n && (t.textContent = OT(n), t.dataset.mathHandled = "true");
|
|
20377
20377
|
}
|
|
20378
20378
|
}
|
|
20379
20379
|
function UT(e) {
|
|
@@ -20381,7 +20381,7 @@ function UT(e) {
|
|
|
20381
20381
|
}
|
|
20382
20382
|
function WT(e, t) {
|
|
20383
20383
|
for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
|
|
20384
|
-
return (t ?
|
|
20384
|
+
return (t ? wT : CT).test(e.textContent ?? "");
|
|
20385
20385
|
}
|
|
20386
20386
|
function GT(e) {
|
|
20387
20387
|
return new Promise((t, n) => {
|
|
@@ -20398,7 +20398,7 @@ function GT(e) {
|
|
|
20398
20398
|
typeset: !1,
|
|
20399
20399
|
ready: () => {
|
|
20400
20400
|
let e = FC(), r = e?.startup, i = KT(e);
|
|
20401
|
-
i && (qT(e), JT(e, s.speechLocales), TC(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (YT(r?.document), XT(r?.document), r?.document?.addStyles?.(
|
|
20401
|
+
i && (qT(e), JT(e, s.speechLocales), TC(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (YT(r?.document), XT(r?.document), r?.document?.addStyles?.(IT), xT(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
|
|
20402
20402
|
}
|
|
20403
20403
|
},
|
|
20404
20404
|
tex: { macros: { ...ST } },
|
|
@@ -20413,7 +20413,7 @@ function GT(e) {
|
|
|
20413
20413
|
a11y: { inTabOrder: c }
|
|
20414
20414
|
}
|
|
20415
20415
|
};
|
|
20416
|
-
r && l.tex && (console.warn(
|
|
20416
|
+
r && l.tex && (console.warn(jT), l.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], l.tex.processEscapes = !0), a || (l.chtml = { fontURL: "" });
|
|
20417
20417
|
let u = EC(s.speechLocales);
|
|
20418
20418
|
u && l.options && (l.options.sre = { locale: u }), LC(l, {
|
|
20419
20419
|
...s,
|
|
@@ -20430,18 +20430,18 @@ function qT(e) {
|
|
|
20430
20430
|
let t = e?._?.output, n = t?.chtml_ts?.CHTML;
|
|
20431
20431
|
n && (n.STYLESHEETID = zC);
|
|
20432
20432
|
let r = t?.svg_ts?.SVG;
|
|
20433
|
-
r && (r.STYLESHEETID =
|
|
20433
|
+
r && (r.STYLESHEETID = PT);
|
|
20434
20434
|
}
|
|
20435
20435
|
function JT(e, t) {
|
|
20436
20436
|
let n = e?._?.ui?.menu?.Menu?.Menu;
|
|
20437
20437
|
if (n) {
|
|
20438
|
-
n.MENU_STORAGE =
|
|
20438
|
+
n.MENU_STORAGE = FT;
|
|
20439
20439
|
try {
|
|
20440
|
-
let e = localStorage.getItem(
|
|
20440
|
+
let e = localStorage.getItem(FT);
|
|
20441
20441
|
if (!e) return;
|
|
20442
20442
|
let { assistiveMml: n, locale: r, ...i } = JSON.parse(e), a = r === void 0 || !t || t.has(r);
|
|
20443
20443
|
if (n === void 0 && a) return;
|
|
20444
|
-
a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(
|
|
20444
|
+
a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(FT, JSON.stringify(i)) : localStorage.removeItem(FT);
|
|
20445
20445
|
} catch {}
|
|
20446
20446
|
}
|
|
20447
20447
|
}
|
|
@@ -20449,23 +20449,23 @@ function YT(e) {
|
|
|
20449
20449
|
if (!e) return;
|
|
20450
20450
|
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
20451
20451
|
let n = e.typesetRoot;
|
|
20452
|
-
!n || t.has(n) || (
|
|
20452
|
+
!n || t.has(n) || (BT(n), t.add(n));
|
|
20453
20453
|
};
|
|
20454
|
-
e.addRenderAction?.("pie-strip-latex",
|
|
20454
|
+
e.addRenderAction?.("pie-strip-latex", RT, (e) => {
|
|
20455
20455
|
for (let t of e.math ?? []) n(t);
|
|
20456
20456
|
return !1;
|
|
20457
20457
|
}, (e) => {
|
|
20458
20458
|
let t = e.typesetRoot;
|
|
20459
|
-
return t &&
|
|
20459
|
+
return t && BT(t), !1;
|
|
20460
20460
|
});
|
|
20461
20461
|
let r = e.outputJax?.chtmlStyles;
|
|
20462
|
-
r?.id ===
|
|
20462
|
+
r?.id === NT && (r.id = zC), $T();
|
|
20463
20463
|
}
|
|
20464
20464
|
function XT(e) {
|
|
20465
20465
|
let t = (e) => {
|
|
20466
20466
|
e.typesetRoot && gT(e.typesetRoot);
|
|
20467
20467
|
};
|
|
20468
|
-
e?.addRenderAction?.("pie-name-math",
|
|
20468
|
+
e?.addRenderAction?.("pie-name-math", zT, (e) => {
|
|
20469
20469
|
for (let n of e.math ?? []) t(n);
|
|
20470
20470
|
return !1;
|
|
20471
20471
|
}, (e) => (t(e), !1));
|
|
@@ -20496,7 +20496,7 @@ function $T() {
|
|
|
20496
20496
|
function eE(e) {
|
|
20497
20497
|
let t = e?.math;
|
|
20498
20498
|
if (!t?.remove) return;
|
|
20499
|
-
let n = [...t].filter((e) => (e.state?.() ?? 0) >=
|
|
20499
|
+
let n = [...t].filter((e) => (e.state?.() ?? 0) >= LT && e.typesetRoot?.isConnected === !1);
|
|
20500
20500
|
if (n.length !== 0) {
|
|
20501
20501
|
for (let e of [...n].reverse()) e.clear?.();
|
|
20502
20502
|
t.remove(...n);
|
|
@@ -20524,8 +20524,8 @@ function rE(e) {
|
|
|
20524
20524
|
});
|
|
20525
20525
|
}
|
|
20526
20526
|
function iE(e) {
|
|
20527
|
-
let t = RC, n = t[
|
|
20528
|
-
return n || (n = rE(e), t[
|
|
20527
|
+
let t = RC, n = t[MT];
|
|
20528
|
+
return n || (n = rE(e), t[MT] = n), n;
|
|
20529
20529
|
}
|
|
20530
20530
|
function aE(e = {}) {
|
|
20531
20531
|
let t = e.useSingleDollar ?? !1;
|
|
@@ -20547,7 +20547,7 @@ function aE(e = {}) {
|
|
|
20547
20547
|
} catch (e) {
|
|
20548
20548
|
throw a.typesetClear?.([n]), e;
|
|
20549
20549
|
}
|
|
20550
|
-
|
|
20550
|
+
BT(n), _T(n);
|
|
20551
20551
|
}
|
|
20552
20552
|
};
|
|
20553
20553
|
}
|