@fileverse-dev/ddoc 2.0.6-patch-5 → 2.0.6-patch-7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +58 -31
- package/dist/style.css +1 -1
- 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
|
},
|
@@ -136085,19 +136090,41 @@ const imt = sn.create({
|
|
136085
136090
|
const n = () => {
|
136086
136091
|
t.commands.unsetPageBreak(), e();
|
136087
136092
|
};
|
136088
|
-
return /* @__PURE__ */ z.
|
136093
|
+
return /* @__PURE__ */ z.jsxs(
|
136089
136094
|
E2,
|
136090
136095
|
{
|
136091
136096
|
as: "div",
|
136092
|
-
className: _t(
|
136093
|
-
|
136094
|
-
|
136095
|
-
|
136096
|
-
|
136097
|
-
|
136098
|
-
|
136099
|
-
|
136100
|
-
|
136097
|
+
className: _t(
|
136098
|
+
"flex relative opacity-0 hover:opacity-100 transition-opacity duration-200 w-full h-full justify-center items-center"
|
136099
|
+
),
|
136100
|
+
children: [
|
136101
|
+
/* @__PURE__ */ z.jsx("div", { className: "absolute top-[-15px] left-0 right-0 h-4", children: /* @__PURE__ */ z.jsx(
|
136102
|
+
"div",
|
136103
|
+
{
|
136104
|
+
className: "absolute inset-0 border-b-1 border-transparent",
|
136105
|
+
style: {
|
136106
|
+
background: "linear-gradient(to bottom, transparent, #FFDF0A33)"
|
136107
|
+
}
|
136108
|
+
}
|
136109
|
+
) }),
|
136110
|
+
/* @__PURE__ */ z.jsx(Ld, { sideOffset: 5, position: "bottom", text: "Remove page breaker", children: /* @__PURE__ */ z.jsx(
|
136111
|
+
Ke,
|
136112
|
+
{
|
136113
|
+
name: "PageBreakRemove",
|
136114
|
+
onClick: n,
|
136115
|
+
className: "text-[#77818A] cursor-pointer"
|
136116
|
+
}
|
136117
|
+
) }),
|
136118
|
+
/* @__PURE__ */ z.jsx("div", { className: "absolute bottom-[-15px] left-0 right-0 h-4", children: /* @__PURE__ */ z.jsx(
|
136119
|
+
"div",
|
136120
|
+
{
|
136121
|
+
className: "absolute inset-0 border-b-1 border-transparent",
|
136122
|
+
style: {
|
136123
|
+
background: "linear-gradient(to bottom, #FFDF0A33, transparent)"
|
136124
|
+
}
|
136125
|
+
}
|
136126
|
+
) })
|
136127
|
+
]
|
136101
136128
|
}
|
136102
136129
|
);
|
136103
136130
|
}, dmt = zt.create({
|