@estiva-app/ui 0.117.0 → 0.118.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/ActivityLine.d.ts +37 -0
- package/dist/ActivityLine.d.ts.map +1 -0
- package/dist/CollapsibleSection.d.ts +6 -1
- package/dist/CollapsibleSection.d.ts.map +1 -1
- package/dist/ContainerHeader.d.ts +10 -1
- package/dist/ContainerHeader.d.ts.map +1 -1
- package/dist/DialogShell.d.ts +11 -3
- package/dist/DialogShell.d.ts.map +1 -1
- package/dist/ListTable.d.ts +71 -0
- package/dist/ListTable.d.ts.map +1 -0
- package/dist/MembersDialog.d.ts.map +1 -1
- package/dist/NavTree.d.ts +12 -1
- package/dist/NavTree.d.ts.map +1 -1
- package/dist/PageHeader.d.ts +11 -2
- package/dist/PageHeader.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +424 -320
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +253 -5
- package/src/ActivityLine.mdx +67 -0
- package/src/ActivityLine.stories.tsx +49 -0
- package/src/ActivityLine.test.tsx +47 -0
- package/src/ActivityLine.tsx +74 -0
- package/src/Button.mdx +5 -0
- package/src/CollapsibleSection.mdx +6 -0
- package/src/CollapsibleSection.stories.tsx +4 -1
- package/src/CollapsibleSection.test.tsx +11 -0
- package/src/CollapsibleSection.tsx +7 -2
- package/src/ContainerHeader.mdx +7 -0
- package/src/ContainerHeader.stories.tsx +3 -0
- package/src/ContainerHeader.test.tsx +12 -1
- package/src/ContainerHeader.tsx +38 -18
- package/src/DialogShell.mdx +8 -2
- package/src/DialogShell.stories.tsx +20 -7
- package/src/DialogShell.tsx +10 -4
- package/src/ListTable.mdx +112 -0
- package/src/ListTable.stories.tsx +133 -0
- package/src/ListTable.test.tsx +81 -0
- package/src/ListTable.tsx +178 -0
- package/src/MembersDialog.test.tsx +8 -0
- package/src/MembersDialog.tsx +2 -10
- package/src/NavTree.mdx +6 -0
- package/src/NavTree.stories.tsx +14 -0
- package/src/NavTree.test.tsx +18 -0
- package/src/NavTree.tsx +16 -1
- package/src/PageHeader.mdx +13 -2
- package/src/PageHeader.stories.tsx +35 -1
- package/src/PageHeader.test.tsx +21 -0
- package/src/PageHeader.tsx +17 -5
- package/src/index.ts +2 -0
- package/src/registry/registry.test.ts +5 -5
- package/stories/Choosing.mdx +2 -0
package/dist/index.js
CHANGED
|
@@ -1334,7 +1334,7 @@ import { AlertDialog } from "@base-ui/react/alert-dialog";
|
|
|
1334
1334
|
import { IconX as IconX3 } from "@tabler/icons-react";
|
|
1335
1335
|
|
|
1336
1336
|
// src/ContainerHeader.tsx
|
|
1337
|
-
import { IconChevronDown } from "@tabler/icons-react";
|
|
1337
|
+
import { IconArrowLeft, IconChevronDown } from "@tabler/icons-react";
|
|
1338
1338
|
import { Button as BaseButton5 } from "@base-ui/react/button";
|
|
1339
1339
|
|
|
1340
1340
|
// src/Menu.tsx
|
|
@@ -1660,12 +1660,19 @@ function MenuRow({ children, className }) {
|
|
|
1660
1660
|
|
|
1661
1661
|
// src/ContainerHeader.tsx
|
|
1662
1662
|
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1663
|
-
function ContainerHeader({ title, chevron = false, titleMenu, actions, className }) {
|
|
1663
|
+
function ContainerHeader({ title, chevron = false, titleMenu, actions, back, className }) {
|
|
1664
1664
|
const text = typeof title === "string";
|
|
1665
1665
|
const name = /* @__PURE__ */ jsxs16("div", { className: cn("flex items-center gap-1", text ? "shrink-0" : "min-w-0 flex-1"), children: [
|
|
1666
1666
|
text ? /* @__PURE__ */ jsx23("span", { className: "whitespace-nowrap text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx23("div", { className: "min-w-0 flex-1", children: title }),
|
|
1667
1667
|
(chevron || titleMenu != null) && /* @__PURE__ */ jsx23(IconChevronDown, { size: 12, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
1668
1668
|
] });
|
|
1669
|
+
const titleBox = /* @__PURE__ */ jsx23("div", { className: cn("flex items-center gap-2 overflow-hidden", text && !back ? "shrink-0" : "min-w-0 flex-1"), children: titleMenu != null ? /* @__PURE__ */ jsx23(
|
|
1670
|
+
Menu,
|
|
1671
|
+
{
|
|
1672
|
+
trigger: /* @__PURE__ */ jsx23(BaseButton5, { type: "button", className: cn("flex min-w-0 items-center px-1.5 py-1", MENU_TRIGGER_CLASSES), children: name }),
|
|
1673
|
+
children: titleMenu
|
|
1674
|
+
}
|
|
1675
|
+
) : name });
|
|
1669
1676
|
return (
|
|
1670
1677
|
// The title 16px in, where the column's content starts (Katerina, 7 October; it was 20px).
|
|
1671
1678
|
// With a title menu the bar gives the button 6px of its left padding
|
|
@@ -1674,14 +1681,14 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1674
1681
|
// (Katerina, 5 October).
|
|
1675
1682
|
// 12px between the title and the buttons, as between the right group's own parts: a cut title, and a button
|
|
1676
1683
|
// after it, ran right up to them (Leaf's adoption review, 4 November). A bar whose title fits does not move.
|
|
1677
|
-
/* @__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: [
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
{
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
}
|
|
1684
|
-
) :
|
|
1684
|
+
/* @__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", back ? "pl-3" : titleMenu != null ? "pl-2.5" : "pl-4", className), children: [
|
|
1685
|
+
back ? (
|
|
1686
|
+
// The arrow outside the title's box, which clips: its fill and its ring stay whole; 8px to the title.
|
|
1687
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
1688
|
+
/* @__PURE__ */ jsx23(IconButton, { tooltip: back.label, "aria-label": back.label, onClick: back.onClick, children: /* @__PURE__ */ jsx23(IconArrowLeft, { size: 16, stroke: 1.5 }) }),
|
|
1689
|
+
titleBox
|
|
1690
|
+
] })
|
|
1691
|
+
) : titleBox,
|
|
1685
1692
|
actions && /* @__PURE__ */ jsx23("div", { className: "flex shrink-0 items-center justify-end gap-3", children: /* @__PURE__ */ jsx23("div", { className: "flex shrink-0 items-center gap-1", children: actions }) })
|
|
1686
1693
|
] })
|
|
1687
1694
|
);
|
|
@@ -1689,7 +1696,7 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1689
1696
|
|
|
1690
1697
|
// src/DialogShell.tsx
|
|
1691
1698
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1692
|
-
function DialogShell({ title, onClose, headerContent, footer, children, bodyClassName, bodyMaxHeight, width = 502, alert = false }) {
|
|
1699
|
+
function DialogShell({ title, onClose, back, headerContent, footer, children, bodyClassName, bodyMaxHeight, width = 502, alert = false }) {
|
|
1693
1700
|
const Parts = alert ? AlertDialog : Dialog2;
|
|
1694
1701
|
const popupRef = useRef4(null);
|
|
1695
1702
|
return /* @__PURE__ */ jsx24(
|
|
@@ -1713,7 +1720,7 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1713
1720
|
/* @__PURE__ */ jsx24(
|
|
1714
1721
|
ContainerHeader,
|
|
1715
1722
|
{
|
|
1716
|
-
className: "pl-5",
|
|
1723
|
+
...back ? { back } : { className: "pl-5" },
|
|
1717
1724
|
title: headerContent ?? /* @__PURE__ */ jsx24(Parts.Title, { className: "block truncate text-h4 text-text-primary", render: /* @__PURE__ */ jsx24("span", {}), children: title }),
|
|
1718
1725
|
actions: (
|
|
1719
1726
|
/*
|
|
@@ -2191,7 +2198,7 @@ import { IconUserMinus as IconUserMinus2, IconUserPlus as IconUserPlus2 } from "
|
|
|
2191
2198
|
|
|
2192
2199
|
// src/MembersDialog.tsx
|
|
2193
2200
|
import { useId as useId3, useState as useState8 } from "react";
|
|
2194
|
-
import {
|
|
2201
|
+
import { IconUserMinus, IconUserPlus } from "@tabler/icons-react";
|
|
2195
2202
|
|
|
2196
2203
|
// src/Chip.tsx
|
|
2197
2204
|
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -2420,10 +2427,7 @@ function AddPeopleLayer({
|
|
|
2420
2427
|
{
|
|
2421
2428
|
title,
|
|
2422
2429
|
onClose,
|
|
2423
|
-
|
|
2424
|
-
/* @__PURE__ */ jsx32(IconButton, { tooltip: backLabel, "aria-label": backLabel, className: "-ml-2", onClick: onBack, children: /* @__PURE__ */ jsx32(IconArrowLeft, { size: 16, stroke: 1.5 }) }),
|
|
2425
|
-
/* @__PURE__ */ jsx32("span", { className: "truncate text-h4 text-text-primary", children: title })
|
|
2426
|
-
] }),
|
|
2430
|
+
back: { label: backLabel, onClick: onBack },
|
|
2427
2431
|
bodyClassName: "flex flex-col gap-6",
|
|
2428
2432
|
footer: /* @__PURE__ */ jsxs24(Fragment7, { children: [
|
|
2429
2433
|
/* @__PURE__ */ jsx32(Button, { variant: "muted", onClick: onClose, children: "Cancel" }),
|
|
@@ -4184,7 +4188,7 @@ function useRememberedOpen(storageKey, fallback) {
|
|
|
4184
4188
|
};
|
|
4185
4189
|
return [choice ?? fallback, setOpen];
|
|
4186
4190
|
}
|
|
4187
|
-
function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenChange, pending = false, storageKey, openFor, icon, trailing, actions, menu, menuLabel, showActions, look = "heading", indent = false, children, className, contentClassName }) {
|
|
4191
|
+
function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenChange, pending = false, storageKey, openFor, icon, trailing, count, actions, menu, menuLabel, showActions, look = "heading", indent = false, children, className, contentClassName }) {
|
|
4188
4192
|
const [initial] = useState15(defaultOpen);
|
|
4189
4193
|
const [openState, remember] = useRememberedOpen(storageKey, initial);
|
|
4190
4194
|
const open = openProp ?? openState;
|
|
@@ -4195,7 +4199,7 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
4195
4199
|
useOpenFor(openFor, open, setOpen, useContext7(sectionLinked));
|
|
4196
4200
|
const shown2 = open && !pending;
|
|
4197
4201
|
return /* @__PURE__ */ jsxs40(Collapsible.Root, { open: shown2, onOpenChange: (next, details) => setOpen(pending && details.reason === "trigger-press" ? !open : next), className: cn("flex flex-col", className), children: [
|
|
4198
|
-
/* @__PURE__ */ jsx55(SectionHeader, { title, chevron: true, icon, isExpanded: open, trailing, actions, menu, menuLabel, showActions, look, className: "shrink-0", render: /* @__PURE__ */ jsx55(Collapsible.Trigger, { "aria-expanded": open, "aria-busy": pending && open ? true : void 0 }) }),
|
|
4202
|
+
/* @__PURE__ */ jsx55(SectionHeader, { title, chevron: true, icon, isExpanded: open, trailing, ...count != null ? { count } : {}, actions, menu, menuLabel, showActions, look, className: "shrink-0", render: /* @__PURE__ */ jsx55(Collapsible.Trigger, { "aria-expanded": open, "aria-busy": pending && open ? true : void 0 }) }),
|
|
4199
4203
|
/* @__PURE__ */ jsx55(
|
|
4200
4204
|
Collapsible.Panel,
|
|
4201
4205
|
{
|
|
@@ -4538,8 +4542,10 @@ function Group({ group, selected, onSelect, opening, storageKey }) {
|
|
|
4538
4542
|
message: group.message,
|
|
4539
4543
|
loading: group.nodes === null,
|
|
4540
4544
|
trailing: group.trailing,
|
|
4545
|
+
...group.count != null ? { count: group.count } : {},
|
|
4541
4546
|
actions: group.actions,
|
|
4542
4547
|
menu: group.menu,
|
|
4548
|
+
...group.menuLabel != null ? { menuLabel: group.menuLabel } : {},
|
|
4543
4549
|
icon: group.icon,
|
|
4544
4550
|
defaultOpen: group.defaultOpen ?? holds(group.nodes, selected),
|
|
4545
4551
|
open: group.open,
|
|
@@ -4551,7 +4557,7 @@ function Group({ group, selected, onSelect, opening, storageKey }) {
|
|
|
4551
4557
|
}
|
|
4552
4558
|
);
|
|
4553
4559
|
}
|
|
4554
|
-
function NavTreeSection({ id, title, message, loading = false, pending = false, trailing, actions, menu, icon, defaultOpen = true, open, onOpenChange, storageKey, openFor, onIntent, children }) {
|
|
4560
|
+
function NavTreeSection({ id, title, message, loading = false, pending = false, trailing, count, actions, menu, menuLabel, icon, defaultOpen = true, open, onOpenChange, storageKey, openFor, onIntent, children }) {
|
|
4555
4561
|
const timer = useRef16(void 0);
|
|
4556
4562
|
useEffect10(() => () => clearTimeout(timer.current), []);
|
|
4557
4563
|
const [slow, setSlow] = useState18(false);
|
|
@@ -4587,8 +4593,10 @@ function NavTreeSection({ id, title, message, loading = false, pending = false,
|
|
|
4587
4593
|
storageKey,
|
|
4588
4594
|
openFor,
|
|
4589
4595
|
trailing,
|
|
4596
|
+
...count != null ? { count } : {},
|
|
4590
4597
|
actions,
|
|
4591
4598
|
menu,
|
|
4599
|
+
...menuLabel != null ? { menuLabel } : {},
|
|
4592
4600
|
icon,
|
|
4593
4601
|
className: "shrink-0",
|
|
4594
4602
|
contentClassName: "gap-0.5",
|
|
@@ -5917,10 +5925,53 @@ function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
|
5917
5925
|
);
|
|
5918
5926
|
}
|
|
5919
5927
|
|
|
5928
|
+
// src/MetaText.tsx
|
|
5929
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
5930
|
+
var TONE_CLASSES2 = {
|
|
5931
|
+
muted: "text-text-muted",
|
|
5932
|
+
secondary: "text-text-secondary",
|
|
5933
|
+
success: "text-success-default"
|
|
5934
|
+
};
|
|
5935
|
+
function MetaText({ children, tone = "muted", size = "caption", className }) {
|
|
5936
|
+
return /* @__PURE__ */ jsx77(
|
|
5937
|
+
"span",
|
|
5938
|
+
{
|
|
5939
|
+
className: cn(
|
|
5940
|
+
size === "chip" ? "text-chip font-normal" : "text-caption",
|
|
5941
|
+
TONE_CLASSES2[tone],
|
|
5942
|
+
TIME_CLASSES,
|
|
5943
|
+
className
|
|
5944
|
+
),
|
|
5945
|
+
children
|
|
5946
|
+
}
|
|
5947
|
+
);
|
|
5948
|
+
}
|
|
5949
|
+
|
|
5950
|
+
// src/ActivityLine.tsx
|
|
5951
|
+
import { jsx as jsx78, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
5952
|
+
function ActivityLine({ person, did, time, mark, where, words, seen = false, href, onClick, className, ...rest }) {
|
|
5953
|
+
const body = /* @__PURE__ */ jsx78(MenuItemBody, { leading: mark, leadingAt: "top", children: /* @__PURE__ */ jsxs57("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
5954
|
+
/* @__PURE__ */ jsxs57("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
5955
|
+
/* @__PURE__ */ jsx78("span", { className: cn("flex min-w-0 shrink-0 text-body-2-strong", seen ? "text-text-secondary" : "text-text-primary"), children: /* @__PURE__ */ jsx78(Person, { size: 16, name: person.name, ...person.picture ? { picture: person.picture } : {}, ...person.bot ? { bot: true } : {} }) }),
|
|
5956
|
+
/* @__PURE__ */ jsx78("span", { className: "min-w-0 truncate text-body-2 text-text-secondary", children: did }),
|
|
5957
|
+
/* @__PURE__ */ jsx78(MetaText, { size: "chip", className: "ml-auto shrink-0", children: time })
|
|
5958
|
+
] }),
|
|
5959
|
+
(where || words) && /* @__PURE__ */ jsxs57("span", { className: "truncate text-caption text-text-muted", children: [
|
|
5960
|
+
where && /* @__PURE__ */ jsx78("span", { className: "text-text-secondary", children: `${where}${words ? " \xB7 " : ""}` }),
|
|
5961
|
+
words
|
|
5962
|
+
] })
|
|
5963
|
+
] }) });
|
|
5964
|
+
const row = menuItemClassName({ size: "default", className });
|
|
5965
|
+
if (href) {
|
|
5966
|
+
return /* @__PURE__ */ jsx78(Link, { href, variant: "plain", className: row, ...onClick ? { onClick } : {}, ...rest, children: body });
|
|
5967
|
+
}
|
|
5968
|
+
return /* @__PURE__ */ jsx78("button", { type: "button", className: row, ...onClick ? { onClick } : {}, ...rest, children: body });
|
|
5969
|
+
}
|
|
5970
|
+
|
|
5920
5971
|
// src/ConversationActions.tsx
|
|
5921
5972
|
import { useState as useState21 } from "react";
|
|
5922
5973
|
import { IconCircleCheck as IconCircleCheck2, IconCircleDashed as IconCircleDashed4, IconMessage2 as IconMessage23, IconMoodPlus } from "@tabler/icons-react";
|
|
5923
|
-
import { Fragment as Fragment20, jsx as
|
|
5974
|
+
import { Fragment as Fragment20, jsx as jsx79, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5924
5975
|
function ConversationActions({ options, onReact, onReply, resolved = false, onResolve, onReopen, onPickerOpenChange, more, className }) {
|
|
5925
5976
|
const [picking, setPicking] = useState21(false);
|
|
5926
5977
|
const [strip, setStrip] = useState21(null);
|
|
@@ -5930,8 +5981,8 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5930
5981
|
};
|
|
5931
5982
|
const resolves = resolved ? onReopen : onResolve;
|
|
5932
5983
|
const answers = !!onReact && !!options || !!onReply;
|
|
5933
|
-
return /* @__PURE__ */
|
|
5934
|
-
onReact && options && /* @__PURE__ */
|
|
5984
|
+
return /* @__PURE__ */ jsx79("div", { ref: setStrip, className: cn("inline-flex", className), children: /* @__PURE__ */ jsxs58(Toolbar, { "aria-label": "Actions", children: [
|
|
5985
|
+
onReact && options && /* @__PURE__ */ jsx79(
|
|
5935
5986
|
Popover,
|
|
5936
5987
|
{
|
|
5937
5988
|
side: "top",
|
|
@@ -5942,8 +5993,8 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5942
5993
|
contentClassName: "p-1",
|
|
5943
5994
|
open: picking,
|
|
5944
5995
|
onOpenChange: setOpen,
|
|
5945
|
-
trigger: /* @__PURE__ */
|
|
5946
|
-
children: /* @__PURE__ */
|
|
5996
|
+
trigger: /* @__PURE__ */ jsx79(ToolbarButton, { tooltip: "React", "aria-label": "React", children: /* @__PURE__ */ jsx79(IconMoodPlus, { size: 16, stroke: 1.5 }) }),
|
|
5997
|
+
children: /* @__PURE__ */ jsx79(
|
|
5947
5998
|
ReactionPicker,
|
|
5948
5999
|
{
|
|
5949
6000
|
options: [...options],
|
|
@@ -5956,13 +6007,13 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5956
6007
|
)
|
|
5957
6008
|
}
|
|
5958
6009
|
),
|
|
5959
|
-
onReply && /* @__PURE__ */
|
|
5960
|
-
resolves && /* @__PURE__ */
|
|
5961
|
-
answers && /* @__PURE__ */
|
|
5962
|
-
resolved ? /* @__PURE__ */
|
|
6010
|
+
onReply && /* @__PURE__ */ jsx79(ToolbarButton, { tooltip: "Reply", "aria-label": "Reply", onClick: onReply, children: /* @__PURE__ */ jsx79(IconMessage23, { size: 16, stroke: 1.5 }) }),
|
|
6011
|
+
resolves && /* @__PURE__ */ jsxs58(Fragment20, { children: [
|
|
6012
|
+
answers && /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
|
|
6013
|
+
resolved ? /* @__PURE__ */ jsx79(ToolbarButton, { tooltip: "Reopen", "aria-label": "Reopen", onClick: onReopen, children: /* @__PURE__ */ jsx79(IconCircleDashed4, { size: 16, stroke: 1.5 }) }) : /* @__PURE__ */ jsx79(ToolbarButton, { variant: "resolve", tooltip: "Resolve", "aria-label": "Resolve", onClick: onResolve, children: /* @__PURE__ */ jsx79(IconCircleCheck2, { size: 16, stroke: 1.5 }) })
|
|
5963
6014
|
] }),
|
|
5964
|
-
more && /* @__PURE__ */
|
|
5965
|
-
(answers || resolves) && /* @__PURE__ */
|
|
6015
|
+
more && /* @__PURE__ */ jsxs58(Fragment20, { children: [
|
|
6016
|
+
(answers || resolves) && /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
|
|
5966
6017
|
more
|
|
5967
6018
|
] })
|
|
5968
6019
|
] }) });
|
|
@@ -5974,31 +6025,31 @@ import { IconArrowNarrowRight, IconCircleCheck as IconCircleCheck4, IconDotsVert
|
|
|
5974
6025
|
|
|
5975
6026
|
// src/ConversationMenu.tsx
|
|
5976
6027
|
import { IconCircleCheck as IconCircleCheck3, IconCircleDashed as IconCircleDashed5, IconDotsVertical as IconDotsVertical4 } from "@tabler/icons-react";
|
|
5977
|
-
import { Fragment as Fragment21, jsx as
|
|
6028
|
+
import { Fragment as Fragment21, jsx as jsx80, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5978
6029
|
function ConversationMenu({ resolved = false, onResolve, onReopen, resolveHint, children, label, onEdit, editLabel = "Edit", after, onDelete, deleteLabel = "Delete", moreLabel = "More actions", open, onOpenChange, trigger }) {
|
|
5979
6030
|
const resolves = resolved ? onReopen : onResolve;
|
|
5980
|
-
const first = (resolves || children) && /* @__PURE__ */
|
|
5981
|
-
resolves && (resolved ? /* @__PURE__ */
|
|
6031
|
+
const first = (resolves || children) && /* @__PURE__ */ jsxs59(Fragment21, { children: [
|
|
6032
|
+
resolves && (resolved ? /* @__PURE__ */ jsx80(MenuItem, { leading: /* @__PURE__ */ jsx80(IconCircleDashed5, { size: 16, stroke: 1.5, className: "text-text-secondary" }), label: "Reopen", onClick: onReopen }) : /* @__PURE__ */ jsx80(MenuItem, { leading: /* @__PURE__ */ jsx80(IconCircleCheck3, { size: 16, stroke: 1.5, className: "text-text-secondary" }), label: "Resolve", shortcut: resolveHint, onClick: onResolve })),
|
|
5982
6033
|
children
|
|
5983
6034
|
] });
|
|
5984
|
-
const middle = (onEdit || after) && /* @__PURE__ */
|
|
5985
|
-
onEdit && /* @__PURE__ */
|
|
6035
|
+
const middle = (onEdit || after) && /* @__PURE__ */ jsxs59(Fragment21, { children: [
|
|
6036
|
+
onEdit && /* @__PURE__ */ jsx80(MenuItem, { label: editLabel, onClick: onEdit }),
|
|
5986
6037
|
after
|
|
5987
6038
|
] });
|
|
5988
|
-
return /* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsxs59(
|
|
5989
6040
|
Menu,
|
|
5990
6041
|
{
|
|
5991
|
-
trigger: trigger ?? /* @__PURE__ */
|
|
6042
|
+
trigger: trigger ?? /* @__PURE__ */ jsx80(IconButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx80(IconDotsVertical4, { size: 16, stroke: 1.5 }) }),
|
|
5992
6043
|
align: "right",
|
|
5993
6044
|
open,
|
|
5994
6045
|
onOpenChange,
|
|
5995
6046
|
className: "w-[244px]",
|
|
5996
6047
|
children: [
|
|
5997
|
-
first && (label ? /* @__PURE__ */
|
|
5998
|
-
first && middle && /* @__PURE__ */
|
|
6048
|
+
first && (label ? /* @__PURE__ */ jsx80(MenuSection, { label, children: first }) : first),
|
|
6049
|
+
first && middle && /* @__PURE__ */ jsx80(MenuSeparator, {}),
|
|
5999
6050
|
middle,
|
|
6000
|
-
onDelete && (first || middle) && /* @__PURE__ */
|
|
6001
|
-
onDelete && /* @__PURE__ */
|
|
6051
|
+
onDelete && (first || middle) && /* @__PURE__ */ jsx80(MenuSeparator, {}),
|
|
6052
|
+
onDelete && /* @__PURE__ */ jsx80(MenuItem, { label: deleteLabel, destructive: true, onClick: onDelete })
|
|
6002
6053
|
]
|
|
6003
6054
|
}
|
|
6004
6055
|
);
|
|
@@ -6091,38 +6142,16 @@ var sendsInLayout = createContext11(null);
|
|
|
6091
6142
|
var repliesDrawn = createContext11(null);
|
|
6092
6143
|
|
|
6093
6144
|
// src/EditedMarker.tsx
|
|
6094
|
-
import { jsx as
|
|
6145
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
6095
6146
|
function EditedMarker({ edited }) {
|
|
6096
6147
|
if (!edited) return null;
|
|
6097
|
-
return /* @__PURE__ */
|
|
6098
|
-
}
|
|
6099
|
-
|
|
6100
|
-
// src/MetaText.tsx
|
|
6101
|
-
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
6102
|
-
var TONE_CLASSES2 = {
|
|
6103
|
-
muted: "text-text-muted",
|
|
6104
|
-
secondary: "text-text-secondary",
|
|
6105
|
-
success: "text-success-default"
|
|
6106
|
-
};
|
|
6107
|
-
function MetaText({ children, tone = "muted", size = "caption", className }) {
|
|
6108
|
-
return /* @__PURE__ */ jsx80(
|
|
6109
|
-
"span",
|
|
6110
|
-
{
|
|
6111
|
-
className: cn(
|
|
6112
|
-
size === "chip" ? "text-chip font-normal" : "text-caption",
|
|
6113
|
-
TONE_CLASSES2[tone],
|
|
6114
|
-
TIME_CLASSES,
|
|
6115
|
-
className
|
|
6116
|
-
),
|
|
6117
|
-
children
|
|
6118
|
-
}
|
|
6119
|
-
);
|
|
6148
|
+
return /* @__PURE__ */ jsx81(WithTooltip, { label: edited, wrapperClassName: "shrink-0", children: /* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-caption text-text-muted", children: "(edited)" }) });
|
|
6120
6149
|
}
|
|
6121
6150
|
|
|
6122
6151
|
// src/ReactionRow.tsx
|
|
6123
6152
|
import { useState as useState23 } from "react";
|
|
6124
6153
|
import { IconMoodPlus as IconMoodPlus2 } from "@tabler/icons-react";
|
|
6125
|
-
import { jsx as
|
|
6154
|
+
import { jsx as jsx82, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6126
6155
|
var NAMED = 8;
|
|
6127
6156
|
var meaningOf = (options, emoji) => options.find((o) => o.emoji === emoji)?.label ?? emoji;
|
|
6128
6157
|
function whoReacted(reaction, nameOf, options, viewer) {
|
|
@@ -6137,7 +6166,7 @@ function whoReacted(reaction, nameOf, options, viewer) {
|
|
|
6137
6166
|
}
|
|
6138
6167
|
function AddReactionButton({ options, onPick, className }) {
|
|
6139
6168
|
const [picking, setPicking] = useState23(false);
|
|
6140
|
-
return /* @__PURE__ */
|
|
6169
|
+
return /* @__PURE__ */ jsx82(
|
|
6141
6170
|
Popover,
|
|
6142
6171
|
{
|
|
6143
6172
|
open: picking,
|
|
@@ -6147,8 +6176,8 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
6147
6176
|
ariaLabel: "Add a reaction",
|
|
6148
6177
|
contentClassName: "p-1",
|
|
6149
6178
|
className: cn("w-auto min-w-0", className),
|
|
6150
|
-
trigger: /* @__PURE__ */
|
|
6151
|
-
children: /* @__PURE__ */
|
|
6179
|
+
trigger: /* @__PURE__ */ jsx82(IconButton, { variant: "muted", tooltip: "Add a reaction", "aria-label": "Add a reaction", children: /* @__PURE__ */ jsx82(IconMoodPlus2, { size: 16, stroke: 1.5 }) }),
|
|
6180
|
+
children: /* @__PURE__ */ jsx82(
|
|
6152
6181
|
ReactionPicker,
|
|
6153
6182
|
{
|
|
6154
6183
|
options: [...options],
|
|
@@ -6165,8 +6194,8 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
6165
6194
|
function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }) {
|
|
6166
6195
|
const shown2 = reactions.filter((r) => r.by.length > 0);
|
|
6167
6196
|
if (shown2.length === 0) return null;
|
|
6168
|
-
return /* @__PURE__ */
|
|
6169
|
-
shown2.map((r) => /* @__PURE__ */
|
|
6197
|
+
return /* @__PURE__ */ jsxs60("div", { "data-reaction-row": true, className: cn("flex flex-wrap items-center gap-1", className), children: [
|
|
6198
|
+
shown2.map((r) => /* @__PURE__ */ jsx82(WithTooltip, { label: whoReacted(r, nameOf, options, viewer), children: /* @__PURE__ */ jsx82(
|
|
6170
6199
|
Reaction,
|
|
6171
6200
|
{
|
|
6172
6201
|
emoji: r.emoji,
|
|
@@ -6177,13 +6206,13 @@ function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }
|
|
|
6177
6206
|
onClick: () => onToggle?.(r.emoji)
|
|
6178
6207
|
}
|
|
6179
6208
|
) }, r.emoji)),
|
|
6180
|
-
onToggle && /* @__PURE__ */
|
|
6209
|
+
onToggle && /* @__PURE__ */ jsx82(AddReactionButton, { options, onPick: onToggle })
|
|
6181
6210
|
] });
|
|
6182
6211
|
}
|
|
6183
6212
|
|
|
6184
6213
|
// src/RepliesRow.tsx
|
|
6185
6214
|
import { IconChevronRight as IconChevronRight4, IconMessage2 as IconMessage24 } from "@tabler/icons-react";
|
|
6186
|
-
import { Fragment as Fragment22, jsx as
|
|
6215
|
+
import { Fragment as Fragment22, jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6187
6216
|
var ROW_CLASSES3 = "flex w-full items-center gap-2 pb-1.5 pl-8 pr-2";
|
|
6188
6217
|
var OPEN_CLASSES = "border-accent-outline bg-accent-wash";
|
|
6189
6218
|
var BOX_CLASSES = "group/replies flex shrink-0 items-center gap-2 rounded-lg border border-transparent px-2 py-1.5 transition-colors hover:border-accent-outline hover:bg-accent-wash";
|
|
@@ -6192,9 +6221,9 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6192
6221
|
const label = `${count} ${count === 1 ? "reply" : "replies"}`;
|
|
6193
6222
|
const fresh = newCount ?? (isNew ? 1 : 0);
|
|
6194
6223
|
const name = newCount ? `${label}, ${newCount} new` : label;
|
|
6195
|
-
const inner = /* @__PURE__ */
|
|
6196
|
-
withFaces && /* @__PURE__ */
|
|
6197
|
-
/* @__PURE__ */
|
|
6224
|
+
const inner = /* @__PURE__ */ jsxs61(Fragment22, { children: [
|
|
6225
|
+
withFaces && /* @__PURE__ */ jsx83("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ jsx83(AvatarGroup, { size: 18, members: faces.map((f) => ({ name: f.name, picture: f.picture, bot: f.bot })) }) }),
|
|
6226
|
+
/* @__PURE__ */ jsx83(
|
|
6198
6227
|
IconMessage24,
|
|
6199
6228
|
{
|
|
6200
6229
|
size: 16,
|
|
@@ -6205,9 +6234,9 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6205
6234
|
)
|
|
6206
6235
|
}
|
|
6207
6236
|
),
|
|
6208
|
-
/* @__PURE__ */
|
|
6209
|
-
last && /* @__PURE__ */
|
|
6210
|
-
/* @__PURE__ */
|
|
6237
|
+
/* @__PURE__ */ jsx83("span", { className: "text-chip font-medium text-text-interactive transition-colors group-hover/replies:text-text-primary", children: label }),
|
|
6238
|
+
last && /* @__PURE__ */ jsx83("span", { className: cn("mt-px text-small leading-3 text-text-muted", TIME_CLASSES), children: last }),
|
|
6239
|
+
/* @__PURE__ */ jsx83(
|
|
6211
6240
|
IconChevronRight4,
|
|
6212
6241
|
{
|
|
6213
6242
|
size: 12,
|
|
@@ -6216,20 +6245,20 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6216
6245
|
}
|
|
6217
6246
|
)
|
|
6218
6247
|
] });
|
|
6219
|
-
const chip = fresh > 0 && /* @__PURE__ */
|
|
6220
|
-
/* @__PURE__ */
|
|
6221
|
-
/* @__PURE__ */
|
|
6248
|
+
const chip = fresh > 0 && /* @__PURE__ */ jsxs61(Fragment22, { children: [
|
|
6249
|
+
/* @__PURE__ */ jsx83("span", { className: "h-0.5 w-0.5 shrink-0 rounded-full bg-text-muted" }),
|
|
6250
|
+
/* @__PURE__ */ jsx83(Chip, { type: urgent ? "warning" : "brand", label: `${fresh} new` })
|
|
6222
6251
|
] });
|
|
6223
6252
|
if (!onOpen) {
|
|
6224
|
-
return /* @__PURE__ */
|
|
6225
|
-
/* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ jsxs61("div", { className: ROW_CLASSES3, children: [
|
|
6254
|
+
/* @__PURE__ */ jsx83("div", { className: BOX_CLASSES, children: inner }),
|
|
6226
6255
|
chip
|
|
6227
6256
|
] });
|
|
6228
6257
|
}
|
|
6229
6258
|
return (
|
|
6230
6259
|
// @estiva-escape(no-raw-element): the row is the thread's way in, Peek's replies row; no kit button takes a face stack, a count, a time and the new chip in one press
|
|
6231
|
-
/* @__PURE__ */
|
|
6232
|
-
/* @__PURE__ */
|
|
6260
|
+
/* @__PURE__ */ jsxs61("button", { type: "button", className: cn(ROW_CLASSES3, "cursor-pointer text-left"), onClick: onOpen, "aria-expanded": open, "aria-label": `${name}, ${open ? "close" : "open"} the thread`, "data-interactive": true, children: [
|
|
6261
|
+
/* @__PURE__ */ jsx83("span", { className: cn(BOX_CLASSES, open && OPEN_CLASSES), children: inner }),
|
|
6233
6262
|
chip
|
|
6234
6263
|
] })
|
|
6235
6264
|
);
|
|
@@ -6237,14 +6266,14 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6237
6266
|
|
|
6238
6267
|
// src/ResolveDialog.tsx
|
|
6239
6268
|
import { useState as useState24 } from "react";
|
|
6240
|
-
import { jsx as
|
|
6269
|
+
import { jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6241
6270
|
function ResolveDialog({ onResolve, onCancel, refused }) {
|
|
6242
6271
|
const [note, setNote] = useState24("");
|
|
6243
6272
|
return (
|
|
6244
6273
|
// Outlined at rest and green on hover in Signal, the kit's `resolve` look.
|
|
6245
|
-
/* @__PURE__ */
|
|
6246
|
-
/* @__PURE__ */
|
|
6247
|
-
refused && /* @__PURE__ */
|
|
6274
|
+
/* @__PURE__ */ jsx84(FormDialog, { title: "Resolve", submitLabel: "Resolve", submitVariant: "resolve", onSubmit: () => onResolve(note), onClose: onCancel, children: /* @__PURE__ */ jsxs62(Field, { label: "Resolution message (optional)", children: [
|
|
6275
|
+
/* @__PURE__ */ jsx84(Textarea, { autoFocus: true, value: note, onChange: (e) => setNote(e.target.value), placeholder: "Summarize the outcome or decision...", className: "h-[109px]" }),
|
|
6276
|
+
refused && /* @__PURE__ */ jsx84(FieldLine, { tone: "error", children: refused })
|
|
6248
6277
|
] }) })
|
|
6249
6278
|
);
|
|
6250
6279
|
}
|
|
@@ -6292,31 +6321,31 @@ function useFaceLine(root, active, toDot = false) {
|
|
|
6292
6321
|
}
|
|
6293
6322
|
|
|
6294
6323
|
// src/PinnedComment.tsx
|
|
6295
|
-
import { jsx as
|
|
6324
|
+
import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6296
6325
|
var goneWords = (deleted) => deleted ? "This comment was deleted." : "This comment can\u2019t be shown.";
|
|
6297
6326
|
var GONE_CLOSED = "This thread takes no new replies.";
|
|
6298
6327
|
function PinnedComment({ author, time, at: given, words, deleted = false, unseen = false }) {
|
|
6299
6328
|
const at = momentOf(given);
|
|
6300
|
-
return /* @__PURE__ */
|
|
6301
|
-
/* @__PURE__ */
|
|
6302
|
-
/* @__PURE__ */
|
|
6303
|
-
/* @__PURE__ */
|
|
6304
|
-
/* @__PURE__ */
|
|
6329
|
+
return /* @__PURE__ */ jsx85(Card, { fill: "elevated", clip: true, children: deleted || unseen ? /* @__PURE__ */ jsx85("p", { className: "p-2 text-caption italic text-text-muted", children: goneWords(deleted) }) : /* @__PURE__ */ jsxs63("div", { className: "flex flex-col p-2", children: [
|
|
6330
|
+
/* @__PURE__ */ jsxs63("div", { className: "flex items-center gap-2", children: [
|
|
6331
|
+
/* @__PURE__ */ jsx85(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
6332
|
+
/* @__PURE__ */ jsx85("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6333
|
+
/* @__PURE__ */ jsx85(MetaText, { className: "shrink-0", children: at === void 0 ? time : /* @__PURE__ */ jsx85(WithTooltip, { label: exactTime(at), children: /* @__PURE__ */ jsx85("time", { dateTime: new Date(at).toISOString(), children: time }) }) })
|
|
6305
6334
|
] }),
|
|
6306
|
-
/* @__PURE__ */
|
|
6335
|
+
/* @__PURE__ */ jsx85("div", { className: "pb-2 pl-8 pr-2 pt-1", children: /* @__PURE__ */ jsx85("div", { className: "truncate text-caption text-text-secondary", children: words }) })
|
|
6307
6336
|
] }) });
|
|
6308
6337
|
}
|
|
6309
6338
|
|
|
6310
6339
|
// src/ConversationCard.tsx
|
|
6311
|
-
import { Fragment as Fragment23, jsx as
|
|
6340
|
+
import { Fragment as Fragment23, jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6312
6341
|
function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
6313
6342
|
const at = momentOf(given);
|
|
6314
6343
|
const exact = at === void 0 ? void 0 : exactTime(at);
|
|
6315
|
-
const said = at === void 0 ? time : /* @__PURE__ */
|
|
6344
|
+
const said = at === void 0 ? time : /* @__PURE__ */ jsx86("time", { dateTime: new Date(at).toISOString(), children: time });
|
|
6316
6345
|
if (timeHref) {
|
|
6317
|
-
return /* @__PURE__ */
|
|
6346
|
+
return /* @__PURE__ */ jsx86(WithTooltip, { label: exact ? `${exact} \xB7 ${timeLabel}` : timeLabel, wrapperClassName: "shrink-0", children: /* @__PURE__ */ jsx86(MetaText, { className: "contents", children: /* @__PURE__ */ jsx86(Link, { href: timeHref, variant: "quiet", "data-interactive": true, children: said }) }) });
|
|
6318
6347
|
}
|
|
6319
|
-
return /* @__PURE__ */
|
|
6348
|
+
return /* @__PURE__ */ jsx86(MetaText, { className: "shrink-0", children: exact ? /* @__PURE__ */ jsx86(WithTooltip, { label: exact, children: said }) : time });
|
|
6320
6349
|
}
|
|
6321
6350
|
var fadeBefore = (end) => `linear-gradient(to right, black ${end - 16}px, transparent ${end}px)`;
|
|
6322
6351
|
function useClearOfStrip(root, strip, shown2) {
|
|
@@ -6336,15 +6365,15 @@ function useClearOfStrip(root, strip, shown2) {
|
|
|
6336
6365
|
return end;
|
|
6337
6366
|
}
|
|
6338
6367
|
function Head({ author, time, at, timeHref, timeLabel, edited, isNew, urgent, meta, end }) {
|
|
6339
|
-
return /* @__PURE__ */
|
|
6340
|
-
/* @__PURE__ */
|
|
6341
|
-
/* @__PURE__ */
|
|
6342
|
-
/* @__PURE__ */
|
|
6343
|
-
/* @__PURE__ */
|
|
6344
|
-
/* @__PURE__ */
|
|
6368
|
+
return /* @__PURE__ */ jsxs64("div", { className: "flex w-full items-center gap-2", children: [
|
|
6369
|
+
/* @__PURE__ */ jsxs64("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: [
|
|
6370
|
+
/* @__PURE__ */ jsx86("span", { "data-face": true, className: "relative flex shrink-0", children: /* @__PURE__ */ jsx86(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }) }),
|
|
6371
|
+
/* @__PURE__ */ jsx86("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6372
|
+
/* @__PURE__ */ jsx86(When, { time, at, timeHref, timeLabel }),
|
|
6373
|
+
/* @__PURE__ */ jsx86(EditedMarker, { edited }),
|
|
6345
6374
|
meta
|
|
6346
6375
|
] }),
|
|
6347
|
-
isNew && (urgent ? /* @__PURE__ */
|
|
6376
|
+
isNew && (urgent ? /* @__PURE__ */ jsx86(UrgentMark, {}) : /* @__PURE__ */ jsx86(UnreadDot, {}))
|
|
6348
6377
|
] });
|
|
6349
6378
|
}
|
|
6350
6379
|
function attentionOf(fresh, urgent, inThreadCard) {
|
|
@@ -6352,13 +6381,13 @@ function attentionOf(fresh, urgent, inThreadCard) {
|
|
|
6352
6381
|
return urgent ? "warning" : "accent";
|
|
6353
6382
|
}
|
|
6354
6383
|
function EndedLine({ by, note, at }) {
|
|
6355
|
-
return /* @__PURE__ */
|
|
6356
|
-
/* @__PURE__ */
|
|
6357
|
-
/* @__PURE__ */
|
|
6358
|
-
/* @__PURE__ */
|
|
6359
|
-
/* @__PURE__ */
|
|
6360
|
-
/* @__PURE__ */
|
|
6361
|
-
at && /* @__PURE__ */
|
|
6384
|
+
return /* @__PURE__ */ jsxs64("div", { "data-resolved": "line", className: "relative flex items-start py-1", children: [
|
|
6385
|
+
/* @__PURE__ */ jsx86("span", { className: "flex h-[17px] w-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx86("span", { "data-dot": true, className: "relative z-10 flex size-2 items-center justify-center rounded-full bg-bg-surface", children: /* @__PURE__ */ jsx86("span", { className: "size-1 rounded-full bg-success-default" }) }) }),
|
|
6386
|
+
/* @__PURE__ */ jsxs64("p", { className: "min-w-0 text-h5 leading-snug", children: [
|
|
6387
|
+
/* @__PURE__ */ jsx86("span", { className: "whitespace-nowrap text-text-primary", children: by }),
|
|
6388
|
+
/* @__PURE__ */ jsx86(IconArrowNarrowRight, { size: 12, stroke: 1.5, className: "mx-1.5 -mt-px inline shrink-0 text-text-primary" }),
|
|
6389
|
+
/* @__PURE__ */ jsx86("span", { className: "text-text-secondary", children: note }),
|
|
6390
|
+
at && /* @__PURE__ */ jsxs64(MetaText, { size: "chip", children: [
|
|
6362
6391
|
" \xB7 ",
|
|
6363
6392
|
at
|
|
6364
6393
|
] })
|
|
@@ -6367,13 +6396,13 @@ function EndedLine({ by, note, at }) {
|
|
|
6367
6396
|
}
|
|
6368
6397
|
function ResolvedCheck({ by, note, at }) {
|
|
6369
6398
|
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
6370
|
-
return /* @__PURE__ */
|
|
6371
|
-
/* @__PURE__ */
|
|
6399
|
+
return /* @__PURE__ */ jsx86(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */ jsxs64("span", { className: "flex items-center gap-1 text-caption text-success-default", children: [
|
|
6400
|
+
/* @__PURE__ */ jsx86(IconCircleCheck4, { size: 14, stroke: 1.5 }),
|
|
6372
6401
|
"Resolved"
|
|
6373
6402
|
] }) });
|
|
6374
6403
|
}
|
|
6375
6404
|
function Words({ children }) {
|
|
6376
|
-
return /* @__PURE__ */
|
|
6405
|
+
return /* @__PURE__ */ jsx86("div", { className: "relative w-full break-words pb-2 pl-8 pr-2 pt-1", children: /* @__PURE__ */ jsx86("div", { className: "flex flex-col gap-2 text-body-2 text-text-secondary", children }) });
|
|
6377
6406
|
}
|
|
6378
6407
|
function useReactionRefusal(reactions) {
|
|
6379
6408
|
const [refused, setRefused] = useState26();
|
|
@@ -6400,9 +6429,9 @@ function useReactionRefusal(reactions) {
|
|
|
6400
6429
|
}
|
|
6401
6430
|
function Reactions({ reactions, refused, readOnly }) {
|
|
6402
6431
|
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
6403
|
-
return /* @__PURE__ */
|
|
6404
|
-
reactions && /* @__PURE__ */
|
|
6405
|
-
refused && /* @__PURE__ */
|
|
6432
|
+
return /* @__PURE__ */ jsxs64("div", { className: "relative flex w-full flex-col gap-1 pb-2 pl-8 pt-1", children: [
|
|
6433
|
+
reactions && /* @__PURE__ */ jsx86(ReactionRow, { ...reactions, onToggle: readOnly ? void 0 : reactions.onToggle }),
|
|
6434
|
+
refused && /* @__PURE__ */ jsxs64(FieldLine, { tone: "error", children: [
|
|
6406
6435
|
"Not reacted: ",
|
|
6407
6436
|
refused,
|
|
6408
6437
|
"."
|
|
@@ -6410,11 +6439,11 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
6410
6439
|
] });
|
|
6411
6440
|
}
|
|
6412
6441
|
function Editing({ author, heading, children }) {
|
|
6413
|
-
return /* @__PURE__ */
|
|
6414
|
-
!!heading && /* @__PURE__ */
|
|
6415
|
-
/* @__PURE__ */
|
|
6416
|
-
/* @__PURE__ */
|
|
6417
|
-
/* @__PURE__ */
|
|
6442
|
+
return /* @__PURE__ */ jsxs64("div", { className: "p-2", children: [
|
|
6443
|
+
!!heading && /* @__PURE__ */ jsx86("div", { className: "w-full pb-2", children: heading }),
|
|
6444
|
+
/* @__PURE__ */ jsxs64("div", { className: "flex items-start gap-2", children: [
|
|
6445
|
+
/* @__PURE__ */ jsx86(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
6446
|
+
/* @__PURE__ */ jsx86("div", { className: "min-w-0 flex-1", children })
|
|
6418
6447
|
] })
|
|
6419
6448
|
] });
|
|
6420
6449
|
}
|
|
@@ -6428,7 +6457,7 @@ function stillHere(root) {
|
|
|
6428
6457
|
}
|
|
6429
6458
|
function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
6430
6459
|
const [answered, setAnswered] = useState26(false);
|
|
6431
|
-
return /* @__PURE__ */
|
|
6460
|
+
return /* @__PURE__ */ jsx86(
|
|
6432
6461
|
ConfirmDialog,
|
|
6433
6462
|
{
|
|
6434
6463
|
title: `Delete this ${noun}?`,
|
|
@@ -6447,7 +6476,7 @@ function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
|
6447
6476
|
}
|
|
6448
6477
|
function ResolveQuestion({ onResolve, refused, onClose }) {
|
|
6449
6478
|
const [answered, setAnswered] = useState26(false);
|
|
6450
|
-
return /* @__PURE__ */
|
|
6479
|
+
return /* @__PURE__ */ jsx86(
|
|
6451
6480
|
ResolveDialog,
|
|
6452
6481
|
{
|
|
6453
6482
|
refused: answered ? refused : void 0,
|
|
@@ -6500,9 +6529,9 @@ function ConversationCard(props) {
|
|
|
6500
6529
|
const reply = onReply ?? item?.show;
|
|
6501
6530
|
const marked = selected ?? (item && !item.under ? item.open : void 0);
|
|
6502
6531
|
const under = !!item?.under;
|
|
6503
|
-
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */
|
|
6504
|
-
return /* @__PURE__ */
|
|
6505
|
-
/* @__PURE__ */
|
|
6532
|
+
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */ jsx86(RepliesRow, { ...replies, onOpen: replies.onOpen ?? (under ? item?.toggle : void 0), open: replies.open ?? (under && !!item?.open), urgent });
|
|
6533
|
+
return /* @__PURE__ */ jsxs64(Fragment23, { children: [
|
|
6534
|
+
/* @__PURE__ */ jsxs64(
|
|
6506
6535
|
Card,
|
|
6507
6536
|
{
|
|
6508
6537
|
ref: root,
|
|
@@ -6527,14 +6556,14 @@ function ConversationCard(props) {
|
|
|
6527
6556
|
setHovered(false);
|
|
6528
6557
|
},
|
|
6529
6558
|
children: [
|
|
6530
|
-
isEditing ? /* @__PURE__ */
|
|
6559
|
+
isEditing ? /* @__PURE__ */ jsx86(Editing, { author, heading, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs64("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6531
6560
|
!!heading && // Faded clear of the strip, as the head's words are (useClearOfStrip).
|
|
6532
|
-
/* @__PURE__ */
|
|
6533
|
-
deleted ? /* @__PURE__ */
|
|
6534
|
-
!!about && /* @__PURE__ */
|
|
6535
|
-
/* @__PURE__ */
|
|
6536
|
-
] }) : /* @__PURE__ */
|
|
6537
|
-
/* @__PURE__ */
|
|
6561
|
+
/* @__PURE__ */ jsx86("div", { className: "w-full pb-2", style: wordsEnd === void 0 ? void 0 : { maskImage: fadeBefore(wordsEnd), WebkitMaskImage: fadeBefore(wordsEnd) }, children: heading }),
|
|
6562
|
+
deleted ? /* @__PURE__ */ jsxs64(Fragment23, { children: [
|
|
6563
|
+
!!about && /* @__PURE__ */ jsx86("div", { className: "relative w-full pl-8 pr-2", children: about }),
|
|
6564
|
+
/* @__PURE__ */ jsx86("p", { className: cn("w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", !!about && "pt-1"), children: goneWords(isDeleted) })
|
|
6565
|
+
] }) : /* @__PURE__ */ jsxs64(Fragment23, { children: [
|
|
6566
|
+
/* @__PURE__ */ jsx86(
|
|
6538
6567
|
Head,
|
|
6539
6568
|
{
|
|
6540
6569
|
author,
|
|
@@ -6545,24 +6574,24 @@ function ConversationCard(props) {
|
|
|
6545
6574
|
edited: props.edited,
|
|
6546
6575
|
isNew,
|
|
6547
6576
|
urgent,
|
|
6548
|
-
meta: resolved && /* @__PURE__ */
|
|
6577
|
+
meta: resolved && /* @__PURE__ */ jsx86(ResolvedCheck, { by: resolved.by, note: resolved.note, at: resolved.at }),
|
|
6549
6578
|
end: wordsEnd
|
|
6550
6579
|
}
|
|
6551
6580
|
),
|
|
6552
6581
|
!!about && // Under the name, above the words (Katerina, 1 November).
|
|
6553
|
-
/* @__PURE__ */
|
|
6554
|
-
/* @__PURE__ */
|
|
6582
|
+
/* @__PURE__ */ jsx86("div", { className: "relative w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6583
|
+
/* @__PURE__ */ jsx86(Words, { children })
|
|
6555
6584
|
] }),
|
|
6556
|
-
!deleted && files && /* @__PURE__ */
|
|
6557
|
-
/* @__PURE__ */
|
|
6585
|
+
!deleted && files && /* @__PURE__ */ jsx86("div", { className: "relative flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
6586
|
+
/* @__PURE__ */ jsx86(Reactions, { reactions: reactionRow, refused: reactionRefused, readOnly }),
|
|
6558
6587
|
resolved?.note && // Who resolved it and the note, above the way into the replies; the check by the time says "Resolved" (Katerina, 1 November).
|
|
6559
|
-
/* @__PURE__ */
|
|
6560
|
-
repliesRow && /* @__PURE__ */
|
|
6588
|
+
/* @__PURE__ */ jsx86("div", { className: "relative w-full pb-1", children: /* @__PURE__ */ jsx86("div", { className: "-ml-2 w-[calc(100%+8px)]", children: /* @__PURE__ */ jsx86(EndedLine, { by: resolved.by, note: resolved.note, at: resolved.at }) }) }),
|
|
6589
|
+
repliesRow && /* @__PURE__ */ jsx86("div", { className: "relative w-full", children: repliesRow })
|
|
6561
6590
|
] }),
|
|
6562
6591
|
dotLine && // One bar from the face to the dot, measured (useFaceLine): 2px, centred under the 24px face, 8px in.
|
|
6563
6592
|
// Its top and height come from the measure: where the face ends and the dot stands are not known ahead.
|
|
6564
|
-
/* @__PURE__ */
|
|
6565
|
-
showStrip && /* @__PURE__ */
|
|
6593
|
+
/* @__PURE__ */ jsx86("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: dotLine.top, height: dotLine.height } }),
|
|
6594
|
+
showStrip && /* @__PURE__ */ jsx86("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx86(
|
|
6566
6595
|
ConversationActions,
|
|
6567
6596
|
{
|
|
6568
6597
|
options: reactions?.options,
|
|
@@ -6575,10 +6604,10 @@ function ConversationCard(props) {
|
|
|
6575
6604
|
resolved: !!resolved,
|
|
6576
6605
|
onResolve: onResolve && (() => setResolving(true)),
|
|
6577
6606
|
onReopen,
|
|
6578
|
-
more: offersMenu && /* @__PURE__ */
|
|
6607
|
+
more: offersMenu && /* @__PURE__ */ jsx86(
|
|
6579
6608
|
ConversationMenu,
|
|
6580
6609
|
{
|
|
6581
|
-
trigger: /* @__PURE__ */
|
|
6610
|
+
trigger: /* @__PURE__ */ jsx86(ToolbarButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx86(IconDotsVertical5, { size: 16, stroke: 1.5 }) }),
|
|
6582
6611
|
open: menuOpen,
|
|
6583
6612
|
onOpenChange: (open) => {
|
|
6584
6613
|
setMenuOpen(open);
|
|
@@ -6602,15 +6631,15 @@ function ConversationCard(props) {
|
|
|
6602
6631
|
]
|
|
6603
6632
|
}
|
|
6604
6633
|
),
|
|
6605
|
-
deleting && onDelete && /* @__PURE__ */
|
|
6606
|
-
/* @__PURE__ */
|
|
6607
|
-
replies && replies.count > 0 && /* @__PURE__ */
|
|
6634
|
+
deleting && onDelete && /* @__PURE__ */ jsx86(DeleteQuestion, { noun, onDelete, refused: deleteRefused, onClose: () => setDeleting(false), children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx86("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */ jsxs64(Fragment23, { children: [
|
|
6635
|
+
/* @__PURE__ */ jsx86("p", { children: "It is deleted for everyone." }),
|
|
6636
|
+
replies && replies.count > 0 && /* @__PURE__ */ jsxs64("p", { children: [
|
|
6608
6637
|
"Its ",
|
|
6609
6638
|
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
6610
6639
|
"."
|
|
6611
6640
|
] })
|
|
6612
6641
|
] }) }),
|
|
6613
|
-
resolving && onResolve && /* @__PURE__ */
|
|
6642
|
+
resolving && onResolve && /* @__PURE__ */ jsx86(ResolveQuestion, { onResolve, refused: resolveRefused, onClose: () => setResolving(false) })
|
|
6614
6643
|
] });
|
|
6615
6644
|
}
|
|
6616
6645
|
function ReplyCard(props) {
|
|
@@ -6633,8 +6662,8 @@ function ReplyCard(props) {
|
|
|
6633
6662
|
useLayoutEffect7(() => {
|
|
6634
6663
|
if (drawn) drawn.added += 1;
|
|
6635
6664
|
}, [drawn]);
|
|
6636
|
-
return /* @__PURE__ */
|
|
6637
|
-
/* @__PURE__ */
|
|
6665
|
+
return /* @__PURE__ */ jsxs64(Fragment23, { children: [
|
|
6666
|
+
/* @__PURE__ */ jsxs64(
|
|
6638
6667
|
Card,
|
|
6639
6668
|
{
|
|
6640
6669
|
ref: root,
|
|
@@ -6657,15 +6686,15 @@ function ReplyCard(props) {
|
|
|
6657
6686
|
setHovered(false);
|
|
6658
6687
|
},
|
|
6659
6688
|
children: [
|
|
6660
|
-
isEditing ? /* @__PURE__ */
|
|
6661
|
-
/* @__PURE__ */
|
|
6662
|
-
about && /* @__PURE__ */
|
|
6663
|
-
/* @__PURE__ */
|
|
6664
|
-
files && /* @__PURE__ */
|
|
6665
|
-
/* @__PURE__ */
|
|
6689
|
+
isEditing ? /* @__PURE__ */ jsx86(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs64("div", { className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6690
|
+
/* @__PURE__ */ jsx86(Head, { author, time: props.time, at: props.at, timeHref: props.timeHref, timeLabel: props.timeLabel, edited: props.edited, isNew, urgent, end: wordsEnd }),
|
|
6691
|
+
about && /* @__PURE__ */ jsx86("div", { className: "w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6692
|
+
/* @__PURE__ */ jsx86(Words, { children }),
|
|
6693
|
+
files && /* @__PURE__ */ jsx86("div", { className: "flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
6694
|
+
/* @__PURE__ */ jsx86(Reactions, { reactions, refused: reactionRefused, readOnly })
|
|
6666
6695
|
] }),
|
|
6667
6696
|
showStrip && // In a box of its own, as a comment's: the box is what the head measures to keep clear of.
|
|
6668
|
-
/* @__PURE__ */
|
|
6697
|
+
/* @__PURE__ */ jsx86("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx86(
|
|
6669
6698
|
ConversationActions,
|
|
6670
6699
|
{
|
|
6671
6700
|
options: reactions?.options,
|
|
@@ -6674,10 +6703,10 @@ function ReplyCard(props) {
|
|
|
6674
6703
|
setPicking(open);
|
|
6675
6704
|
if (!open) settle();
|
|
6676
6705
|
},
|
|
6677
|
-
more: offersMenu && /* @__PURE__ */
|
|
6706
|
+
more: offersMenu && /* @__PURE__ */ jsx86(
|
|
6678
6707
|
ConversationMenu,
|
|
6679
6708
|
{
|
|
6680
|
-
trigger: /* @__PURE__ */
|
|
6709
|
+
trigger: /* @__PURE__ */ jsx86(ToolbarButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx86(IconDotsVertical5, { size: 16, stroke: 1.5 }) }),
|
|
6681
6710
|
open: menuOpen,
|
|
6682
6711
|
onOpenChange: (next) => {
|
|
6683
6712
|
setMenuOpen(next);
|
|
@@ -6697,7 +6726,7 @@ function ReplyCard(props) {
|
|
|
6697
6726
|
]
|
|
6698
6727
|
}
|
|
6699
6728
|
),
|
|
6700
|
-
deleting && onDelete && /* @__PURE__ */
|
|
6729
|
+
deleting && onDelete && /* @__PURE__ */ jsx86(DeleteQuestion, { noun, onDelete, refused: deleteRefused, onClose: () => setDeleting(false), children: deleteNote === void 0 ? /* @__PURE__ */ jsx86("p", { children: "It is deleted for everyone." }) : typeof deleteNote === "string" ? /* @__PURE__ */ jsx86("p", { children: deleteNote }) : deleteNote })
|
|
6701
6730
|
] });
|
|
6702
6731
|
}
|
|
6703
6732
|
|
|
@@ -6705,27 +6734,27 @@ function ReplyCard(props) {
|
|
|
6705
6734
|
import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect as useLayoutEffect8, useRef as useRef21, useState as useState28 } from "react";
|
|
6706
6735
|
|
|
6707
6736
|
// src/Panel.tsx
|
|
6708
|
-
import { jsx as
|
|
6737
|
+
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6709
6738
|
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
6710
|
-
return /* @__PURE__ */
|
|
6711
|
-
header ?? /* @__PURE__ */
|
|
6739
|
+
return /* @__PURE__ */ jsxs65("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
6740
|
+
header ?? /* @__PURE__ */ jsx87(ContainerHeader, { title, chevron, actions }),
|
|
6712
6741
|
broken ? (
|
|
6713
6742
|
// The message takes the room the body had and centres itself in it.
|
|
6714
|
-
/* @__PURE__ */
|
|
6715
|
-
) : /* @__PURE__ */
|
|
6716
|
-
!broken && footer && /* @__PURE__ */
|
|
6743
|
+
/* @__PURE__ */ jsx87("div", { className: "flex min-h-0 flex-1 flex-col px-4", children })
|
|
6744
|
+
) : /* @__PURE__ */ jsx87(ScrollArea, { className: "min-h-0 flex-1", contentClassName: bodyClassName, viewportRef: bodyRef, onScroll: onBodyScroll, children }),
|
|
6745
|
+
!broken && footer && /* @__PURE__ */ jsx87("div", { className: "shrink-0", children: footer })
|
|
6717
6746
|
] });
|
|
6718
6747
|
}
|
|
6719
6748
|
function Panel(props) {
|
|
6720
|
-
return /* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ jsx87(
|
|
6721
6750
|
ErrorBoundary,
|
|
6722
6751
|
{
|
|
6723
6752
|
label: "panel",
|
|
6724
6753
|
frame: (message) => (
|
|
6725
6754
|
// Only the name comes back with the message: the actions and the footer may be what threw.
|
|
6726
|
-
/* @__PURE__ */
|
|
6755
|
+
/* @__PURE__ */ jsx87(Frame, { title: props.title, chevron: props.chevron, className: props.className, broken: true, children: message })
|
|
6727
6756
|
),
|
|
6728
|
-
children: /* @__PURE__ */
|
|
6757
|
+
children: /* @__PURE__ */ jsx87(Frame, { ...props })
|
|
6729
6758
|
}
|
|
6730
6759
|
);
|
|
6731
6760
|
}
|
|
@@ -6829,11 +6858,11 @@ function useWatchSeen(seen, root, attribute) {
|
|
|
6829
6858
|
}
|
|
6830
6859
|
|
|
6831
6860
|
// src/ConversationLayout.tsx
|
|
6832
|
-
import { Fragment as Fragment25, jsx as
|
|
6861
|
+
import { Fragment as Fragment25, jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6833
6862
|
var threadOf = (item) => typeof item?.thread === "function" ? item.thread() : item?.thread;
|
|
6834
6863
|
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
6835
|
-
if (loading) return /* @__PURE__ */
|
|
6836
|
-
if (items.length === 0) return typeof empty === "string" ? /* @__PURE__ */
|
|
6864
|
+
if (loading) return /* @__PURE__ */ jsx88(SkeletonConversation, {});
|
|
6865
|
+
if (items.length === 0) return typeof empty === "string" ? /* @__PURE__ */ jsx88(EmptyState, { scope: "section", message: empty }) : /* @__PURE__ */ jsx88(Fragment25, { children: empty });
|
|
6837
6866
|
const stateOf = (item) => change && item.thread ? {
|
|
6838
6867
|
under,
|
|
6839
6868
|
open: open === item.id,
|
|
@@ -6842,12 +6871,12 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6842
6871
|
} : null;
|
|
6843
6872
|
const draw2 = (item) => {
|
|
6844
6873
|
if (!under) {
|
|
6845
|
-
return /* @__PURE__ */
|
|
6874
|
+
return /* @__PURE__ */ jsxs66(Fragment24, { children: [
|
|
6846
6875
|
item.before,
|
|
6847
|
-
/* @__PURE__ */
|
|
6876
|
+
/* @__PURE__ */ jsx88("div", { "data-conversation-item": item.id, className: cn("flex flex-col", SHOWN_CLASSES), children: /* @__PURE__ */ jsx88(InConversationItem.Provider, { value: stateOf(item), children: item.card }) })
|
|
6848
6877
|
] }, item.id);
|
|
6849
6878
|
}
|
|
6850
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ jsx88(UnderItem, { item, isOpen: open === item.id && !!item.thread, state: stateOf(item), caret }, item.id);
|
|
6851
6880
|
};
|
|
6852
6881
|
if (!under) {
|
|
6853
6882
|
const stretches = [];
|
|
@@ -6863,11 +6892,11 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6863
6892
|
seen.set(name, count);
|
|
6864
6893
|
stretches.push({ key: `${item.day === void 0 ? "no-day" : `day:${name}`}#${count}`, day: item.day, items: [item] });
|
|
6865
6894
|
}
|
|
6866
|
-
return /* @__PURE__ */
|
|
6895
|
+
return /* @__PURE__ */ jsxs66(Fragment25, { children: [
|
|
6867
6896
|
above,
|
|
6868
6897
|
stretches.map(
|
|
6869
|
-
(stretch) => stretch.day === void 0 ? /* @__PURE__ */
|
|
6870
|
-
/* @__PURE__ */
|
|
6898
|
+
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx88(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-2", children: [
|
|
6899
|
+
/* @__PURE__ */ jsx88(Divider, { look: "section", label: stretch.day, sticky: true }),
|
|
6871
6900
|
stretch.items.map(draw2)
|
|
6872
6901
|
] }, stretch.key)
|
|
6873
6902
|
)
|
|
@@ -6875,11 +6904,11 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6875
6904
|
}
|
|
6876
6905
|
const resolved = items.filter((item) => item.resolved);
|
|
6877
6906
|
const gone = items.filter((item) => item.gone && !item.resolved);
|
|
6878
|
-
const group = (title, list) => list.length > 0 && /* @__PURE__ */
|
|
6907
|
+
const group = (title, list) => list.length > 0 && /* @__PURE__ */ jsx88(
|
|
6879
6908
|
CollapsibleSection,
|
|
6880
6909
|
{
|
|
6881
6910
|
title,
|
|
6882
|
-
trailing: /* @__PURE__ */
|
|
6911
|
+
trailing: /* @__PURE__ */ jsx88(Chip, { type: "neutral", label: String(list.length) }),
|
|
6883
6912
|
defaultOpen: false,
|
|
6884
6913
|
openFor: list.some((item) => item.id === open) ? open : void 0,
|
|
6885
6914
|
className: "shrink-0",
|
|
@@ -6887,7 +6916,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6887
6916
|
children: list.map(draw2)
|
|
6888
6917
|
}
|
|
6889
6918
|
);
|
|
6890
|
-
return /* @__PURE__ */
|
|
6919
|
+
return /* @__PURE__ */ jsxs66(Fragment25, { children: [
|
|
6891
6920
|
above,
|
|
6892
6921
|
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
6893
6922
|
group("On deleted blocks", gone),
|
|
@@ -6897,7 +6926,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6897
6926
|
function UnderItem({ item, isOpen, state, caret }) {
|
|
6898
6927
|
const root = useRef21(null);
|
|
6899
6928
|
const line = useFaceLine(root, isOpen);
|
|
6900
|
-
return /* @__PURE__ */
|
|
6929
|
+
return /* @__PURE__ */ jsxs66(
|
|
6901
6930
|
Card,
|
|
6902
6931
|
{
|
|
6903
6932
|
ref: root,
|
|
@@ -6909,13 +6938,13 @@ function UnderItem({ item, isOpen, state, caret }) {
|
|
|
6909
6938
|
quietUntilHover: !isOpen,
|
|
6910
6939
|
className: cn("relative flex flex-col", isOpen && "pb-2", SHOWN_CLASSES),
|
|
6911
6940
|
children: [
|
|
6912
|
-
/* @__PURE__ */
|
|
6913
|
-
/* @__PURE__ */
|
|
6914
|
-
isOpen && /* @__PURE__ */
|
|
6941
|
+
/* @__PURE__ */ jsx88(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx88(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */ jsxs66(LineByLayout.Provider, { value: true, children: [
|
|
6942
|
+
/* @__PURE__ */ jsx88("div", { className: "-m-px flex flex-col", children: item.card }),
|
|
6943
|
+
isOpen && /* @__PURE__ */ jsx88(caretOnOpen.Provider, { value: caret, children: threadOf(item) })
|
|
6915
6944
|
] }) }) }),
|
|
6916
6945
|
line && // The face's line, one bar, last so it stands over a hovered card's fill; 19px in, centred under the face.
|
|
6917
6946
|
// Its top and height come from the measure: where the face and the last reply end are not known ahead.
|
|
6918
|
-
/* @__PURE__ */
|
|
6947
|
+
/* @__PURE__ */ jsx88("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: line.top, height: line.height } })
|
|
6919
6948
|
]
|
|
6920
6949
|
}
|
|
6921
6950
|
);
|
|
@@ -7038,49 +7067,49 @@ function ConversationLayout({
|
|
|
7038
7067
|
// The body at least the column's height: the comments start at its top, and the note under them (`below`) is pushed
|
|
7039
7068
|
// to its foot, so with few comments it sits on the box, as a short conversation's last line does in Peek's two
|
|
7040
7069
|
// columns (Katerina, 2 November); with many it comes after them, and scrolls with them.
|
|
7041
|
-
/* @__PURE__ */
|
|
7042
|
-
/* @__PURE__ */
|
|
7043
|
-
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */
|
|
7070
|
+
/* @__PURE__ */ jsxs66(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__ */ jsx88("div", { className: "p-3", children: box }), children: [
|
|
7071
|
+
/* @__PURE__ */ jsx88(List, { items, open, under: true, above, loading, empty, change, caret }),
|
|
7072
|
+
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */ jsx88("div", { className: "mt-auto flex flex-col gap-2", children: below })
|
|
7044
7073
|
] })
|
|
7045
7074
|
);
|
|
7046
7075
|
}
|
|
7047
7076
|
const opened = threadOf(items.find((item) => item.id === open));
|
|
7048
7077
|
const side = opened || aside;
|
|
7049
|
-
return /* @__PURE__ */
|
|
7050
|
-
/* @__PURE__ */
|
|
7078
|
+
return /* @__PURE__ */ jsxs66("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
7079
|
+
/* @__PURE__ */ jsx88(
|
|
7051
7080
|
ErrorBoundary,
|
|
7052
7081
|
{
|
|
7053
7082
|
label: "conversation",
|
|
7054
|
-
frame: (message) => /* @__PURE__ */
|
|
7055
|
-
/* @__PURE__ */
|
|
7056
|
-
/* @__PURE__ */
|
|
7083
|
+
frame: (message) => /* @__PURE__ */ jsxs66("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
7084
|
+
/* @__PURE__ */ jsx88(ContainerHeader, { title }),
|
|
7085
|
+
/* @__PURE__ */ jsx88("div", { className: "flex min-h-0 flex-1 flex-col px-4", children: message })
|
|
7057
7086
|
] }),
|
|
7058
|
-
children: /* @__PURE__ */
|
|
7087
|
+
children: /* @__PURE__ */ jsxs66("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
7059
7088
|
header,
|
|
7060
|
-
/* @__PURE__ */
|
|
7061
|
-
top != null && top !== false && top !== "" && /* @__PURE__ */
|
|
7062
|
-
/* @__PURE__ */
|
|
7063
|
-
/* @__PURE__ */
|
|
7064
|
-
/* @__PURE__ */
|
|
7089
|
+
/* @__PURE__ */ jsxs66(ScrollArea, { className: "min-h-0 flex-1", viewportRef: setBody, onScroll: scrolled, contentClassName: "flex min-h-full flex-col", children: [
|
|
7090
|
+
top != null && top !== false && top !== "" && /* @__PURE__ */ jsx88("div", { className: "shrink-0 px-4 pt-4", children: top }),
|
|
7091
|
+
/* @__PURE__ */ jsx88("div", { className: "min-h-0 flex-1" }),
|
|
7092
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex shrink-0 flex-col gap-2 p-4", children: [
|
|
7093
|
+
/* @__PURE__ */ jsx88(List, { items, open, under: false, above, loading, empty, change, caret }),
|
|
7065
7094
|
!loading && below
|
|
7066
7095
|
] })
|
|
7067
7096
|
] }),
|
|
7068
|
-
box && /* @__PURE__ */
|
|
7097
|
+
box && /* @__PURE__ */ jsx88("div", { className: "shrink-0 p-3", children: /* @__PURE__ */ jsx88(sendsInLayout.Provider, { value: sends, children: box }) })
|
|
7069
7098
|
] })
|
|
7070
7099
|
}
|
|
7071
7100
|
),
|
|
7072
7101
|
side && // Its own catch, as Peek's column had: a thread or a panel that throws says so in the column, and the comments stay.
|
|
7073
7102
|
// One catch per thread, and one for the aside: a thread that threw is let go once it is closed or another opens,
|
|
7074
7103
|
// as Peek's column, drawn only while a thread was open, let it go on closing. Each thread is drawn afresh.
|
|
7075
|
-
/* @__PURE__ */
|
|
7104
|
+
/* @__PURE__ */ jsx88("div", { className: "flex w-[384px] shrink-0 flex-col overflow-hidden border-l border-border-subtle", children: /* @__PURE__ */ jsx88(ErrorBoundary, { label: "thread panel", children: opened ? /* @__PURE__ */ jsx88(caretOnOpen.Provider, { value: caret, children: opened }) : aside }, opened ? `thread:${open}` : "aside") })
|
|
7076
7105
|
] });
|
|
7077
7106
|
}
|
|
7078
7107
|
|
|
7079
7108
|
// src/ConversationHeading.tsx
|
|
7080
|
-
import { jsx as
|
|
7109
|
+
import { jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7081
7110
|
var NAME = "-mx-1 min-w-0 truncate rounded px-1 text-left text-h4 text-text-primary";
|
|
7082
7111
|
function ConversationHeading({ icon, name, onOpen, href, className }) {
|
|
7083
|
-
const label = href ? /* @__PURE__ */
|
|
7112
|
+
const label = href ? /* @__PURE__ */ jsx89(
|
|
7084
7113
|
"a",
|
|
7085
7114
|
{
|
|
7086
7115
|
href,
|
|
@@ -7092,42 +7121,42 @@ function ConversationHeading({ icon, name, onOpen, href, className }) {
|
|
|
7092
7121
|
className: cn(NAME, "hover:bg-bg-hover"),
|
|
7093
7122
|
children: name
|
|
7094
7123
|
}
|
|
7095
|
-
) : onOpen ? /* @__PURE__ */
|
|
7096
|
-
return /* @__PURE__ */
|
|
7097
|
-
/* @__PURE__ */
|
|
7124
|
+
) : onOpen ? /* @__PURE__ */ jsx89("button", { type: "button", onClick: onOpen, className: cn(NAME, "hover:bg-bg-hover"), children: name }) : /* @__PURE__ */ jsx89("span", { className: NAME, children: name });
|
|
7125
|
+
return /* @__PURE__ */ jsxs67("div", { "data-conversation-heading": true, className: cn("flex w-full items-center gap-2", className), children: [
|
|
7126
|
+
/* @__PURE__ */ jsx89("span", { "aria-hidden": true, className: "flex size-6 shrink-0 items-center justify-center text-text-secondary", children: icon }),
|
|
7098
7127
|
label
|
|
7099
7128
|
] });
|
|
7100
7129
|
}
|
|
7101
7130
|
|
|
7102
7131
|
// src/ConversationPlace.tsx
|
|
7103
|
-
import { jsx as
|
|
7132
|
+
import { jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7104
7133
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
7105
|
-
return /* @__PURE__ */
|
|
7106
|
-
/* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7108
|
-
place && /* @__PURE__ */
|
|
7134
|
+
return /* @__PURE__ */ jsxs68("div", { className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
7135
|
+
/* @__PURE__ */ jsxs68("div", { className: "flex items-center gap-2", children: [
|
|
7136
|
+
/* @__PURE__ */ jsx90(Chip, { type: "neutral", label: relation }),
|
|
7137
|
+
place && /* @__PURE__ */ jsx90("span", { className: "truncate text-caption text-text-muted", children: place })
|
|
7109
7138
|
] }),
|
|
7110
7139
|
children
|
|
7111
7140
|
] });
|
|
7112
7141
|
}
|
|
7113
7142
|
|
|
7114
7143
|
// src/QuotedLine.tsx
|
|
7115
|
-
import { jsx as
|
|
7144
|
+
import { jsx as jsx91, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
7116
7145
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
7117
7146
|
function QuotedLine({ words, state = "here", label, href, external }) {
|
|
7118
7147
|
const shown2 = words ?? label ?? "";
|
|
7119
7148
|
const inThePage = !!words && state === "here";
|
|
7120
|
-
const mark = /* @__PURE__ */
|
|
7121
|
-
return /* @__PURE__ */
|
|
7122
|
-
/* @__PURE__ */
|
|
7123
|
-
state !== "here" && /* @__PURE__ */
|
|
7149
|
+
const mark = /* @__PURE__ */ jsx91("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 });
|
|
7150
|
+
return /* @__PURE__ */ jsxs69("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
7151
|
+
/* @__PURE__ */ jsx91(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx91("p", { className: "line-clamp-2 text-caption text-text-secondary", children: href ? /* @__PURE__ */ jsx91(Link, { href, variant: "quiet", external, children: mark }) : mark }) }),
|
|
7152
|
+
state !== "here" && /* @__PURE__ */ jsx91("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
7124
7153
|
] });
|
|
7125
7154
|
}
|
|
7126
7155
|
|
|
7127
7156
|
// src/ReactionHorizon.tsx
|
|
7128
|
-
import { Fragment as Fragment26, jsx as
|
|
7157
|
+
import { Fragment as Fragment26, jsx as jsx92, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
7129
7158
|
function Said({ limit, omitted, noun }) {
|
|
7130
|
-
return /* @__PURE__ */
|
|
7159
|
+
return /* @__PURE__ */ jsxs70(Fragment26, { children: [
|
|
7131
7160
|
"Reactions are shown for the latest ",
|
|
7132
7161
|
limit,
|
|
7133
7162
|
" ",
|
|
@@ -7140,11 +7169,11 @@ function Said({ limit, omitted, noun }) {
|
|
|
7140
7169
|
] });
|
|
7141
7170
|
}
|
|
7142
7171
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
7143
|
-
const room = keepRoom && omitted <= 0 && /* @__PURE__ */
|
|
7172
|
+
const room = keepRoom && omitted <= 0 && /* @__PURE__ */ jsx92("p", { "aria-hidden": true, className: "invisible text-caption text-text-muted", children: /* @__PURE__ */ jsx92(Said, { limit, omitted: 1, noun }) });
|
|
7144
7173
|
if (omitted <= 0 && !cut) return room || null;
|
|
7145
|
-
return /* @__PURE__ */
|
|
7146
|
-
/* @__PURE__ */
|
|
7147
|
-
omitted > 0 && /* @__PURE__ */
|
|
7174
|
+
return /* @__PURE__ */ jsxs70(Fragment26, { children: [
|
|
7175
|
+
/* @__PURE__ */ jsxs70("p", { className: "text-caption text-text-muted", children: [
|
|
7176
|
+
omitted > 0 && /* @__PURE__ */ jsx92(Said, { limit, omitted, noun }),
|
|
7148
7177
|
omitted > 0 && cut && " ",
|
|
7149
7178
|
cut && "Some reactions may be missing."
|
|
7150
7179
|
] }),
|
|
@@ -7154,18 +7183,18 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
7154
7183
|
|
|
7155
7184
|
// src/ArchiveDialog.tsx
|
|
7156
7185
|
import { useState as useState29 } from "react";
|
|
7157
|
-
import { jsx as
|
|
7186
|
+
import { jsx as jsx93, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
7158
7187
|
var listOf = (parts) => parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`;
|
|
7159
7188
|
function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, onClose, onArchive }) {
|
|
7160
7189
|
const [resolution, setResolution] = useState29("");
|
|
7161
7190
|
const where = apps.length ? `, ${listOf(apps.map((app) => `in ${app}`))}` : "";
|
|
7162
|
-
return /* @__PURE__ */
|
|
7163
|
-
/* @__PURE__ */
|
|
7164
|
-
/* @__PURE__ */
|
|
7165
|
-
staysVisible.length > 0 && /* @__PURE__ */
|
|
7166
|
-
/* @__PURE__ */
|
|
7191
|
+
return /* @__PURE__ */ jsxs71(FormDialog, { title: `Archive \u201C${title}\u201D?`, submitLabel: `Archive ${what}`, ready: hides !== null, onSubmit: () => onArchive(resolution.trim()), onClose, children: [
|
|
7192
|
+
/* @__PURE__ */ jsxs71("div", { className: "flex flex-col gap-2 text-body-2 text-text-primary", children: [
|
|
7193
|
+
/* @__PURE__ */ jsx93("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}.` }),
|
|
7194
|
+
staysVisible.length > 0 && /* @__PURE__ */ jsx93("p", { children: `${listOf(staysVisible)} stay visible there.` }),
|
|
7195
|
+
/* @__PURE__ */ jsx93("p", { className: "text-text-secondary", children: getBack })
|
|
7167
7196
|
] }),
|
|
7168
|
-
/* @__PURE__ */
|
|
7197
|
+
/* @__PURE__ */ jsx93(Field, { label: "Resolution (optional)", children: /* @__PURE__ */ jsx93(
|
|
7169
7198
|
Textarea,
|
|
7170
7199
|
{
|
|
7171
7200
|
value: resolution,
|
|
@@ -7180,19 +7209,19 @@ function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, o
|
|
|
7180
7209
|
// src/ArchivedNotice.tsx
|
|
7181
7210
|
import { useState as useState30 } from "react";
|
|
7182
7211
|
import { IconArchive } from "@tabler/icons-react";
|
|
7183
|
-
import { jsx as
|
|
7212
|
+
import { jsx as jsx94, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
7184
7213
|
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
7185
7214
|
const [unarchiving, setUnarchiving] = useState30(false);
|
|
7186
7215
|
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
7187
7216
|
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
7188
7217
|
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
7189
|
-
return /* @__PURE__ */
|
|
7190
|
-
/* @__PURE__ */
|
|
7191
|
-
/* @__PURE__ */
|
|
7192
|
-
/* @__PURE__ */
|
|
7193
|
-
resolution && /* @__PURE__ */
|
|
7218
|
+
return /* @__PURE__ */ jsxs72(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
7219
|
+
/* @__PURE__ */ jsx94(IconArchive, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
7220
|
+
/* @__PURE__ */ jsxs72("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
7221
|
+
/* @__PURE__ */ jsx94("span", { className: "text-body-2-strong text-text-primary", children: line }),
|
|
7222
|
+
resolution && /* @__PURE__ */ jsx94("p", { className: "whitespace-pre-wrap text-caption text-text-secondary", children: resolution })
|
|
7194
7223
|
] }),
|
|
7195
|
-
parent ? onOpenParent && /* @__PURE__ */
|
|
7224
|
+
parent ? onOpenParent && /* @__PURE__ */ jsx94(Button, { variant: "outlined", size: "small", className: "shrink-0", onClick: onOpenParent, children: `Open ${parent}` }) : onUnarchive && /* @__PURE__ */ jsx94(
|
|
7196
7225
|
Button,
|
|
7197
7226
|
{
|
|
7198
7227
|
variant: "outlined",
|
|
@@ -7212,13 +7241,13 @@ function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive
|
|
|
7212
7241
|
// src/DeletedNotice.tsx
|
|
7213
7242
|
import { useState as useState31 } from "react";
|
|
7214
7243
|
import { IconTrash } from "@tabler/icons-react";
|
|
7215
|
-
import { jsx as
|
|
7244
|
+
import { jsx as jsx95, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
7216
7245
|
function DeletedNotice({ by, when, onRestore }) {
|
|
7217
7246
|
const [restoring, setRestoring] = useState31(false);
|
|
7218
|
-
return /* @__PURE__ */
|
|
7219
|
-
/* @__PURE__ */
|
|
7220
|
-
/* @__PURE__ */
|
|
7221
|
-
onRestore && /* @__PURE__ */
|
|
7247
|
+
return /* @__PURE__ */ jsxs73(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
7248
|
+
/* @__PURE__ */ jsx95(IconTrash, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
7249
|
+
/* @__PURE__ */ jsx95("span", { className: "min-w-0 flex-1 text-body-2-strong text-text-primary", children: `Deleted by ${by} \xB7 ${when}` }),
|
|
7250
|
+
onRestore && /* @__PURE__ */ jsx95(
|
|
7222
7251
|
Button,
|
|
7223
7252
|
{
|
|
7224
7253
|
variant: "outlined",
|
|
@@ -7237,21 +7266,21 @@ function DeletedNotice({ by, when, onRestore }) {
|
|
|
7237
7266
|
|
|
7238
7267
|
// src/NoAccessNotice.tsx
|
|
7239
7268
|
import { IconLock } from "@tabler/icons-react";
|
|
7240
|
-
import { jsx as
|
|
7269
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
7241
7270
|
function NoAccessNotice({ what }) {
|
|
7242
|
-
return /* @__PURE__ */
|
|
7271
|
+
return /* @__PURE__ */ jsx96(EmptyState, { scope: "page", icon: /* @__PURE__ */ jsx96(IconLock, { size: 16, stroke: 1.5 }), message: `You can't open this ${what}` });
|
|
7243
7272
|
}
|
|
7244
7273
|
|
|
7245
7274
|
// src/Thread.tsx
|
|
7246
7275
|
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef22, useState as useState32 } from "react";
|
|
7247
7276
|
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
7248
|
-
import { Fragment as Fragment27, jsx as
|
|
7277
|
+
import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
7249
7278
|
var always = () => true;
|
|
7250
7279
|
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
7251
7280
|
function Replies({ children, loading, empty }) {
|
|
7252
|
-
if (loading) return /* @__PURE__ */
|
|
7253
|
-
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */
|
|
7254
|
-
return /* @__PURE__ */
|
|
7281
|
+
if (loading) return /* @__PURE__ */ jsx97(SkeletonConversation, {});
|
|
7282
|
+
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */ jsx97(EmptyState, { scope: "section", message: empty }) : /* @__PURE__ */ jsx97(Fragment27, { children: empty });
|
|
7283
|
+
return /* @__PURE__ */ jsx97(Fragment27, { children });
|
|
7255
7284
|
}
|
|
7256
7285
|
function Thread({
|
|
7257
7286
|
place = "beside",
|
|
@@ -7296,36 +7325,36 @@ function Thread({
|
|
|
7296
7325
|
const foot = notice ?? box;
|
|
7297
7326
|
const layoutLine = useContext15(LineByLayout);
|
|
7298
7327
|
if (place === "under") {
|
|
7299
|
-
return /* @__PURE__ */
|
|
7328
|
+
return /* @__PURE__ */ jsxs74("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
7300
7329
|
(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).
|
|
7301
7330
|
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
7302
7331
|
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
7303
7332
|
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
7304
7333
|
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
7305
|
-
/* @__PURE__ */
|
|
7306
|
-
!layoutLine && /* @__PURE__ */
|
|
7307
|
-
/* @__PURE__ */
|
|
7334
|
+
/* @__PURE__ */ jsxs74("div", { "data-thread-replies": true, className: "relative ml-[19px] mr-2 flex flex-col gap-1 pl-2.5", children: [
|
|
7335
|
+
!layoutLine && /* @__PURE__ */ jsx97("span", { "aria-hidden": true, className: "absolute bottom-0 left-0 top-0 w-0.5 bg-border-default" }),
|
|
7336
|
+
/* @__PURE__ */ jsx97(caretOnOpen.Provider, { value: 0, children: loading ? /* @__PURE__ */ jsx97(SkeletonConversation, {}) : children })
|
|
7308
7337
|
] }),
|
|
7309
|
-
foot && /* @__PURE__ */
|
|
7338
|
+
foot && /* @__PURE__ */ jsx97("div", { className: "px-2 pt-2", children: foot })
|
|
7310
7339
|
] });
|
|
7311
7340
|
}
|
|
7312
|
-
return /* @__PURE__ */
|
|
7341
|
+
return /* @__PURE__ */ jsxs74(
|
|
7313
7342
|
Panel,
|
|
7314
7343
|
{
|
|
7315
7344
|
className,
|
|
7316
7345
|
bodyRef: setBody,
|
|
7317
7346
|
bodyClassName: "flex flex-col",
|
|
7318
7347
|
title,
|
|
7319
|
-
actions: /* @__PURE__ */
|
|
7320
|
-
resolved && /* @__PURE__ */
|
|
7348
|
+
actions: /* @__PURE__ */ jsxs74(Fragment27, { children: [
|
|
7349
|
+
resolved && /* @__PURE__ */ jsx97(Chip, { type: "success", label: "Resolved" }),
|
|
7321
7350
|
actions,
|
|
7322
|
-
onClose && /* @__PURE__ */
|
|
7351
|
+
onClose && /* @__PURE__ */ jsx97(IconButton, { tooltip: "Close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx97(IconX6, { size: 16, stroke: 1.5 }) })
|
|
7323
7352
|
] }),
|
|
7324
|
-
footer: foot && /* @__PURE__ */
|
|
7353
|
+
footer: foot && /* @__PURE__ */ jsx97("div", { className: "p-3", children: foot }),
|
|
7325
7354
|
children: [
|
|
7326
|
-
start && /* @__PURE__ */
|
|
7327
|
-
/* @__PURE__ */
|
|
7328
|
-
/* @__PURE__ */
|
|
7355
|
+
start && /* @__PURE__ */ jsx97("div", { className: cn("px-4 pb-2 pt-4", SHOWN_CLASSES), "data-thread-start": start.id, children: /* @__PURE__ */ jsx97(PinnedComment, { author: start.author, time: start.time, at: start.at, words: start.words, deleted: start.deleted, unseen: start.unseen }) }),
|
|
7356
|
+
/* @__PURE__ */ jsx97(Divider, { look: "section", label: "Replies", className: "px-4 py-2" }),
|
|
7357
|
+
/* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-2 px-4 pb-4", children: /* @__PURE__ */ jsx97(caretOnOpen.Provider, { value: 0, children: /* @__PURE__ */ jsx97(repliesDrawn.Provider, { value: drawn, children: /* @__PURE__ */ jsx97(Replies, { loading, empty, children }) }) }) })
|
|
7329
7358
|
]
|
|
7330
7359
|
}
|
|
7331
7360
|
);
|
|
@@ -7378,9 +7407,9 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
|
|
|
7378
7407
|
// src/SearchInput.tsx
|
|
7379
7408
|
import "react";
|
|
7380
7409
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
7381
|
-
import { jsx as
|
|
7410
|
+
import { jsx as jsx98, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
7382
7411
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
7383
|
-
return /* @__PURE__ */
|
|
7412
|
+
return /* @__PURE__ */ jsxs75(
|
|
7384
7413
|
"div",
|
|
7385
7414
|
{
|
|
7386
7415
|
className: cn(
|
|
@@ -7392,7 +7421,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7392
7421
|
className
|
|
7393
7422
|
),
|
|
7394
7423
|
children: [
|
|
7395
|
-
/* @__PURE__ */
|
|
7424
|
+
/* @__PURE__ */ jsx98(
|
|
7396
7425
|
Input3,
|
|
7397
7426
|
{
|
|
7398
7427
|
className: cn("flex-1 min-w-0 text-input-value", BARE_INPUT_CLASSES),
|
|
@@ -7400,7 +7429,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7400
7429
|
...props
|
|
7401
7430
|
}
|
|
7402
7431
|
),
|
|
7403
|
-
shortcut && /* @__PURE__ */
|
|
7432
|
+
shortcut && /* @__PURE__ */ jsx98(Kbd, { children: shortcut })
|
|
7404
7433
|
]
|
|
7405
7434
|
}
|
|
7406
7435
|
);
|
|
@@ -7409,37 +7438,39 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7409
7438
|
// src/PageHeader.tsx
|
|
7410
7439
|
import { Fragment as Fragment28 } from "react";
|
|
7411
7440
|
import { IconLock as IconLock2 } from "@tabler/icons-react";
|
|
7412
|
-
import { Fragment as Fragment29, jsx as
|
|
7413
|
-
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, actions, className }) {
|
|
7441
|
+
import { Fragment as Fragment29, jsx as jsx99, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
7442
|
+
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, button, actions, className }) {
|
|
7414
7443
|
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
7415
7444
|
const quiet = words.length > 0 || time != null || members != null;
|
|
7416
|
-
const name = /* @__PURE__ */
|
|
7417
|
-
leading != null && /* @__PURE__ */
|
|
7418
|
-
locked && /* @__PURE__ */
|
|
7419
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
7420
|
-
after != null && /* @__PURE__ */
|
|
7445
|
+
const name = /* @__PURE__ */ jsxs76("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
7446
|
+
leading != null && /* @__PURE__ */ jsx99("span", { className: "flex shrink-0 items-center text-text-secondary", children: leading }),
|
|
7447
|
+
locked && /* @__PURE__ */ jsx99(WithTooltip, { label: "Private", children: /* @__PURE__ */ jsx99(IconLock2, { size: 16, stroke: 1.5, role: "img", "aria-label": "Private", className: "shrink-0 text-text-secondary" }) }),
|
|
7448
|
+
typeof title === "string" ? /* @__PURE__ */ jsx99("span", { className: "truncate text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx99("div", { className: "flex min-w-0 items-center", children: title }),
|
|
7449
|
+
after != null && /* @__PURE__ */ jsx99("span", { className: "flex shrink-0 items-center gap-2", children: after })
|
|
7421
7450
|
] });
|
|
7422
|
-
const
|
|
7451
|
+
const buttons = actions != null || button != null;
|
|
7452
|
+
const right = quiet || buttons ? /* @__PURE__ */ jsxs76(Fragment29, { children: [
|
|
7423
7453
|
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
7424
7454
|
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
7425
|
-
/* @__PURE__ */
|
|
7426
|
-
words.length > 0 && /* @__PURE__ */
|
|
7455
|
+
/* @__PURE__ */ jsxs76("div", { className: cn("flex items-center gap-3", buttons && "pr-2"), children: [
|
|
7456
|
+
words.length > 0 && /* @__PURE__ */ jsx99("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */ jsxs76(Fragment28, { children: [
|
|
7427
7457
|
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
|
|
7428
|
-
/* @__PURE__ */
|
|
7429
|
-
/* @__PURE__ */
|
|
7458
|
+
/* @__PURE__ */ jsx99("span", { "aria-hidden": "true", className: "size-[3px] shrink-0 rounded-full bg-text-muted" }),
|
|
7459
|
+
/* @__PURE__ */ jsx99(MetaText, { tone: one.done ? "success" : "secondary", children: one.label })
|
|
7430
7460
|
] }, `${one.label}-${i}`)) }),
|
|
7431
|
-
time && /* @__PURE__ */
|
|
7461
|
+
time && /* @__PURE__ */ jsx99(WithTooltip, { label: time.exact, children: /* @__PURE__ */ jsx99("span", { className: "whitespace-nowrap text-caption italic text-text-muted", children: time.label }) }),
|
|
7432
7462
|
members
|
|
7433
7463
|
] }),
|
|
7464
|
+
button != null && /* @__PURE__ */ jsx99("span", { className: cn("flex shrink-0 items-center gap-2", actions != null && "pr-1"), children: button }),
|
|
7434
7465
|
actions
|
|
7435
7466
|
] }) : void 0;
|
|
7436
|
-
return /* @__PURE__ */
|
|
7467
|
+
return /* @__PURE__ */ jsx99(ContainerHeader, { title: name, actions: right, className });
|
|
7437
7468
|
}
|
|
7438
7469
|
|
|
7439
7470
|
// src/ListColumn.tsx
|
|
7440
|
-
import { jsx as
|
|
7471
|
+
import { jsx as jsx100, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
7441
7472
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
7442
|
-
return /* @__PURE__ */
|
|
7473
|
+
return /* @__PURE__ */ jsxs77(
|
|
7443
7474
|
"div",
|
|
7444
7475
|
{
|
|
7445
7476
|
className: cn(
|
|
@@ -7452,35 +7483,105 @@ function Column({ title, chevron = false, titleMenu, actions, above, collapsed =
|
|
|
7452
7483
|
"data-collapsed": collapsed || void 0,
|
|
7453
7484
|
inert: collapsed,
|
|
7454
7485
|
children: [
|
|
7455
|
-
/* @__PURE__ */
|
|
7486
|
+
/* @__PURE__ */ jsx100(ContainerHeader, { title, chevron, titleMenu, actions }),
|
|
7456
7487
|
above,
|
|
7457
7488
|
broken ? (
|
|
7458
7489
|
// The message takes the room the list had and centres itself in it (Katerina, 19 September).
|
|
7459
|
-
/* @__PURE__ */
|
|
7460
|
-
) : /* @__PURE__ */
|
|
7490
|
+
/* @__PURE__ */ jsx100("div", { className: "flex min-h-0 flex-1 flex-col px-3", children })
|
|
7491
|
+
) : /* @__PURE__ */ jsx100(ScrollArea, { className: "flex-1", contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children })
|
|
7461
7492
|
]
|
|
7462
7493
|
}
|
|
7463
7494
|
);
|
|
7464
7495
|
}
|
|
7465
7496
|
function ListColumn(props) {
|
|
7466
|
-
return /* @__PURE__ */
|
|
7497
|
+
return /* @__PURE__ */ jsx100(
|
|
7467
7498
|
ErrorBoundary,
|
|
7468
7499
|
{
|
|
7469
7500
|
label: "list panel",
|
|
7470
7501
|
frame: (message) => (
|
|
7471
7502
|
// Only the name comes back with the message: the actions and the row above may be what threw.
|
|
7472
|
-
/* @__PURE__ */
|
|
7503
|
+
/* @__PURE__ */ jsx100(Column, { title: props.title, chevron: props.chevron, collapsed: props.collapsed, className: props.className, broken: true, children: message })
|
|
7473
7504
|
),
|
|
7474
|
-
children: /* @__PURE__ */
|
|
7505
|
+
children: /* @__PURE__ */ jsx100(Column, { ...props })
|
|
7475
7506
|
}
|
|
7476
7507
|
);
|
|
7477
7508
|
}
|
|
7478
7509
|
|
|
7510
|
+
// src/ListTable.tsx
|
|
7511
|
+
import { createContext as createContext13, useCallback as useCallback8, useContext as useContext16, useLayoutEffect as useLayoutEffect10, useRef as useRef23, useState as useState33 } from "react";
|
|
7512
|
+
import { jsx as jsx101, jsxs as jsxs78 } from "react/jsx-runtime";
|
|
7513
|
+
var WIDTH_PX = { small: 80, medium: 96, large: 112 };
|
|
7514
|
+
var WIDTH_CLASSES = { small: "w-20", medium: "w-24", large: "w-28" };
|
|
7515
|
+
var NAME_LEAST_PX = 200;
|
|
7516
|
+
var DEFAULT_WIDTH = "medium";
|
|
7517
|
+
var sizeOf = (column) => column.width ?? DEFAULT_WIDTH;
|
|
7518
|
+
var ROW_FRAME_PX = 24 + 16 + 12;
|
|
7519
|
+
var GAP_PX = 12;
|
|
7520
|
+
var END_PX = 64;
|
|
7521
|
+
var ListTableContext = createContext13(null);
|
|
7522
|
+
var showsColumn = (column, shown2) => shown2 === "all" || shown2 === "high" && (column.keep ?? "high") === "high";
|
|
7523
|
+
var widthOf = (columns, end) => ROW_FRAME_PX + NAME_LEAST_PX + columns.reduce((sum, column) => sum + GAP_PX + WIDTH_PX[sizeOf(column)], 0) + (end ? GAP_PX + END_PX : 0);
|
|
7524
|
+
function ListTable({ "aria-label": label, nameLabel = "Name", columns, end = false, headings = true, children, className }) {
|
|
7525
|
+
const box = useRef23(null);
|
|
7526
|
+
const [shown2, setShown] = useState33("all");
|
|
7527
|
+
const measure = useCallback8(() => {
|
|
7528
|
+
const width = box.current?.getBoundingClientRect().width ?? 0;
|
|
7529
|
+
if (width === 0) return;
|
|
7530
|
+
const high = columns.filter((column) => (column.keep ?? "high") === "high");
|
|
7531
|
+
setShown(width >= widthOf(columns, end) ? "all" : width >= widthOf(high, end) ? "high" : "none");
|
|
7532
|
+
}, [columns, end]);
|
|
7533
|
+
useLayoutEffect10(() => {
|
|
7534
|
+
measure();
|
|
7535
|
+
const list = box.current;
|
|
7536
|
+
if (!list || typeof ResizeObserver === "undefined") return;
|
|
7537
|
+
const observer = new ResizeObserver(measure);
|
|
7538
|
+
observer.observe(list);
|
|
7539
|
+
return () => observer.disconnect();
|
|
7540
|
+
}, [measure]);
|
|
7541
|
+
return /* @__PURE__ */ jsx101(ListTableContext.Provider, { value: { columns, shown: shown2, end }, children: /* @__PURE__ */ jsxs78("div", { ref: box, role: "table", "aria-label": label, className: cn("flex w-full flex-col gap-2", className), children: [
|
|
7542
|
+
columns.length > 0 && // Hidden, it is out of the flow too: the rows start where the list does, with no gap for it.
|
|
7543
|
+
/* @__PURE__ */ jsxs78("div", { role: "row", className: cn("flex items-center gap-3 px-3 text-caption text-text-muted", !headings && "sr-only"), children: [
|
|
7544
|
+
/* @__PURE__ */ jsx101("span", { role: "columnheader", className: "min-w-0 max-w-sm flex-1 pl-7", children: nameLabel }),
|
|
7545
|
+
columns.map(
|
|
7546
|
+
(column) => showsColumn(column, shown2) ? /* @__PURE__ */ jsx101("span", { role: "columnheader", className: cn("shrink-0 truncate", WIDTH_CLASSES[sizeOf(column)]), children: column.label }, column.label) : null
|
|
7547
|
+
),
|
|
7548
|
+
end && /* @__PURE__ */ jsx101("span", { role: "columnheader", "aria-label": "Actions", className: "ml-auto w-16 shrink-0" })
|
|
7549
|
+
] }),
|
|
7550
|
+
/* @__PURE__ */ jsx101("div", { role: "rowgroup", className: "flex flex-col gap-0.5", children })
|
|
7551
|
+
] }) });
|
|
7552
|
+
}
|
|
7553
|
+
function ListTableRow({ href, label, description, icon, cells, end, onClick, ...rest }) {
|
|
7554
|
+
const table = useContext16(ListTableContext);
|
|
7555
|
+
if (!table) throw new Error("ListTableRow is a row of a ListTable: put it inside one.");
|
|
7556
|
+
return (
|
|
7557
|
+
// A row's look in every list: 8px corners, the fill under the pointer and no edge.
|
|
7558
|
+
/* @__PURE__ */ jsxs78("div", { role: "row", className: "relative flex min-w-0 items-center gap-3 rounded-lg px-3 py-2 hover:bg-bg-hover", ...rest, children: [
|
|
7559
|
+
/* @__PURE__ */ jsxs78("span", { role: "cell", className: "flex min-w-0 max-w-sm flex-1 items-center gap-3", children: [
|
|
7560
|
+
icon != null && /* @__PURE__ */ jsx101("span", { className: "flex shrink-0 items-center text-text-secondary", children: icon }),
|
|
7561
|
+
/* @__PURE__ */ jsxs78(Link, { href, variant: "plain", cover: true, className: "flex min-w-0 flex-1 flex-col gap-0.5", ...onClick ? { onClick } : {}, children: [
|
|
7562
|
+
/* @__PURE__ */ jsx101("span", { className: "truncate text-body-2 font-medium text-text-primary", children: label }),
|
|
7563
|
+
description && /* @__PURE__ */ jsx101("span", { className: "truncate text-caption text-text-secondary", children: description })
|
|
7564
|
+
] })
|
|
7565
|
+
] }),
|
|
7566
|
+
table.columns.map(
|
|
7567
|
+
(column, i) => showsColumn(column, table.shown) ? (
|
|
7568
|
+
// A cell's parts sit 6px apart: faces and their number.
|
|
7569
|
+
/* @__PURE__ */ jsx101("span", { role: "cell", className: cn("flex shrink-0 items-center gap-1.5 truncate text-caption text-text-secondary", WIDTH_CLASSES[sizeOf(column)]), children: cells[i] ?? "\u2013" }, column.label)
|
|
7570
|
+
) : null
|
|
7571
|
+
),
|
|
7572
|
+
table.end && // After the covering link and `relative`, so what is here stays its own control.
|
|
7573
|
+
// The room the name leaves goes before it: the end keeps the list's right edge. A button's height (24px) in every
|
|
7574
|
+
// row, so a row with nothing at its end is as tall as one with its ⋮ (40px; it was 36, Katerina, 16 November).
|
|
7575
|
+
/* @__PURE__ */ jsx101("span", { role: "cell", className: "relative ml-auto flex h-6 w-16 shrink-0 items-center justify-end gap-1", children: end })
|
|
7576
|
+
] })
|
|
7577
|
+
);
|
|
7578
|
+
}
|
|
7579
|
+
|
|
7479
7580
|
// src/Tabs.tsx
|
|
7480
7581
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
7481
|
-
import { Fragment as Fragment30, jsx as
|
|
7582
|
+
import { Fragment as Fragment30, jsx as jsx102, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
7482
7583
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
7483
|
-
return /* @__PURE__ */
|
|
7584
|
+
return /* @__PURE__ */ jsx102(
|
|
7484
7585
|
BaseTabs.Root,
|
|
7485
7586
|
{
|
|
7486
7587
|
value: active,
|
|
@@ -7488,14 +7589,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7488
7589
|
if (details.reason === "none") onChange(value);
|
|
7489
7590
|
},
|
|
7490
7591
|
className,
|
|
7491
|
-
children: /* @__PURE__ */
|
|
7592
|
+
children: /* @__PURE__ */ jsx102(
|
|
7492
7593
|
BaseTabs.List,
|
|
7493
7594
|
{
|
|
7494
7595
|
activateOnFocus: true,
|
|
7495
7596
|
"aria-label": aria["aria-label"],
|
|
7496
7597
|
"aria-labelledby": aria["aria-labelledby"],
|
|
7497
7598
|
className: "flex items-center gap-2",
|
|
7498
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
7599
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs79(
|
|
7499
7600
|
BaseTabs.Tab,
|
|
7500
7601
|
{
|
|
7501
7602
|
value: tab.id,
|
|
@@ -7508,13 +7609,13 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7508
7609
|
),
|
|
7509
7610
|
children: [
|
|
7510
7611
|
tab.icon,
|
|
7511
|
-
/* @__PURE__ */
|
|
7612
|
+
/* @__PURE__ */ jsxs79("span", { className: "flex items-baseline", children: [
|
|
7512
7613
|
tab.label,
|
|
7513
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
7614
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx102("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
7514
7615
|
] }),
|
|
7515
|
-
tab.unread ? /* @__PURE__ */
|
|
7516
|
-
/* @__PURE__ */
|
|
7517
|
-
/* @__PURE__ */
|
|
7616
|
+
tab.unread ? /* @__PURE__ */ jsxs79(Fragment30, { children: [
|
|
7617
|
+
/* @__PURE__ */ jsx102(UnreadDot, { className: "h-auto w-auto" }),
|
|
7618
|
+
/* @__PURE__ */ jsx102("span", { className: "sr-only", children: "new" })
|
|
7518
7619
|
] }) : null
|
|
7519
7620
|
]
|
|
7520
7621
|
},
|
|
@@ -7527,10 +7628,10 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7527
7628
|
}
|
|
7528
7629
|
|
|
7529
7630
|
// src/Toast.tsx
|
|
7530
|
-
import { createContext as
|
|
7631
|
+
import { createContext as createContext14, useContext as useContext17, useMemo as useMemo7 } from "react";
|
|
7531
7632
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7532
7633
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
7533
|
-
import { jsx as
|
|
7634
|
+
import { jsx as jsx103, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
7534
7635
|
var SURFACE_STYLES = {
|
|
7535
7636
|
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",
|
|
7536
7637
|
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",
|
|
@@ -7566,19 +7667,19 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
7566
7667
|
);
|
|
7567
7668
|
function LeadingIcon({ type }) {
|
|
7568
7669
|
const Icon = ICONS2[type];
|
|
7569
|
-
return /* @__PURE__ */
|
|
7670
|
+
return /* @__PURE__ */ jsx103(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
7570
7671
|
}
|
|
7571
7672
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
7572
7673
|
const hasAction = !!(actionLabel && onAction);
|
|
7573
|
-
return /* @__PURE__ */
|
|
7574
|
-
/* @__PURE__ */
|
|
7575
|
-
leadingIcon && /* @__PURE__ */
|
|
7576
|
-
/* @__PURE__ */
|
|
7674
|
+
return /* @__PURE__ */ jsxs80("div", { className: pillClassName(type, hasAction, className), children: [
|
|
7675
|
+
/* @__PURE__ */ jsxs80("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7676
|
+
leadingIcon && /* @__PURE__ */ jsx103(LeadingIcon, { type }),
|
|
7677
|
+
/* @__PURE__ */ jsx103("span", { className: LABEL_CLASSES, children: label })
|
|
7577
7678
|
] }),
|
|
7578
|
-
hasAction && /* @__PURE__ */
|
|
7679
|
+
hasAction && /* @__PURE__ */ jsx103(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
7579
7680
|
] });
|
|
7580
7681
|
}
|
|
7581
|
-
var ToastContext =
|
|
7682
|
+
var ToastContext = createContext14(null);
|
|
7582
7683
|
var VISIBLE_TOASTS = 3;
|
|
7583
7684
|
function ToastProvider({ children }) {
|
|
7584
7685
|
const manager = useMemo7(() => BaseToast.createToastManager(), []);
|
|
@@ -7597,9 +7698,9 @@ function ToastProvider({ children }) {
|
|
|
7597
7698
|
}),
|
|
7598
7699
|
[manager]
|
|
7599
7700
|
);
|
|
7600
|
-
return /* @__PURE__ */
|
|
7701
|
+
return /* @__PURE__ */ jsx103(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs80(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
7601
7702
|
children,
|
|
7602
|
-
/* @__PURE__ */
|
|
7703
|
+
/* @__PURE__ */ jsx103(BaseToast.Portal, { children: /* @__PURE__ */ jsx103(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx103(ToastList, {}) }) })
|
|
7603
7704
|
] }) });
|
|
7604
7705
|
}
|
|
7605
7706
|
function ToastList() {
|
|
@@ -7607,25 +7708,25 @@ function ToastList() {
|
|
|
7607
7708
|
return toasts.map((toast) => {
|
|
7608
7709
|
const type = toast.type ?? "neutral";
|
|
7609
7710
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
7610
|
-
return /* @__PURE__ */
|
|
7711
|
+
return /* @__PURE__ */ jsxs80(
|
|
7611
7712
|
BaseToast.Root,
|
|
7612
7713
|
{
|
|
7613
7714
|
toast,
|
|
7614
7715
|
swipeDirection: ["left", "down"],
|
|
7615
7716
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
7616
7717
|
children: [
|
|
7617
|
-
/* @__PURE__ */
|
|
7618
|
-
leadingIcon && /* @__PURE__ */
|
|
7619
|
-
/* @__PURE__ */
|
|
7718
|
+
/* @__PURE__ */ jsxs80("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7719
|
+
leadingIcon && /* @__PURE__ */ jsx103(LeadingIcon, { type }),
|
|
7720
|
+
/* @__PURE__ */ jsx103(BaseToast.Title, { render: /* @__PURE__ */ jsx103("span", {}), className: LABEL_CLASSES })
|
|
7620
7721
|
] }),
|
|
7621
|
-
actionLabel && /* @__PURE__ */
|
|
7722
|
+
actionLabel && /* @__PURE__ */ jsx103(
|
|
7622
7723
|
BaseToast.Action,
|
|
7623
7724
|
{
|
|
7624
7725
|
onClick: () => {
|
|
7625
7726
|
onAction?.();
|
|
7626
7727
|
close(toast.id);
|
|
7627
7728
|
},
|
|
7628
|
-
render: /* @__PURE__ */
|
|
7729
|
+
render: /* @__PURE__ */ jsx103(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
7629
7730
|
}
|
|
7630
7731
|
)
|
|
7631
7732
|
]
|
|
@@ -7635,11 +7736,12 @@ function ToastList() {
|
|
|
7635
7736
|
});
|
|
7636
7737
|
}
|
|
7637
7738
|
function useToast() {
|
|
7638
|
-
const ctx =
|
|
7739
|
+
const ctx = useContext17(ToastContext);
|
|
7639
7740
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
7640
7741
|
return ctx;
|
|
7641
7742
|
}
|
|
7642
7743
|
export {
|
|
7744
|
+
ActivityLine,
|
|
7643
7745
|
AddReactionButton,
|
|
7644
7746
|
AppProvider,
|
|
7645
7747
|
AppShell,
|
|
@@ -7714,6 +7816,8 @@ export {
|
|
|
7714
7816
|
LinkUnavailable,
|
|
7715
7817
|
LinkedIcon,
|
|
7716
7818
|
ListColumn,
|
|
7819
|
+
ListTable,
|
|
7820
|
+
ListTableRow,
|
|
7717
7821
|
MembersDialog,
|
|
7718
7822
|
MembersPill,
|
|
7719
7823
|
Menu,
|