@estiva-app/ui 0.104.0 → 0.104.3
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/ContainerHeader.d.ts.map +1 -1
- package/dist/ConversationCard.d.ts +8 -2
- package/dist/ConversationCard.d.ts.map +1 -1
- package/dist/ConversationLayout.d.ts +4 -1
- package/dist/ConversationLayout.d.ts.map +1 -1
- package/dist/ResolveDialog.d.ts.map +1 -1
- package/dist/index.js +151 -102
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- package/registry.json +2 -2
- package/src/ContainerHeader.mdx +2 -0
- package/src/ContainerHeader.test.tsx +6 -0
- package/src/ContainerHeader.tsx +3 -1
- package/src/ConversationCard.mdx +4 -2
- package/src/ConversationCard.stories.tsx +14 -0
- package/src/ConversationCard.test.tsx +130 -2
- package/src/ConversationCard.tsx +128 -56
- package/src/ConversationLayout.mdx +4 -0
- package/src/ConversationLayout.tsx +4 -1
- package/src/PageHeader.mdx +1 -0
- package/src/ReplyCard.mdx +1 -0
- package/src/ResolveDialog.test.tsx +11 -0
- package/src/ResolveDialog.tsx +5 -2
- package/src/gates/gates.test.ts +13 -1
package/dist/index.js
CHANGED
|
@@ -1658,7 +1658,9 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1658
1658
|
// (pl-2.5 + the button's px-1.5 = pl-4): the words stay where a title's
|
|
1659
1659
|
// are, and the fill is inside the bar — a negative margin had it clipped
|
|
1660
1660
|
// (Katerina, 5 October).
|
|
1661
|
-
|
|
1661
|
+
// 12px between the title and the buttons, as between the right group's own parts: a cut title, and a button
|
|
1662
|
+
// after it, ran right up to them (Leaf's adoption review, 4 November). A bar whose title fits does not move.
|
|
1663
|
+
/* @__PURE__ */ jsxs16("div", { className: cn("flex h-12 shrink-0 items-center justify-between gap-3 overflow-hidden border-b border-border-subtle py-2 pr-4", titleMenu != null ? "pl-2.5" : "pl-4", className), children: [
|
|
1662
1664
|
/* @__PURE__ */ jsx23("div", { className: cn("flex items-center gap-2 overflow-hidden", text ? "shrink-0" : "min-w-0 flex-1"), children: titleMenu != null ? /* @__PURE__ */ jsx23(
|
|
1663
1665
|
Menu,
|
|
1664
1666
|
{
|
|
@@ -5891,12 +5893,15 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
5891
5893
|
|
|
5892
5894
|
// src/ResolveDialog.tsx
|
|
5893
5895
|
import { useState as useState21 } from "react";
|
|
5894
|
-
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
5896
|
+
import { jsx as jsx80, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5895
5897
|
function ResolveDialog({ onResolve, onCancel, refused }) {
|
|
5896
5898
|
const [note, setNote] = useState21("");
|
|
5897
5899
|
return (
|
|
5898
5900
|
// Outlined at rest and green on hover in Signal, the kit's `resolve` look.
|
|
5899
|
-
/* @__PURE__ */ jsx80(FormDialog, { title: "Resolve", submitLabel: "Resolve", submitVariant: "resolve", onSubmit: () => onResolve(note), onClose: onCancel, children: /* @__PURE__ */
|
|
5901
|
+
/* @__PURE__ */ jsx80(FormDialog, { title: "Resolve", submitLabel: "Resolve", submitVariant: "resolve", onSubmit: () => onResolve(note), onClose: onCancel, children: /* @__PURE__ */ jsxs58(Field, { label: "Resolution message (optional)", children: [
|
|
5902
|
+
/* @__PURE__ */ jsx80(Textarea, { autoFocus: true, value: note, onChange: (e) => setNote(e.target.value), placeholder: "Summarize the outcome or decision...", className: "h-[109px]" }),
|
|
5903
|
+
refused && /* @__PURE__ */ jsx80(FieldLine, { tone: "error", children: refused })
|
|
5904
|
+
] }) })
|
|
5900
5905
|
);
|
|
5901
5906
|
}
|
|
5902
5907
|
|
|
@@ -5943,7 +5948,7 @@ function useFaceLine(root, active, toDot = false) {
|
|
|
5943
5948
|
}
|
|
5944
5949
|
|
|
5945
5950
|
// src/ConversationCard.tsx
|
|
5946
|
-
import { Fragment as Fragment23, jsx as jsx81, jsxs as
|
|
5951
|
+
import { Fragment as Fragment23, jsx as jsx81, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5947
5952
|
function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
5948
5953
|
const at = momentOf(given);
|
|
5949
5954
|
const exact = at === void 0 ? void 0 : exactTime(at);
|
|
@@ -5953,9 +5958,24 @@ function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
|
5953
5958
|
}
|
|
5954
5959
|
return /* @__PURE__ */ jsx81(MetaText, { className: "shrink-0", children: exact ? /* @__PURE__ */ jsx81(WithTooltip, { label: exact, children: said }) : time });
|
|
5955
5960
|
}
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5961
|
+
var fadeBefore = (end) => `linear-gradient(to right, black ${end - 16}px, transparent ${end}px)`;
|
|
5962
|
+
function useClearOfStrip(root, strip, shown2) {
|
|
5963
|
+
const [end, setEnd] = useState23();
|
|
5964
|
+
useLayoutEffect7(() => {
|
|
5965
|
+
const words = root.current?.querySelector("[data-head]");
|
|
5966
|
+
if (!shown2 || !words || !strip.current) {
|
|
5967
|
+
setEnd(void 0);
|
|
5968
|
+
return;
|
|
5969
|
+
}
|
|
5970
|
+
const stop = strip.current.getBoundingClientRect().left - 8;
|
|
5971
|
+
const reach = Math.max(...Array.from(words.children, (part) => part.getBoundingClientRect().right));
|
|
5972
|
+
setEnd(reach > stop ? stop - words.getBoundingClientRect().left : void 0);
|
|
5973
|
+
}, [root, strip, shown2]);
|
|
5974
|
+
return end;
|
|
5975
|
+
}
|
|
5976
|
+
function Head({ author, time, at, timeHref, timeLabel, edited, isNew, urgent, meta, end }) {
|
|
5977
|
+
return /* @__PURE__ */ jsxs59("div", { className: "flex w-full items-center gap-2", children: [
|
|
5978
|
+
/* @__PURE__ */ jsxs59("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: [
|
|
5959
5979
|
/* @__PURE__ */ jsx81("span", { "data-face": true, className: "relative flex shrink-0", children: /* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }) }),
|
|
5960
5980
|
/* @__PURE__ */ jsx81("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
5961
5981
|
/* @__PURE__ */ jsx81(When, { time, at, timeHref, timeLabel }),
|
|
@@ -5970,13 +5990,13 @@ function attentionOf(fresh, urgent, inThreadCard) {
|
|
|
5970
5990
|
return urgent ? "warning" : "accent";
|
|
5971
5991
|
}
|
|
5972
5992
|
function EndedLine({ by, note, at }) {
|
|
5973
|
-
return /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ jsxs59("div", { "data-resolved": "line", className: "relative flex items-start py-1", children: [
|
|
5974
5994
|
/* @__PURE__ */ jsx81("span", { className: "flex h-[17px] w-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx81("span", { "data-dot": true, className: "relative z-10 flex size-2 items-center justify-center rounded-full bg-bg-surface", children: /* @__PURE__ */ jsx81("span", { className: "size-1 rounded-full bg-success-default" }) }) }),
|
|
5975
|
-
/* @__PURE__ */
|
|
5995
|
+
/* @__PURE__ */ jsxs59("p", { className: "min-w-0 text-h5 leading-snug", children: [
|
|
5976
5996
|
/* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-text-primary", children: by }),
|
|
5977
5997
|
/* @__PURE__ */ jsx81(IconArrowNarrowRight, { size: 12, stroke: 1.5, className: "mx-1.5 -mt-px inline shrink-0 text-text-primary" }),
|
|
5978
5998
|
/* @__PURE__ */ jsx81("span", { className: "text-text-secondary", children: note }),
|
|
5979
|
-
at && /* @__PURE__ */
|
|
5999
|
+
at && /* @__PURE__ */ jsxs59(MetaText, { size: "chip", children: [
|
|
5980
6000
|
" \xB7 ",
|
|
5981
6001
|
at
|
|
5982
6002
|
] })
|
|
@@ -5985,7 +6005,7 @@ function EndedLine({ by, note, at }) {
|
|
|
5985
6005
|
}
|
|
5986
6006
|
function ResolvedCheck({ by, note, at }) {
|
|
5987
6007
|
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
5988
|
-
return /* @__PURE__ */ jsx81(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */
|
|
6008
|
+
return /* @__PURE__ */ jsx81(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */ jsxs59("span", { className: "flex items-center gap-1 text-caption text-success-default", children: [
|
|
5989
6009
|
/* @__PURE__ */ jsx81(IconCircleCheck4, { size: 14, stroke: 1.5 }),
|
|
5990
6010
|
"Resolved"
|
|
5991
6011
|
] }) });
|
|
@@ -5995,9 +6015,9 @@ function Words({ children }) {
|
|
|
5995
6015
|
}
|
|
5996
6016
|
function Reactions({ reactions, refused, readOnly }) {
|
|
5997
6017
|
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
5998
|
-
return /* @__PURE__ */
|
|
6018
|
+
return /* @__PURE__ */ jsxs59("div", { className: "relative flex w-full flex-col gap-1 pb-2 pl-8 pt-1", children: [
|
|
5999
6019
|
reactions && /* @__PURE__ */ jsx81(ReactionRow, { ...reactions, onToggle: readOnly ? void 0 : reactions.onToggle }),
|
|
6000
|
-
refused && /* @__PURE__ */
|
|
6020
|
+
refused && /* @__PURE__ */ jsxs59(FieldLine, { tone: "error", children: [
|
|
6001
6021
|
"Not reacted: ",
|
|
6002
6022
|
refused,
|
|
6003
6023
|
"."
|
|
@@ -6005,7 +6025,7 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
6005
6025
|
] });
|
|
6006
6026
|
}
|
|
6007
6027
|
function Editing({ author, children }) {
|
|
6008
|
-
return /* @__PURE__ */ jsx81("div", { className: "p-2", children: /* @__PURE__ */
|
|
6028
|
+
return /* @__PURE__ */ jsx81("div", { className: "p-2", children: /* @__PURE__ */ jsxs59("div", { className: "flex items-start gap-2", children: [
|
|
6009
6029
|
/* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
6010
6030
|
/* @__PURE__ */ jsx81("div", { className: "min-w-0 flex-1", children })
|
|
6011
6031
|
] }) });
|
|
@@ -6018,6 +6038,41 @@ function stillHere(root) {
|
|
|
6018
6038
|
return root.matches(":hover");
|
|
6019
6039
|
}
|
|
6020
6040
|
}
|
|
6041
|
+
function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
6042
|
+
const [answered, setAnswered] = useState23(false);
|
|
6043
|
+
return /* @__PURE__ */ jsx81(
|
|
6044
|
+
ConfirmDialog,
|
|
6045
|
+
{
|
|
6046
|
+
title: `Delete this ${noun}?`,
|
|
6047
|
+
confirmLabel: `Delete ${noun}`,
|
|
6048
|
+
destructive: true,
|
|
6049
|
+
onConfirm: async () => {
|
|
6050
|
+
const ok = await onDelete();
|
|
6051
|
+
setAnswered(true);
|
|
6052
|
+
return ok;
|
|
6053
|
+
},
|
|
6054
|
+
onClose,
|
|
6055
|
+
refused: answered ? refused : void 0,
|
|
6056
|
+
children
|
|
6057
|
+
}
|
|
6058
|
+
);
|
|
6059
|
+
}
|
|
6060
|
+
function ResolveQuestion({ onResolve, refused, onClose }) {
|
|
6061
|
+
const [answered, setAnswered] = useState23(false);
|
|
6062
|
+
return /* @__PURE__ */ jsx81(
|
|
6063
|
+
ResolveDialog,
|
|
6064
|
+
{
|
|
6065
|
+
refused: answered ? refused : void 0,
|
|
6066
|
+
onCancel: onClose,
|
|
6067
|
+
onResolve: async (note) => {
|
|
6068
|
+
const ok = await onResolve(note);
|
|
6069
|
+
setAnswered(true);
|
|
6070
|
+
if (ok !== false) onClose();
|
|
6071
|
+
return ok;
|
|
6072
|
+
}
|
|
6073
|
+
}
|
|
6074
|
+
);
|
|
6075
|
+
}
|
|
6021
6076
|
function useEditing(editing, onEditingChange) {
|
|
6022
6077
|
const [own, setOwn] = useState23(false);
|
|
6023
6078
|
const now = editing ?? own;
|
|
@@ -6048,14 +6103,16 @@ function ConversationCard(props) {
|
|
|
6048
6103
|
const settle = () => requestAnimationFrame(() => setHovered(stillHere(root.current)));
|
|
6049
6104
|
const offersMenu = !!resolves || !!menu || !!menuAfter || own && (!!editor || !!onDelete);
|
|
6050
6105
|
const showStrip = hovered && !isEditing && !readOnly;
|
|
6106
|
+
const strip = useRef19(null);
|
|
6107
|
+
const wordsEnd = useClearOfStrip(root, strip, showStrip);
|
|
6051
6108
|
const react = reactions?.onToggle;
|
|
6052
6109
|
const press = onClick ?? (readOnly && !replies?.count ? void 0 : item?.toggle);
|
|
6053
6110
|
const reply = onReply ?? item?.show;
|
|
6054
6111
|
const marked = selected ?? (item && !item.under ? item.open : void 0);
|
|
6055
6112
|
const under = !!item?.under;
|
|
6056
6113
|
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */ jsx81(RepliesRow, { ...replies, onOpen: replies.onOpen ?? (under ? item?.toggle : void 0), open: replies.open ?? (under && !!item?.open), urgent });
|
|
6057
|
-
return /* @__PURE__ */
|
|
6058
|
-
/* @__PURE__ */
|
|
6114
|
+
return /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6115
|
+
/* @__PURE__ */ jsxs59(
|
|
6059
6116
|
Card,
|
|
6060
6117
|
{
|
|
6061
6118
|
ref: root,
|
|
@@ -6080,11 +6137,11 @@ function ConversationCard(props) {
|
|
|
6080
6137
|
setHovered(false);
|
|
6081
6138
|
},
|
|
6082
6139
|
children: [
|
|
6083
|
-
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */
|
|
6084
|
-
deleted ? /* @__PURE__ */
|
|
6140
|
+
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs59("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6141
|
+
deleted ? /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6085
6142
|
!!about && /* @__PURE__ */ jsx81("div", { className: "relative w-full pl-8 pr-2", children: about }),
|
|
6086
6143
|
/* @__PURE__ */ jsx81("p", { className: cn("w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", !!about && "pt-1"), children: "This comment was deleted." })
|
|
6087
|
-
] }) : /* @__PURE__ */
|
|
6144
|
+
] }) : /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6088
6145
|
/* @__PURE__ */ jsx81(
|
|
6089
6146
|
Head,
|
|
6090
6147
|
{
|
|
@@ -6096,7 +6153,8 @@ function ConversationCard(props) {
|
|
|
6096
6153
|
edited: props.edited,
|
|
6097
6154
|
isNew,
|
|
6098
6155
|
urgent,
|
|
6099
|
-
meta: resolved && /* @__PURE__ */ jsx81(ResolvedCheck, { by: resolved.by, note: resolved.note, at: resolved.at })
|
|
6156
|
+
meta: resolved && /* @__PURE__ */ jsx81(ResolvedCheck, { by: resolved.by, note: resolved.note, at: resolved.at }),
|
|
6157
|
+
end: wordsEnd
|
|
6100
6158
|
}
|
|
6101
6159
|
),
|
|
6102
6160
|
!!about && // Under the name, above the words (Katerina, 1 November).
|
|
@@ -6112,7 +6170,7 @@ function ConversationCard(props) {
|
|
|
6112
6170
|
dotLine && // One bar from the face to the dot, measured (useFaceLine): 2px, centred under the 24px face, 8px in.
|
|
6113
6171
|
// Its top and height come from the measure: where the face ends and the dot stands are not known ahead.
|
|
6114
6172
|
/* @__PURE__ */ jsx81("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: dotLine.top, height: dotLine.height } }),
|
|
6115
|
-
showStrip && /* @__PURE__ */ jsx81("div", { className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx81(
|
|
6173
|
+
showStrip && /* @__PURE__ */ jsx81("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx81(
|
|
6116
6174
|
ConversationActions,
|
|
6117
6175
|
{
|
|
6118
6176
|
options: reactions?.options,
|
|
@@ -6152,26 +6210,15 @@ function ConversationCard(props) {
|
|
|
6152
6210
|
]
|
|
6153
6211
|
}
|
|
6154
6212
|
),
|
|
6155
|
-
deleting && onDelete && /* @__PURE__ */ jsx81(
|
|
6213
|
+
deleting && onDelete && /* @__PURE__ */ jsx81(DeleteQuestion, { noun, onDelete, refused: deleteRefused, onClose: () => setDeleting(false), children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx81("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6156
6214
|
/* @__PURE__ */ jsx81("p", { children: "It is deleted for everyone." }),
|
|
6157
|
-
replies && replies.count > 0 && /* @__PURE__ */
|
|
6215
|
+
replies && replies.count > 0 && /* @__PURE__ */ jsxs59("p", { children: [
|
|
6158
6216
|
"Its ",
|
|
6159
6217
|
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
6160
6218
|
"."
|
|
6161
6219
|
] })
|
|
6162
6220
|
] }) }),
|
|
6163
|
-
resolving && onResolve && /* @__PURE__ */ jsx81(
|
|
6164
|
-
ResolveDialog,
|
|
6165
|
-
{
|
|
6166
|
-
refused: resolveRefused,
|
|
6167
|
-
onCancel: () => setResolving(false),
|
|
6168
|
-
onResolve: async (note) => {
|
|
6169
|
-
const ok = await onResolve(note);
|
|
6170
|
-
if (ok !== false) setResolving(false);
|
|
6171
|
-
return ok;
|
|
6172
|
-
}
|
|
6173
|
-
}
|
|
6174
|
-
)
|
|
6221
|
+
resolving && onResolve && /* @__PURE__ */ jsx81(ResolveQuestion, { onResolve, refused: resolveRefused, onClose: () => setResolving(false) })
|
|
6175
6222
|
] });
|
|
6176
6223
|
}
|
|
6177
6224
|
function ReplyCard(props) {
|
|
@@ -6186,13 +6233,15 @@ function ReplyCard(props) {
|
|
|
6186
6233
|
const offersMenu = !!menu || !!menuAfter || own && (!!editor || !!onDelete);
|
|
6187
6234
|
const showStrip = hovered && !isEditing && !readOnly && (offersMenu || !!reactions?.onToggle);
|
|
6188
6235
|
const root = useRef19(null);
|
|
6236
|
+
const strip = useRef19(null);
|
|
6237
|
+
const wordsEnd = useClearOfStrip(root, strip, showStrip);
|
|
6189
6238
|
const settle = () => requestAnimationFrame(() => setHovered(stillHere(root.current)));
|
|
6190
6239
|
const drawn = useContext14(repliesDrawn);
|
|
6191
6240
|
useLayoutEffect7(() => {
|
|
6192
6241
|
if (drawn) drawn.added += 1;
|
|
6193
6242
|
}, [drawn]);
|
|
6194
|
-
return /* @__PURE__ */
|
|
6195
|
-
/* @__PURE__ */
|
|
6243
|
+
return /* @__PURE__ */ jsxs59(Fragment23, { children: [
|
|
6244
|
+
/* @__PURE__ */ jsxs59(
|
|
6196
6245
|
Card,
|
|
6197
6246
|
{
|
|
6198
6247
|
ref: root,
|
|
@@ -6215,17 +6264,17 @@ function ReplyCard(props) {
|
|
|
6215
6264
|
setHovered(false);
|
|
6216
6265
|
},
|
|
6217
6266
|
children: [
|
|
6218
|
-
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */
|
|
6219
|
-
/* @__PURE__ */ jsx81(Head, { author, time: props.time, at: props.at, timeHref: props.timeHref, timeLabel: props.timeLabel, edited: props.edited, isNew, urgent }),
|
|
6267
|
+
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs59("div", { className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6268
|
+
/* @__PURE__ */ jsx81(Head, { author, time: props.time, at: props.at, timeHref: props.timeHref, timeLabel: props.timeLabel, edited: props.edited, isNew, urgent, end: wordsEnd }),
|
|
6220
6269
|
about && /* @__PURE__ */ jsx81("div", { className: "w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6221
6270
|
/* @__PURE__ */ jsx81(Words, { children }),
|
|
6222
6271
|
files && /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
6223
6272
|
/* @__PURE__ */ jsx81(Reactions, { reactions, refused: reactionRefused, readOnly })
|
|
6224
6273
|
] }),
|
|
6225
|
-
showStrip &&
|
|
6274
|
+
showStrip && // In a box of its own, as a comment's: the box is what the head measures to keep clear of.
|
|
6275
|
+
/* @__PURE__ */ jsx81("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx81(
|
|
6226
6276
|
ConversationActions,
|
|
6227
6277
|
{
|
|
6228
|
-
className: "absolute right-1 top-1 z-10",
|
|
6229
6278
|
options: reactions?.options,
|
|
6230
6279
|
onReact: reactions?.onToggle,
|
|
6231
6280
|
onPickerOpenChange: (open) => {
|
|
@@ -6251,11 +6300,11 @@ function ReplyCard(props) {
|
|
|
6251
6300
|
}
|
|
6252
6301
|
)
|
|
6253
6302
|
}
|
|
6254
|
-
)
|
|
6303
|
+
) })
|
|
6255
6304
|
]
|
|
6256
6305
|
}
|
|
6257
6306
|
),
|
|
6258
|
-
deleting && onDelete && /* @__PURE__ */ jsx81(
|
|
6307
|
+
deleting && onDelete && /* @__PURE__ */ jsx81(DeleteQuestion, { noun, onDelete, refused: deleteRefused, onClose: () => setDeleting(false), children: deleteNote === void 0 ? /* @__PURE__ */ jsx81("p", { children: "It is deleted for everyone." }) : typeof deleteNote === "string" ? /* @__PURE__ */ jsx81("p", { children: deleteNote }) : deleteNote })
|
|
6259
6308
|
] });
|
|
6260
6309
|
}
|
|
6261
6310
|
|
|
@@ -6263,9 +6312,9 @@ function ReplyCard(props) {
|
|
|
6263
6312
|
import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect14, useLayoutEffect as useLayoutEffect8, useRef as useRef20, useState as useState25 } from "react";
|
|
6264
6313
|
|
|
6265
6314
|
// src/Panel.tsx
|
|
6266
|
-
import { jsx as jsx82, jsxs as
|
|
6315
|
+
import { jsx as jsx82, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6267
6316
|
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
6268
|
-
return /* @__PURE__ */
|
|
6317
|
+
return /* @__PURE__ */ jsxs60("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
6269
6318
|
header ?? /* @__PURE__ */ jsx82(ContainerHeader, { title, chevron, actions }),
|
|
6270
6319
|
broken ? (
|
|
6271
6320
|
// The message takes the room the body had and centres itself in it.
|
|
@@ -6387,7 +6436,7 @@ function useWatchSeen(seen, root, attribute) {
|
|
|
6387
6436
|
}
|
|
6388
6437
|
|
|
6389
6438
|
// src/ConversationLayout.tsx
|
|
6390
|
-
import { Fragment as Fragment25, jsx as jsx83, jsxs as
|
|
6439
|
+
import { Fragment as Fragment25, jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6391
6440
|
var threadOf = (item) => typeof item?.thread === "function" ? item.thread() : item?.thread;
|
|
6392
6441
|
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
6393
6442
|
if (loading) return /* @__PURE__ */ jsx83(SkeletonConversation, {});
|
|
@@ -6400,7 +6449,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6400
6449
|
} : null;
|
|
6401
6450
|
const draw2 = (item) => {
|
|
6402
6451
|
if (!under) {
|
|
6403
|
-
return /* @__PURE__ */
|
|
6452
|
+
return /* @__PURE__ */ jsxs61(Fragment24, { children: [
|
|
6404
6453
|
item.before,
|
|
6405
6454
|
/* @__PURE__ */ jsx83("div", { "data-conversation-item": item.id, className: cn("flex flex-col", SHOWN_CLASSES), children: /* @__PURE__ */ jsx83(InConversationItem.Provider, { value: stateOf(item), children: item.card }) })
|
|
6406
6455
|
] }, item.id);
|
|
@@ -6421,10 +6470,10 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6421
6470
|
seen.set(name, count);
|
|
6422
6471
|
stretches.push({ key: `${item.day === void 0 ? "no-day" : `day:${name}`}#${count}`, day: item.day, items: [item] });
|
|
6423
6472
|
}
|
|
6424
|
-
return /* @__PURE__ */
|
|
6473
|
+
return /* @__PURE__ */ jsxs61(Fragment25, { children: [
|
|
6425
6474
|
above,
|
|
6426
6475
|
stretches.map(
|
|
6427
|
-
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx83(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */
|
|
6476
|
+
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx83(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */ jsxs61("div", { className: "flex flex-col gap-2", children: [
|
|
6428
6477
|
/* @__PURE__ */ jsx83(Divider, { look: "section", label: stretch.day, sticky: true }),
|
|
6429
6478
|
stretch.items.map(draw2)
|
|
6430
6479
|
] }, stretch.key)
|
|
@@ -6445,7 +6494,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6445
6494
|
children: list.map(draw2)
|
|
6446
6495
|
}
|
|
6447
6496
|
);
|
|
6448
|
-
return /* @__PURE__ */
|
|
6497
|
+
return /* @__PURE__ */ jsxs61(Fragment25, { children: [
|
|
6449
6498
|
above,
|
|
6450
6499
|
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
6451
6500
|
group("On deleted blocks", gone),
|
|
@@ -6455,7 +6504,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6455
6504
|
function UnderItem({ item, isOpen, state, caret }) {
|
|
6456
6505
|
const root = useRef20(null);
|
|
6457
6506
|
const line = useFaceLine(root, isOpen);
|
|
6458
|
-
return /* @__PURE__ */
|
|
6507
|
+
return /* @__PURE__ */ jsxs61(
|
|
6459
6508
|
Card,
|
|
6460
6509
|
{
|
|
6461
6510
|
ref: root,
|
|
@@ -6467,7 +6516,7 @@ function UnderItem({ item, isOpen, state, caret }) {
|
|
|
6467
6516
|
quietUntilHover: !isOpen,
|
|
6468
6517
|
className: cn("relative flex flex-col", isOpen && "pb-2", SHOWN_CLASSES),
|
|
6469
6518
|
children: [
|
|
6470
|
-
/* @__PURE__ */ jsx83(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx83(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */
|
|
6519
|
+
/* @__PURE__ */ jsx83(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx83(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */ jsxs61(LineByLayout.Provider, { value: true, children: [
|
|
6471
6520
|
/* @__PURE__ */ jsx83("div", { className: "-m-px flex flex-col", children: item.card }),
|
|
6472
6521
|
isOpen && /* @__PURE__ */ jsx83(caretOnOpen.Provider, { value: caret, children: threadOf(item) })
|
|
6473
6522
|
] }) }) }),
|
|
@@ -6596,7 +6645,7 @@ function ConversationLayout({
|
|
|
6596
6645
|
// The body at least the column's height: the comments start at its top, and the note under them (`below`) is pushed
|
|
6597
6646
|
// to its foot, so with few comments it sits on the box, as a short conversation's last line does in Peek's two
|
|
6598
6647
|
// columns (Katerina, 2 November); with many it comes after them, and scrolls with them.
|
|
6599
|
-
/* @__PURE__ */
|
|
6648
|
+
/* @__PURE__ */ jsxs61(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__ */ jsx83("div", { className: "p-3", children: box }), children: [
|
|
6600
6649
|
/* @__PURE__ */ jsx83(List, { items, open, under: true, above, loading, empty, change, caret }),
|
|
6601
6650
|
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */ jsx83("div", { className: "mt-auto flex flex-col gap-2", children: below })
|
|
6602
6651
|
] })
|
|
@@ -6604,21 +6653,21 @@ function ConversationLayout({
|
|
|
6604
6653
|
}
|
|
6605
6654
|
const opened = threadOf(items.find((item) => item.id === open));
|
|
6606
6655
|
const side = opened || aside;
|
|
6607
|
-
return /* @__PURE__ */
|
|
6656
|
+
return /* @__PURE__ */ jsxs61("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
6608
6657
|
/* @__PURE__ */ jsx83(
|
|
6609
6658
|
ErrorBoundary,
|
|
6610
6659
|
{
|
|
6611
6660
|
label: "conversation",
|
|
6612
|
-
frame: (message) => /* @__PURE__ */
|
|
6661
|
+
frame: (message) => /* @__PURE__ */ jsxs61("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6613
6662
|
/* @__PURE__ */ jsx83(ContainerHeader, { title }),
|
|
6614
6663
|
/* @__PURE__ */ jsx83("div", { className: "flex min-h-0 flex-1 flex-col px-4", children: message })
|
|
6615
6664
|
] }),
|
|
6616
|
-
children: /* @__PURE__ */
|
|
6665
|
+
children: /* @__PURE__ */ jsxs61("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6617
6666
|
header,
|
|
6618
|
-
/* @__PURE__ */
|
|
6667
|
+
/* @__PURE__ */ jsxs61(ScrollArea, { className: "min-h-0 flex-1", viewportRef: setBody, onScroll: scrolled, contentClassName: "flex min-h-full flex-col", children: [
|
|
6619
6668
|
top != null && top !== false && top !== "" && /* @__PURE__ */ jsx83("div", { className: "shrink-0 px-4 pt-4", children: top }),
|
|
6620
6669
|
/* @__PURE__ */ jsx83("div", { className: "min-h-0 flex-1" }),
|
|
6621
|
-
/* @__PURE__ */
|
|
6670
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex shrink-0 flex-col gap-2 p-4", children: [
|
|
6622
6671
|
/* @__PURE__ */ jsx83(List, { items, open, under: false, above, loading, empty, change, caret }),
|
|
6623
6672
|
!loading && below
|
|
6624
6673
|
] })
|
|
@@ -6635,10 +6684,10 @@ function ConversationLayout({
|
|
|
6635
6684
|
}
|
|
6636
6685
|
|
|
6637
6686
|
// src/ConversationPlace.tsx
|
|
6638
|
-
import { jsx as jsx84, jsxs as
|
|
6687
|
+
import { jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6639
6688
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
6640
|
-
return /* @__PURE__ */
|
|
6641
|
-
/* @__PURE__ */
|
|
6689
|
+
return /* @__PURE__ */ jsxs62("div", { className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
6690
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex items-center gap-2", children: [
|
|
6642
6691
|
/* @__PURE__ */ jsx84(Chip, { type: "neutral", label: relation }),
|
|
6643
6692
|
place && /* @__PURE__ */ jsx84("span", { className: "truncate text-caption text-text-muted", children: place })
|
|
6644
6693
|
] }),
|
|
@@ -6647,21 +6696,21 @@ function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
|
6647
6696
|
}
|
|
6648
6697
|
|
|
6649
6698
|
// src/QuotedLine.tsx
|
|
6650
|
-
import { jsx as jsx85, jsxs as
|
|
6699
|
+
import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6651
6700
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
6652
6701
|
function QuotedLine({ words, state = "here", label }) {
|
|
6653
6702
|
const shown2 = words ?? label ?? "";
|
|
6654
6703
|
const inThePage = !!words && state === "here";
|
|
6655
|
-
return /* @__PURE__ */
|
|
6704
|
+
return /* @__PURE__ */ jsxs63("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
6656
6705
|
/* @__PURE__ */ jsx85(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx85("p", { className: "line-clamp-2 text-caption text-text-secondary", children: /* @__PURE__ */ jsx85("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 }) }) }),
|
|
6657
6706
|
state !== "here" && /* @__PURE__ */ jsx85("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
6658
6707
|
] });
|
|
6659
6708
|
}
|
|
6660
6709
|
|
|
6661
6710
|
// src/ReactionHorizon.tsx
|
|
6662
|
-
import { Fragment as Fragment26, jsx as jsx86, jsxs as
|
|
6711
|
+
import { Fragment as Fragment26, jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6663
6712
|
function Said({ limit, omitted, noun }) {
|
|
6664
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ jsxs64(Fragment26, { children: [
|
|
6665
6714
|
"Reactions are shown for the latest ",
|
|
6666
6715
|
limit,
|
|
6667
6716
|
" ",
|
|
@@ -6676,8 +6725,8 @@ function Said({ limit, omitted, noun }) {
|
|
|
6676
6725
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
6677
6726
|
const room = keepRoom && omitted <= 0 && /* @__PURE__ */ jsx86("p", { "aria-hidden": true, className: "invisible text-caption text-text-muted", children: /* @__PURE__ */ jsx86(Said, { limit, omitted: 1, noun }) });
|
|
6678
6727
|
if (omitted <= 0 && !cut) return room || null;
|
|
6679
|
-
return /* @__PURE__ */
|
|
6680
|
-
/* @__PURE__ */
|
|
6728
|
+
return /* @__PURE__ */ jsxs64(Fragment26, { children: [
|
|
6729
|
+
/* @__PURE__ */ jsxs64("p", { className: "text-caption text-text-muted", children: [
|
|
6681
6730
|
omitted > 0 && /* @__PURE__ */ jsx86(Said, { limit, omitted, noun }),
|
|
6682
6731
|
omitted > 0 && cut && " ",
|
|
6683
6732
|
cut && "Some reactions may be missing."
|
|
@@ -6687,11 +6736,11 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
6687
6736
|
}
|
|
6688
6737
|
|
|
6689
6738
|
// src/PinnedComment.tsx
|
|
6690
|
-
import { jsx as jsx87, jsxs as
|
|
6739
|
+
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6691
6740
|
function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
6692
6741
|
const at = momentOf(given);
|
|
6693
|
-
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__ */
|
|
6694
|
-
/* @__PURE__ */
|
|
6742
|
+
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: [
|
|
6743
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2", children: [
|
|
6695
6744
|
/* @__PURE__ */ jsx87(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
6696
6745
|
/* @__PURE__ */ jsx87("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6697
6746
|
/* @__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 }) }) })
|
|
@@ -6702,13 +6751,13 @@ function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
|
6702
6751
|
|
|
6703
6752
|
// src/ArchiveDialog.tsx
|
|
6704
6753
|
import { useState as useState26 } from "react";
|
|
6705
|
-
import { jsx as jsx88, jsxs as
|
|
6754
|
+
import { jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6706
6755
|
var listOf = (parts) => parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`;
|
|
6707
6756
|
function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, onClose, onArchive }) {
|
|
6708
6757
|
const [resolution, setResolution] = useState26("");
|
|
6709
6758
|
const where = apps.length ? `, ${listOf(apps.map((app) => `in ${app}`))}` : "";
|
|
6710
|
-
return /* @__PURE__ */
|
|
6711
|
-
/* @__PURE__ */
|
|
6759
|
+
return /* @__PURE__ */ jsxs66(FormDialog, { title: `Archive \u201C${title}\u201D?`, submitLabel: `Archive ${what}`, ready: hides !== null, onSubmit: () => onArchive(resolution.trim()), onClose, children: [
|
|
6760
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-2 text-body-2 text-text-primary", children: [
|
|
6712
6761
|
/* @__PURE__ */ jsx88("p", { children: hides === null ? `Counting what archiving this ${what} would hide\u2026` : hides.length ? `This hides the ${what} and ${listOf(hides)} from every list${where}.` : `This hides the ${what} from every list${where}.` }),
|
|
6713
6762
|
staysVisible.length > 0 && /* @__PURE__ */ jsx88("p", { children: `${listOf(staysVisible)} stay visible there.` }),
|
|
6714
6763
|
/* @__PURE__ */ jsx88("p", { className: "text-text-secondary", children: getBack })
|
|
@@ -6728,15 +6777,15 @@ function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, o
|
|
|
6728
6777
|
// src/ArchivedNotice.tsx
|
|
6729
6778
|
import { useState as useState27 } from "react";
|
|
6730
6779
|
import { IconArchive } from "@tabler/icons-react";
|
|
6731
|
-
import { jsx as jsx89, jsxs as
|
|
6780
|
+
import { jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
6732
6781
|
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
6733
6782
|
const [unarchiving, setUnarchiving] = useState27(false);
|
|
6734
6783
|
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
6735
6784
|
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
6736
6785
|
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
6737
|
-
return /* @__PURE__ */
|
|
6786
|
+
return /* @__PURE__ */ jsxs67(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
6738
6787
|
/* @__PURE__ */ jsx89(IconArchive, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
6739
|
-
/* @__PURE__ */
|
|
6788
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
6740
6789
|
/* @__PURE__ */ jsx89("span", { className: "text-body-2-strong text-text-primary", children: line }),
|
|
6741
6790
|
resolution && /* @__PURE__ */ jsx89("p", { className: "whitespace-pre-wrap text-caption text-text-secondary", children: resolution })
|
|
6742
6791
|
] }),
|
|
@@ -6760,10 +6809,10 @@ function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive
|
|
|
6760
6809
|
// src/DeletedNotice.tsx
|
|
6761
6810
|
import { useState as useState28 } from "react";
|
|
6762
6811
|
import { IconTrash } from "@tabler/icons-react";
|
|
6763
|
-
import { jsx as jsx90, jsxs as
|
|
6812
|
+
import { jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
6764
6813
|
function DeletedNotice({ by, when, onRestore }) {
|
|
6765
6814
|
const [restoring, setRestoring] = useState28(false);
|
|
6766
|
-
return /* @__PURE__ */
|
|
6815
|
+
return /* @__PURE__ */ jsxs68(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
6767
6816
|
/* @__PURE__ */ jsx90(IconTrash, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
6768
6817
|
/* @__PURE__ */ jsx90("span", { className: "min-w-0 flex-1 text-body-2-strong text-text-primary", children: `Deleted by ${by} \xB7 ${when}` }),
|
|
6769
6818
|
onRestore && /* @__PURE__ */ jsx90(
|
|
@@ -6793,7 +6842,7 @@ function NoAccessNotice({ what }) {
|
|
|
6793
6842
|
// src/Thread.tsx
|
|
6794
6843
|
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef21, useState as useState29 } from "react";
|
|
6795
6844
|
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
6796
|
-
import { Fragment as Fragment27, jsx as jsx92, jsxs as
|
|
6845
|
+
import { Fragment as Fragment27, jsx as jsx92, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
6797
6846
|
var always = () => true;
|
|
6798
6847
|
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
6799
6848
|
function Replies({ children, loading, empty }) {
|
|
@@ -6844,27 +6893,27 @@ function Thread({
|
|
|
6844
6893
|
const foot = notice ?? box;
|
|
6845
6894
|
const layoutLine = useContext15(LineByLayout);
|
|
6846
6895
|
if (place === "under") {
|
|
6847
|
-
return /* @__PURE__ */
|
|
6896
|
+
return /* @__PURE__ */ jsxs69("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
6848
6897
|
(loading || anyIn(children)) && // The replies hang from a line under the comment's face (20px in: its 8px and half its 24px), one step in (Ship's way).
|
|
6849
6898
|
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
6850
6899
|
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
6851
6900
|
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
6852
6901
|
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
6853
|
-
/* @__PURE__ */
|
|
6902
|
+
/* @__PURE__ */ jsxs69("div", { "data-thread-replies": true, className: "relative ml-[19px] mr-2 flex flex-col gap-1 pl-2.5", children: [
|
|
6854
6903
|
!layoutLine && /* @__PURE__ */ jsx92("span", { "aria-hidden": true, className: "absolute bottom-0 left-0 top-0 w-0.5 bg-border-default" }),
|
|
6855
6904
|
/* @__PURE__ */ jsx92(caretOnOpen.Provider, { value: 0, children: loading ? /* @__PURE__ */ jsx92(SkeletonConversation, {}) : children })
|
|
6856
6905
|
] }),
|
|
6857
6906
|
foot && /* @__PURE__ */ jsx92("div", { className: "px-2 pt-2", children: foot })
|
|
6858
6907
|
] });
|
|
6859
6908
|
}
|
|
6860
|
-
return /* @__PURE__ */
|
|
6909
|
+
return /* @__PURE__ */ jsxs69(
|
|
6861
6910
|
Panel,
|
|
6862
6911
|
{
|
|
6863
6912
|
className,
|
|
6864
6913
|
bodyRef: setBody,
|
|
6865
6914
|
bodyClassName: "flex flex-col",
|
|
6866
6915
|
title,
|
|
6867
|
-
actions: /* @__PURE__ */
|
|
6916
|
+
actions: /* @__PURE__ */ jsxs69(Fragment27, { children: [
|
|
6868
6917
|
resolved && /* @__PURE__ */ jsx92(Chip, { type: "success", label: "Resolved" }),
|
|
6869
6918
|
actions,
|
|
6870
6919
|
onClose && /* @__PURE__ */ jsx92(IconButton, { tooltip: "Close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx92(IconX6, { size: 16, stroke: 1.5 }) })
|
|
@@ -6926,9 +6975,9 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
|
|
|
6926
6975
|
// src/SearchInput.tsx
|
|
6927
6976
|
import "react";
|
|
6928
6977
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
6929
|
-
import { jsx as jsx93, jsxs as
|
|
6978
|
+
import { jsx as jsx93, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
6930
6979
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
6931
|
-
return /* @__PURE__ */
|
|
6980
|
+
return /* @__PURE__ */ jsxs70(
|
|
6932
6981
|
"div",
|
|
6933
6982
|
{
|
|
6934
6983
|
className: cn(
|
|
@@ -6957,21 +7006,21 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
6957
7006
|
// src/PageHeader.tsx
|
|
6958
7007
|
import { Fragment as Fragment28 } from "react";
|
|
6959
7008
|
import { IconLock as IconLock2 } from "@tabler/icons-react";
|
|
6960
|
-
import { Fragment as Fragment29, jsx as jsx94, jsxs as
|
|
7009
|
+
import { Fragment as Fragment29, jsx as jsx94, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
6961
7010
|
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, actions, className }) {
|
|
6962
7011
|
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
6963
7012
|
const quiet = words.length > 0 || time != null || members != null;
|
|
6964
|
-
const name = /* @__PURE__ */
|
|
7013
|
+
const name = /* @__PURE__ */ jsxs71("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
6965
7014
|
leading != null && /* @__PURE__ */ jsx94("span", { className: "flex shrink-0 items-center text-text-secondary", children: leading }),
|
|
6966
7015
|
locked && /* @__PURE__ */ jsx94(WithTooltip, { label: "Private", children: /* @__PURE__ */ jsx94(IconLock2, { size: 16, stroke: 1.5, role: "img", "aria-label": "Private", className: "shrink-0 text-text-secondary" }) }),
|
|
6967
7016
|
typeof title === "string" ? /* @__PURE__ */ jsx94("span", { className: "truncate text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx94("div", { className: "flex min-w-0 items-center", children: title }),
|
|
6968
7017
|
after != null && /* @__PURE__ */ jsx94("span", { className: "flex shrink-0 items-center", children: after })
|
|
6969
7018
|
] });
|
|
6970
|
-
const right = quiet || actions != null ? /* @__PURE__ */
|
|
7019
|
+
const right = quiet || actions != null ? /* @__PURE__ */ jsxs71(Fragment29, { children: [
|
|
6971
7020
|
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
6972
7021
|
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
6973
|
-
/* @__PURE__ */
|
|
6974
|
-
words.length > 0 && /* @__PURE__ */ jsx94("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */
|
|
7022
|
+
/* @__PURE__ */ jsxs71("div", { className: cn("flex items-center gap-3", actions != null && "pr-2"), children: [
|
|
7023
|
+
words.length > 0 && /* @__PURE__ */ jsx94("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */ jsxs71(Fragment28, { children: [
|
|
6975
7024
|
i > 0 && // eslint-disable-next-line token-spacing/no-restricted-classes -- @estiva-escape: Peek's dot between its counts, 3px measured on 31 October; the scale steps from 2px to 4px
|
|
6976
7025
|
/* @__PURE__ */ jsx94("span", { "aria-hidden": "true", className: "size-[3px] shrink-0 rounded-full bg-text-muted" }),
|
|
6977
7026
|
/* @__PURE__ */ jsx94(MetaText, { tone: one.done ? "success" : "secondary", children: one.label })
|
|
@@ -6985,9 +7034,9 @@ function PageHeader({ title, leading, private: locked = false, after, meta, time
|
|
|
6985
7034
|
}
|
|
6986
7035
|
|
|
6987
7036
|
// src/ListColumn.tsx
|
|
6988
|
-
import { jsx as jsx95, jsxs as
|
|
7037
|
+
import { jsx as jsx95, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
6989
7038
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
6990
|
-
return /* @__PURE__ */
|
|
7039
|
+
return /* @__PURE__ */ jsxs72(
|
|
6991
7040
|
"div",
|
|
6992
7041
|
{
|
|
6993
7042
|
className: cn(
|
|
@@ -7026,7 +7075,7 @@ function ListColumn(props) {
|
|
|
7026
7075
|
|
|
7027
7076
|
// src/Tabs.tsx
|
|
7028
7077
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
7029
|
-
import { Fragment as Fragment30, jsx as jsx96, jsxs as
|
|
7078
|
+
import { Fragment as Fragment30, jsx as jsx96, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
7030
7079
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
7031
7080
|
return /* @__PURE__ */ jsx96(
|
|
7032
7081
|
BaseTabs.Root,
|
|
@@ -7043,7 +7092,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7043
7092
|
"aria-label": aria["aria-label"],
|
|
7044
7093
|
"aria-labelledby": aria["aria-labelledby"],
|
|
7045
7094
|
className: "flex items-center gap-2",
|
|
7046
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
7095
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs73(
|
|
7047
7096
|
BaseTabs.Tab,
|
|
7048
7097
|
{
|
|
7049
7098
|
value: tab.id,
|
|
@@ -7056,11 +7105,11 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7056
7105
|
),
|
|
7057
7106
|
children: [
|
|
7058
7107
|
tab.icon,
|
|
7059
|
-
/* @__PURE__ */
|
|
7108
|
+
/* @__PURE__ */ jsxs73("span", { className: "flex items-baseline", children: [
|
|
7060
7109
|
tab.label,
|
|
7061
7110
|
tab.count !== void 0 ? /* @__PURE__ */ jsx96("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
7062
7111
|
] }),
|
|
7063
|
-
tab.unread ? /* @__PURE__ */
|
|
7112
|
+
tab.unread ? /* @__PURE__ */ jsxs73(Fragment30, { children: [
|
|
7064
7113
|
/* @__PURE__ */ jsx96(UnreadDot, { className: "h-auto w-auto" }),
|
|
7065
7114
|
/* @__PURE__ */ jsx96("span", { className: "sr-only", children: "new" })
|
|
7066
7115
|
] }) : null
|
|
@@ -7078,7 +7127,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7078
7127
|
import { createContext as createContext13, useContext as useContext16, useMemo as useMemo7 } from "react";
|
|
7079
7128
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7080
7129
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
7081
|
-
import { jsx as jsx97, jsxs as
|
|
7130
|
+
import { jsx as jsx97, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
7082
7131
|
var SURFACE_STYLES = {
|
|
7083
7132
|
success: "bg-success-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md leaf:bg-bg-inset leaf:border leaf:border-border-default leaf:shadow-md",
|
|
7084
7133
|
brand: "bg-accent-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md leaf:bg-bg-inset leaf:border leaf:border-border-default leaf:shadow-md",
|
|
@@ -7118,8 +7167,8 @@ function LeadingIcon({ type }) {
|
|
|
7118
7167
|
}
|
|
7119
7168
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
7120
7169
|
const hasAction = !!(actionLabel && onAction);
|
|
7121
|
-
return /* @__PURE__ */
|
|
7122
|
-
/* @__PURE__ */
|
|
7170
|
+
return /* @__PURE__ */ jsxs74("div", { className: pillClassName(type, hasAction, className), children: [
|
|
7171
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7123
7172
|
leadingIcon && /* @__PURE__ */ jsx97(LeadingIcon, { type }),
|
|
7124
7173
|
/* @__PURE__ */ jsx97("span", { className: LABEL_CLASSES, children: label })
|
|
7125
7174
|
] }),
|
|
@@ -7145,7 +7194,7 @@ function ToastProvider({ children }) {
|
|
|
7145
7194
|
}),
|
|
7146
7195
|
[manager]
|
|
7147
7196
|
);
|
|
7148
|
-
return /* @__PURE__ */ jsx97(ToastContext.Provider, { value, children: /* @__PURE__ */
|
|
7197
|
+
return /* @__PURE__ */ jsx97(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs74(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
7149
7198
|
children,
|
|
7150
7199
|
/* @__PURE__ */ jsx97(BaseToast.Portal, { children: /* @__PURE__ */ jsx97(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx97(ToastList, {}) }) })
|
|
7151
7200
|
] }) });
|
|
@@ -7155,14 +7204,14 @@ function ToastList() {
|
|
|
7155
7204
|
return toasts.map((toast) => {
|
|
7156
7205
|
const type = toast.type ?? "neutral";
|
|
7157
7206
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
7158
|
-
return /* @__PURE__ */
|
|
7207
|
+
return /* @__PURE__ */ jsxs74(
|
|
7159
7208
|
BaseToast.Root,
|
|
7160
7209
|
{
|
|
7161
7210
|
toast,
|
|
7162
7211
|
swipeDirection: ["left", "down"],
|
|
7163
7212
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
7164
7213
|
children: [
|
|
7165
|
-
/* @__PURE__ */
|
|
7214
|
+
/* @__PURE__ */ jsxs74("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7166
7215
|
leadingIcon && /* @__PURE__ */ jsx97(LeadingIcon, { type }),
|
|
7167
7216
|
/* @__PURE__ */ jsx97(BaseToast.Title, { render: /* @__PURE__ */ jsx97("span", {}), className: LABEL_CLASSES })
|
|
7168
7217
|
] }),
|