@pie-element/venn-classification 0.1.1-next.16 → 0.1.1-next.18
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 +36 -12
- package/dist/author/index.js.map +1 -1
- package/dist/browser/{VennClassification-BPq_DgNM.js → VennClassification-F4mRKoc5.js} +163 -142
- package/dist/browser/{VennClassification-BPq_DgNM.js.map → VennClassification-F4mRKoc5.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-BPq_DgNM.js → VennClassification-F4mRKoc5.js} +163 -142
- package/dist/browser/editor-runtime/{VennClassification-BPq_DgNM.js.map → VennClassification-F4mRKoc5.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 +36 -12
- package/dist/delivery/index.js.map +1 -1
- package/dist/index.iife.js +4 -4
- package/package.json +3 -3
package/dist/author/index.js
CHANGED
|
@@ -35299,28 +35299,52 @@ function M(e = {}) {
|
|
|
35299
35299
|
}
|
|
35300
35300
|
var P = "@pie-lib/math-rendering";
|
|
35301
35301
|
var F = "@pie-lib/math-rendering@2";
|
|
35302
|
-
var I =
|
|
35303
|
-
|
|
35302
|
+
var I = "pie-print";
|
|
35303
|
+
var L = 50;
|
|
35304
|
+
var R = 1e4;
|
|
35305
|
+
var z = null;
|
|
35306
|
+
function B() {
|
|
35304
35307
|
return !!window[F]?.opts?.useSingleDollar;
|
|
35305
35308
|
}
|
|
35306
|
-
function
|
|
35307
|
-
return
|
|
35309
|
+
function V() {
|
|
35310
|
+
return z || (z = M({ useSingleDollar: B() })), z;
|
|
35308
35311
|
}
|
|
35309
|
-
function
|
|
35312
|
+
function H() {
|
|
35310
35313
|
if (typeof window > "u") return null;
|
|
35311
35314
|
let e = window[P];
|
|
35312
35315
|
return typeof e?.renderMath == "function" ? e : null;
|
|
35313
35316
|
}
|
|
35314
|
-
function
|
|
35315
|
-
let
|
|
35316
|
-
|
|
35317
|
+
function U(e) {
|
|
35318
|
+
let t = e;
|
|
35319
|
+
for (; t;) {
|
|
35320
|
+
if (t instanceof Element && t.localName === I) return t;
|
|
35321
|
+
t = t instanceof ShadowRoot ? t.host : t.parentNode;
|
|
35322
|
+
}
|
|
35323
|
+
return null;
|
|
35324
|
+
}
|
|
35325
|
+
function W() {
|
|
35326
|
+
let e = window.renderMath;
|
|
35327
|
+
return typeof e == "function" ? e : null;
|
|
35328
|
+
}
|
|
35329
|
+
async function G(e) {
|
|
35330
|
+
let t = U(e);
|
|
35331
|
+
if (!t) return null;
|
|
35332
|
+
let n = W();
|
|
35333
|
+
if (n || t.mathRenderingModuleUrlImported !== !0) return n;
|
|
35334
|
+
let r = Date.now() + R;
|
|
35335
|
+
for (; Date.now() < r;) {
|
|
35336
|
+
await new Promise((e) => setTimeout(e, L));
|
|
35337
|
+
let e = W();
|
|
35338
|
+
if (e) return e;
|
|
35339
|
+
}
|
|
35340
|
+
return null;
|
|
35317
35341
|
}
|
|
35318
|
-
var
|
|
35342
|
+
var K = async (e) => {
|
|
35319
35343
|
if (typeof window > "u") return;
|
|
35320
35344
|
let t = typeof e == "string", n;
|
|
35321
35345
|
t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
|
|
35322
|
-
let r =
|
|
35323
|
-
return r ?
|
|
35346
|
+
let r = H(), i = r || t ? null : await G(n);
|
|
35347
|
+
return r ? await r.renderMath?.(n) : i ? await i(n) : await V()(n), t ? n.innerHTML : void 0;
|
|
35324
35348
|
};
|
|
35325
35349
|
//#endregion
|
|
35326
35350
|
//#region src/delivery/tile-accessible-name.ts
|
|
@@ -36641,7 +36665,7 @@ function VennClassification($$anchor, $$props) {
|
|
|
36641
36665
|
if (!containerEl) return;
|
|
36642
36666
|
const warn = (err) => console.warn("venn-classification: MathJax render failed", err);
|
|
36643
36667
|
try {
|
|
36644
|
-
Promise.resolve(
|
|
36668
|
+
Promise.resolve(K(containerEl)).catch(warn);
|
|
36645
36669
|
} catch (err) {
|
|
36646
36670
|
warn(err);
|
|
36647
36671
|
}
|