@estiva-app/ui 0.116.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 +1 -0
- package/dist/MembersDialog.d.ts.map +1 -1
- package/dist/Menu.d.ts +9 -2
- package/dist/Menu.d.ts.map +1 -1
- package/dist/NavItem.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/SectionHeader.d.ts.map +1 -1
- package/dist/WhoFollowsDialog.d.ts +12 -2
- package/dist/WhoFollowsDialog.d.ts.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +816 -671
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +272 -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/FollowSwitch.test.tsx +6 -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 +3 -11
- package/src/Menu.mdx +3 -0
- package/src/Menu.stories.tsx +23 -0
- package/src/Menu.tsx +13 -3
- package/src/NavItem.mdx +2 -0
- package/src/NavItem.tsx +5 -1
- 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/SectionHeader.mdx +2 -0
- package/src/SectionHeader.test.tsx +16 -0
- package/src/SectionHeader.tsx +4 -2
- package/src/WhoFollowsDialog.mdx +2 -0
- package/src/WhoFollowsDialog.stories.tsx +19 -0
- package/src/WhoFollowsDialog.test.tsx +40 -0
- package/src/WhoFollowsDialog.tsx +66 -10
- 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
|
|
@@ -1566,11 +1566,12 @@ function menuItemClassName({ size, selected, shut = false, className }) {
|
|
|
1566
1566
|
className
|
|
1567
1567
|
);
|
|
1568
1568
|
}
|
|
1569
|
-
function MenuItemBody({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, shut = false }) {
|
|
1569
|
+
function MenuItemBody({ label, children, size = "default", description, aside, leading, leadingAt, trailing, hint, shortcut, submenu, destructive, selected, shut = false }) {
|
|
1570
1570
|
const labelColour = shut ? "text-text-disabled" : destructive ? "text-error-default" : "text-text-primary";
|
|
1571
|
+
const firstLine = (leadingAt ?? (size === "default" && description ? "top" : "center")) === "top";
|
|
1571
1572
|
const edge = trailing ?? (shortcut ? /* @__PURE__ */ jsx22(Kbd, { children: shortcut }) : submenu ? /* @__PURE__ */ jsx22(IconChevronRight, { size: 16, stroke: 1.5, className: "shrink-0 text-text-muted" }) : null);
|
|
1572
1573
|
return /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
1573
|
-
leading && /* @__PURE__ */ jsx22("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
1574
|
+
leading && /* @__PURE__ */ jsx22("span", { className: cn("flex shrink-0 items-center", firstLine && "h-5 self-start"), children: leading }),
|
|
1574
1575
|
children ?? /* @__PURE__ */ jsxs15("span", { className: cn("flex min-w-0 flex-1 flex-col", size === "tall" && "gap-[2px]"), children: [
|
|
1575
1576
|
aside ? /* @__PURE__ */ jsxs15("span", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
1576
1577
|
/* @__PURE__ */ jsx22("span", { className: cn("truncate text-body-2", labelColour), children: label }),
|
|
@@ -1588,7 +1589,7 @@ function MenuItemBody({ label, children, size = "default", description, aside, l
|
|
|
1588
1589
|
] })
|
|
1589
1590
|
] });
|
|
1590
1591
|
}
|
|
1591
|
-
function MenuItem({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, disabledReason, className, ...props }) {
|
|
1592
|
+
function MenuItem({ label, children, size = "default", description, aside, leading, leadingAt, trailing, hint, shortcut, submenu, destructive, selected, disabledReason, className, ...props }) {
|
|
1592
1593
|
const shut = !!disabledReason;
|
|
1593
1594
|
const body = /* @__PURE__ */ jsx22(
|
|
1594
1595
|
MenuItemBody,
|
|
@@ -1598,6 +1599,7 @@ function MenuItem({ label, children, size = "default", description, aside, leadi
|
|
|
1598
1599
|
description,
|
|
1599
1600
|
aside,
|
|
1600
1601
|
leading,
|
|
1602
|
+
...leadingAt ? { leadingAt } : {},
|
|
1601
1603
|
trailing,
|
|
1602
1604
|
hint,
|
|
1603
1605
|
shortcut,
|
|
@@ -1658,12 +1660,19 @@ function MenuRow({ children, className }) {
|
|
|
1658
1660
|
|
|
1659
1661
|
// src/ContainerHeader.tsx
|
|
1660
1662
|
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1661
|
-
function ContainerHeader({ title, chevron = false, titleMenu, actions, className }) {
|
|
1663
|
+
function ContainerHeader({ title, chevron = false, titleMenu, actions, back, className }) {
|
|
1662
1664
|
const text = typeof title === "string";
|
|
1663
1665
|
const name = /* @__PURE__ */ jsxs16("div", { className: cn("flex items-center gap-1", text ? "shrink-0" : "min-w-0 flex-1"), children: [
|
|
1664
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 }),
|
|
1665
1667
|
(chevron || titleMenu != null) && /* @__PURE__ */ jsx23(IconChevronDown, { size: 12, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
1666
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 });
|
|
1667
1676
|
return (
|
|
1668
1677
|
// The title 16px in, where the column's content starts (Katerina, 7 October; it was 20px).
|
|
1669
1678
|
// With a title menu the bar gives the button 6px of its left padding
|
|
@@ -1672,14 +1681,14 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1672
1681
|
// (Katerina, 5 October).
|
|
1673
1682
|
// 12px between the title and the buttons, as between the right group's own parts: a cut title, and a button
|
|
1674
1683
|
// after it, ran right up to them (Leaf's adoption review, 4 November). A bar whose title fits does not move.
|
|
1675
|
-
/* @__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: [
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
{
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
}
|
|
1682
|
-
) :
|
|
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,
|
|
1683
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 }) })
|
|
1684
1693
|
] })
|
|
1685
1694
|
);
|
|
@@ -1687,7 +1696,7 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1687
1696
|
|
|
1688
1697
|
// src/DialogShell.tsx
|
|
1689
1698
|
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1690
|
-
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 }) {
|
|
1691
1700
|
const Parts = alert ? AlertDialog : Dialog2;
|
|
1692
1701
|
const popupRef = useRef4(null);
|
|
1693
1702
|
return /* @__PURE__ */ jsx24(
|
|
@@ -1711,7 +1720,7 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1711
1720
|
/* @__PURE__ */ jsx24(
|
|
1712
1721
|
ContainerHeader,
|
|
1713
1722
|
{
|
|
1714
|
-
className: "pl-5",
|
|
1723
|
+
...back ? { back } : { className: "pl-5" },
|
|
1715
1724
|
title: headerContent ?? /* @__PURE__ */ jsx24(Parts.Title, { className: "block truncate text-h4 text-text-primary", render: /* @__PURE__ */ jsx24("span", {}), children: title }),
|
|
1716
1725
|
actions: (
|
|
1717
1726
|
/*
|
|
@@ -2185,10 +2194,11 @@ function FollowSwitch({ level, label, onChoose, readOnlyReason, people = false,
|
|
|
2185
2194
|
|
|
2186
2195
|
// src/WhoFollowsDialog.tsx
|
|
2187
2196
|
import { useState as useState9 } from "react";
|
|
2197
|
+
import { IconUserMinus as IconUserMinus2, IconUserPlus as IconUserPlus2 } from "@tabler/icons-react";
|
|
2188
2198
|
|
|
2189
2199
|
// src/MembersDialog.tsx
|
|
2190
2200
|
import { useId as useId3, useState as useState8 } from "react";
|
|
2191
|
-
import {
|
|
2201
|
+
import { IconUserMinus, IconUserPlus } from "@tabler/icons-react";
|
|
2192
2202
|
|
|
2193
2203
|
// src/Chip.tsx
|
|
2194
2204
|
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -2417,10 +2427,7 @@ function AddPeopleLayer({
|
|
|
2417
2427
|
{
|
|
2418
2428
|
title,
|
|
2419
2429
|
onClose,
|
|
2420
|
-
|
|
2421
|
-
/* @__PURE__ */ jsx32(IconButton, { tooltip: backLabel, "aria-label": backLabel, className: "-ml-2", onClick: onBack, children: /* @__PURE__ */ jsx32(IconArrowLeft, { size: 16, stroke: 1.5 }) }),
|
|
2422
|
-
/* @__PURE__ */ jsx32("span", { className: "truncate text-h4 text-text-primary", children: title })
|
|
2423
|
-
] }),
|
|
2430
|
+
back: { label: backLabel, onClick: onBack },
|
|
2424
2431
|
bodyClassName: "flex flex-col gap-6",
|
|
2425
2432
|
footer: /* @__PURE__ */ jsxs24(Fragment7, { children: [
|
|
2426
2433
|
/* @__PURE__ */ jsx32(Button, { variant: "muted", onClick: onClose, children: "Cancel" }),
|
|
@@ -2511,13 +2518,132 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2511
2518
|
);
|
|
2512
2519
|
}
|
|
2513
2520
|
|
|
2521
|
+
// src/SectionHeader.tsx
|
|
2522
|
+
import { IconChevronRight as IconChevronRight2, IconDotsVertical } from "@tabler/icons-react";
|
|
2523
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
2524
|
+
import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2525
|
+
function SectionHeader({ title, chevron = false, icon, isExpanded = true, onToggle, trailing, count, actions, menu, menuLabel, showActions = "hover", hover = "fill", look = "heading", render, className }) {
|
|
2526
|
+
const row = look === "row";
|
|
2527
|
+
const acts = actions && actions.length > 0 || menu != null;
|
|
2528
|
+
const trailingClasses = !acts ? "has-[[data-unread]]:-mr-1" : showActions === "hover" && "has-[[data-unread]]:pointer-events-none has-[[data-unread]]:absolute has-[[data-unread]]:inset-y-0 has-[[data-unread]]:right-1 has-[[data-unread]]:w-6 has-[[data-unread]]:justify-center has-[[data-unread]]:transition-opacity group-hover:has-[[data-unread]]:opacity-0 group-has-[:focus-visible]:has-[[data-unread]]:opacity-0 group-has-[[data-section-menu]_[aria-expanded=true]]:has-[[data-unread]]:opacity-0 [@media(hover:none)]:has-[[data-unread]]:opacity-0";
|
|
2529
|
+
const reveal = showActions === "hover" && "opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100 has-[[aria-expanded=true]]:opacity-100 [@media(hover:none)]:opacity-100";
|
|
2530
|
+
const titleElement = useRender({
|
|
2531
|
+
render: render ?? (chevron ? /* @__PURE__ */ jsx33("button", { type: "button", onClick: onToggle, "aria-expanded": isExpanded }) : /* @__PURE__ */ jsx33("span", {})),
|
|
2532
|
+
props: {
|
|
2533
|
+
// `text-left`: a button centres its text. `h-full` and `flex-1`: the
|
|
2534
|
+
// whole row up to the actions is the hit target, as it was when the
|
|
2535
|
+
// row itself carried the click.
|
|
2536
|
+
// An icon is a row's: NavItem's 8px after it.
|
|
2537
|
+
className: cn("flex h-full min-w-0 flex-1 items-center text-left", row || chevron || icon != null ? "gap-2" : "gap-1"),
|
|
2538
|
+
children: /* @__PURE__ */ jsxs25(Fragment8, { children: [
|
|
2539
|
+
icon != null ? /* @__PURE__ */ jsxs25("span", { className: "relative flex size-4 shrink-0 items-center justify-center text-text-secondary", children: [
|
|
2540
|
+
/* @__PURE__ */ jsx33("span", { className: cn("flex", chevron && "transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"), children: icon }),
|
|
2541
|
+
chevron && /* @__PURE__ */ jsx33(
|
|
2542
|
+
IconChevronRight2,
|
|
2543
|
+
{
|
|
2544
|
+
size: 16,
|
|
2545
|
+
stroke: 1.5,
|
|
2546
|
+
className: cn("absolute opacity-0 transition-[opacity,transform] duration-150 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100", isExpanded && "rotate-90")
|
|
2547
|
+
}
|
|
2548
|
+
)
|
|
2549
|
+
] }) : chevron && /* @__PURE__ */ jsx33(
|
|
2550
|
+
IconChevronRight2,
|
|
2551
|
+
{
|
|
2552
|
+
size: 16,
|
|
2553
|
+
stroke: 1.5,
|
|
2554
|
+
className: cn("shrink-0 transition-transform duration-150", !row && "text-text-secondary", isExpanded && "rotate-90")
|
|
2555
|
+
}
|
|
2556
|
+
),
|
|
2557
|
+
look === "quiet" ? /* @__PURE__ */ jsx33("span", { className: "min-w-0 truncate text-caption text-text-muted", children: title }) : row ? (
|
|
2558
|
+
// A row's words: NavItem's size and colour, brightening under the pointer with the row.
|
|
2559
|
+
/* @__PURE__ */ jsx33("span", { className: "min-w-0 flex-1 truncate text-body-2", children: title })
|
|
2560
|
+
) : (
|
|
2561
|
+
// One line, as the other looks and a NavItem's label: a Folder named by its id ran onto two (Katerina, 3 November).
|
|
2562
|
+
/* @__PURE__ */ jsx33(SectionLabel, { folds: chevron, truncate: true, children: title })
|
|
2563
|
+
),
|
|
2564
|
+
count != null && /* @__PURE__ */ jsx33("span", { className: cn("ml-1 shrink-0", COUNT_TEXT_CLASSES), children: count })
|
|
2565
|
+
] })
|
|
2566
|
+
}
|
|
2567
|
+
});
|
|
2568
|
+
return /* @__PURE__ */ jsxs25(
|
|
2569
|
+
"div",
|
|
2570
|
+
{
|
|
2571
|
+
className: cn(
|
|
2572
|
+
// `relative`: a dot in the last button's place is placed against the row.
|
|
2573
|
+
"group relative flex h-[32px] shrink-0 items-center gap-1 px-2",
|
|
2574
|
+
!row && "transition-colors",
|
|
2575
|
+
// A row is NavItem's shape and colour: 6px corners, secondary words that brighten on hover.
|
|
2576
|
+
row ? cn(SIDEBAR_ROW_CLASSES, SIDEBAR_ROW_TEXT_CLASSES) : "rounded-lg",
|
|
2577
|
+
// The fill says "this does something": a row with a toggle or actions
|
|
2578
|
+
// lights up, a fixed heading over rows does not (2026-09-09, the
|
|
2579
|
+
// Sidebar's fixed group).
|
|
2580
|
+
// A quiet label never lights up: it is a label; its button does.
|
|
2581
|
+
hover === "fill" && look !== "quiet" && (chevron || acts) && "hover:bg-bg-hover",
|
|
2582
|
+
// While its menu is open the pointer is on the menu, not the row: the
|
|
2583
|
+
// row keeps its hover look, as a NavItem's does.
|
|
2584
|
+
hover === "fill" && look !== "quiet" && menu != null && "has-[[data-section-menu]_[aria-expanded=true]]:bg-bg-hover",
|
|
2585
|
+
className
|
|
2586
|
+
),
|
|
2587
|
+
children: [
|
|
2588
|
+
titleElement,
|
|
2589
|
+
trailing != null && /* @__PURE__ */ jsx33("div", { className: cn("flex shrink-0 items-center", trailingClasses), children: trailing }),
|
|
2590
|
+
acts && /* @__PURE__ */ jsx33(
|
|
2591
|
+
"div",
|
|
2592
|
+
{
|
|
2593
|
+
className: "-mr-1 flex shrink-0 items-center",
|
|
2594
|
+
children: /* @__PURE__ */ jsxs25("div", { className: cn("flex items-center gap-1", reveal), children: [
|
|
2595
|
+
actions?.map(
|
|
2596
|
+
(action) => action.menu != null ? (
|
|
2597
|
+
// `data-section-menu`, as the ⋮ has: the row stays lit while its menu is open.
|
|
2598
|
+
/* @__PURE__ */ jsx33("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx33(
|
|
2599
|
+
Menu,
|
|
2600
|
+
{
|
|
2601
|
+
align: "left",
|
|
2602
|
+
trigger: /* @__PURE__ */ jsx33(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, children: action.icon }),
|
|
2603
|
+
children: action.menu
|
|
2604
|
+
}
|
|
2605
|
+
) }, action.tooltip)
|
|
2606
|
+
) : /* @__PURE__ */ jsx33(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, onClick: action.onClick, children: action.icon }, action.tooltip)
|
|
2607
|
+
),
|
|
2608
|
+
menu != null && /* @__PURE__ */ jsx33("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx33(
|
|
2609
|
+
Menu,
|
|
2610
|
+
{
|
|
2611
|
+
align: "left",
|
|
2612
|
+
trigger: /* @__PURE__ */ jsx33(IconButton, { tooltip: "More options", "aria-label": menuLabel ?? `More options for ${title}`, children: /* @__PURE__ */ jsx33(IconDotsVertical, { size: 16, stroke: 1.5 }) }),
|
|
2613
|
+
children: menu
|
|
2614
|
+
}
|
|
2615
|
+
) })
|
|
2616
|
+
] })
|
|
2617
|
+
}
|
|
2618
|
+
)
|
|
2619
|
+
]
|
|
2620
|
+
}
|
|
2621
|
+
);
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2514
2624
|
// src/WhoFollowsDialog.tsx
|
|
2515
|
-
import { jsx as
|
|
2516
|
-
function WhoFollowsDialog({ title, all, important, candidates = [], onAdd, initialView = "list", onClose }) {
|
|
2625
|
+
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2626
|
+
function WhoFollowsDialog({ title, all, important, candidates = [], onAdd, self, initialView = "list", onClose }) {
|
|
2517
2627
|
const [view, setView] = useState9(onAdd ? initialView : "list");
|
|
2628
|
+
const [toggling, setToggling] = useState9(false);
|
|
2629
|
+
const toggle = async () => {
|
|
2630
|
+
if (!self) return;
|
|
2631
|
+
setToggling(true);
|
|
2632
|
+
try {
|
|
2633
|
+
await self.onToggle();
|
|
2634
|
+
} finally {
|
|
2635
|
+
setToggling(false);
|
|
2636
|
+
}
|
|
2637
|
+
};
|
|
2638
|
+
const ownId = self?.action === "leave" && [...all, ...important].some((m) => m.id === self.id) ? self.id : void 0;
|
|
2639
|
+
const ownFirst = (rows) => {
|
|
2640
|
+
const own = rows.find((m) => m.id === ownId);
|
|
2641
|
+
return own ? [own, ...rows.filter((m) => m !== own)] : rows;
|
|
2642
|
+
};
|
|
2643
|
+
const selfOnTop = self && !ownId;
|
|
2518
2644
|
const heading = `Who follows ${title}`;
|
|
2519
2645
|
if (view === "add" && onAdd) {
|
|
2520
|
-
return /* @__PURE__ */
|
|
2646
|
+
return /* @__PURE__ */ jsx34(
|
|
2521
2647
|
AddPeopleLayer,
|
|
2522
2648
|
{
|
|
2523
2649
|
title: "Add someone",
|
|
@@ -2530,12 +2656,32 @@ function WhoFollowsDialog({ title, all, important, candidates = [], onAdd, initi
|
|
|
2530
2656
|
}
|
|
2531
2657
|
);
|
|
2532
2658
|
}
|
|
2533
|
-
const group = (label, rows) => /* @__PURE__ */
|
|
2534
|
-
/* @__PURE__ */
|
|
2535
|
-
rows.length === 0 ? /* @__PURE__ */
|
|
2659
|
+
const group = (label, rows) => /* @__PURE__ */ jsxs26("div", { className: "flex flex-col pt-2", children: [
|
|
2660
|
+
/* @__PURE__ */ jsx34(SectionHeader, { title: label, count: rows.length, hover: "none", className: "mx-3" }),
|
|
2661
|
+
rows.length === 0 ? /* @__PURE__ */ jsx34(EmptyState, { scope: "rows", message: "Nobody", className: "mx-3" }) : ownFirst(rows).map((m) => /* @__PURE__ */ jsx34(
|
|
2662
|
+
RosterRow,
|
|
2663
|
+
{
|
|
2664
|
+
member: m,
|
|
2665
|
+
trailing: m.id === ownId && /* @__PURE__ */ jsx34(Button, { variant: "destructive", size: "small", disabled: toggling, onClick: () => void toggle(), children: "Leave" })
|
|
2666
|
+
},
|
|
2667
|
+
m.id
|
|
2668
|
+
))
|
|
2536
2669
|
] });
|
|
2537
|
-
return /* @__PURE__ */
|
|
2538
|
-
onAdd && /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ jsxs26(DialogShell, { title: heading, onClose, bodyMaxHeight: "max-h-[400px]", bodyClassName: "p-0 py-2", children: [
|
|
2671
|
+
(selfOnTop || onAdd) && /* @__PURE__ */ jsxs26("div", { className: "flex flex-col px-2", children: [
|
|
2672
|
+
selfOnTop && /* @__PURE__ */ jsx34(
|
|
2673
|
+
MenuItem,
|
|
2674
|
+
{
|
|
2675
|
+
size: "tall",
|
|
2676
|
+
className: "py-2",
|
|
2677
|
+
disabled: toggling,
|
|
2678
|
+
onClick: () => void toggle(),
|
|
2679
|
+
leading: /* @__PURE__ */ jsx34("span", { className: LEADING_CLASSES, children: self.action === "join" ? /* @__PURE__ */ jsx34(IconUserPlus2, { size: 16, stroke: 1.5 }) : /* @__PURE__ */ jsx34(IconUserMinus2, { size: 16, stroke: 1.5 }) }),
|
|
2680
|
+
label: self.action === "join" ? "Join" : "Leave"
|
|
2681
|
+
}
|
|
2682
|
+
),
|
|
2683
|
+
onAdd && /* @__PURE__ */ jsx34(AddRow, { label: "Add someone", onClick: () => setView("add") })
|
|
2684
|
+
] }),
|
|
2539
2685
|
group("All", all),
|
|
2540
2686
|
group("Important", important)
|
|
2541
2687
|
] });
|
|
@@ -2543,7 +2689,7 @@ function WhoFollowsDialog({ title, all, important, candidates = [], onAdd, initi
|
|
|
2543
2689
|
|
|
2544
2690
|
// src/Banner.tsx
|
|
2545
2691
|
import { IconX as IconX5 } from "@tabler/icons-react";
|
|
2546
|
-
import { jsx as
|
|
2692
|
+
import { jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2547
2693
|
var TONE_STYLES = {
|
|
2548
2694
|
ok: "bg-success-muted text-success-default",
|
|
2549
2695
|
error: "bg-error-muted text-error-default",
|
|
@@ -2553,21 +2699,21 @@ var TONE_STYLES = {
|
|
|
2553
2699
|
function Banner({ tone, children, icon, action, onDismiss, dismissLabel = "Dismiss", className }) {
|
|
2554
2700
|
const role = tone === "error" ? "alert" : "status";
|
|
2555
2701
|
if (!onDismiss && !icon && !action) {
|
|
2556
|
-
return /* @__PURE__ */
|
|
2702
|
+
return /* @__PURE__ */ jsx35("div", { role, className: cn("px-4 py-2 text-body-2", TONE_STYLES[tone], className), children });
|
|
2557
2703
|
}
|
|
2558
2704
|
const oneLine = Boolean(icon || action);
|
|
2559
|
-
return /* @__PURE__ */
|
|
2560
|
-
icon && /* @__PURE__ */
|
|
2561
|
-
/* @__PURE__ */
|
|
2562
|
-
action && /* @__PURE__ */
|
|
2563
|
-
onDismiss && /* @__PURE__ */
|
|
2705
|
+
return /* @__PURE__ */ jsxs27("div", { role, className: cn("flex items-center gap-3 px-4 py-2 text-body-2", TONE_STYLES[tone], className), children: [
|
|
2706
|
+
icon && /* @__PURE__ */ jsx35("span", { className: "flex shrink-0", children: icon }),
|
|
2707
|
+
/* @__PURE__ */ jsx35("span", { className: cn("min-w-0 flex-1", oneLine && "truncate"), children }),
|
|
2708
|
+
action && /* @__PURE__ */ jsx35(Button, { variant: "muted", size: "small", className: "shrink-0", onClick: action.onClick, children: action.label }),
|
|
2709
|
+
onDismiss && /* @__PURE__ */ jsx35(IconButton, { variant: "current", "aria-label": dismissLabel, onClick: onDismiss, className: "-mr-1 shrink-0", children: /* @__PURE__ */ jsx35(IconX5, { size: 16, stroke: 1.5 }) })
|
|
2564
2710
|
] });
|
|
2565
2711
|
}
|
|
2566
2712
|
|
|
2567
2713
|
// src/BlockHandle.tsx
|
|
2568
2714
|
import { useCallback as useCallback2, useEffect as useEffect5, useRef as useRef8, useState as useState10 } from "react";
|
|
2569
2715
|
import { IconGripVertical } from "@tabler/icons-react";
|
|
2570
|
-
import { jsx as
|
|
2716
|
+
import { jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2571
2717
|
function readId(element) {
|
|
2572
2718
|
const own = element.getAttribute("data-block-id") ?? element.querySelector("[data-block-id]")?.getAttribute("data-block-id");
|
|
2573
2719
|
return own || void 0;
|
|
@@ -2632,7 +2778,7 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2632
2778
|
setLine(null);
|
|
2633
2779
|
editing?.endDrag();
|
|
2634
2780
|
};
|
|
2635
|
-
return /* @__PURE__ */
|
|
2781
|
+
return /* @__PURE__ */ jsxs28(
|
|
2636
2782
|
"div",
|
|
2637
2783
|
{
|
|
2638
2784
|
ref: frame,
|
|
@@ -2660,16 +2806,16 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2660
2806
|
if (!frame.current?.contains(e.relatedTarget)) setLine(null);
|
|
2661
2807
|
},
|
|
2662
2808
|
children: [
|
|
2663
|
-
/* @__PURE__ */
|
|
2664
|
-
/* @__PURE__ */
|
|
2665
|
-
line !== null && /* @__PURE__ */
|
|
2809
|
+
/* @__PURE__ */ jsx36("div", { ref: content, children }),
|
|
2810
|
+
/* @__PURE__ */ jsx36("div", { "aria-hidden": true, className: "absolute inset-y-0 -left-7 w-7" }),
|
|
2811
|
+
line !== null && /* @__PURE__ */ jsx36("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-0 h-px bg-accent-primary", style: { top: line } }),
|
|
2666
2812
|
block && (rows || own) && // The top is the block's, measured: it depends on the document, not on a size of ours.
|
|
2667
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsx36("div", { className: cn("absolute -left-7", rows && "cursor-grab active:cursor-grabbing"), style: { top }, children: /* @__PURE__ */ jsxs28(
|
|
2668
2814
|
Menu,
|
|
2669
2815
|
{
|
|
2670
2816
|
open,
|
|
2671
2817
|
onOpenChange: setOpen,
|
|
2672
|
-
trigger: /* @__PURE__ */
|
|
2818
|
+
trigger: /* @__PURE__ */ jsx36(
|
|
2673
2819
|
IconButton,
|
|
2674
2820
|
{
|
|
2675
2821
|
"aria-label": "Block menu",
|
|
@@ -2690,12 +2836,12 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2690
2836
|
endDrag();
|
|
2691
2837
|
setBlock(null);
|
|
2692
2838
|
},
|
|
2693
|
-
children: /* @__PURE__ */
|
|
2839
|
+
children: /* @__PURE__ */ jsx36(IconGripVertical, { size: 16, stroke: 1.5 })
|
|
2694
2840
|
}
|
|
2695
2841
|
),
|
|
2696
2842
|
children: [
|
|
2697
2843
|
rows,
|
|
2698
|
-
rows && own && /* @__PURE__ */
|
|
2844
|
+
rows && own && /* @__PURE__ */ jsx36(MenuSeparator, {}),
|
|
2699
2845
|
own
|
|
2700
2846
|
]
|
|
2701
2847
|
}
|
|
@@ -2720,44 +2866,44 @@ import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
|
2720
2866
|
import { IconLoader2 as IconLoader22, IconSearch } from "@tabler/icons-react";
|
|
2721
2867
|
|
|
2722
2868
|
// src/Skeleton.tsx
|
|
2723
|
-
import { jsx as
|
|
2869
|
+
import { jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2724
2870
|
var SKELETON_SHAPE = { bar: "rounded-sm", round: "rounded-full", control: "rounded-md" };
|
|
2725
2871
|
function SkeletonBar({ className, style, on = "surface", shape = "bar" }) {
|
|
2726
|
-
return /* @__PURE__ */
|
|
2872
|
+
return /* @__PURE__ */ jsx37("div", { className: cn("animate-pulse", SKELETON_SHAPE[shape], on === "inset" ? "bg-bg-active" : "bg-bg-inset", className), style });
|
|
2727
2873
|
}
|
|
2728
2874
|
var ROW_BAR_WIDTHS = [150, 100, 170, 120, 90, 140, 110, 160];
|
|
2729
2875
|
function SkeletonRow({ barWidth = 130 }) {
|
|
2730
|
-
return /* @__PURE__ */
|
|
2731
|
-
/* @__PURE__ */
|
|
2732
|
-
/* @__PURE__ */
|
|
2876
|
+
return /* @__PURE__ */ jsxs29("div", { className: "flex shrink-0 items-center gap-2 px-2 h-[32px] rounded-lg", children: [
|
|
2877
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "w-4 h-4 shrink-0" }),
|
|
2878
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "h-3.5", style: { width: barWidth } })
|
|
2733
2879
|
] });
|
|
2734
2880
|
}
|
|
2735
2881
|
function SkeletonList({ rows = 8, className }) {
|
|
2736
|
-
return /* @__PURE__ */
|
|
2882
|
+
return /* @__PURE__ */ jsx37("div", { className: cn("flex flex-col gap-0.5 animate-skeleton-in", className), "aria-hidden": true, children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx37(SkeletonRow, { barWidth: ROW_BAR_WIDTHS[i % ROW_BAR_WIDTHS.length] }, i)) });
|
|
2737
2883
|
}
|
|
2738
2884
|
function SkeletonCard({ secondLine }) {
|
|
2739
|
-
return /* @__PURE__ */
|
|
2740
|
-
/* @__PURE__ */
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
/* @__PURE__ */
|
|
2743
|
-
/* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ jsxs29("div", { className: "rounded-lg px-2 pt-2", children: [
|
|
2886
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex w-full items-center gap-2", children: [
|
|
2887
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "h-6 w-6 shrink-0" }),
|
|
2888
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "h-3.5 w-[110px]" }),
|
|
2889
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "h-3 w-10" })
|
|
2744
2890
|
] }),
|
|
2745
|
-
/* @__PURE__ */
|
|
2746
|
-
/* @__PURE__ */
|
|
2747
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2 pb-2 pl-8 pr-2 pt-2", children: [
|
|
2892
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "h-3.5 w-full" }),
|
|
2893
|
+
/* @__PURE__ */ jsx37(SkeletonBar, { className: "h-3.5 max-w-full", style: { width: secondLine } })
|
|
2748
2894
|
] })
|
|
2749
2895
|
] });
|
|
2750
2896
|
}
|
|
2751
2897
|
function SkeletonConversation({ className }) {
|
|
2752
|
-
return /* @__PURE__ */
|
|
2753
|
-
/* @__PURE__ */
|
|
2754
|
-
/* @__PURE__ */
|
|
2755
|
-
/* @__PURE__ */
|
|
2898
|
+
return /* @__PURE__ */ jsxs29("div", { className: cn("flex flex-col gap-2 animate-skeleton-in", className), "aria-hidden": true, children: [
|
|
2899
|
+
/* @__PURE__ */ jsx37(SkeletonCard, { secondLine: 420 }),
|
|
2900
|
+
/* @__PURE__ */ jsx37(SkeletonCard, { secondLine: 300 }),
|
|
2901
|
+
/* @__PURE__ */ jsx37(SkeletonCard, { secondLine: 500 })
|
|
2756
2902
|
] });
|
|
2757
2903
|
}
|
|
2758
2904
|
|
|
2759
2905
|
// src/CommandPalette.tsx
|
|
2760
|
-
import { Fragment as
|
|
2906
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2761
2907
|
var PaletteContext = createContext6(null);
|
|
2762
2908
|
function usePalette(part) {
|
|
2763
2909
|
const palette = useContext6(PaletteContext);
|
|
@@ -2783,9 +2929,9 @@ function CommandPalette({ open, onOpenChange, label, where, modKey = "Ctrl", chi
|
|
|
2783
2929
|
return () => cancelAnimationFrame(frame);
|
|
2784
2930
|
});
|
|
2785
2931
|
const context = useMemo3(() => ({ where, modKey, popupRef }), [where, modKey]);
|
|
2786
|
-
return /* @__PURE__ */
|
|
2787
|
-
/* @__PURE__ */
|
|
2788
|
-
/* @__PURE__ */
|
|
2932
|
+
return /* @__PURE__ */ jsx38(Dialog3.Root, { open, onOpenChange: (next) => onOpenChange(next), children: /* @__PURE__ */ jsxs30(Dialog3.Portal, { children: [
|
|
2933
|
+
/* @__PURE__ */ jsx38(Dialog3.Backdrop, { className: "fixed inset-0 z-40 bg-scrim" }),
|
|
2934
|
+
/* @__PURE__ */ jsx38(Dialog3.Viewport, { className: "fixed inset-0 z-50 flex items-start justify-center pt-[16vh]", children: /* @__PURE__ */ jsx38(
|
|
2789
2935
|
Dialog3.Popup,
|
|
2790
2936
|
{
|
|
2791
2937
|
ref: popupRef,
|
|
@@ -2795,13 +2941,13 @@ function CommandPalette({ open, onOpenChange, label, where, modKey = "Ctrl", chi
|
|
|
2795
2941
|
if (e.target === popupRef.current) firstControl(popupRef.current)?.focus();
|
|
2796
2942
|
},
|
|
2797
2943
|
className: "flex w-[658px] max-w-[calc(100vw-32px)] flex-col overflow-hidden rounded-lg border border-border-default bg-bg-elevated shadow-lg outline-none",
|
|
2798
|
-
children: /* @__PURE__ */
|
|
2944
|
+
children: /* @__PURE__ */ jsx38(PaletteContext.Provider, { value: context, children })
|
|
2799
2945
|
}
|
|
2800
2946
|
) })
|
|
2801
2947
|
] }) });
|
|
2802
2948
|
}
|
|
2803
2949
|
function LevelChip({ chip, onBack }) {
|
|
2804
|
-
return /* @__PURE__ */
|
|
2950
|
+
return /* @__PURE__ */ jsx38(InputChip, { label: chip.label, leading: chip.leading, onRemove: onBack, removeLabel: `Leave ${chip.label}`, truncate: true, className: "max-w-[272px] shrink-0" });
|
|
2805
2951
|
}
|
|
2806
2952
|
function useBack(chip, popupRef) {
|
|
2807
2953
|
return () => {
|
|
@@ -2812,10 +2958,10 @@ function useBack(chip, popupRef) {
|
|
|
2812
2958
|
}
|
|
2813
2959
|
function Footer({ keys }) {
|
|
2814
2960
|
const { where } = usePalette("The footer");
|
|
2815
|
-
return /* @__PURE__ */
|
|
2816
|
-
/* @__PURE__ */
|
|
2817
|
-
keys.map(([key, word]) => /* @__PURE__ */
|
|
2818
|
-
/* @__PURE__ */
|
|
2961
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("flex h-9 shrink-0 items-center gap-4 border-t border-border-subtle px-5", MONO_CAPTION_CLASSES, "signal:text-text-muted leaf:font-mono leaf:text-small"), children: [
|
|
2962
|
+
/* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate", children: where }),
|
|
2963
|
+
keys.map(([key, word]) => /* @__PURE__ */ jsxs30("span", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
2964
|
+
/* @__PURE__ */ jsx38(Kbd, { children: key }),
|
|
2819
2965
|
" ",
|
|
2820
2966
|
word
|
|
2821
2967
|
] }, key))
|
|
@@ -2892,7 +3038,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2892
3038
|
...chip && query === "" ? [["Backspace", "back"]] : [],
|
|
2893
3039
|
["Esc", "close"]
|
|
2894
3040
|
];
|
|
2895
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsxs30(
|
|
2896
3042
|
Autocomplete.Root,
|
|
2897
3043
|
{
|
|
2898
3044
|
items,
|
|
@@ -2915,10 +3061,10 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2915
3061
|
setLitId(id);
|
|
2916
3062
|
},
|
|
2917
3063
|
children: [
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
chip && /* @__PURE__ */
|
|
2921
|
-
/* @__PURE__ */
|
|
3064
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex h-12 shrink-0 items-center gap-3 border-b border-border-subtle px-5", children: [
|
|
3065
|
+
/* @__PURE__ */ jsx38(IconSearch, { size: 16, stroke: 1.5, className: "shrink-0 text-text-secondary" }),
|
|
3066
|
+
chip && /* @__PURE__ */ jsx38(LevelChip, { chip, onBack: back }),
|
|
3067
|
+
/* @__PURE__ */ jsx38(
|
|
2922
3068
|
Autocomplete.Input,
|
|
2923
3069
|
{
|
|
2924
3070
|
ref: inputRef,
|
|
@@ -2930,44 +3076,44 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2930
3076
|
}
|
|
2931
3077
|
)
|
|
2932
3078
|
] }),
|
|
2933
|
-
/* @__PURE__ */
|
|
2934
|
-
children != null && /* @__PURE__ */
|
|
2935
|
-
/* @__PURE__ */
|
|
2936
|
-
/* @__PURE__ */
|
|
2937
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ jsxs30(ScrollArea, { viewportClassName: "max-h-[420px]", contentClassName: "flex flex-col p-2", children: [
|
|
3080
|
+
children != null && /* @__PURE__ */ jsx38("div", { className: "flex flex-col gap-2 px-3 pb-2 pt-3", children }),
|
|
3081
|
+
/* @__PURE__ */ jsx38(Autocomplete.List, { className: "flex flex-col", children: (group) => /* @__PURE__ */ jsxs30(Autocomplete.Group, { items: group.items, className: "flex flex-col gap-0.5", children: [
|
|
3082
|
+
/* @__PURE__ */ jsx38(Autocomplete.GroupLabel, { className: "flex h-7 shrink-0 items-center px-3", children: /* @__PURE__ */ jsx38(SectionLabel, { tone: "secondary", children: group.value }) }),
|
|
3083
|
+
/* @__PURE__ */ jsx38(Autocomplete.Collection, { children: (row) => (
|
|
2938
3084
|
/* The menu row, as the list's own option — the way Select
|
|
2939
3085
|
puts it on `Select.Item`. One row, two parts. */
|
|
2940
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx38(Autocomplete.Item, { value: row, onClick: () => row.onSelect(), className: menuItemClassName({ size: "tall" }), children: /* @__PURE__ */ jsx38(
|
|
2941
3087
|
MenuItemBody,
|
|
2942
3088
|
{
|
|
2943
3089
|
size: "tall",
|
|
2944
3090
|
label: row.label,
|
|
2945
3091
|
description: row.description,
|
|
2946
3092
|
aside: row.aside,
|
|
2947
|
-
leading: /* @__PURE__ */
|
|
3093
|
+
leading: /* @__PURE__ */ jsx38(RowLeading, { row }),
|
|
2948
3094
|
submenu: !!row.onGoIn,
|
|
2949
|
-
hint: row.onGoIn ? /* @__PURE__ */
|
|
3095
|
+
hint: row.onGoIn ? /* @__PURE__ */ jsx38(Kbd, { children: "Tab" }) : /* @__PURE__ */ jsx38(EnterHint, {})
|
|
2950
3096
|
}
|
|
2951
3097
|
) }, row.id)
|
|
2952
3098
|
) })
|
|
2953
3099
|
] }, group.value) }),
|
|
2954
|
-
/* @__PURE__ */
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
3100
|
+
/* @__PURE__ */ jsx38(Autocomplete.Status, { className: "flex items-center gap-2 px-3 [&:not(:empty)]:h-8", children: pending && /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
3101
|
+
/* @__PURE__ */ jsx38(IconLoader22, { size: 12, stroke: 1.5, className: "shrink-0 animate-spin text-text-muted" }),
|
|
3102
|
+
/* @__PURE__ */ jsx38("span", { className: "text-caption text-text-muted", children: pending })
|
|
2957
3103
|
] }) }),
|
|
2958
|
-
notes.map((note) => /* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
3104
|
+
notes.map((note) => /* @__PURE__ */ jsx38("div", { className: "flex min-h-8 items-center px-3", children: /* @__PURE__ */ jsx38(FieldLine, { children: note }) }, note)),
|
|
3105
|
+
/* @__PURE__ */ jsx38(Autocomplete.Empty, { className: "flex items-center px-3 [&:not(:empty)]:min-h-10", children: empty && /* @__PURE__ */ jsx38(EmptyState, { scope: "section", message: empty }) })
|
|
2960
3106
|
] }),
|
|
2961
|
-
/* @__PURE__ */
|
|
3107
|
+
/* @__PURE__ */ jsx38(Footer, { keys })
|
|
2962
3108
|
]
|
|
2963
3109
|
}
|
|
2964
3110
|
);
|
|
2965
3111
|
}
|
|
2966
3112
|
function RowLeading({ row }) {
|
|
2967
3113
|
if (row.icon != null) {
|
|
2968
|
-
return /* @__PURE__ */
|
|
3114
|
+
return /* @__PURE__ */ jsx38("span", { className: "flex size-8 items-center justify-center rounded-sm bg-bg-inset text-text-secondary", children: row.icon });
|
|
2969
3115
|
}
|
|
2970
|
-
return /* @__PURE__ */
|
|
3116
|
+
return /* @__PURE__ */ jsx38("span", { className: "flex size-8 items-center justify-center", children: row.leading });
|
|
2971
3117
|
}
|
|
2972
3118
|
var TEXT_TYPES = /* @__PURE__ */ new Set(["", "text", "search", "email", "url", "tel", "password", "number"]);
|
|
2973
3119
|
function isTextField(el) {
|
|
@@ -3009,65 +3155,65 @@ function CommandPaletteForm({ chip, icon, submitLabel, onSubmit, submitWaits, wo
|
|
|
3009
3155
|
...backNamed ? [["Backspace", "back"]] : [],
|
|
3010
3156
|
["Esc", "close"]
|
|
3011
3157
|
];
|
|
3012
|
-
return /* @__PURE__ */
|
|
3013
|
-
/* @__PURE__ */
|
|
3014
|
-
icon != null && /* @__PURE__ */
|
|
3015
|
-
/* @__PURE__ */
|
|
3158
|
+
return /* @__PURE__ */ jsxs30("div", { ref: frameRef, tabIndex: -1, onKeyDown, onFocus: measure, onBlur: measure, onInput: measure, className: "flex min-h-0 flex-col outline-none", children: [
|
|
3159
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex h-12 shrink-0 items-center gap-3 border-b border-border-subtle px-5", children: [
|
|
3160
|
+
icon != null && /* @__PURE__ */ jsx38("span", { className: "flex shrink-0 items-center text-text-secondary", children: icon }),
|
|
3161
|
+
/* @__PURE__ */ jsx38(LevelChip, { chip, onBack: back })
|
|
3016
3162
|
] }),
|
|
3017
|
-
/* @__PURE__ */
|
|
3018
|
-
/* @__PURE__ */
|
|
3019
|
-
/* @__PURE__ */
|
|
3020
|
-
/* @__PURE__ */
|
|
3021
|
-
/* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ jsxs30(Form, { "data-command-palette-fields": "", busy, enterSends: false, onSubmit: submit, layout: "free", className: "flex min-h-0 flex-col", children: [
|
|
3164
|
+
/* @__PURE__ */ jsx38(ScrollArea, { viewportClassName: "max-h-[420px]", contentClassName: "flex flex-col px-5 py-4", children: /* @__PURE__ */ jsx38("div", { className: FIELDS_CLASSES, children }) }),
|
|
3165
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex shrink-0 items-center gap-3 px-5 pb-4", children: [
|
|
3166
|
+
/* @__PURE__ */ jsx38("div", { className: "min-w-0 flex-1", children: working ? /* @__PURE__ */ jsx38(FieldLine, { children: working.line }) : error ? /* @__PURE__ */ jsx38(FieldLine, { tone: "error", children: error }) : null }),
|
|
3167
|
+
/* @__PURE__ */ jsx38(
|
|
3022
3168
|
Button,
|
|
3023
3169
|
{
|
|
3024
3170
|
type: "submit",
|
|
3025
3171
|
variant: "primary",
|
|
3026
3172
|
disabled: busy,
|
|
3027
3173
|
disabledReason: busy ? void 0 : submitWaits,
|
|
3028
|
-
leadingIcon: busy ? /* @__PURE__ */
|
|
3174
|
+
leadingIcon: busy ? /* @__PURE__ */ jsx38(IconLoader22, { size: 16, stroke: 1.5, className: "animate-spin" }) : void 0,
|
|
3029
3175
|
children: working ? working.button : submitLabel
|
|
3030
3176
|
}
|
|
3031
3177
|
)
|
|
3032
3178
|
] })
|
|
3033
3179
|
] }),
|
|
3034
|
-
/* @__PURE__ */
|
|
3180
|
+
/* @__PURE__ */ jsx38(Footer, { keys })
|
|
3035
3181
|
] });
|
|
3036
3182
|
}
|
|
3037
3183
|
var BAR_WIDTHS = ["w-4/5", "w-3/5", "w-2/3"];
|
|
3038
3184
|
function CommandPaletteWorking({ children, bars = 2 }) {
|
|
3039
|
-
return /* @__PURE__ */
|
|
3040
|
-
/* @__PURE__ */
|
|
3041
|
-
/* @__PURE__ */
|
|
3185
|
+
return /* @__PURE__ */ jsxs30("div", { role: "status", className: "flex flex-col gap-2", children: [
|
|
3186
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex items-center gap-2 text-caption text-text-secondary", children: [
|
|
3187
|
+
/* @__PURE__ */ jsx38(IconLoader22, { size: 14, stroke: 1.5, className: "shrink-0 animate-spin" }),
|
|
3042
3188
|
children
|
|
3043
3189
|
] }),
|
|
3044
|
-
BAR_WIDTHS.slice(0, bars).map((width) => /* @__PURE__ */
|
|
3190
|
+
BAR_WIDTHS.slice(0, bars).map((width) => /* @__PURE__ */ jsx38(SkeletonBar, { className: cn("h-3", width) }, width))
|
|
3045
3191
|
] });
|
|
3046
3192
|
}
|
|
3047
3193
|
function CommandPaletteAnswer({ children, note }) {
|
|
3048
3194
|
const paragraphs = children.split(/\n\s*\n/).filter((p) => p.trim() !== "");
|
|
3049
|
-
return /* @__PURE__ */
|
|
3050
|
-
paragraphs.map((paragraph, i) => /* @__PURE__ */
|
|
3051
|
-
(part, j) => /^\[\d+\]$/.test(part) ? /* @__PURE__ */
|
|
3195
|
+
return /* @__PURE__ */ jsxs30("div", { className: "flex flex-col gap-2", children: [
|
|
3196
|
+
paragraphs.map((paragraph, i) => /* @__PURE__ */ jsx38("p", { className: "whitespace-pre-wrap text-body-2 text-text-primary", children: paragraph.split(/\s*(\[\d+\])/).map(
|
|
3197
|
+
(part, j) => /^\[\d+\]$/.test(part) ? /* @__PURE__ */ jsx38("sup", { className: "ml-0.5 font-mono text-small text-accent-text", children: part.slice(1, -1) }, j) : part
|
|
3052
3198
|
) }, i)),
|
|
3053
|
-
note && /* @__PURE__ */
|
|
3199
|
+
note && /* @__PURE__ */ jsx38(FieldLine, { children: note })
|
|
3054
3200
|
] });
|
|
3055
3201
|
}
|
|
3056
3202
|
function CommandPaletteQuote({ children }) {
|
|
3057
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ jsx38("p", { className: "whitespace-pre-wrap border-l-2 border-border-default pl-3 text-body-2 text-text-primary", children });
|
|
3058
3204
|
}
|
|
3059
3205
|
function CommandPaletteProposal({ source, mark, children }) {
|
|
3060
|
-
return /* @__PURE__ */
|
|
3061
|
-
/* @__PURE__ */
|
|
3206
|
+
return /* @__PURE__ */ jsxs30(Card, { fill: "surface", className: "flex flex-col gap-1 p-3", children: [
|
|
3207
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex items-center gap-2 text-caption text-text-secondary", children: [
|
|
3062
3208
|
mark,
|
|
3063
3209
|
source
|
|
3064
3210
|
] }),
|
|
3065
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ jsx38("span", { className: "text-body-2 text-text-primary", children })
|
|
3066
3212
|
] });
|
|
3067
3213
|
}
|
|
3068
3214
|
|
|
3069
3215
|
// src/InlineChip.tsx
|
|
3070
|
-
import { Fragment as
|
|
3216
|
+
import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3071
3217
|
var INLINE_CHIP_CLASSES = "inline-flex h-[1.4em] items-baseline gap-1 rounded-sm px-1 mx-0.5 align-baseline text-body-2 font-normal select-none [&>:is(svg,img,:empty)]:self-center [&>:has(svg,img)]:self-center";
|
|
3072
3218
|
var INLINE_CHIP_TONE_CLASSES = {
|
|
3073
3219
|
/** A thing or a place — anything that is not a person. */
|
|
@@ -3093,19 +3239,19 @@ function inlineChipClassName(tone, className) {
|
|
|
3093
3239
|
}
|
|
3094
3240
|
function InlineChip({ tone = "neutral", icon, href, className, children, ...props }) {
|
|
3095
3241
|
const inApp = useInAppClick(href, props.onClick);
|
|
3096
|
-
const body = /* @__PURE__ */
|
|
3097
|
-
icon && /* @__PURE__ */
|
|
3242
|
+
const body = /* @__PURE__ */ jsxs31(Fragment10, { children: [
|
|
3243
|
+
icon && /* @__PURE__ */ jsx39("span", { className: "flex size-4 shrink-0 items-center justify-center self-center text-text-secondary", children: icon }),
|
|
3098
3244
|
children
|
|
3099
3245
|
] });
|
|
3100
3246
|
const classes = inlineChipClassName(tone, className);
|
|
3101
3247
|
if (href === void 0) {
|
|
3102
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsx39("span", { className: classes, ...props, children: body });
|
|
3103
3249
|
}
|
|
3104
|
-
return /* @__PURE__ */
|
|
3250
|
+
return /* @__PURE__ */ jsx39("a", { href, className: classes, ...props, onClick: inApp, children: body });
|
|
3105
3251
|
}
|
|
3106
3252
|
|
|
3107
3253
|
// src/RichText.tsx
|
|
3108
|
-
import { Fragment as
|
|
3254
|
+
import { Fragment as Fragment11 } from "react";
|
|
3109
3255
|
|
|
3110
3256
|
// src/codeColours.ts
|
|
3111
3257
|
import { createElement } from "react";
|
|
@@ -3124,7 +3270,7 @@ function codeColours(text, language) {
|
|
|
3124
3270
|
}
|
|
3125
3271
|
|
|
3126
3272
|
// src/RichText.tsx
|
|
3127
|
-
import { Fragment as
|
|
3273
|
+
import { Fragment as Fragment12, jsx as jsx40, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3128
3274
|
var RICH_TEXT_CLASSES = {
|
|
3129
3275
|
/* Blocks 8px apart (Katerina, 9 October; 4 before). A list's own items stay together. */
|
|
3130
3276
|
base: "flex flex-col gap-2 break-words text-text-secondary",
|
|
@@ -3175,19 +3321,19 @@ function textWithLinks(text, renderText) {
|
|
|
3175
3321
|
return parts.map((part, i) => {
|
|
3176
3322
|
const written = part.match(WRITTEN_LINK);
|
|
3177
3323
|
if (written) {
|
|
3178
|
-
return /* @__PURE__ */
|
|
3324
|
+
return /* @__PURE__ */ jsx40("span", { className: "break-words", children: /* @__PURE__ */ jsx40(Link, { href: written[2], external: true, onClick: keepToLink, children: written[1] }) }, i);
|
|
3179
3325
|
}
|
|
3180
3326
|
const bare = i % 2 === 1 ? part.match(BARE_LINK) : null;
|
|
3181
3327
|
if (bare) {
|
|
3182
3328
|
return (
|
|
3183
3329
|
// An address has no spaces to wrap at, so it may break anywhere.
|
|
3184
|
-
/* @__PURE__ */
|
|
3185
|
-
/* @__PURE__ */
|
|
3330
|
+
/* @__PURE__ */ jsxs32("span", { className: "break-all", children: [
|
|
3331
|
+
/* @__PURE__ */ jsx40(Link, { href: bare[1], external: true, onClick: keepToLink, children: bare[1] }),
|
|
3186
3332
|
bare[2]
|
|
3187
3333
|
] }, i)
|
|
3188
3334
|
);
|
|
3189
3335
|
}
|
|
3190
|
-
return part ? /* @__PURE__ */
|
|
3336
|
+
return part ? /* @__PURE__ */ jsx40("span", { children: renderText(part) }, i) : null;
|
|
3191
3337
|
});
|
|
3192
3338
|
}
|
|
3193
3339
|
var CALLOUT_TONES = /* @__PURE__ */ new Set(["note", "tip", "important", "warning", "caution"]);
|
|
@@ -3196,19 +3342,19 @@ function calloutLook(tone) {
|
|
|
3196
3342
|
return CALLOUT_TONES.has(named2) ? named2 : "note";
|
|
3197
3343
|
}
|
|
3198
3344
|
function Runs({ runs, draw: draw2 }) {
|
|
3199
|
-
return /* @__PURE__ */
|
|
3200
|
-
if (run.reference) return /* @__PURE__ */
|
|
3345
|
+
return /* @__PURE__ */ jsx40(Fragment12, { children: (runs ?? []).map((run, i) => {
|
|
3346
|
+
if (run.reference) return /* @__PURE__ */ jsx40("span", { children: draw2.renderReference(run.reference, run) }, i);
|
|
3201
3347
|
if (run.marks.includes("code")) {
|
|
3202
|
-
return /* @__PURE__ */
|
|
3348
|
+
return /* @__PURE__ */ jsx40("code", { children: run.text }, i);
|
|
3203
3349
|
}
|
|
3204
|
-
let node = run.text.split("\n").map((line, j) => /* @__PURE__ */
|
|
3205
|
-
j > 0 && /* @__PURE__ */
|
|
3350
|
+
let node = run.text.split("\n").map((line, j) => /* @__PURE__ */ jsxs32("span", { children: [
|
|
3351
|
+
j > 0 && /* @__PURE__ */ jsx40("br", {}),
|
|
3206
3352
|
textWithLinks(line, draw2.renderText)
|
|
3207
3353
|
] }, j));
|
|
3208
|
-
if (run.marks.includes("underline")) node = /* @__PURE__ */
|
|
3209
|
-
if (run.marks.includes("italic")) node = /* @__PURE__ */
|
|
3210
|
-
if (run.marks.includes("bold")) node = /* @__PURE__ */
|
|
3211
|
-
return /* @__PURE__ */
|
|
3354
|
+
if (run.marks.includes("underline")) node = /* @__PURE__ */ jsx40("u", { children: node });
|
|
3355
|
+
if (run.marks.includes("italic")) node = /* @__PURE__ */ jsx40("em", { children: node });
|
|
3356
|
+
if (run.marks.includes("bold")) node = /* @__PURE__ */ jsx40("strong", { children: node });
|
|
3357
|
+
return /* @__PURE__ */ jsx40("span", { children: node }, i);
|
|
3212
3358
|
}) });
|
|
3213
3359
|
}
|
|
3214
3360
|
var named = (block) => block.typeName ?? block.type;
|
|
@@ -3219,18 +3365,18 @@ function Table({ block, draw: draw2 }) {
|
|
|
3219
3365
|
const header = named(cell) === "tableHeader";
|
|
3220
3366
|
const Cell = header ? "th" : "td";
|
|
3221
3367
|
const { colspan, rowspan } = cell.attrs ?? {};
|
|
3222
|
-
return /* @__PURE__ */
|
|
3368
|
+
return /* @__PURE__ */ jsxs32(
|
|
3223
3369
|
Cell,
|
|
3224
3370
|
{
|
|
3225
3371
|
"data-block-id": cell.id,
|
|
3226
3372
|
colSpan: colspan && colspan > 1 ? colspan : void 0,
|
|
3227
3373
|
rowSpan: rowspan && rowspan > 1 ? rowspan : void 0,
|
|
3228
3374
|
children: [
|
|
3229
|
-
(cell.children ?? []).map((child, j) => /* @__PURE__ */
|
|
3230
|
-
/* @__PURE__ */
|
|
3375
|
+
(cell.children ?? []).map((child, j) => /* @__PURE__ */ jsxs32(Fragment11, { children: [
|
|
3376
|
+
/* @__PURE__ */ jsx40(Runs, { runs: child.inline, draw: draw2 }),
|
|
3231
3377
|
draw2.renderAfter?.(child)
|
|
3232
3378
|
] }, j)),
|
|
3233
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsx40(Runs, { runs: cell.inline, draw: draw2 }),
|
|
3234
3380
|
draw2.renderAfter?.(cell)
|
|
3235
3381
|
]
|
|
3236
3382
|
},
|
|
@@ -3239,16 +3385,16 @@ function Table({ block, draw: draw2 }) {
|
|
|
3239
3385
|
});
|
|
3240
3386
|
const first = rows[0].children ?? [];
|
|
3241
3387
|
const headerRow = first.length > 0 && first.every((cell) => named(cell) === "tableHeader");
|
|
3242
|
-
return /* @__PURE__ */
|
|
3243
|
-
headerRow && /* @__PURE__ */
|
|
3244
|
-
/* @__PURE__ */
|
|
3388
|
+
return /* @__PURE__ */ jsxs32("table", { "data-block-id": block.id, children: [
|
|
3389
|
+
headerRow && /* @__PURE__ */ jsx40("thead", { children: /* @__PURE__ */ jsx40("tr", { "data-block-id": rows[0].id, children: cells(rows[0]) }) }),
|
|
3390
|
+
/* @__PURE__ */ jsx40("tbody", { children: (headerRow ? rows.slice(1) : rows).map((row, i) => /* @__PURE__ */ jsx40("tr", { "data-block-id": row.id, children: cells(row) }, row.id ?? i)) })
|
|
3245
3391
|
] });
|
|
3246
3392
|
}
|
|
3247
3393
|
var wordsOf = (item) => (item.inline ?? []).map((run) => run.text).join("").trim();
|
|
3248
3394
|
function ListItem({ item, draw: draw2, below }) {
|
|
3249
3395
|
if (typeof item.checked !== "boolean") {
|
|
3250
|
-
return /* @__PURE__ */
|
|
3251
|
-
/* @__PURE__ */
|
|
3396
|
+
return /* @__PURE__ */ jsxs32("li", { "data-block-id": item.id, children: [
|
|
3397
|
+
/* @__PURE__ */ jsx40(Runs, { runs: item.inline, draw: draw2 }),
|
|
3252
3398
|
draw2.renderAfter?.(item),
|
|
3253
3399
|
below
|
|
3254
3400
|
] });
|
|
@@ -3257,10 +3403,10 @@ function ListItem({ item, draw: draw2, below }) {
|
|
|
3257
3403
|
const id = item.id;
|
|
3258
3404
|
const name = wordsOf(item) || "Item";
|
|
3259
3405
|
const control = onTick && id ? (next) => onTick(id, next) : void 0;
|
|
3260
|
-
return /* @__PURE__ */
|
|
3261
|
-
/* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
/* @__PURE__ */
|
|
3406
|
+
return /* @__PURE__ */ jsxs32("li", { "data-block-id": id, "data-checked": String(item.checked), children: [
|
|
3407
|
+
/* @__PURE__ */ jsx40("span", { "data-checklist-box": "", ...control ? {} : { role: "checkbox", "aria-checked": item.checked, "aria-readonly": true, "aria-label": name }, children: /* @__PURE__ */ jsx40(Checkbox, { checked: item.checked, onChange: control, "aria-label": name }) }),
|
|
3408
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
3409
|
+
/* @__PURE__ */ jsx40("p", { children: /* @__PURE__ */ jsx40(Runs, { runs: item.inline, draw: draw2 }) }),
|
|
3264
3410
|
draw2.renderAfter?.(item),
|
|
3265
3411
|
below
|
|
3266
3412
|
] })
|
|
@@ -3287,51 +3433,51 @@ function Block({ block, draw: draw2 }) {
|
|
|
3287
3433
|
const lineOfWords = block.type === "paragraph" || block.type === "heading" || block.type === "blockquote";
|
|
3288
3434
|
const after = lineOfWords ? draw2.renderAfter?.(block) : void 0;
|
|
3289
3435
|
if (after === void 0 || after === null || after === false) return drawn;
|
|
3290
|
-
return /* @__PURE__ */
|
|
3436
|
+
return /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
3291
3437
|
drawn,
|
|
3292
3438
|
after
|
|
3293
3439
|
] });
|
|
3294
3440
|
}
|
|
3295
3441
|
function Drawn({ block, draw: draw2 }) {
|
|
3296
|
-
const runs = /* @__PURE__ */
|
|
3442
|
+
const runs = /* @__PURE__ */ jsx40(Runs, { runs: block.inline, draw: draw2 });
|
|
3297
3443
|
switch (block.type) {
|
|
3298
3444
|
case "heading": {
|
|
3299
|
-
if (block.level === 1) return /* @__PURE__ */
|
|
3300
|
-
if (block.level === 3) return /* @__PURE__ */
|
|
3301
|
-
return /* @__PURE__ */
|
|
3445
|
+
if (block.level === 1) return /* @__PURE__ */ jsx40("h1", { "data-block-id": block.id, children: runs });
|
|
3446
|
+
if (block.level === 3) return /* @__PURE__ */ jsx40("h3", { "data-block-id": block.id, children: runs });
|
|
3447
|
+
return /* @__PURE__ */ jsx40("h2", { "data-block-id": block.id, children: runs });
|
|
3302
3448
|
}
|
|
3303
3449
|
case "paragraph":
|
|
3304
|
-
return /* @__PURE__ */
|
|
3450
|
+
return /* @__PURE__ */ jsx40("p", { "data-block-id": block.id, children: runs });
|
|
3305
3451
|
case "bulletList":
|
|
3306
3452
|
case "orderedList": {
|
|
3307
3453
|
const ordered = block.type === "orderedList";
|
|
3308
|
-
const items = (nodes) => nodes.map(({ item, key, below }) => /* @__PURE__ */
|
|
3454
|
+
const items = (nodes) => nodes.map(({ item, key, below }) => /* @__PURE__ */ jsx40(
|
|
3309
3455
|
ListItem,
|
|
3310
3456
|
{
|
|
3311
3457
|
item,
|
|
3312
3458
|
draw: draw2,
|
|
3313
|
-
below: below.length > 0 && (ordered ? /* @__PURE__ */
|
|
3459
|
+
below: below.length > 0 && (ordered ? /* @__PURE__ */ jsx40("ol", { children: items(below) }) : /* @__PURE__ */ jsx40("ul", { children: items(below) }))
|
|
3314
3460
|
},
|
|
3315
3461
|
item.id ?? key
|
|
3316
3462
|
));
|
|
3317
3463
|
const top = items(nestItems(block.children ?? []));
|
|
3318
|
-
return ordered ? /* @__PURE__ */
|
|
3464
|
+
return ordered ? /* @__PURE__ */ jsx40("ol", { "data-block-id": block.id, start: block.start, children: top }) : /* @__PURE__ */ jsx40("ul", { "data-block-id": block.id, children: top });
|
|
3319
3465
|
}
|
|
3320
3466
|
case "blockquote":
|
|
3321
|
-
return /* @__PURE__ */
|
|
3467
|
+
return /* @__PURE__ */ jsx40("blockquote", { "data-block-id": block.id, "data-tone": block.tone, "data-callout": typeof block.tone === "string" ? calloutLook(block.tone) : void 0, children: runs });
|
|
3322
3468
|
case "codeBlock":
|
|
3323
|
-
return /* @__PURE__ */
|
|
3469
|
+
return /* @__PURE__ */ jsx40("pre", { "data-block-id": block.id, "data-language": block.language, children: /* @__PURE__ */ jsx40("code", { children: codeColours((block.inline ?? []).map((run) => run.text).join(""), block.language) }) });
|
|
3324
3470
|
case "horizontalRule":
|
|
3325
|
-
return /* @__PURE__ */
|
|
3471
|
+
return /* @__PURE__ */ jsx40("hr", { "data-block-id": block.id });
|
|
3326
3472
|
case "table": {
|
|
3327
|
-
const table = /* @__PURE__ */
|
|
3473
|
+
const table = /* @__PURE__ */ jsx40(Table, { block, draw: draw2 });
|
|
3328
3474
|
if ((block.children ?? []).some((row) => named(row) === "tableRow")) return table;
|
|
3329
3475
|
break;
|
|
3330
3476
|
}
|
|
3331
3477
|
}
|
|
3332
|
-
return /* @__PURE__ */
|
|
3478
|
+
return /* @__PURE__ */ jsxs32("div", { "data-block-id": block.id, "data-block-type": named(block), children: [
|
|
3333
3479
|
runs,
|
|
3334
|
-
(block.children ?? []).map((child, i) => /* @__PURE__ */
|
|
3480
|
+
(block.children ?? []).map((child, i) => /* @__PURE__ */ jsx40(Block, { block: child, draw: draw2 }, child.id ?? i))
|
|
3335
3481
|
] });
|
|
3336
3482
|
}
|
|
3337
3483
|
function RichText({
|
|
@@ -3345,12 +3491,12 @@ function RichText({
|
|
|
3345
3491
|
}) {
|
|
3346
3492
|
if (blocks.length === 0) return null;
|
|
3347
3493
|
const draw2 = { renderText, renderReference, renderBlock, renderAfter, onTick };
|
|
3348
|
-
return /* @__PURE__ */
|
|
3494
|
+
return /* @__PURE__ */ jsx40("div", { "data-rich-text": true, className: richTextClassName(size), children: blocks.map((block, i) => /* @__PURE__ */ jsx40(Block, { block, draw: draw2 }, block.id ?? i)) });
|
|
3349
3495
|
}
|
|
3350
3496
|
|
|
3351
3497
|
// src/KindIcon.tsx
|
|
3352
3498
|
import { IconBox, IconCircleDashed as IconCircleDashed2, IconFile as IconFile2, IconListDetails, IconMessage } from "@tabler/icons-react";
|
|
3353
|
-
import { jsx as
|
|
3499
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
3354
3500
|
var ICONS = {
|
|
3355
3501
|
topic: IconCircleDashed2,
|
|
3356
3502
|
project: IconBox,
|
|
@@ -3373,22 +3519,22 @@ function thingKindOf(eventKind) {
|
|
|
3373
3519
|
var TONE_CLASSES = { secondary: "text-text-secondary", inherit: "" };
|
|
3374
3520
|
function KindIcon({ kind, size = 16, tone = "secondary", className }) {
|
|
3375
3521
|
const Icon = ICONS[kind];
|
|
3376
|
-
return /* @__PURE__ */
|
|
3522
|
+
return /* @__PURE__ */ jsx41(Icon, { size, stroke: 1.5, className: cn("shrink-0", TONE_CLASSES[tone], className), "aria-hidden": true });
|
|
3377
3523
|
}
|
|
3378
3524
|
|
|
3379
3525
|
// src/IdentityMenu.tsx
|
|
3380
3526
|
import { useCallback as useCallback3, useRef as useRef10 } from "react";
|
|
3381
3527
|
|
|
3382
3528
|
// src/Person.tsx
|
|
3383
|
-
import { jsx as
|
|
3529
|
+
import { jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3384
3530
|
function Person({ name, picture, bot, fallback = "\u2014", size = 20, className }) {
|
|
3385
3531
|
return (
|
|
3386
3532
|
// gap-2: the face-to-name distance is one rule (8px) wherever a person
|
|
3387
3533
|
// appears — Katerina, 2026-09-01, set on Person so PersonTrigger and every
|
|
3388
3534
|
// row agree by construction.
|
|
3389
|
-
/* @__PURE__ */
|
|
3390
|
-
/* @__PURE__ */
|
|
3391
|
-
/* @__PURE__ */
|
|
3535
|
+
/* @__PURE__ */ jsxs33("span", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
3536
|
+
/* @__PURE__ */ jsx42(Avatar, { name, src: picture, bot, size }),
|
|
3537
|
+
/* @__PURE__ */ jsx42("span", { className: cn("truncate", !name && "text-text-muted"), children: name ?? fallback })
|
|
3392
3538
|
] })
|
|
3393
3539
|
);
|
|
3394
3540
|
}
|
|
@@ -3396,10 +3542,10 @@ function Person({ name, picture, bot, fallback = "\u2014", size = 20, className
|
|
|
3396
3542
|
// src/PersonTrigger.tsx
|
|
3397
3543
|
import { Button as BaseButton7 } from "@base-ui/react/button";
|
|
3398
3544
|
import { IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
|
|
3399
|
-
import { jsx as
|
|
3545
|
+
import { jsx as jsx43, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3400
3546
|
function PersonTrigger({ name, picture, bot, fallback, size, open = false, compact = false, className, ...props }) {
|
|
3401
3547
|
if (compact) {
|
|
3402
|
-
return /* @__PURE__ */
|
|
3548
|
+
return /* @__PURE__ */ jsx43(
|
|
3403
3549
|
BaseButton7,
|
|
3404
3550
|
{
|
|
3405
3551
|
type: "button",
|
|
@@ -3408,13 +3554,13 @@ function PersonTrigger({ name, picture, bot, fallback, size, open = false, compa
|
|
|
3408
3554
|
"aria-label": props["aria-label"] ?? name ?? fallback,
|
|
3409
3555
|
className: cn("cursor-pointer rounded-full", className),
|
|
3410
3556
|
...props,
|
|
3411
|
-
children: /* @__PURE__ */
|
|
3557
|
+
children: /* @__PURE__ */ jsx43(Avatar, { name, src: picture, bot, size: size ?? 36 })
|
|
3412
3558
|
}
|
|
3413
3559
|
);
|
|
3414
3560
|
}
|
|
3415
3561
|
return (
|
|
3416
3562
|
// @estiva-escape(no-copied-look): N5 (Katerina, 24 September: record only): a row that fills on hover, as NavItem also does
|
|
3417
|
-
/* @__PURE__ */
|
|
3563
|
+
/* @__PURE__ */ jsxs34(
|
|
3418
3564
|
BaseButton7,
|
|
3419
3565
|
{
|
|
3420
3566
|
type: "button",
|
|
@@ -3432,8 +3578,8 @@ function PersonTrigger({ name, picture, bot, fallback, size, open = false, compa
|
|
|
3432
3578
|
),
|
|
3433
3579
|
...props,
|
|
3434
3580
|
children: [
|
|
3435
|
-
/* @__PURE__ */
|
|
3436
|
-
/* @__PURE__ */
|
|
3581
|
+
/* @__PURE__ */ jsx43(Person, { name, picture, bot, fallback, size: size ?? 22 }),
|
|
3582
|
+
/* @__PURE__ */ jsx43(IconChevronDown3, { size: 14, stroke: 1.5, className: "shrink-0 text-text-muted" })
|
|
3437
3583
|
]
|
|
3438
3584
|
}
|
|
3439
3585
|
)
|
|
@@ -3441,10 +3587,10 @@ function PersonTrigger({ name, picture, bot, fallback, size, open = false, compa
|
|
|
3441
3587
|
}
|
|
3442
3588
|
|
|
3443
3589
|
// src/IdentityMenu.tsx
|
|
3444
|
-
import { Fragment as
|
|
3590
|
+
import { Fragment as Fragment13, jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3445
3591
|
function IdentityPanel({ className, onClose = () => {
|
|
3446
3592
|
}, ...rest }) {
|
|
3447
|
-
return /* @__PURE__ */
|
|
3593
|
+
return /* @__PURE__ */ jsx44(MenuPanel, { className: cn("w-72", className), children: /* @__PURE__ */ jsx44(IdentityRows, { ...rest, onClose }) });
|
|
3448
3594
|
}
|
|
3449
3595
|
function IdentityRows({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, onClose, children }) {
|
|
3450
3596
|
const act = (action) => () => {
|
|
@@ -3452,36 +3598,36 @@ function IdentityRows({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, on
|
|
|
3452
3598
|
action();
|
|
3453
3599
|
};
|
|
3454
3600
|
const appRows = typeof children === "function" ? children(onClose) : children;
|
|
3455
|
-
return /* @__PURE__ */
|
|
3456
|
-
/* @__PURE__ */
|
|
3457
|
-
/* @__PURE__ */
|
|
3458
|
-
/* @__PURE__ */
|
|
3459
|
-
me.email && /* @__PURE__ */
|
|
3601
|
+
return /* @__PURE__ */ jsxs35(Fragment13, { children: [
|
|
3602
|
+
/* @__PURE__ */ jsxs35(MenuSection, { label: signedIn ? "Signed in as" : "Acting as", children: [
|
|
3603
|
+
/* @__PURE__ */ jsx44(MenuRow, { children: /* @__PURE__ */ jsx44("div", { className: "flex min-w-0 text-body-2-strong", children: /* @__PURE__ */ jsx44(Person, { name: me.name, picture: me.picture, fallback: "Anonymous", size: 28 }) }) }),
|
|
3604
|
+
/* @__PURE__ */ jsx44(Note, { children: signedIn ? "Your Estiva ID. The same person you are in every Estiva app." : "A key held by this browser only. Nobody else knows who you are." }),
|
|
3605
|
+
me.email && /* @__PURE__ */ jsxs35(Note, { children: [
|
|
3460
3606
|
me.email,
|
|
3461
3607
|
" \xB7 known to Estiva, never published to the relay"
|
|
3462
3608
|
] })
|
|
3463
3609
|
] }),
|
|
3464
|
-
relayUrl && /* @__PURE__ */
|
|
3465
|
-
/* @__PURE__ */
|
|
3466
|
-
/* @__PURE__ */
|
|
3467
|
-
/* @__PURE__ */
|
|
3468
|
-
/* @__PURE__ */
|
|
3610
|
+
relayUrl && /* @__PURE__ */ jsxs35(Fragment13, { children: [
|
|
3611
|
+
/* @__PURE__ */ jsx44(Divider, { className: "mx-0 my-2" }),
|
|
3612
|
+
/* @__PURE__ */ jsxs35(MenuSection, { label: "Workspace", children: [
|
|
3613
|
+
/* @__PURE__ */ jsx44(MenuRow, { children: /* @__PURE__ */ jsx44("span", { className: "break-all font-mono text-caption text-text-primary", children: relayUrl }) }),
|
|
3614
|
+
/* @__PURE__ */ jsx44(Note, { children: "Everyone on this relay shares this workspace, in every app." })
|
|
3469
3615
|
] })
|
|
3470
3616
|
] }),
|
|
3471
|
-
appRows && /* @__PURE__ */
|
|
3472
|
-
/* @__PURE__ */
|
|
3617
|
+
appRows && /* @__PURE__ */ jsxs35(Fragment13, { children: [
|
|
3618
|
+
/* @__PURE__ */ jsx44(Divider, { className: "mx-0 my-2" }),
|
|
3473
3619
|
appRows
|
|
3474
3620
|
] }),
|
|
3475
|
-
signedIn && idBase || onCopyKey || idBase && onSignOut ? /* @__PURE__ */
|
|
3476
|
-
signedIn && idBase && /* @__PURE__ */
|
|
3621
|
+
signedIn && idBase || onCopyKey || idBase && onSignOut ? /* @__PURE__ */ jsx44(Divider, { className: "mx-0 my-2" }) : null,
|
|
3622
|
+
signedIn && idBase && /* @__PURE__ */ jsx44(
|
|
3477
3623
|
MenuItem,
|
|
3478
3624
|
{
|
|
3479
3625
|
label: "Edit your profile in Estiva ID",
|
|
3480
3626
|
onClick: act(() => window.open(idBase, "_blank", "noopener,noreferrer"))
|
|
3481
3627
|
}
|
|
3482
3628
|
),
|
|
3483
|
-
onCopyKey && /* @__PURE__ */
|
|
3484
|
-
idBase && onSignOut && /* @__PURE__ */
|
|
3629
|
+
onCopyKey && /* @__PURE__ */ jsx44(MenuItem, { label: "Copy public key", onClick: act(onCopyKey) }),
|
|
3630
|
+
idBase && onSignOut && /* @__PURE__ */ jsx44(MenuItem, { label: "Sign out", onClick: act(onSignOut) })
|
|
3485
3631
|
] });
|
|
3486
3632
|
}
|
|
3487
3633
|
function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, compact = false, className, children }) {
|
|
@@ -3492,13 +3638,13 @@ function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, co
|
|
|
3492
3638
|
to be `relative`, because the panel was positioned against it; the panel
|
|
3493
3639
|
hangs from the trigger and portals now, so a positioning context here
|
|
3494
3640
|
would only be a lie about what this box does. */
|
|
3495
|
-
/* @__PURE__ */
|
|
3641
|
+
/* @__PURE__ */ jsx44("div", { className, children: /* @__PURE__ */ jsx44(
|
|
3496
3642
|
Menu,
|
|
3497
3643
|
{
|
|
3498
3644
|
align: "right",
|
|
3499
3645
|
actionsRef: actions,
|
|
3500
3646
|
className: "w-72",
|
|
3501
|
-
trigger: /* @__PURE__ */
|
|
3647
|
+
trigger: /* @__PURE__ */ jsx44(
|
|
3502
3648
|
PersonTrigger,
|
|
3503
3649
|
{
|
|
3504
3650
|
name: me.name,
|
|
@@ -3509,7 +3655,7 @@ function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, co
|
|
|
3509
3655
|
"aria-label": compact ? "Account menu" : void 0
|
|
3510
3656
|
}
|
|
3511
3657
|
),
|
|
3512
|
-
children: /* @__PURE__ */
|
|
3658
|
+
children: /* @__PURE__ */ jsx44(
|
|
3513
3659
|
IdentityRows,
|
|
3514
3660
|
{
|
|
3515
3661
|
me,
|
|
@@ -3527,14 +3673,14 @@ function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, co
|
|
|
3527
3673
|
);
|
|
3528
3674
|
}
|
|
3529
3675
|
function Note({ children }) {
|
|
3530
|
-
return /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ jsx44("span", { className: "px-2 pb-1.5 text-caption text-text-secondary", children });
|
|
3531
3677
|
}
|
|
3532
3678
|
|
|
3533
3679
|
// src/FilePicker.tsx
|
|
3534
3680
|
import { forwardRef } from "react";
|
|
3535
|
-
import { jsx as
|
|
3681
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
3536
3682
|
var FilePicker = forwardRef(function FilePicker2({ onPick, ...props }, ref) {
|
|
3537
|
-
return /* @__PURE__ */
|
|
3683
|
+
return /* @__PURE__ */ jsx45(
|
|
3538
3684
|
"input",
|
|
3539
3685
|
{
|
|
3540
3686
|
ref,
|
|
@@ -3555,9 +3701,9 @@ var FilePicker = forwardRef(function FilePicker2({ onPick, ...props }, ref) {
|
|
|
3555
3701
|
// src/TextInput.tsx
|
|
3556
3702
|
import { forwardRef as forwardRef2 } from "react";
|
|
3557
3703
|
import { Input } from "@base-ui/react/input";
|
|
3558
|
-
import { jsx as
|
|
3704
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3559
3705
|
var TextInput = forwardRef2(function TextInput2({ className, type = "text", size = "default", ...props }, ref) {
|
|
3560
|
-
return /* @__PURE__ */
|
|
3706
|
+
return /* @__PURE__ */ jsx46(
|
|
3561
3707
|
Input,
|
|
3562
3708
|
{
|
|
3563
3709
|
ref,
|
|
@@ -3583,13 +3729,13 @@ var TextInput = forwardRef2(function TextInput2({ className, type = "text", size
|
|
|
3583
3729
|
// src/Textarea.tsx
|
|
3584
3730
|
import { forwardRef as forwardRef3 } from "react";
|
|
3585
3731
|
import { Field as BaseField3 } from "@base-ui/react/field";
|
|
3586
|
-
import { jsx as
|
|
3732
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3587
3733
|
var Textarea = forwardRef3(function Textarea2({ className, ...props }, ref) {
|
|
3588
|
-
return /* @__PURE__ */
|
|
3734
|
+
return /* @__PURE__ */ jsx47(
|
|
3589
3735
|
BaseField3.Control,
|
|
3590
3736
|
{
|
|
3591
3737
|
ref,
|
|
3592
|
-
render: /* @__PURE__ */
|
|
3738
|
+
render: /* @__PURE__ */ jsx47("textarea", {}),
|
|
3593
3739
|
className: cn(
|
|
3594
3740
|
// The border strengthens on hover, as Select's and ChipInput's do (Katerina, 16 September:
|
|
3595
3741
|
// "aren't there hover states in text input and text area?"). Focus comes after hover in
|
|
@@ -3609,7 +3755,7 @@ var Textarea = forwardRef3(function Textarea2({ className, ...props }, ref) {
|
|
|
3609
3755
|
|
|
3610
3756
|
// src/ConfirmDialog.tsx
|
|
3611
3757
|
import { useRef as useRef11, useState as useState12 } from "react";
|
|
3612
|
-
import { Fragment as
|
|
3758
|
+
import { Fragment as Fragment14, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3613
3759
|
function ConfirmDialog({ title, children, confirmLabel, destructive = false, onConfirm, onClose, alternative, refused }) {
|
|
3614
3760
|
const [busy, setBusy] = useState12(false);
|
|
3615
3761
|
const closed = useRef11(false);
|
|
@@ -3627,22 +3773,22 @@ function ConfirmDialog({ title, children, confirmLabel, destructive = false, onC
|
|
|
3627
3773
|
setBusy(false);
|
|
3628
3774
|
}
|
|
3629
3775
|
};
|
|
3630
|
-
return /* @__PURE__ */
|
|
3776
|
+
return /* @__PURE__ */ jsx48(
|
|
3631
3777
|
DialogShell,
|
|
3632
3778
|
{
|
|
3633
3779
|
alert: true,
|
|
3634
3780
|
title,
|
|
3635
3781
|
onClose: close,
|
|
3636
|
-
footer: /* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
/* @__PURE__ */
|
|
3782
|
+
footer: /* @__PURE__ */ jsxs36(Fragment14, { children: [
|
|
3783
|
+
/* @__PURE__ */ jsx48(Button, { variant: "muted", onClick: close, disabled: busy, children: "Cancel" }),
|
|
3784
|
+
/* @__PURE__ */ jsx48(Button, { variant: destructive ? "destructive" : "primary", onClick: () => void confirm(), disabled: busy, children: confirmLabel })
|
|
3639
3785
|
] }),
|
|
3640
|
-
children: /* @__PURE__ */
|
|
3786
|
+
children: /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-3 text-body-2 text-text-primary", children: [
|
|
3641
3787
|
children,
|
|
3642
|
-
refused && /* @__PURE__ */
|
|
3643
|
-
alternative && /* @__PURE__ */
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
/* @__PURE__ */
|
|
3788
|
+
refused && /* @__PURE__ */ jsx48(FieldLine, { tone: "error", children: refused }),
|
|
3789
|
+
alternative && /* @__PURE__ */ jsxs36("div", { className: "flex flex-col items-start gap-2", children: [
|
|
3790
|
+
/* @__PURE__ */ jsx48("p", { children: alternative.sentence }),
|
|
3791
|
+
/* @__PURE__ */ jsx48(Button, { variant: "outlined", size: "small", onClick: alternative.onClick, disabled: busy, children: alternative.label })
|
|
3646
3792
|
] })
|
|
3647
3793
|
] })
|
|
3648
3794
|
}
|
|
@@ -3654,10 +3800,10 @@ import { useEffect as useEffect7, useRef as useRef12, useState as useState13 } f
|
|
|
3654
3800
|
import { Field as BaseField4 } from "@base-ui/react/field";
|
|
3655
3801
|
import { Input as Input2 } from "@base-ui/react/input";
|
|
3656
3802
|
import { IconPencil, IconPlus } from "@tabler/icons-react";
|
|
3657
|
-
import { Fragment as
|
|
3803
|
+
import { Fragment as Fragment15, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3658
3804
|
var saved = (answer) => answer === true || typeof answer === "object" && answer.kind !== "error";
|
|
3659
3805
|
function EditableText(props) {
|
|
3660
|
-
return props.manner === "buttons" ? /* @__PURE__ */
|
|
3806
|
+
return props.manner === "buttons" ? /* @__PURE__ */ jsx49(WithButtons, { ...props }) : /* @__PURE__ */ jsx49(Inline, { ...props });
|
|
3661
3807
|
}
|
|
3662
3808
|
function Inline({ value, display, displayNode, placeholder, onCommit, multiline = false, className, label, readOnly = false }) {
|
|
3663
3809
|
const [editing, setEditing] = useState13(false);
|
|
@@ -3716,7 +3862,7 @@ function Inline({ value, display, displayNode, placeholder, onCommit, multiline
|
|
|
3716
3862
|
written and never read. Read-only, this is a line of text: whatever
|
|
3717
3863
|
names the region around it (a `Field`, a `Property`) names this too.
|
|
3718
3864
|
*/
|
|
3719
|
-
/* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ jsx49(
|
|
3720
3866
|
"div",
|
|
3721
3867
|
{
|
|
3722
3868
|
className: cn("w-full px-2 py-1", multiline && !displayNode && "whitespace-pre-wrap", display ?? value ? "text-text-primary" : "text-text-muted", className),
|
|
@@ -3726,11 +3872,11 @@ function Inline({ value, display, displayNode, placeholder, onCommit, multiline
|
|
|
3726
3872
|
);
|
|
3727
3873
|
}
|
|
3728
3874
|
if (editing) {
|
|
3729
|
-
return multiline ? /* @__PURE__ */
|
|
3875
|
+
return multiline ? /* @__PURE__ */ jsx49(
|
|
3730
3876
|
BaseField4.Control,
|
|
3731
3877
|
{
|
|
3732
3878
|
ref: fieldRef,
|
|
3733
|
-
render: /* @__PURE__ */
|
|
3879
|
+
render: /* @__PURE__ */ jsx49("textarea", { rows: 4 }),
|
|
3734
3880
|
"aria-label": label,
|
|
3735
3881
|
value: draft,
|
|
3736
3882
|
disabled: busy,
|
|
@@ -3739,7 +3885,7 @@ function Inline({ value, display, displayNode, placeholder, onCommit, multiline
|
|
|
3739
3885
|
onBlur: () => void commit(),
|
|
3740
3886
|
className: fieldClass
|
|
3741
3887
|
}
|
|
3742
|
-
) : /* @__PURE__ */
|
|
3888
|
+
) : /* @__PURE__ */ jsx49(
|
|
3743
3889
|
Input2,
|
|
3744
3890
|
{
|
|
3745
3891
|
ref: fieldRef,
|
|
@@ -3753,7 +3899,7 @@ function Inline({ value, display, displayNode, placeholder, onCommit, multiline
|
|
|
3753
3899
|
}
|
|
3754
3900
|
);
|
|
3755
3901
|
}
|
|
3756
|
-
return /* @__PURE__ */
|
|
3902
|
+
return /* @__PURE__ */ jsx49(
|
|
3757
3903
|
"button",
|
|
3758
3904
|
{
|
|
3759
3905
|
type: "button",
|
|
@@ -3825,22 +3971,22 @@ function WithButtons({
|
|
|
3825
3971
|
setDraft(next);
|
|
3826
3972
|
if (outcome?.kind === "error") setOutcome(null);
|
|
3827
3973
|
};
|
|
3828
|
-
const line = outcome && /* @__PURE__ */
|
|
3974
|
+
const line = outcome && /* @__PURE__ */ jsx49(FieldLine, { tone: outcome.kind, children: outcome.message });
|
|
3829
3975
|
if (editing) {
|
|
3830
|
-
const buttons = /* @__PURE__ */
|
|
3831
|
-
/* @__PURE__ */
|
|
3832
|
-
/* @__PURE__ */
|
|
3976
|
+
const buttons = /* @__PURE__ */ jsxs37(Fragment15, { children: [
|
|
3977
|
+
/* @__PURE__ */ jsx49(Button, { variant: "primary", size: "small", type: "submit", disabled: !canSave || busy, children: busy ? "Saving\u2026" : "Save" }),
|
|
3978
|
+
/* @__PURE__ */ jsx49(Button, { variant: "outlined", size: "small", onClick: cancel, children: "Cancel" })
|
|
3833
3979
|
] });
|
|
3834
3980
|
return (
|
|
3835
3981
|
// The package Form: Enter in the one-line field saves, Ctrl+Enter from the text area; it locks while saving.
|
|
3836
|
-
/* @__PURE__ */
|
|
3837
|
-
multiline ? /* @__PURE__ */
|
|
3838
|
-
/* @__PURE__ */
|
|
3982
|
+
/* @__PURE__ */ jsxs37(Form, { busy, onSubmit: save, layout: "free", className: cn("flex flex-col gap-2", className), children: [
|
|
3983
|
+
multiline ? /* @__PURE__ */ jsxs37(Fragment15, { children: [
|
|
3984
|
+
/* @__PURE__ */ jsx49(Textarea, { autoFocus: true, rows: 4, value: draft, onChange: (event) => type(event.target.value), "aria-label": label, placeholder: fieldPlaceholder, onKeyDown }),
|
|
3839
3985
|
draftNote?.(draft),
|
|
3840
|
-
/* @__PURE__ */
|
|
3841
|
-
] }) : /* @__PURE__ */
|
|
3842
|
-
/* @__PURE__ */
|
|
3843
|
-
/* @__PURE__ */
|
|
3986
|
+
/* @__PURE__ */ jsx49("div", { className: "flex items-center gap-2", children: buttons })
|
|
3987
|
+
] }) : /* @__PURE__ */ jsxs37(Fragment15, { children: [
|
|
3988
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2", children: [
|
|
3989
|
+
/* @__PURE__ */ jsx49(TextInput, { autoFocus: true, value: draft, onChange: (event) => type(event.target.value), "aria-label": label, placeholder: fieldPlaceholder, onKeyDown }),
|
|
3844
3990
|
buttons
|
|
3845
3991
|
] }),
|
|
3846
3992
|
draftNote?.(draft)
|
|
@@ -3850,18 +3996,18 @@ function WithButtons({
|
|
|
3850
3996
|
);
|
|
3851
3997
|
}
|
|
3852
3998
|
const shown2 = display ?? value;
|
|
3853
|
-
return /* @__PURE__ */
|
|
3854
|
-
/* @__PURE__ */
|
|
3999
|
+
return /* @__PURE__ */ jsxs37("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
4000
|
+
/* @__PURE__ */ jsxs37("div", { className: cn("flex gap-2", multiline ? "items-start" : "items-center"), children: [
|
|
3855
4001
|
!shown2 ? (
|
|
3856
4002
|
// Nothing yet: the kit's empty line for one part of a page, 12px and muted, as Peek's "No summary yet." (2 November).
|
|
3857
|
-
/* @__PURE__ */
|
|
3858
|
-
) : multiline ? /* @__PURE__ */
|
|
3859
|
-
!readOnly && /* @__PURE__ */
|
|
4003
|
+
/* @__PURE__ */ jsx49(EmptyState, { scope: "section", message: placeholder, className: "min-w-0 flex-1" })
|
|
4004
|
+
) : multiline ? /* @__PURE__ */ jsx49("p", { className: "min-w-0 flex-1 break-words text-body-2 text-text-primary", children: displayNode ?? shown2 }) : /* @__PURE__ */ jsx49("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-primary", children: displayNode ?? shown2 }),
|
|
4005
|
+
!readOnly && /* @__PURE__ */ jsx49(
|
|
3860
4006
|
Button,
|
|
3861
4007
|
{
|
|
3862
4008
|
variant: "outlined",
|
|
3863
4009
|
size: "small",
|
|
3864
|
-
leadingIcon: value || !addLabel ? /* @__PURE__ */
|
|
4010
|
+
leadingIcon: value || !addLabel ? /* @__PURE__ */ jsx49(IconPencil, { size: 14, stroke: 1.5 }) : /* @__PURE__ */ jsx49(IconPlus, { size: 14, stroke: 1.5 }),
|
|
3865
4011
|
onClick: open,
|
|
3866
4012
|
children: value || !addLabel ? editLabel : addLabel
|
|
3867
4013
|
}
|
|
@@ -3873,20 +4019,20 @@ function WithButtons({
|
|
|
3873
4019
|
|
|
3874
4020
|
// src/EntryShell.tsx
|
|
3875
4021
|
import { cloneElement as cloneElement2 } from "react";
|
|
3876
|
-
import { jsx as
|
|
4022
|
+
import { jsx as jsx50, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3877
4023
|
var isEmpty = (node) => node == null || node === false || typeof node === "string" && node.trim() === "";
|
|
3878
4024
|
function EntryShell({ logo, busy = false, busyLabel = "Loading", message, action, className }) {
|
|
3879
|
-
return /* @__PURE__ */
|
|
4025
|
+
return /* @__PURE__ */ jsx50("div", { className: cn("min-h-screen bg-bg-base flex items-center justify-center p-6", className), children: busy ? /* @__PURE__ */ jsx50("div", { role: "status", "aria-busy": "true", "aria-label": busyLabel, className: "flex flex-col items-center gap-4", children: cloneElement2(logo, { className: cn(logo.props.className, "animate-skeleton-in animate-pulse") }) }) : /* @__PURE__ */ jsxs38("div", { className: "flex flex-col items-center gap-4", children: [
|
|
3880
4026
|
logo,
|
|
3881
|
-
!isEmpty(message) && /* @__PURE__ */
|
|
3882
|
-
action && /* @__PURE__ */
|
|
4027
|
+
!isEmpty(message) && /* @__PURE__ */ jsx50("p", { role: "status", className: "text-body-2 text-text-secondary max-w-sm text-center", children: message }),
|
|
4028
|
+
action && /* @__PURE__ */ jsx50(Button, { variant: "primary", type: "button", onClick: action.onClick, disabled: action.disabled, children: action.label })
|
|
3883
4029
|
] }) });
|
|
3884
4030
|
}
|
|
3885
4031
|
|
|
3886
4032
|
// src/ErrorBoundary.tsx
|
|
3887
4033
|
import { Component } from "react";
|
|
3888
4034
|
import { IconAlertTriangle as IconAlertTriangle2 } from "@tabler/icons-react";
|
|
3889
|
-
import { jsx as
|
|
4035
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
3890
4036
|
var ErrorBoundary = class extends Component {
|
|
3891
4037
|
state = { hasError: false };
|
|
3892
4038
|
static getDerivedStateFromError() {
|
|
@@ -3897,22 +4043,22 @@ var ErrorBoundary = class extends Component {
|
|
|
3897
4043
|
}
|
|
3898
4044
|
render() {
|
|
3899
4045
|
if (!this.state.hasError) return this.props.children;
|
|
3900
|
-
const message = /* @__PURE__ */
|
|
4046
|
+
const message = /* @__PURE__ */ jsx51(
|
|
3901
4047
|
EmptyState,
|
|
3902
4048
|
{
|
|
3903
|
-
icon: /* @__PURE__ */
|
|
4049
|
+
icon: /* @__PURE__ */ jsx51(IconAlertTriangle2, { size: 16, stroke: 1.5 }),
|
|
3904
4050
|
message: `Something went wrong${this.props.label ? ` in the ${this.props.label}` : ""}. Your data is safe \u2014 try again.`,
|
|
3905
4051
|
action: { label: "Try again", onClick: () => this.setState({ hasError: false }) }
|
|
3906
4052
|
}
|
|
3907
4053
|
);
|
|
3908
4054
|
if (this.props.frame) return this.props.frame(message);
|
|
3909
|
-
return this.props.fallbackClassName ? /* @__PURE__ */
|
|
4055
|
+
return this.props.fallbackClassName ? /* @__PURE__ */ jsx51("div", { className: this.props.fallbackClassName, children: message }) : message;
|
|
3910
4056
|
}
|
|
3911
4057
|
};
|
|
3912
4058
|
|
|
3913
4059
|
// src/ProgressBar.tsx
|
|
3914
4060
|
import { Progress } from "@base-ui/react/progress";
|
|
3915
|
-
import { jsx as
|
|
4061
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3916
4062
|
var TRACK_CLASSES = {
|
|
3917
4063
|
default: "h-1.5 w-full overflow-hidden rounded-full bg-bg-inset",
|
|
3918
4064
|
// 4px, Katerina's ruling of 14 September; Peek's own bar is 3px until it takes this one.
|
|
@@ -3925,13 +4071,13 @@ var INDICATOR_CLASSES = {
|
|
|
3925
4071
|
function ProgressBar({ value, max, label, variant = "default", className }) {
|
|
3926
4072
|
return (
|
|
3927
4073
|
// `max={0}` needs no guard: Base UI reads the 0/0 share as an empty bar.
|
|
3928
|
-
/* @__PURE__ */
|
|
4074
|
+
/* @__PURE__ */ jsx52(Progress.Root, { value, max, "aria-label": label, className, children: /* @__PURE__ */ jsx52(Progress.Track, { className: TRACK_CLASSES[variant], children: /* @__PURE__ */ jsx52(Progress.Indicator, { className: INDICATOR_CLASSES[variant] }) }) })
|
|
3929
4075
|
);
|
|
3930
4076
|
}
|
|
3931
4077
|
|
|
3932
4078
|
// src/Breadcrumb.tsx
|
|
3933
|
-
import { Fragment as
|
|
3934
|
-
import { jsx as
|
|
4079
|
+
import { Fragment as Fragment16, useCallback as useCallback4, useLayoutEffect as useLayoutEffect4, useRef as useRef13, useState as useState14 } from "react";
|
|
4080
|
+
import { jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3935
4081
|
function Breadcrumb({ items, className }) {
|
|
3936
4082
|
const navRef = useRef13(null);
|
|
3937
4083
|
const labelRefs = useRef13([]);
|
|
@@ -3951,7 +4097,7 @@ function Breadcrumb({ items, className }) {
|
|
|
3951
4097
|
observer.observe(nav);
|
|
3952
4098
|
return () => observer.disconnect();
|
|
3953
4099
|
}, [measure, items]);
|
|
3954
|
-
return /* @__PURE__ */
|
|
4100
|
+
return /* @__PURE__ */ jsx53("nav", { ref: navRef, "aria-label": "Breadcrumb", className: cn("flex min-w-0 items-center gap-1.5 text-body-2", className), children: items.map((item, index) => {
|
|
3955
4101
|
const last = index === items.length - 1;
|
|
3956
4102
|
const tone = item.muted || last && item.mono ? "text-text-muted" : last ? "text-text-primary" : "text-text-secondary";
|
|
3957
4103
|
const text = cn(
|
|
@@ -3972,16 +4118,16 @@ function Breadcrumb({ items, className }) {
|
|
|
3972
4118
|
// on a box around it, which the link takes them from, rather than
|
|
3973
4119
|
// pushed into it (UIG-9); the link is still the one element that
|
|
3974
4120
|
// truncates and is measured.
|
|
3975
|
-
/* @__PURE__ */
|
|
3976
|
-
) : /* @__PURE__ */
|
|
3977
|
-
return /* @__PURE__ */
|
|
3978
|
-
index > 0 && /* @__PURE__ */
|
|
3979
|
-
item.icon && /* @__PURE__ */
|
|
4121
|
+
/* @__PURE__ */ jsx53("span", { className: cn("flex min-w-0", item.mono && "shrink-0 font-mono text-caption", tone, "hover:text-text-primary"), children: /* @__PURE__ */ jsx53(Link, { ref: setLabelRef, variant: "plain", truncate: true, href: item.href, onClick: item.onClick, children: item.label }) })
|
|
4122
|
+
) : /* @__PURE__ */ jsx53("span", { ref: setLabelRef, className: text, "aria-current": last ? "page" : void 0, children: item.label });
|
|
4123
|
+
return /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
4124
|
+
index > 0 && /* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: "shrink-0 text-text-muted", children: "/" }),
|
|
4125
|
+
item.icon && /* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: cn("flex shrink-0", tone), children: item.icon }),
|
|
3980
4126
|
truncated.has(index) ? (
|
|
3981
4127
|
// `min-w-0 shrink` undoes the wrapper's own shrink-0 — the crumb
|
|
3982
4128
|
// must keep truncating inside it, or wrapping it would widen the
|
|
3983
4129
|
// trail and the tooltip would never be needed again.
|
|
3984
|
-
/* @__PURE__ */
|
|
4130
|
+
/* @__PURE__ */ jsx53(WithTooltip, { label: item.label, wrapperClassName: "min-w-0 shrink", children: crumb })
|
|
3985
4131
|
) : crumb
|
|
3986
4132
|
] }, `${item.label}-${index}`);
|
|
3987
4133
|
}) });
|
|
@@ -3994,119 +4140,14 @@ import { IconChevronRight as IconChevronRight3, IconDotsVertical as IconDotsVert
|
|
|
3994
4140
|
|
|
3995
4141
|
// src/UrgentMark.tsx
|
|
3996
4142
|
import { IconAlertSquareRounded } from "@tabler/icons-react";
|
|
3997
|
-
import { jsx as
|
|
4143
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3998
4144
|
function UrgentMark() {
|
|
3999
|
-
return /* @__PURE__ */
|
|
4145
|
+
return /* @__PURE__ */ jsx54("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center", "data-urgent": true, children: /* @__PURE__ */ jsx54("div", { className: "flex items-center rounded-full bg-warning-muted p-0.5 signal:shadow-glow-warning", children: /* @__PURE__ */ jsx54(IconAlertSquareRounded, { size: 12, stroke: 2.5, className: "text-warning-default" }) }) });
|
|
4000
4146
|
}
|
|
4001
4147
|
|
|
4002
4148
|
// src/CollapsibleSection.tsx
|
|
4003
4149
|
import { createContext as createContext7, useContext as useContext7, useEffect as useEffect8, useRef as useRef14, useState as useState15 } from "react";
|
|
4004
4150
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
4005
|
-
|
|
4006
|
-
// src/SectionHeader.tsx
|
|
4007
|
-
import { IconChevronRight as IconChevronRight2, IconDotsVertical } from "@tabler/icons-react";
|
|
4008
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
4009
|
-
import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4010
|
-
function SectionHeader({ title, chevron = false, icon, isExpanded = true, onToggle, trailing, count, actions, menu, menuLabel, showActions = "hover", hover = "fill", look = "heading", render, className }) {
|
|
4011
|
-
const row = look === "row";
|
|
4012
|
-
const acts = actions && actions.length > 0 || menu != null;
|
|
4013
|
-
const trailingClasses = !acts ? "has-[[data-unread]]:-mr-1" : showActions === "hover" && "has-[[data-unread]]:pointer-events-none has-[[data-unread]]:absolute has-[[data-unread]]:inset-y-0 has-[[data-unread]]:right-1 has-[[data-unread]]:w-6 has-[[data-unread]]:justify-center has-[[data-unread]]:transition-opacity group-hover:has-[[data-unread]]:opacity-0 group-has-[:focus-visible]:has-[[data-unread]]:opacity-0 group-has-[[data-section-menu]_[aria-expanded=true]]:has-[[data-unread]]:opacity-0 [@media(hover:none)]:has-[[data-unread]]:opacity-0";
|
|
4014
|
-
const reveal = showActions === "hover" && "opacity-0 transition-opacity group-hover:opacity-100 group-has-[:focus-visible]:opacity-100 has-[[aria-expanded=true]]:opacity-100 [@media(hover:none)]:opacity-100";
|
|
4015
|
-
const titleElement = useRender({
|
|
4016
|
-
render: render ?? (chevron ? /* @__PURE__ */ jsx54("button", { type: "button", onClick: onToggle, "aria-expanded": isExpanded }) : /* @__PURE__ */ jsx54("span", {})),
|
|
4017
|
-
props: {
|
|
4018
|
-
// `text-left`: a button centres its text. `h-full` and `flex-1`: the
|
|
4019
|
-
// whole row up to the actions is the hit target, as it was when the
|
|
4020
|
-
// row itself carried the click.
|
|
4021
|
-
// An icon is a row's: NavItem's 8px after it.
|
|
4022
|
-
className: cn("flex h-full min-w-0 flex-1 items-center text-left", row || chevron || icon != null ? "gap-2" : "gap-1"),
|
|
4023
|
-
children: /* @__PURE__ */ jsxs39(Fragment16, { children: [
|
|
4024
|
-
icon != null ? /* @__PURE__ */ jsxs39("span", { className: "relative flex size-4 shrink-0 items-center justify-center text-text-secondary", children: [
|
|
4025
|
-
/* @__PURE__ */ jsx54("span", { className: cn("flex", chevron && "transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"), children: icon }),
|
|
4026
|
-
chevron && /* @__PURE__ */ jsx54(
|
|
4027
|
-
IconChevronRight2,
|
|
4028
|
-
{
|
|
4029
|
-
size: 16,
|
|
4030
|
-
stroke: 1.5,
|
|
4031
|
-
className: cn("absolute opacity-0 transition-[opacity,transform] duration-150 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100", isExpanded && "rotate-90")
|
|
4032
|
-
}
|
|
4033
|
-
)
|
|
4034
|
-
] }) : chevron && /* @__PURE__ */ jsx54(
|
|
4035
|
-
IconChevronRight2,
|
|
4036
|
-
{
|
|
4037
|
-
size: 16,
|
|
4038
|
-
stroke: 1.5,
|
|
4039
|
-
className: cn("shrink-0 transition-transform duration-150", !row && "text-text-secondary", isExpanded && "rotate-90")
|
|
4040
|
-
}
|
|
4041
|
-
),
|
|
4042
|
-
look === "quiet" ? /* @__PURE__ */ jsx54("span", { className: "min-w-0 truncate text-caption text-text-muted", children: title }) : row ? (
|
|
4043
|
-
// A row's words: NavItem's size and colour, brightening under the pointer with the row.
|
|
4044
|
-
/* @__PURE__ */ jsx54("span", { className: "min-w-0 flex-1 truncate text-body-2", children: title })
|
|
4045
|
-
) : (
|
|
4046
|
-
// One line, as the other looks and a NavItem's label: a Folder named by its id ran onto two (Katerina, 3 November).
|
|
4047
|
-
/* @__PURE__ */ jsx54(SectionLabel, { folds: chevron, truncate: true, children: title })
|
|
4048
|
-
),
|
|
4049
|
-
count != null && /* @__PURE__ */ jsx54("span", { className: cn("ml-1 shrink-0", COUNT_TEXT_CLASSES), children: count })
|
|
4050
|
-
] })
|
|
4051
|
-
}
|
|
4052
|
-
});
|
|
4053
|
-
return /* @__PURE__ */ jsxs39(
|
|
4054
|
-
"div",
|
|
4055
|
-
{
|
|
4056
|
-
className: cn(
|
|
4057
|
-
// `relative`: a dot in the last button's place is placed against the row.
|
|
4058
|
-
"group relative flex h-[32px] shrink-0 items-center gap-1 px-2",
|
|
4059
|
-
!row && "transition-colors",
|
|
4060
|
-
// A row is NavItem's shape and colour: 6px corners, secondary words that brighten on hover.
|
|
4061
|
-
row ? cn(SIDEBAR_ROW_CLASSES, SIDEBAR_ROW_TEXT_CLASSES) : "rounded-lg",
|
|
4062
|
-
// The fill says "this does something": a row with a toggle or actions
|
|
4063
|
-
// lights up, a fixed heading over rows does not (2026-09-09, the
|
|
4064
|
-
// Sidebar's fixed group).
|
|
4065
|
-
// A quiet label never lights up: it is a label; its button does.
|
|
4066
|
-
hover === "fill" && look !== "quiet" && (chevron || acts) && "hover:bg-bg-hover",
|
|
4067
|
-
// While its menu is open the pointer is on the menu, not the row: the
|
|
4068
|
-
// row keeps its hover look, as a NavItem's does.
|
|
4069
|
-
hover === "fill" && look !== "quiet" && menu != null && "has-[[data-section-menu]_[aria-expanded=true]]:bg-bg-hover",
|
|
4070
|
-
className
|
|
4071
|
-
),
|
|
4072
|
-
children: [
|
|
4073
|
-
titleElement,
|
|
4074
|
-
trailing != null && /* @__PURE__ */ jsx54("div", { className: cn("flex shrink-0 items-center", trailingClasses), children: trailing }),
|
|
4075
|
-
acts && /* @__PURE__ */ jsx54(
|
|
4076
|
-
"div",
|
|
4077
|
-
{
|
|
4078
|
-
className: "-mr-1 flex shrink-0 items-center",
|
|
4079
|
-
children: /* @__PURE__ */ jsxs39("div", { className: cn("flex items-center gap-1", reveal), children: [
|
|
4080
|
-
actions?.map(
|
|
4081
|
-
(action) => action.menu != null ? (
|
|
4082
|
-
// `data-section-menu`, as the ⋮ has: the row stays lit while its menu is open.
|
|
4083
|
-
/* @__PURE__ */ jsx54("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx54(
|
|
4084
|
-
Menu,
|
|
4085
|
-
{
|
|
4086
|
-
align: "right",
|
|
4087
|
-
trigger: /* @__PURE__ */ jsx54(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, children: action.icon }),
|
|
4088
|
-
children: action.menu
|
|
4089
|
-
}
|
|
4090
|
-
) }, action.tooltip)
|
|
4091
|
-
) : /* @__PURE__ */ jsx54(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, onClick: action.onClick, children: action.icon }, action.tooltip)
|
|
4092
|
-
),
|
|
4093
|
-
menu != null && /* @__PURE__ */ jsx54("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx54(
|
|
4094
|
-
Menu,
|
|
4095
|
-
{
|
|
4096
|
-
align: "right",
|
|
4097
|
-
trigger: /* @__PURE__ */ jsx54(IconButton, { tooltip: "More options", "aria-label": menuLabel ?? `More options for ${title}`, children: /* @__PURE__ */ jsx54(IconDotsVertical, { size: 16, stroke: 1.5 }) }),
|
|
4098
|
-
children: menu
|
|
4099
|
-
}
|
|
4100
|
-
) })
|
|
4101
|
-
] })
|
|
4102
|
-
}
|
|
4103
|
-
)
|
|
4104
|
-
]
|
|
4105
|
-
}
|
|
4106
|
-
);
|
|
4107
|
-
}
|
|
4108
|
-
|
|
4109
|
-
// src/CollapsibleSection.tsx
|
|
4110
4151
|
import { jsx as jsx55, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4111
4152
|
var OPEN = "open";
|
|
4112
4153
|
var CLOSED = "closed";
|
|
@@ -4147,7 +4188,7 @@ function useRememberedOpen(storageKey, fallback) {
|
|
|
4147
4188
|
};
|
|
4148
4189
|
return [choice ?? fallback, setOpen];
|
|
4149
4190
|
}
|
|
4150
|
-
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 }) {
|
|
4151
4192
|
const [initial] = useState15(defaultOpen);
|
|
4152
4193
|
const [openState, remember] = useRememberedOpen(storageKey, initial);
|
|
4153
4194
|
const open = openProp ?? openState;
|
|
@@ -4158,7 +4199,7 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
4158
4199
|
useOpenFor(openFor, open, setOpen, useContext7(sectionLinked));
|
|
4159
4200
|
const shown2 = open && !pending;
|
|
4160
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: [
|
|
4161
|
-
/* @__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 }) }),
|
|
4162
4203
|
/* @__PURE__ */ jsx55(
|
|
4163
4204
|
Collapsible.Panel,
|
|
4164
4205
|
{
|
|
@@ -4393,10 +4434,14 @@ function NavItem({
|
|
|
4393
4434
|
// at the row, and the menu has no other way in.
|
|
4394
4435
|
/* @__PURE__ */ jsxs42("div", { "data-nav-menu": true, className: cn("absolute inset-y-0 right-1 flex items-center gap-1", "opacity-0 transition-opacity group-hover/nav:opacity-100 group-has-[:focus-visible]/nav:opacity-100 has-[[aria-expanded=true]]:opacity-100 [@media(hover:none)]:opacity-100"), children: [
|
|
4395
4436
|
action && /* @__PURE__ */ jsx58(IconButton, { tooltip: action.tooltip, "aria-label": `${action.tooltip}: ${label}`, onClick: action.onClick, children: action.icon }),
|
|
4396
|
-
menu != null && /*
|
|
4437
|
+
menu != null && /*
|
|
4438
|
+
Toward the page: the menu's left edge under the ⋮, spreading right over what the column sits beside,
|
|
4439
|
+
not back over the list and the rail (Katerina, 16 November). At the screen's edge Base UI shifts it in.
|
|
4440
|
+
*/
|
|
4441
|
+
/* @__PURE__ */ jsx58(
|
|
4397
4442
|
Menu,
|
|
4398
4443
|
{
|
|
4399
|
-
align: "
|
|
4444
|
+
align: "left",
|
|
4400
4445
|
trigger: /* @__PURE__ */ jsx58(IconButton, { tooltip: "More options", "aria-label": name, children: /* @__PURE__ */ jsx58(IconDotsVertical2, { size: 16, stroke: 1.5 }) }),
|
|
4401
4446
|
children: menu
|
|
4402
4447
|
}
|
|
@@ -4497,8 +4542,10 @@ function Group({ group, selected, onSelect, opening, storageKey }) {
|
|
|
4497
4542
|
message: group.message,
|
|
4498
4543
|
loading: group.nodes === null,
|
|
4499
4544
|
trailing: group.trailing,
|
|
4545
|
+
...group.count != null ? { count: group.count } : {},
|
|
4500
4546
|
actions: group.actions,
|
|
4501
4547
|
menu: group.menu,
|
|
4548
|
+
...group.menuLabel != null ? { menuLabel: group.menuLabel } : {},
|
|
4502
4549
|
icon: group.icon,
|
|
4503
4550
|
defaultOpen: group.defaultOpen ?? holds(group.nodes, selected),
|
|
4504
4551
|
open: group.open,
|
|
@@ -4510,7 +4557,7 @@ function Group({ group, selected, onSelect, opening, storageKey }) {
|
|
|
4510
4557
|
}
|
|
4511
4558
|
);
|
|
4512
4559
|
}
|
|
4513
|
-
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 }) {
|
|
4514
4561
|
const timer = useRef16(void 0);
|
|
4515
4562
|
useEffect10(() => () => clearTimeout(timer.current), []);
|
|
4516
4563
|
const [slow, setSlow] = useState18(false);
|
|
@@ -4546,8 +4593,10 @@ function NavTreeSection({ id, title, message, loading = false, pending = false,
|
|
|
4546
4593
|
storageKey,
|
|
4547
4594
|
openFor,
|
|
4548
4595
|
trailing,
|
|
4596
|
+
...count != null ? { count } : {},
|
|
4549
4597
|
actions,
|
|
4550
4598
|
menu,
|
|
4599
|
+
...menuLabel != null ? { menuLabel } : {},
|
|
4551
4600
|
icon,
|
|
4552
4601
|
className: "shrink-0",
|
|
4553
4602
|
contentClassName: "gap-0.5",
|
|
@@ -5876,10 +5925,53 @@ function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
|
5876
5925
|
);
|
|
5877
5926
|
}
|
|
5878
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
|
+
|
|
5879
5971
|
// src/ConversationActions.tsx
|
|
5880
5972
|
import { useState as useState21 } from "react";
|
|
5881
5973
|
import { IconCircleCheck as IconCircleCheck2, IconCircleDashed as IconCircleDashed4, IconMessage2 as IconMessage23, IconMoodPlus } from "@tabler/icons-react";
|
|
5882
|
-
import { Fragment as Fragment20, jsx as
|
|
5974
|
+
import { Fragment as Fragment20, jsx as jsx79, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5883
5975
|
function ConversationActions({ options, onReact, onReply, resolved = false, onResolve, onReopen, onPickerOpenChange, more, className }) {
|
|
5884
5976
|
const [picking, setPicking] = useState21(false);
|
|
5885
5977
|
const [strip, setStrip] = useState21(null);
|
|
@@ -5889,8 +5981,8 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5889
5981
|
};
|
|
5890
5982
|
const resolves = resolved ? onReopen : onResolve;
|
|
5891
5983
|
const answers = !!onReact && !!options || !!onReply;
|
|
5892
|
-
return /* @__PURE__ */
|
|
5893
|
-
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(
|
|
5894
5986
|
Popover,
|
|
5895
5987
|
{
|
|
5896
5988
|
side: "top",
|
|
@@ -5901,8 +5993,8 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5901
5993
|
contentClassName: "p-1",
|
|
5902
5994
|
open: picking,
|
|
5903
5995
|
onOpenChange: setOpen,
|
|
5904
|
-
trigger: /* @__PURE__ */
|
|
5905
|
-
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(
|
|
5906
5998
|
ReactionPicker,
|
|
5907
5999
|
{
|
|
5908
6000
|
options: [...options],
|
|
@@ -5915,13 +6007,13 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5915
6007
|
)
|
|
5916
6008
|
}
|
|
5917
6009
|
),
|
|
5918
|
-
onReply && /* @__PURE__ */
|
|
5919
|
-
resolves && /* @__PURE__ */
|
|
5920
|
-
answers && /* @__PURE__ */
|
|
5921
|
-
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 }) })
|
|
5922
6014
|
] }),
|
|
5923
|
-
more && /* @__PURE__ */
|
|
5924
|
-
(answers || resolves) && /* @__PURE__ */
|
|
6015
|
+
more && /* @__PURE__ */ jsxs58(Fragment20, { children: [
|
|
6016
|
+
(answers || resolves) && /* @__PURE__ */ jsx79(ToolbarSeparator, {}),
|
|
5925
6017
|
more
|
|
5926
6018
|
] })
|
|
5927
6019
|
] }) });
|
|
@@ -5933,31 +6025,31 @@ import { IconArrowNarrowRight, IconCircleCheck as IconCircleCheck4, IconDotsVert
|
|
|
5933
6025
|
|
|
5934
6026
|
// src/ConversationMenu.tsx
|
|
5935
6027
|
import { IconCircleCheck as IconCircleCheck3, IconCircleDashed as IconCircleDashed5, IconDotsVertical as IconDotsVertical4 } from "@tabler/icons-react";
|
|
5936
|
-
import { Fragment as Fragment21, jsx as
|
|
6028
|
+
import { Fragment as Fragment21, jsx as jsx80, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5937
6029
|
function ConversationMenu({ resolved = false, onResolve, onReopen, resolveHint, children, label, onEdit, editLabel = "Edit", after, onDelete, deleteLabel = "Delete", moreLabel = "More actions", open, onOpenChange, trigger }) {
|
|
5938
6030
|
const resolves = resolved ? onReopen : onResolve;
|
|
5939
|
-
const first = (resolves || children) && /* @__PURE__ */
|
|
5940
|
-
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 })),
|
|
5941
6033
|
children
|
|
5942
6034
|
] });
|
|
5943
|
-
const middle = (onEdit || after) && /* @__PURE__ */
|
|
5944
|
-
onEdit && /* @__PURE__ */
|
|
6035
|
+
const middle = (onEdit || after) && /* @__PURE__ */ jsxs59(Fragment21, { children: [
|
|
6036
|
+
onEdit && /* @__PURE__ */ jsx80(MenuItem, { label: editLabel, onClick: onEdit }),
|
|
5945
6037
|
after
|
|
5946
6038
|
] });
|
|
5947
|
-
return /* @__PURE__ */
|
|
6039
|
+
return /* @__PURE__ */ jsxs59(
|
|
5948
6040
|
Menu,
|
|
5949
6041
|
{
|
|
5950
|
-
trigger: trigger ?? /* @__PURE__ */
|
|
6042
|
+
trigger: trigger ?? /* @__PURE__ */ jsx80(IconButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx80(IconDotsVertical4, { size: 16, stroke: 1.5 }) }),
|
|
5951
6043
|
align: "right",
|
|
5952
6044
|
open,
|
|
5953
6045
|
onOpenChange,
|
|
5954
6046
|
className: "w-[244px]",
|
|
5955
6047
|
children: [
|
|
5956
|
-
first && (label ? /* @__PURE__ */
|
|
5957
|
-
first && middle && /* @__PURE__ */
|
|
6048
|
+
first && (label ? /* @__PURE__ */ jsx80(MenuSection, { label, children: first }) : first),
|
|
6049
|
+
first && middle && /* @__PURE__ */ jsx80(MenuSeparator, {}),
|
|
5958
6050
|
middle,
|
|
5959
|
-
onDelete && (first || middle) && /* @__PURE__ */
|
|
5960
|
-
onDelete && /* @__PURE__ */
|
|
6051
|
+
onDelete && (first || middle) && /* @__PURE__ */ jsx80(MenuSeparator, {}),
|
|
6052
|
+
onDelete && /* @__PURE__ */ jsx80(MenuItem, { label: deleteLabel, destructive: true, onClick: onDelete })
|
|
5961
6053
|
]
|
|
5962
6054
|
}
|
|
5963
6055
|
);
|
|
@@ -6050,38 +6142,16 @@ var sendsInLayout = createContext11(null);
|
|
|
6050
6142
|
var repliesDrawn = createContext11(null);
|
|
6051
6143
|
|
|
6052
6144
|
// src/EditedMarker.tsx
|
|
6053
|
-
import { jsx as
|
|
6145
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
6054
6146
|
function EditedMarker({ edited }) {
|
|
6055
6147
|
if (!edited) return null;
|
|
6056
|
-
return /* @__PURE__ */
|
|
6057
|
-
}
|
|
6058
|
-
|
|
6059
|
-
// src/MetaText.tsx
|
|
6060
|
-
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
6061
|
-
var TONE_CLASSES2 = {
|
|
6062
|
-
muted: "text-text-muted",
|
|
6063
|
-
secondary: "text-text-secondary",
|
|
6064
|
-
success: "text-success-default"
|
|
6065
|
-
};
|
|
6066
|
-
function MetaText({ children, tone = "muted", size = "caption", className }) {
|
|
6067
|
-
return /* @__PURE__ */ jsx80(
|
|
6068
|
-
"span",
|
|
6069
|
-
{
|
|
6070
|
-
className: cn(
|
|
6071
|
-
size === "chip" ? "text-chip font-normal" : "text-caption",
|
|
6072
|
-
TONE_CLASSES2[tone],
|
|
6073
|
-
TIME_CLASSES,
|
|
6074
|
-
className
|
|
6075
|
-
),
|
|
6076
|
-
children
|
|
6077
|
-
}
|
|
6078
|
-
);
|
|
6148
|
+
return /* @__PURE__ */ jsx81(WithTooltip, { label: edited, wrapperClassName: "shrink-0", children: /* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-caption text-text-muted", children: "(edited)" }) });
|
|
6079
6149
|
}
|
|
6080
6150
|
|
|
6081
6151
|
// src/ReactionRow.tsx
|
|
6082
6152
|
import { useState as useState23 } from "react";
|
|
6083
6153
|
import { IconMoodPlus as IconMoodPlus2 } from "@tabler/icons-react";
|
|
6084
|
-
import { jsx as
|
|
6154
|
+
import { jsx as jsx82, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6085
6155
|
var NAMED = 8;
|
|
6086
6156
|
var meaningOf = (options, emoji) => options.find((o) => o.emoji === emoji)?.label ?? emoji;
|
|
6087
6157
|
function whoReacted(reaction, nameOf, options, viewer) {
|
|
@@ -6096,7 +6166,7 @@ function whoReacted(reaction, nameOf, options, viewer) {
|
|
|
6096
6166
|
}
|
|
6097
6167
|
function AddReactionButton({ options, onPick, className }) {
|
|
6098
6168
|
const [picking, setPicking] = useState23(false);
|
|
6099
|
-
return /* @__PURE__ */
|
|
6169
|
+
return /* @__PURE__ */ jsx82(
|
|
6100
6170
|
Popover,
|
|
6101
6171
|
{
|
|
6102
6172
|
open: picking,
|
|
@@ -6106,8 +6176,8 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
6106
6176
|
ariaLabel: "Add a reaction",
|
|
6107
6177
|
contentClassName: "p-1",
|
|
6108
6178
|
className: cn("w-auto min-w-0", className),
|
|
6109
|
-
trigger: /* @__PURE__ */
|
|
6110
|
-
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(
|
|
6111
6181
|
ReactionPicker,
|
|
6112
6182
|
{
|
|
6113
6183
|
options: [...options],
|
|
@@ -6124,8 +6194,8 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
6124
6194
|
function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }) {
|
|
6125
6195
|
const shown2 = reactions.filter((r) => r.by.length > 0);
|
|
6126
6196
|
if (shown2.length === 0) return null;
|
|
6127
|
-
return /* @__PURE__ */
|
|
6128
|
-
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(
|
|
6129
6199
|
Reaction,
|
|
6130
6200
|
{
|
|
6131
6201
|
emoji: r.emoji,
|
|
@@ -6136,13 +6206,13 @@ function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }
|
|
|
6136
6206
|
onClick: () => onToggle?.(r.emoji)
|
|
6137
6207
|
}
|
|
6138
6208
|
) }, r.emoji)),
|
|
6139
|
-
onToggle && /* @__PURE__ */
|
|
6209
|
+
onToggle && /* @__PURE__ */ jsx82(AddReactionButton, { options, onPick: onToggle })
|
|
6140
6210
|
] });
|
|
6141
6211
|
}
|
|
6142
6212
|
|
|
6143
6213
|
// src/RepliesRow.tsx
|
|
6144
6214
|
import { IconChevronRight as IconChevronRight4, IconMessage2 as IconMessage24 } from "@tabler/icons-react";
|
|
6145
|
-
import { Fragment as Fragment22, jsx as
|
|
6215
|
+
import { Fragment as Fragment22, jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6146
6216
|
var ROW_CLASSES3 = "flex w-full items-center gap-2 pb-1.5 pl-8 pr-2";
|
|
6147
6217
|
var OPEN_CLASSES = "border-accent-outline bg-accent-wash";
|
|
6148
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";
|
|
@@ -6151,9 +6221,9 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6151
6221
|
const label = `${count} ${count === 1 ? "reply" : "replies"}`;
|
|
6152
6222
|
const fresh = newCount ?? (isNew ? 1 : 0);
|
|
6153
6223
|
const name = newCount ? `${label}, ${newCount} new` : label;
|
|
6154
|
-
const inner = /* @__PURE__ */
|
|
6155
|
-
withFaces && /* @__PURE__ */
|
|
6156
|
-
/* @__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(
|
|
6157
6227
|
IconMessage24,
|
|
6158
6228
|
{
|
|
6159
6229
|
size: 16,
|
|
@@ -6164,9 +6234,9 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6164
6234
|
)
|
|
6165
6235
|
}
|
|
6166
6236
|
),
|
|
6167
|
-
/* @__PURE__ */
|
|
6168
|
-
last && /* @__PURE__ */
|
|
6169
|
-
/* @__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(
|
|
6170
6240
|
IconChevronRight4,
|
|
6171
6241
|
{
|
|
6172
6242
|
size: 12,
|
|
@@ -6175,20 +6245,20 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6175
6245
|
}
|
|
6176
6246
|
)
|
|
6177
6247
|
] });
|
|
6178
|
-
const chip = fresh > 0 && /* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6180
|
-
/* @__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` })
|
|
6181
6251
|
] });
|
|
6182
6252
|
if (!onOpen) {
|
|
6183
|
-
return /* @__PURE__ */
|
|
6184
|
-
/* @__PURE__ */
|
|
6253
|
+
return /* @__PURE__ */ jsxs61("div", { className: ROW_CLASSES3, children: [
|
|
6254
|
+
/* @__PURE__ */ jsx83("div", { className: BOX_CLASSES, children: inner }),
|
|
6185
6255
|
chip
|
|
6186
6256
|
] });
|
|
6187
6257
|
}
|
|
6188
6258
|
return (
|
|
6189
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
|
|
6190
|
-
/* @__PURE__ */
|
|
6191
|
-
/* @__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 }),
|
|
6192
6262
|
chip
|
|
6193
6263
|
] })
|
|
6194
6264
|
);
|
|
@@ -6196,14 +6266,14 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
6196
6266
|
|
|
6197
6267
|
// src/ResolveDialog.tsx
|
|
6198
6268
|
import { useState as useState24 } from "react";
|
|
6199
|
-
import { jsx as
|
|
6269
|
+
import { jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6200
6270
|
function ResolveDialog({ onResolve, onCancel, refused }) {
|
|
6201
6271
|
const [note, setNote] = useState24("");
|
|
6202
6272
|
return (
|
|
6203
6273
|
// Outlined at rest and green on hover in Signal, the kit's `resolve` look.
|
|
6204
|
-
/* @__PURE__ */
|
|
6205
|
-
/* @__PURE__ */
|
|
6206
|
-
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 })
|
|
6207
6277
|
] }) })
|
|
6208
6278
|
);
|
|
6209
6279
|
}
|
|
@@ -6251,31 +6321,31 @@ function useFaceLine(root, active, toDot = false) {
|
|
|
6251
6321
|
}
|
|
6252
6322
|
|
|
6253
6323
|
// src/PinnedComment.tsx
|
|
6254
|
-
import { jsx as
|
|
6324
|
+
import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6255
6325
|
var goneWords = (deleted) => deleted ? "This comment was deleted." : "This comment can\u2019t be shown.";
|
|
6256
6326
|
var GONE_CLOSED = "This thread takes no new replies.";
|
|
6257
6327
|
function PinnedComment({ author, time, at: given, words, deleted = false, unseen = false }) {
|
|
6258
6328
|
const at = momentOf(given);
|
|
6259
|
-
return /* @__PURE__ */
|
|
6260
|
-
/* @__PURE__ */
|
|
6261
|
-
/* @__PURE__ */
|
|
6262
|
-
/* @__PURE__ */
|
|
6263
|
-
/* @__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 }) }) })
|
|
6264
6334
|
] }),
|
|
6265
|
-
/* @__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 }) })
|
|
6266
6336
|
] }) });
|
|
6267
6337
|
}
|
|
6268
6338
|
|
|
6269
6339
|
// src/ConversationCard.tsx
|
|
6270
|
-
import { Fragment as Fragment23, jsx as
|
|
6340
|
+
import { Fragment as Fragment23, jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6271
6341
|
function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
6272
6342
|
const at = momentOf(given);
|
|
6273
6343
|
const exact = at === void 0 ? void 0 : exactTime(at);
|
|
6274
|
-
const said = at === void 0 ? time : /* @__PURE__ */
|
|
6344
|
+
const said = at === void 0 ? time : /* @__PURE__ */ jsx86("time", { dateTime: new Date(at).toISOString(), children: time });
|
|
6275
6345
|
if (timeHref) {
|
|
6276
|
-
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 }) }) });
|
|
6277
6347
|
}
|
|
6278
|
-
return /* @__PURE__ */
|
|
6348
|
+
return /* @__PURE__ */ jsx86(MetaText, { className: "shrink-0", children: exact ? /* @__PURE__ */ jsx86(WithTooltip, { label: exact, children: said }) : time });
|
|
6279
6349
|
}
|
|
6280
6350
|
var fadeBefore = (end) => `linear-gradient(to right, black ${end - 16}px, transparent ${end}px)`;
|
|
6281
6351
|
function useClearOfStrip(root, strip, shown2) {
|
|
@@ -6295,15 +6365,15 @@ function useClearOfStrip(root, strip, shown2) {
|
|
|
6295
6365
|
return end;
|
|
6296
6366
|
}
|
|
6297
6367
|
function Head({ author, time, at, timeHref, timeLabel, edited, isNew, urgent, meta, end }) {
|
|
6298
|
-
return /* @__PURE__ */
|
|
6299
|
-
/* @__PURE__ */
|
|
6300
|
-
/* @__PURE__ */
|
|
6301
|
-
/* @__PURE__ */
|
|
6302
|
-
/* @__PURE__ */
|
|
6303
|
-
/* @__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 }),
|
|
6304
6374
|
meta
|
|
6305
6375
|
] }),
|
|
6306
|
-
isNew && (urgent ? /* @__PURE__ */
|
|
6376
|
+
isNew && (urgent ? /* @__PURE__ */ jsx86(UrgentMark, {}) : /* @__PURE__ */ jsx86(UnreadDot, {}))
|
|
6307
6377
|
] });
|
|
6308
6378
|
}
|
|
6309
6379
|
function attentionOf(fresh, urgent, inThreadCard) {
|
|
@@ -6311,13 +6381,13 @@ function attentionOf(fresh, urgent, inThreadCard) {
|
|
|
6311
6381
|
return urgent ? "warning" : "accent";
|
|
6312
6382
|
}
|
|
6313
6383
|
function EndedLine({ by, note, at }) {
|
|
6314
|
-
return /* @__PURE__ */
|
|
6315
|
-
/* @__PURE__ */
|
|
6316
|
-
/* @__PURE__ */
|
|
6317
|
-
/* @__PURE__ */
|
|
6318
|
-
/* @__PURE__ */
|
|
6319
|
-
/* @__PURE__ */
|
|
6320
|
-
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: [
|
|
6321
6391
|
" \xB7 ",
|
|
6322
6392
|
at
|
|
6323
6393
|
] })
|
|
@@ -6326,13 +6396,13 @@ function EndedLine({ by, note, at }) {
|
|
|
6326
6396
|
}
|
|
6327
6397
|
function ResolvedCheck({ by, note, at }) {
|
|
6328
6398
|
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
6329
|
-
return /* @__PURE__ */
|
|
6330
|
-
/* @__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 }),
|
|
6331
6401
|
"Resolved"
|
|
6332
6402
|
] }) });
|
|
6333
6403
|
}
|
|
6334
6404
|
function Words({ children }) {
|
|
6335
|
-
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 }) });
|
|
6336
6406
|
}
|
|
6337
6407
|
function useReactionRefusal(reactions) {
|
|
6338
6408
|
const [refused, setRefused] = useState26();
|
|
@@ -6359,9 +6429,9 @@ function useReactionRefusal(reactions) {
|
|
|
6359
6429
|
}
|
|
6360
6430
|
function Reactions({ reactions, refused, readOnly }) {
|
|
6361
6431
|
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
6362
|
-
return /* @__PURE__ */
|
|
6363
|
-
reactions && /* @__PURE__ */
|
|
6364
|
-
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: [
|
|
6365
6435
|
"Not reacted: ",
|
|
6366
6436
|
refused,
|
|
6367
6437
|
"."
|
|
@@ -6369,11 +6439,11 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
6369
6439
|
] });
|
|
6370
6440
|
}
|
|
6371
6441
|
function Editing({ author, heading, children }) {
|
|
6372
|
-
return /* @__PURE__ */
|
|
6373
|
-
!!heading && /* @__PURE__ */
|
|
6374
|
-
/* @__PURE__ */
|
|
6375
|
-
/* @__PURE__ */
|
|
6376
|
-
/* @__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 })
|
|
6377
6447
|
] })
|
|
6378
6448
|
] });
|
|
6379
6449
|
}
|
|
@@ -6387,7 +6457,7 @@ function stillHere(root) {
|
|
|
6387
6457
|
}
|
|
6388
6458
|
function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
6389
6459
|
const [answered, setAnswered] = useState26(false);
|
|
6390
|
-
return /* @__PURE__ */
|
|
6460
|
+
return /* @__PURE__ */ jsx86(
|
|
6391
6461
|
ConfirmDialog,
|
|
6392
6462
|
{
|
|
6393
6463
|
title: `Delete this ${noun}?`,
|
|
@@ -6406,7 +6476,7 @@ function DeleteQuestion({ noun, onDelete, refused, onClose, children }) {
|
|
|
6406
6476
|
}
|
|
6407
6477
|
function ResolveQuestion({ onResolve, refused, onClose }) {
|
|
6408
6478
|
const [answered, setAnswered] = useState26(false);
|
|
6409
|
-
return /* @__PURE__ */
|
|
6479
|
+
return /* @__PURE__ */ jsx86(
|
|
6410
6480
|
ResolveDialog,
|
|
6411
6481
|
{
|
|
6412
6482
|
refused: answered ? refused : void 0,
|
|
@@ -6459,9 +6529,9 @@ function ConversationCard(props) {
|
|
|
6459
6529
|
const reply = onReply ?? item?.show;
|
|
6460
6530
|
const marked = selected ?? (item && !item.under ? item.open : void 0);
|
|
6461
6531
|
const under = !!item?.under;
|
|
6462
|
-
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */
|
|
6463
|
-
return /* @__PURE__ */
|
|
6464
|
-
/* @__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(
|
|
6465
6535
|
Card,
|
|
6466
6536
|
{
|
|
6467
6537
|
ref: root,
|
|
@@ -6486,14 +6556,14 @@ function ConversationCard(props) {
|
|
|
6486
6556
|
setHovered(false);
|
|
6487
6557
|
},
|
|
6488
6558
|
children: [
|
|
6489
|
-
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: [
|
|
6490
6560
|
!!heading && // Faded clear of the strip, as the head's words are (useClearOfStrip).
|
|
6491
|
-
/* @__PURE__ */
|
|
6492
|
-
deleted ? /* @__PURE__ */
|
|
6493
|
-
!!about && /* @__PURE__ */
|
|
6494
|
-
/* @__PURE__ */
|
|
6495
|
-
] }) : /* @__PURE__ */
|
|
6496
|
-
/* @__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(
|
|
6497
6567
|
Head,
|
|
6498
6568
|
{
|
|
6499
6569
|
author,
|
|
@@ -6504,24 +6574,24 @@ function ConversationCard(props) {
|
|
|
6504
6574
|
edited: props.edited,
|
|
6505
6575
|
isNew,
|
|
6506
6576
|
urgent,
|
|
6507
|
-
meta: resolved && /* @__PURE__ */
|
|
6577
|
+
meta: resolved && /* @__PURE__ */ jsx86(ResolvedCheck, { by: resolved.by, note: resolved.note, at: resolved.at }),
|
|
6508
6578
|
end: wordsEnd
|
|
6509
6579
|
}
|
|
6510
6580
|
),
|
|
6511
6581
|
!!about && // Under the name, above the words (Katerina, 1 November).
|
|
6512
|
-
/* @__PURE__ */
|
|
6513
|
-
/* @__PURE__ */
|
|
6582
|
+
/* @__PURE__ */ jsx86("div", { className: "relative w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6583
|
+
/* @__PURE__ */ jsx86(Words, { children })
|
|
6514
6584
|
] }),
|
|
6515
|
-
!deleted && files && /* @__PURE__ */
|
|
6516
|
-
/* @__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 }),
|
|
6517
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).
|
|
6518
|
-
/* @__PURE__ */
|
|
6519
|
-
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 })
|
|
6520
6590
|
] }),
|
|
6521
6591
|
dotLine && // One bar from the face to the dot, measured (useFaceLine): 2px, centred under the 24px face, 8px in.
|
|
6522
6592
|
// Its top and height come from the measure: where the face ends and the dot stands are not known ahead.
|
|
6523
|
-
/* @__PURE__ */
|
|
6524
|
-
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(
|
|
6525
6595
|
ConversationActions,
|
|
6526
6596
|
{
|
|
6527
6597
|
options: reactions?.options,
|
|
@@ -6534,10 +6604,10 @@ function ConversationCard(props) {
|
|
|
6534
6604
|
resolved: !!resolved,
|
|
6535
6605
|
onResolve: onResolve && (() => setResolving(true)),
|
|
6536
6606
|
onReopen,
|
|
6537
|
-
more: offersMenu && /* @__PURE__ */
|
|
6607
|
+
more: offersMenu && /* @__PURE__ */ jsx86(
|
|
6538
6608
|
ConversationMenu,
|
|
6539
6609
|
{
|
|
6540
|
-
trigger: /* @__PURE__ */
|
|
6610
|
+
trigger: /* @__PURE__ */ jsx86(ToolbarButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx86(IconDotsVertical5, { size: 16, stroke: 1.5 }) }),
|
|
6541
6611
|
open: menuOpen,
|
|
6542
6612
|
onOpenChange: (open) => {
|
|
6543
6613
|
setMenuOpen(open);
|
|
@@ -6561,15 +6631,15 @@ function ConversationCard(props) {
|
|
|
6561
6631
|
]
|
|
6562
6632
|
}
|
|
6563
6633
|
),
|
|
6564
|
-
deleting && onDelete && /* @__PURE__ */
|
|
6565
|
-
/* @__PURE__ */
|
|
6566
|
-
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: [
|
|
6567
6637
|
"Its ",
|
|
6568
6638
|
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
6569
6639
|
"."
|
|
6570
6640
|
] })
|
|
6571
6641
|
] }) }),
|
|
6572
|
-
resolving && onResolve && /* @__PURE__ */
|
|
6642
|
+
resolving && onResolve && /* @__PURE__ */ jsx86(ResolveQuestion, { onResolve, refused: resolveRefused, onClose: () => setResolving(false) })
|
|
6573
6643
|
] });
|
|
6574
6644
|
}
|
|
6575
6645
|
function ReplyCard(props) {
|
|
@@ -6592,8 +6662,8 @@ function ReplyCard(props) {
|
|
|
6592
6662
|
useLayoutEffect7(() => {
|
|
6593
6663
|
if (drawn) drawn.added += 1;
|
|
6594
6664
|
}, [drawn]);
|
|
6595
|
-
return /* @__PURE__ */
|
|
6596
|
-
/* @__PURE__ */
|
|
6665
|
+
return /* @__PURE__ */ jsxs64(Fragment23, { children: [
|
|
6666
|
+
/* @__PURE__ */ jsxs64(
|
|
6597
6667
|
Card,
|
|
6598
6668
|
{
|
|
6599
6669
|
ref: root,
|
|
@@ -6616,15 +6686,15 @@ function ReplyCard(props) {
|
|
|
6616
6686
|
setHovered(false);
|
|
6617
6687
|
},
|
|
6618
6688
|
children: [
|
|
6619
|
-
isEditing ? /* @__PURE__ */
|
|
6620
|
-
/* @__PURE__ */
|
|
6621
|
-
about && /* @__PURE__ */
|
|
6622
|
-
/* @__PURE__ */
|
|
6623
|
-
files && /* @__PURE__ */
|
|
6624
|
-
/* @__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 })
|
|
6625
6695
|
] }),
|
|
6626
6696
|
showStrip && // In a box of its own, as a comment's: the box is what the head measures to keep clear of.
|
|
6627
|
-
/* @__PURE__ */
|
|
6697
|
+
/* @__PURE__ */ jsx86("div", { ref: strip, className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx86(
|
|
6628
6698
|
ConversationActions,
|
|
6629
6699
|
{
|
|
6630
6700
|
options: reactions?.options,
|
|
@@ -6633,10 +6703,10 @@ function ReplyCard(props) {
|
|
|
6633
6703
|
setPicking(open);
|
|
6634
6704
|
if (!open) settle();
|
|
6635
6705
|
},
|
|
6636
|
-
more: offersMenu && /* @__PURE__ */
|
|
6706
|
+
more: offersMenu && /* @__PURE__ */ jsx86(
|
|
6637
6707
|
ConversationMenu,
|
|
6638
6708
|
{
|
|
6639
|
-
trigger: /* @__PURE__ */
|
|
6709
|
+
trigger: /* @__PURE__ */ jsx86(ToolbarButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx86(IconDotsVertical5, { size: 16, stroke: 1.5 }) }),
|
|
6640
6710
|
open: menuOpen,
|
|
6641
6711
|
onOpenChange: (next) => {
|
|
6642
6712
|
setMenuOpen(next);
|
|
@@ -6656,7 +6726,7 @@ function ReplyCard(props) {
|
|
|
6656
6726
|
]
|
|
6657
6727
|
}
|
|
6658
6728
|
),
|
|
6659
|
-
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 })
|
|
6660
6730
|
] });
|
|
6661
6731
|
}
|
|
6662
6732
|
|
|
@@ -6664,27 +6734,27 @@ function ReplyCard(props) {
|
|
|
6664
6734
|
import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect15, useLayoutEffect as useLayoutEffect8, useRef as useRef21, useState as useState28 } from "react";
|
|
6665
6735
|
|
|
6666
6736
|
// src/Panel.tsx
|
|
6667
|
-
import { jsx as
|
|
6737
|
+
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6668
6738
|
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
6669
|
-
return /* @__PURE__ */
|
|
6670
|
-
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 }),
|
|
6671
6741
|
broken ? (
|
|
6672
6742
|
// The message takes the room the body had and centres itself in it.
|
|
6673
|
-
/* @__PURE__ */
|
|
6674
|
-
) : /* @__PURE__ */
|
|
6675
|
-
!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 })
|
|
6676
6746
|
] });
|
|
6677
6747
|
}
|
|
6678
6748
|
function Panel(props) {
|
|
6679
|
-
return /* @__PURE__ */
|
|
6749
|
+
return /* @__PURE__ */ jsx87(
|
|
6680
6750
|
ErrorBoundary,
|
|
6681
6751
|
{
|
|
6682
6752
|
label: "panel",
|
|
6683
6753
|
frame: (message) => (
|
|
6684
6754
|
// Only the name comes back with the message: the actions and the footer may be what threw.
|
|
6685
|
-
/* @__PURE__ */
|
|
6755
|
+
/* @__PURE__ */ jsx87(Frame, { title: props.title, chevron: props.chevron, className: props.className, broken: true, children: message })
|
|
6686
6756
|
),
|
|
6687
|
-
children: /* @__PURE__ */
|
|
6757
|
+
children: /* @__PURE__ */ jsx87(Frame, { ...props })
|
|
6688
6758
|
}
|
|
6689
6759
|
);
|
|
6690
6760
|
}
|
|
@@ -6788,11 +6858,11 @@ function useWatchSeen(seen, root, attribute) {
|
|
|
6788
6858
|
}
|
|
6789
6859
|
|
|
6790
6860
|
// src/ConversationLayout.tsx
|
|
6791
|
-
import { Fragment as Fragment25, jsx as
|
|
6861
|
+
import { Fragment as Fragment25, jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6792
6862
|
var threadOf = (item) => typeof item?.thread === "function" ? item.thread() : item?.thread;
|
|
6793
6863
|
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
6794
|
-
if (loading) return /* @__PURE__ */
|
|
6795
|
-
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 });
|
|
6796
6866
|
const stateOf = (item) => change && item.thread ? {
|
|
6797
6867
|
under,
|
|
6798
6868
|
open: open === item.id,
|
|
@@ -6801,12 +6871,12 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6801
6871
|
} : null;
|
|
6802
6872
|
const draw2 = (item) => {
|
|
6803
6873
|
if (!under) {
|
|
6804
|
-
return /* @__PURE__ */
|
|
6874
|
+
return /* @__PURE__ */ jsxs66(Fragment24, { children: [
|
|
6805
6875
|
item.before,
|
|
6806
|
-
/* @__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 }) })
|
|
6807
6877
|
] }, item.id);
|
|
6808
6878
|
}
|
|
6809
|
-
return /* @__PURE__ */
|
|
6879
|
+
return /* @__PURE__ */ jsx88(UnderItem, { item, isOpen: open === item.id && !!item.thread, state: stateOf(item), caret }, item.id);
|
|
6810
6880
|
};
|
|
6811
6881
|
if (!under) {
|
|
6812
6882
|
const stretches = [];
|
|
@@ -6822,11 +6892,11 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6822
6892
|
seen.set(name, count);
|
|
6823
6893
|
stretches.push({ key: `${item.day === void 0 ? "no-day" : `day:${name}`}#${count}`, day: item.day, items: [item] });
|
|
6824
6894
|
}
|
|
6825
|
-
return /* @__PURE__ */
|
|
6895
|
+
return /* @__PURE__ */ jsxs66(Fragment25, { children: [
|
|
6826
6896
|
above,
|
|
6827
6897
|
stretches.map(
|
|
6828
|
-
(stretch) => stretch.day === void 0 ? /* @__PURE__ */
|
|
6829
|
-
/* @__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 }),
|
|
6830
6900
|
stretch.items.map(draw2)
|
|
6831
6901
|
] }, stretch.key)
|
|
6832
6902
|
)
|
|
@@ -6834,11 +6904,11 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6834
6904
|
}
|
|
6835
6905
|
const resolved = items.filter((item) => item.resolved);
|
|
6836
6906
|
const gone = items.filter((item) => item.gone && !item.resolved);
|
|
6837
|
-
const group = (title, list) => list.length > 0 && /* @__PURE__ */
|
|
6907
|
+
const group = (title, list) => list.length > 0 && /* @__PURE__ */ jsx88(
|
|
6838
6908
|
CollapsibleSection,
|
|
6839
6909
|
{
|
|
6840
6910
|
title,
|
|
6841
|
-
trailing: /* @__PURE__ */
|
|
6911
|
+
trailing: /* @__PURE__ */ jsx88(Chip, { type: "neutral", label: String(list.length) }),
|
|
6842
6912
|
defaultOpen: false,
|
|
6843
6913
|
openFor: list.some((item) => item.id === open) ? open : void 0,
|
|
6844
6914
|
className: "shrink-0",
|
|
@@ -6846,7 +6916,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6846
6916
|
children: list.map(draw2)
|
|
6847
6917
|
}
|
|
6848
6918
|
);
|
|
6849
|
-
return /* @__PURE__ */
|
|
6919
|
+
return /* @__PURE__ */ jsxs66(Fragment25, { children: [
|
|
6850
6920
|
above,
|
|
6851
6921
|
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
6852
6922
|
group("On deleted blocks", gone),
|
|
@@ -6856,7 +6926,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6856
6926
|
function UnderItem({ item, isOpen, state, caret }) {
|
|
6857
6927
|
const root = useRef21(null);
|
|
6858
6928
|
const line = useFaceLine(root, isOpen);
|
|
6859
|
-
return /* @__PURE__ */
|
|
6929
|
+
return /* @__PURE__ */ jsxs66(
|
|
6860
6930
|
Card,
|
|
6861
6931
|
{
|
|
6862
6932
|
ref: root,
|
|
@@ -6868,13 +6938,13 @@ function UnderItem({ item, isOpen, state, caret }) {
|
|
|
6868
6938
|
quietUntilHover: !isOpen,
|
|
6869
6939
|
className: cn("relative flex flex-col", isOpen && "pb-2", SHOWN_CLASSES),
|
|
6870
6940
|
children: [
|
|
6871
|
-
/* @__PURE__ */
|
|
6872
|
-
/* @__PURE__ */
|
|
6873
|
-
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) })
|
|
6874
6944
|
] }) }) }),
|
|
6875
6945
|
line && // The face's line, one bar, last so it stands over a hovered card's fill; 19px in, centred under the face.
|
|
6876
6946
|
// Its top and height come from the measure: where the face and the last reply end are not known ahead.
|
|
6877
|
-
/* @__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 } })
|
|
6878
6948
|
]
|
|
6879
6949
|
}
|
|
6880
6950
|
);
|
|
@@ -6997,49 +7067,49 @@ function ConversationLayout({
|
|
|
6997
7067
|
// The body at least the column's height: the comments start at its top, and the note under them (`below`) is pushed
|
|
6998
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
|
|
6999
7069
|
// columns (Katerina, 2 November); with many it comes after them, and scrolls with them.
|
|
7000
|
-
/* @__PURE__ */
|
|
7001
|
-
/* @__PURE__ */
|
|
7002
|
-
!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 })
|
|
7003
7073
|
] })
|
|
7004
7074
|
);
|
|
7005
7075
|
}
|
|
7006
7076
|
const opened = threadOf(items.find((item) => item.id === open));
|
|
7007
7077
|
const side = opened || aside;
|
|
7008
|
-
return /* @__PURE__ */
|
|
7009
|
-
/* @__PURE__ */
|
|
7078
|
+
return /* @__PURE__ */ jsxs66("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
7079
|
+
/* @__PURE__ */ jsx88(
|
|
7010
7080
|
ErrorBoundary,
|
|
7011
7081
|
{
|
|
7012
7082
|
label: "conversation",
|
|
7013
|
-
frame: (message) => /* @__PURE__ */
|
|
7014
|
-
/* @__PURE__ */
|
|
7015
|
-
/* @__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 })
|
|
7016
7086
|
] }),
|
|
7017
|
-
children: /* @__PURE__ */
|
|
7087
|
+
children: /* @__PURE__ */ jsxs66("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
7018
7088
|
header,
|
|
7019
|
-
/* @__PURE__ */
|
|
7020
|
-
top != null && top !== false && top !== "" && /* @__PURE__ */
|
|
7021
|
-
/* @__PURE__ */
|
|
7022
|
-
/* @__PURE__ */
|
|
7023
|
-
/* @__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 }),
|
|
7024
7094
|
!loading && below
|
|
7025
7095
|
] })
|
|
7026
7096
|
] }),
|
|
7027
|
-
box && /* @__PURE__ */
|
|
7097
|
+
box && /* @__PURE__ */ jsx88("div", { className: "shrink-0 p-3", children: /* @__PURE__ */ jsx88(sendsInLayout.Provider, { value: sends, children: box }) })
|
|
7028
7098
|
] })
|
|
7029
7099
|
}
|
|
7030
7100
|
),
|
|
7031
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.
|
|
7032
7102
|
// One catch per thread, and one for the aside: a thread that threw is let go once it is closed or another opens,
|
|
7033
7103
|
// as Peek's column, drawn only while a thread was open, let it go on closing. Each thread is drawn afresh.
|
|
7034
|
-
/* @__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") })
|
|
7035
7105
|
] });
|
|
7036
7106
|
}
|
|
7037
7107
|
|
|
7038
7108
|
// src/ConversationHeading.tsx
|
|
7039
|
-
import { jsx as
|
|
7109
|
+
import { jsx as jsx89, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
7040
7110
|
var NAME = "-mx-1 min-w-0 truncate rounded px-1 text-left text-h4 text-text-primary";
|
|
7041
7111
|
function ConversationHeading({ icon, name, onOpen, href, className }) {
|
|
7042
|
-
const label = href ? /* @__PURE__ */
|
|
7112
|
+
const label = href ? /* @__PURE__ */ jsx89(
|
|
7043
7113
|
"a",
|
|
7044
7114
|
{
|
|
7045
7115
|
href,
|
|
@@ -7051,42 +7121,42 @@ function ConversationHeading({ icon, name, onOpen, href, className }) {
|
|
|
7051
7121
|
className: cn(NAME, "hover:bg-bg-hover"),
|
|
7052
7122
|
children: name
|
|
7053
7123
|
}
|
|
7054
|
-
) : onOpen ? /* @__PURE__ */
|
|
7055
|
-
return /* @__PURE__ */
|
|
7056
|
-
/* @__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 }),
|
|
7057
7127
|
label
|
|
7058
7128
|
] });
|
|
7059
7129
|
}
|
|
7060
7130
|
|
|
7061
7131
|
// src/ConversationPlace.tsx
|
|
7062
|
-
import { jsx as
|
|
7132
|
+
import { jsx as jsx90, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
7063
7133
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
7064
|
-
return /* @__PURE__ */
|
|
7065
|
-
/* @__PURE__ */
|
|
7066
|
-
/* @__PURE__ */
|
|
7067
|
-
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 })
|
|
7068
7138
|
] }),
|
|
7069
7139
|
children
|
|
7070
7140
|
] });
|
|
7071
7141
|
}
|
|
7072
7142
|
|
|
7073
7143
|
// src/QuotedLine.tsx
|
|
7074
|
-
import { jsx as
|
|
7144
|
+
import { jsx as jsx91, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
7075
7145
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
7076
7146
|
function QuotedLine({ words, state = "here", label, href, external }) {
|
|
7077
7147
|
const shown2 = words ?? label ?? "";
|
|
7078
7148
|
const inThePage = !!words && state === "here";
|
|
7079
|
-
const mark = /* @__PURE__ */
|
|
7080
|
-
return /* @__PURE__ */
|
|
7081
|
-
/* @__PURE__ */
|
|
7082
|
-
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] })
|
|
7083
7153
|
] });
|
|
7084
7154
|
}
|
|
7085
7155
|
|
|
7086
7156
|
// src/ReactionHorizon.tsx
|
|
7087
|
-
import { Fragment as Fragment26, jsx as
|
|
7157
|
+
import { Fragment as Fragment26, jsx as jsx92, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
7088
7158
|
function Said({ limit, omitted, noun }) {
|
|
7089
|
-
return /* @__PURE__ */
|
|
7159
|
+
return /* @__PURE__ */ jsxs70(Fragment26, { children: [
|
|
7090
7160
|
"Reactions are shown for the latest ",
|
|
7091
7161
|
limit,
|
|
7092
7162
|
" ",
|
|
@@ -7099,11 +7169,11 @@ function Said({ limit, omitted, noun }) {
|
|
|
7099
7169
|
] });
|
|
7100
7170
|
}
|
|
7101
7171
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
7102
|
-
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 }) });
|
|
7103
7173
|
if (omitted <= 0 && !cut) return room || null;
|
|
7104
|
-
return /* @__PURE__ */
|
|
7105
|
-
/* @__PURE__ */
|
|
7106
|
-
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 }),
|
|
7107
7177
|
omitted > 0 && cut && " ",
|
|
7108
7178
|
cut && "Some reactions may be missing."
|
|
7109
7179
|
] }),
|
|
@@ -7113,18 +7183,18 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
7113
7183
|
|
|
7114
7184
|
// src/ArchiveDialog.tsx
|
|
7115
7185
|
import { useState as useState29 } from "react";
|
|
7116
|
-
import { jsx as
|
|
7186
|
+
import { jsx as jsx93, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
7117
7187
|
var listOf = (parts) => parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`;
|
|
7118
7188
|
function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, onClose, onArchive }) {
|
|
7119
7189
|
const [resolution, setResolution] = useState29("");
|
|
7120
7190
|
const where = apps.length ? `, ${listOf(apps.map((app) => `in ${app}`))}` : "";
|
|
7121
|
-
return /* @__PURE__ */
|
|
7122
|
-
/* @__PURE__ */
|
|
7123
|
-
/* @__PURE__ */
|
|
7124
|
-
staysVisible.length > 0 && /* @__PURE__ */
|
|
7125
|
-
/* @__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 })
|
|
7126
7196
|
] }),
|
|
7127
|
-
/* @__PURE__ */
|
|
7197
|
+
/* @__PURE__ */ jsx93(Field, { label: "Resolution (optional)", children: /* @__PURE__ */ jsx93(
|
|
7128
7198
|
Textarea,
|
|
7129
7199
|
{
|
|
7130
7200
|
value: resolution,
|
|
@@ -7139,19 +7209,19 @@ function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, o
|
|
|
7139
7209
|
// src/ArchivedNotice.tsx
|
|
7140
7210
|
import { useState as useState30 } from "react";
|
|
7141
7211
|
import { IconArchive } from "@tabler/icons-react";
|
|
7142
|
-
import { jsx as
|
|
7212
|
+
import { jsx as jsx94, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
7143
7213
|
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
7144
7214
|
const [unarchiving, setUnarchiving] = useState30(false);
|
|
7145
7215
|
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
7146
7216
|
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
7147
7217
|
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
7148
|
-
return /* @__PURE__ */
|
|
7149
|
-
/* @__PURE__ */
|
|
7150
|
-
/* @__PURE__ */
|
|
7151
|
-
/* @__PURE__ */
|
|
7152
|
-
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 })
|
|
7153
7223
|
] }),
|
|
7154
|
-
parent ? onOpenParent && /* @__PURE__ */
|
|
7224
|
+
parent ? onOpenParent && /* @__PURE__ */ jsx94(Button, { variant: "outlined", size: "small", className: "shrink-0", onClick: onOpenParent, children: `Open ${parent}` }) : onUnarchive && /* @__PURE__ */ jsx94(
|
|
7155
7225
|
Button,
|
|
7156
7226
|
{
|
|
7157
7227
|
variant: "outlined",
|
|
@@ -7171,13 +7241,13 @@ function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive
|
|
|
7171
7241
|
// src/DeletedNotice.tsx
|
|
7172
7242
|
import { useState as useState31 } from "react";
|
|
7173
7243
|
import { IconTrash } from "@tabler/icons-react";
|
|
7174
|
-
import { jsx as
|
|
7244
|
+
import { jsx as jsx95, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
7175
7245
|
function DeletedNotice({ by, when, onRestore }) {
|
|
7176
7246
|
const [restoring, setRestoring] = useState31(false);
|
|
7177
|
-
return /* @__PURE__ */
|
|
7178
|
-
/* @__PURE__ */
|
|
7179
|
-
/* @__PURE__ */
|
|
7180
|
-
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(
|
|
7181
7251
|
Button,
|
|
7182
7252
|
{
|
|
7183
7253
|
variant: "outlined",
|
|
@@ -7196,21 +7266,21 @@ function DeletedNotice({ by, when, onRestore }) {
|
|
|
7196
7266
|
|
|
7197
7267
|
// src/NoAccessNotice.tsx
|
|
7198
7268
|
import { IconLock } from "@tabler/icons-react";
|
|
7199
|
-
import { jsx as
|
|
7269
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
7200
7270
|
function NoAccessNotice({ what }) {
|
|
7201
|
-
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}` });
|
|
7202
7272
|
}
|
|
7203
7273
|
|
|
7204
7274
|
// src/Thread.tsx
|
|
7205
7275
|
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef22, useState as useState32 } from "react";
|
|
7206
7276
|
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
7207
|
-
import { Fragment as Fragment27, jsx as
|
|
7277
|
+
import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
7208
7278
|
var always = () => true;
|
|
7209
7279
|
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
7210
7280
|
function Replies({ children, loading, empty }) {
|
|
7211
|
-
if (loading) return /* @__PURE__ */
|
|
7212
|
-
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */
|
|
7213
|
-
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 });
|
|
7214
7284
|
}
|
|
7215
7285
|
function Thread({
|
|
7216
7286
|
place = "beside",
|
|
@@ -7255,36 +7325,36 @@ function Thread({
|
|
|
7255
7325
|
const foot = notice ?? box;
|
|
7256
7326
|
const layoutLine = useContext15(LineByLayout);
|
|
7257
7327
|
if (place === "under") {
|
|
7258
|
-
return /* @__PURE__ */
|
|
7328
|
+
return /* @__PURE__ */ jsxs74("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
7259
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).
|
|
7260
7330
|
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
7261
7331
|
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
7262
7332
|
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
7263
7333
|
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
7264
|
-
/* @__PURE__ */
|
|
7265
|
-
!layoutLine && /* @__PURE__ */
|
|
7266
|
-
/* @__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 })
|
|
7267
7337
|
] }),
|
|
7268
|
-
foot && /* @__PURE__ */
|
|
7338
|
+
foot && /* @__PURE__ */ jsx97("div", { className: "px-2 pt-2", children: foot })
|
|
7269
7339
|
] });
|
|
7270
7340
|
}
|
|
7271
|
-
return /* @__PURE__ */
|
|
7341
|
+
return /* @__PURE__ */ jsxs74(
|
|
7272
7342
|
Panel,
|
|
7273
7343
|
{
|
|
7274
7344
|
className,
|
|
7275
7345
|
bodyRef: setBody,
|
|
7276
7346
|
bodyClassName: "flex flex-col",
|
|
7277
7347
|
title,
|
|
7278
|
-
actions: /* @__PURE__ */
|
|
7279
|
-
resolved && /* @__PURE__ */
|
|
7348
|
+
actions: /* @__PURE__ */ jsxs74(Fragment27, { children: [
|
|
7349
|
+
resolved && /* @__PURE__ */ jsx97(Chip, { type: "success", label: "Resolved" }),
|
|
7280
7350
|
actions,
|
|
7281
|
-
onClose && /* @__PURE__ */
|
|
7351
|
+
onClose && /* @__PURE__ */ jsx97(IconButton, { tooltip: "Close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx97(IconX6, { size: 16, stroke: 1.5 }) })
|
|
7282
7352
|
] }),
|
|
7283
|
-
footer: foot && /* @__PURE__ */
|
|
7353
|
+
footer: foot && /* @__PURE__ */ jsx97("div", { className: "p-3", children: foot }),
|
|
7284
7354
|
children: [
|
|
7285
|
-
start && /* @__PURE__ */
|
|
7286
|
-
/* @__PURE__ */
|
|
7287
|
-
/* @__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 }) }) }) })
|
|
7288
7358
|
]
|
|
7289
7359
|
}
|
|
7290
7360
|
);
|
|
@@ -7337,9 +7407,9 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
|
|
|
7337
7407
|
// src/SearchInput.tsx
|
|
7338
7408
|
import "react";
|
|
7339
7409
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
7340
|
-
import { jsx as
|
|
7410
|
+
import { jsx as jsx98, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
7341
7411
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
7342
|
-
return /* @__PURE__ */
|
|
7412
|
+
return /* @__PURE__ */ jsxs75(
|
|
7343
7413
|
"div",
|
|
7344
7414
|
{
|
|
7345
7415
|
className: cn(
|
|
@@ -7351,7 +7421,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7351
7421
|
className
|
|
7352
7422
|
),
|
|
7353
7423
|
children: [
|
|
7354
|
-
/* @__PURE__ */
|
|
7424
|
+
/* @__PURE__ */ jsx98(
|
|
7355
7425
|
Input3,
|
|
7356
7426
|
{
|
|
7357
7427
|
className: cn("flex-1 min-w-0 text-input-value", BARE_INPUT_CLASSES),
|
|
@@ -7359,7 +7429,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7359
7429
|
...props
|
|
7360
7430
|
}
|
|
7361
7431
|
),
|
|
7362
|
-
shortcut && /* @__PURE__ */
|
|
7432
|
+
shortcut && /* @__PURE__ */ jsx98(Kbd, { children: shortcut })
|
|
7363
7433
|
]
|
|
7364
7434
|
}
|
|
7365
7435
|
);
|
|
@@ -7368,37 +7438,39 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
7368
7438
|
// src/PageHeader.tsx
|
|
7369
7439
|
import { Fragment as Fragment28 } from "react";
|
|
7370
7440
|
import { IconLock as IconLock2 } from "@tabler/icons-react";
|
|
7371
|
-
import { Fragment as Fragment29, jsx as
|
|
7372
|
-
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 }) {
|
|
7373
7443
|
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
7374
7444
|
const quiet = words.length > 0 || time != null || members != null;
|
|
7375
|
-
const name = /* @__PURE__ */
|
|
7376
|
-
leading != null && /* @__PURE__ */
|
|
7377
|
-
locked && /* @__PURE__ */
|
|
7378
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
7379
|
-
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 })
|
|
7380
7450
|
] });
|
|
7381
|
-
const
|
|
7451
|
+
const buttons = actions != null || button != null;
|
|
7452
|
+
const right = quiet || buttons ? /* @__PURE__ */ jsxs76(Fragment29, { children: [
|
|
7382
7453
|
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
7383
7454
|
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
7384
|
-
/* @__PURE__ */
|
|
7385
|
-
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: [
|
|
7386
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
|
|
7387
|
-
/* @__PURE__ */
|
|
7388
|
-
/* @__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 })
|
|
7389
7460
|
] }, `${one.label}-${i}`)) }),
|
|
7390
|
-
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 }) }),
|
|
7391
7462
|
members
|
|
7392
7463
|
] }),
|
|
7464
|
+
button != null && /* @__PURE__ */ jsx99("span", { className: cn("flex shrink-0 items-center gap-2", actions != null && "pr-1"), children: button }),
|
|
7393
7465
|
actions
|
|
7394
7466
|
] }) : void 0;
|
|
7395
|
-
return /* @__PURE__ */
|
|
7467
|
+
return /* @__PURE__ */ jsx99(ContainerHeader, { title: name, actions: right, className });
|
|
7396
7468
|
}
|
|
7397
7469
|
|
|
7398
7470
|
// src/ListColumn.tsx
|
|
7399
|
-
import { jsx as
|
|
7471
|
+
import { jsx as jsx100, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
7400
7472
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
7401
|
-
return /* @__PURE__ */
|
|
7473
|
+
return /* @__PURE__ */ jsxs77(
|
|
7402
7474
|
"div",
|
|
7403
7475
|
{
|
|
7404
7476
|
className: cn(
|
|
@@ -7411,35 +7483,105 @@ function Column({ title, chevron = false, titleMenu, actions, above, collapsed =
|
|
|
7411
7483
|
"data-collapsed": collapsed || void 0,
|
|
7412
7484
|
inert: collapsed,
|
|
7413
7485
|
children: [
|
|
7414
|
-
/* @__PURE__ */
|
|
7486
|
+
/* @__PURE__ */ jsx100(ContainerHeader, { title, chevron, titleMenu, actions }),
|
|
7415
7487
|
above,
|
|
7416
7488
|
broken ? (
|
|
7417
7489
|
// The message takes the room the list had and centres itself in it (Katerina, 19 September).
|
|
7418
|
-
/* @__PURE__ */
|
|
7419
|
-
) : /* @__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 })
|
|
7420
7492
|
]
|
|
7421
7493
|
}
|
|
7422
7494
|
);
|
|
7423
7495
|
}
|
|
7424
7496
|
function ListColumn(props) {
|
|
7425
|
-
return /* @__PURE__ */
|
|
7497
|
+
return /* @__PURE__ */ jsx100(
|
|
7426
7498
|
ErrorBoundary,
|
|
7427
7499
|
{
|
|
7428
7500
|
label: "list panel",
|
|
7429
7501
|
frame: (message) => (
|
|
7430
7502
|
// Only the name comes back with the message: the actions and the row above may be what threw.
|
|
7431
|
-
/* @__PURE__ */
|
|
7503
|
+
/* @__PURE__ */ jsx100(Column, { title: props.title, chevron: props.chevron, collapsed: props.collapsed, className: props.className, broken: true, children: message })
|
|
7432
7504
|
),
|
|
7433
|
-
children: /* @__PURE__ */
|
|
7505
|
+
children: /* @__PURE__ */ jsx100(Column, { ...props })
|
|
7434
7506
|
}
|
|
7435
7507
|
);
|
|
7436
7508
|
}
|
|
7437
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
|
+
|
|
7438
7580
|
// src/Tabs.tsx
|
|
7439
7581
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
7440
|
-
import { Fragment as Fragment30, jsx as
|
|
7582
|
+
import { Fragment as Fragment30, jsx as jsx102, jsxs as jsxs79 } from "react/jsx-runtime";
|
|
7441
7583
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
7442
|
-
return /* @__PURE__ */
|
|
7584
|
+
return /* @__PURE__ */ jsx102(
|
|
7443
7585
|
BaseTabs.Root,
|
|
7444
7586
|
{
|
|
7445
7587
|
value: active,
|
|
@@ -7447,14 +7589,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7447
7589
|
if (details.reason === "none") onChange(value);
|
|
7448
7590
|
},
|
|
7449
7591
|
className,
|
|
7450
|
-
children: /* @__PURE__ */
|
|
7592
|
+
children: /* @__PURE__ */ jsx102(
|
|
7451
7593
|
BaseTabs.List,
|
|
7452
7594
|
{
|
|
7453
7595
|
activateOnFocus: true,
|
|
7454
7596
|
"aria-label": aria["aria-label"],
|
|
7455
7597
|
"aria-labelledby": aria["aria-labelledby"],
|
|
7456
7598
|
className: "flex items-center gap-2",
|
|
7457
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
7599
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs79(
|
|
7458
7600
|
BaseTabs.Tab,
|
|
7459
7601
|
{
|
|
7460
7602
|
value: tab.id,
|
|
@@ -7467,13 +7609,13 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7467
7609
|
),
|
|
7468
7610
|
children: [
|
|
7469
7611
|
tab.icon,
|
|
7470
|
-
/* @__PURE__ */
|
|
7612
|
+
/* @__PURE__ */ jsxs79("span", { className: "flex items-baseline", children: [
|
|
7471
7613
|
tab.label,
|
|
7472
|
-
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
|
|
7473
7615
|
] }),
|
|
7474
|
-
tab.unread ? /* @__PURE__ */
|
|
7475
|
-
/* @__PURE__ */
|
|
7476
|
-
/* @__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" })
|
|
7477
7619
|
] }) : null
|
|
7478
7620
|
]
|
|
7479
7621
|
},
|
|
@@ -7486,10 +7628,10 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7486
7628
|
}
|
|
7487
7629
|
|
|
7488
7630
|
// src/Toast.tsx
|
|
7489
|
-
import { createContext as
|
|
7631
|
+
import { createContext as createContext14, useContext as useContext17, useMemo as useMemo7 } from "react";
|
|
7490
7632
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7491
7633
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
7492
|
-
import { jsx as
|
|
7634
|
+
import { jsx as jsx103, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
7493
7635
|
var SURFACE_STYLES = {
|
|
7494
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",
|
|
7495
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",
|
|
@@ -7525,19 +7667,19 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
7525
7667
|
);
|
|
7526
7668
|
function LeadingIcon({ type }) {
|
|
7527
7669
|
const Icon = ICONS2[type];
|
|
7528
|
-
return /* @__PURE__ */
|
|
7670
|
+
return /* @__PURE__ */ jsx103(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
7529
7671
|
}
|
|
7530
7672
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
7531
7673
|
const hasAction = !!(actionLabel && onAction);
|
|
7532
|
-
return /* @__PURE__ */
|
|
7533
|
-
/* @__PURE__ */
|
|
7534
|
-
leadingIcon && /* @__PURE__ */
|
|
7535
|
-
/* @__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 })
|
|
7536
7678
|
] }),
|
|
7537
|
-
hasAction && /* @__PURE__ */
|
|
7679
|
+
hasAction && /* @__PURE__ */ jsx103(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
7538
7680
|
] });
|
|
7539
7681
|
}
|
|
7540
|
-
var ToastContext =
|
|
7682
|
+
var ToastContext = createContext14(null);
|
|
7541
7683
|
var VISIBLE_TOASTS = 3;
|
|
7542
7684
|
function ToastProvider({ children }) {
|
|
7543
7685
|
const manager = useMemo7(() => BaseToast.createToastManager(), []);
|
|
@@ -7556,9 +7698,9 @@ function ToastProvider({ children }) {
|
|
|
7556
7698
|
}),
|
|
7557
7699
|
[manager]
|
|
7558
7700
|
);
|
|
7559
|
-
return /* @__PURE__ */
|
|
7701
|
+
return /* @__PURE__ */ jsx103(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs80(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
7560
7702
|
children,
|
|
7561
|
-
/* @__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, {}) }) })
|
|
7562
7704
|
] }) });
|
|
7563
7705
|
}
|
|
7564
7706
|
function ToastList() {
|
|
@@ -7566,25 +7708,25 @@ function ToastList() {
|
|
|
7566
7708
|
return toasts.map((toast) => {
|
|
7567
7709
|
const type = toast.type ?? "neutral";
|
|
7568
7710
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
7569
|
-
return /* @__PURE__ */
|
|
7711
|
+
return /* @__PURE__ */ jsxs80(
|
|
7570
7712
|
BaseToast.Root,
|
|
7571
7713
|
{
|
|
7572
7714
|
toast,
|
|
7573
7715
|
swipeDirection: ["left", "down"],
|
|
7574
7716
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
7575
7717
|
children: [
|
|
7576
|
-
/* @__PURE__ */
|
|
7577
|
-
leadingIcon && /* @__PURE__ */
|
|
7578
|
-
/* @__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 })
|
|
7579
7721
|
] }),
|
|
7580
|
-
actionLabel && /* @__PURE__ */
|
|
7722
|
+
actionLabel && /* @__PURE__ */ jsx103(
|
|
7581
7723
|
BaseToast.Action,
|
|
7582
7724
|
{
|
|
7583
7725
|
onClick: () => {
|
|
7584
7726
|
onAction?.();
|
|
7585
7727
|
close(toast.id);
|
|
7586
7728
|
},
|
|
7587
|
-
render: /* @__PURE__ */
|
|
7729
|
+
render: /* @__PURE__ */ jsx103(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
7588
7730
|
}
|
|
7589
7731
|
)
|
|
7590
7732
|
]
|
|
@@ -7594,11 +7736,12 @@ function ToastList() {
|
|
|
7594
7736
|
});
|
|
7595
7737
|
}
|
|
7596
7738
|
function useToast() {
|
|
7597
|
-
const ctx =
|
|
7739
|
+
const ctx = useContext17(ToastContext);
|
|
7598
7740
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
7599
7741
|
return ctx;
|
|
7600
7742
|
}
|
|
7601
7743
|
export {
|
|
7744
|
+
ActivityLine,
|
|
7602
7745
|
AddReactionButton,
|
|
7603
7746
|
AppProvider,
|
|
7604
7747
|
AppShell,
|
|
@@ -7673,6 +7816,8 @@ export {
|
|
|
7673
7816
|
LinkUnavailable,
|
|
7674
7817
|
LinkedIcon,
|
|
7675
7818
|
ListColumn,
|
|
7819
|
+
ListTable,
|
|
7820
|
+
ListTableRow,
|
|
7676
7821
|
MembersDialog,
|
|
7677
7822
|
MembersPill,
|
|
7678
7823
|
Menu,
|