@pie-element/matrix 5.0.7-next.20261019223635 → 5.0.7-next.20261020062838

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.
@@ -26190,28 +26190,31 @@ var LM = (e, t) => {
26190
26190
  })]
26191
26191
  })
26192
26192
  });
26193
- }), HM = () => {
26194
- document.querySelectorAll(".insert-css-dialog").forEach((e) => e.remove());
26195
- }, UM = ({ editor: e, callback: t, opts: n, selectedText: r, parentNode: i }) => {
26193
+ }), HM = null, UM = ({ editor: e, callback: t, opts: n, selectedText: r, parentNode: i }) => {
26194
+ HM?.();
26196
26195
  let a = e.options.element, o = document.createElement("div"), { selection: s } = e.state;
26197
- HM(), o.className = "insert-css-dialog";
26196
+ o.className = "insert-css-dialog";
26198
26197
  let c = At(o), l, u = !1, d = (e) => {
26199
26198
  if (u) {
26200
26199
  let t = o.contains(e.target) || l, n = a.contains(e.target);
26201
- t || n || f();
26200
+ t || n || p();
26202
26201
  } else u = !0;
26203
26202
  }, f = () => {
26204
- t(void 0, !0), c.unmount(), o.remove(), document.body.removeEventListener("click", d);
26205
- }, p = (e) => {
26206
- t(e, !0), c.unmount(), o.remove(), document.body.removeEventListener("click", d);
26207
- }, m = i?.attrs.class, h = (e) => {
26203
+ c.unmount(), o.remove(), document.body.removeEventListener("click", d), HM === f && (HM = null);
26204
+ };
26205
+ HM = f;
26206
+ let p = () => {
26207
+ t(void 0, !0), f();
26208
+ }, m = (e) => {
26209
+ t(e, !0), f();
26210
+ }, h = i?.attrs.class, g = (e) => {
26208
26211
  let t = `<span class="${e}">${r}</span>`;
26209
26212
  if (i) {
26210
26213
  let e = "span";
26211
- i?.object === "inline" && (e = "span"), i?.object === "block" && (e = "div"), t = `<${e} class="${m}">${i.text.slice(0, s.$anchor.textOffset)}${t}${i.text.slice(s.$head.textOffset)}</${e}>`;
26214
+ i?.object === "inline" && (e = "span"), i?.object === "block" && (e = "div"), t = `<${e} class="${h}">${i.text.slice(0, s.$anchor.textOffset)}${t}${i.text.slice(s.$head.textOffset)}</${e}>`;
26212
26215
  }
26213
26216
  return t;
26214
- }, g = /* @__PURE__ */ P("div", {
26217
+ }, _ = /* @__PURE__ */ P("div", {
26215
26218
  style: {
26216
26219
  background: "white",
26217
26220
  height: 500,
@@ -26222,22 +26225,22 @@ var LM = (e, t) => {
26222
26225
  },
26223
26226
  children: [
26224
26227
  /* @__PURE__ */ N("h2", { children: "Please choose a css class" }),
26225
- m && /* @__PURE__ */ P("div", { children: ["The current parent has this class ", m] }),
26228
+ h && /* @__PURE__ */ P("div", { children: ["The current parent has this class ", h] }),
26226
26229
  /* @__PURE__ */ N(ke, {
26227
26230
  component: "nav",
26228
26231
  style: { overflow: "scroll" },
26229
26232
  children: n.names.map((e, t) => /* @__PURE__ */ P(VM, {
26230
26233
  button: !0,
26231
- onClick: () => p(e),
26234
+ onClick: () => m(e),
26232
26235
  children: [/* @__PURE__ */ N("div", {
26233
26236
  style: { marginRight: 20 },
26234
26237
  children: e
26235
- }), /* @__PURE__ */ N("div", { dangerouslySetInnerHTML: { __html: h(e) } })]
26238
+ }), /* @__PURE__ */ N("div", { dangerouslySetInnerHTML: { __html: g(e) } })]
26236
26239
  }, `rule-${t}`))
26237
26240
  })
26238
26241
  ]
26239
26242
  });
26240
- Nt(() => c.render(g)), (() => {
26243
+ Nt(() => c.render(_)), (() => {
26241
26244
  let t = e.view.nodeDOM(e.state.selection.from)?.parentNode;
26242
26245
  if (t) {
26243
26246
  let e = a.parentElement.parentElement.parentElement.getBoundingClientRect(), n = t.getBoundingClientRect();
@@ -35669,7 +35672,7 @@ var { Panel: MG, toggle: NG, radio: PG } = sW, FG = j(SW)(({ theme: e }) => ({
35669
35672
  }
35670
35673
  }, WG = Object.freeze({
35671
35674
  name: "@pie-element/matrix",
35672
- version: "5.0.7-next.20261019223635"
35675
+ version: "5.0.7-next.20261020062838"
35673
35676
  });
35674
35677
  //#endregion
35675
35678
  export { UG as default, WG as piePackage };