mx-ui-components-pkg 0.0.717-alpha.145 → 0.0.717-alpha.146

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 { m as et } from "./index-Drw5Ep0-.js";
1
+ import { m as et } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as f } from "./index-Drw5Ep0-.js";
1
+ import { m as f } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-Drw5Ep0-.js";
1
+ import { m as l } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-Drw5Ep0-.js";
1
+ import { m as s } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as lt } from "./index-Drw5Ep0-.js";
1
+ import { m as lt } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -26579,7 +26579,7 @@ function(i) {
26579
26579
  var c = l.getContext("2d");
26580
26580
  c.fillStyle = "#fff", c.fillRect(0, 0, l.width, l.height);
26581
26581
  var u = { ignoreMouse: !0, ignoreAnimation: !0, ignoreDimensions: !0 }, d = this;
26582
- return (uo.canvg ? Promise.resolve(uo.canvg) : import("./index.es-orfhTK3l.js")).catch(function(h) {
26582
+ return (uo.canvg ? Promise.resolve(uo.canvg) : import("./index.es-CzA-7vO3.js")).catch(function(h) {
26583
26583
  return Promise.reject(new Error("Could not load canvg: " + h));
26584
26584
  }).then(function(h) {
26585
26585
  return h.default ? h.default : h;
@@ -145828,13 +145828,14 @@ class Q0n extends si {
145828
145828
  const a = !this.isEditableMode || !!s;
145829
145829
  o.disabled = a, o.tabIndex = a ? -1 : 0, o.className = `
145830
145830
  rounded p-1
145831
- ${a ? "opacity-40 cursor-not-allowed" : "hover:bg-black hover:text-white"}
145831
+ ${a ? "opacity-40 cursor-not-allowed" : "hover:bg-gray-200"}
145832
145832
  `, a || (o.onclick = n);
145833
145833
  const l = document.createElement("img");
145834
145834
  return l.src = r, l.alt = t, o.appendChild(l), o;
145835
145835
  }
145836
145836
  createFontSizeView(t) {
145837
145837
  let n = document.createElement("div");
145838
+ n.className = "mt-0";
145838
145839
  const r = () => {
145839
145840
  if (!this.isEditableMode) return;
145840
145841
  let d = document.getElementById("font-size");
@@ -145845,11 +145846,11 @@ class Q0n extends si {
145845
145846
  this.isEditableMode && (this.fontSize++, r());
145846
145847
  };
145847
145848
  let a = document.createElement("div");
145848
- a.className = "flex flex-row items-center gap-0.5";
145849
+ a.className = "flex flex-row items-center gap-0.5 mt-0";
145849
145850
  let l = document.createElement("button");
145850
145851
  l.className = "p-1 size-8 rounded hover:bg-gray-200 transition", l.textContent = "-", l.addEventListener("click", () => s()), a.appendChild(l);
145851
145852
  let c = document.createElement("div");
145852
- c.id = "font-size", c.className = "bg-gray-50 rounded py-1 px-3 gap-2 text-lg", c.textContent = this.fontSize + "", a.appendChild(c);
145853
+ c.id = "font-size", c.className = "bg-gray-50 rounded py-1 px-3 gap-2 text-lg mt-0 items-center", c.textContent = this.fontSize + "", a.appendChild(c);
145853
145854
  let u = document.createElement("button");
145854
145855
  return u.className = "p-1 size-8 rounded hover:bg-gray-200 transition", u.textContent = "+", u.addEventListener("click", () => o()), a.appendChild(u), n.appendChild(a), n;
145855
145856
  }
@@ -145862,7 +145863,7 @@ class Q0n extends si {
145862
145863
  }
145863
145864
  createDitaToolbarView() {
145864
145865
  let t = document.createElement("div");
145865
- t.className = "flex items-center justify-between w-full p-2 ", this.ditaActions.forEach((n) => {
145866
+ t.className = "flex items-center justify-between w-full p-2 mt-2", this.ditaActions.forEach((n) => {
145866
145867
  if (n.name === "line")
145867
145868
  t.appendChild(this.addDividerLineView());
145868
145869
  else if (n.name === "fontSize") {
@@ -146004,7 +146005,7 @@ class Q0n extends si {
146004
146005
  // Height of each page in pixels
146005
146006
  pageGap: 40,
146006
146007
  // Gap between pages in pixels
146007
- pageBreakBackground: "#dbeafe",
146008
+ pageBreakBackground: "#f3f3f3",
146008
146009
  // Background color for page gaps
146009
146010
  pageHeaderHeight: 50,
146010
146011
  // Height of page header/footer in pixels
@@ -146712,7 +146713,7 @@ class Q0n extends si {
146712
146713
  const n = this.createDitaBuilderView(t);
146713
146714
  this.createDitaToolbarView();
146714
146715
  let r = document.createElement("div");
146715
- r.setAttribute("id", this.props.id), r.className = "dita_builder w-full h-[80vh] p-10 bg-blue-100 overflow-auto", r.append(n), this.appendChild(r), this.bindSearchEvents();
146716
+ r.setAttribute("id", this.props.id), r.className = "dita_builder w-full h-[80vh] p-10 bg-gray-100 overflow-auto", r.append(n), this.appendChild(r), this.bindSearchEvents();
146716
146717
  }
146717
146718
  }
146718
146719
  customElements.define("mobius-wysiwyg-editor", Q0n);
@@ -273566,37 +273567,37 @@ Hi({
273566
273567
  id: "freemarker2",
273567
273568
  extensions: [".ftl", ".ftlh", ".ftlx"],
273568
273569
  aliases: ["FreeMarker2", "Apache FreeMarker2"],
273569
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagAutoInterpolationDollar)
273570
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagAutoInterpolationDollar)
273570
273571
  });
273571
273572
  Hi({
273572
273573
  id: "freemarker2.tag-angle.interpolation-dollar",
273573
273574
  aliases: ["FreeMarker2 (Angle/Dollar)", "Apache FreeMarker2 (Angle/Dollar)"],
273574
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagAngleInterpolationDollar)
273575
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagAngleInterpolationDollar)
273575
273576
  });
273576
273577
  Hi({
273577
273578
  id: "freemarker2.tag-bracket.interpolation-dollar",
273578
273579
  aliases: ["FreeMarker2 (Bracket/Dollar)", "Apache FreeMarker2 (Bracket/Dollar)"],
273579
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagBracketInterpolationDollar)
273580
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagBracketInterpolationDollar)
273580
273581
  });
273581
273582
  Hi({
273582
273583
  id: "freemarker2.tag-angle.interpolation-bracket",
273583
273584
  aliases: ["FreeMarker2 (Angle/Bracket)", "Apache FreeMarker2 (Angle/Bracket)"],
273584
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagAngleInterpolationBracket)
273585
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagAngleInterpolationBracket)
273585
273586
  });
273586
273587
  Hi({
273587
273588
  id: "freemarker2.tag-bracket.interpolation-bracket",
273588
273589
  aliases: ["FreeMarker2 (Bracket/Bracket)", "Apache FreeMarker2 (Bracket/Bracket)"],
273589
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagBracketInterpolationBracket)
273590
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagBracketInterpolationBracket)
273590
273591
  });
273591
273592
  Hi({
273592
273593
  id: "freemarker2.tag-auto.interpolation-dollar",
273593
273594
  aliases: ["FreeMarker2 (Auto/Dollar)", "Apache FreeMarker2 (Auto/Dollar)"],
273594
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagAutoInterpolationDollar)
273595
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagAutoInterpolationDollar)
273595
273596
  });
