@estiva-app/ui 0.106.0 → 0.107.0
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/ConversationCard.d.ts +5 -0
- package/dist/ConversationCard.d.ts.map +1 -1
- package/dist/PinnedComment.d.ts +7 -1
- package/dist/PinnedComment.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +143 -138
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +52 -2
- package/src/ConversationCard.mdx +1 -0
- package/src/ConversationCard.stories.tsx +3 -0
- package/src/ConversationCard.test.tsx +22 -0
- package/src/ConversationCard.tsx +10 -2
- package/src/PinnedComment.tsx +11 -3
- package/src/Thread.stories.tsx +14 -1
- package/src/Thread.tsx +1 -1
- package/src/index.ts +1 -1
- package/src/registry/registry.test.ts +3 -3
package/dist/index.js
CHANGED
|
@@ -6016,16 +6016,32 @@ function useFaceLine(root, active, toDot = false) {
|
|
|
6016
6016
|
return line;
|
|
6017
6017
|
}
|
|
6018
6018
|
|
|
6019
|
+
// src/PinnedComment.tsx
|
|
6020
|
+
import { jsx as jsx81, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
6021
|
+
var goneWords = (deleted) => deleted ? "This comment was deleted." : "This comment can\u2019t be shown.";
|
|
6022
|
+
var GONE_CLOSED = "This thread takes no new replies.";
|
|
6023
|
+
function PinnedComment({ author, time, at: given, words, deleted = false, unseen = false }) {
|
|
6024
|
+
const at = momentOf(given);
|
|
6025
|
+
return /* @__PURE__ */ jsx81(Card, { fill: "elevated", clip: true, children: deleted || unseen ? /* @__PURE__ */ jsx81("p", { className: "p-2 text-caption italic text-text-muted", children: goneWords(deleted) }) : /* @__PURE__ */ jsxs59("div", { className: "flex flex-col p-2", children: [
|
|
6026
|
+
/* @__PURE__ */ jsxs59("div", { className: "flex items-center gap-2", children: [
|
|
6027
|
+
/* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
6028
|
+
/* @__PURE__ */ jsx81("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6029
|
+
/* @__PURE__ */ jsx81(MetaText, { className: "shrink-0", children: at === void 0 ? time : /* @__PURE__ */ jsx81(WithTooltip, { label: exactTime(at), children: /* @__PURE__ */ jsx81("time", { dateTime: new Date(at).toISOString(), children: time }) }) })
|
|
6030
|
+
] }),
|
|
6031
|
+
/* @__PURE__ */ jsx81("div", { className: "pb-2 pl-8 pr-2 pt-1", children: /* @__PURE__ */ jsx81("div", { className: "truncate text-caption text-text-secondary", children: words }) })
|
|
6032
|
+
] }) });
|
|
6033
|
+
}
|
|
6034
|
+
|
|
6019
6035
|
// src/ConversationCard.tsx
|
|
6020
|
-
import { Fragment as Fragment23, jsx as
|
|
6036
|
+
import { Fragment as Fragment23, jsx as jsx82, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6021
6037
|
function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
6022
6038
|
const at = momentOf(given);
|
|
6023
6039
|
const exact = at === void 0 ? void 0 : exactTime(at);
|
|
6024
|
-
const said = at === void 0 ? time : /* @__PURE__ */
|
|
6040
|
+
const said = at === void 0 ? time : /* @__PURE__ */ jsx82("time", { dateTime: new Date(at).toISOString(), children: time });
|
|
6025
6041
|
if (timeHref) {
|
|
6026
|
-
return /* @__PURE__ */
|
|
6042
|
+
return /* @__PURE__ */ jsx82(WithTooltip, { label: exact ? `${exact} \xB7 ${timeLabel}` : timeLabel, wrapperClassName: "shrink-0", children: /* @__PURE__ */ jsx82(MetaText, { className: "contents", children: /* @__PURE__ */ jsx82(Link, { href: timeHref, variant: "quiet", "data-interactive": true, children: said }) }) });
|
|
6027
6043
|
}
|
|
6028
|
-
return /* @__PURE__ */
|
|
6044
|
+
return /* @__PURE__ */ jsx82(MetaText, { className: "shrink-0", children: exact ? /* @__PURE__ */ jsx82(WithTooltip, { label: exact, children: said }) : time });
|
|
6029
6045
|
}
|
|
6030
6046
|
var fadeBefore = (end) => `linear-gradient(to right, black ${end - 16}px, transparent ${end}px)`;
|
|
6031
6047
|
function useClearOfStrip(root, strip, shown2) {
|
|
@@ -6043,15 +6059,15 @@ function useClearOfStrip(root, strip, shown2) {
|
|
|
6043
6059
|
return end;
|
|
6044
6060
|
}
|
|
6045
6061
|
function Head({ author, time, at, timeHref, timeLabel, edited, isNew, urgent, meta, end }) {
|
|
6046
|
-
return /* @__PURE__ */
|
|
6047
|
-
/* @__PURE__ */
|
|
6048
|
-
/* @__PURE__ */
|
|
6049
|
-
/* @__PURE__ */
|
|
6050
|
-
/* @__PURE__ */
|
|
6051
|
-
/* @__PURE__ */
|
|
6062
|
+
return /* @__PURE__ */ jsxs60("div", { className: "flex w-full items-center gap-2", children: [
|
|
6063
|
+
/* @__PURE__ */ jsxs60("div", { "data-head": true, className: "flex min-w-0 flex-1 items-center gap-2", style: end === void 0 ? void 0 : { maskImage: fadeBefore(end), WebkitMaskImage: fadeBefore(end) }, children: [
|
|
6064
|
+
/* @__PURE__ */ jsx82("span", { "data-face": true, className: "relative flex shrink-0", children: /* @__PURE__ */ jsx82(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }) }),
|
|
6065
|
+
/* @__PURE__ */ jsx82("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6066
|
+
/* @__PURE__ */ jsx82(When, { time, at, timeHref, timeLabel }),
|
|
6067
|
+
/* @__PURE__ */ jsx82(EditedMarker, { edited }),
|
|
6052
6068
|
meta
|
|
6053
6069
|
] }),
|
|
6054
|
-
isNew && (urgent ? /* @__PURE__ */
|
|
6070
|
+
isNew && (urgent ? /* @__PURE__ */ jsx82(UrgentMark, {}) : /* @__PURE__ */ jsx82(UnreadDot, {}))
|
|
6055
6071
|
] });
|
|
6056
6072
|
}
|
|
6057
6073
|
function attentionOf(fresh, urgent, inThreadCard) {
|
|
@@ -6059,13 +6075,13 @@ function attentionOf(fresh, urgent, inThreadCard) {
|
|
|
6059
6075
|
return urgent ? "warning" : "accent";
|
|
6060
6076
|
}
|
|
6061
6077
|
function EndedLine({ by, note, at }) {
|
|
6062
|
-
return /* @__PURE__ */
|
|
6063
|
-
/* @__PURE__ */
|
|
6064
|
-
/* @__PURE__ */
|
|
6065
|
-
/* @__PURE__ */
|
|
6066
|
-
/* @__PURE__ */
|
|
6067
|
-
/* @__PURE__ */
|
|
6068
|
-
at && /* @__PURE__ */
|
|
6078
|
+
return /* @__PURE__ */ jsxs60("div", { "data-resolved": "line", className: "relative flex items-start py-1", children: [
|
|
6079
|
+
/* @__PURE__ */ jsx82("span", { className: "flex h-[17px] w-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx82("span", { "data-dot": true, className: "relative z-10 flex size-2 items-center justify-center rounded-full bg-bg-surface", children: /* @__PURE__ */ jsx82("span", { className: "size-1 rounded-full bg-success-default" }) }) }),
|
|
6080
|
+
/* @__PURE__ */ jsxs60("p", { className: "min-w-0 text-h5 leading-snug", children: [
|
|
6081
|
+
/* @__PURE__ */ jsx82("span", { className: "whitespace-nowrap text-text-primary", children: by }),
|
|
6082
|
+
/* @__PURE__ */ jsx82(IconArrowNarrowRight, { size: 12, stroke: 1.5, className: "mx-1.5 -mt-px inline shrink-0 text-text-primary" }),
|
|
6083
|
+
/* @__PURE__ */ jsx82("span", { className: "text-text-secondary", children: note }),
|
|
6084
|
+
at && /* @__PURE__ */ jsxs60(MetaText, { size: "chip", children: [
|
|
6069
6085
|
" \xB7 ",
|
|
6070
6086
|
at
|
|
6071
6087
|
] })
|
|
@@ -6074,13 +6090,13 @@ function EndedLine({ by, note, at }) {
|
|
|
6074
6090
|
}
|
|
6075
6091
|
function ResolvedCheck({ by, note, at }) {
|
|
6076
6092
|
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
6077
|
-
return /* @__PURE__ */
|
|
6078
|
-
/* @__PURE__ */
|
|
6093
|
+
return /* @__PURE__ */ jsx82(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */ jsxs60("span", { className: "flex items-center gap-1 text-caption text-success-default", children: [
|
|
6094
|
+
/* @__PURE__ */ jsx82(IconCircleCheck4, { size: 14, stroke: 1.5 }),
|
|
6079
6095
|
"Resolved"
|
|
6080
6096
|
] }) });
|
|
6081
6097
|
}
|
|
6082
6098
|
function Words({ children }) {
|
|
6083
|
-
return /* @__PURE__ */
|
|
6099
|
+
return /* @__PURE__ */ jsx82("div", { className: "relative w-full break-words pb-2 pl-8 pr-2 pt-1", children: /* @__PURE__ */ jsx82("div", { className: "flex flex-col gap-2 text-body-2 text-text-secondary", children }) });
|
|
6084
6100
|
}
|
|
6085
6101
|
function useReactionRefusal(reactions) {
|
|
6086
6102
|
const [refused, setRefused] = useState23();
|
|
@@ -6107,9 +6123,9 @@ function useReactionRefusal(reactions) {
|
|
|
6107
6123
|
}
|
|
6108
6124
|
function Reactions({ reactions, refused, readOnly }) {
|
|
6109
6125
|
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
6110
|
-
return /* @__PURE__ */
|
|
6111
|
-
reactions && /* @__PURE__ */
|
|
6112
|
-
refused && /* @__PURE__ */
|
|
6126
|
+
return /* @__PURE__ */ jsxs60("div", { className: "relative flex w-full flex-col gap-1 pb-2 pl-8 pt-1", children: [
|
|
6127
|
+
reactions && /* @__PURE__ */ jsx82(ReactionRow, { ...reactions, onToggle: readOnly ? void 0 : reactions.onToggle }),
|
|
6128
|
+
refused && /* @__PURE__ */ jsxs60(FieldLine, { tone: "error", children: [
|
|
6113
6129
|
"Not reacted: ",
|
|
6114
6130
|
refused,
|
|
6115
6131
|
"."
|
|
@@ -6117,9 +6133,9 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
6117
6133
|
] });
|
|
6118
6134
|
}
|
|
6119
6135
|
function Editing({ author, children }) {
|
|
6120
|
-
return /* @__PURE__ */
|
|
6121
|
-
/* @__PURE__ */
|
|
6122
|
-
/* @__PURE__ */
|
|
6136
|
+
return /* @__PURE__ */ jsx82("div", { className: "p-2", children: /* @__PURE__ */ jsxs60("div", { className: "flex items-start gap-2", children: [
|
|
6137
|
+
/* @__PURE__ */ jsx82(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
6138
|
+
/* @__PURE__ */ jsx82("div", { className: "min-w-0 flex-1", children })
|
|
6123
6139
|
] }) });
|
|
6124
6140
|
}
|
|
6125
6141
|
function stillHere(root) {
|
|
@@ -6132,7 +6148,7 @@ function stillHere(root) {
|
|
|
6132
6148
|
}
|
|
6133
6149
|
function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
6134
6150
|
const [answered, setAnswered] = useState23(false);
|
|
6135
|
-
return /* @__PURE__ */
|
|
6151
|
+
return /* @__PURE__ */ jsx82(
|
|
6136
6152
|
ConfirmDialog,
|
|
6137
6153
|
{
|
|
6138
6154
|
title: `Delete this ${noun}?`,
|
|
@@ -6151,7 +6167,7 @@ function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
|
6151
6167
|
}
|
|
6152
6168
|
function ResolveQuestion({ onResolve, refused, onClose }) {
|
|
6153
6169
|
const [answered, setAnswered] = useState23(false);
|
|
6154
|
-
return /* @__PURE__ */
|
|
6170
|
+
return /* @__PURE__ */ jsx82(
|
|
6155
6171
|
ResolveDialog,
|
|
6156
6172
|
{
|
|
6157
6173
|
refused: answered ? refused : void 0,
|
|
@@ -6175,7 +6191,8 @@ function useEditing(editing, onEditingChange) {
|
|
|
6175
6191
|
return [now, set];
|
|
6176
6192
|
}
|
|
6177
6193
|
function ConversationCard(props) {
|
|
6178
|
-
const { author, about, files, reactions, isNew = false, urgent = false, own = false, editor, deleted = false, replies, onReply, resolved, noun = "comment", onResolve, resolveHint, resolveRefused, onReopen, selected, onClick, onDelete, deleteNote, deleteRefused, menu, menuAfter, menuLabel, editLabel, deleteLabel, moreLabel = "More actions", className, children } = props;
|
|
6194
|
+
const { author, about, files, reactions, isNew = false, urgent = false, own = false, editor, deleted: isDeleted = false, unseen = false, replies, onReply, resolved, noun = "comment", onResolve, resolveHint, resolveRefused, onReopen, selected, onClick, onDelete, deleteNote, deleteRefused, menu, menuAfter, menuLabel, editLabel, deleteLabel, moreLabel = "More actions", className, children } = props;
|
|
6195
|
+
const deleted = isDeleted || unseen;
|
|
6179
6196
|
const readOnly = (props.readOnly ?? false) || deleted;
|
|
6180
6197
|
const inThreadCard = useContext14(InThreadCard);
|
|
6181
6198
|
const item = useContext14(InConversationItem);
|
|
@@ -6203,9 +6220,9 @@ function ConversationCard(props) {
|
|
|
6203
6220
|
const reply = onReply ?? item?.show;
|
|
6204
6221
|
const marked = selected ?? (item && !item.under ? item.open : void 0);
|
|
6205
6222
|
const under = !!item?.under;
|
|
6206
|
-
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */
|
|
6207
|
-
return /* @__PURE__ */
|
|
6208
|
-
/* @__PURE__ */
|
|
6223
|
+
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */ jsx82(RepliesRow, { ...replies, onOpen: replies.onOpen ?? (under ? item?.toggle : void 0), open: replies.open ?? (under && !!item?.open), urgent });
|
|
6224
|
+
return /* @__PURE__ */ jsxs60(Fragment23, { children: [
|
|
6225
|
+
/* @__PURE__ */ jsxs60(
|
|
6209
6226
|
Card,
|
|
6210
6227
|
{
|
|
6211
6228
|
ref: root,
|
|
@@ -6230,12 +6247,12 @@ function ConversationCard(props) {
|
|
|
6230
6247
|
setHovered(false);
|
|
6231
6248
|
},
|
|
6232
6249
|
children: [
|
|
6233
|
-
isEditing ? /* @__PURE__ */
|
|
6234
|
-
deleted ? /* @__PURE__ */
|
|
6235
|
-
!!about && /* @__PURE__ */
|
|
6236
|
-
/* @__PURE__ */
|
|
6237
|
-
] }) : /* @__PURE__ */
|
|
6238
|
-
/* @__PURE__ */
|
|
6250
|
+
isEditing ? /* @__PURE__ */ jsx82(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs60("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6251
|
+
deleted ? /* @__PURE__ */ jsxs60(Fragment23, { children: [
|
|
6252
|
+
!!about && /* @__PURE__ */ jsx82("div", { className: "relative w-full pl-8 pr-2", children: about }),
|
|
6253
|
+
/* @__PURE__ */ jsx82("p", { className: cn("w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", !!about && "pt-1"), children: goneWords(isDeleted) })
|
|
6254
|
+
] }) : /* @__PURE__ */ jsxs60(Fragment23, { children: [
|
|
6255
|
+
/* @__PURE__ */ jsx82(
|
|
6239
6256
|
Head,
|
|
6240
6257
|
{
|
|
6241
6258
|
author,
|
|
@@ -6246,24 +6263,24 @@ function ConversationCard(props) {
|
|
|
6246
6263
|
edited: props.edited,
|
|
6247
6264
|
isNew,
|
|
6248
6265
|
urgent,
|
|
6249
|
-
meta: resolved && /* @__PURE__ */
|
|
6266
|
+
meta: resolved && /* @__PURE__ */ jsx82(ResolvedCheck, { by: resolved.by, note: resolved.note, at: resolved.at }),
|
|
6250
6267
|
end: wordsEnd
|
|
6251
6268
|
}
|
|
6252
6269
|
),
|
|
6253
6270
|
!!about && // Under the name, above the words (Katerina, 1 November).
|
|
6254
|
-
/* @__PURE__ */
|
|
6255
|
-
/* @__PURE__ */
|
|
6271
|
+
/* @__PURE__ */ jsx82("div", { className: "relative w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6272
|
+
/* @__PURE__ */ jsx82(Words, { children })
|
|
6256
6273
|
] }),
|
|
6257
|
-
!deleted && files && /* @__PURE__ */
|
|
6258
|
-
/* @__PURE__ */
|
|
6274
|
+
!deleted && files && /* @__PURE__ */ jsx82("div", { className: "relative flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
6275
|
+
/* @__PURE__ */ jsx82(Reactions, { reactions: reactionRow, refused: reactionRefused, readOnly }),
|
|
6259
6276
|
resolved?.note && // Who resolved it and the note, above the way into the replies; the check by the time says "Resolved" (Katerina, 1 November).
|
|
6260
|
-
/* @__PURE__ */
|
|
6261
|
-
repliesRow && /* @__PURE__ */
|
|
6277
|
+
/* @__PURE__ */ jsx82("div", { className: "relative w-full pb-1", children: /* @__PURE__ */ jsx82("div", { className: "-ml-2 w-[calc(100%+8px)]", children: /* @__PURE__ */ jsx82(EndedLine, { by: resolved.by, note: resolved.note, at: resolved.at }) }) }),
|
|
6278
|
+
repliesRow && /* @__PURE__ */ jsx82("div", { className: "relative w-full", children: repliesRow })
|
|
6262
6279
|
] }),
|
|
6263
6280
|
dotLine && // One bar from the face to the dot, measured (useFaceLine): 2px, centred under the 24px face, 8px in.
|
|
6264
6281
|
// Its top and height come from the measure: where the face ends and the dot stands are not known ahead.
|
|
6265
|
-
/* @__PURE__ */
|
|
6266
|
-
showStrip && /* @__PURE__ */
|
|
6282
|
+
/* @__PURE__ */ jsx82("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: dotLine.top, height: dotLine.height } }),
|
|
6283
|
+
showStrip && /* @__PURE__ */ jsx82("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx82(
|
|
6267
6284
|
ConversationActions,
|
|
6268
6285
|
{
|
|
6269
6286
|
options: reactions?.options,
|
|
@@ -6276,10 +6293,10 @@ function ConversationCard(props) {
|
|
|
6276
6293
|
resolved: !!resolved,
|
|
6277
6294
|
onResolve: onResolve && (() => setResolving(true)),
|
|
6278
6295
|
onReopen,
|
|
6279
|
-
more: offersMenu && /* @__PURE__ */
|
|
6296
|
+
more: offersMenu && /* @__PURE__ */ jsx82(
|
|
6280
6297
|
ConversationMenu,
|
|
6281
6298
|
{
|
|
6282
|
-
trigger: /* @__PURE__ */
|
|
6299
|
+
trigger: /* @__PURE__ */ jsx82(ToolbarButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx82(IconDotsVertical4, { size: 16, stroke: 1.5 }) }),
|
|
6283
6300
|
open: menuOpen,
|
|
6284
6301
|
onOpenChange: (open) => {
|
|
6285
6302
|
setMenuOpen(open);
|
|
@@ -6303,15 +6320,15 @@ function ConversationCard(props) {
|
|
|
6303
6320
|
]
|
|
6304
6321
|
}
|
|
6305
6322
|
),
|
|
6306
|
-
deleting && onDelete && /* @__PURE__ */
|
|
6307
|
-
/* @__PURE__ */
|
|
6308
|
-
replies && replies.count > 0 && /* @__PURE__ */
|
|
6323
|
+
deleting && onDelete && /* @__PURE__ */ jsx82(DeleteQuestion, { noun, onDelete, refused: deleteRefused, onClose: () => setDeleting(false), children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx82("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */ jsxs60(Fragment23, { children: [
|
|
6324
|
+
/* @__PURE__ */ jsx82("p", { children: "It is deleted for everyone." }),
|
|
6325
|
+
replies && replies.count > 0 && /* @__PURE__ */ jsxs60("p", { children: [
|
|
6309
6326
|
"Its ",
|
|
6310
6327
|
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
6311
6328
|
"."
|
|
6312
6329
|
] })
|
|
6313
6330
|
] }) }),
|
|
6314
|
-
resolving && onResolve && /* @__PURE__ */
|
|
6331
|
+
resolving && onResolve && /* @__PURE__ */ jsx82(ResolveQuestion, { onResolve, refused: resolveRefused, onClose: () => setResolving(false) })
|
|
6315
6332
|
] });
|
|
6316
6333
|
}
|
|
6317
6334
|
function ReplyCard(props) {
|
|
@@ -6334,8 +6351,8 @@ function ReplyCard(props) {
|
|
|
6334
6351
|
useLayoutEffect7(() => {
|
|
6335
6352
|
if (drawn) drawn.added += 1;
|
|
6336
6353
|
}, [drawn]);
|
|
6337
|
-
return /* @__PURE__ */
|
|
6338
|
-
/* @__PURE__ */
|
|
6354
|
+
return /* @__PURE__ */ jsxs60(Fragment23, { children: [
|
|
6355
|
+
/* @__PURE__ */ jsxs60(
|
|
6339
6356
|
Card,
|
|
6340
6357
|
{
|
|
6341
6358
|
ref: root,
|
|
@@ -6358,15 +6375,15 @@ function ReplyCard(props) {
|
|
|
6358
6375
|
setHovered(false);
|
|
6359
6376
|
},
|
|
6360
6377
|
children: [
|
|
6361
|
-
isEditing ? /* @__PURE__ */
|
|
6362
|
-
/* @__PURE__ */
|
|
6363
|
-
about && /* @__PURE__ */
|
|
6364
|
-
/* @__PURE__ */
|
|
6365
|
-
files && /* @__PURE__ */
|
|
6366
|
-
/* @__PURE__ */
|
|
6378
|
+
isEditing ? /* @__PURE__ */ jsx82(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs60("div", { className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6379
|
+
/* @__PURE__ */ jsx82(Head, { author, time: props.time, at: props.at, timeHref: props.timeHref, timeLabel: props.timeLabel, edited: props.edited, isNew, urgent, end: wordsEnd }),
|
|
6380
|
+
about && /* @__PURE__ */ jsx82("div", { className: "w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6381
|
+
/* @__PURE__ */ jsx82(Words, { children }),
|
|
6382
|
+
files && /* @__PURE__ */ jsx82("div", { className: "flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
6383
|
+
/* @__PURE__ */ jsx82(Reactions, { reactions, refused: reactionRefused, readOnly })
|
|
6367
6384
|
] }),
|
|
6368
6385
|
showStrip && // In a box of its own, as a comment's: the box is what the head measures to keep clear of.
|
|
6369
|
-
/* @__PURE__ */
|
|
6386
|
+
/* @__PURE__ */ jsx82("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx82(
|
|
6370
6387
|
ConversationActions,
|
|
6371
6388
|
{
|
|
6372
6389
|
options: reactions?.options,
|
|
@@ -6375,10 +6392,10 @@ function ReplyCard(props) {
|
|
|
6375
6392
|
setPicking(open);
|
|
6376
6393
|
if (!open) settle();
|
|
6377
6394
|
},
|
|
6378
|
-
more: offersMenu && /* @__PURE__ */
|
|
6395
|
+
more: offersMenu && /* @__PURE__ */ jsx82(
|
|
6379
6396
|
ConversationMenu,
|
|
6380
6397
|
{
|
|
6381
|
-
trigger: /* @__PURE__ */
|
|
6398
|
+
trigger: /* @__PURE__ */ jsx82(ToolbarButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx82(IconDotsVertical4, { size: 16, stroke: 1.5 }) }),
|
|
6382
6399
|
open: menuOpen,
|
|
6383
6400
|
onOpenChange: (next) => {
|
|
6384
6401
|
setMenuOpen(next);
|
|
@@ -6398,7 +6415,7 @@ function ReplyCard(props) {
|
|
|
6398
6415
|
]
|
|
6399
6416
|
}
|
|
6400
6417
|
),
|
|
6401
|
-
deleting && onDelete && /* @__PURE__ */
|
|
6418
|
+
deleting && onDelete && /* @__PURE__ */ jsx82(DeleteQuestion, { noun, onDelete, refused: deleteRefused, onClose: () => setDeleting(false), children: deleteNote === void 0 ? /* @__PURE__ */ jsx82("p", { children: "It is deleted for everyone." }) : typeof deleteNote === "string" ? /* @__PURE__ */ jsx82("p", { children: deleteNote }) : deleteNote })
|
|
6402
6419
|
] });
|
|
6403
6420
|
}
|
|
6404
6421
|
|
|
@@ -6406,27 +6423,27 @@ function ReplyCard(props) {
|
|
|
6406
6423
|
import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect14, useLayoutEffect as useLayoutEffect8, useRef as useRef20, useState as useState25 } from "react";
|
|
6407
6424
|
|
|
6408
6425
|
// src/Panel.tsx
|
|
6409
|
-
import { jsx as
|
|
6426
|
+
import { jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6410
6427
|
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
6411
|
-
return /* @__PURE__ */
|
|
6412
|
-
header ?? /* @__PURE__ */
|
|
6428
|
+
return /* @__PURE__ */ jsxs61("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
6429
|
+
header ?? /* @__PURE__ */ jsx83(ContainerHeader, { title, chevron, actions }),
|
|
6413
6430
|
broken ? (
|
|
6414
6431
|
// The message takes the room the body had and centres itself in it.
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
) : /* @__PURE__ */
|
|
6417
|
-
!broken && footer && /* @__PURE__ */
|
|
6432
|
+
/* @__PURE__ */ jsx83("div", { className: "flex min-h-0 flex-1 flex-col px-4", children })
|
|
6433
|
+
) : /* @__PURE__ */ jsx83(ScrollArea, { className: "min-h-0 flex-1", contentClassName: bodyClassName, viewportRef: bodyRef, onScroll: onBodyScroll, children }),
|
|
6434
|
+
!broken && footer && /* @__PURE__ */ jsx83("div", { className: "shrink-0", children: footer })
|
|
6418
6435
|
] });
|
|
6419
6436
|
}
|
|
6420
6437
|
function Panel(props) {
|
|
6421
|
-
return /* @__PURE__ */
|
|
6438
|
+
return /* @__PURE__ */ jsx83(
|
|
6422
6439
|
ErrorBoundary,
|
|
6423
6440
|
{
|
|
6424
6441
|
label: "panel",
|
|
6425
6442
|
frame: (message) => (
|
|
6426
6443
|
// Only the name comes back with the message: the actions and the footer may be what threw.
|
|
6427
|
-
/* @__PURE__ */
|
|
6444
|
+
/* @__PURE__ */ jsx83(Frame, { title: props.title, chevron: props.chevron, className: props.className, broken: true, children: message })
|
|
6428
6445
|
),
|
|
6429
|
-
children: /* @__PURE__ */
|
|
6446
|
+
children: /* @__PURE__ */ jsx83(Frame, { ...props })
|
|
6430
6447
|
}
|
|
6431
6448
|
);
|
|
6432
6449
|
}
|
|
@@ -6530,11 +6547,11 @@ function useWatchSeen(seen, root, attribute) {
|
|
|
6530
6547
|
}
|
|
6531
6548
|
|
|
6532
6549
|
// src/ConversationLayout.tsx
|
|
6533
|
-
import { Fragment as Fragment25, jsx as
|
|
6550
|
+
import { Fragment as Fragment25, jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6534
6551
|
var threadOf = (item) => typeof item?.thread === "function" ? item.thread() : item?.thread;
|
|
6535
6552
|
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
6536
|
-
if (loading) return /* @__PURE__ */
|
|
6537
|
-
if (items.length === 0) return typeof empty === "string" ? /* @__PURE__ */
|
|
6553
|
+
if (loading) return /* @__PURE__ */ jsx84(SkeletonConversation, {});
|
|
6554
|
+
if (items.length === 0) return typeof empty === "string" ? /* @__PURE__ */ jsx84(EmptyState, { scope: "section", message: empty }) : /* @__PURE__ */ jsx84(Fragment25, { children: empty });
|
|
6538
6555
|
const stateOf = (item) => change && item.thread ? {
|
|
6539
6556
|
under,
|
|
6540
6557
|
open: open === item.id,
|
|
@@ -6543,12 +6560,12 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6543
6560
|
} : null;
|
|
6544
6561
|
const draw2 = (item) => {
|
|
6545
6562
|
if (!under) {
|
|
6546
|
-
return /* @__PURE__ */
|
|
6563
|
+
return /* @__PURE__ */ jsxs62(Fragment24, { children: [
|
|
6547
6564
|
item.before,
|
|
6548
|
-
/* @__PURE__ */
|
|
6565
|
+
/* @__PURE__ */ jsx84("div", { "data-conversation-item": item.id, className: cn("flex flex-col", SHOWN_CLASSES), children: /* @__PURE__ */ jsx84(InConversationItem.Provider, { value: stateOf(item), children: item.card }) })
|
|
6549
6566
|
] }, item.id);
|
|
6550
6567
|
}
|
|
6551
|
-
return /* @__PURE__ */
|
|
6568
|
+
return /* @__PURE__ */ jsx84(UnderItem, { item, isOpen: open === item.id && !!item.thread, state: stateOf(item), caret }, item.id);
|
|
6552
6569
|
};
|
|
6553
6570
|
if (!under) {
|
|
6554
6571
|
const stretches = [];
|
|
@@ -6564,11 +6581,11 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6564
6581
|
seen.set(name, count);
|
|
6565
6582
|
stretches.push({ key: `${item.day === void 0 ? "no-day" : `day:${name}`}#${count}`, day: item.day, items: [item] });
|
|
6566
6583
|
}
|
|
6567
|
-
return /* @__PURE__ */
|
|
6584
|
+
return /* @__PURE__ */ jsxs62(Fragment25, { children: [
|
|
6568
6585
|
above,
|
|
6569
6586
|
stretches.map(
|
|
6570
|
-
(stretch) => stretch.day === void 0 ? /* @__PURE__ */
|
|
6571
|
-
/* @__PURE__ */
|
|
6587
|
+
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx84(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */ jsxs62("div", { className: "flex flex-col gap-2", children: [
|
|
6588
|
+
/* @__PURE__ */ jsx84(Divider, { look: "section", label: stretch.day, sticky: true }),
|
|
6572
6589
|
stretch.items.map(draw2)
|
|
6573
6590
|
] }, stretch.key)
|
|
6574
6591
|
)
|
|
@@ -6576,11 +6593,11 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6576
6593
|
}
|
|
6577
6594
|
const resolved = items.filter((item) => item.resolved);
|
|
6578
6595
|
const gone = items.filter((item) => item.gone && !item.resolved);
|
|
6579
|
-
const group = (title, list) => list.length > 0 && /* @__PURE__ */
|
|
6596
|
+
const group = (title, list) => list.length > 0 && /* @__PURE__ */ jsx84(
|
|
6580
6597
|
CollapsibleSection,
|
|
6581
6598
|
{
|
|
6582
6599
|
title,
|
|
6583
|
-
trailing: /* @__PURE__ */
|
|
6600
|
+
trailing: /* @__PURE__ */ jsx84(Chip, { type: "neutral", label: String(list.length) }),
|
|
6584
6601
|
defaultOpen: false,
|
|
6585
6602
|
openFor: list.some((item) => item.id === open) ? open : void 0,
|
|
6586
6603
|
className: "shrink-0",
|
|
@@ -6588,7 +6605,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6588
6605
|
children: list.map(draw2)
|
|
6589
6606
|
}
|
|
6590
6607
|
);
|
|
6591
|
-
return /* @__PURE__ */
|
|
6608
|
+
return /* @__PURE__ */ jsxs62(Fragment25, { children: [
|
|
6592
6609
|
above,
|
|
6593
6610
|
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
6594
6611
|
group("On deleted blocks", gone),
|
|
@@ -6598,7 +6615,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6598
6615
|
function UnderItem({ item, isOpen, state, caret }) {
|
|
6599
6616
|
const root = useRef20(null);
|
|
6600
6617
|
const line = useFaceLine(root, isOpen);
|
|
6601
|
-
return /* @__PURE__ */
|
|
6618
|
+
return /* @__PURE__ */ jsxs62(
|
|
6602
6619
|
Card,
|
|
6603
6620
|
{
|
|
6604
6621
|
ref: root,
|
|
@@ -6610,13 +6627,13 @@ function UnderItem({ item, isOpen, state, caret }) {
|
|
|
6610
6627
|
quietUntilHover: !isOpen,
|
|
6611
6628
|
className: cn("relative flex flex-col", isOpen && "pb-2", SHOWN_CLASSES),
|
|
6612
6629
|
children: [
|
|
6613
|
-
/* @__PURE__ */
|
|
6614
|
-
/* @__PURE__ */
|
|
6615
|
-
isOpen && /* @__PURE__ */
|
|
6630
|
+
/* @__PURE__ */ jsx84(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx84(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */ jsxs62(LineByLayout.Provider, { value: true, children: [
|
|
6631
|
+
/* @__PURE__ */ jsx84("div", { className: "-m-px flex flex-col", children: item.card }),
|
|
6632
|
+
isOpen && /* @__PURE__ */ jsx84(caretOnOpen.Provider, { value: caret, children: threadOf(item) })
|
|
6616
6633
|
] }) }) }),
|
|
6617
6634
|
line && // The face's line, one bar, last so it stands over a hovered card's fill; 19px in, centred under the face.
|
|
6618
6635
|
// Its top and height come from the measure: where the face and the last reply end are not known ahead.
|
|
6619
|
-
/* @__PURE__ */
|
|
6636
|
+
/* @__PURE__ */ jsx84("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: line.top, height: line.height } })
|
|
6620
6637
|
]
|
|
6621
6638
|
}
|
|
6622
6639
|
);
|
|
@@ -6739,72 +6756,72 @@ function ConversationLayout({
|
|
|
6739
6756
|
// The body at least the column's height: the comments start at its top, and the note under them (`below`) is pushed
|
|
6740
6757
|
// to its foot, so with few comments it sits on the box, as a short conversation's last line does in Peek's two
|
|
6741
6758
|
// columns (Katerina, 2 November); with many it comes after them, and scrolls with them.
|
|
6742
|
-
/* @__PURE__ */
|
|
6743
|
-
/* @__PURE__ */
|
|
6744
|
-
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */
|
|
6759
|
+
/* @__PURE__ */ jsxs62(Panel, { className: cn("w-[384px] flex-none", className), title, actions, bodyRef: setBody, bodyClassName: "flex min-h-full flex-col gap-2 p-3", footer: box && /* @__PURE__ */ jsx84("div", { className: "p-3", children: box }), children: [
|
|
6760
|
+
/* @__PURE__ */ jsx84(List, { items, open, under: true, above, loading, empty, change, caret }),
|
|
6761
|
+
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */ jsx84("div", { className: "mt-auto flex flex-col gap-2", children: below })
|
|
6745
6762
|
] })
|
|
6746
6763
|
);
|
|
6747
6764
|
}
|
|
6748
6765
|
const opened = threadOf(items.find((item) => item.id === open));
|
|
6749
6766
|
const side = opened || aside;
|
|
6750
|
-
return /* @__PURE__ */
|
|
6751
|
-
/* @__PURE__ */
|
|
6767
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
6768
|
+
/* @__PURE__ */ jsx84(
|
|
6752
6769
|
ErrorBoundary,
|
|
6753
6770
|
{
|
|
6754
6771
|
label: "conversation",
|
|
6755
|
-
frame: (message) => /* @__PURE__ */
|
|
6756
|
-
/* @__PURE__ */
|
|
6757
|
-
/* @__PURE__ */
|
|
6772
|
+
frame: (message) => /* @__PURE__ */ jsxs62("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6773
|
+
/* @__PURE__ */ jsx84(ContainerHeader, { title }),
|
|
6774
|
+
/* @__PURE__ */ jsx84("div", { className: "flex min-h-0 flex-1 flex-col px-4", children: message })
|
|
6758
6775
|
] }),
|
|
6759
|
-
children: /* @__PURE__ */
|
|
6776
|
+
children: /* @__PURE__ */ jsxs62("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6760
6777
|
header,
|
|
6761
|
-
/* @__PURE__ */
|
|
6762
|
-
top != null && top !== false && top !== "" && /* @__PURE__ */
|
|
6763
|
-
/* @__PURE__ */
|
|
6764
|
-
/* @__PURE__ */
|
|
6765
|
-
/* @__PURE__ */
|
|
6778
|
+
/* @__PURE__ */ jsxs62(ScrollArea, { className: "min-h-0 flex-1", viewportRef: setBody, onScroll: scrolled, contentClassName: "flex min-h-full flex-col", children: [
|
|
6779
|
+
top != null && top !== false && top !== "" && /* @__PURE__ */ jsx84("div", { className: "shrink-0 px-4 pt-4", children: top }),
|
|
6780
|
+
/* @__PURE__ */ jsx84("div", { className: "min-h-0 flex-1" }),
|
|
6781
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex shrink-0 flex-col gap-2 p-4", children: [
|
|
6782
|
+
/* @__PURE__ */ jsx84(List, { items, open, under: false, above, loading, empty, change, caret }),
|
|
6766
6783
|
!loading && below
|
|
6767
6784
|
] })
|
|
6768
6785
|
] }),
|
|
6769
|
-
box && /* @__PURE__ */
|
|
6786
|
+
box && /* @__PURE__ */ jsx84("div", { className: "shrink-0 p-3", children: /* @__PURE__ */ jsx84(sendsInLayout.Provider, { value: sends, children: box }) })
|
|
6770
6787
|
] })
|
|
6771
6788
|
}
|
|
6772
6789
|
),
|
|
6773
6790
|
side && // Its own catch, as Peek's column had: a thread or a panel that throws says so in the column, and the comments stay.
|
|
6774
6791
|
// One catch per thread, and one for the aside: a thread that threw is let go once it is closed or another opens,
|
|
6775
6792
|
// as Peek's column, drawn only while a thread was open, let it go on closing. Each thread is drawn afresh.
|
|
6776
|
-
/* @__PURE__ */
|
|
6793
|
+
/* @__PURE__ */ jsx84("div", { className: "flex w-[384px] shrink-0 flex-col overflow-hidden border-l border-border-subtle", children: /* @__PURE__ */ jsx84(ErrorBoundary, { label: "thread panel", children: opened ? /* @__PURE__ */ jsx84(caretOnOpen.Provider, { value: caret, children: opened }) : aside }, opened ? `thread:${open}` : "aside") })
|
|
6777
6794
|
] });
|
|
6778
6795
|
}
|
|
6779
6796
|
|
|
6780
6797
|
// src/ConversationPlace.tsx
|
|
6781
|
-
import { jsx as
|
|
6798
|
+
import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6782
6799
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
6783
|
-
return /* @__PURE__ */
|
|
6784
|
-
/* @__PURE__ */
|
|
6785
|
-
/* @__PURE__ */
|
|
6786
|
-
place && /* @__PURE__ */
|
|
6800
|
+
return /* @__PURE__ */ jsxs63("div", { className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
6801
|
+
/* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-2", children: [
|
|
6802
|
+
/* @__PURE__ */ jsx85(Chip, { type: "neutral", label: relation }),
|
|
6803
|
+
place && /* @__PURE__ */ jsx85("span", { className: "truncate text-caption text-text-muted", children: place })
|
|
6787
6804
|
] }),
|
|
6788
6805
|
children
|
|
6789
6806
|
] });
|
|
6790
6807
|
}
|
|
6791
6808
|
|
|
6792
6809
|
// src/QuotedLine.tsx
|
|
6793
|
-
import { jsx as
|
|
6810
|
+
import { jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6794
6811
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
6795
6812
|
function QuotedLine({ words, state = "here", label }) {
|
|
6796
6813
|
const shown2 = words ?? label ?? "";
|
|
6797
6814
|
const inThePage = !!words && state === "here";
|
|
6798
|
-
return /* @__PURE__ */
|
|
6799
|
-
/* @__PURE__ */
|
|
6800
|
-
state !== "here" && /* @__PURE__ */
|
|
6815
|
+
return /* @__PURE__ */ jsxs64("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
6816
|
+
/* @__PURE__ */ jsx86(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx86("p", { className: "line-clamp-2 text-caption text-text-secondary", children: /* @__PURE__ */ jsx86("mark", { className: cn("rounded-sm px-0.5 text-text-primary [box-decoration-break:clone]", inThePage ? "bg-warning-muted" : "bg-bg-inset text-text-secondary", state === "gone" && "line-through"), children: shown2 }) }) }),
|
|
6817
|
+
state !== "here" && /* @__PURE__ */ jsx86("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
6801
6818
|
] });
|
|
6802
6819
|
}
|
|
6803
6820
|
|
|
6804
6821
|
// src/ReactionHorizon.tsx
|
|
6805
|
-
import { Fragment as Fragment26, jsx as
|
|
6822
|
+
import { Fragment as Fragment26, jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6806
6823
|
function Said({ limit, omitted, noun }) {
|
|
6807
|
-
return /* @__PURE__ */
|
|
6824
|
+
return /* @__PURE__ */ jsxs65(Fragment26, { children: [
|
|
6808
6825
|
"Reactions are shown for the latest ",
|
|
6809
6826
|
limit,
|
|
6810
6827
|
" ",
|
|
@@ -6817,11 +6834,11 @@ function Said({ limit, omitted, noun }) {
|
|
|
6817
6834
|
] });
|
|
6818
6835
|
}
|
|
6819
6836
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
6820
|
-
const room = keepRoom && omitted <= 0 && /* @__PURE__ */
|
|
6837
|
+
const room = keepRoom && omitted <= 0 && /* @__PURE__ */ jsx87("p", { "aria-hidden": true, className: "invisible text-caption text-text-muted", children: /* @__PURE__ */ jsx87(Said, { limit, omitted: 1, noun }) });
|
|
6821
6838
|
if (omitted <= 0 && !cut) return room || null;
|
|
6822
|
-
return /* @__PURE__ */
|
|
6823
|
-
/* @__PURE__ */
|
|
6824
|
-
omitted > 0 && /* @__PURE__ */
|
|
6839
|
+
return /* @__PURE__ */ jsxs65(Fragment26, { children: [
|
|
6840
|
+
/* @__PURE__ */ jsxs65("p", { className: "text-caption text-text-muted", children: [
|
|
6841
|
+
omitted > 0 && /* @__PURE__ */ jsx87(Said, { limit, omitted, noun }),
|
|
6825
6842
|
omitted > 0 && cut && " ",
|
|
6826
6843
|
cut && "Some reactions may be missing."
|
|
6827
6844
|
] }),
|
|
@@ -6829,20 +6846,6 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
6829
6846
|
] });
|
|
6830
6847
|
}
|
|
6831
6848
|
|
|
6832
|
-
// src/PinnedComment.tsx
|
|
6833
|
-
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6834
|
-
function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
6835
|
-
const at = momentOf(given);
|
|
6836
|
-
return /* @__PURE__ */ jsx87(Card, { fill: "elevated", clip: true, children: deleted ? /* @__PURE__ */ jsx87("p", { className: "p-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */ jsxs65("div", { className: "flex flex-col p-2", children: [
|
|
6837
|
-
/* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2", children: [
|
|
6838
|
-
/* @__PURE__ */ jsx87(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
6839
|
-
/* @__PURE__ */ jsx87("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6840
|
-
/* @__PURE__ */ jsx87(MetaText, { className: "shrink-0", children: at === void 0 ? time : /* @__PURE__ */ jsx87(WithTooltip, { label: exactTime(at), children: /* @__PURE__ */ jsx87("time", { dateTime: new Date(at).toISOString(), children: time }) }) })
|
|
6841
|
-
] }),
|
|
6842
|
-
/* @__PURE__ */ jsx87("div", { className: "pb-2 pl-8 pr-2 pt-1", children: /* @__PURE__ */ jsx87("div", { className: "truncate text-caption text-text-secondary", children: words }) })
|
|
6843
|
-
] }) });
|
|
6844
|
-
}
|
|
6845
|
-
|
|
6846
6849
|
// src/ArchiveDialog.tsx
|
|
6847
6850
|
import { useState as useState26 } from "react";
|
|
6848
6851
|
import { jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
@@ -7014,7 +7017,7 @@ function Thread({
|
|
|
7014
7017
|
] }),
|
|
7015
7018
|
footer: foot && /* @__PURE__ */ jsx92("div", { className: "p-3", children: foot }),
|
|
7016
7019
|
children: [
|
|
7017
|
-
start && /* @__PURE__ */ jsx92("div", { className: cn("px-4 pb-2 pt-4", SHOWN_CLASSES), "data-thread-start": start.id, children: /* @__PURE__ */ jsx92(PinnedComment, { author: start.author, time: start.time, at: start.at, words: start.words, deleted: start.deleted }) }),
|
|
7020
|
+
start && /* @__PURE__ */ jsx92("div", { className: cn("px-4 pb-2 pt-4", SHOWN_CLASSES), "data-thread-start": start.id, children: /* @__PURE__ */ jsx92(PinnedComment, { author: start.author, time: start.time, at: start.at, words: start.words, deleted: start.deleted, unseen: start.unseen }) }),
|
|
7018
7021
|
/* @__PURE__ */ jsx92(Divider, { look: "section", label: "Replies", className: "px-4 py-2" }),
|
|
7019
7022
|
/* @__PURE__ */ jsx92("div", { className: "flex flex-col gap-2 px-4 pb-4", children: /* @__PURE__ */ jsx92(caretOnOpen.Provider, { value: 0, children: /* @__PURE__ */ jsx92(repliesDrawn.Provider, { value: drawn, children: /* @__PURE__ */ jsx92(Replies, { loading, empty, children }) }) }) })
|
|
7020
7023
|
]
|
|
@@ -7378,6 +7381,7 @@ export {
|
|
|
7378
7381
|
FilePicker,
|
|
7379
7382
|
Form,
|
|
7380
7383
|
FormDialog,
|
|
7384
|
+
GONE_CLOSED,
|
|
7381
7385
|
INLINE_CHIP_CLASSES,
|
|
7382
7386
|
INLINE_CHIP_TONE_CLASSES,
|
|
7383
7387
|
IconButton,
|
|
@@ -7475,6 +7479,7 @@ export {
|
|
|
7475
7479
|
caretOnOpen,
|
|
7476
7480
|
chosenOf,
|
|
7477
7481
|
cn,
|
|
7482
|
+
goneWords,
|
|
7478
7483
|
hueFor,
|
|
7479
7484
|
inTheBox,
|
|
7480
7485
|
initialsFor,
|