@fileverse-dev/ddoc 3.2.9-sg-1 → 3.2.9-sg-2
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
CHANGED
|
@@ -53301,7 +53301,7 @@ const Vp = (e) => {
|
|
|
53301
53301
|
"data-testid": a ? `comment-card-${a}` : "comment-card",
|
|
53302
53302
|
onClick: k,
|
|
53303
53303
|
className: Ke(
|
|
53304
|
-
"flex flex-col gap-[4px] group comment-card",
|
|
53304
|
+
"flex flex-col gap-[4px] group/card comment-card",
|
|
53305
53305
|
o && "opacity-70",
|
|
53306
53306
|
d ? "p-3 pb-0" : "px-3"
|
|
53307
53307
|
),
|
|
@@ -53319,7 +53319,7 @@ const Vp = (e) => {
|
|
|
53319
53319
|
"div",
|
|
53320
53320
|
{
|
|
53321
53321
|
className: Ke(
|
|
53322
|
-
!M && "opacity-0 group-hover:opacity-100",
|
|
53322
|
+
!M && "opacity-0 group-hover/card:opacity-100",
|
|
53323
53323
|
"flex gap-[4px]"
|
|
53324
53324
|
),
|
|
53325
53325
|
children: [
|
|
@@ -189032,40 +189032,41 @@ const aXe = ({
|
|
|
189032
189032
|
thread: e,
|
|
189033
189033
|
comment: t,
|
|
189034
189034
|
isHidden: n,
|
|
189035
|
-
registerCardNode: r
|
|
189035
|
+
registerCardNode: r,
|
|
189036
|
+
isCollaborationEnabled: o
|
|
189036
189037
|
}) => {
|
|
189037
|
-
const
|
|
189038
|
-
(
|
|
189039
|
-
r(e.floatingCardId,
|
|
189038
|
+
const i = Ne((y) => y.focusFloatingCard), s = Ne((y) => y.focusCommentInEditor), a = Ne((y) => y.isDDocOwner), l = Ne((y) => y.username), u = Ne((y) => y.acceptSuggestion), c = Ne((y) => y.deleteComment), d = Ae(
|
|
189039
|
+
(y) => {
|
|
189040
|
+
r(e.floatingCardId, y);
|
|
189040
189041
|
},
|
|
189041
189042
|
[r, e.floatingCardId]
|
|
189042
189043
|
);
|
|
189043
189044
|
if (!t) return null;
|
|
189044
|
-
const
|
|
189045
|
-
|
|
189046
|
-
},
|
|
189047
|
-
e.commentId && l(e.commentId);
|
|
189048
|
-
}, m = () => {
|
|
189045
|
+
const p = () => {
|
|
189046
|
+
i(e.floatingCardId), !e.isFocused && e.commentId && s(e.commentId);
|
|
189047
|
+
}, h = !!(l && t.username && t.username === l), f = a, g = !a && h, m = () => {
|
|
189049
189048
|
e.commentId && u(e.commentId);
|
|
189049
|
+
}, b = () => {
|
|
189050
|
+
e.commentId && c(e.commentId);
|
|
189050
189051
|
};
|
|
189051
189052
|
return /* @__PURE__ */ x.jsx(
|
|
189052
189053
|
lm,
|
|
189053
189054
|
{
|
|
189054
|
-
ref:
|
|
189055
|
+
ref: d,
|
|
189055
189056
|
floatingCardId: e.floatingCardId,
|
|
189056
189057
|
isHidden: n,
|
|
189057
189058
|
isFocused: e.isFocused,
|
|
189058
|
-
onFocus:
|
|
189059
|
+
onFocus: p,
|
|
189059
189060
|
children: /* @__PURE__ */ x.jsxs("div", { className: "flex group flex-col gap-2 p-3 pb-0", children: [
|
|
189060
189061
|
/* @__PURE__ */ x.jsx(
|
|
189061
189062
|
dXe,
|
|
189062
189063
|
{
|
|
189063
189064
|
username: t.username,
|
|
189064
189065
|
createdAt: t.createdAt,
|
|
189065
|
-
canAcceptReject:
|
|
189066
|
-
canWithdraw:
|
|
189067
|
-
onAccept:
|
|
189068
|
-
onReject:
|
|
189066
|
+
canAcceptReject: f,
|
|
189067
|
+
canWithdraw: g,
|
|
189068
|
+
onAccept: m,
|
|
189069
|
+
onReject: b
|
|
189069
189070
|
}
|
|
189070
189071
|
),
|
|
189071
189072
|
/* @__PURE__ */ x.jsx("div", { className: "ml-[32px]", children: /* @__PURE__ */ x.jsx(pXe, { comment: t }) }),
|
|
@@ -189074,10 +189075,17 @@ const aXe = ({
|
|
|
189074
189075
|
{
|
|
189075
189076
|
thread: e,
|
|
189076
189077
|
comment: t,
|
|
189077
|
-
onFocusRequest:
|
|
189078
|
+
onFocusRequest: p
|
|
189078
189079
|
}
|
|
189079
189080
|
),
|
|
189080
|
-
/* @__PURE__ */ x.jsx(
|
|
189081
|
+
/* @__PURE__ */ x.jsx(
|
|
189082
|
+
fXe,
|
|
189083
|
+
{
|
|
189084
|
+
thread: e,
|
|
189085
|
+
comment: t,
|
|
189086
|
+
isCollaborationEnabled: o
|
|
189087
|
+
}
|
|
189088
|
+
)
|
|
189081
189089
|
] })
|
|
189082
189090
|
}
|
|
189083
189091
|
);
|
|
@@ -189102,7 +189110,7 @@ const aXe = ({
|
|
|
189102
189110
|
}
|
|
189103
189111
|
),
|
|
189104
189112
|
/* @__PURE__ */ x.jsxs("span", { className: "text-body-sm-bold inline-flex items-center gap-1 whitespace-nowrap", children: [
|
|
189105
|
-
/* @__PURE__ */ x.jsx("p", { className: "truncate max-w-[
|
|
189113
|
+
/* @__PURE__ */ x.jsx("p", { className: "truncate max-w-[86px]", children: cf(s.name) }),
|
|
189106
189114
|
s.isEns && /* @__PURE__ */ x.jsx("img", { src: df, alt: "verified", className: "w-3.5 h-3.5" })
|
|
189107
189115
|
] }),
|
|
189108
189116
|
/* @__PURE__ */ x.jsx("span", { className: "text-helper-text-sm color-text-secondary whitespace-nowrap", children: t && m3(t) }),
|
|
@@ -189234,58 +189242,68 @@ const aXe = ({
|
|
|
189234
189242
|
) });
|
|
189235
189243
|
}, fXe = ({
|
|
189236
189244
|
thread: e,
|
|
189237
|
-
comment: t
|
|
189245
|
+
comment: t,
|
|
189246
|
+
isCollaborationEnabled: n
|
|
189238
189247
|
}) => {
|
|
189239
|
-
const
|
|
189248
|
+
const r = Ne((b) => b.username), o = Ne((b) => b.isConnected), i = Ne((b) => b.handleAddReply), s = Ne((b) => b.setCommentDrawerOpen), [a, l] = Me(""), [u, c] = Me(!1), d = je(null), p = !t.resolved && !t.deleted, h = !!a.trim(), f = n ? e.isFocused : o && (e.isFocused || h), g = Ys(r);
|
|
189240
189249
|
_e(() => {
|
|
189241
|
-
|
|
189242
|
-
}, [
|
|
189243
|
-
const
|
|
189244
|
-
if (!(!e.commentId || !
|
|
189245
|
-
if (!
|
|
189246
|
-
|
|
189250
|
+
d.current && Qr(d.current);
|
|
189251
|
+
}, [a]);
|
|
189252
|
+
const m = () => {
|
|
189253
|
+
if (!n && !(!e.commentId || !a.trim())) {
|
|
189254
|
+
if (!o) {
|
|
189255
|
+
s == null || s(!0);
|
|
189247
189256
|
return;
|
|
189248
189257
|
}
|
|
189249
|
-
|
|
189258
|
+
i(e.commentId, a), l(""), c(!1);
|
|
189250
189259
|
}
|
|
189251
189260
|
};
|
|
189252
|
-
return
|
|
189253
|
-
/* @__PURE__ */ x.jsxs(
|
|
189254
|
-
|
|
189255
|
-
|
|
189256
|
-
|
|
189257
|
-
|
|
189258
|
-
|
|
189259
|
-
|
|
189260
|
-
|
|
189261
|
-
|
|
189262
|
-
|
|
189263
|
-
|
|
189264
|
-
|
|
189265
|
-
|
|
189266
|
-
|
|
189267
|
-
|
|
189268
|
-
|
|
189269
|
-
|
|
189270
|
-
|
|
189271
|
-
|
|
189272
|
-
|
|
189273
|
-
|
|
189274
|
-
|
|
189275
|
-
|
|
189276
|
-
|
|
189277
|
-
|
|
189278
|
-
|
|
189279
|
-
|
|
189280
|
-
|
|
189281
|
-
|
|
189282
|
-
|
|
189261
|
+
return p ? e.isFocused && !o && !n ? /* @__PURE__ */ x.jsx(am, {}) : f ? /* @__PURE__ */ x.jsxs("div", { className: "group", children: [
|
|
189262
|
+
/* @__PURE__ */ x.jsxs(
|
|
189263
|
+
"div",
|
|
189264
|
+
{
|
|
189265
|
+
className: Ke(
|
|
189266
|
+
"border flex px-[12px] py-[8px] gap-[8px] rounded-[4px]",
|
|
189267
|
+
n ? "color-bg-disabled" : "color-bg-default"
|
|
189268
|
+
),
|
|
189269
|
+
children: [
|
|
189270
|
+
/* @__PURE__ */ x.jsx(
|
|
189271
|
+
qs,
|
|
189272
|
+
{
|
|
189273
|
+
src: g.isEns ? Pi : `https://api.dicebear.com/9.x/identicon/svg?seed=${encodeURIComponent(
|
|
189274
|
+
g.name || ""
|
|
189275
|
+
)}`,
|
|
189276
|
+
className: "w-[16px] h-[16px]"
|
|
189277
|
+
}
|
|
189278
|
+
),
|
|
189279
|
+
/* @__PURE__ */ x.jsx(
|
|
189280
|
+
Gu,
|
|
189281
|
+
{
|
|
189282
|
+
ref: d,
|
|
189283
|
+
value: a,
|
|
189284
|
+
onChange: (b) => {
|
|
189285
|
+
l(b.target.value), Qr(b.currentTarget);
|
|
189286
|
+
},
|
|
189287
|
+
onFocus: () => c(!0),
|
|
189288
|
+
onBlur: () => c(!1),
|
|
189289
|
+
onInput: (b) => Qr(b.currentTarget),
|
|
189290
|
+
onKeyDown: (b) => {
|
|
189291
|
+
b.key === "Enter" && (!b.shiftKey || b.metaKey) && (b.preventDefault(), m());
|
|
189292
|
+
},
|
|
189293
|
+
className: "color-bg-default w-full text-body-sm color-text-default !p-0 !border-none h-[20px] max-h-[296px] overflow-y-auto no-scrollbar whitespace-pre-wrap",
|
|
189294
|
+
placeholder: n ? "Cannot send reply in collaboration mode" : p ? "Add a reply" : "Thread resolved",
|
|
189295
|
+
disabled: !p || n
|
|
189296
|
+
}
|
|
189297
|
+
)
|
|
189298
|
+
]
|
|
189299
|
+
}
|
|
189300
|
+
),
|
|
189283
189301
|
/* @__PURE__ */ x.jsxs(
|
|
189284
189302
|
"div",
|
|
189285
189303
|
{
|
|
189286
189304
|
className: Ke(
|
|
189287
189305
|
"items-center justify-end gap-2 pt-2",
|
|
189288
|
-
|
|
189306
|
+
h || u ? "flex" : "hidden"
|
|
189289
189307
|
),
|
|
189290
189308
|
children: [
|
|
189291
189309
|
/* @__PURE__ */ x.jsx(
|
|
@@ -189293,8 +189311,8 @@ const aXe = ({
|
|
|
189293
189311
|
{
|
|
189294
189312
|
variant: "ghost",
|
|
189295
189313
|
className: "w-20 min-w-20",
|
|
189296
|
-
onClick: (
|
|
189297
|
-
|
|
189314
|
+
onClick: (b) => {
|
|
189315
|
+
b.stopPropagation(), l(""), c(!1);
|
|
189298
189316
|
},
|
|
189299
189317
|
children: /* @__PURE__ */ x.jsx("p", { className: "text-body-sm-bold", children: "Cancel" })
|
|
189300
189318
|
}
|
|
@@ -189303,8 +189321,8 @@ const aXe = ({
|
|
|
189303
189321
|
Ot,
|
|
189304
189322
|
{
|
|
189305
189323
|
className: "w-20 min-w-20",
|
|
189306
|
-
disabled: !
|
|
189307
|
-
onClick:
|
|
189324
|
+
disabled: !a.trim() || n,
|
|
189325
|
+
onClick: m,
|
|
189308
189326
|
children: "Send"
|
|
189309
189327
|
}
|
|
189310
189328
|
)
|
|
@@ -189559,7 +189577,8 @@ const aXe = ({
|
|
|
189559
189577
|
comment: p,
|
|
189560
189578
|
tabName: r,
|
|
189561
189579
|
isHidden: o,
|
|
189562
|
-
registerCardNode: u
|
|
189580
|
+
registerCardNode: u,
|
|
189581
|
+
isCollaborationEnabled: i
|
|
189563
189582
|
},
|
|
189564
189583
|
d.floatingCardId
|
|
189565
189584
|
) : /* @__PURE__ */ x.jsx(
|
package/dist/package/components/inline-comment/floating-comment/suggestion-thread-floating-card.d.ts
CHANGED
|
@@ -12,4 +12,4 @@ import { ThreadFloatingCardProps } from './types';
|
|
|
12
12
|
* uses — so once a draft is submitted, nothing else in the pipeline needs
|
|
13
13
|
* to change to show the suggestion here.
|
|
14
14
|
*/
|
|
15
|
-
export declare const SuggestionThreadFloatingCard: ({ thread, comment, isHidden, registerCardNode, }: ThreadFloatingCardProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
15
|
+
export declare const SuggestionThreadFloatingCard: ({ thread, comment, isHidden, registerCardNode, isCollaborationEnabled, }: ThreadFloatingCardProps) => import("react/jsx-runtime").JSX.Element | null;
|