@forevka/wordcanvas 0.10.0 → 0.10.1

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.
@@ -30052,7 +30052,12 @@ function dJ() {
30052
30052
  getContext() {
30053
30053
  return new zD();
30054
30054
  }
30055
- }, B.document = { createElement: () => ({ getContext: () => new zD() }), body: null }, OV(new zD());
30055
+ };
30056
+ try {
30057
+ B.document = { createElement: () => ({ getContext: () => new zD() }), body: null };
30058
+ } catch {
30059
+ }
30060
+ OV(new zD());
30056
30061
  })(), iw);
30057
30062
  }
30058
30063
  const XV = /* @__PURE__ */ new Map();
@@ -1,7 +1,7 @@
1
1
  import { B as LM, j as QM, t as yB, q as GF, s as IB, h as CM, u as fg, d as Og, v as QQ, c as YI, w as TF, o as Yg, x as Ag, y as Fw, z as Qg, C as cg, E as mc, F as sE, G as dF, H as iC, I as Dw, J as GE, K as FC, L as eg, e as TE, M as fc, N as rF, O as qC, P as ow, Q as JF, R as dE, S as tw, T as DC, r as $C, U as Uw, V as sw, b as kF, a as YQ, D as nw, W as SF, X as LF, Y as uF, Z as pF, _ as PF, p as VF, $ as mF, a0 as fF, a1 as OF } from "./toc-BIVKqYZ1.js";
2
2
  import { s as wg, a as cI, b as oC, r as EI, d as QI, c as Rw, p as hw, w as KF, e as bF } from "./stylesheet-BZQ2DVSJ.js";
3
3
  import { m as WF, e as XF, d as Oc, a as vI, D as xM, b as EQ, n as $M } from "./lists-BVCy5dMa.js";
4
- import { D as ZF, Z as vF, a as qF, i as uM, m as Nw, b as $F, r as _F, e as AD, f as BD } from "./wordcanvas-Cdfe3Pcz.js";
4
+ import { D as ZF, Z as vF, a as qF, i as uM, m as Nw, b as $F, r as _F, e as AD, f as BD } from "./wordcanvas-B4jNWfw7.js";
5
5
  import { D as Yw, b as yw, a as _B, n as Gg, g as MM, r as tC, c as gD, m as ID, u as MD, d as QD, e as ED, f as cD, T as CD, p as zw, h as eD } from "./parse-B7crTYAa.js";
6
6
  import { c as tQ } from "./engine-Co8wGzPh.js";
7
7
  import { c as cQ } from "./metrics--iKKpmQZ.js";
@@ -7209,7 +7209,7 @@ function yU(A, B, g) {
7209
7209
  }
7210
7210
  let kc = !1;
