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