@blocknote/core 0.51.0 → 0.51.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.
@@ -21,8 +21,8 @@ function Le(e) {
21
21
  function Re(t, n, r, i) {
22
22
  let a;
23
23
  if (!n) throw Error("blockContent is required");
24
- if (typeof n == "string") a = e([n], t.pmSchema);
25
- else if (Array.isArray(n)) a = e(n, t.pmSchema);
24
+ if (typeof n == "string") a = e([n], t.pmSchema, i?.blockType);
25
+ else if (Array.isArray(n)) a = e(n, t.pmSchema, i?.blockType);
26
26
  else if (n.type === "tableContent") a = ee(n, t.pmSchema);
27
27
  else throw new re(n.type);
28
28
  let o = (i?.document ?? document).createDocumentFragment();
@@ -76,7 +76,10 @@ function ze(e, t, n, r, i, a, o, s) {
76
76
  Le(m.dom.firstChild), o > 0 && m.dom.firstChild.setAttribute("data-nesting-level", o.toString()), h.append(...Array.from(m.dom.childNodes));
77
77
  } else h.append(m.dom), o > 0 && m.dom.setAttribute("data-nesting-level", o.toString());
78
78
  if (m.contentDOM && n.content) {
79
- let e = Re(t, n.content, r, s);
79
+ let e = Re(t, n.content, r, {
80
+ ...s,
81
+ blockType: n.type
82
+ });
80
83
  m.contentDOM.appendChild(e);
81
84
  }
82
85
  let g;
@@ -1752,4 +1755,4 @@ var on = v(({ editor: e }) => {
1752
1755
  //#endregion
1753
1756
  export { j as C, Ke as D, qe as E, O, Ze as S, k as T, ct as _, Zt as a, ot as b, Jt as c, W as d, _t as f, lt as g, ut as h, Q as i, Vt as l, ft as m, rn as n, Yt as o, mt as p, nn as r, J as s, on as t, Bt as u, st as v, A as w, $e as x, at as y };
1754
1757
 
1755
- //# sourceMappingURL=extensions-CQFfm5f5.js.map
1758
+ //# sourceMappingURL=extensions-D2mx2C9y.js.map