@pie-element/venn-classification 0.1.1 → 0.1.2-next.20261002215153
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 +91 -73
- package/dist/author/index.js.map +1 -1
- package/dist/browser/{VennClassification-Dh-jgyW3.js → VennClassification-Vd5Uzu-u.js} +214 -197
- package/dist/browser/{VennClassification-Dh-jgyW3.js.map → VennClassification-Vd5Uzu-u.js.map} +1 -1
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/delivery/index.js +1 -1
- package/dist/browser/editor-runtime/{VennClassification-Dh-jgyW3.js → VennClassification-Vd5Uzu-u.js} +214 -197
- package/dist/browser/editor-runtime/{VennClassification-Dh-jgyW3.js.map → VennClassification-Vd5Uzu-u.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 +91 -73
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +4 -4
- package/package.json +3 -3
|
@@ -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-Vd5Uzu-u.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
|
@@ -5463,39 +5463,40 @@ var f = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
|
|
|
5463
5463
|
var p = "PIE-MJX-CHTML-styles";
|
|
5464
5464
|
var m = "MJX-CHTML-styles";
|
|
5465
5465
|
var h = [m, "MJX-SVG-styles"];
|
|
5466
|
-
var g =
|
|
5467
|
-
|
|
5466
|
+
var g = 200;
|
|
5467
|
+
var _ = 201;
|
|
5468
|
+
function v(e) {
|
|
5468
5469
|
let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
|
|
5469
5470
|
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");
|
|
5470
5471
|
}
|
|
5471
|
-
function
|
|
5472
|
+
function y() {
|
|
5472
5473
|
return window.MathJax;
|
|
5473
5474
|
}
|
|
5474
|
-
function
|
|
5475
|
+
function b(e) {
|
|
5475
5476
|
for (let [t, n] of d) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
|
|
5476
5477
|
return e;
|
|
5477
5478
|
}
|
|
5478
|
-
function
|
|
5479
|
-
return
|
|
5479
|
+
function x(e) {
|
|
5480
|
+
return b(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
|
|
5480
5481
|
}
|
|
5481
|
-
var
|
|
5482
|
-
var
|
|
5483
|
-
function
|
|
5484
|
-
let n = e.closest(`.${
|
|
5485
|
-
return n !== null && t.contains(n) && !n.classList.contains(
|
|
5482
|
+
var S = "mathjax_ignore";
|
|
5483
|
+
var C = "mathjax_process";
|
|
5484
|
+
function w(e, t) {
|
|
5485
|
+
let n = e.closest(`.${S}, .${C}`);
|
|
5486
|
+
return n !== null && t.contains(n) && !n.classList.contains(C);
|
|
5486
5487
|
}
|
|
5487
|
-
function
|
|
5488
|
+
function T(e) {
|
|
5488
5489
|
for (let t of e.querySelectorAll("[data-latex]")) {
|
|
5489
|
-
if (t.dataset.mathHandled || t.closest("mjx-container") ||
|
|
5490
|
+
if (t.dataset.mathHandled || t.closest("mjx-container") || w(t, e)) continue;
|
|
5490
5491
|
let n = t.textContent;
|
|
5491
|
-
n && (t.textContent = `\\(${
|
|
5492
|
+
n && (t.textContent = `\\(${x(n)}\\)`.replace(u, "\\newline "), t.dataset.mathHandled = "true");
|
|
5492
5493
|
}
|
|
5493
5494
|
}
|
|
5494
|
-
function
|
|
5495
|
+
function E(e, t) {
|
|
5495
5496
|
for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
|
|
5496
5497
|
return (t ? l : c$1).test(e.textContent ?? "");
|
|
5497
5498
|
}
|
|
5498
|
-
function
|
|
5499
|
+
function D(e) {
|
|
5499
5500
|
return new Promise((t, n) => {
|
|
5500
5501
|
let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: c = !0, srcUrl: l } = e, u = {
|
|
5501
5502
|
loader: {
|
|
@@ -5505,8 +5506,8 @@ function E(e) {
|
|
|
5505
5506
|
startup: {
|
|
5506
5507
|
typeset: !1,
|
|
5507
5508
|
ready: () => {
|
|
5508
|
-
let e =
|
|
5509
|
-
i &&
|
|
5509
|
+
let e = y(), r = e?.startup, i = !!e?.version?.startsWith("4.");
|
|
5510
|
+
i && O(e), r?.defaultReady?.(), i && k(r?.document), Promise.resolve(r?.promise).then(() => t(), n);
|
|
5510
5511
|
}
|
|
5511
5512
|
},
|
|
5512
5513
|
tex: { macros: { ...o } },
|
|
@@ -5524,137 +5525,154 @@ function E(e) {
|
|
|
5524
5525
|
d.src = l || a, d.async = !0, d.onerror = () => n(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(d);
|
|
5525
5526
|
});
|
|
5526
5527
|
}
|
|
5527
|
-
function
|
|
5528
|
+
function O(e) {
|
|
5528
5529
|
let t = e?._?.output?.chtml_ts?.CHTML;
|
|
5529
5530
|
t && (t.STYLESHEETID = p);
|
|
5530
5531
|
}
|
|
5531
|
-
function
|
|
5532
|
+
function k(e) {
|
|
5532
5533
|
if (!e) return;
|
|
5533
5534
|
let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
|
|
5534
5535
|
let n = e.typesetRoot;
|
|
5535
|
-
!n || t.has(n) || (
|
|
5536
|
+
!n || t.has(n) || (v(n), t.add(n));
|
|
5536
5537
|
};
|
|
5537
|
-
e.addRenderAction?.("pie-strip-latex",
|
|
5538
|
+
e.addRenderAction?.("pie-strip-latex", _, (e) => {
|
|
5538
5539
|
for (let t of e.math ?? []) n(t);
|
|
5539
5540
|
return !1;
|
|
5540
5541
|
}, (e) => {
|
|
5541
5542
|
let t = e.typesetRoot;
|
|
5542
|
-
return t &&
|
|
5543
|
+
return t && v(t), !1;
|
|
5543
5544
|
});
|
|
5544
5545
|
let r = e.outputJax?.chtmlStyles;
|
|
5545
|
-
r?.id === m && (r.id = p),
|
|
5546
|
+
r?.id === m && (r.id = p), M();
|
|
5546
5547
|
}
|
|
5547
|
-
function
|
|
5548
|
+
function A(e) {
|
|
5548
5549
|
return e instanceof HTMLStyleElement && h.includes(e.id);
|
|
5549
5550
|
}
|
|
5550
|
-
function
|
|
5551
|
+
function j(e) {
|
|
5551
5552
|
r$2("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
|
|
5552
5553
|
}
|
|
5553
|
-
function
|
|
5554
|
-
let e = document.head, t = [...e.children].find(
|
|
5554
|
+
function M() {
|
|
5555
|
+
let e = document.head, t = [...e.children].find(A);
|
|
5555
5556
|
if (t) {
|
|
5556
|
-
|
|
5557
|
+
j(t);
|
|
5557
5558
|
return;
|
|
5558
5559
|
}
|
|
5559
5560
|
let n = new MutationObserver((e) => {
|
|
5560
5561
|
for (let t of e) {
|
|
5561
|
-
let e = [...t.addedNodes].find(
|
|
5562
|
+
let e = [...t.addedNodes].find(A);
|
|
5562
5563
|
if (e) {
|
|
5563
|
-
|
|
5564
|
+
j(e), n.disconnect();
|
|
5564
5565
|
return;
|
|
5565
5566
|
}
|
|
5566
5567
|
}
|
|
5567
5568
|
});
|
|
5568
5569
|
n.observe(e, { childList: !0 });
|
|
5569
5570
|
}
|
|
5570
|
-
function
|
|
5571
|
+
function N(e) {
|
|
5572
|
+
let t = e?.math;
|
|
5573
|
+
if (!t?.remove) return;
|
|
5574
|
+
let n = [...t].filter((e) => (e.state?.() ?? 0) >= g && e.typesetRoot?.isConnected === !1);
|
|
5575
|
+
if (n.length !== 0) {
|
|
5576
|
+
for (let e of [...n].reverse()) e.clear?.();
|
|
5577
|
+
t.remove(...n);
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
function P(e) {
|
|
5571
5581
|
return new Promise((t, n) => {
|
|
5572
5582
|
let r = e.startup ?? {};
|
|
5573
5583
|
e.startup = r;
|
|
5574
5584
|
let i = r.ready;
|
|
5575
5585
|
r.ready = () => {
|
|
5576
|
-
let e =
|
|
5586
|
+
let e = y()?.startup;
|
|
5577
5587
|
i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
|
|
5578
5588
|
};
|
|
5579
5589
|
});
|
|
5580
5590
|
}
|
|
5581
|
-
function
|
|
5582
|
-
let t =
|
|
5583
|
-
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() :
|
|
5591
|
+
function F(e) {
|
|
5592
|
+
let t = y();
|
|
5593
|
+
return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : P(t) : D(e);
|
|
5584
5594
|
}
|
|
5585
|
-
function
|
|
5586
|
-
return
|
|
5587
|
-
typeof
|
|
5595
|
+
function I(e) {
|
|
5596
|
+
return F(e).then(() => {
|
|
5597
|
+
typeof y()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
|
|
5588
5598
|
});
|
|
5589
5599
|
}
|
|
5590
|
-
function
|
|
5600
|
+
function L(e) {
|
|
5591
5601
|
let t = globalThis, n = t[f];
|
|
5592
|
-
return n || (n =
|
|
5602
|
+
return n || (n = I(e), t[f] = n), n;
|
|
5593
5603
|
}
|
|
5594
|
-
function
|
|
5604
|
+
function R(e = {}) {
|
|
5595
5605
|
let t = e.useSingleDollar ?? !1;
|
|
5596
5606
|
return async (n) => {
|
|
5597
5607
|
if (typeof window > "u") return;
|
|
5598
5608
|
let a = i();
|
|
5599
|
-
a && r$2("mathjax-3-global", `window.MathJax is MathJax ${a}`),
|
|
5600
|
-
let o =
|
|
5601
|
-
if (!
|
|
5609
|
+
a && r$2("mathjax-3-global", `window.MathJax is MathJax ${a}`), T(n);
|
|
5610
|
+
let o = L(e);
|
|
5611
|
+
if (!E(n, t)) {
|
|
5602
5612
|
o.catch(() => {});
|
|
5603
5613
|
return;
|
|
5604
5614
|
}
|
|
5605
5615
|
await o;
|
|
5606
|
-
let s =
|
|
5607
|
-
await s?.startup?.promise, typeof s?.typesetPromise == "function"
|
|
5616
|
+
let s = y();
|
|
5617
|
+
if (await s?.startup?.promise, typeof s?.typesetPromise == "function") {
|
|
5618
|
+
N(s.startup?.document);
|
|
5619
|
+
try {
|
|
5620
|
+
await s.typesetPromise([n]);
|
|
5621
|
+
} catch (e) {
|
|
5622
|
+
throw s.typesetClear?.([n]), e;
|
|
5623
|
+
}
|
|
5624
|
+
v(n);
|
|
5625
|
+
}
|
|
5608
5626
|
};
|
|
5609
5627
|
}
|
|
5610
|
-
var
|
|
5611
|
-
var
|
|
5612
|
-
var
|
|
5613
|
-
var
|
|
5614
|
-
var
|
|
5615
|
-
var
|
|
5616
|
-
function
|
|
5617
|
-
return !!window[
|
|
5628
|
+
var B = "@pie-lib/math-rendering";
|
|
5629
|
+
var V = "@pie-lib/math-rendering@2";
|
|
5630
|
+
var H = "pie-print";
|
|
5631
|
+
var U = 50;
|
|
5632
|
+
var W = 1e4;
|
|
5633
|
+
var G = null;
|
|
5634
|
+
function K() {
|
|
5635
|
+
return !!window[V]?.opts?.useSingleDollar;
|
|
5618
5636
|
}
|
|
5619
|
-
function
|
|
5620
|
-
return
|
|
5637
|
+
function q() {
|
|
5638
|
+
return G || (G = R({ useSingleDollar: K() })), G;
|
|
5621
5639
|
}
|
|
5622
|
-
function
|
|
5640
|
+
function J() {
|
|
5623
5641
|
if (typeof window > "u") return null;
|
|
5624
|
-
let e = window[
|
|
5625
|
-
return typeof e?.renderMath == "function" && e.renderMath !==
|
|
5642
|
+
let e = window[B];
|
|
5643
|
+
return typeof e?.renderMath == "function" && e.renderMath !== Q ? e : null;
|
|
5626
5644
|
}
|
|
5627
|
-
function
|
|
5645
|
+
function Y(e) {
|
|
5628
5646
|
let t = e;
|
|
5629
5647
|
for (; t;) {
|
|
5630
|
-
if (t instanceof Element && t.localName ===
|
|
5648
|
+
if (t instanceof Element && t.localName === H) return t;
|
|
5631
5649
|
t = t instanceof ShadowRoot ? t.host : t.parentNode;
|
|
5632
5650
|
}
|
|
5633
5651
|
return null;
|
|
5634
5652
|
}
|
|
5635
|
-
function
|
|
5653
|
+
function X() {
|
|
5636
5654
|
let e = window.renderMath;
|
|
5637
5655
|
return typeof e == "function" ? e : null;
|
|
5638
5656
|
}
|
|
5639
|
-
async function
|
|
5640
|
-
let t =
|
|
5657
|
+
async function Z(e) {
|
|
5658
|
+
let t = Y(e);
|
|
5641
5659
|
if (!t) return null;
|
|
5642
|
-
let n =
|
|
5660
|
+
let n = X();
|
|
5643
5661
|
if (n || t.mathRenderingModuleUrlImported !== !0) return n;
|
|
5644
|
-
let r = Date.now() +
|
|
5662
|
+
let r = Date.now() + W;
|
|
5645
5663
|
for (; Date.now() < r;) {
|
|
5646
|
-
await new Promise((e) => setTimeout(e,
|
|
5647
|
-
let e =
|
|
5664
|
+
await new Promise((e) => setTimeout(e, U));
|
|
5665
|
+
let e = X();
|
|
5648
5666
|
if (e) return e;
|
|
5649
5667
|
}
|
|
5650
5668
|
return null;
|
|
5651
5669
|
}
|
|
5652
|
-
var
|
|
5670
|
+
var Q = async (e) => {
|
|
5653
5671
|
if (typeof window > "u") return;
|
|
5654
5672
|
let t = typeof e == "string", n;
|
|
5655
5673
|
t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
|
|
5656
|
-
let r =
|
|
5657
|
-
return r ? await r.renderMath?.(n) : i && i !==
|
|
5674
|
+
let r = J(), i = r || t ? null : await Z(n);
|
|
5675
|
+
return r ? await r.renderMath?.(n) : i && i !== Q ? await i(n) : await q()(n), t ? n.innerHTML : void 0;
|
|
5658
5676
|
};
|
|
5659
5677
|
//#endregion
|
|
5660
5678
|
//#region ../../shared/translator/dist/en.js
|
|
@@ -9350,7 +9368,7 @@ function VennClassification($$anchor, $$props) {
|
|
|
9350
9368
|
if (!containerEl) return;
|
|
9351
9369
|
const warn = (err) => console.warn("venn-classification: MathJax render failed", err);
|
|
9352
9370
|
try {
|
|
9353
|
-
Promise.resolve(
|
|
9371
|
+
Promise.resolve(Q(containerEl)).catch(warn);
|
|
9354
9372
|
} catch (err) {
|
|
9355
9373
|
warn(err);
|
|
9356
9374
|
}
|