@blocknote/core 0.17.0 → 0.17.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.
package/dist/blocknote.js CHANGED
@@ -9320,22 +9320,27 @@ const nt = (e, t, o) => {
9320
9320
  () => n.command(({ state: r }) => {
9321
9321
  const a = b(r), { depth: s } = r.doc.resolve(
9322
9322
  a.blockContainer.beforePos
9323
- ), l = r.selection.from === a.blockContent.beforePos + 1, d = r.selection.empty, u = a.blockContainer.beforePos === 1, p = Dt(
9324
- r.doc,
9325
- r.doc.resolve(a.blockContainer.beforePos)
9326
- ), h = U(
9327
- r.doc.resolve(p.pos)
9328
- ), f = h.blockContent.node.type.spec.content === "" || h.blockContent.node.type.spec.content === "inline*" && h.blockContent.node.childCount === 0;
9329
- return !u && l && d && s === 1 && f ? i().cut(
9330
- {
9331
- from: a.blockContainer.beforePos,
9332
- to: a.blockContainer.afterPos
9333
- },
9334
- h.blockContainer.afterPos
9335
- ).deleteRange({
9336
- from: h.blockContainer.beforePos,
9337
- to: h.blockContainer.afterPos
9338
- }).run() : !1;
9323
+ ), l = r.selection.from === a.blockContent.beforePos + 1, d = r.selection.empty;
9324
+ if (!(a.blockContainer.beforePos === 1) && l && d && s === 1) {
9325
+ const p = Dt(
9326
+ r.doc,
9327
+ r.doc.resolve(a.blockContainer.beforePos)
9328
+ ), h = U(
9329
+ r.doc.resolve(p.pos)
9330
+ );
9331
+ if (h.blockContent.node.type.spec.content === "" || h.blockContent.node.type.spec.content === "inline*" && h.blockContent.node.childCount === 0)
9332
+ return i().cut(
9333
+ {
9334
+ from: a.blockContainer.beforePos,
9335
+ to: a.blockContainer.afterPos
9336
+ },
9337
+ h.blockContainer.afterPos
9338
+ ).deleteRange({
9339
+ from: h.blockContainer.beforePos,
9340
+ to: h.blockContainer.afterPos
9341
+ }).run();
9342
+ }
9343
+ return !1;
9339
9344
  })
9340
9345
  ]),
9341
9346
  Delete: () => this.editor.commands.first(({ commands: i }) => [