@fileverse-dev/ddoc 2.0.9-patch-11 → 2.0.9-patch-12
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 +47 -43
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -81475,6 +81475,37 @@ const y$ = {
|
|
81475
81475
|
};
|
81476
81476
|
return /* @__PURE__ */ P.jsxs("div", { className: "w-full bg-transparent py-2 px-4 items-center h-9 flex justify-between relative", children: [
|
81477
81477
|
/* @__PURE__ */ P.jsxs("div", { className: "flex h-9 items-center gap-1 justify-center", children: [
|
81478
|
+
/* @__PURE__ */ P.jsx(
|
81479
|
+
Ro,
|
81480
|
+
{
|
81481
|
+
align: "start",
|
81482
|
+
anchorTrigger: /* @__PURE__ */ P.jsxs(
|
81483
|
+
"button",
|
81484
|
+
{
|
81485
|
+
className: "bg-transparent hover:!bg-[#F2F4F5] rounded py-2 px-4 flex items-center gap-2",
|
81486
|
+
onClick: () => {
|
81487
|
+
},
|
81488
|
+
children: [
|
81489
|
+
/* @__PURE__ */ P.jsx("span", { className: "text-body-sm", children: ((b = g.find((x) => x.value === n)) == null ? void 0 : b.title) || "100%" }),
|
81490
|
+
/* @__PURE__ */ P.jsx($e, { name: "ChevronDown", size: "sm" })
|
81491
|
+
]
|
81492
|
+
}
|
81493
|
+
),
|
81494
|
+
content: /* @__PURE__ */ P.jsx("div", { className: "zoom-level-options w-[110px] text-body-sm scroll-smooth bg-white px-1 py-2 shadow-elevation-1 transition-all rounded", children: g.map((x) => /* @__PURE__ */ P.jsx(
|
81495
|
+
"button",
|
81496
|
+
{
|
81497
|
+
className: "hover:bg-[#f2f2f2] rounded py-1 px-2 w-full text-left flex items-center space-x-2 text-sm text-black transition",
|
81498
|
+
onClick: () => {
|
81499
|
+
r(x.value);
|
81500
|
+
},
|
81501
|
+
children: x.title
|
81502
|
+
},
|
81503
|
+
x.title
|
81504
|
+
)) })
|
81505
|
+
},
|
81506
|
+
"zoom-levels"
|
81507
|
+
),
|
81508
|
+
/* @__PURE__ */ P.jsx("div", { className: "w-[2px] h-4 bg-gray-200 mx-2" }),
|
81478
81509
|
/* @__PURE__ */ P.jsx("div", { className: "flex gap-1 justify-center items-center", children: u.map((x, S) => x ? /* @__PURE__ */ P.jsx(Td, { text: x.title, children: /* @__PURE__ */ P.jsx(
|
81479
81510
|
J1,
|
81480
81511
|
{
|
@@ -81501,9 +81532,9 @@ const y$ = {
|
|
81501
81532
|
className: "bg-transparent hover:!bg-[#F2F4F5] rounded py-2 px-4 flex items-center justify-center gap-2 w-fit",
|
81502
81533
|
onClick: () => l(Lt.FONT_FAMILY),
|
81503
81534
|
children: [
|
81504
|
-
/* @__PURE__ */ P.jsx("span", { className: "text-body-sm", children: ((
|
81535
|
+
/* @__PURE__ */ P.jsx("span", { className: "text-body-sm", children: ((w = s$.find(
|
81505
81536
|
(x) => t == null ? void 0 : t.isActive("textStyle", { fontFamily: x.value })
|
81506
|
-
)) == null ? void 0 :
|
81537
|
+
)) == null ? void 0 : w.title) || "Font" }),
|
81507
81538
|
/* @__PURE__ */ P.jsx($e, { name: "ChevronDown", size: "sm" })
|
81508
81539
|
]
|
81509
81540
|
}
|
@@ -81520,36 +81551,6 @@ const y$ = {
|
|
81520
81551
|
Lt.FONT_FAMILY
|
81521
81552
|
),
|
81522
81553
|
/* @__PURE__ */ P.jsx("div", { className: "w-[2px] h-4 bg-gray-200 mx-2" }),
|
81523
|
-
/* @__PURE__ */ P.jsx(
|
81524
|
-
Ro,
|
81525
|
-
{
|
81526
|
-
anchorTrigger: /* @__PURE__ */ P.jsxs(
|
81527
|
-
"button",
|
81528
|
-
{
|
81529
|
-
className: "bg-transparent hover:bg-gray-200 rounded py-2 px-4 flex items-center gap-2",
|
81530
|
-
onClick: () => {
|
81531
|
-
},
|
81532
|
-
children: [
|
81533
|
-
/* @__PURE__ */ P.jsx("span", { className: "text-body-sm", children: ((w = g.find((x) => x.value === n)) == null ? void 0 : w.title) || "100%" }),
|
81534
|
-
/* @__PURE__ */ P.jsx($e, { name: "ChevronDown", size: "sm" })
|
81535
|
-
]
|
81536
|
-
}
|
81537
|
-
),
|
81538
|
-
content: /* @__PURE__ */ P.jsx("div", { className: "zoom-level-options w-[110px] text-body-sm", children: g.map((x) => /* @__PURE__ */ P.jsx(
|
81539
|
-
"button",
|
81540
|
-
{
|
81541
|
-
className: "hover:bg-gray-200 rounded py-1 px-2 w-full text-left",
|
81542
|
-
onClick: () => {
|
81543
|
-
r(x.value);
|
81544
|
-
},
|
81545
|
-
children: x.title
|
81546
|
-
},
|
81547
|
-
x.title
|
81548
|
-
)) })
|
81549
|
-
},
|
81550
|
-
"zoom-levels"
|
81551
|
-
),
|
81552
|
-
/* @__PURE__ */ P.jsx("div", { className: "w-[2px] h-4 bg-gray-200 mx-2" }),
|
81553
81554
|
/* @__PURE__ */ P.jsx(
|
81554
81555
|
Ro,
|
81555
81556
|
{
|
@@ -99677,24 +99678,27 @@ const Jg = ({
|
|
99677
99678
|
}
|
99678
99679
|
},
|
99679
99680
|
Backspace: ({ editor: t }) => {
|
99680
|
-
var v, k, b;
|
99681
|
+
var g, v, k, b, w;
|
99681
99682
|
const {
|
99682
99683
|
selection: { $head: e, from: n, to: r },
|
99683
99684
|
doc: i
|
99684
|
-
} = t.state
|
99685
|
+
} = t.state;
|
99686
|
+
if (n !== r)
|
99687
|
+
return n <= 2 ? !1 : t.chain().deleteSelection().focus().run();
|
99688
|
+
const s = e.node(e.depth - 1), o = e.node(e.depth), l = e.start() === n;
|
99685
99689
|
if (n === 2 && n === r)
|
99686
99690
|
return t.chain().deleteNode(this.name).focus().run();
|
99687
99691
|
const u = (s == null ? void 0 : s.type.name) === "listItem" || (s == null ? void 0 : s.type.name) === "taskItem", f = (s == null ? void 0 : s.type.name) === "taskItem", d = (o == null ? void 0 : o.textContent) === "";
|
99688
99692
|
if ((s == null ? void 0 : s.type.name) !== "dBlock") {
|
99689
|
-
let
|
99690
|
-
if (i.descendants((
|
99691
|
-
if (
|
99692
|
-
|
99693
|
-
}),
|
99693
|
+
let x = !1, S = -1;
|
99694
|
+
if (i.descendants((E, L) => {
|
99695
|
+
if (S !== -1) return !1;
|
99696
|
+
E.type.name === "pageBreak" && (x = !0, S = L);
|
99697
|
+
}), x)
|
99694
99698
|
return !0;
|
99695
99699
|
}
|
99696
|
-
const h = ((
|
99697
|
-
return
|
99700
|
+
const h = n > 4 ? ((g = i.nodeAt(n - 4)) == null ? void 0 : g.type.name) === "dBlock" : !1, p = n > 2 ? ((v = i.nodeAt(n - 2)) == null ? void 0 : v.type.name) === "listItem" || ((k = i.nodeAt(n - 2)) == null ? void 0 : k.type.name) === "taskItem" : !1, m = ((b = e.node(e.depth - 2)) == null ? void 0 : b.childCount) > 1 || ((w = e.node(e.depth - 1)) == null ? void 0 : w.childCount) > 1;
|
99701
|
+
return l && u ? d && h ? m ? !0 : t.commands.deleteNode(this.name) : p ? t.commands.liftListItem(
|
99698
99702
|
f ? "taskItem" : "listItem"
|
99699
99703
|
) : t.commands.joinTextblockBackward() : !1;
|
99700
99704
|
}
|
@@ -142109,7 +142113,7 @@ const Rse = ({ children: t, exitBeforeEnter: e, custom: n, initial: r = !0, onEx
|
|
142109
142113
|
{
|
142110
142114
|
id: "toolbar",
|
142111
142115
|
className: Pt(
|
142112
|
-
"z-50 hidden xl:flex items-center justify-center w-full h-[52px] fixed left-0 px-1 bg-[#ffffff] border-b color-border-default transition-transform duration-300 top-[3.
|
142116
|
+
"z-50 hidden xl:flex items-center justify-center w-full h-[52px] fixed left-0 px-1 bg-[#ffffff] border-b color-border-default transition-transform duration-300 top-[3.5rem]",
|
142113
142117
|
{
|
142114
142118
|
"translate-y-0": H,
|
142115
142119
|
"translate-y-[-108%]": !H
|
@@ -142134,7 +142138,7 @@ const Rse = ({ children: t, exitBeforeEnter: e, custom: n, initial: r = !0, onEx
|
|
142134
142138
|
{
|
142135
142139
|
className: Pt(
|
142136
142140
|
"bg-white w-full mx-auto rounded",
|
142137
|
-
{ "mt-
|
142141
|
+
{ "mt-4 md:!mt-16": t },
|
142138
142142
|
{ "md:!mt-16": !t },
|
142139
142143
|
{ "pt-20 md:!mt-[7.5rem]": H && !t },
|
142140
142144
|
{ "pt-6 md:!mt-16": !H && !t },
|