@estiva-app/ui 0.108.2 → 0.110.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/ConversationHeading.d.ts +21 -0
- package/dist/ConversationHeading.d.ts.map +1 -0
- package/dist/QuotedLine.d.ts +10 -2
- package/dist/QuotedLine.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +143 -111
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +74 -3
- package/src/ConversationCard.tsx +23 -4
- package/src/ConversationHeading.mdx +52 -0
- package/src/ConversationHeading.stories.tsx +44 -0
- package/src/ConversationHeading.test.tsx +81 -0
- package/src/ConversationHeading.tsx +55 -0
- package/src/ConversationLayout.stories.tsx +60 -0
- package/src/QuotedLine.mdx +3 -0
- package/src/QuotedLine.stories.tsx +3 -0
- package/src/QuotedLine.test.tsx +13 -0
- package/src/QuotedLine.tsx +19 -3
- package/src/index.ts +1 -0
- package/src/registry/registry.test.ts +4 -4
- package/stories/Choosing.mdx +1 -0
package/dist/index.js
CHANGED
|
@@ -6187,7 +6187,9 @@ function useClearOfStrip(root, strip, shown2) {
|
|
|
6187
6187
|
return;
|
|
6188
6188
|
}
|
|
6189
6189
|
const stop = strip.current.getBoundingClientRect().left - 8;
|
|
6190
|
-
const
|
|
6190
|
+
const heading = root.current?.querySelector("[data-conversation-heading]");
|
|
6191
|
+
const parts = [...Array.from(words.children), ...heading ? Array.from(heading.children) : []];
|
|
6192
|
+
const reach = Math.max(...parts.map((part) => part.getBoundingClientRect().right));
|
|
6191
6193
|
setEnd(reach > stop ? stop - words.getBoundingClientRect().left : void 0);
|
|
6192
6194
|
}, [root, strip, shown2]);
|
|
6193
6195
|
return end;
|
|
@@ -6266,11 +6268,14 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
6266
6268
|
] })
|
|
6267
6269
|
] });
|
|
6268
6270
|
}
|
|
6269
|
-
function Editing({ author, children }) {
|
|
6270
|
-
return /* @__PURE__ */
|
|
6271
|
-
/* @__PURE__ */ jsx84(
|
|
6272
|
-
/* @__PURE__ */
|
|
6273
|
-
|
|
6271
|
+
function Editing({ author, heading, children }) {
|
|
6272
|
+
return /* @__PURE__ */ jsxs62("div", { className: "p-2", children: [
|
|
6273
|
+
!!heading && /* @__PURE__ */ jsx84("div", { className: "w-full pb-2", children: heading }),
|
|
6274
|
+
/* @__PURE__ */ jsxs62("div", { className: "flex items-start gap-2", children: [
|
|
6275
|
+
/* @__PURE__ */ jsx84(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
6276
|
+
/* @__PURE__ */ jsx84("div", { className: "min-w-0 flex-1", children })
|
|
6277
|
+
] })
|
|
6278
|
+
] });
|
|
6274
6279
|
}
|
|
6275
6280
|
function stillHere(root) {
|
|
6276
6281
|
if (!root) return false;
|
|
@@ -6325,7 +6330,7 @@ function useEditing(editing, onEditingChange) {
|
|
|
6325
6330
|
return [now, set];
|
|
6326
6331
|
}
|
|
6327
6332
|
function ConversationCard(props) {
|
|
6328
|
-
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;
|
|
6333
|
+
const { author, about, files, reactions, isNew = false, urgent = false, own = false, editor, heading, 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;
|
|
6329
6334
|
const deleted = isDeleted || unseen;
|
|
6330
6335
|
const readOnly = (props.readOnly ?? false) || deleted;
|
|
6331
6336
|
const inThreadCard = useContext14(InThreadCard);
|
|
@@ -6381,7 +6386,9 @@ function ConversationCard(props) {
|
|
|
6381
6386
|
setHovered(false);
|
|
6382
6387
|
},
|
|
6383
6388
|
children: [
|
|
6384
|
-
isEditing ? /* @__PURE__ */ jsx84(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs62("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6389
|
+
isEditing ? /* @__PURE__ */ jsx84(Editing, { author, heading, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs62("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6390
|
+
!!heading && // Faded clear of the strip, as the head's words are (useClearOfStrip).
|
|
6391
|
+
/* @__PURE__ */ jsx84("div", { className: "w-full pb-2", style: wordsEnd === void 0 ? void 0 : { maskImage: fadeBefore(wordsEnd), WebkitMaskImage: fadeBefore(wordsEnd) }, children: heading }),
|
|
6385
6392
|
deleted ? /* @__PURE__ */ jsxs62(Fragment23, { children: [
|
|
6386
6393
|
!!about && /* @__PURE__ */ jsx84("div", { className: "relative w-full pl-8 pr-2", children: about }),
|
|
6387
6394
|
/* @__PURE__ */ jsx84("p", { className: cn("w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", !!about && "pt-1"), children: goneWords(isDeleted) })
|
|
@@ -6928,34 +6935,58 @@ function ConversationLayout({
|
|
|
6928
6935
|
] });
|
|
6929
6936
|
}
|
|
6930
6937
|
|
|
6931
|
-
// src/
|
|
6938
|
+
// src/ConversationHeading.tsx
|
|
6932
6939
|
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6940
|
+
var NAME = "-mx-1 min-w-0 truncate rounded px-1 text-left text-h4 text-text-primary";
|
|
6941
|
+
function ConversationHeading({ icon, name, onOpen, href, className }) {
|
|
6942
|
+
const label = href ? /* @__PURE__ */ jsx87(
|
|
6943
|
+
"a",
|
|
6944
|
+
{
|
|
6945
|
+
href,
|
|
6946
|
+
onClick: (event) => {
|
|
6947
|
+
if (!onOpen || !isPlainClick(event)) return;
|
|
6948
|
+
event.preventDefault();
|
|
6949
|
+
onOpen();
|
|
6950
|
+
},
|
|
6951
|
+
className: cn(NAME, "hover:bg-bg-hover"),
|
|
6952
|
+
children: name
|
|
6953
|
+
}
|
|
6954
|
+
) : onOpen ? /* @__PURE__ */ jsx87("button", { type: "button", onClick: onOpen, className: cn(NAME, "hover:bg-bg-hover"), children: name }) : /* @__PURE__ */ jsx87("span", { className: NAME, children: name });
|
|
6955
|
+
return /* @__PURE__ */ jsxs65("div", { "data-conversation-heading": true, className: cn("flex w-full items-center gap-2", className), children: [
|
|
6956
|
+
/* @__PURE__ */ jsx87("span", { "aria-hidden": true, className: "flex size-6 shrink-0 items-center justify-center text-text-secondary", children: icon }),
|
|
6957
|
+
label
|
|
6958
|
+
] });
|
|
6959
|
+
}
|
|
6960
|
+
|
|
6961
|
+
// src/ConversationPlace.tsx
|
|
6962
|
+
import { jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6933
6963
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
6934
|
-
return /* @__PURE__ */
|
|
6935
|
-
/* @__PURE__ */
|
|
6936
|
-
/* @__PURE__ */
|
|
6937
|
-
place && /* @__PURE__ */
|
|
6964
|
+
return /* @__PURE__ */ jsxs66("div", { className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
6965
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex items-center gap-2", children: [
|
|
6966
|
+
/* @__PURE__ */ jsx88(Chip, { type: "neutral", label: relation }),
|
|
6967
|
+
place && /* @__PURE__ */ jsx88("span", { className: "truncate text-caption text-text-muted", children: place })
|
|
6938
6968
|
] }),
|
|
6939
6969
|
children
|
|
6940
6970
|
] });
|
|
6941
6971
|
}
|
|
6942
6972
|
|
|
6943
6973
|
// src/QuotedLine.tsx
|
|
6944
|
-
import { jsx as
|
|
6974
|
+
import { jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
6945
6975
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
6946
|
-
function QuotedLine({ words, state = "here", label }) {
|
|
6976
|
+
function QuotedLine({ words, state = "here", label, href, external }) {
|
|
6947
6977
|
const shown2 = words ?? label ?? "";
|
|
6948
6978
|
const inThePage = !!words && state === "here";
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6979
|
+
const mark = /* @__PURE__ */ jsx89("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 });
|
|
6980
|
+
return /* @__PURE__ */ jsxs67("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
6981
|
+
/* @__PURE__ */ jsx89(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx89("p", { className: "line-clamp-2 text-caption text-text-secondary", children: href ? /* @__PURE__ */ jsx89(Link, { href, variant: "quiet", external, children: mark }) : mark }) }),
|
|
6982
|
+
state !== "here" && /* @__PURE__ */ jsx89("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
6952
6983
|
] });
|
|
6953
6984
|
}
|
|
6954
6985
|
|
|
6955
6986
|
// src/ReactionHorizon.tsx
|
|
6956
|
-
import { Fragment as Fragment26, jsx as
|
|
6987
|
+
import { Fragment as Fragment26, jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
6957
6988
|
function Said({ limit, omitted, noun }) {
|
|
6958
|
-
return /* @__PURE__ */
|
|
6989
|
+
return /* @__PURE__ */ jsxs68(Fragment26, { children: [
|
|
6959
6990
|
"Reactions are shown for the latest ",
|
|
6960
6991
|
limit,
|
|
6961
6992
|
" ",
|
|
@@ -6968,11 +6999,11 @@ function Said({ limit, omitted, noun }) {
|
|
|
6968
6999
|
] });
|
|
6969
7000
|
}
|
|
6970
7001
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
6971
|
-
const room = keepRoom && omitted <= 0 && /* @__PURE__ */
|
|
7002
|
+
const room = keepRoom && omitted <= 0 && /* @__PURE__ */ jsx90("p", { "aria-hidden": true, className: "invisible text-caption text-text-muted", children: /* @__PURE__ */ jsx90(Said, { limit, omitted: 1, noun }) });
|
|
6972
7003
|
if (omitted <= 0 && !cut) return room || null;
|
|
6973
|
-
return /* @__PURE__ */
|
|
6974
|
-
/* @__PURE__ */
|
|
6975
|
-
omitted > 0 && /* @__PURE__ */
|
|
7004
|
+
return /* @__PURE__ */ jsxs68(Fragment26, { children: [
|
|
7005
|
+
/* @__PURE__ */ jsxs68("p", { className: "text-caption text-text-muted", children: [
|
|
7006
|
+
omitted > 0 && /* @__PURE__ */ jsx90(Said, { limit, omitted, noun }),
|
|
6976
7007
|
omitted > 0 && cut && " ",
|
|
6977
7008
|
cut && "Some reactions may be missing."
|
|
6978
7009
|
] }),
|
|
@@ -6982,18 +7013,18 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
6982
7013
|
|
|
6983
7014
|
// src/ArchiveDialog.tsx
|
|
6984
7015
|
import { useState as useState28 } from "react";
|
|
6985
|
-
import { jsx as
|
|
7016
|
+
import { jsx as jsx91, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
6986
7017
|
var listOf = (parts) => parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`;
|
|
6987
7018
|
function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, onClose, onArchive }) {
|
|
6988
7019
|
const [resolution, setResolution] = useState28("");
|
|
6989
7020
|
const where = apps.length ? `, ${listOf(apps.map((app) => `in ${app}`))}` : "";
|
|
6990
|
-
return /* @__PURE__ */
|
|
6991
|
-
/* @__PURE__ */
|
|
6992
|
-
/* @__PURE__ */
|
|
6993
|
-
staysVisible.length > 0 && /* @__PURE__ */
|
|
6994
|
-
/* @__PURE__ */
|
|
7021
|
+
return /* @__PURE__ */ jsxs69(FormDialog, { title: `Archive \u201C${title}\u201D?`, submitLabel: `Archive ${what}`, ready: hides !== null, onSubmit: () => onArchive(resolution.trim()), onClose, children: [
|
|
7022
|
+
/* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-2 text-body-2 text-text-primary", children: [
|
|
7023
|
+
/* @__PURE__ */ jsx91("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}.` }),
|
|
7024
|
+
staysVisible.length > 0 && /* @__PURE__ */ jsx91("p", { children: `${listOf(staysVisible)} stay visible there.` }),
|
|
7025
|
+
/* @__PURE__ */ jsx91("p", { className: "text-text-secondary", children: getBack })
|
|
6995
7026
|
] }),
|
|
6996
|
-
/* @__PURE__ */
|
|
7027
|
+
/* @__PURE__ */ jsx91(Field, { label: "Resolution (optional)", children: /* @__PURE__ */ jsx91(
|
|
6997
7028
|
Textarea,
|
|
6998
7029
|
{
|
|
6999
7030
|
value: resolution,
|
|
@@ -7008,19 +7039,19 @@ function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, o
|
|
|
7008
7039
|
// src/ArchivedNotice.tsx
|
|
7009
7040
|
import { useState as useState29 } from "react";
|
|
7010
7041
|
import { IconArchive } from "@tabler/icons-react";
|
|
7011
|
-
import { jsx as
|
|
7042
|
+
import { jsx as jsx92, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
7012
7043
|
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
7013
7044
|
const [unarchiving, setUnarchiving] = useState29(false);
|
|
7014
7045
|
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
7015
7046
|
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
7016
7047
|
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
7017
|
-
return /* @__PURE__ */
|
|
7018
|
-
/* @__PURE__ */
|
|
7019
|
-
/* @__PURE__ */
|
|
7020
|
-
/* @__PURE__ */
|
|
7021
|
-
resolution && /* @__PURE__ */
|
|
7048
|
+
return /* @__PURE__ */ jsxs70(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
7049
|
+
/* @__PURE__ */ jsx92(IconArchive, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
7050
|
+
/* @__PURE__ */ jsxs70("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
7051
|
+
/* @__PURE__ */ jsx92("span", { className: "text-body-2-strong text-text-primary", children: line }),
|
|
7052
|
+
resolution && /* @__PURE__ */ jsx92("p", { className: "whitespace-pre-wrap text-caption text-text-secondary", children: resolution })
|
|
7022
7053
|
] }),
|
|
7023
|
-
parent ? onOpenParent && /* @__PURE__ */
|
|
7054
|
+
parent ? onOpenParent && /* @__PURE__ */ jsx92(Button, { variant: "outlined", size: "small", className: "shrink-0", onClick: onOpenParent, children: `Open ${parent}` }) : onUnarchive && /* @__PURE__ */ jsx92(
|
|
7024
7055
|
Button,
|
|
7025
7056
|
{
|
|
7026
7057
|
variant: "outlined",
|
|
@@ -7040,13 +7071,13 @@ function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive
|
|
|
7040
7071
|
// src/DeletedNotice.tsx
|
|
7041
7072
|
import { useState as useState30 } from "react";
|
|
7042
7073
|
import { IconTrash } from "@tabler/icons-react";
|
|
7043
|
-
import { jsx as
|
|
7074
|
+
import { jsx as jsx93, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
7044
7075
|
function DeletedNotice({ by, when, onRestore }) {
|
|
7045
7076
|
const [restoring, setRestoring] = useState30(false);
|
|
7046
|
-
return /* @__PURE__ */
|
|
7047
|
-
/* @__PURE__ */
|
|
7048
|
-
/* @__PURE__ */
|
|
7049
|
-
onRestore && /* @__PURE__ */
|
|
7077
|
+
return /* @__PURE__ */ jsxs71(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
7078
|
+
/* @__PURE__ */ jsx93(IconTrash, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
7079
|
+
/* @__PURE__ */ jsx93("span", { className: "min-w-0 flex-1 text-body-2-strong text-text-primary", children: `Deleted by ${by} \xB7 ${when}` }),
|
|
7080
|
+
onRestore && /* @__PURE__ */ jsx93(
|
|
7050
7081
|
Button,
|
|
7051
7082
|
{
|
|
7052
7083
|
variant: "outlined",
|
|
@@ -7065,21 +7096,21 @@ function DeletedNotice({ by, when, onRestore }) {
|
|
|
7065
7096
|
|
|
7066
7097
|
// src/NoAccessNotice.tsx
|
|
7067
7098
|
import { IconLock } from "@tabler/icons-react";
|
|
7068
|
-
import { jsx as
|
|
7099
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
7069
7100
|
function NoAccessNotice({ what }) {
|
|
7070
|
-
return /* @__PURE__ */
|
|
7101
|
+
return /* @__PURE__ */ jsx94(EmptyState, { scope: "page", icon: /* @__PURE__ */ jsx94(IconLock, { size: 16, stroke: 1.5 }), message: `You can't open this ${what}` });
|
|
7071
7102
|
}
|
|
7072
7103
|
|
|
7073
7104
|
// src/Thread.tsx
|
|
7074
7105
|
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef21, useState as useState31 } from "react";
|
|
7075
7106
|
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
7076
|
-
import { Fragment as Fragment27, jsx as
|
|
7107
|
+
import { Fragment as Fragment27, jsx as jsx95, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
7077
7108
|
var always = () => true;
|
|
7078
7109
|
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
7079
7110
|
function Replies({ children, loading, empty }) {
|
|
7080
|
-
if (loading) return /* @__PURE__ */
|
|
7081
|
-
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */
|
|
7082
|
-
return /* @__PURE__ */
|
|
7111
|
+
if (loading) return /* @__PURE__ */ jsx95(SkeletonConversation, {});
|
|
7112
|
+
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */ jsx95(EmptyState, { scope: "section", message: empty }) : /* @__PURE__ */ jsx95(Fragment27, { children: empty });
|
|
7113
|
+
return /* @__PURE__ */ jsx95(Fragment27, { children });
|
|
7083
7114
|
}
|
|
7084
7115
|
function Thread({
|
|
7085
7116
|
place = "beside",
|
|
@@ -7124,36 +7155,36 @@ function Thread({
|
|
|
7124
7155
|
const foot = notice ?? box;
|
|
7125
7156
|
const layoutLine = useContext15(LineByLayout);
|
|
7126
7157
|
if (place === "under") {
|
|
7127
|
-
return /* @__PURE__ */
|
|
7158
|
+
return /* @__PURE__ */ jsxs72("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
7128
7159
|
(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).
|
|
7129
7160
|
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
7130
7161
|
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
7131
7162
|
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
7132
7163
|
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
7133
|
-
/* @__PURE__ */
|
|
7134
|
-
!layoutLine && /* @__PURE__ */
|
|
7135
|
-
/* @__PURE__ */
|
|
7164
|
+
/* @__PURE__ */ jsxs72("div", { "data-thread-replies": true, className: "relative ml-[19px] mr-2 flex flex-col gap-1 pl-2.5", children: [
|
|
7165
|
+
!layoutLine && /* @__PURE__ */ jsx95("span", { "aria-hidden": true, className: "absolute bottom-0 left-0 top-0 w-0.5 bg-border-default" }),
|
|
7166
|
+
/* @__PURE__ */ jsx95(caretOnOpen.Provider, { value: 0, children: loading ? /* @__PURE__ */ jsx95(SkeletonConversation, {}) : children })
|
|
7136
7167
|
] }),
|
|
7137
|
-
foot && /* @__PURE__ */
|
|
7168
|
+
foot && /* @__PURE__ */ jsx95("div", { className: "px-2 pt-2", children: foot })
|
|
7138
7169
|
] });
|
|
7139
7170
|
}
|
|
7140
|
-
return /* @__PURE__ */
|
|
7171
|
+
return /* @__PURE__ */ jsxs72(
|
|
7141
7172
|
Panel,
|
|
7142
7173
|
{
|
|
7143
7174
|
className,
|
|
7144
7175
|
bodyRef: setBody,
|
|
7145
7176
|
bodyClassName: "flex flex-col",
|
|
7146
7177
|
title,
|
|
7147
|
-
actions: /* @__PURE__ */
|
|
7148
|
-
resolved && /* @__PURE__ */
|
|
7178
|
+
actions: /* @__PURE__ */ jsxs72(Fragment27, { children: [
|
|
7179
|
+
resolved && /* @__PURE__ */ jsx95(Chip, { type: "success", label: "Resolved" }),
|
|
7149
7180
|
actions,
|
|
7150
|
-
onClose && /* @__PURE__ */
|
|
7181
|
+
onClose && /* @__PURE__ */ jsx95(IconButton, { tooltip: "Close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx95(IconX6, { size: 16, stroke: 1.5 }) })
|
|
7151
7182
|
] }),
|
|
7152
|
-
footer: foot && /* @__PURE__ */
|
|
7183
|
+
footer: foot && /* @__PURE__ */ jsx95("div", { className: "p-3", children: foot }),
|
|
7153
7184
|
children: [
|
|
7154
|
-
start && /* @__PURE__ */
|
|
7155
|
-
/* @__PURE__ */
|
|
7156
|
-
/* @__PURE__ */
|
|
7185
|
+
start && /* @__PURE__ */ jsx95("div", { className: cn("px-4 pb-2 pt-4", SHOWN_CLASSES), "data-thread-start": start.id, children: /* @__PURE__ */ jsx95(PinnedComment, { author: start.author, time: start.time, at: start.at, words: start.words, deleted: start.deleted, unseen: start.unseen }) }),
|
|
7186
|
+
/* @__PURE__ */ jsx95(Divider, { look: "section", label: "Replies", className: "px-4 py-2" }),
|
|
7187
|
+
/* @__PURE__ */ jsx95("div", { className: "flex flex-col gap-2 px-4 pb-4", children: /* @__PURE__ */ jsx95(caretOnOpen.Provider, { value: 0, children: /* @__PURE__ */ jsx95(repliesDrawn.Provider, { value: drawn, children: /* @__PURE__ */ jsx95(Replies, { loading, empty, children }) }) }) })
|
|
7157
7188
|
]
|
|
7158
7189
|
}
|
|
7159
7190
|
);
|
|
@@ -7206,9 +7237,9 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
|
|
|
7206
7237
|
// src/SearchInput.tsx
|
|
7207
7238
|
import "react";
|
|
7208
7239
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
7209
|
-
import { jsx as
|
|
7240
|
+
import { jsx as jsx96, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
7210
7241
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
7211
|
-
return /* @__PURE__ */
|
|
7242
|
+
return /* @__PURE__ */ jsxs73(
|
|
7212
7243
|
"div",
|
|
7213
7244
|
{
|
|
7214
7245
|
className: cn(
|
|
@@ -7220,7 +7251,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7220
7251
|
className
|
|
7221
7252
|
),
|
|
7222
7253
|
children: [
|
|
7223
|
-
/* @__PURE__ */
|
|
7254
|
+
/* @__PURE__ */ jsx96(
|
|
7224
7255
|
Input3,
|
|
7225
7256
|
{
|
|
7226
7257
|
className: cn("flex-1 min-w-0 text-input-value", BARE_INPUT_CLASSES),
|
|
@@ -7228,7 +7259,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7228
7259
|
...props
|
|
7229
7260
|
}
|
|
7230
7261
|
),
|
|
7231
|
-
shortcut && /* @__PURE__ */
|
|
7262
|
+
shortcut && /* @__PURE__ */ jsx96(Kbd, { children: shortcut })
|
|
7232
7263
|
]
|
|
7233
7264
|
}
|
|
7234
7265
|
);
|
|
@@ -7237,37 +7268,37 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7237
7268
|
// src/PageHeader.tsx
|
|
7238
7269
|
import { Fragment as Fragment28 } from "react";
|
|
7239
7270
|
import { IconLock as IconLock2 } from "@tabler/icons-react";
|
|
7240
|
-
import { Fragment as Fragment29, jsx as
|
|
7271
|
+
import { Fragment as Fragment29, jsx as jsx97, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
7241
7272
|
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, actions, className }) {
|
|
7242
7273
|
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
7243
7274
|
const quiet = words.length > 0 || time != null || members != null;
|
|
7244
|
-
const name = /* @__PURE__ */
|
|
7245
|
-
leading != null && /* @__PURE__ */
|
|
7246
|
-
locked && /* @__PURE__ */
|
|
7247
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
7248
|
-
after != null && /* @__PURE__ */
|
|
7275
|
+
const name = /* @__PURE__ */ jsxs74("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
7276
|
+
leading != null && /* @__PURE__ */ jsx97("span", { className: "flex shrink-0 items-center text-text-secondary", children: leading }),
|
|
7277
|
+
locked && /* @__PURE__ */ jsx97(WithTooltip, { label: "Private", children: /* @__PURE__ */ jsx97(IconLock2, { size: 16, stroke: 1.5, role: "img", "aria-label": "Private", className: "shrink-0 text-text-secondary" }) }),
|
|
7278
|
+
typeof title === "string" ? /* @__PURE__ */ jsx97("span", { className: "truncate text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx97("div", { className: "flex min-w-0 items-center", children: title }),
|
|
7279
|
+
after != null && /* @__PURE__ */ jsx97("span", { className: "flex shrink-0 items-center", children: after })
|
|
7249
7280
|
] });
|
|
7250
|
-
const right = quiet || actions != null ? /* @__PURE__ */
|
|
7281
|
+
const right = quiet || actions != null ? /* @__PURE__ */ jsxs74(Fragment29, { children: [
|
|
7251
7282
|
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
7252
7283
|
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
7253
|
-
/* @__PURE__ */
|
|
7254
|
-
words.length > 0 && /* @__PURE__ */
|
|
7284
|
+
/* @__PURE__ */ jsxs74("div", { className: cn("flex items-center gap-3", actions != null && "pr-2"), children: [
|
|
7285
|
+
words.length > 0 && /* @__PURE__ */ jsx97("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */ jsxs74(Fragment28, { children: [
|
|
7255
7286
|
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
|
|
7256
|
-
/* @__PURE__ */
|
|
7257
|
-
/* @__PURE__ */
|
|
7287
|
+
/* @__PURE__ */ jsx97("span", { "aria-hidden": "true", className: "size-[3px] shrink-0 rounded-full bg-text-muted" }),
|
|
7288
|
+
/* @__PURE__ */ jsx97(MetaText, { tone: one.done ? "success" : "secondary", children: one.label })
|
|
7258
7289
|
] }, `${one.label}-${i}`)) }),
|
|
7259
|
-
time && /* @__PURE__ */
|
|
7290
|
+
time && /* @__PURE__ */ jsx97(WithTooltip, { label: time.exact, children: /* @__PURE__ */ jsx97("span", { className: "whitespace-nowrap text-caption italic text-text-muted", children: time.label }) }),
|
|
7260
7291
|
members
|
|
7261
7292
|
] }),
|
|
7262
7293
|
actions
|
|
7263
7294
|
] }) : void 0;
|
|
7264
|
-
return /* @__PURE__ */
|
|
7295
|
+
return /* @__PURE__ */ jsx97(ContainerHeader, { title: name, actions: right, className });
|
|
7265
7296
|
}
|
|
7266
7297
|
|
|
7267
7298
|
// src/ListColumn.tsx
|
|
7268
|
-
import { jsx as
|
|
7299
|
+
import { jsx as jsx98, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
7269
7300
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
7270
|
-
return /* @__PURE__ */
|
|
7301
|
+
return /* @__PURE__ */ jsxs75(
|
|
7271
7302
|
"div",
|
|
7272
7303
|
{
|
|
7273
7304
|
className: cn(
|
|
@@ -7280,35 +7311,35 @@ function Column({ title, chevron = false, titleMenu, actions, above, collapsed =
|
|
|
7280
7311
|
"data-collapsed": collapsed || void 0,
|
|
7281
7312
|
inert: collapsed,
|
|
7282
7313
|
children: [
|
|
7283
|
-
/* @__PURE__ */
|
|
7314
|
+
/* @__PURE__ */ jsx98(ContainerHeader, { title, chevron, titleMenu, actions }),
|
|
7284
7315
|
above,
|
|
7285
7316
|
broken ? (
|
|
7286
7317
|
// The message takes the room the list had and centres itself in it (Katerina, 19 September).
|
|
7287
|
-
/* @__PURE__ */
|
|
7288
|
-
) : /* @__PURE__ */
|
|
7318
|
+
/* @__PURE__ */ jsx98("div", { className: "flex min-h-0 flex-1 flex-col px-3", children })
|
|
7319
|
+
) : /* @__PURE__ */ jsx98(ScrollArea, { className: "flex-1", contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children })
|
|
7289
7320
|
]
|
|
7290
7321
|
}
|
|
7291
7322
|
);
|
|
7292
7323
|
}
|
|
7293
7324
|
function ListColumn(props) {
|
|
7294
|
-
return /* @__PURE__ */
|
|
7325
|
+
return /* @__PURE__ */ jsx98(
|
|
7295
7326
|
ErrorBoundary,
|
|
7296
7327
|
{
|
|
7297
7328
|
label: "list panel",
|
|
7298
7329
|
frame: (message) => (
|
|
7299
7330
|
// Only the name comes back with the message: the actions and the row above may be what threw.
|
|
7300
|
-
/* @__PURE__ */
|
|
7331
|
+
/* @__PURE__ */ jsx98(Column, { title: props.title, chevron: props.chevron, collapsed: props.collapsed, className: props.className, broken: true, children: message })
|
|
7301
7332
|
),
|
|
7302
|
-
children: /* @__PURE__ */
|
|
7333
|
+
children: /* @__PURE__ */ jsx98(Column, { ...props })
|
|
7303
7334
|
}
|
|
7304
7335
|
);
|
|
7305
7336
|
}
|
|
7306
7337
|
|
|
7307
7338
|
// src/Tabs.tsx
|
|
7308
7339
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
7309
|
-
import { Fragment as Fragment30, jsx as
|
|
7340
|
+
import { Fragment as Fragment30, jsx as jsx99, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
7310
7341
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
7311
|
-
return /* @__PURE__ */
|
|
7342
|
+
return /* @__PURE__ */ jsx99(
|
|
7312
7343
|
BaseTabs.Root,
|
|
7313
7344
|
{
|
|
7314
7345
|
value: active,
|
|
@@ -7316,14 +7347,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7316
7347
|
if (details.reason === "none") onChange(value);
|
|
7317
7348
|
},
|
|
7318
7349
|
className,
|
|
7319
|
-
children: /* @__PURE__ */
|
|
7350
|
+
children: /* @__PURE__ */ jsx99(
|
|
7320
7351
|
BaseTabs.List,
|
|
7321
7352
|
{
|
|
7322
7353
|
activateOnFocus: true,
|
|
7323
7354
|
"aria-label": aria["aria-label"],
|
|
7324
7355
|
"aria-labelledby": aria["aria-labelledby"],
|
|
7325
7356
|
className: "flex items-center gap-2",
|
|
7326
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
7357
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs76(
|
|
7327
7358
|
BaseTabs.Tab,
|
|
7328
7359
|
{
|
|
7329
7360
|
value: tab.id,
|
|
@@ -7336,13 +7367,13 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7336
7367
|
),
|
|
7337
7368
|
children: [
|
|
7338
7369
|
tab.icon,
|
|
7339
|
-
/* @__PURE__ */
|
|
7370
|
+
/* @__PURE__ */ jsxs76("span", { className: "flex items-baseline", children: [
|
|
7340
7371
|
tab.label,
|
|
7341
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
7372
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx99("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
7342
7373
|
] }),
|
|
7343
|
-
tab.unread ? /* @__PURE__ */
|
|
7344
|
-
/* @__PURE__ */
|
|
7345
|
-
/* @__PURE__ */
|
|
7374
|
+
tab.unread ? /* @__PURE__ */ jsxs76(Fragment30, { children: [
|
|
7375
|
+
/* @__PURE__ */ jsx99(UnreadDot, { className: "h-auto w-auto" }),
|
|
7376
|
+
/* @__PURE__ */ jsx99("span", { className: "sr-only", children: "new" })
|
|
7346
7377
|
] }) : null
|
|
7347
7378
|
]
|
|
7348
7379
|
},
|
|
@@ -7358,7 +7389,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7358
7389
|
import { createContext as createContext13, useContext as useContext16, useMemo as useMemo7 } from "react";
|
|
7359
7390
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7360
7391
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
7361
|
-
import { jsx as
|
|
7392
|
+
import { jsx as jsx100, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
7362
7393
|
var SURFACE_STYLES = {
|
|
7363
7394
|
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",
|
|
7364
7395
|
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",
|
|
@@ -7394,16 +7425,16 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
7394
7425
|
);
|
|
7395
7426
|
function LeadingIcon({ type }) {
|
|
7396
7427
|
const Icon = ICONS2[type];
|
|
7397
|
-
return /* @__PURE__ */
|
|
7428
|
+
return /* @__PURE__ */ jsx100(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
7398
7429
|
}
|
|
7399
7430
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
7400
7431
|
const hasAction = !!(actionLabel && onAction);
|
|
7401
|
-
return /* @__PURE__ */
|
|
7402
|
-
/* @__PURE__ */
|
|
7403
|
-
leadingIcon && /* @__PURE__ */
|
|
7404
|
-
/* @__PURE__ */
|
|
7432
|
+
return /* @__PURE__ */ jsxs77("div", { className: pillClassName(type, hasAction, className), children: [
|
|
7433
|
+
/* @__PURE__ */ jsxs77("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7434
|
+
leadingIcon && /* @__PURE__ */ jsx100(LeadingIcon, { type }),
|
|
7435
|
+
/* @__PURE__ */ jsx100("span", { className: LABEL_CLASSES, children: label })
|
|
7405
7436
|
] }),
|
|
7406
|
-
hasAction && /* @__PURE__ */
|
|
7437
|
+
hasAction && /* @__PURE__ */ jsx100(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
7407
7438
|
] });
|
|
7408
7439
|
}
|
|
7409
7440
|
var ToastContext = createContext13(null);
|
|
@@ -7425,9 +7456,9 @@ function ToastProvider({ children }) {
|
|
|
7425
7456
|
}),
|
|
7426
7457
|
[manager]
|
|
7427
7458
|
);
|
|
7428
|
-
return /* @__PURE__ */
|
|
7459
|
+
return /* @__PURE__ */ jsx100(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs77(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
7429
7460
|
children,
|
|
7430
|
-
/* @__PURE__ */
|
|
7461
|
+
/* @__PURE__ */ jsx100(BaseToast.Portal, { children: /* @__PURE__ */ jsx100(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx100(ToastList, {}) }) })
|
|
7431
7462
|
] }) });
|
|
7432
7463
|
}
|
|
7433
7464
|
function ToastList() {
|
|
@@ -7435,25 +7466,25 @@ function ToastList() {
|
|
|
7435
7466
|
return toasts.map((toast) => {
|
|
7436
7467
|
const type = toast.type ?? "neutral";
|
|
7437
7468
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
7438
|
-
return /* @__PURE__ */
|
|
7469
|
+
return /* @__PURE__ */ jsxs77(
|
|
7439
7470
|
BaseToast.Root,
|
|
7440
7471
|
{
|
|
7441
7472
|
toast,
|
|
7442
7473
|
swipeDirection: ["left", "down"],
|
|
7443
7474
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
7444
7475
|
children: [
|
|
7445
|
-
/* @__PURE__ */
|
|
7446
|
-
leadingIcon && /* @__PURE__ */
|
|
7447
|
-
/* @__PURE__ */
|
|
7476
|
+
/* @__PURE__ */ jsxs77("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7477
|
+
leadingIcon && /* @__PURE__ */ jsx100(LeadingIcon, { type }),
|
|
7478
|
+
/* @__PURE__ */ jsx100(BaseToast.Title, { render: /* @__PURE__ */ jsx100("span", {}), className: LABEL_CLASSES })
|
|
7448
7479
|
] }),
|
|
7449
|
-
actionLabel && /* @__PURE__ */
|
|
7480
|
+
actionLabel && /* @__PURE__ */ jsx100(
|
|
7450
7481
|
BaseToast.Action,
|
|
7451
7482
|
{
|
|
7452
7483
|
onClick: () => {
|
|
7453
7484
|
onAction?.();
|
|
7454
7485
|
close(toast.id);
|
|
7455
7486
|
},
|
|
7456
|
-
render: /* @__PURE__ */
|
|
7487
|
+
render: /* @__PURE__ */ jsx100(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
7457
7488
|
}
|
|
7458
7489
|
)
|
|
7459
7490
|
]
|
|
@@ -7498,6 +7529,7 @@ export {
|
|
|
7498
7529
|
ContainerHeader,
|
|
7499
7530
|
ConversationActions,
|
|
7500
7531
|
ConversationCard,
|
|
7532
|
+
ConversationHeading,
|
|
7501
7533
|
ConversationLayout,
|
|
7502
7534
|
ConversationMenu,
|
|
7503
7535
|
ConversationPlace,
|