7211
7211
  const be = (A) => {
7212
- kc || (kc = !0, import("./equationEditor-c-Us7Ls9.js").then(A).catch((B) => console.warn("[wordcanvas] failed to load the equation editor:", B)).finally(() => {
7212
+ kc || (kc = !0, import("./equationEditor-ufes6INd.js").then(A).catch((B) => console.warn("[wordcanvas] failed to load the equation editor:", B)).finally(() => {
7213
7213
  kc = !1;
7214
7214
  }));
7215
7215
  };
@@ -9783,7 +9783,7 @@ const _I = /* @__PURE__ */ new Map();
9783
9783
  function qU() {
9784
9784
  return IM !== void 0 && (clearTimeout(IM), IM = void 0), MI || (MI = new Worker(new URL(
9785
9785
  /* @vite-ignore */
9786
- "" + new URL("assets/worker-BgYN6MEW.js", import.meta.url).href,
9786
+ "" + new URL("assets/worker-Dxt4NQIQ.js", import.meta.url).href,
9787
9787
  import.meta.url
9788
9788
  ), { type: "module" }), MI.onmessage = (A) => {
9789
9789
  const B = A.data, g = _I.get(B.id);
@@ -9887,7 +9887,7 @@ async function Ms(A, B, g, I) {
9887
9887
  const [{ images: M, failedExternal: Q }, E] = await Promise.all([gs(A), Is(g)]);
9888
9888
  let c;
9889
9889
  if (B === "pdf" && As(A)) {
9890
- const { runExportInline: C } = await import("./inlineExport-SN7ZU3G-.js");
9890
+ const { runExportInline: C } = await import("./inlineExport-DmiMGSna.js");
9891
9891
  c = await C(A, B, M, E, I);
9892
9892
  } else
9893
9893
  c = await new Promise((C, i) => {
@@ -12732,7 +12732,7 @@ async function Yn(A) {
12732
12732
  ), HA(Pg, "Equation");
12733
12733
  let UM = !1;
12734
12734
  JA("√x", "Insert equation (MathML)", () => {
12735
- UM || (UM = !0, import("./equationEditor-c-Us7Ls9.js").then(({ showEquationEditor: o }) => {
12735
+ UM || (UM = !0, import("./equationEditor-ufes6INd.js").then(({ showEquationEditor: o }) => {
12736
12736
  E.signal.aborted || o({
12737
12737
  onApply: (S) => {
12738
12738
  h.dispatch(S.display ? xi(S) : ji(S)), h.focus();
@@ -12748,7 +12748,7 @@ async function Yn(A) {
12748
12748
  qg.close();
12749
12749
  return;
12750
12750
  }
12751
- sM || (sM = !0, import("./symbolPicker-C-R52Yhe.js").then(({ showSymbolPicker: o }) => {
12751
+ sM || (sM = !0, import("./symbolPicker-CC3eVi98.js").then(({ showSymbolPicker: o }) => {
12752
12752
  E.signal.aborted || qg || (qg = o({
12753
12753
  onPick: (S, G) => {
12754
12754
  h.dispatch(Ti(S, G)), h.focus();
@@ -13689,7 +13689,7 @@ async function Yn(A) {
13689
13689
  }
13690
13690
  if (A.onLoadProgress?.({ phase: "ready", percent: 1, loaded: 0, total: 0 }), A.onReady?.(CB), A.onEvent?.({ type: "ready" }), A.agentTools) {
13691
13691
  const u = typeof A.agentTools == "object" ? A.agentTools : {};
13692
- Promise.all([import("./index-CQ02t09d.js"), import("./webmcp-C8oRoce-.js")]).then(([cA, d]) => {
13692
+ Promise.all([import("./index-CQ02t09d.js"), import("./webmcp-CnuYu6Wt.js")]).then(([cA, d]) => {
13693
13693
  cA.initializeWebModelContext(), RA = d.registerAgentTools(
13694
13694
  h,
13695
13695
  { docId: () => t, setDocument: jA },
@@ -1,10 +1,10 @@
1
1
  import { M as Q } from "./paintStyle-BldhHuSV.js";
2
- import { i as ee, m as te } from "./wordcanvas-Cdfe3Pcz.js";
2
+ import { i as ee, m as te } from "./wordcanvas-B4jNWfw7.js";
3
3
  import { p as j } from "./parse-B7crTYAa.js";
4
4
  import { e as i, a as $ } from "./xmlWrite-DxSDwuaP.js";
5
5
  import { G as re, O as oe, B as ae, A as ne, l as D } from "./latex-Bw2eoY11.js";
6
6
  import { e as ie } from "./engine-Co8wGzPh.js";
7
- import { p as ce } from "./editorApp-jD0dvds5.js";
7
+ import { p as ce } from "./editorApp-Ct42Dpp1.js";
8
8
  const se = "http://www.w3.org/1998/Math/MathML";
9
9
  function Z(e) {
10
10
  return i(
@@ -1,5 +1,5 @@
1
- import { r as x } from "./pipeline-DA8bAWrd.js";
2
- import "./measureHost-BPFmyrlK.js";
1
+ import { r as x } from "./pipeline-BxTfzdGp.js";
2
+ import "./measureHost-CIzjksid.js";
3
3
  import "./paintStyle-BldhHuSV.js";
4
4
  import "./engine-Co8wGzPh.js";
5
5
  import "./recalcToc-C0QoMNY9.js";
@@ -1,4 +1,4 @@
1
- import { p as i, r as p } from "./pipeline-DA8bAWrd.js";
1
+ import { p as i, r as p } from "./pipeline-BxTfzdGp.js";
2
2
  import { B as t } from "./index-DEq3oXQF.js";
3
3
  const o = globalThis;
4
4
  typeof o.process > "u" && (o.process = i);
@@ -1,6 +1,6 @@
1
1
  import "./TimesNewRoman-Regular-CzIPDuw5.js";
2
2
  import "./metrics--iKKpmQZ.js";
3
- import { i as p } from "./measureHost-BPFmyrlK.js";
3
+ import { i as p } from "./measureHost-CIzjksid.js";
4
4
  import "./paintStyle-BldhHuSV.js";
5
5
  export {
6
6
  p as installMeasureHost
@@ -14660,7 +14660,12 @@ function p2() {
14660
14660
  getContext() {
14661
14661
  return new Gr();
14662
14662
  }
14663
- }, i.document = { createElement: () => ({ getContext: () => new Gr() }), body: null }, pi(new Gr());
14663
+ };
14664
+ try {
14665
+ i.document = { createElement: () => ({ getContext: () => new Gr() }), body: null };
14666
+ } catch {
14667
+ }
14668
+ pi(new Gr());
14664
14669
  })(), E0);
14665
14670
  }
14666
14671
  export {
@@ -1,5 +1,5 @@
1
1
  import { a as $e } from "./index-DEq3oXQF.js";
2
- import { c as Rt, g as kr, a as nc, $ as ic, b as Ba, r as Uf, d as zf, i as qf, e as Ma, s as ac } from "./measureHost-BPFmyrlK.js";
2
+ import { c as Rt, g as kr, a as nc, $ as ic, b as Ba, r as Uf, d as zf, i as qf, e as Ma, s as ac } from "./measureHost-CIzjksid.js";
3
3
  import { _ as oc, f as nt } from "./__vite-browser-external-BYRIRx8p.js";
4
4
  import { a as sc, k as fc, t as lc, p as cc, l as uc } from "./toc-BIVKqYZ1.js";
5
5
  import { p as La, g as hc, n as Da, h as Na, T as dc, i as ja, l as pc, j as gc, I as xc, D as yc, t as Ua, k as ta, U as za, s as qa, r as mc, Z as bc, w as wc, m as vc, v as _c, x as Sc, M as Ec, y as Ac, u as Tc, z as Pc, B as Rc, o as Rr, V as $f, q as Cc, a as Oc, b as Fc, e as Ic, $ as Wf, H as kc, A as Bc, C as Mc } from "./paintStyle-BldhHuSV.js";
@@ -1,4 +1,4 @@
1
- import { i as L, m as R } from "./wordcanvas-Cdfe3Pcz.js";
1
+ import { i as L, m as R } from "./wordcanvas-B4jNWfw7.js";
2
2
  const z = ["Symbol", "Wingdings", "Wingdings 2", "Wingdings 3", "Webdings"], F = 61472, P = 61695, k = "cw-symbol-recent", N = 16, T = `
3
3
  .cw-symp{position:fixed;z-index:1002;width:360px;max-width:94vw;background:#fff;border:1px solid #d0d5dd;border-radius:10px;box-shadow:0 12px 40px rgba(0,0,0,.22);font:13px/1.4 system-ui,sans-serif;color:#1a1a2e;display:flex;flex-direction:column;overflow:hidden;}
4
4
  .cw-symp-head{display:flex;align-items:center;gap:6px;padding:9px 12px;background:#f5f7fa;border-bottom:1px solid #e6e9ee;font-weight:600;}
@@ -332,7 +332,7 @@ function U(e, o = {}, s = {}) {
332
332
  if (i && e.search(i).total === 0)
333
333
  return e.searchClear(), f(`text not found: ${i}`);
334
334
  if (!e.getSelection()) return f("no selection (pass 'find' or select_range first)");
335
- const { insertText: l } = await import("./editorApp-jD0dvds5.js").then((h) => h.c);
335
+ const { insertText: l } = await import("./editorApp-Ct42Dpp1.js").then((h) => h.c);
336
336
  return e.dispatch(l(n)), i && e.searchClear(), g("inserted");
337
337
  }
338
338
  }), d({
@@ -630,7 +630,7 @@ class Z {
630
630
  },
631
631
  onEvent: (r) => this.emit(r)
632
632
  };
633
- e.onLoadProgress?.({ phase: "bundle", percent: 0, loaded: 0, total: 0 }), import("./editorApp-jD0dvds5.js").then((r) => r.e).then((r) => (e.onLoadProgress?.({ phase: "bundle", percent: p, loaded: 0, total: 0 }), r.mountEditorApp(i)));
633
+ e.onLoadProgress?.({ phase: "bundle", percent: 0, loaded: 0, total: 0 }), import("./editorApp-Ct42Dpp1.js").then((r) => r.e).then((r) => (e.onLoadProgress?.({ phase: "bundle", percent: p, loaded: 0, total: 0 }), r.mountEditorApp(i)));
634
634
  });
635
635
  }
636
636
  /** Subscribe to a collaboration event. Returns an unsubscribe function. */
@@ -1,4 +1,4 @@
1
- import { W as e, d as o, m as s } from "./wordcanvas-Cdfe3Pcz.js";
1
+ import { W as e, d as o, m as s } from "./wordcanvas-B4jNWfw7.js";
2
2
  import { r as t } from "./blockRegistry-CGgu7-f7.js";
3
3
  export {
4
4
  e as WordCanvas,
@@ -141000,7 +141000,10 @@ function installMeasureHost() {
141000
141000
  return new FontkitMeasureContext();
141001
141001
  }
141002
141002
  };
141003
- g.document = { createElement: () => ({ getContext: () => new FontkitMeasureContext() }), body: null };
141003
+ try {
141004
+ g.document = { createElement: () => ({ getContext: () => new FontkitMeasureContext() }), body: null };
141005
+ } catch {
141006
+ }
141004
141007
  setMeasureContext(new FontkitMeasureContext());
141005
141008
  })();
141006
141009
  return installPromise;
@@ -141022,4 +141025,4 @@ export {
141022
141025
  segmentByFace,
141023
141026
  installMeasureHost
141024
141027
  };
141025
- //# sourceMappingURL=chunk-KZD72U5U.js.map
141028
+ //# sourceMappingURL=chunk-COPJYE3M.js.map