@pie-element/venn-classification 0.1.1-next.11 → 0.1.1-next.13

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.
@@ -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-CijQL7Lf.js";
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-D7bxMPcn.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";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../VennClassification-CijQL7Lf.js";
1
+ import { t as e } from "../VennClassification-D7bxMPcn.js";
2
2
  import { c as t } from "../controller-bkBJ6-j1.js";
3
3
  //#region ../../lib-svelte/delivery-events/dist/index2.js
4
4
  function n(e) {
@@ -5412,85 +5412,131 @@ 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 = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
5416
- function t$3(t) {
5417
- if (typeof window > "u" || window.MathJax?.typesetPromise) return Promise.resolve();
5418
- let n = globalThis, r = n[e$3];
5419
- if (r) return r;
5420
- let i = new Promise((e, n) => {
5421
- let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = t, s = {
5422
- loader: { load: i ? ["a11y/assistive-mml"] : [] },
5423
- tex: {
5424
- packages: [
5425
- "base",
5426
- "ams",
5427
- "autoload"
5428
- ],
5429
- macros: {
5430
- parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
5431
- overarc: "\\overparen",
5432
- napprox: "\\not\\approx",
5433
- longdiv: "\\enclose{longdiv}"
5434
- }
5435
- },
5436
- options: {
5437
- enableMenu: i,
5438
- enableExplorer: i,
5439
- enableAssistiveMml: i
5415
+ var e$3 = {
5416
+ parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
5417
+ overarc: "\\overparen",
5418
+ napprox: "\\not\\approx",
5419
+ longdiv: "\\enclose{longdiv}",
5420
+ abs: ["\\left|#1\\right|", 1]
5421
+ };
5422
+ var t$3 = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)";
5423
+ var n = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/;
5424
+ var r$2 = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/;
5425
+ var i = /\\embed\{newLine\}\[\]/g;
5426
+ var a = [
5427
+ ["$$", "$$"],
5428
+ ["$", "$"],
5429
+ ["\\[", "\\]"],
5430
+ ["\\(", "\\)"]
5431
+ ];
5432
+ var o = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
5433
+ function s$1() {
5434
+ return window.MathJax;
5435
+ }
5436
+ function c$1(e) {
5437
+ let t = e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e;
5438
+ for (let [e, n] of a) if (t.startsWith(e) && t.endsWith(n)) return t.substring(e.length, t.length - n.length);
5439
+ return t;
5440
+ }
5441
+ function l(e) {
5442
+ for (let t of e.querySelectorAll("[data-latex]")) {
5443
+ if (t.dataset.mathHandled || t.closest("mjx-container")) continue;
5444
+ let e = t.textContent;
5445
+ e && (t.textContent = `\\(${c$1(e)}\\)`.replace(i, "\\newline "), t.dataset.mathHandled = "true");
5446
+ }
5447
+ }
5448
+ function u(e, t) {
5449
+ for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
5450
+ return (t ? r$2 : n).test(e.textContent ?? "");
5451
+ }
5452
+ function d(n) {
5453
+ return new Promise((r, i) => {
5454
+ let { useSingleDollar: a = !1, accessibility: o = !0, loadFonts: c = !0, srcUrl: l } = n, u = {
5455
+ loader: {
5456
+ load: o ? ["a11y/assistive-mml"] : [],
5457
+ failed: (e) => i(e)
5440
5458
  },
5441
5459
  startup: {
5460
+ typeset: !1,
5442
5461
  ready: () => {
5443
- window.MathJax?.startup.defaultReady && (window.MathJax.startup.defaultReady(), e());
5444
- },
5445
- defaultReady: () => {}
5462
+ let e = s$1()?.startup;
5463
+ e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => r(), i);
5464
+ }
5465
+ },
5466
+ tex: { macros: { ...e$3 } },
5467
+ options: {
5468
+ enableMenu: o,
5469
+ menuOptions: { settings: {
5470
+ assistiveMml: o,
5471
+ enrich: !1,
5472
+ inTabOrder: !1
5473
+ } }
5446
5474
  }
5447
5475
  };
5448
- r && s.tex && (s.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], s.tex.processEscapes = !0), a || (s.chtml = { fontURL: "" }), window.MathJax = s;
5449
- let c = document.createElement("script");
5450
- c.src = o || "https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js", c.async = !0, c.onload = () => {
5451
- setTimeout(e, 100);
5452
- }, c.onerror = () => {
5453
- n(/* @__PURE__ */ Error("Failed to load MathJax"));
5454
- }, document.head.appendChild(c);
5476
+ a && u.tex && (console.warn(t$3), u.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], u.tex.processEscapes = !0), c || (u.chtml = { fontURL: "" }), window.MathJax = u;
5477
+ let d = document.createElement("script");
5478
+ d.src = l || "https://cdn.jsdelivr.net/npm/mathjax@4.1.3/tex-mml-chtml.js", d.async = !0, d.onerror = () => i(/* @__PURE__ */ Error("Failed to load MathJax")), document.head.appendChild(d);
5455
5479
  });
5456
- return n[e$3] = i, i;
5457
5480
  }
5458
- function n() {
5459
- let e = window.MathJax?.startup?.document;
5460
- if (typeof e?.assistiveMml == "function") try {
5461
- e.assistiveMml().updateDocument?.();
5462
- } catch (e) {
5463
- console.warn("[mathjax-renderer] Failed to attach assistive MathML:", e);
5464
- }
5481
+ function f(e) {
5482
+ return new Promise((t, n) => {
5483
+ let r = e.startup ?? {};
5484
+ e.startup = r;
5485
+ let i = r.ready;
5486
+ r.ready = () => {
5487
+ let e = s$1()?.startup;
5488
+ i ? i.call(r) : e?.defaultReady?.(), Promise.resolve(e?.promise).then(() => t(), n);
5489
+ };
5490
+ });
5491
+ }
5492
+ function p(e) {
5493
+ let t = s$1();
5494
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : f(t) : d(e);
5495
+ }
5496
+ function m(e) {
5497
+ return p(e).then(() => {
5498
+ typeof s$1()?.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
5499
+ });
5465
5500
  }
5466
- function r$2(e = {}) {
5467
- return async (r) => {
5468
- if (await t$3(e), !window.MathJax?.typesetPromise) {
5469
- console.warn("[mathjax-renderer] MathJax not loaded or missing typesetPromise.");
5501
+ function h(e) {
5502
+ let t = globalThis, n = t[o];
5503
+ return n || (n = m(e), t[o] = n), n;
5504
+ }
5505
+ function g(e = {}) {
5506
+ let t = e.useSingleDollar ?? !1;
5507
+ return async (n) => {
5508
+ if (typeof window > "u") return;
5509
+ l(n);
5510
+ let r = h(e);
5511
+ if (!u(n, t)) {
5512
+ r.catch(() => {});
5470
5513
  return;
5471
5514
  }
5472
- await window.MathJax.typesetPromise([r]), n();
5515
+ await r;
5516
+ let i = s$1();
5517
+ await i?.startup?.promise, typeof i?.typesetPromise == "function" && await i.typesetPromise([n]);
5473
5518
  };
5474
5519
  }
5475
- var a = "@pie-lib/math-rendering";
5476
- var o = null;
5477
- function s$1() {
5478
- return o || (o = r$2({
5479
- accessibility: !0,
5480
- useSingleDollar: !0
5481
- })), o;
5520
+ var v = "@pie-lib/math-rendering";
5521
+ var y = "@pie-lib/math-rendering@2";
5522
+ var b = null;
5523
+ function x() {
5524
+ return !!window[y]?.opts?.useSingleDollar;
5525
+ }
5526
+ function S() {
5527
+ return b || (b = g({ useSingleDollar: x() })), b;
5482
5528
  }
5483
- function c$1() {
5529
+ function C() {
5484
5530
  if (typeof window > "u") return null;
5485
- let e = window[a];
5531
+ let e = window[v];
5486
5532
  return typeof e?.renderMath == "function" ? e : null;
5487
5533
  }
5488
- var l = async (e) => {
5534
+ var w = async (e) => {
5489
5535
  if (typeof window > "u") return;
5490
5536
  let t = typeof e == "string", n;
5491
5537
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
5492
- let r = c$1();
5493
- return r ? await r.renderMath?.(n) : await s$1()(n), t ? n.innerHTML : void 0;
5538
+ let r = C();
5539
+ return r ? await r.renderMath?.(n) : await S()(n), t ? n.innerHTML : void 0;
5494
5540
  };
5495
5541
  //#endregion
5496
5542
  //#region ../../shared/translator/dist/en.js
@@ -9186,7 +9232,7 @@ function VennClassification($$anchor, $$props) {
9186
9232
  if (!containerEl) return;
9187
9233
  const warn = (err) => console.warn("venn-classification: MathJax render failed", err);
9188
9234
  try {
9189
- Promise.resolve(l(containerEl)).catch(warn);
9235
+ Promise.resolve(w(containerEl)).catch(warn);
9190
9236
  } catch (err) {
9191
9237
  warn(err);
9192
9238
  }