@pie-element/categorize 14.0.6-next.20261018193205 → 14.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/{alert-dialog-Tc0gcM1a.js → alert-dialog-DapV-qbK.js} +55 -55
- package/dist/browser/alert-dialog-DapV-qbK.js.map +1 -0
- 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/{alert-dialog-BrEuXK8A.js → alert-dialog-BJjTnd49.js} +55 -55
- package/dist/browser/editor-runtime/alert-dialog-BJjTnd49.js.map +1 -0
- 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/{mathjax-CptWnMbQ-CR_i7r9X.js → mathjax-DqXi3q4c-C6UsRdhB.js} +3 -3
- package/dist/browser/editor-runtime/{mathjax-CptWnMbQ-CR_i7r9X.js.map → mathjax-DqXi3q4c-C6UsRdhB.js.map} +1 -1
- package/dist/browser/{mathjax-CptWnMbQ-Camhfbkk.js → mathjax-DqXi3q4c-uPGzEOmh.js} +3 -3
- package/dist/browser/{mathjax-CptWnMbQ-Camhfbkk.js.map → mathjax-DqXi3q4c-uPGzEOmh.js.map} +1 -1
- 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/package.json +17 -17
- package/dist/browser/alert-dialog-Tc0gcM1a.js.map +0 -1
- package/dist/browser/editor-runtime/alert-dialog-BrEuXK8A.js.map +0 -1
|
@@ -11,7 +11,7 @@ var M;
|
|
|
11
11
|
function N() {
|
|
12
12
|
return M;
|
|
13
13
|
}
|
|
14
|
-
var P = import("./mathjax-
|
|
14
|
+
var P = import("./mathjax-DqXi3q4c-uPGzEOmh.js");
|
|
15
15
|
P.catch(() => {});
|
|
16
16
|
async function te(e, t) {
|
|
17
17
|
let { createMathJax: n } = await P;
|
|
@@ -710,25 +710,7 @@ function At(e) {
|
|
|
710
710
|
function jt(e) {
|
|
711
711
|
for (let t of e.querySelectorAll("mjx-container")) At(t);
|
|
712
712
|
}
|
|
713
|
-
var Mt =
|
|
714
|
-
function Ft(e, t) {
|
|
715
|
-
if (typeof window > "u") return;
|
|
716
|
-
let n = globalThis;
|
|
717
|
-
n[Pt] ??= {
|
|
718
|
-
logged: !1,
|
|
719
|
-
conditions: []
|
|
720
|
-
};
|
|
721
|
-
let r = n[Pt];
|
|
722
|
-
if (r.conditions.includes(e)) return;
|
|
723
|
-
r.conditions.push(e);
|
|
724
|
-
let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Mt}`;
|
|
725
|
-
r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(Nt, { detail: {
|
|
726
|
-
condition: e,
|
|
727
|
-
message: i,
|
|
728
|
-
docsUrl: Mt
|
|
729
|
-
} }));
|
|
730
|
-
}
|
|
731
|
-
var It = {
|
|
713
|
+
var Mt = {
|
|
732
714
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
733
715
|
overarc: "\\overparen",
|
|
734
716
|
napprox: "\\not\\approx",
|
|
@@ -736,36 +718,54 @@ var It = {
|
|
|
736
718
|
abs: ["\\left|#1\\right|", 1],
|
|
737
719
|
perpendicular: "\\perp",
|
|
738
720
|
divide: "\\div"
|
|
739
|
-
},
|
|
721
|
+
}, Nt = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Pt = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, Ft = /\\embed\{newLine\}\[\]/g, It = [
|
|
740
722
|
["$$", "$$"],
|
|
741
723
|
["$", "$"],
|
|
742
724
|
["\\[", "\\]"],
|
|
743
725
|
["\\(", "\\)"]
|
|
744
|
-
]
|
|
726
|
+
];
|
|
727
|
+
function Lt(e) {
|
|
728
|
+
for (let [t, n] of It) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
|
|
729
|
+
return e;
|
|
730
|
+
}
|
|
731
|
+
function Rt(e) {
|
|
732
|
+
return `\\(${Lt(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e)}\\)`.replace(Ft, "\\newline ");
|
|
733
|
+
}
|
|
734
|
+
var zt = "mathjax_ignore", Bt = "mathjax_process", Vt = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", Ht = "pie-mathjax-version-conflict", Ut = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
|
|
735
|
+
function Wt(e, t) {
|
|
736
|
+
if (typeof window > "u") return;
|
|
737
|
+
let n = globalThis;
|
|
738
|
+
n[Ut] ??= {
|
|
739
|
+
logged: !1,
|
|
740
|
+
conditions: []
|
|
741
|
+
};
|
|
742
|
+
let r = n[Ut];
|
|
743
|
+
if (r.conditions.includes(e)) return;
|
|
744
|
+
r.conditions.push(e);
|
|
745
|
+
let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Vt}`;
|
|
746
|
+
r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(Ht, { detail: {
|
|
747
|
+
condition: e,
|
|
748
|
+
message: i,
|
|
749
|
+
docsUrl: Vt
|
|
750
|
+
} }));
|
|
751
|
+
}
|
|
752
|
+
var Gt = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Kt = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), qt = "MJX-CHTML-styles", Jt = "PIE-MJX-SVG-styles", Yt = "PIE-MathJax-Menu-Settings", Xt = { "mjx-container[overflow=\"linebreak\"][display]": {
|
|
745
753
|
overflow: "auto clip",
|
|
746
754
|
"min-width": "initial !important"
|
|
747
|
-
} },
|
|
748
|
-
function
|
|
755
|
+
} }, Zt = 200, Qt = 201, $t = 202;
|
|
756
|
+
function en(e) {
|
|
749
757
|
let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
|
|
750
758
|
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");
|
|
751
759
|
}
|
|
752
|
-
function Zt(e) {
|
|
753
|
-
for (let [t, n] of Vt) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
|
|
754
|
-
return e;
|
|
755
|
-
}
|
|
756
|
-
function Qt(e) {
|
|
757
|
-
return Zt(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
|
|
758
|
-
}
|
|
759
|
-
var $t = "mathjax_ignore", en = "mathjax_process";
|
|
760
760
|
function tn(e, t) {
|
|
761
|
-
let n = e.closest(`.${
|
|
762
|
-
return n !== null && t.contains(n) && !n.classList.contains(
|
|
761
|
+
let n = e.closest(`.${zt}, .${Bt}`);
|
|
762
|
+
return n !== null && t.contains(n) && !n.classList.contains("mathjax_process");
|
|
763
763
|
}
|
|
764
764
|
function nn(e) {
|
|
765
765
|
for (let t of e.querySelectorAll("[data-latex]")) {
|
|
766
766
|
if (t.dataset.mathHandled || t.closest("mjx-container") || tn(t, e)) continue;
|
|
767
767
|
let n = t.textContent;
|
|
768
|
-
n && (t.textContent =
|
|
768
|
+
n && (t.textContent = Rt(n), t.dataset.mathHandled = "true");
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
function rn(e) {
|
|
@@ -773,7 +773,7 @@ function rn(e) {
|
|
|
773
773
|
}
|
|
774
774
|
function an(e, t) {
|
|
775
775
|
for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
|
|
776
|
-
return (t ?
|
|
776
|
+
return (t ? Pt : Nt).test(e.textContent ?? "");
|
|
777
777
|
}
|
|
778
778
|
function on(e) {
|
|
779
779
|
return new Promise((t, n) => {
|
|
@@ -790,10 +790,10 @@ function on(e) {
|
|
|
790
790
|
typeset: !1,
|
|
791
791
|
ready: () => {
|
|
792
792
|
let e = N(), i = e?.startup, a = sn(e);
|
|
793
|
-
a && (cn(e), ln(e, f.speechLocales), r(e?._?.a11y?.sre_ts?.locales, f.speechLocales)), i?.defaultReady?.(), a && (un(i?.document), dn(i?.document), i?.document?.addStyles?.(
|
|
793
|
+
a && (cn(e), ln(e, f.speechLocales), r(e?._?.a11y?.sre_ts?.locales, f.speechLocales)), i?.defaultReady?.(), a && (un(i?.document), dn(i?.document), i?.document?.addStyles?.(Xt), s(i?.document)), Promise.resolve(i?.promise).then(() => t(), n);
|
|
794
794
|
}
|
|
795
795
|
},
|
|
796
|
-
tex: { macros: { ...
|
|
796
|
+
tex: { macros: { ...Mt } },
|
|
797
797
|
output: { displayOverflow: "linebreak" },
|
|
798
798
|
options: {
|
|
799
799
|
enableMenu: l,
|
|
@@ -805,7 +805,7 @@ function on(e) {
|
|
|
805
805
|
a11y: { inTabOrder: p }
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
c && m.tex && (console.warn(
|
|
808
|
+
c && m.tex && (console.warn(Gt), m.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], m.tex.processEscapes = !0), u || (m.chtml = { fontURL: "" });
|
|
809
809
|
let h = o(f.speechLocales);
|
|
810
810
|
h && m.options && (m.options.sre = { locale: h }), te(m, {
|
|
811
811
|
...f,
|
|
@@ -822,18 +822,18 @@ function cn(e) {
|
|
|
822
822
|
let t = e?._?.output, n = t?.chtml_ts?.CHTML;
|
|
823
823
|
n && (n.STYLESHEETID = ie);
|
|
824
824
|
let r = t?.svg_ts?.SVG;
|
|
825
|
-
r && (r.STYLESHEETID =
|
|
825
|
+
r && (r.STYLESHEETID = Jt);
|
|
826
826
|
}
|
|
827
827
|
function ln(e, t) {
|
|
828
828
|
let n = e?._?.ui?.menu?.Menu?.Menu;
|
|
829
829
|
if (n) {
|
|
830
|
-
n.MENU_STORAGE =
|
|
830
|
+
n.MENU_STORAGE = Yt;
|
|
831
831
|
try {
|
|
832
|
-
let e = localStorage.getItem(
|
|
832
|
+
let e = localStorage.getItem(Yt);
|
|
833
833
|
if (!e) return;
|
|
834
834
|
let { assistiveMml: n, locale: r, ...i } = JSON.parse(e), a = r === void 0 || !t || t.has(r);
|
|
835
835
|
if (n === void 0 && a) return;
|
|
836
|
-
a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(
|
|
836
|
+
a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(Yt, JSON.stringify(i)) : localStorage.removeItem(Yt);
|
|
837
837
|
} catch {}
|
|
838
838
|
}
|
|
839
839
|
}
|
|
@@ -841,23 +841,23 @@ function un(e) {
|
|
|
841
841
|
if (!e) return;
|
|
842
842
|
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
843
843
|
let n = e.typesetRoot;
|
|
844
|
-
!n || t.has(n) || (
|
|
844
|
+
!n || t.has(n) || (en(n), t.add(n));
|
|
845
845
|
};
|
|
846
|
-
e.addRenderAction?.("pie-strip-latex",
|
|
846
|
+
e.addRenderAction?.("pie-strip-latex", Qt, (e) => {
|
|
847
847
|
for (let t of e.math ?? []) n(t);
|
|
848
848
|
return !1;
|
|
849
849
|
}, (e) => {
|
|
850
850
|
let t = e.typesetRoot;
|
|
851
|
-
return t &&
|
|
851
|
+
return t && en(t), !1;
|
|
852
852
|
});
|
|
853
853
|
let r = e.outputJax?.chtmlStyles;
|
|
854
|
-
r?.id ===
|
|
854
|
+
r?.id === qt && (r.id = ie), mn();
|
|
855
855
|
}
|
|
856
856
|
function dn(e) {
|
|
857
857
|
let t = (e) => {
|
|
858
858
|
e.typesetRoot && At(e.typesetRoot);
|
|
859
859
|
};
|
|
860
|
-
e?.addRenderAction?.("pie-name-math",
|
|
860
|
+
e?.addRenderAction?.("pie-name-math", $t, (e) => {
|
|
861
861
|
for (let n of e.math ?? []) t(n);
|
|
862
862
|
return !1;
|
|
863
863
|
}, (e) => (t(e), !1));
|
|
@@ -866,7 +866,7 @@ function fn(e) {
|
|
|
866
866
|
return e instanceof HTMLStyleElement && ae.includes(e.id);
|
|
867
867
|
}
|
|
868
868
|
function pn(e) {
|
|
869
|
-
|
|
869
|
+
Wt("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
|
|
870
870
|
}
|
|
871
871
|
function mn() {
|
|
872
872
|
let e = document.head, t = [...e.children].find(fn);
|
|
@@ -888,7 +888,7 @@ function mn() {
|
|
|
888
888
|
function hn(e) {
|
|
889
889
|
let t = e?.math;
|
|
890
890
|
if (!t?.remove) return;
|
|
891
|
-
let n = [...t].filter((e) => (e.state?.() ?? 0) >=
|
|
891
|
+
let n = [...t].filter((e) => (e.state?.() ?? 0) >= Zt && e.typesetRoot?.isConnected === !1);
|
|
892
892
|
if (n.length !== 0) {
|
|
893
893
|
for (let e of [...n].reverse()) e.clear?.();
|
|
894
894
|
t.remove(...n);
|
|
@@ -916,8 +916,8 @@ function vn(e) {
|
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
918
|
function yn(e) {
|
|
919
|
-
let t = F, n = t[
|
|
920
|
-
return n || (n = vn(e), t[
|
|
919
|
+
let t = F, n = t[Kt];
|
|
920
|
+
return n || (n = vn(e), t[Kt] = n), n;
|
|
921
921
|
}
|
|
922
922
|
function bn(e = {}) {
|
|
923
923
|
let t = e.useSingleDollar ?? !1;
|
|
@@ -938,7 +938,7 @@ function bn(e = {}) {
|
|
|
938
938
|
} catch (e) {
|
|
939
939
|
throw i.typesetClear?.([n]), e;
|
|
940
940
|
}
|
|
941
|
-
|
|
941
|
+
en(n), jt(n);
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
944
|
}
|
|
@@ -989,7 +989,7 @@ var Nn = async (e) => {
|
|
|
989
989
|
let n = kn()?.wrapMath?.(e, t);
|
|
990
990
|
if (n != null) return n;
|
|
991
991
|
let [r, i] = t === "dollar" || t === "double_dollar" ? ["$", "$"] : ["\\(", "\\)"];
|
|
992
|
-
return `${r}${
|
|
992
|
+
return `${r}${Lt(e)}${i}`;
|
|
993
993
|
}, Fn = (e) => {
|
|
994
994
|
let t = e.trim();
|
|
995
995
|
return t.startsWith("\\[") && t.endsWith("\\]") ? {
|
|
@@ -14027,4 +14027,4 @@ uC.defaultProps = {
|
|
|
14027
14027
|
//#endregion
|
|
14028
14028
|
export { Xh as $, wv as A, Y as At, N_ as B, oc as Bt, Gv as C, Kp as Ct, Iv as D, Hp as Dt, Bv as E, xp as Et, av as F, El as Ft, Yg as G, io as Gt, __ as H, jo as Ht, iv as I, $c as It, ng as J, Jn as Jt, Hg as K, ci as Kt, tv as L, Gc as Lt, _v as M, ju as Mt, sv as N, Au as Nt, Fv as O, ad as Ot, ov as P, Ou as Pt, Zh as Q, Fn as Qt, q_ as R, xc as Rt, Kv as S, hm as St, Hv as T, Tp as Tt, e_ as U, bo as Ut, x_ as V, G as Vt, $g as W, ro as Wt, $h as X, Nn as Xt, eg as Y, qn as Yt, Qh as Z, Pn as Zt, Xx as _, Sm as _t, JS as a, hh as at, uy as b, ym as bt, jS as c, Hm as ct, _S as d, Mm as dt, Q as et, fS as f, Am as ft, ab as g, Cm as gt, Ub as h, wm as ht, eC as i, xh as it, yv as j, Mu as jt, Dv as k, zu as kt, bS as l, Rm as lt, Vx as m, Tm as mt, sC as n, Ah as nt, WS as o, mh as ot, $ as p, jm as pt, Sg as q, si as qt, iC as r, kh as rt, FS as s, nh as st, uC as t, Wh as tt, vS as u, Lm as ut, eS as v, xm as vt, Uv as w, Ep as wt, Xv as x, _m as xt, fy as y, bm as yt, G_ as z, sc as zt };
|
|
14029
14029
|
|
|
14030
|
-
//# sourceMappingURL=alert-dialog-
|
|
14030
|
+
//# sourceMappingURL=alert-dialog-DapV-qbK.js.map
|