@simoncomputing/mui-bueno-v2 0.35.2 → 0.35.4

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.es.js CHANGED
@@ -39238,7 +39238,7 @@ const qne = /* @__PURE__ */ lr(Une), Yp = "rgba(194, 249, 112, .5)", Gp = "rgba(
39238
39238
  if (!t.added && !t.removed) return n;
39239
39239
  const r = t.added ? Yp : Gp, o = t.added ? "u" : "s";
39240
39240
  return `<${o}><mark key={${e}} data-color="${r}" style={{ backgroundColor: ${r}, color: "inherit"}}>${n}</mark></${o}>`;
39241
- }, ME = (t) => t.split(",").map((e) => e.trim()), Gne = (t, e) => Qq(t, e).map(P1).join(""), Jne = (t, e) => rK(t, e).map(P1).join(""), Xne = (t, e) => sK(ME(t), ME(e)).map(P1).join(", "), Zne = (t, e) => {
39241
+ }, ME = (t) => t.split(",").map((e) => e.trim()), Gne = (t, e) => Qq(t, e).map(P1).join(""), Jne = (t, e) => rK(t, e).map(P1).join(""), Xne = (t, e) => sK(ME(t).filter(Boolean), ME(e).filter(Boolean)).map(P1).join(", "), Zne = (t, e) => {
39242
39242
  let n = qne.execute(t, e);
39243
39243
  return n = n.replaceAll(
39244
39244
  /<ins class="(diffmod|diffins)">/g,
@@ -63127,50 +63127,63 @@ const UA = tc(void 0), qA = () => {
63127
63127
  const x = b.map((S) => S.id);
63128
63128
  x.length === 0 ? setTimeout(i, 0) : x.length !== s.length && setTimeout(() => o({ ids: b.map((S) => S.id) }), 0);
63129
63129
  }, [a, s, l]), p.length !== 0)
63130
- return /* @__PURE__ */ v(O1, { as: "span", ...e, "data-testid": "citation-node-component", children: /* @__PURE__ */ v(
63131
- No,
63130
+ return /* @__PURE__ */ v(
63131
+ O1,
63132
63132
  {
63133
- title: /* @__PURE__ */ v(Pe, { className: "citation-tooltip", children: p.map((b, g) => {
63134
- var k;
63135
- const S = !!b.fileName ? [b.title, b.fileName] : [
63136
- b.title,
63137
- b.source,
63138
- b.details,
63139
- (k = b.accessedAt) == null ? void 0 : k.slice(0, 10),
63140
- b.url,
63141
- b.classification
63142
- ];
63143
- return /* @__PURE__ */ Z(Xe, { variant: "subtitle2", children: [
63144
- S.filter(Boolean).join(" | "),
63145
- g < p.length - 1 && /* @__PURE__ */ v(vs, { className: "citation-tooltip-divider" })
63146
- ] }, b.id);
63147
- }) }),
63148
- slotProps: {
63149
- tooltip: {
63150
- sx: {
63151
- maxWidth: 500
63152
- }
63153
- }
63133
+ as: "span",
63134
+ ...e,
63135
+ "data-testid": "citation-node-component",
63136
+ "data-drag-handle": !0,
63137
+ onDragOver: (b) => b.preventDefault(),
63138
+ onDrop: () => {
63154
63139
  },
63155
63140
  children: /* @__PURE__ */ v(
63156
- "a",
63141
+ No,
63157
63142
  {
63158
- href: "#",
63159
- onClick: (b) => {
63160
- b.preventDefault(), b.stopPropagation();
63143
+ title: /* @__PURE__ */ v(Pe, { className: "citation-tooltip", children: p.map((b, g) => {
63144
+ var k;
63145
+ const S = !!b.fileName ? [b.title, b.fileName] : [
63146
+ b.title,
63147
+ b.source,
63148
+ b.details,
63149
+ (k = b.accessedAt) == null ? void 0 : k.slice(0, 10),
63150
+ b.url,
63151
+ b.classification
63152
+ ];
63153
+ return /* @__PURE__ */ Z(Xe, { variant: "subtitle2", children: [
63154
+ S.filter(Boolean).join(" | "),
63155
+ g < p.length - 1 && /* @__PURE__ */ v(vs, { className: "citation-tooltip-divider" })
63156
+ ] }, b.id);
63157
+ }) }),
63158
+ slotProps: {
63159
+ tooltip: {
63160
+ sx: {
63161
+ maxWidth: 500
63162
+ }
63163
+ }
63161
63164
  },
63162
- className: n ? "selected-citation-link" : "citation-link",
63163
- children: u
63165
+ children: /* @__PURE__ */ v(
63166
+ "a",
63167
+ {
63168
+ href: "#",
63169
+ onClick: (b) => {
63170
+ b.preventDefault(), b.stopPropagation();
63171
+ },
63172
+ className: n ? "selected-citation-link" : "citation-link",
63173
+ children: u
63174
+ }
63175
+ )
63164
63176
  }
63165
63177
  )
63166
63178
  }
63167
- ) });
63179
+ );
63168
63180
  }, zfe = ln.create({
63169
63181
  name: "citation",
63170
63182
  group: "inline",
63171
63183
  inline: !0,
63172
63184
  atom: !0,
63173
63185
  selectable: !0,
63186
+ draggable: !0,
63174
63187
  addAttributes() {
63175
63188
  return {
63176
63189
  ids: {
@@ -63199,6 +63212,24 @@ const UA = tc(void 0), qA = () => {
63199
63212
  new cn({
63200
63213
  props: {
63201
63214
  handleClickOn: (t, e, n, r, o, i) => n && n.type.name === "citation" ? (this.editor.commands.openCitationBubbleMenu({}, r), !0) : !1
63215
+ },
63216
+ // used to combine adjacent citation nodes (after drop/paste)
63217
+ appendTransaction(t, e, n) {
63218
+ if (!t.some((i) => i.docChanged))
63219
+ return null;
63220
+ let r = n.tr, o = !1;
63221
+ return n.doc.descendants((i, s) => {
63222
+ if (i.type.name !== "citation")
63223
+ return;
63224
+ const a = s + i.nodeSize, l = n.doc.nodeAt(a);
63225
+ if (l && l.type === i.type) {
63226
+ const u = [.../* @__PURE__ */ new Set([...i.attrs.ids, ...l.attrs.ids])], f = i.type.create({
63227
+ ...i.attrs,
63228
+ ids: u
63229
+ });
63230
+ return r.replaceWith(s, a + l.nodeSize, f), o = !0, !1;
63231
+ }
63232
+ }), o ? r : null;
63202
63233
  }
63203
63234
  })
63204
63235
  ];