273596
273597
  Hi({
273597
273598
  id: "freemarker2.tag-auto.interpolation-bracket",
273598
273599
  aliases: ["FreeMarker2 (Auto/Bracket)", "Apache FreeMarker2 (Auto/Bracket)"],
273599
- loader: () => import("./freemarker2-BJT9Ffe_.js").then((i) => i.TagAutoInterpolationBracket)
273600
+ loader: () => import("./freemarker2-DDmM_C6t.js").then((i) => i.TagAutoInterpolationBracket)
273600
273601
  });
273601
273602
  /*!-----------------------------------------------------------------------------
273602
273603
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -273634,7 +273635,7 @@ Hi({
273634
273635
  extensions: [".handlebars", ".hbs"],
273635
273636
  aliases: ["Handlebars", "handlebars", "hbs"],
273636
273637
  mimetypes: ["text/x-handlebars-template"],
273637
- loader: () => import("./handlebars-z8PoG7_r.js")
273638
+ loader: () => import("./handlebars-cUyEfxBW.js")
273638
273639
  });
273639
273640
  /*!-----------------------------------------------------------------------------
273640
273641
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -273659,7 +273660,7 @@ Hi({
273659
273660
  extensions: [".html", ".htm", ".shtml", ".xhtml", ".mdoc", ".jsp", ".asp", ".aspx", ".jshtm"],
273660
273661
  aliases: ["HTML", "htm", "html", "xhtml"],
273661
273662
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
273662
- loader: () => import("./html-jPhDD2Ng.js")
273663
+ loader: () => import("./html-QDieEqlS.js")
273663
273664
  });
273664
273665
  /*!-----------------------------------------------------------------------------
273665
273666
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -273700,7 +273701,7 @@ Hi({
273700
273701
  filenames: ["jakefile"],
273701
273702
  aliases: ["JavaScript", "javascript", "js"],
273702
273703
  mimetypes: ["text/javascript"],
273703
- loader: () => import("./javascript-CyICWs2y.js")
273704
+ loader: () => import("./javascript-CaPRob7H.js")
273704
273705
  });
273705
273706
  /*!-----------------------------------------------------------------------------
273706
273707
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -273775,7 +273776,7 @@ Hi({
273775
273776
  extensions: [".liquid", ".html.liquid"],
273776
273777
  aliases: ["Liquid", "liquid"],
273777
273778
  mimetypes: ["application/liquid"],
273778
- loader: () => import("./liquid-CMgT7dRL.js")
273779
+ loader: () => import("./liquid-jagi3a6n.js")
273779
273780
  });
273780
273781
  /*!-----------------------------------------------------------------------------
273781
273782
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -273811,7 +273812,7 @@ Hi({
273811
273812
  id: "mdx",
273812
273813
  extensions: [".mdx"],
273813
273814
  aliases: ["MDX", "mdx"],
273814
- loader: () => import("./mdx-DiJ-ycmQ.js")
273815
+ loader: () => import("./mdx-CglWxe7X.js")
273815
273816
  });
273816
273817
  /*!-----------------------------------------------------------------------------
273817
273818
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -274006,7 +274007,7 @@ Hi({
274006
274007
  extensions: [".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi"],
274007
274008
  aliases: ["Python", "py"],
274008
274009
  firstLine: "^#!/.*\\bpython[0-9.-]*\\b",
274009
- loader: () => import("./python-M5E1_7SM.js")
274010
+ loader: () => import("./python-BIUizIgm.js")
274010
274011
  });
274011
274012
  /*!-----------------------------------------------------------------------------
274012
274013
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -274043,7 +274044,7 @@ Hi({
274043
274044
  extensions: [".cshtml"],
274044
274045
  aliases: ["Razor", "razor"],
274045
274046
  mimetypes: ["text/x-cshtml"],
274046
- loader: () => import("./razor-CePYJljZ.js")
274047
+ loader: () => import("./razor-Bmr0rfvf.js")
274047
274048
  });
274048
274049
  /*!-----------------------------------------------------------------------------
274049
274050
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -274295,7 +274296,7 @@ Hi({
274295
274296
  extensions: [".ts", ".tsx", ".cts", ".mts"],
274296
274297
  aliases: ["TypeScript", "ts", "typescript"],
274297
274298
  mimetypes: ["text/typescript"],
274298
- loader: () => import("./typescript-jPBlF_n0.js")
274299
+ loader: () => import("./typescript-_U26e8KM.js")
274299
274300
  });
274300
274301
  /*!-----------------------------------------------------------------------------
274301
274302
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -274363,7 +274364,7 @@ Hi({
274363
274364
  firstLine: "(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",
274364
274365
  aliases: ["XML", "xml"],
274365
274366
  mimetypes: ["text/xml", "application/xml", "application/xaml+xml", "application/xml-dtd"],
274366
- loader: () => import("./xml-ZUbUsB32.js")
274367
+ loader: () => import("./xml-BjkH3HlS.js")
274367
274368
  });
274368
274369
  /*!-----------------------------------------------------------------------------
274369
274370
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -274376,7 +274377,7 @@ Hi({
274376
274377
  extensions: [".yaml", ".yml"],
274377
274378
  aliases: ["YAML", "yaml", "YML", "yml"],
274378
274379
  mimetypes: ["application/x-yaml", "text/x-yaml"],
274379
- loader: () => import("./yaml-Hk93COx-.js")
274380
+ loader: () => import("./yaml-DydUOA1I.js")
274380
274381
  });
274381
274382
  /*!-----------------------------------------------------------------------------
274382
274383
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -274479,7 +274480,7 @@ var i6e = class {
274479
274480
  );
274480
274481
  e9.languages.css = { cssDefaults: eDt, lessDefaults: nDt, scssDefaults: tDt };
274481
274482
  function o6e() {
274482
- return import("./cssMode-CZiZsCYU.js");
274483
+ return import("./cssMode-DMylcmm0.js");
274483
274484
  }
274484
274485
  e9.languages.onLanguage("less", () => {
274485
274486
  o6e().then((i) => i.setupMode(nDt));
@@ -274585,7 +274586,7 @@ zde.languages.html = {
274585
274586
  registerHTMLLanguageService: Qde
274586
274587
  };
274587
274588
  function hri() {
274588
- return import("./htmlMode-Bp5woG9v.js");
274589
+ return import("./htmlMode-BRvknRnY.js");
274589
274590
  }
274590
274591
  function Qde(i, e = Gde, t = qde(i)) {
274591
274592
  const n = new ari(i, e, t);
@@ -274662,7 +274663,7 @@ var _ri = class {
274662
274663
  ), wri = () => aDt().then((i) => i.getWorker());
274663
274664
  T$.languages.json = { jsonDefaults: oDt, getWorker: wri };
274664
274665
  function aDt() {
274665
- return import("./jsonMode-DRG5vMSC.js");
274666
+ return import("./jsonMode-BzXlbCd_.js");
274666
274667
  }
274667
274668
  T$.languages.register({
274668
274669
  id: "json",
@@ -274826,7 +274827,7 @@ L6.languages.typescript = {
274826
274827
  getJavaScriptWorker: Nri
274827
274828
  };
274828
274829
  function $de() {
274829
- return import("./tsMode-nFizhvnI.js");
274830
+ return import("./tsMode-DOG8wi4m.js");
274830
274831
  }
274831
274832
  L6.languages.onLanguage("typescript", () => $de().then((i) => i.setupTypeScript(gDt)));
274832
274833
  L6.languages.onLanguage("javascript", () => $de().then((i) => i.setupJavaScript(mDt)));
@@ -365902,7 +365903,7 @@ class ehr extends si {
365902
365903
  }
365903
365904
 
365904
365905
  .page {
365905
- width: 98%;
365906
+ width: 95%;
365906
365907
  height: ${c};
365907
365908
  min-height: 90%;
365908
365909
  background: #fff;
@@ -1,4 +1,4 @@
1
- import { c as Qe, _ as za, g as Io } from "./index-Drw5Ep0-.js";
1
+ import { c as Qe, _ as za, g as Io } from "./index-CTyIxRKV.js";
2
2
  var ht = function(a) {
3
3
  return a && a.Math === Math && a;
4
4
  }, _ = (
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ag as o, aV as e, N as i, aq as t, bl as r, bI as b, au as n, p as u, q as d, bj as C, B as M, Q as m, j as l, l as p, aa as c, be as g, K as h, bh as D, x as y, a6 as A, bA as B, aZ as T, a_ as w, bZ as I, b9 as S, aW as P, aX as F, bB as R, b5 as k, aC as x, b7 as v, aG as H, aE as L, aF as f, bb as E, ba as G, bc as N, bC as O, bE as V, bX as W, C as U, bL as q, V as z, bn as J, ar as K, b3 as X, bR as j, aS as Q, bS as Y, E as Z, ac as $, aT as _, F as aa, bs as sa, bG as oa, b2 as ea, X as ia, Y as ta, Z as ra, $ as ba, a0 as na, a1 as ua, bt as da, a2 as Ca, b8 as Ma, as as ma, I as la, a4 as pa, ai as ca, a3 as ga, bv as ha, af as Da, bi as ya, ah as Aa, ad as Ba, r as Ta, av as wa, aN as Ia, aQ as Sa, aO as Pa, aP as Fa, bd as Ra, n as ka, bH as xa, aU as va, b1 as Ha, ab as La, bU as fa, y as Ea, u as Ga, s as Na, e as Oa, bf as Va, bV as Wa, a$ as Ua, o as qa, az as za, bP as Ja, aK as Ka, aI as Xa, aJ as ja, bN as Qa, c0 as Ya, bY as Za, b$ as $a, bQ as _a, bO as as, b as ss, bD as os, k as es, c1 as is, d as ts, v as rs, b_ as bs, aY as ns, b0 as us, bF as ds, bW as Cs, M as Ms, h as ms, bw as ls, i as ps, bz as cs, by as gs, bx as hs, a9 as Ds, br as ys, G as As, aw as Bs, ay as Ts, ax as ws, A as Is, aD as Ss, bJ as Ps, bK as Fs, bM as Rs, O as ks, P as xs, bm as vs, aj as Hs, ak as Ls, D as fs, f as Es, a7 as Gs, am as Ns, aH as Os, a8 as Vs, bq as Ws, L as Us, R as qs, bk as zs, a5 as Js, z as Ks, at as Xs, bu as js, bp as Qs, bo as Ys, an as Zs, J as $s, S as _s, U as ao, H as so, T as oo, w as eo, ao as io, ap as to, b4 as ro, aA as bo, bT as no, al as uo, ae as Co, b6 as Mo, a9 as mo, W as lo, aR as po, bg as co, aB as go, aM as ho, a as Do, aL as yo } from "./index-Drw5Ep0-.js";
1
+ import { ag as o, aV as e, N as i, aq as t, bl as r, bI as b, au as n, p as u, q as d, bj as C, B as M, Q as m, j as l, l as p, aa as c, be as g, K as h, bh as D, x as y, a6 as A, bA as B, aZ as T, a_ as w, bZ as I, b9 as S, aW as P, aX as F, bB as R, b5 as k, aC as x, b7 as v, aG as H, aE as L, aF as f, bb as E, ba as G, bc as N, bC as O, bE as V, bX as W, C as U, bL as q, V as z, bn as J, ar as K, b3 as X, bR as j, aS as Q, bS as Y, E as Z, ac as $, aT as _, F as aa, bs as sa, bG as oa, b2 as ea, X as ia, Y as ta, Z as ra, $ as ba, a0 as na, a1 as ua, bt as da, a2 as Ca, b8 as Ma, as as ma, I as la, a4 as pa, ai as ca, a3 as ga, bv as ha, af as Da, bi as ya, ah as Aa, ad as Ba, r as Ta, av as wa, aN as Ia, aQ as Sa, aO as Pa, aP as Fa, bd as Ra, n as ka, bH as xa, aU as va, b1 as Ha, ab as La, bU as fa, y as Ea, u as Ga, s as Na, e as Oa, bf as Va, bV as Wa, a$ as Ua, o as qa, az as za, bP as Ja, aK as Ka, aI as Xa, aJ as ja, bN as Qa, c0 as Ya, bY as Za, b$ as $a, bQ as _a, bO as as, b as ss, bD as os, k as es, c1 as is, d as ts, v as rs, b_ as bs, aY as ns, b0 as us, bF as ds, bW as Cs, M as Ms, h as ms, bw as ls, i as ps, bz as cs, by as gs, bx as hs, a9 as Ds, br as ys, G as As, aw as Bs, ay as Ts, ax as ws, A as Is, aD as Ss, bJ as Ps, bK as Fs, bM as Rs, O as ks, P as xs, bm as vs, aj as Hs, ak as Ls, D as fs, f as Es, a7 as Gs, am as Ns, aH as Os, a8 as Vs, bq as Ws, L as Us, R as qs, bk as zs, a5 as Js, z as Ks, at as Xs, bu as js, bp as Qs, bo as Ys, an as Zs, J as $s, S as _s, U as ao, H as so, T as oo, w as eo, ao as io, ap as to, b4 as ro, aA as bo, bT as no, al as uo, ae as Co, b6 as Mo, a9 as mo, W as lo, aR as po, bg as co, aB as go, aM as ho, a as Do, aL as yo } from "./index-CTyIxRKV.js";
2
2
  export {
3
3
  o as A,
4
4
  e as Action,
@@ -2589,8 +2589,8 @@ img.ProseMirror-separator {
2589
2589
  border-radius: 4px;
2590
2590
  `,Be.onclick=Me,Be};return Ee.append(Te("+ Col",this.addColumnAfter),Te("− Col",this.deleteColumn),Te("+ Row",this.addRowAfter),Te("− Row",this.deleteRow)),Ee}static get observedAttributes(){return["props","bindings"]}async editorDitaContent(Ee){var Te;if(console.log("In WYSIWYG Editor component...",Ee),this.$ditaEditor){const Oe=this.$ditaEditor.state.selection.from;if(this.$ditaEditor.commands.clearContent(),!((Te=Ee==null?void 0:Ee.data)!=null&&Te.dita))return;let Me="";this.ditaValue=Ee==null?void 0:Ee.data,await(async()=>{var Ue,He;const $e=(Ue=Ee==null?void 0:Ee.data)==null?void 0:Ue.dita;return $e instanceof Promise?Me=await $e:Me=$e,(He=this.$ditaEditor)==null||He.commands.setContent(Me),setTimeout(()=>this.fixTableStyling(),100),Me})(),Oe&&this.$ditaEditor.chain().focus().setTextSelection(Oe).run()}}editorViewType(){var Oe;if(!this.$ditaEditor)return;const Ee=replaceCurlyBraces((Oe=this.props)==null?void 0:Oe.accessMode,"state",{},this.meta.props,this)||"edit",Te=String(Ee).toLowerCase().trim();this.isEditableMode=Te==="edit",this.$ditaEditor.setOptions({editable:this.isEditableMode})}addContentBlockType(Ee,Te){var Me,Be;if(!this.isEditableMode)return;const Oe=Ee;this.contentBlock=Ee,console.log("this is the content type ",Ee),this.$ditaEditor&&(this.$ditaEditor.state.selection.from,Oe==="text"?this.$ditaEditor.commands.insertContent("<p></p>"):Oe==="section"?this.$ditaEditor.commands.insertSection():Oe==="table"?(this.$ditaEditor.chain().focus().insertTable({rows:2,cols:4,withHeaderRow:!0}).run(),setTimeout(()=>this.fixTableStyling(),200),setTimeout(()=>this.fixTableStyling(),500)):Oe==="image"?(localStorage.setItem("selectedTopicId",(Be=(Me=this.getState())==null?void 0:Me.ditaContent)==null?void 0:Be.id),this.$ditaEditor.commands.insertContent({type:"imagePlaceholder"})):Oe==="video"?this.$ditaEditor.commands.insertContent({type:"videoPlaceholder"}):Oe==="codeBlock"?this.$ditaEditor.commands.insertContent({type:"codeBlock",attrs:{language:"javascript"}}):Oe==="hyperLink"&&this.$ditaEditor.commands.openCustomLinkModal())}attributeChangedCallback(Ee,Te,Oe){var Me;if(!(Te===Oe&&Ee!=="props"))if(Ee==="props")try{this.props={...this.props,...JSON.parse(Oe||"{}")},this.editorViewType()}catch(Be){console.error("Error parsing props:",Be)}else Ee==="bindings"&&(this.bindings=JSON.parse(Oe||"{}"),(Me=this.getState().ditaContent)==null||Me.data,this.setBindings(this.bindings,Be=>{var $e;this.variablesList=replaceCurlyBraces(($e=this.meta.props)==null?void 0:$e.variableList,"state",{},this.meta.props,this),this.editorViewType(),console.log(this.variablesList,"this is the varibale list ")}))}connectedCallback(){this.render()}updatePopupPosition(Ee,Te){Te&&(Ee.style.left=`${Te.left+window.scrollX}px`,Ee.style.top=`${Te.bottom+window.scrollY}px`,Ee.style.position="absolute",Ee.style.zIndex="9999")}createToolbarAction(Ee,Te,Oe,Me){const Be=document.createElement("button");Be.type="button",Be.setAttribute("aria-label",Ee);const $e=!this.isEditableMode||!!Me;Be.disabled=$e,Be.tabIndex=$e?-1:0,Be.className=`
2591
2591
  rounded p-1
2592
- ${$e?"opacity-40 cursor-not-allowed":"hover:bg-black hover:text-white"}
2593
- `,$e||(Be.onclick=Te);const Ue=document.createElement("img");return Ue.src=Oe,Ue.alt=Ee,Be.appendChild(Ue),Be}createFontSizeView(Ee){let Te=document.createElement("div");const Oe=()=>{if(!this.isEditableMode)return;let We=document.getElementById("font-size");We&&(We.textContent=this.fontSize+""),Ee(this.fontSize)},Me=()=>{this.isEditableMode&&(this.fontSize--,Oe())},Be=()=>{this.isEditableMode&&(this.fontSize++,Oe())};let $e=document.createElement("div");$e.className="flex flex-row items-center gap-0.5";let Ue=document.createElement("button");Ue.className="p-1 size-8 rounded hover:bg-gray-200 transition",Ue.textContent="-",Ue.addEventListener("click",()=>Me()),$e.appendChild(Ue);let He=document.createElement("div");He.id="font-size",He.className="bg-gray-50 rounded py-1 px-3 gap-2 text-lg",He.textContent=this.fontSize+"",$e.appendChild(He);let Ve=document.createElement("button");return Ve.className="p-1 size-8 rounded hover:bg-gray-200 transition",Ve.textContent="+",Ve.addEventListener("click",()=>Be()),$e.appendChild(Ve),Te.appendChild($e),Te}addDividerLineView(){let Ee=document.createElement("div");return Ee.id="divider-line",Ee.className+="h-7 bg-gray-100 items-center border-[1.5px]",Ee}getDropDownJson(){return dropdownJSON(this.bindings.state)}createDitaToolbarView(){let Ee=document.createElement("div");Ee.className="flex items-center justify-between w-full p-2 ",this.ditaActions.forEach(Te=>{if(Te.name==="line")Ee.appendChild(this.addDividerLineView());else if(Te.name==="fontSize"){const Oe=this.createFontSizeView(Te.command);Ee.appendChild(Oe)}else if(Te.name==="fontFamily"){let Oe=document.createElement("mobius-div");Oe.appendChild(mountComponents([this.getDropDownJson()],this)),Ee.appendChild(Oe)}else{const Oe=this.createToolbarAction(Te.name,Te.command,Te.icon,Te.isDisabled);Ee.appendChild(Oe)}}),this.appendChild(Ee)}debounce(Ee,Te){let Oe;return(...Me)=>{clearTimeout(Oe),Oe=setTimeout(()=>Ee(...Me),Te)}}isInsideTable(Ee){const{$from:Te}=Ee.state.selection;for(let Oe=Te.depth;Oe>0;Oe--)if(Te.node(Oe).type.name==="table")return!0;return!1}getFocusedNode(){if(!this.$ditaEditor)return;const Ee=this.isInsideTable(this.$ditaEditor),Te=document.getElementById("simple-table-toolbar");if(Ee&&!Te){const Oe=this.createSimpleTableToolbar(),Me=document.getElementById("dita-builder-container");Me==null||Me.prepend(Oe)}!Ee&&Te&&Te.remove()}searchAndHighlight(Ee){var Be;if(this.searchTerm=Ee.trim(),this.clearHighlights(),!this.searchTerm||!this.searchTerm.length)return;const Te=(Be=this.$ditaEditor)==null?void 0:Be.getText(),Oe=new RegExp(this.escapeRegExp(this.searchTerm),"gi");Te!=null&&Te.match(Oe)&&this.highlightMatches(this.searchTerm)}highlightMatches(Ee){var $e;if(!this.$ditaEditor)return;const{state:Te}=this.$ditaEditor,{doc:Oe}=Te;let Me=Te.tr;const Be=[];Oe.descendants((Ue,He)=>{if(Ue.isText){const Ve=Ue.text,We=new RegExp(this.escapeRegExp(Ee),"gi");let ze;for(;(ze=We.exec(Ve))!==null;){const Ge=He+ze.index,qe=Ge+ze[0].length;Be.push({from:Ge,to:qe})}}}),Be.reverse().forEach(({from:Ue,to:He})=>{var We;const Ve=(We=this.$ditaEditor)==null?void 0:We.schema.marks.highlight.create({color:"#ffeb3b"});Ve&&(Me=Me.addMark(Ue,He,Ve))}),Be.length>0&&(($e=this.$ditaEditor)==null||$e.view.dispatch(Me))}clearHighlights(){var Me;if(!this.$ditaEditor)return;const{state:Ee}=this.$ditaEditor,{doc:Te}=Ee;let Oe=Ee.tr;Te.descendants((Be,$e)=>{Be.marks&&Be.marks.forEach(Ue=>{Ue.type.name==="highlight"&&(Oe=Oe.removeMark($e,$e+Be.nodeSize,Ue))})}),(Me=this.$ditaEditor)==null||Me.view.dispatch(Oe)}escapeRegExp(Ee){return Ee.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}createDitaBuilderView(Ee){let Te=document.createElement("div");return Te.id="dita-builder-container",Te.spellcheck=!1,Te.className="w-full min-h-full bg-white",this.$ditaEditor=new Editor({element:Te,content:(Ee==null?void 0:Ee.dita)||"",onCreate:Oe=>{const{editor:Me}=Oe;window.ditaEditorInstance=Me,this.editorViewType(),setTimeout(()=>this.fixTableStyling(),100)},onUpdate:this.onContentUpdate.bind(this),onSelectionUpdate:({editor:Oe})=>this.getFocusedNode(),extensions:[StarterKit.configure({link:!1,gapcursor:!1,dropcursor:!1}),Underline,TitleNode,TopicNode,src_default,TextStyle.configure({mergeNestedSpanStyles:!0}),SectionNode,CustomLink.configure({openOnClick:!0}),Highlight.configure({multicolor:!0}),ImagePlaceholderNode,VideoPlaceholderNode,Image$1,ImageResize.configure({inline:!1,allowBase64:!0,HTMLAttributes:{class:"resizable-image"}}),VideoNode,SectionTitleNode,TableRow,TableCell,TableHeader,Table$1.configure({resizable:!0,allowTableNodeSelection:!1,lastColumnResizable:!1,HTMLAttributes:{class:"custom-table"},handleWidth:5,cellMinWidth:50}),FocusClasses.configure({className:"has-focus",mode:"deepest"}),PaginationPlus.configure({pageHeight:842,pageGap:40,pageBreakBackground:"#dbeafe",pageHeaderHeight:50,footerLeft:""}),u$1.configure({attributeName:"id",types:["title","topic","div","section","heading","orderedList","bulletList","listItem"],createId:()=>window.crypto.randomUUID()}),Placeholder$1.configure({includeChildren:!0,showOnlyCurrent:!1,placeholder:({node:Oe})=>Oe.type.name==="heading"?"Whats the title?":Oe.type.name==="paragraph"?"Paragraph":Oe.type.name==="title"?"Topic title":Oe.type.name==="sectiontitle"?"Section title":""}),TextAlign.configure({types:["heading","paragraph","title"]}),Mention.configure({HTMLAttributes:{class:"mention"},suggestion:{char:"@",allowSpaces:!0,items:({query:Oe})=>{var Me,Be;return Oe===""?(Me=this.variablesList)==null?void 0:Me.map($e=>({label:$e==null?void 0:$e.name,id:$e==null?void 0:$e.name})):(Be=this.variablesList)==null?void 0:Be.filter($e=>$e==null?void 0:$e.name.toLowerCase().includes(Oe.toLowerCase())).map($e=>({label:$e==null?void 0:$e.name,id:$e==null?void 0:$e.name}))},command:({editor:Oe,range:Me,props:Be})=>{Oe.chain().focus().insertContentAt(Me,[{type:"mention",attrs:{id:Be.id,label:Be.label}},{type:"text",text:" "}]).run()},render:()=>{let Oe,Me;const Be=$e=>{if(Me.innerHTML="",!$e.items.length){Me.innerHTML='<div class="mention-item p-2 text-gray-400">No matches</div>';return}$e.items.forEach(Ue=>{const He=document.createElement("div");He.classList.add("mention-item","p-2","cursor-pointer","hover:bg-gray-200","rounded"),He.textContent=Ue.label,He.addEventListener("click",()=>$e.command(Ue)),Me.appendChild(He)})};return{onStart:$e=>{var He;const Ue=(He=$e.clientRect)==null?void 0:He.call($e);Ue&&(Oe=document.createElement("div"),Oe.classList.add("mention-popup","absolute","bg-white","shadow-md","border","rounded","p-2","z-50"),Me=document.createElement("div"),Me.className="mention-items flex flex-col",Oe.appendChild(Me),document.body.appendChild(Oe),Be($e),this.updatePopupPosition(Oe,Ue))},onUpdate:$e=>{var He;Be($e);const Ue=(He=$e.clientRect)==null?void 0:He.call($e);Ue&&this.updatePopupPosition(Oe,Ue)},onKeyDown:({event:$e})=>$e.key==="Escape"?(Oe.remove(),!0):!1,onExit:()=>Oe.remove()}}}})],editorProps:{attributes:{class:"border-black rounded-b-md px-10 outline-none"},handleDOMEvents:{mousedown:(Oe,Me)=>{const Be=Me.target;return(Be.classList.contains("column-resize-handle")||Be.closest(".column-resize-handle"))&&(console.log("Resize started"),this.isResizingTable=!0),!1},mousemove:(Oe,Me)=>(this.isResizingTable,!1),mouseup:(Oe,Me)=>(this.isResizingTable&&(console.log("Resize ended"),setTimeout(()=>{this.isResizingTable=!1,setTimeout(()=>{this.preventExtraParagraphs(),this.fixTableStyling()},150)},100)),!1),mouseleave:(Oe,Me)=>(this.isResizingTable&&setTimeout(()=>{this.isResizingTable=!1},100),!1)}}}),Te}fixTableStyling(){document.querySelectorAll(".tableWrapper table, .ProseMirror table").forEach(Te=>{var Ue;const Oe=Te;let Me=Oe.closest(".tableWrapper");if(!Me){const He=document.createElement("div");He.className="tableWrapper",(Ue=Oe.parentNode)==null||Ue.insertBefore(He,Oe),He.appendChild(Oe),Me=He}if(Me.style.cssText=`
2592
+ ${$e?"opacity-40 cursor-not-allowed":"hover:bg-gray-200"}
2593
+ `,$e||(Be.onclick=Te);const Ue=document.createElement("img");return Ue.src=Oe,Ue.alt=Ee,Be.appendChild(Ue),Be}createFontSizeView(Ee){let Te=document.createElement("div");Te.className="mt-0";const Oe=()=>{if(!this.isEditableMode)return;let We=document.getElementById("font-size");We&&(We.textContent=this.fontSize+""),Ee(this.fontSize)},Me=()=>{this.isEditableMode&&(this.fontSize--,Oe())},Be=()=>{this.isEditableMode&&(this.fontSize++,Oe())};let $e=document.createElement("div");$e.className="flex flex-row items-center gap-0.5 mt-0";let Ue=document.createElement("button");Ue.className="p-1 size-8 rounded hover:bg-gray-200 transition",Ue.textContent="-",Ue.addEventListener("click",()=>Me()),$e.appendChild(Ue);let He=document.createElement("div");He.id="font-size",He.className="bg-gray-50 rounded py-1 px-3 gap-2 text-lg mt-0 items-center",He.textContent=this.fontSize+"",$e.appendChild(He);let Ve=document.createElement("button");return Ve.className="p-1 size-8 rounded hover:bg-gray-200 transition",Ve.textContent="+",Ve.addEventListener("click",()=>Be()),$e.appendChild(Ve),Te.appendChild($e),Te}addDividerLineView(){let Ee=document.createElement("div");return Ee.id="divider-line",Ee.className+="h-7 bg-gray-100 items-center border-[1.5px]",Ee}getDropDownJson(){return dropdownJSON(this.bindings.state)}createDitaToolbarView(){let Ee=document.createElement("div");Ee.className="flex items-center justify-between w-full p-2 mt-2",this.ditaActions.forEach(Te=>{if(Te.name==="line")Ee.appendChild(this.addDividerLineView());else if(Te.name==="fontSize"){const Oe=this.createFontSizeView(Te.command);Ee.appendChild(Oe)}else if(Te.name==="fontFamily"){let Oe=document.createElement("mobius-div");Oe.appendChild(mountComponents([this.getDropDownJson()],this)),Ee.appendChild(Oe)}else{const Oe=this.createToolbarAction(Te.name,Te.command,Te.icon,Te.isDisabled);Ee.appendChild(Oe)}}),this.appendChild(Ee)}debounce(Ee,Te){let Oe;return(...Me)=>{clearTimeout(Oe),Oe=setTimeout(()=>Ee(...Me),Te)}}isInsideTable(Ee){const{$from:Te}=Ee.state.selection;for(let Oe=Te.depth;Oe>0;Oe--)if(Te.node(Oe).type.name==="table")return!0;return!1}getFocusedNode(){if(!this.$ditaEditor)return;const Ee=this.isInsideTable(this.$ditaEditor),Te=document.getElementById("simple-table-toolbar");if(Ee&&!Te){const Oe=this.createSimpleTableToolbar(),Me=document.getElementById("dita-builder-container");Me==null||Me.prepend(Oe)}!Ee&&Te&&Te.remove()}searchAndHighlight(Ee){var Be;if(this.searchTerm=Ee.trim(),this.clearHighlights(),!this.searchTerm||!this.searchTerm.length)return;const Te=(Be=this.$ditaEditor)==null?void 0:Be.getText(),Oe=new RegExp(this.escapeRegExp(this.searchTerm),"gi");Te!=null&&Te.match(Oe)&&this.highlightMatches(this.searchTerm)}highlightMatches(Ee){var $e;if(!this.$ditaEditor)return;const{state:Te}=this.$ditaEditor,{doc:Oe}=Te;let Me=Te.tr;const Be=[];Oe.descendants((Ue,He)=>{if(Ue.isText){const Ve=Ue.text,We=new RegExp(this.escapeRegExp(Ee),"gi");let ze;for(;(ze=We.exec(Ve))!==null;){const Ge=He+ze.index,qe=Ge+ze[0].length;Be.push({from:Ge,to:qe})}}}),Be.reverse().forEach(({from:Ue,to:He})=>{var We;const Ve=(We=this.$ditaEditor)==null?void 0:We.schema.marks.highlight.create({color:"#ffeb3b"});Ve&&(Me=Me.addMark(Ue,He,Ve))}),Be.length>0&&(($e=this.$ditaEditor)==null||$e.view.dispatch(Me))}clearHighlights(){var Me;if(!this.$ditaEditor)return;const{state:Ee}=this.$ditaEditor,{doc:Te}=Ee;let Oe=Ee.tr;Te.descendants((Be,$e)=>{Be.marks&&Be.marks.forEach(Ue=>{Ue.type.name==="highlight"&&(Oe=Oe.removeMark($e,$e+Be.nodeSize,Ue))})}),(Me=this.$ditaEditor)==null||Me.view.dispatch(Oe)}escapeRegExp(Ee){return Ee.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}createDitaBuilderView(Ee){let Te=document.createElement("div");return Te.id="dita-builder-container",Te.spellcheck=!1,Te.className="w-full min-h-full bg-white",this.$ditaEditor=new Editor({element:Te,content:(Ee==null?void 0:Ee.dita)||"",onCreate:Oe=>{const{editor:Me}=Oe;window.ditaEditorInstance=Me,this.editorViewType(),setTimeout(()=>this.fixTableStyling(),100)},onUpdate:this.onContentUpdate.bind(this),onSelectionUpdate:({editor:Oe})=>this.getFocusedNode(),extensions:[StarterKit.configure({link:!1,gapcursor:!1,dropcursor:!1}),Underline,TitleNode,TopicNode,src_default,TextStyle.configure({mergeNestedSpanStyles:!0}),SectionNode,CustomLink.configure({openOnClick:!0}),Highlight.configure({multicolor:!0}),ImagePlaceholderNode,VideoPlaceholderNode,Image$1,ImageResize.configure({inline:!1,allowBase64:!0,HTMLAttributes:{class:"resizable-image"}}),VideoNode,SectionTitleNode,TableRow,TableCell,TableHeader,Table$1.configure({resizable:!0,allowTableNodeSelection:!1,lastColumnResizable:!1,HTMLAttributes:{class:"custom-table"},handleWidth:5,cellMinWidth:50}),FocusClasses.configure({className:"has-focus",mode:"deepest"}),PaginationPlus.configure({pageHeight:842,pageGap:40,pageBreakBackground:"#f3f3f3",pageHeaderHeight:50,footerLeft:""}),u$1.configure({attributeName:"id",types:["title","topic","div","section","heading","orderedList","bulletList","listItem"],createId:()=>window.crypto.randomUUID()}),Placeholder$1.configure({includeChildren:!0,showOnlyCurrent:!1,placeholder:({node:Oe})=>Oe.type.name==="heading"?"Whats the title?":Oe.type.name==="paragraph"?"Paragraph":Oe.type.name==="title"?"Topic title":Oe.type.name==="sectiontitle"?"Section title":""}),TextAlign.configure({types:["heading","paragraph","title"]}),Mention.configure({HTMLAttributes:{class:"mention"},suggestion:{char:"@",allowSpaces:!0,items:({query:Oe})=>{var Me,Be;return Oe===""?(Me=this.variablesList)==null?void 0:Me.map($e=>({label:$e==null?void 0:$e.name,id:$e==null?void 0:$e.name})):(Be=this.variablesList)==null?void 0:Be.filter($e=>$e==null?void 0:$e.name.toLowerCase().includes(Oe.toLowerCase())).map($e=>({label:$e==null?void 0:$e.name,id:$e==null?void 0:$e.name}))},command:({editor:Oe,range:Me,props:Be})=>{Oe.chain().focus().insertContentAt(Me,[{type:"mention",attrs:{id:Be.id,label:Be.label}},{type:"text",text:" "}]).run()},render:()=>{let Oe,Me;const Be=$e=>{if(Me.innerHTML="",!$e.items.length){Me.innerHTML='<div class="mention-item p-2 text-gray-400">No matches</div>';return}$e.items.forEach(Ue=>{const He=document.createElement("div");He.classList.add("mention-item","p-2","cursor-pointer","hover:bg-gray-200","rounded"),He.textContent=Ue.label,He.addEventListener("click",()=>$e.command(Ue)),Me.appendChild(He)})};return{onStart:$e=>{var He;const Ue=(He=$e.clientRect)==null?void 0:He.call($e);Ue&&(Oe=document.createElement("div"),Oe.classList.add("mention-popup","absolute","bg-white","shadow-md","border","rounded","p-2","z-50"),Me=document.createElement("div"),Me.className="mention-items flex flex-col",Oe.appendChild(Me),document.body.appendChild(Oe),Be($e),this.updatePopupPosition(Oe,Ue))},onUpdate:$e=>{var He;Be($e);const Ue=(He=$e.clientRect)==null?void 0:He.call($e);Ue&&this.updatePopupPosition(Oe,Ue)},onKeyDown:({event:$e})=>$e.key==="Escape"?(Oe.remove(),!0):!1,onExit:()=>Oe.remove()}}}})],editorProps:{attributes:{class:"border-black rounded-b-md px-10 outline-none"},handleDOMEvents:{mousedown:(Oe,Me)=>{const Be=Me.target;return(Be.classList.contains("column-resize-handle")||Be.closest(".column-resize-handle"))&&(console.log("Resize started"),this.isResizingTable=!0),!1},mousemove:(Oe,Me)=>(this.isResizingTable,!1),mouseup:(Oe,Me)=>(this.isResizingTable&&(console.log("Resize ended"),setTimeout(()=>{this.isResizingTable=!1,setTimeout(()=>{this.preventExtraParagraphs(),this.fixTableStyling()},150)},100)),!1),mouseleave:(Oe,Me)=>(this.isResizingTable&&setTimeout(()=>{this.isResizingTable=!1},100),!1)}}}),Te}fixTableStyling(){document.querySelectorAll(".tableWrapper table, .ProseMirror table").forEach(Te=>{var Ue;const Oe=Te;let Me=Oe.closest(".tableWrapper");if(!Me){const He=document.createElement("div");He.className="tableWrapper",(Ue=Oe.parentNode)==null||Ue.insertBefore(He,Oe),He.appendChild(Oe),Me=He}if(Me.style.cssText=`
2594
2594
  width: 100% !important;
2595
2595
  max-width: 100% !important;
2596
2596
  overflow-x: auto !important;
@@ -3100,7 +3100,7 @@ img.ProseMirror-separator {
3100
3100
  handleWidth: 6,
3101
3101
  cellMinWidth: 50,
3102
3102
  }),
3103
- `,this.appendChild(Ee)}render(Ee=""){this.loadStyles();const Te=this.createDitaBuilderView(Ee);this.createDitaToolbarView();let Oe=document.createElement("div");Oe.setAttribute("id",this.props.id),Oe.className="dita_builder w-full h-[80vh] p-10 bg-blue-100 overflow-auto",Oe.append(Te),this.appendChild(Oe),this.bindSearchEvents()}}customElements.define("mobius-wysiwyg-editor",WysiwygEditor);class CustomSearchBox extends CustomBaseInput{constructor(){super();Pn(this,"list");Pn(this,"suggestionsPath","word");Pn(this,"tableName","");Pn(this,"accessToken","");Pn(this,"filterOn","");Pn(this,"filterValue","");Pn(this,"apiUrl","https://api.datamuse.com/sug?s")}static get observedAttributes(){return["props","bindings"]}addErrorMessage(){}setupBindings(){const Ee=JSON.parse(this.getAttribute("bindings")||"{}");this.setBindings(Ee,Te=>{console.log("This is CustomSearchBox",Te)})}connectedCallback(){this.props=JSON.parse(this.getAttribute("props")),this.placeholder=this.props.placeholder||"",this.label=this.props.label||"",this.required=this.props.required||!1,this.inputType=this.props.type||"text",this.suggestionsPath=this.props.suggestionsPath||"word",this.tableName=this.props.tableName||"",this.accessToken=this.props.accessToken||"",this.filterOn=this.props.filterOn||"",this.setupBindings(),this.render(),this.addListeners()}callSearch(){this.appendList()}onInput(Ee,Te){var Me;console.log("input called"),this.hasInteracted=!0,this.value=Ee.textContent.trim();const Oe=this.querySelectorAll(".suggestionListItem");Oe&&Oe.forEach(Be=>Be.remove()),this.value.length>this.props.minLettersToTrigger?this.callSearch():this.value.length>=0&&(this.value.length==0&&(Ee.innerHTML=""),this.removeSuggestions()),this.provider&&(this._prevValues=((Me=this.signal)==null?void 0:Me.get())||this.getState())}onBlur(Ee){console.log("blur called 2"),Ee.textContent.trim()===""&&(this.value=this.placeholder,Ee.textContent=this.placeholder,Ee.classList.add("color-gray-400")),this.hasInteracted&&console.log("interacted"),this.removeSuggestions()}updateSearchValue(Ee){this.value=Ee,this.input&&(this.input.innerHTML=Ee)}callAPI(){console.log("api called for",this.value)}removeSuggestions(){const Ee=this.querySelectorAll(".suggestionListContainer");Ee&&Ee.forEach(Te=>Te.remove())}moveCursorToEnd(Ee){Ee.focus();const Te=document.createRange(),Oe=window.getSelection();Te.selectNodeContents(Ee),Te.collapse(!1),Oe==null||Oe.removeAllRanges(),Oe==null||Oe.addRange(Te)}showLoading(){let Ee=this.querySelector(".suggestionListContainer");Ee||(Ee=document.createElement("mobius-div"),Ee.className="suggestionListContainer "+this.props.suggestionListStyles,this.appendChild(Ee)),Ee.innerHTML='<mobius-div class="m-2">Loading...</mobius-div>'}clearLoading(){const Ee=this.querySelector(".suggestionListContainer");Ee&&(Ee.innerHTML="")}async appendList(){if(this.filterValue=replaceCurlyBraces(this.props.filterValue,"state",this.getState(),this.props,this),this.accessToken=replaceCurlyBraces(this.accessToken),this.showLoading(),this.props.apiUrl){this.apiUrl=this.props.apiUrl;const Oe={dbType:"TIDB",keyword:this.value,searchOn:[{tableName:this.tableName,attributes:[this.suggestionsPath],filters:[{key:this.filterOn,operator:"EQUAL",singleValue:this.filterValue}]}]};await fetch(this.apiUrl,{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(Oe)}).then(Me=>{if(!Me.ok)throw new Error(`HTTP error! status: ${Me.status}`);return Me.json()}).then(Me=>this.list=Me).catch(Me=>{console.error("Error fetching data:",Me)})}else await fetch(`${this.apiUrl}=${this.value}`).then(Oe=>Oe.json()).then(Oe=>this.list=Oe);const Ee=`
3103
+ `,this.appendChild(Ee)}render(Ee=""){this.loadStyles();const Te=this.createDitaBuilderView(Ee);this.createDitaToolbarView();let Oe=document.createElement("div");Oe.setAttribute("id",this.props.id),Oe.className="dita_builder w-full h-[80vh] p-10 bg-gray-100 overflow-auto",Oe.append(Te),this.appendChild(Oe),this.bindSearchEvents()}}customElements.define("mobius-wysiwyg-editor",WysiwygEditor);class CustomSearchBox extends CustomBaseInput{constructor(){super();Pn(this,"list");Pn(this,"suggestionsPath","word");Pn(this,"tableName","");Pn(this,"accessToken","");Pn(this,"filterOn","");Pn(this,"filterValue","");Pn(this,"apiUrl","https://api.datamuse.com/sug?s")}static get observedAttributes(){return["props","bindings"]}addErrorMessage(){}setupBindings(){const Ee=JSON.parse(this.getAttribute("bindings")||"{}");this.setBindings(Ee,Te=>{console.log("This is CustomSearchBox",Te)})}connectedCallback(){this.props=JSON.parse(this.getAttribute("props")),this.placeholder=this.props.placeholder||"",this.label=this.props.label||"",this.required=this.props.required||!1,this.inputType=this.props.type||"text",this.suggestionsPath=this.props.suggestionsPath||"word",this.tableName=this.props.tableName||"",this.accessToken=this.props.accessToken||"",this.filterOn=this.props.filterOn||"",this.setupBindings(),this.render(),this.addListeners()}callSearch(){this.appendList()}onInput(Ee,Te){var Me;console.log("input called"),this.hasInteracted=!0,this.value=Ee.textContent.trim();const Oe=this.querySelectorAll(".suggestionListItem");Oe&&Oe.forEach(Be=>Be.remove()),this.value.length>this.props.minLettersToTrigger?this.callSearch():this.value.length>=0&&(this.value.length==0&&(Ee.innerHTML=""),this.removeSuggestions()),this.provider&&(this._prevValues=((Me=this.signal)==null?void 0:Me.get())||this.getState())}onBlur(Ee){console.log("blur called 2"),Ee.textContent.trim()===""&&(this.value=this.placeholder,Ee.textContent=this.placeholder,Ee.classList.add("color-gray-400")),this.hasInteracted&&console.log("interacted"),this.removeSuggestions()}updateSearchValue(Ee){this.value=Ee,this.input&&(this.input.innerHTML=Ee)}callAPI(){console.log("api called for",this.value)}removeSuggestions(){const Ee=this.querySelectorAll(".suggestionListContainer");Ee&&Ee.forEach(Te=>Te.remove())}moveCursorToEnd(Ee){Ee.focus();const Te=document.createRange(),Oe=window.getSelection();Te.selectNodeContents(Ee),Te.collapse(!1),Oe==null||Oe.removeAllRanges(),Oe==null||Oe.addRange(Te)}showLoading(){let Ee=this.querySelector(".suggestionListContainer");Ee||(Ee=document.createElement("mobius-div"),Ee.className="suggestionListContainer "+this.props.suggestionListStyles,this.appendChild(Ee)),Ee.innerHTML='<mobius-div class="m-2">Loading...</mobius-div>'}clearLoading(){const Ee=this.querySelector(".suggestionListContainer");Ee&&(Ee.innerHTML="")}async appendList(){if(this.filterValue=replaceCurlyBraces(this.props.filterValue,"state",this.getState(),this.props,this),this.accessToken=replaceCurlyBraces(this.accessToken),this.showLoading(),this.props.apiUrl){this.apiUrl=this.props.apiUrl;const Oe={dbType:"TIDB",keyword:this.value,searchOn:[{tableName:this.tableName,attributes:[this.suggestionsPath],filters:[{key:this.filterOn,operator:"EQUAL",singleValue:this.filterValue}]}]};await fetch(this.apiUrl,{method:"POST",headers:{Authorization:`Bearer ${this.accessToken}`,"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(Oe)}).then(Me=>{if(!Me.ok)throw new Error(`HTTP error! status: ${Me.status}`);return Me.json()}).then(Me=>this.list=Me).catch(Me=>{console.error("Error fetching data:",Me)})}else await fetch(`${this.apiUrl}=${this.value}`).then(Oe=>Oe.json()).then(Oe=>this.list=Oe);const Ee=`
3104
3104
  ${this.list.map(Oe=>(console.log(Oe),`<mobius-div class="suggestionListItem ${this.props.suggestionListItemStyles}">${Oe[this.suggestionsPath]}</mobius-div>`)).join("")}
3105
3105
  `;if(this.clearLoading(),this.querySelector(".suggestionListContainer")){const Oe=this.querySelector(".suggestionListContainer");Oe&&(Oe.innerHTML=Ee)}else{const Oe=document.createElement("mobius-div");Oe.className="suggestionListContainer "+this.props.suggestionListStyles,Oe.innerHTML=Ee,this.appendChild(Oe)}const Te=this.querySelectorAll(".suggestionListItem");Te&&Te.forEach(Oe=>{Oe.addEventListener("mousedown",Me=>{Me.preventDefault()}),Oe.addEventListener("click",()=>{this.value=Oe.textContent||"",this.input.textContent=this.value,this.dispatchEvent(new CustomEvent("custom-search-input-changed",{detail:this.value,bubbles:!0})),this.removeSuggestions(),this.moveCursorToEnd(this.input)})})}render(){this.innerHTML="";const Ee=`
3106
3106
  <mobius-div
@@ -5511,7 +5511,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
5511
5511
  }
5512
5512
 
5513
5513
  .page {
5514
- width: 98%;
5514
+ width: 95%;
5515
5515
  height: ${He};
5516
5516
  min-height: 90%;
5517
5517
  background: #fff;
@@ -1,4 +1,4 @@
1
- import { conf as t, language as e } from "./typescript-jPBlF_n0.js";
1
+ import { conf as t, language as e } from "./typescript-_U26e8KM.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as Et } from "./index-Drw5Ep0-.js";
1
+ import { m as Et } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-Drw5Ep0-.js";
1
+ import { m as l } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-Drw5Ep0-.js";
1
+ import { m as s } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as o } from "./index-Drw5Ep0-.js";
1
+ import { m as o } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m } from "./index-Drw5Ep0-.js";
1
+ import { m } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { t as O, m as I } from "./index-Drw5Ep0-.js";
1
+ import { t as O, m as I } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -487,44 +487,6 @@ export declare function load(): {
487
487
  styles: string;
488
488
  value: string;
489
489
  children: never[];
490
- } | {
491
- id: string;
492
- type: string;
493
- role: string;
494
- version: string;
495
- lang: string;
496
- "alt-text": string;
497
- name: string;
498
- props: {
499
- size: string;
500
- value: string;
501
- source?: undefined;
502
- apiMethod?: undefined;
503
- token?: undefined;
504
- };
505
- bindings: {
506
- state: {
507
- authorXmlRelationshipState: {
508
- path: string;
509
- initialValue: string;
510
- };
511
- ditaContent?: undefined;
512
- xmlContent?: undefined;
513
- xmlEditorUpdatedDateToggle?: undefined;
514
- };
515
- events: {
516
- click: {
517
- authorXmlRelationshipState: {
518
- setValueToNewState: string;
519
- };
520
- ditaContent?: undefined;
521
- xmlContent?: undefined;
522
- };
523
- };
524
- };
525
- styles: string;
526
- value: string;
527
- children: never[];
528
490
  })[];
529
491
  }[];
530
492
  bindings?: undefined;
@@ -1,4 +1,4 @@
1
- import { m as s } from "./index-Drw5Ep0-.js";
1
+ import { m as s } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as r } from "./index-Drw5Ep0-.js";
1
+ import { m as r } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
@@ -1,4 +1,4 @@
1
- import { m as l } from "./index-Drw5Ep0-.js";
1
+ import { m as l } from "./index-CTyIxRKV.js";
2
2
  /*!-----------------------------------------------------------------------------
3
3
  * Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mx-ui-components-pkg",
3
- "version": "0.0.717-alpha.145",
3
+ "version": "0.0.717-alpha.146",
4
4
  "description": "mobius ui library",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "MIT",
@@ -169,7 +169,7 @@
169
169
  "tiptap-extension-pagination": "^2.1.4",
170
170
  "tiptap-extension-resize-image": "^1.2.2",
171
171
  "tiptap-pagination-breaks": "^1.0.2",
172
- "tiptap-pagination-plus": "1.1.1",
172
+ "tiptap-pagination-plus": "^1.0.10",
173
173
  "tiptap-unique-id": "^2.10.3",
174
174
  "vite-plugin-css-injected-by-js": "^3.5.2",
175
175
  "vite-plugin-monaco-editor": "^1.1.0",