@chaulapatrice/richtext-editor 0.1.7 → 0.1.8

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.
@@ -22487,7 +22487,7 @@ function Ase({ shouldPreserveNewLinesInMarkdown: e, useCollabV2: t }) {
22487
22487
  zM();
22488
22488
  let { isCollabActive: p } = By();
22489
22489
  F(() => {
22490
- EA.isCollab || KM(window.location.hash).then((e) => {
22490
+ EA.isCollab || typeof window > "u" || KM(window.location.hash).then((e) => {
22491
22491
  e && e.source === "Playground" && (n.setEditorState(Ej(n, e)), n.dispatchCommand(Lu, void 0));
22492
22492
  });
22493
22493
  }, [n]), F(() => vg(n.registerEditableListener((e) => {
@@ -59550,6 +59550,7 @@ function n7({ disabled: e = !1, buttonLabel: t, buttonAriaLabel: n, buttonClassN
59550
59550
  //#endregion
59551
59551
  //#region src/nodes/LayoutContainerNode.ts
59552
59552
  function Cve(e) {
59553
+ if (typeof window > "u") return null;
59553
59554
  let t = window.getComputedStyle(e).getPropertyValue("grid-template-columns");
59554
59555
  return t ? { node: i7(t) } : null;
59555
59556
  }
@@ -61613,8 +61614,8 @@ function fye({ editor: e, anchorElem: t, isLink: n, isBold: r, isItalic: i, isUn
61613
61614
  y();
61614
61615
  });
61615
61616
  };
61616
- return window.addEventListener("resize", r), n && n.addEventListener("scroll", r), () => {
61617
- window.removeEventListener("resize", r), n && n.removeEventListener("scroll", r);
61617
+ return typeof window < "u" && window.addEventListener("resize", r), n && n.addEventListener("scroll", r), () => {
61618
+ typeof window < "u" && window.removeEventListener("resize", r), n && n.removeEventListener("scroll", r);
61618
61619
  };
61619
61620
  }, [
61620
61621
  e,
@@ -63144,25 +63145,25 @@ function cbe({ editor: e }) {
63144
63145
  }, c(o.current), f(e), document.addEventListener("pointerup", x(e));
63145
63146
  }, [l, x]), C = P(() => {
63146
63147
  if (l) {
63147
- let { height: e, width: t, top: n, left: i } = l.elem.getBoundingClientRect(), a = Xg(l.elem), o = {
63148
+ let { height: e, width: t, top: n, left: i } = l.elem.getBoundingClientRect(), a = Xg(l.elem), o = typeof window < "u" ? window.scrollX : 0, c = typeof window < "u" ? window.scrollY : 0, u = {
63148
63149
  bottom: {
63149
63150
  backgroundColor: "none",
63150
63151
  cursor: "row-resize",
63151
63152
  height: "16px",
63152
- left: `${window.scrollX + i}px`,
63153
- top: `${window.scrollY + n + e - 16 / 2}px`,
63153
+ left: `${o + i}px`,
63154
+ top: `${c + n + e - 16 / 2}px`,
63154
63155
  width: `${t}px`
63155
63156
  },
63156
63157
  right: {
63157
63158
  backgroundColor: "none",
63158
63159
  cursor: "col-resize",
63159
63160
  height: `${e}px`,
63160
- left: `${window.scrollX + i + t - 16 / 2}px`,
63161
- top: `${window.scrollY + n}px`,
63161
+ left: `${o + i + t - 16 / 2}px`,
63162
+ top: `${c + n}px`,
63162
63163
  width: "16px"
63163
63164
  }
63164
- }, c = r.current;
63165
- return d && s && c ? (g(d) ? (o[d].left = `${window.scrollX + c.left}px`, o[d].top = `${window.scrollY + s.y / a}px`, o[d].height = "3px", o[d].width = `${c.width}px`) : (o[d].top = `${window.scrollY + c.top}px`, o[d].left = `${window.scrollX + s.x / a}px`, o[d].width = "3px", o[d].height = `${c.height}px`), o[d].backgroundColor = "#adf", o[d].mixBlendMode = "unset") : !d && p === "right" && (o.right.background = `linear-gradient(90deg, transparent 7px, ${x9} 7px, ${x9} 9px, transparent 9px)`, o.right.mixBlendMode = "unset", c && (o.right.top = `${window.scrollY + c.top}px`, o.right.height = `${c.height}px`)), o;
63165
+ }, f = r.current;
63166
+ return d && s && f ? (g(d) ? (u[d].left = `${o + f.left}px`, u[d].top = `${c + s.y / a}px`, u[d].height = "3px", u[d].width = `${f.width}px`) : (u[d].top = `${c + f.top}px`, u[d].left = `${o + s.x / a}px`, u[d].width = "3px", u[d].height = `${f.height}px`), u[d].backgroundColor = "#adf", u[d].mixBlendMode = "unset") : !d && p === "right" && (u.right.background = `linear-gradient(90deg, transparent 7px, ${x9} 7px, ${x9} 9px, transparent 9px)`, u.right.mixBlendMode = "unset", f && (u.right.top = `${c + f.top}px`, u.right.height = `${f.height}px`)), u;
63166
63167
  }
63167
63168
  return {
63168
63169
  bottom: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chaulapatrice/richtext-editor",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "author": "Patrice Chaula",
5
5
  "license": "MIT",
6
6
  "repository": {