@pie-element/venn-classification 0.1.1-next.14 → 0.1.1-next.15
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/author/index.js +341 -231
- package/dist/author/index.js.map +1 -1
- package/dist/browser/{VennClassification-D7bxMPcn.js → VennClassification-Dk8fAui3.js} +250 -176
- package/dist/browser/{VennClassification-D7bxMPcn.js.map → VennClassification-Dk8fAui3.js.map} +1 -1
- package/dist/browser/author/index.js +3341 -3318
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{VennClassification-D7bxMPcn.js → VennClassification-Dk8fAui3.js} +250 -176
- package/dist/browser/editor-runtime/{VennClassification-D7bxMPcn.js.map → VennClassification-Dk8fAui3.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +1 -1
- package/dist/delivery/index.js +139 -58
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as ee, u as I, v as L, w as R, x as z, y as te, z as B } from "../VennClassification-
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, H as o, I as s, L as c, M as l, N as u, O as d, P as f, R as p, S as m, T as h, U as g, V as _, _ as v, a as y, b, c as x, d as S, f as C, g as w, h as T, i as E, j as D, k as O, l as k, m as A, n as j, o as M, p as N, r as P, s as F, t as ee, u as I, v as L, w as R, x as z, y as te, z as B } from "../VennClassification-Dk8fAui3.js";
|
|
2
2
|
import { _ as ne, g as re, h as ie, i as ae, m as oe, n as se, p as V, v as H, y as ce } from "../controller-bkBJ6-j1.js";
|
|
3
3
|
import { Editor as le } from "@tiptap/core";
|
|
4
4
|
import ue from "@tiptap/starter-kit";
|
package/dist/delivery/index.js
CHANGED
|
@@ -5412,131 +5412,212 @@ function create_custom_element(Component, props_definition, slots, exports, shad
|
|
|
5412
5412
|
}
|
|
5413
5413
|
//#endregion
|
|
5414
5414
|
//#region ../../shared/math-rendering-mathjax/dist/index.js
|
|
5415
|
-
var e$3 =
|
|
5415
|
+
var e$3 = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page";
|
|
5416
|
+
var t$3 = "pie-mathjax-version-conflict";
|
|
5417
|
+
var n = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
|
|
5418
|
+
function r$2(r, i) {
|
|
5419
|
+
if (typeof window > "u") return;
|
|
5420
|
+
let a = globalThis;
|
|
5421
|
+
a[n] ?? (a[n] = {
|
|
5422
|
+
logged: !1,
|
|
5423
|
+
conditions: []
|
|
5424
|
+
});
|
|
5425
|
+
let o = a[n];
|
|
5426
|
+
if (o.conditions.includes(r)) return;
|
|
5427
|
+
o.conditions.push(r);
|
|
5428
|
+
let s = `[math-rendering] Unsupported page (${r}): ${i}. 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 ${e$3}`;
|
|
5429
|
+
o.logged || (o.logged = !0, console.error(s)), window.dispatchEvent(new CustomEvent(t$3, { detail: {
|
|
5430
|
+
condition: r,
|
|
5431
|
+
message: s,
|
|
5432
|
+
docsUrl: e$3
|
|
5433
|
+
} }));
|
|
5434
|
+
}
|
|
5435
|
+
function i() {
|
|
5436
|
+
let e = window.MathJax?.version;
|
|
5437
|
+
return typeof e == "string" && e.startsWith("3.") ? e : void 0;
|
|
5438
|
+
}
|
|
5439
|
+
var a = "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js";
|
|
5440
|
+
var o = {
|
|
5416
5441
|
parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
|
|
5417
5442
|
overarc: "\\overparen",
|
|
5418
5443
|
napprox: "\\not\\approx",
|
|
5419
5444
|
longdiv: "\\enclose{longdiv}",
|
|
5420
5445
|
abs: ["\\left|#1\\right|", 1]
|
|
5421
5446
|
};
|
|
5422
|
-
var
|
|
5423
|
-
var
|
|
5424
|
-
var
|
|
5425
|
-
var
|
|
5426
|
-
var
|
|
5447
|
+
var s$1 = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)";
|
|
5448
|
+
var c$1 = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/;
|
|
5449
|
+
var l = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/;
|
|
5450
|
+
var u = /\\embed\{newLine\}\[\]/g;
|
|
5451
|
+
var d = [
|
|
5427
5452
|
["$$", "$$"],
|
|
5428
5453
|
["$", "$"],
|
|
5429
5454
|
["\\[", "\\]"],
|
|
5430
5455
|
["\\(", "\\)"]
|
|
5431
5456
|
];
|
|
5432
|
-
var
|
|
5433
|
-
|
|
5457
|
+
var f = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
|
|
5458
|
+
var p = "PIE-MJX-CHTML-styles";
|
|
5459
|
+
var m = "MJX-CHTML-styles";
|
|
5460
|
+
var h = [m, "MJX-SVG-styles"];
|
|
5461
|
+
var g = 201;
|
|
5462
|
+
function _(e) {
|
|
5463
|
+
let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
|
|
5464
|
+
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");
|
|
5465
|
+
}
|
|
5466
|
+
function v() {
|
|
5434
5467
|
return window.MathJax;
|
|
5435
5468
|
}
|
|
5436
|
-
function
|
|
5469
|
+
function y(e) {
|
|
5437
5470
|
let t = e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e;
|
|
5438
|
-
for (let [e, n] of
|
|
5471
|
+
for (let [e, n] of d) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
|
|
5439
5472
|
return t;
|
|
5440
5473
|
}
|
|
5441
|
-
function
|
|
5474
|
+
function b(e) {
|
|
5442
5475
|
for (let t of e.querySelectorAll("[data-latex]")) {
|
|
5443
5476
|
if (t.dataset.mathHandled || t.closest("mjx-container")) continue;
|
|
5444
5477
|
let e = t.textContent;
|
|
5445
|
-
e && (t.textContent = `\\(${
|
|
5478
|
+
e && (t.textContent = `\\(${y(e)}\\)`.replace(u, "\\newline "), t.dataset.mathHandled = "true");
|
|
5446
5479
|
}
|
|
5447
5480
|
}
|
|
5448
|
-
function
|
|
5481
|
+
function x(e, t) {
|
|
5449
5482
|
for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
|
|
5450
|
-
return (t ?
|
|
5483
|
+
return (t ? l : c$1).test(e.textContent ?? "");
|
|
5451
5484
|
}
|
|
5452
|
-
function
|
|
5453
|
-
return new Promise((
|
|
5454
|
-
let { useSingleDollar:
|
|
5485
|
+
function S(e) {
|
|
5486
|
+
return new Promise((t, n) => {
|
|
5487
|
+
let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: c = !0, srcUrl: l } = e, u = {
|
|
5455
5488
|
loader: {
|
|
5456
|
-
load:
|
|
5457
|
-
failed: (e) =>
|
|
5489
|
+
load: i ? ["a11y/assistive-mml"] : [],
|
|
5490
|
+
failed: (e) => n(e)
|
|
5458
5491
|
},
|
|
5459
5492
|
startup: {
|
|
5460
5493
|
typeset: !1,
|
|
5461
5494
|
ready: () => {
|
|
5462
|
-
let e =
|
|
5463
|
-
e?.defaultReady?.(), Promise.resolve(
|
|
5495
|
+
let e = v(), r = e?.startup, i = !!e?.version?.startsWith("4.");
|
|
5496
|
+
i && C(e), r?.defaultReady?.(), i && w(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
|
|
5464
5497
|
}
|
|
5465
5498
|
},
|
|
5466
|
-
tex: { macros: { ...
|
|
5499
|
+
tex: { macros: { ...o } },
|
|
5467
5500
|
options: {
|
|
5468
|
-
enableMenu:
|
|
5501
|
+
enableMenu: i,
|
|
5469
5502
|
menuOptions: { settings: {
|
|
5470
|
-
assistiveMml:
|
|
5503
|
+
assistiveMml: i,
|
|
5471
5504
|
enrich: !1,
|
|
5472
5505
|
inTabOrder: !1
|
|
5473
5506
|
} }
|
|
5474
5507
|
}
|
|
5475
5508
|
};
|
|
5476
|
-
|
|
5509
|
+
r && u.tex && (console.warn(s$1), u.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], u.tex.processEscapes = !0), c || (u.chtml = { fontURL: "" }), window.MathJax = u;
|
|
5477
5510
|
let d = document.createElement("script");
|
|
5478
|
-
d.src = l ||
|
|
5511
|
+
d.src = l || a, d.async = !0, d.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(d);
|
|
5479
5512
|
});
|
|
5480
5513
|
}
|
|
5481
|
-
function
|
|
5514
|
+
function C(e) {
|
|
5515
|
+
let t = e?._?.output?.chtml_ts?.CHTML;
|
|
5516
|
+
t && (t.STYLESHEETID = p);
|
|
5517
|
+
}
|
|
5518
|
+
function w(e) {
|
|
5519
|
+
if (!e) return;
|
|
5520
|
+
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
5521
|
+
let n = e.typesetRoot;
|
|
5522
|
+
!n || t.has(n) || (_(n), t.add(n));
|
|
5523
|
+
};
|
|
5524
|
+
e.addRenderAction?.("pie-strip-latex", g, (e) => {
|
|
5525
|
+
for (let t of e.math ?? []) n(t);
|
|
5526
|
+
return !1;
|
|
5527
|
+
}, (e) => {
|
|
5528
|
+
let t = e.typesetRoot;
|
|
5529
|
+
return t && _(t), !1;
|
|
5530
|
+
});
|
|
5531
|
+
let r = e.outputJax?.chtmlStyles;
|
|
5532
|
+
r?.id === m && (r.id = p), D();
|
|
5533
|
+
}
|
|
5534
|
+
function T(e) {
|
|
5535
|
+
return e instanceof HTMLStyleElement && h.includes(e.id);
|
|
5536
|
+
}
|
|
5537
|
+
function E(e) {
|
|
5538
|
+
r$2("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
|
|
5539
|
+
}
|
|
5540
|
+
function D() {
|
|
5541
|
+
let e = document.head, t = [...e.children].find(T);
|
|
5542
|
+
if (t) {
|
|
5543
|
+
E(t);
|
|
5544
|
+
return;
|
|
5545
|
+
}
|
|
5546
|
+
let n = new MutationObserver((e) => {
|
|
5547
|
+
for (let t of e) {
|
|
5548
|
+
let e = [...t.addedNodes].find(T);
|
|
5549
|
+
if (e) {
|
|
5550
|
+
E(e), n.disconnect();
|
|
5551
|
+
return;
|
|
5552
|
+
}
|
|
5553
|
+
}
|
|
5554
|
+
});
|
|
5555
|
+
n.observe(e, { childList: !0 });
|
|
5556
|
+
}
|
|
5557
|
+
function O(e) {
|
|
5482
5558
|
return new Promise((t, n) => {
|
|
5483
5559
|
let r = e.startup ?? {};
|
|
5484
5560
|
e.startup = r;
|
|
5485
5561
|
let i = r.ready;
|
|
5486
5562
|
r.ready = () => {
|
|
5487
|
-
let e =
|
|
5563
|
+
let e = v()?.startup;
|
|
5488
5564
|
i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
|
|
5489
5565
|
};
|
|
5490
5566
|
});
|
|
5491
5567
|
}
|
|
5492
|
-
function
|
|
5493
|
-
let t =
|
|
5494
|
-
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() :
|
|
5568
|
+
function k(e) {
|
|
5569
|
+
let t = v();
|
|
5570
|
+
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : O(t) : S(e);
|
|
5495
5571
|
}
|
|
5496
|
-
function
|
|
5497
|
-
return
|
|
5498
|
-
typeof
|
|
5572
|
+
function A(e) {
|
|
5573
|
+
return k(e).then(() => {
|
|
5574
|
+
typeof v()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
|
|
5499
5575
|
});
|
|
5500
5576
|
}
|
|
5501
|
-
function
|
|
5502
|
-
let t = globalThis, n = t[
|
|
5503
|
-
return n || (n =
|
|
5577
|
+
function j(e) {
|
|
5578
|
+
let t = globalThis, n = t[f];
|
|
5579
|
+
return n || (n = A(e), t[f] = n), n;
|
|
5504
5580
|
}
|
|
5505
|
-
function
|
|
5581
|
+
function M(e = {}) {
|
|
5506
5582
|
let t = e.useSingleDollar ?? !1;
|
|
5507
5583
|
return async (n) => {
|
|
5508
5584
|
if (typeof window > "u") return;
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5585
|
+
let a = i();
|
|
5586
|
+
a && r$2("mathjax-3-global", `window.MathJax is MathJax ${a}`), b(n);
|
|
5587
|
+
let o = j(e);
|
|
5588
|
+
if (!x(n, t)) {
|
|
5589
|
+
o.catch(() => {});
|
|
5513
5590
|
return;
|
|
5514
5591
|
}
|
|
5515
|
-
await
|
|
5516
|
-
let
|
|
5517
|
-
await
|
|
5592
|
+
await o;
|
|
5593
|
+
let s = v();
|
|
5594
|
+
await s?.startup?.promise, typeof s?.typesetPromise == "function" && (await s.typesetPromise([n]), _(n));
|
|
5518
5595
|
};
|
|
5519
5596
|
}
|
|
5520
|
-
var
|
|
5521
|
-
var
|
|
5522
|
-
var
|
|
5523
|
-
function
|
|
5524
|
-
return !!window[
|
|
5597
|
+
var P = "@pie-lib/math-rendering";
|
|
5598
|
+
var F = "@pie-lib/math-rendering@2";
|
|
5599
|
+
var I = null;
|
|
5600
|
+
function L() {
|
|
5601
|
+
return !!window[F]?.opts?.useSingleDollar;
|
|
5525
5602
|
}
|
|
5526
|
-
function
|
|
5527
|
-
return
|
|
5603
|
+
function R() {
|
|
5604
|
+
return I || (I = M({ useSingleDollar: L() })), I;
|
|
5528
5605
|
}
|
|
5529
|
-
function
|
|
5606
|
+
function z() {
|
|
5530
5607
|
if (typeof window > "u") return null;
|
|
5531
|
-
let e = window[
|
|
5608
|
+
let e = window[P];
|
|
5532
5609
|
return typeof e?.renderMath == "function" ? e : null;
|
|
5533
5610
|
}
|
|
5534
|
-
|
|
5611
|
+
function B() {
|
|
5612
|
+
let e = i();
|
|
5613
|
+
e && r$2("legacy-renderer-delegation", `window['${P}'] renders this element's math with MathJax ${e}`);
|
|
5614
|
+
}
|
|
5615
|
+
var V = async (e) => {
|
|
5535
5616
|
if (typeof window > "u") return;
|
|
5536
5617
|
let t = typeof e == "string", n;
|
|
5537
5618
|
t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
|
|
5538
|
-
let r =
|
|
5539
|
-
return r ? await r.renderMath?.(n) : await
|
|
5619
|
+
let r = z();
|
|
5620
|
+
return r ? (B(), await r.renderMath?.(n)) : await R()(n), t ? n.innerHTML : void 0;
|
|
5540
5621
|
};
|
|
5541
5622
|
//#endregion
|
|
5542
5623
|
//#region ../../shared/translator/dist/en.js
|
|
@@ -9232,7 +9313,7 @@ function VennClassification($$anchor, $$props) {
|
|
|
9232
9313
|
if (!containerEl) return;
|
|
9233
9314
|
const warn = (err) => console.warn("venn-classification: MathJax render failed", err);
|
|
9234
9315
|
try {
|
|
9235
|
-
Promise.resolve(
|
|
9316
|
+
Promise.resolve(V(containerEl)).catch(warn);
|
|
9236
9317
|
} catch (err) {
|
|
9237
9318
|
warn(err);
|
|
9238
9319
|
}
|