@pie-element/shared-math-rendering-mathjax 0.1.1-next.5 → 0.1.1-next.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/index.js CHANGED
@@ -187,17 +187,13 @@ function z() {
187
187
  let e = window[P];
188
188
  return typeof e?.renderMath == "function" ? e : null;
189
189
  }
190
- function B() {
191
- let e = i();
192
- e && r("legacy-renderer-delegation", `window['${P}'] renders this element's math with MathJax ${e}`);
193
- }
194
- var V = async (e) => {
190
+ var B = async (e) => {
195
191
  if (typeof window > "u") return;
196
192
  let t = typeof e == "string", n;
197
193
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
198
194
  let r = z();
199
- return r ? (B(), await r.renderMath?.(n)) : await R()(n), t ? n.innerHTML : void 0;
200
- }, H = (e) => z()?.wrapMath?.(e) ?? e, U = (e) => {
195
+ return r ? await r.renderMath?.(n) : await R()(n), t ? n.innerHTML : void 0;
196
+ }, V = (e) => z()?.wrapMath?.(e) ?? e, H = (e) => {
201
197
  let t = e.trim();
202
198
  return t.startsWith("\\[") && t.endsWith("\\]") ? {
203
199
  unwrapped: t.slice(2, -2).trim(),
@@ -224,6 +220,6 @@ var V = async (e) => {
224
220
  close: "$"
225
221
  }
226
222
  } : { unwrapped: t };
227
- }, W = (e) => z()?.mmlToLatex?.(e) ?? e;
223
+ }, U = (e) => z()?.mmlToLatex?.(e) ?? e;
228
224
  //#endregion
229
- export { t as MATHJAX_CONFLICT_EVENT, e as UNSUPPORTED_PAGE_DOCS_URL, M as createMathjaxRenderer, N as getMathjaxCssUrls, W as mmlToLatex, V as renderMath, U as unWrapMath, H as wrapMath };
225
+ export { t as MATHJAX_CONFLICT_EVENT, e as UNSUPPORTED_PAGE_DOCS_URL, M as createMathjaxRenderer, N as getMathjaxCssUrls, U as mmlToLatex, B as renderMath, H as unWrapMath, V as wrapMath };
@@ -13,9 +13,7 @@ export type MathjaxConflictCondition =
13
13
  /** `window.MathJax` is a MathJax 3 build. */
14
14
  'mathjax-3-global'
15
15
  /** Another MathJax output stylesheet was added to `<head>` beside this adapter's. */
16
- | 'foreign-output-stylesheet'
17
- /** `window['@pie-lib/math-rendering']` routes ESM element math to MathJax 3. */
18
- | 'legacy-renderer-delegation';
16
+ | 'foreign-output-stylesheet';
19
17
  export interface MathjaxConflictDetail {
20
18
  condition: MathjaxConflictCondition;
21
19
  message: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/shared-math-rendering-mathjax",
3
- "version": "0.1.1-next.5",
3
+ "version": "0.1.1-next.6",
4
4
  "description": "MathJax adapter for PIE math rendering",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",