@fileverse-dev/ddoc 2.0.6-patch-5 → 2.0.6-patch-6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +26 -21
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -98932,28 +98932,33 @@ const Yg = ({
|
|
98932
98932
|
const {
|
98933
98933
|
selection: { $head: e, from: n },
|
98934
98934
|
doc: r
|
98935
|
-
} = t.state, i = e.node(e.depth - 1),
|
98936
|
-
(
|
98935
|
+
} = t.state, i = e.node(e.depth - 1), s = e.node(e.depth - 2), a = e.toString().split("/"), l = a.some(
|
98936
|
+
(u) => u.includes("bulletList_0") || u.includes("orderedList_0") || u.includes("taskList_0")
|
98937
98937
|
);
|
98938
98938
|
if ((i == null ? void 0 : i.type.name) !== "dBlock") {
|
98939
|
-
let
|
98940
|
-
if (r.descendants((
|
98941
|
-
if (
|
98942
|
-
|
98943
|
-
}),
|
98939
|
+
let u = !1, f = -1;
|
98940
|
+
if (r.descendants((b, w) => {
|
98941
|
+
if (f !== -1) return !1;
|
98942
|
+
b.type.name === "pageBreak" && (u = !0, f = w);
|
98943
|
+
}), u)
|
98944
98944
|
return !0;
|
98945
|
-
const
|
98946
|
-
(
|
98947
|
-
) &&
|
98948
|
-
|
98949
|
-
)
|
98950
|
-
|
98951
|
-
|
98952
|
-
|
98953
|
-
|
98954
|
-
|
98955
|
-
|
98956
|
-
|
98945
|
+
const h = a.some(
|
98946
|
+
(b) => b.includes("listItem_0") || b.includes("taskItem_0")
|
98947
|
+
) && a.some((b) => b.includes("paragraph_0:0")), p = s && ["bulletList", "orderedList", "taskList"].includes(
|
98948
|
+
s.type.name
|
98949
|
+
);
|
98950
|
+
if (h && p)
|
98951
|
+
return t.chain().liftListItem(i.type.name).focus().run();
|
98952
|
+
const g = a.some(
|
98953
|
+
(b) => b.includes("dBlock_0")
|
98954
|
+
) && h && l, v = e.parent.content.size === 0 && a.some((b) => b.includes("paragraph_0:0")) && a.some(
|
98955
|
+
(b) => b.includes("listItem_0") || b.includes("taskItem_0")
|
98956
|
+
) && l && a.length === 4, k = e.node(e.depth - 2).childCount > 1;
|
98957
|
+
if (v) {
|
98958
|
+
const b = e.before(e.depth - 2);
|
98959
|
+
return k ? t.chain().deleteRange({
|
98960
|
+
from: b + 1,
|
98961
|
+
to: b + 1 + i.nodeSize
|
98957
98962
|
}).insertContentAt(n - 4, {
|
98958
98963
|
type: "dBlock",
|
98959
98964
|
content: [
|
@@ -98964,7 +98969,7 @@ const Yg = ({
|
|
98964
98969
|
]
|
98965
98970
|
}).focus().run() : t.chain().liftListItem("listItem").focus().run();
|
98966
98971
|
}
|
98967
|
-
if (
|
98972
|
+
if (g && a.length === 4)
|
98968
98973
|
return t.chain().liftListItem("listItem").insertContentAt(n - 4, {
|
98969
98974
|
type: "dBlock",
|
98970
98975
|
content: [
|
@@ -98974,7 +98979,7 @@ const Yg = ({
|
|
98974
98979
|
]
|
98975
98980
|
}).focus().run();
|
98976
98981
|
}
|
98977
|
-
return e.toString().includes("dBlock_0") && e.parent.content.size === 0 && !
|
98982
|
+
return e.toString().includes("dBlock_0") && e.parent.content.size === 0 && !l ? t.chain().deleteNode("dBlock").focus().run() : !1;
|
98978
98983
|
}
|
98979
98984
|
};
|
98980
98985
|
},
|