@estiva-app/ui 0.95.0 → 0.97.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/AppShell.d.ts +25 -7
- package/dist/AppShell.d.ts.map +1 -1
- package/dist/ArchivedNotice.d.ts +28 -0
- package/dist/ArchivedNotice.d.ts.map +1 -0
- package/dist/Avatar.d.ts +6 -1
- package/dist/Avatar.d.ts.map +1 -1
- package/dist/AvatarGroup.d.ts +2 -0
- package/dist/AvatarGroup.d.ts.map +1 -1
- package/dist/Button.d.ts +4 -3
- package/dist/Button.d.ts.map +1 -1
- package/dist/Card.d.ts.map +1 -1
- package/dist/CommentBox.d.ts.map +1 -1
- package/dist/ComposerTriggers.d.ts +2 -0
- package/dist/ComposerTriggers.d.ts.map +1 -1
- package/dist/ConversationActions.d.ts +24 -0
- package/dist/ConversationActions.d.ts.map +1 -0
- package/dist/ConversationCard.d.ts +90 -0
- package/dist/ConversationCard.d.ts.map +1 -0
- package/dist/ConversationLayout.d.ts +50 -0
- package/dist/ConversationLayout.d.ts.map +1 -0
- package/dist/ConversationMenu.d.ts +24 -0
- package/dist/ConversationMenu.d.ts.map +1 -0
- package/dist/Divider.d.ts +23 -4
- package/dist/Divider.d.ts.map +1 -1
- package/dist/EditedMarker.d.ts +11 -0
- package/dist/EditedMarker.d.ts.map +1 -0
- package/dist/IconButton.d.ts +3 -3
- package/dist/IconButton.d.ts.map +1 -1
- package/dist/LinkParts.d.ts +4 -1
- package/dist/LinkParts.d.ts.map +1 -1
- package/dist/ListColumn.d.ts +3 -1
- package/dist/ListColumn.d.ts.map +1 -1
- package/dist/MembersDialog.d.ts +4 -0
- package/dist/MembersDialog.d.ts.map +1 -1
- package/dist/MetaText.d.ts +22 -0
- package/dist/MetaText.d.ts.map +1 -0
- package/dist/NavItem.d.ts.map +1 -1
- package/dist/PageHeader.d.ts +50 -0
- package/dist/PageHeader.d.ts.map +1 -0
- package/dist/Panel.d.ts +6 -0
- package/dist/Panel.d.ts.map +1 -1
- package/dist/Person.d.ts +3 -1
- package/dist/Person.d.ts.map +1 -1
- package/dist/PersonTrigger.d.ts +1 -1
- package/dist/PersonTrigger.d.ts.map +1 -1
- package/dist/PinnedComment.d.ts +17 -0
- package/dist/PinnedComment.d.ts.map +1 -0
- package/dist/QuotedLine.d.ts +16 -0
- package/dist/QuotedLine.d.ts.map +1 -0
- package/dist/ReactionHorizon.d.ts +14 -0
- package/dist/ReactionHorizon.d.ts.map +1 -0
- package/dist/RepliesRow.d.ts +27 -0
- package/dist/RepliesRow.d.ts.map +1 -0
- package/dist/ResolveDialog.d.ts +13 -0
- package/dist/ResolveDialog.d.ts.map +1 -0
- package/dist/Select.d.ts +1 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/Skeleton.d.ts +8 -4
- package/dist/Skeleton.d.ts.map +1 -1
- package/dist/Thread.d.ts +38 -0
- package/dist/Thread.d.ts.map +1 -0
- package/dist/TopBar.d.ts +3 -2
- package/dist/TopBar.d.ts.map +1 -1
- package/dist/UrgentMark.d.ts +6 -0
- package/dist/UrgentMark.d.ts.map +1 -0
- package/dist/commentBoxFrame.d.ts +3 -1
- package/dist/commentBoxFrame.d.ts.map +1 -1
- package/dist/conversation.examples.d.ts +52 -0
- package/dist/conversation.examples.d.ts.map +1 -0
- package/dist/editor.js +33 -25
- package/dist/editor.js.map +2 -2
- package/dist/eslint/index.js +2 -1
- package/dist/eslint/index.js.map +2 -2
- package/dist/eslint/no-native-title.d.ts +1 -1
- package/dist/eslint/no-native-title.d.ts.map +1 -1
- package/dist/eslint/no-restyled-part.d.ts.map +1 -1
- package/dist/index.d.ts +18 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1412 -448
- package/dist/index.js.map +4 -4
- package/dist/linked.d.ts +4 -0
- package/dist/linked.d.ts.map +1 -1
- package/dist/linkedFrom.d.ts +2 -0
- package/dist/linkedFrom.d.ts.map +1 -1
- package/dist/looks.d.ts +13 -1
- package/dist/looks.d.ts.map +1 -1
- package/dist/threadCard.d.ts +46 -0
- package/dist/threadCard.d.ts.map +1 -0
- package/package.json +1 -1
- package/registry.json +1889 -544
- package/src/AppShell.mdx +24 -10
- package/src/AppShell.stories.tsx +65 -31
- package/src/AppShell.test.tsx +92 -10
- package/src/AppShell.tsx +108 -18
- package/src/ArchivedNotice.mdx +46 -0
- package/src/ArchivedNotice.stories.tsx +52 -0
- package/src/ArchivedNotice.test.tsx +42 -0
- package/src/ArchivedNotice.tsx +71 -0
- package/src/Avatar.agent.test.tsx +63 -0
- package/src/Avatar.mdx +25 -0
- package/src/Avatar.stories.tsx +13 -0
- package/src/Avatar.tsx +51 -3
- package/src/AvatarGroup.tsx +3 -1
- package/src/Button.mdx +2 -2
- package/src/Button.tsx +8 -6
- package/src/Card.test.tsx +4 -4
- package/src/Card.tsx +6 -2
- package/src/CommentBox.test.tsx +2 -1
- package/src/CommentBox.tsx +14 -7
- package/src/ComposerTriggers.stories.tsx +2 -0
- package/src/ComposerTriggers.tsx +3 -1
- package/src/ConfirmDialog.stories.tsx +12 -0
- package/src/ConversationActions.mdx +47 -0
- package/src/ConversationActions.stories.tsx +39 -0
- package/src/ConversationActions.tsx +96 -0
- package/src/ConversationCard.mdx +72 -0
- package/src/ConversationCard.states.test.tsx +330 -0
- package/src/ConversationCard.stories.tsx +135 -0
- package/src/ConversationCard.test.tsx +159 -0
- package/src/ConversationCard.tsx +524 -0
- package/src/ConversationLayout.mdx +61 -0
- package/src/ConversationLayout.stories.tsx +161 -0
- package/src/ConversationLayout.test.tsx +240 -0
- package/src/ConversationLayout.tsx +233 -0
- package/src/ConversationMenu.mdx +47 -0
- package/src/ConversationMenu.stories.tsx +42 -0
- package/src/ConversationMenu.test.tsx +47 -0
- package/src/ConversationMenu.tsx +57 -0
- package/src/Divider.mdx +36 -1
- package/src/Divider.stories.tsx +57 -0
- package/src/Divider.test.tsx +24 -1
- package/src/Divider.tsx +49 -9
- package/src/EditedMarker.mdx +36 -0
- package/src/EditedMarker.stories.tsx +24 -0
- package/src/EditedMarker.tsx +20 -0
- package/src/IconButton.mdx +2 -1
- package/src/IconButton.tsx +8 -5
- package/src/LinkCard.tsx +3 -3
- package/src/LinkChip.tsx +1 -1
- package/src/LinkParts.mdx +4 -0
- package/src/LinkParts.stories.tsx +10 -0
- package/src/LinkParts.tsx +9 -5
- package/src/LinkRow.tsx +1 -1
- package/src/ListColumn.tsx +9 -3
- package/src/MembersDialog.stories.tsx +11 -0
- package/src/MembersDialog.tsx +7 -3
- package/src/MetaText.mdx +41 -0
- package/src/MetaText.stories.tsx +29 -0
- package/src/MetaText.tsx +38 -0
- package/src/NavItem.tsx +2 -11
- package/src/PageHeader.mdx +123 -0
- package/src/PageHeader.stories.tsx +174 -0
- package/src/PageHeader.test.tsx +99 -0
- package/src/PageHeader.tsx +105 -0
- package/src/Panel.mdx +12 -0
- package/src/Panel.stories.tsx +47 -5
- package/src/Panel.test.tsx +40 -0
- package/src/Panel.tsx +8 -2
- package/src/Person.tsx +4 -2
- package/src/PersonTrigger.tsx +3 -3
- package/src/PinnedComment.mdx +40 -0
- package/src/PinnedComment.stories.tsx +21 -0
- package/src/PinnedComment.tsx +40 -0
- package/src/QuotedLine.mdx +44 -0
- package/src/QuotedLine.stories.tsx +30 -0
- package/src/QuotedLine.test.tsx +34 -0
- package/src/QuotedLine.tsx +33 -0
- package/src/ReactionHorizon.mdx +36 -0
- package/src/ReactionHorizon.stories.tsx +27 -0
- package/src/ReactionHorizon.tsx +27 -0
- package/src/RepliesRow.mdx +45 -0
- package/src/RepliesRow.stories.tsx +33 -0
- package/src/RepliesRow.test.tsx +47 -0
- package/src/RepliesRow.tsx +86 -0
- package/src/ReplyCard.mdx +50 -0
- package/src/ReplyCard.stories.tsx +68 -0
- package/src/ResolveDialog.mdx +44 -0
- package/src/ResolveDialog.stories.tsx +23 -0
- package/src/ResolveDialog.test.tsx +53 -0
- package/src/ResolveDialog.tsx +58 -0
- package/src/Select.tsx +12 -2
- package/src/Skeleton.stories.tsx +4 -1
- package/src/Skeleton.tsx +33 -4
- package/src/Thread.mdx +53 -0
- package/src/Thread.stories.tsx +167 -0
- package/src/Thread.test.tsx +83 -0
- package/src/Thread.tsx +113 -0
- package/src/TopBar.mdx +8 -6
- package/src/TopBar.stories.tsx +4 -3
- package/src/TopBar.tsx +8 -3
- package/src/UrgentMark.mdx +37 -0
- package/src/UrgentMark.stories.tsx +27 -0
- package/src/UrgentMark.tsx +15 -0
- package/src/commentBoxFrame.tsx +8 -4
- package/src/conversation.examples.tsx +135 -0
- package/src/eslint/no-native-title.ts +1 -1
- package/src/eslint/no-restyled-part.ts +1 -0
- package/src/index.ts +19 -2
- package/src/linked.ts +4 -0
- package/src/linkedFrom.ts +5 -3
- package/src/looks.ts +18 -2
- package/src/registry/registry.test.ts +9 -7
- package/src/threadCard.ts +84 -0
- package/stories/Choosing.mdx +21 -1
- package/tokens.css +14 -10
package/dist/index.js
CHANGED
|
@@ -36,6 +36,7 @@ function useInAppClick(href, onClick) {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// src/AppShell.tsx
|
|
39
|
+
import { useCallback, useState } from "react";
|
|
39
40
|
import { IconLayoutSidebarLeftCollapse, IconLayoutSidebarLeftExpand } from "@tabler/icons-react";
|
|
40
41
|
|
|
41
42
|
// src/cn.ts
|
|
@@ -95,6 +96,9 @@ var SIDEBAR_ROW_CLASSES = "rounded-lg transition-colors";
|
|
|
95
96
|
var SIDEBAR_ROW_TEXT_CLASSES = "text-text-secondary hover:text-text-primary";
|
|
96
97
|
var MUTED_CONTROL_CLASSES = "text-text-secondary hover:bg-bg-hover hover:text-text-primary";
|
|
97
98
|
var MENU_TRIGGER_CLASSES = "cursor-pointer rounded-md transition-colors hover:bg-bg-hover data-[popup-open]:bg-bg-hover";
|
|
99
|
+
var FOLD_MOTION_CLASSES = "duration-300 ease-in-out motion-reduce:transition-none";
|
|
100
|
+
var FOLDED_CLASSES = "invisible opacity-0";
|
|
101
|
+
var UNFOLDED_CLASSES = "visible opacity-100";
|
|
98
102
|
var COLLAPSIBLE_PANEL_CLASSES = "h-[var(--collapsible-panel-height)] overflow-hidden transition-[height] duration-150 ease-out motion-reduce:transition-none data-[starting-style]:h-0 data-[ending-style]:h-0";
|
|
99
103
|
var TYPE_TILE_CLASSES = "size-9 rounded-md bg-bg-active flex items-center justify-center shrink-0 text-text-secondary";
|
|
100
104
|
var QUOTE_BAR_CLASSES = "border-l-2 border-border-default pl-3";
|
|
@@ -146,8 +150,8 @@ var HAIRLINE_HELD_CLASSES = {
|
|
|
146
150
|
none: "border-border-default"
|
|
147
151
|
};
|
|
148
152
|
var ATTENTION_CLASSES = {
|
|
149
|
-
accent: "border-accent-
|
|
150
|
-
warning: "border-warning-
|
|
153
|
+
accent: "border-accent-outline hover:border-accent-outline",
|
|
154
|
+
warning: "border-warning-outline hover:border-warning-outline"
|
|
151
155
|
};
|
|
152
156
|
function Card({
|
|
153
157
|
fill = "surface",
|
|
@@ -290,7 +294,7 @@ function TooltipTrigger({ label, shortcut, placement = "top", children }) {
|
|
|
290
294
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
291
295
|
function IconButton({
|
|
292
296
|
variant = "muted",
|
|
293
|
-
pressed,
|
|
297
|
+
pressed: pressed2,
|
|
294
298
|
glow = false,
|
|
295
299
|
className,
|
|
296
300
|
children,
|
|
@@ -324,13 +328,16 @@ function IconButton({
|
|
|
324
328
|
!off && (variant === "muted" || variant === "resolve") && MUTED_CONTROL_CLASSES,
|
|
325
329
|
!off && variant === "outlined" && "border border-border-default hover:bg-bg-hover text-text-secondary",
|
|
326
330
|
!off && variant === "current" && "hover:bg-bg-hover",
|
|
327
|
-
|
|
331
|
+
// Not yet usable, as the comment box's Send while the box is empty: the disabled fill, as every app shows it
|
|
332
|
+
// (Katerina, 1 November). In Leaf, a quiet icon with no fill, in the muted words' colour, so it still reads on
|
|
333
|
+
// the box's grey (31 October: the disabled fill and colour were 1.06 and 1.29 : 1 there).
|
|
334
|
+
off && variant === "primary" && "bg-bg-disabled text-text-disabled leaf:bg-transparent leaf:text-text-muted",
|
|
328
335
|
off && (variant === "muted" || variant === "resolve") && "text-text-disabled",
|
|
329
336
|
off && variant === "outlined" && "border border-border-default text-text-disabled",
|
|
330
337
|
// Always, disabled too: the colour of where it sits, and Resolve's green.
|
|
331
338
|
variant === "current" && "text-current",
|
|
332
|
-
variant === "resolve" && "
|
|
333
|
-
|
|
339
|
+
variant === "resolve" && "hover:bg-success-muted hover:text-success-default",
|
|
340
|
+
pressed2 && "bg-bg-active text-text-primary",
|
|
334
341
|
glow && "signal:shadow-glow-accent",
|
|
335
342
|
// `pointer-events-none` only where the button is truly out of reach:
|
|
336
343
|
// with a `disabledReason` the button IS the tooltip's trigger, and a
|
|
@@ -347,7 +354,7 @@ function IconButton({
|
|
|
347
354
|
disabled: unusable,
|
|
348
355
|
focusableWhenDisabled: !!disabledReason,
|
|
349
356
|
className: (state) => look(state.disabled),
|
|
350
|
-
"aria-pressed":
|
|
357
|
+
"aria-pressed": pressed2,
|
|
351
358
|
...props,
|
|
352
359
|
children
|
|
353
360
|
}
|
|
@@ -447,7 +454,8 @@ function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceho
|
|
|
447
454
|
"header",
|
|
448
455
|
{
|
|
449
456
|
className: cn(
|
|
450
|
-
"flex h-[52px] items-center
|
|
457
|
+
"flex h-[52px] items-center pr-[26px]",
|
|
458
|
+
menu && !floating ? "pl-3.5" : "pl-5",
|
|
451
459
|
floating ? "pointer-events-none absolute left-0 right-0 top-0 z-10" : cn("shrink-0 gap-4", variant === "solid" && "border-b border-border-default bg-bg-surface"),
|
|
452
460
|
className
|
|
453
461
|
),
|
|
@@ -466,7 +474,7 @@ function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceho
|
|
|
466
474
|
// src/AppShell.tsx
|
|
467
475
|
import { Fragment, jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
468
476
|
function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlaceholder, identity, banner, nav, navOpen = true, onNavOpenChange, children }) {
|
|
469
|
-
const fold = onNavOpenChange &&
|
|
477
|
+
const fold = onNavOpenChange && /* @__PURE__ */ jsx10(
|
|
470
478
|
IconButton,
|
|
471
479
|
{
|
|
472
480
|
tooltip: navOpen ? "Hide the sidebar" : "Show the sidebar",
|
|
@@ -479,6 +487,26 @@ function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlace
|
|
|
479
487
|
);
|
|
480
488
|
const bar = /* @__PURE__ */ jsx10(TopBar, { variant, menu: menu ?? fold, logo, search, onSearch, searchPlaceholder, right: identity });
|
|
481
489
|
const inset = variant === "inset";
|
|
490
|
+
const margin = variant === "solid" ? 0 : 16;
|
|
491
|
+
const folding = /* @__PURE__ */ jsx10(
|
|
492
|
+
"div",
|
|
493
|
+
{
|
|
494
|
+
className: cn("grid shrink-0 transition-[grid-template-columns]", FOLD_MOTION_CLASSES),
|
|
495
|
+
style: { gridTemplateColumns: navOpen ? "0px 1fr" : `${margin}px 0fr` },
|
|
496
|
+
children: /* @__PURE__ */ jsx10(
|
|
497
|
+
"div",
|
|
498
|
+
{
|
|
499
|
+
inert: !navOpen,
|
|
500
|
+
className: cn(
|
|
501
|
+
"col-start-2 flex min-w-0 overflow-hidden transition-[opacity,visibility]",
|
|
502
|
+
FOLD_MOTION_CLASSES,
|
|
503
|
+
navOpen ? UNFOLDED_CLASSES : FOLDED_CLASSES
|
|
504
|
+
),
|
|
505
|
+
children: /* @__PURE__ */ jsx10(SidebarOnGround.Provider, { value: inset, children: nav })
|
|
506
|
+
}
|
|
507
|
+
)
|
|
508
|
+
}
|
|
509
|
+
);
|
|
482
510
|
if (variant === "floating") {
|
|
483
511
|
return (
|
|
484
512
|
// `signal-canvas`: in the Signal theme, the preset draws the control-room dot
|
|
@@ -487,7 +515,7 @@ function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlace
|
|
|
487
515
|
/* @__PURE__ */ jsxs4("div", { className: "signal-canvas relative h-full min-h-0 overflow-hidden bg-bg-base", children: [
|
|
488
516
|
bar,
|
|
489
517
|
/* @__PURE__ */ jsxs4("div", { className: "flex h-full pb-4 pr-4 pt-[52px]", children: [
|
|
490
|
-
|
|
518
|
+
folding,
|
|
491
519
|
/* @__PURE__ */ jsxs4(
|
|
492
520
|
"div",
|
|
493
521
|
{
|
|
@@ -522,16 +550,58 @@ function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlace
|
|
|
522
550
|
/* @__PURE__ */ jsxs4("div", { className: "relative flex h-full min-h-0 flex-col overflow-hidden bg-bg-base text-text-primary", children: [
|
|
523
551
|
bar,
|
|
524
552
|
/* @__PURE__ */ jsxs4("div", { className: "flex min-h-0 flex-1", children: [
|
|
525
|
-
|
|
526
|
-
!navOpen && inset && /* @__PURE__ */ jsx10("div", { className: "w-4 flex-none" }),
|
|
553
|
+
folding,
|
|
527
554
|
inset ? /* @__PURE__ */ jsx10(Card, { fill: "surface", clip: true, className: "mb-4 mr-4 flex min-h-0 min-w-0 flex-1 flex-col", children: column }) : /* @__PURE__ */ jsx10("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: column })
|
|
528
555
|
] })
|
|
529
556
|
] })
|
|
530
557
|
);
|
|
531
558
|
}
|
|
559
|
+
var FOLDED = "1";
|
|
560
|
+
function keptFolded(key) {
|
|
561
|
+
try {
|
|
562
|
+
return window.localStorage.getItem(key) === FOLDED;
|
|
563
|
+
} catch {
|
|
564
|
+
return false;
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
function keepFolded(key, folded) {
|
|
568
|
+
try {
|
|
569
|
+
if (folded) window.localStorage.setItem(key, FOLDED);
|
|
570
|
+
else window.localStorage.removeItem(key);
|
|
571
|
+
} catch {
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
function reloaded() {
|
|
575
|
+
const [entry] = typeof performance.getEntriesByType === "function" ? performance.getEntriesByType("navigation") : [];
|
|
576
|
+
return entry?.type === "reload";
|
|
577
|
+
}
|
|
578
|
+
var shown = /* @__PURE__ */ new Map();
|
|
579
|
+
function onLoad({ storageKey, isFile, foldWhen }) {
|
|
580
|
+
if (foldWhen && typeof window.matchMedia === "function" && window.matchMedia(foldWhen).matches) return false;
|
|
581
|
+
if (!keptFolded(storageKey)) return true;
|
|
582
|
+
if (!isFile?.() || reloaded()) return false;
|
|
583
|
+
keepFolded(storageKey, false);
|
|
584
|
+
return true;
|
|
585
|
+
}
|
|
586
|
+
function useSidebarFold(options) {
|
|
587
|
+
const { storageKey } = options;
|
|
588
|
+
const [open, setOpen] = useState(() => {
|
|
589
|
+
if (!shown.has(storageKey)) shown.set(storageKey, onLoad(options));
|
|
590
|
+
return shown.get(storageKey);
|
|
591
|
+
});
|
|
592
|
+
const change = useCallback(
|
|
593
|
+
(next) => {
|
|
594
|
+
setOpen(next);
|
|
595
|
+
shown.set(storageKey, next);
|
|
596
|
+
keepFolded(storageKey, !next);
|
|
597
|
+
},
|
|
598
|
+
[storageKey]
|
|
599
|
+
);
|
|
600
|
+
return [open, change];
|
|
601
|
+
}
|
|
532
602
|
|
|
533
603
|
// src/AttachmentCard.tsx
|
|
534
|
-
import { useEffect as useEffect2, useLayoutEffect, useRef as useRef3, useState } from "react";
|
|
604
|
+
import { useEffect as useEffect2, useLayoutEffect, useRef as useRef3, useState as useState2 } from "react";
|
|
535
605
|
import { Button as BaseButton3 } from "@base-ui/react/button";
|
|
536
606
|
import {
|
|
537
607
|
IconAlertCircle,
|
|
@@ -640,7 +710,7 @@ function TypeIcon({ name }) {
|
|
|
640
710
|
}
|
|
641
711
|
function Truncating({ text, hint, className, wrapperClassName, placement }) {
|
|
642
712
|
const ref = useRef3(null);
|
|
643
|
-
const [cut, setCut] =
|
|
713
|
+
const [cut, setCut] = useState2(false);
|
|
644
714
|
useLayoutEffect(() => {
|
|
645
715
|
const el = ref.current;
|
|
646
716
|
if (!el) return;
|
|
@@ -681,7 +751,7 @@ function RemoveBadge({ label, onRemove, className }) {
|
|
|
681
751
|
);
|
|
682
752
|
}
|
|
683
753
|
function useRemoteImage(url, fetchImage) {
|
|
684
|
-
const [result, setResult] =
|
|
754
|
+
const [result, setResult] = useState2({});
|
|
685
755
|
const fetcher = useRef3(fetchImage);
|
|
686
756
|
fetcher.current = fetchImage;
|
|
687
757
|
useEffect2(() => {
|
|
@@ -753,7 +823,7 @@ function AttachmentCard({
|
|
|
753
823
|
const fetching = !src && !!remoteSrc && !!fetchImage;
|
|
754
824
|
const drawnState = state !== "ready" ? state : image && fetching ? remote.failed ? "unreadable" : picture ? "ready" : "loading" : state;
|
|
755
825
|
const address = href ?? (!image && fetching ? remote.src : void 0);
|
|
756
|
-
const [opened, setOpened] =
|
|
826
|
+
const [opened, setOpened] = useState2(false);
|
|
757
827
|
const full = useRemoteImage(opened ? remoteFullSrc : void 0, fetchImage);
|
|
758
828
|
const openable = image && !!picture && !pending;
|
|
759
829
|
const openPicture = onOpen ?? (openable ? () => setOpened(true) : void 0);
|
|
@@ -907,12 +977,33 @@ var hueFor = (key) => {
|
|
|
907
977
|
for (let i = 0; i < key.length; i++) h = h * 31 + key.charCodeAt(i) | 0;
|
|
908
978
|
return HUES[Math.abs(h) % HUES.length];
|
|
909
979
|
};
|
|
980
|
+
var groundFor = (hue) => `linear-gradient(160deg, color-mix(in srgb, ${hue} 92%, #fff) 0%, color-mix(in srgb, ${hue} 70%, #0b0d11) 100%)`;
|
|
910
981
|
var initialsFor = (name) => {
|
|
911
982
|
const words = name.split(/\s+/).slice(0, 2).filter((w) => /^[\p{L}\p{N}]/u.test(w));
|
|
912
983
|
const initials = words.map((w) => w[0]).join("") || name.trim().charAt(0);
|
|
913
984
|
return initials.toUpperCase();
|
|
914
985
|
};
|
|
915
|
-
|
|
986
|
+
var ROBOT_PATH = "M13.5 2C13.5 2.44425 13.3069 2.84339 13 3.11805V5H18C19.6569 5 21 6.34315 21 8V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V8C3 6.34315 4.34315 5 6 5H11V3.11805C10.6931 2.84339 10.5 2.44425 10.5 2C10.5 1.17157 11.1716 0.5 12 0.5C12.8284 0.5 13.5 1.17157 13.5 2ZM0 10H2V16H0V10ZM24 10H22V16H24V10ZM9 14.5C9.82843 14.5 10.5 13.8284 10.5 13C10.5 12.1716 9.82843 11.5 9 11.5C8.17157 11.5 7.5 12.1716 7.5 13C7.5 13.8284 8.17157 14.5 9 14.5ZM16.5 13C16.5 12.1716 15.8284 11.5 15 11.5C14.1716 11.5 13.5 12.1716 13.5 13C13.5 13.8284 14.1716 14.5 15 14.5C15.8284 14.5 16.5 13.8284 16.5 13Z";
|
|
987
|
+
var AGENT_HUE = "#d4ee4a";
|
|
988
|
+
function AgentFace({ size }) {
|
|
989
|
+
const glyph = Math.round(size * 0.625);
|
|
990
|
+
return /* @__PURE__ */ jsx13(
|
|
991
|
+
BaseAvatar.Fallback,
|
|
992
|
+
{
|
|
993
|
+
render: /* @__PURE__ */ jsx13("div", {}),
|
|
994
|
+
className: "w-full h-full flex items-center justify-center",
|
|
995
|
+
style: {
|
|
996
|
+
/* eslint-disable no-restricted-syntax -- @estiva-escape: one colour in every theme, on the initials' light
|
|
997
|
+
and shade, and their ink: a palette, as HUES, so none of it can be a token. */
|
|
998
|
+
background: groundFor(AGENT_HUE),
|
|
999
|
+
color: "#08121c"
|
|
1000
|
+
/* eslint-enable no-restricted-syntax */
|
|
1001
|
+
},
|
|
1002
|
+
children: /* @__PURE__ */ jsx13("svg", { width: glyph, height: glyph, viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": true, children: /* @__PURE__ */ jsx13("path", { d: ROBOT_PATH }) })
|
|
1003
|
+
}
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
function Avatar({ src, name, alt = "", size = 36, label: spoken, bot = false, className }) {
|
|
916
1007
|
const label = name || alt;
|
|
917
1008
|
const pictureFor = usePictureFor();
|
|
918
1009
|
const picture = src ?? (label && pictureFor ? pictureFor(label) ?? void 0 : void 0);
|
|
@@ -933,7 +1024,7 @@ function Avatar({ src, name, alt = "", size = 36, label: spoken, className }) {
|
|
|
933
1024
|
className: "w-full h-full object-cover data-[error]:hidden"
|
|
934
1025
|
}
|
|
935
1026
|
),
|
|
936
|
-
label ? /* @__PURE__ */ jsx13(
|
|
1027
|
+
bot ? /* @__PURE__ */ jsx13(AgentFace, { size }) : label ? /* @__PURE__ */ jsx13(
|
|
937
1028
|
BaseAvatar.Fallback,
|
|
938
1029
|
{
|
|
939
1030
|
render: /* @__PURE__ */ jsx13("div", {}),
|
|
@@ -947,7 +1038,7 @@ function Avatar({ src, name, alt = "", size = 36, label: spoken, className }) {
|
|
|
947
1038
|
// ink cannot be a token either.
|
|
948
1039
|
color: "#08121c",
|
|
949
1040
|
fontSize: Math.round(size * 0.36),
|
|
950
|
-
background:
|
|
1041
|
+
background: groundFor(hueFor(label))
|
|
951
1042
|
/* eslint-enable no-restricted-syntax */
|
|
952
1043
|
},
|
|
953
1044
|
children: /* @__PURE__ */ jsx13("span", { className: "[text-box:trim-both_cap_alphabetic]", children: initialsFor(label) })
|
|
@@ -975,7 +1066,7 @@ function AvatarGroup({ members, size = 24, on = "surface" }) {
|
|
|
975
1066
|
{
|
|
976
1067
|
className: "relative flex rounded-sm",
|
|
977
1068
|
style: { marginRight: -overlap, boxShadow: `0 0 0 ${ring}px var(--bg-${on})` },
|
|
978
|
-
children: /* @__PURE__ */ jsx14(Avatar, { size, name: member.name, src: member.picture, label: member.name })
|
|
1069
|
+
children: /* @__PURE__ */ jsx14(Avatar, { size, name: member.name, src: member.picture, bot: member.bot, label: member.name })
|
|
979
1070
|
},
|
|
980
1071
|
i
|
|
981
1072
|
)
|
|
@@ -1021,7 +1112,8 @@ function Button({
|
|
|
1021
1112
|
// Extra right padding beside a leading icon, for optical balance.
|
|
1022
1113
|
size === "default" && (hasLeadingIcon ? "pl-2 pr-3" : "px-2"),
|
|
1023
1114
|
size === "small" && (hasLeadingIcon ? "pl-1.5 pr-2" : "px-1.5"),
|
|
1024
|
-
!off &&
|
|
1115
|
+
!off && variant === "primary" && "bg-accent-primary hover:bg-accent-hover text-text-inverse cursor-pointer signal:font-semibold",
|
|
1116
|
+
!off && variant === "resolve" && "cursor-pointer signal:font-semibold",
|
|
1025
1117
|
// @estiva-escape(no-copied-look): W2 (Katerina, 24 September: leave alone): an outlined button shares four words with Reaction's pill by coincidence
|
|
1026
1118
|
!off && variant === "outlined" && "border border-border-default hover:bg-bg-hover text-text-primary cursor-pointer",
|
|
1027
1119
|
!off && variant === "muted" && "hover:bg-bg-hover text-text-primary cursor-pointer",
|
|
@@ -1034,8 +1126,8 @@ function Button({
|
|
|
1034
1126
|
// and a prevented `onClick`), so nothing else needs it.
|
|
1035
1127
|
off && !disabledReason && "pointer-events-none",
|
|
1036
1128
|
off && variant === "outlined" && "border border-border-default",
|
|
1037
|
-
// Disabled too, as it always drew.
|
|
1038
|
-
variant === "resolve" && "
|
|
1129
|
+
// Disabled too, as it always drew; in every theme, as Signal drew it (Katerina, 31 October).
|
|
1130
|
+
variant === "resolve" && "border border-border-default bg-transparent text-text-primary shadow-none transition-colors hover:border-success-outline hover:bg-success-muted hover:text-success-default",
|
|
1039
1131
|
className
|
|
1040
1132
|
);
|
|
1041
1133
|
const button = href && !unusable ? /* @__PURE__ */ jsxs8("a", { href, ...external ? { target: "_blank", rel: "noopener noreferrer" } : {}, className: look(false), ...anchor, onClick: inApp, children: [
|
|
@@ -1060,7 +1152,7 @@ function MembersPill({ members, count, onClick, className }) {
|
|
|
1060
1152
|
}
|
|
1061
1153
|
|
|
1062
1154
|
// src/MembersDialog.tsx
|
|
1063
|
-
import { useId, useState as
|
|
1155
|
+
import { useId as useId2, useState as useState4 } from "react";
|
|
1064
1156
|
import { IconArrowLeft, IconUserMinus, IconUserPlus } from "@tabler/icons-react";
|
|
1065
1157
|
|
|
1066
1158
|
// src/Chip.tsx
|
|
@@ -1094,7 +1186,7 @@ function Chip({ type = "neutral", label, leadingIcon, trailingIcon, href, onClic
|
|
|
1094
1186
|
}
|
|
1095
1187
|
|
|
1096
1188
|
// src/ChipInput.tsx
|
|
1097
|
-
import { useMemo as useMemo2, useState as
|
|
1189
|
+
import { useMemo as useMemo2, useState as useState3 } from "react";
|
|
1098
1190
|
import { Button as BaseButton5 } from "@base-ui/react/button";
|
|
1099
1191
|
import { Combobox } from "@base-ui/react/combobox";
|
|
1100
1192
|
import { IconX as IconX3 } from "@tabler/icons-react";
|
|
@@ -1105,45 +1197,11 @@ import { IconChevronRight } from "@tabler/icons-react";
|
|
|
1105
1197
|
import { Menu as BaseMenu } from "@base-ui/react/menu";
|
|
1106
1198
|
|
|
1107
1199
|
// src/Divider.tsx
|
|
1108
|
-
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
1200
|
+
import { createContext as createContext4, useContext as useContext4, useId } from "react";
|
|
1109
1201
|
import { Separator } from "@base-ui/react/separator";
|
|
1110
|
-
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1111
|
-
var DividerInPanel = createContext4(false);
|
|
1112
|
-
function Divider({ orientation = "horizontal", label, tone = "default", className }) {
|
|
1113
|
-
const inset = useContext4(DividerInPanel) ? "mx-0" : "mx-3";
|
|
1114
|
-
if (label && orientation === "horizontal") {
|
|
1115
|
-
const line = tone === "warning" ? "bg-warning-muted" : "bg-border-subtle";
|
|
1116
|
-
return /* @__PURE__ */ jsxs11(
|
|
1117
|
-
Separator,
|
|
1118
|
-
{
|
|
1119
|
-
orientation: "horizontal",
|
|
1120
|
-
"aria-label": label,
|
|
1121
|
-
className: cn("flex shrink-0 items-center gap-2", inset, className),
|
|
1122
|
-
children: [
|
|
1123
|
-
/* @__PURE__ */ jsx18("span", { "aria-hidden": "true", className: cn("h-px flex-1", line) }),
|
|
1124
|
-
/* @__PURE__ */ jsx18("span", { className: cn("shrink-0 text-caption", tone === "warning" ? "text-warning-default" : "text-text-muted"), children: label }),
|
|
1125
|
-
/* @__PURE__ */ jsx18("span", { "aria-hidden": "true", className: cn("h-px flex-1", line) })
|
|
1126
|
-
]
|
|
1127
|
-
}
|
|
1128
|
-
);
|
|
1129
|
-
}
|
|
1130
|
-
return /* @__PURE__ */ jsx18(
|
|
1131
|
-
Separator,
|
|
1132
|
-
{
|
|
1133
|
-
orientation,
|
|
1134
|
-
className: cn("shrink-0 bg-border-subtle", orientation === "horizontal" ? cn("h-px", inset) : "w-px self-stretch", className)
|
|
1135
|
-
}
|
|
1136
|
-
);
|
|
1137
|
-
}
|
|
1138
|
-
|
|
1139
|
-
// src/triggerDisabled.ts
|
|
1140
|
-
function triggerDisabled(trigger) {
|
|
1141
|
-
const props = trigger.props;
|
|
1142
|
-
return !!(props.disabled || props.disabledReason);
|
|
1143
|
-
}
|
|
1144
1202
|
|
|
1145
1203
|
// src/SectionLabel.tsx
|
|
1146
|
-
import { jsx as
|
|
1204
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1147
1205
|
function SectionLabel({
|
|
1148
1206
|
children,
|
|
1149
1207
|
tone = "primary",
|
|
@@ -1151,7 +1209,7 @@ function SectionLabel({
|
|
|
1151
1209
|
folds = false,
|
|
1152
1210
|
className
|
|
1153
1211
|
}) {
|
|
1154
|
-
return /* @__PURE__ */
|
|
1212
|
+
return /* @__PURE__ */ jsx18(
|
|
1155
1213
|
"span",
|
|
1156
1214
|
{
|
|
1157
1215
|
className: cn(
|
|
@@ -1171,6 +1229,53 @@ function SectionLabel({
|
|
|
1171
1229
|
);
|
|
1172
1230
|
}
|
|
1173
1231
|
|
|
1232
|
+
// src/Divider.tsx
|
|
1233
|
+
import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1234
|
+
var DividerInPanel = createContext4(false);
|
|
1235
|
+
function Divider({ orientation = "horizontal", label, tone = "default", look = "caption", sticky = false, className }) {
|
|
1236
|
+
const inset = useContext4(DividerInPanel) ? "mx-0" : "mx-3";
|
|
1237
|
+
const labelId = useId();
|
|
1238
|
+
if (label != null && label !== false && label !== "" && orientation === "horizontal") {
|
|
1239
|
+
const line = tone === "warning" ? "bg-warning-muted" : "bg-border-subtle";
|
|
1240
|
+
const named2 = typeof label === "string" ? { "aria-label": label } : { "aria-labelledby": labelId };
|
|
1241
|
+
const id = typeof label === "string" ? void 0 : labelId;
|
|
1242
|
+
const stays = sticky && "sticky top-0 z-10 bg-bg-surface";
|
|
1243
|
+
if (look === "section") {
|
|
1244
|
+
return /* @__PURE__ */ jsxs11(Separator, { orientation: "horizontal", ...named2, className: cn("flex shrink-0 items-center gap-2 px-2 py-1.5", stays, className), children: [
|
|
1245
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border-subtle" }),
|
|
1246
|
+
/* @__PURE__ */ jsx19("span", { id, className: "flex min-w-0", children: /* @__PURE__ */ jsx19(SectionLabel, { tone: "muted", truncate: true, children: label }) }),
|
|
1247
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border-subtle" })
|
|
1248
|
+
] });
|
|
1249
|
+
}
|
|
1250
|
+
return /* @__PURE__ */ jsxs11(
|
|
1251
|
+
Separator,
|
|
1252
|
+
{
|
|
1253
|
+
orientation: "horizontal",
|
|
1254
|
+
...named2,
|
|
1255
|
+
className: cn("flex shrink-0 items-center gap-2", inset, stays, className),
|
|
1256
|
+
children: [
|
|
1257
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: cn("h-px flex-1", line) }),
|
|
1258
|
+
/* @__PURE__ */ jsx19("span", { id, className: cn("shrink-0 text-caption", tone === "warning" ? "text-warning-default" : "text-text-muted"), children: label }),
|
|
1259
|
+
/* @__PURE__ */ jsx19("span", { "aria-hidden": "true", className: cn("h-px flex-1", line) })
|
|
1260
|
+
]
|
|
1261
|
+
}
|
|
1262
|
+
);
|
|
1263
|
+
}
|
|
1264
|
+
return /* @__PURE__ */ jsx19(
|
|
1265
|
+
Separator,
|
|
1266
|
+
{
|
|
1267
|
+
orientation,
|
|
1268
|
+
className: cn("shrink-0 bg-border-subtle", orientation === "horizontal" ? cn("h-px", inset) : "w-px self-stretch", className)
|
|
1269
|
+
}
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// src/triggerDisabled.ts
|
|
1274
|
+
function triggerDisabled(trigger) {
|
|
1275
|
+
const props = trigger.props;
|
|
1276
|
+
return !!(props.disabled || props.disabledReason);
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1174
1279
|
// src/Menu.tsx
|
|
1175
1280
|
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1176
1281
|
var MenuContext = createContext5(null);
|
|
@@ -1432,8 +1537,8 @@ function ChipInput({
|
|
|
1432
1537
|
rowLeading,
|
|
1433
1538
|
...aria
|
|
1434
1539
|
}) {
|
|
1435
|
-
const [query, setQuery] =
|
|
1436
|
-
const [box, setBox] =
|
|
1540
|
+
const [query, setQuery] = useState3("");
|
|
1541
|
+
const [box, setBox] = useState3(null);
|
|
1437
1542
|
const available = useMemo2(() => {
|
|
1438
1543
|
const chosen = new Set(value.map((o) => o.id));
|
|
1439
1544
|
const excluded = new Set(excludeIds);
|
|
@@ -1763,10 +1868,10 @@ function Form({ onSubmit, busy: ownBusy = false, enterSends = true, layout = "fi
|
|
|
1763
1868
|
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1764
1869
|
var LEADING_CLASSES = "size-8 rounded-md bg-accent-muted flex items-center justify-center shrink-0 text-accent-text";
|
|
1765
1870
|
function MembersDialog({ members, count, self, candidates = [], onAdd, note, initialView = "list", onClose }) {
|
|
1766
|
-
const [view, setView] =
|
|
1767
|
-
const [chosen, setChosen] =
|
|
1768
|
-
const [toggling, setToggling] =
|
|
1769
|
-
const formId =
|
|
1871
|
+
const [view, setView] = useState4(onAdd ? initialView : "list");
|
|
1872
|
+
const [chosen, setChosen] = useState4([]);
|
|
1873
|
+
const [toggling, setToggling] = useState4(false);
|
|
1874
|
+
const formId = useId2();
|
|
1770
1875
|
const toggle = async () => {
|
|
1771
1876
|
if (!self || toggling) return;
|
|
1772
1877
|
setToggling(true);
|
|
@@ -1808,8 +1913,8 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
1808
1913
|
options: candidates,
|
|
1809
1914
|
placeholder: "Search people...",
|
|
1810
1915
|
excludeIds: members.map((m) => m.id),
|
|
1811
|
-
chipLeading: (o) => /* @__PURE__ */ jsx26(Avatar, { name: o.label, src: o.picture, size: 16 }),
|
|
1812
|
-
rowLeading: (o) => /* @__PURE__ */ jsx26(Avatar, { name: o.label, src: o.picture, size: 32 }),
|
|
1916
|
+
chipLeading: (o) => /* @__PURE__ */ jsx26(Avatar, { name: o.label, src: o.picture, bot: o.bot, size: 16 }),
|
|
1917
|
+
rowLeading: (o) => /* @__PURE__ */ jsx26(Avatar, { name: o.label, src: o.picture, bot: o.bot, size: 32 }),
|
|
1813
1918
|
autoFocus: true
|
|
1814
1919
|
}
|
|
1815
1920
|
) }) })
|
|
@@ -1852,7 +1957,7 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
1852
1957
|
)
|
|
1853
1958
|
] }),
|
|
1854
1959
|
roster.map((member) => /* @__PURE__ */ jsxs17("div", { className: "flex h-12 items-center gap-3 px-5", children: [
|
|
1855
|
-
/* @__PURE__ */ jsx26(Avatar, { size: 32, name: member.name, src: member.picture }),
|
|
1960
|
+
/* @__PURE__ */ jsx26(Avatar, { size: 32, name: member.name, src: member.picture, bot: member.bot }),
|
|
1856
1961
|
/* @__PURE__ */ jsxs17("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-[2px]", children: [
|
|
1857
1962
|
/* @__PURE__ */ jsx26("div", { className: "truncate text-body-2 text-text-primary", children: member.name }),
|
|
1858
1963
|
member.caption && /* @__PURE__ */ jsx26("div", { className: "truncate text-caption text-text-secondary", children: member.caption })
|
|
@@ -1889,7 +1994,7 @@ function Banner({ tone, children, icon, action, onDismiss, dismissLabel = "Dismi
|
|
|
1889
1994
|
}
|
|
1890
1995
|
|
|
1891
1996
|
// src/BlockHandle.tsx
|
|
1892
|
-
import { useCallback, useEffect as useEffect3, useRef as useRef6, useState as
|
|
1997
|
+
import { useCallback as useCallback2, useEffect as useEffect3, useRef as useRef6, useState as useState5 } from "react";
|
|
1893
1998
|
import { IconGripVertical } from "@tabler/icons-react";
|
|
1894
1999
|
import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1895
2000
|
function readId(element) {
|
|
@@ -1919,10 +2024,10 @@ function firstLineOffset(element) {
|
|
|
1919
2024
|
function BlockHandle({ actions, editing, children, className }) {
|
|
1920
2025
|
const frame = useRef6(null);
|
|
1921
2026
|
const content = useRef6(null);
|
|
1922
|
-
const [block, setBlock] =
|
|
1923
|
-
const [top, setTop] =
|
|
1924
|
-
const [open, setOpen] =
|
|
1925
|
-
const follow =
|
|
2027
|
+
const [block, setBlock] = useState5(null);
|
|
2028
|
+
const [top, setTop] = useState5(0);
|
|
2029
|
+
const [open, setOpen] = useState5(false);
|
|
2030
|
+
const follow = useCallback2(
|
|
1926
2031
|
(y) => {
|
|
1927
2032
|
if (!content.current || !frame.current) return;
|
|
1928
2033
|
const found = editing ? editing.find(y) : blockAtY(readingBlocks(content.current.firstElementChild), y);
|
|
@@ -1940,7 +2045,7 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
1940
2045
|
const rows = editing && block ? editing.rows(block) : null;
|
|
1941
2046
|
const own = actions && block ? actions(block) : null;
|
|
1942
2047
|
const dragging = useRef6(false);
|
|
1943
|
-
const [line, setLine] =
|
|
2048
|
+
const [line, setLine] = useState5(null);
|
|
1944
2049
|
const inGutter = (e) => dragging.current && !!editing && !!content.current && !content.current.contains(e.target);
|
|
1945
2050
|
const landing = (y) => {
|
|
1946
2051
|
const target = editing?.find(y);
|
|
@@ -2092,7 +2197,7 @@ import {
|
|
|
2092
2197
|
useLayoutEffect as useLayoutEffect3,
|
|
2093
2198
|
useMemo as useMemo3,
|
|
2094
2199
|
useRef as useRef7,
|
|
2095
|
-
useState as
|
|
2200
|
+
useState as useState6
|
|
2096
2201
|
} from "react";
|
|
2097
2202
|
import { Dialog as Dialog3 } from "@base-ui/react/dialog";
|
|
2098
2203
|
import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
@@ -2128,6 +2233,26 @@ function SkeletonRow({ barWidth = 130 }) {
|
|
|
2128
2233
|
function SkeletonList({ rows = 8, className }) {
|
|
2129
2234
|
return /* @__PURE__ */ jsx31("div", { className: cn("flex flex-col gap-0.5 animate-skeleton-in", className), "aria-hidden": true, children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx31(SkeletonRow, { barWidth: ROW_BAR_WIDTHS[i % ROW_BAR_WIDTHS.length] }, i)) });
|
|
2130
2235
|
}
|
|
2236
|
+
function SkeletonCard({ secondLine }) {
|
|
2237
|
+
return /* @__PURE__ */ jsxs22("div", { className: "rounded-lg px-2 pt-2", children: [
|
|
2238
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex w-full items-center gap-2", children: [
|
|
2239
|
+
/* @__PURE__ */ jsx31(SkeletonBar, { className: "h-6 w-6 shrink-0" }),
|
|
2240
|
+
/* @__PURE__ */ jsx31(SkeletonBar, { className: "h-3.5 w-[110px]" }),
|
|
2241
|
+
/* @__PURE__ */ jsx31(SkeletonBar, { className: "h-3 w-10" })
|
|
2242
|
+
] }),
|
|
2243
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col gap-2 pb-2 pl-8 pr-2 pt-2", children: [
|
|
2244
|
+
/* @__PURE__ */ jsx31(SkeletonBar, { className: "h-3.5 w-full" }),
|
|
2245
|
+
/* @__PURE__ */ jsx31(SkeletonBar, { className: "h-3.5 max-w-full", style: { width: secondLine } })
|
|
2246
|
+
] })
|
|
2247
|
+
] });
|
|
2248
|
+
}
|
|
2249
|
+
function SkeletonConversation({ className }) {
|
|
2250
|
+
return /* @__PURE__ */ jsxs22("div", { className: cn("flex flex-col gap-2 animate-skeleton-in", className), "aria-hidden": true, children: [
|
|
2251
|
+
/* @__PURE__ */ jsx31(SkeletonCard, { secondLine: 420 }),
|
|
2252
|
+
/* @__PURE__ */ jsx31(SkeletonCard, { secondLine: 300 }),
|
|
2253
|
+
/* @__PURE__ */ jsx31(SkeletonCard, { secondLine: 500 })
|
|
2254
|
+
] });
|
|
2255
|
+
}
|
|
2131
2256
|
|
|
2132
2257
|
// src/CommandPalette.tsx
|
|
2133
2258
|
import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
@@ -2200,7 +2325,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2200
2325
|
const back = useBack(chip, popupRef);
|
|
2201
2326
|
const items = useMemo3(() => groups.filter((g) => g.rows.length > 0).map((g) => ({ value: g.label, items: g.rows })), [groups]);
|
|
2202
2327
|
const rows = items.flatMap((g) => g.items);
|
|
2203
|
-
const [litId, setLitId] =
|
|
2328
|
+
const [litId, setLitId] = useState6();
|
|
2204
2329
|
const lit = litId === void 0 ? void 0 : rows.find((r) => r.id === litId);
|
|
2205
2330
|
const inputRef = useRef7(null);
|
|
2206
2331
|
const reported = useRef7({});
|
|
@@ -2368,7 +2493,7 @@ function CommandPaletteForm({ chip, icon, submitLabel, onSubmit, submitWaits, wo
|
|
|
2368
2493
|
if (isTextField(el)) return el.value === "";
|
|
2369
2494
|
return ![...frame.querySelectorAll("input, textarea")].some(isTextField);
|
|
2370
2495
|
};
|
|
2371
|
-
const [backNamed, setBackNamed] =
|
|
2496
|
+
const [backNamed, setBackNamed] = useState6(false);
|
|
2372
2497
|
const measure = () => setBackNamed(backWorksFrom(document.activeElement));
|
|
2373
2498
|
useLayoutEffect3(measure);
|
|
2374
2499
|
const onKeyDown = (e) => {
|
|
@@ -2750,17 +2875,17 @@ function KindIcon({ kind, size = 16, tone = "secondary", className }) {
|
|
|
2750
2875
|
}
|
|
2751
2876
|
|
|
2752
2877
|
// src/IdentityMenu.tsx
|
|
2753
|
-
import { useCallback as
|
|
2878
|
+
import { useCallback as useCallback3, useRef as useRef8 } from "react";
|
|
2754
2879
|
|
|
2755
2880
|
// src/Person.tsx
|
|
2756
2881
|
import { jsx as jsx36, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2757
|
-
function Person({ name, picture, fallback = "\u2014", size = 20, className }) {
|
|
2882
|
+
function Person({ name, picture, bot, fallback = "\u2014", size = 20, className }) {
|
|
2758
2883
|
return (
|
|
2759
2884
|
// gap-2: the face-to-name distance is one rule (8px) wherever a person
|
|
2760
2885
|
// appears — Katerina, 2026-09-01, set on Person so PersonTrigger and every
|
|
2761
2886
|
// row agree by construction.
|
|
2762
2887
|
/* @__PURE__ */ jsxs26("span", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2763
|
-
/* @__PURE__ */ jsx36(Avatar, { name, src: picture, size }),
|
|
2888
|
+
/* @__PURE__ */ jsx36(Avatar, { name, src: picture, bot, size }),
|
|
2764
2889
|
/* @__PURE__ */ jsx36("span", { className: cn("truncate", !name && "text-text-muted"), children: name ?? fallback })
|
|
2765
2890
|
] })
|
|
2766
2891
|
);
|
|
@@ -2770,7 +2895,7 @@ function Person({ name, picture, fallback = "\u2014", size = 20, className }) {
|
|
|
2770
2895
|
import { Button as BaseButton7 } from "@base-ui/react/button";
|
|
2771
2896
|
import { IconChevronDown as IconChevronDown2 } from "@tabler/icons-react";
|
|
2772
2897
|
import { jsx as jsx37, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2773
|
-
function PersonTrigger({ name, picture, fallback, size, open = false, compact = false, className, ...props }) {
|
|
2898
|
+
function PersonTrigger({ name, picture, bot, fallback, size, open = false, compact = false, className, ...props }) {
|
|
2774
2899
|
if (compact) {
|
|
2775
2900
|
return /* @__PURE__ */ jsx37(
|
|
2776
2901
|
BaseButton7,
|
|
@@ -2781,7 +2906,7 @@ function PersonTrigger({ name, picture, fallback, size, open = false, compact =
|
|
|
2781
2906
|
"aria-label": props["aria-label"] ?? name ?? fallback,
|
|
2782
2907
|
className: cn("cursor-pointer rounded-full", className),
|
|
2783
2908
|
...props,
|
|
2784
|
-
children: /* @__PURE__ */ jsx37(Avatar, { name, src: picture, size: size ?? 36 })
|
|
2909
|
+
children: /* @__PURE__ */ jsx37(Avatar, { name, src: picture, bot, size: size ?? 36 })
|
|
2785
2910
|
}
|
|
2786
2911
|
);
|
|
2787
2912
|
}
|
|
@@ -2805,7 +2930,7 @@ function PersonTrigger({ name, picture, fallback, size, open = false, compact =
|
|
|
2805
2930
|
),
|
|
2806
2931
|
...props,
|
|
2807
2932
|
children: [
|
|
2808
|
-
/* @__PURE__ */ jsx37(Person, { name, picture, fallback, size: size ?? 22 }),
|
|
2933
|
+
/* @__PURE__ */ jsx37(Person, { name, picture, bot, fallback, size: size ?? 22 }),
|
|
2809
2934
|
/* @__PURE__ */ jsx37(IconChevronDown2, { size: 14, stroke: 1.5, className: "shrink-0 text-text-muted" })
|
|
2810
2935
|
]
|
|
2811
2936
|
}
|
|
@@ -2859,7 +2984,7 @@ function IdentityRows({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, on
|
|
|
2859
2984
|
}
|
|
2860
2985
|
function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, compact = false, className, children }) {
|
|
2861
2986
|
const actions = useRef8(null);
|
|
2862
|
-
const close =
|
|
2987
|
+
const close = useCallback3(() => actions.current?.close(), []);
|
|
2863
2988
|
return (
|
|
2864
2989
|
/* The wrapper carries the caller's `className` and nothing else. It used
|
|
2865
2990
|
to be `relative`, because the panel was positioned against it; the panel
|
|
@@ -2928,12 +3053,17 @@ var FilePicker = forwardRef(function FilePicker2({ onPick, ...props }, ref) {
|
|
|
2928
3053
|
// src/Select.tsx
|
|
2929
3054
|
import { IconCheck as IconCheck2, IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
|
|
2930
3055
|
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
3056
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
2931
3057
|
import { jsx as jsx40, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2932
3058
|
var GAP4 = 4;
|
|
2933
3059
|
var VIEWPORT_PAD4 = 8;
|
|
2934
3060
|
function Select({ value, onChange, options, size = "default", fill = "field", ariaLabel, placeholder = "Select\u2026", disabled, disabledReason, className, ...aria }) {
|
|
2935
3061
|
const selected = options.find((o) => o.value === value);
|
|
2936
3062
|
const held = Boolean(disabledReason);
|
|
3063
|
+
const [open, setOpen] = useState7(false);
|
|
3064
|
+
useEffect5(() => {
|
|
3065
|
+
if (held) setOpen(false);
|
|
3066
|
+
}, [held]);
|
|
2937
3067
|
const trigger = (
|
|
2938
3068
|
// @estiva-escape(no-copied-look): N1 (Katerina, 24 September: record only): Select's box drops the hover while held, so it cannot take FIELD_SHELL_CLASSES as it is
|
|
2939
3069
|
/* @__PURE__ */ jsxs29(
|
|
@@ -2992,8 +3122,10 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
2992
3122
|
onValueChange: (next) => {
|
|
2993
3123
|
if (!held) onChange(next);
|
|
2994
3124
|
},
|
|
2995
|
-
|
|
2996
|
-
|
|
3125
|
+
open: held ? false : open,
|
|
3126
|
+
onOpenChange: (next) => {
|
|
3127
|
+
if (!held) setOpen(next);
|
|
3128
|
+
},
|
|
2997
3129
|
disabled: disabled && !held,
|
|
2998
3130
|
modal: false,
|
|
2999
3131
|
children: [
|
|
@@ -3097,10 +3229,10 @@ var Textarea = forwardRef3(function Textarea2({ className, ...props }, ref) {
|
|
|
3097
3229
|
});
|
|
3098
3230
|
|
|
3099
3231
|
// src/ConfirmDialog.tsx
|
|
3100
|
-
import { useState as
|
|
3232
|
+
import { useState as useState8 } from "react";
|
|
3101
3233
|
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3102
3234
|
function ConfirmDialog({ title, children, confirmLabel, destructive = false, onConfirm, onClose }) {
|
|
3103
|
-
const [busy, setBusy] =
|
|
3235
|
+
const [busy, setBusy] = useState8(false);
|
|
3104
3236
|
const confirm = async () => {
|
|
3105
3237
|
setBusy(true);
|
|
3106
3238
|
try {
|
|
@@ -3126,16 +3258,16 @@ function ConfirmDialog({ title, children, confirmLabel, destructive = false, onC
|
|
|
3126
3258
|
}
|
|
3127
3259
|
|
|
3128
3260
|
// src/EditableText.tsx
|
|
3129
|
-
import { useEffect as
|
|
3261
|
+
import { useEffect as useEffect6, useRef as useRef9, useState as useState9 } from "react";
|
|
3130
3262
|
import { Field as BaseField4 } from "@base-ui/react/field";
|
|
3131
3263
|
import { Input as Input2 } from "@base-ui/react/input";
|
|
3132
3264
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
3133
3265
|
function EditableText({ value, display, displayNode, placeholder, onCommit, multiline = false, className, label, readOnly = false }) {
|
|
3134
|
-
const [editing, setEditing] =
|
|
3135
|
-
const [draft, setDraft] =
|
|
3136
|
-
const [busy, setBusy] =
|
|
3266
|
+
const [editing, setEditing] = useState9(false);
|
|
3267
|
+
const [draft, setDraft] = useState9(value);
|
|
3268
|
+
const [busy, setBusy] = useState9(false);
|
|
3137
3269
|
const fieldRef = useRef9(null);
|
|
3138
|
-
|
|
3270
|
+
useEffect6(() => {
|
|
3139
3271
|
if (editing) {
|
|
3140
3272
|
fieldRef.current?.focus();
|
|
3141
3273
|
fieldRef.current?.select();
|
|
@@ -3300,13 +3432,13 @@ function ProgressBar({ value, max, label, variant = "default", className }) {
|
|
|
3300
3432
|
}
|
|
3301
3433
|
|
|
3302
3434
|
// src/Breadcrumb.tsx
|
|
3303
|
-
import { Fragment as Fragment12, useCallback as
|
|
3435
|
+
import { Fragment as Fragment12, useCallback as useCallback4, useLayoutEffect as useLayoutEffect4, useRef as useRef10, useState as useState10 } from "react";
|
|
3304
3436
|
import { jsx as jsx48, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3305
3437
|
function Breadcrumb({ items, className }) {
|
|
3306
3438
|
const navRef = useRef10(null);
|
|
3307
3439
|
const labelRefs = useRef10([]);
|
|
3308
|
-
const [truncated, setTruncated] =
|
|
3309
|
-
const measure =
|
|
3440
|
+
const [truncated, setTruncated] = useState10(/* @__PURE__ */ new Set());
|
|
3441
|
+
const measure = useCallback4(() => {
|
|
3310
3442
|
const next = /* @__PURE__ */ new Set();
|
|
3311
3443
|
labelRefs.current.forEach((el, index) => {
|
|
3312
3444
|
if (el && el.scrollWidth > el.clientWidth) next.add(index);
|
|
@@ -3358,25 +3490,32 @@ function Breadcrumb({ items, className }) {
|
|
|
3358
3490
|
}
|
|
3359
3491
|
|
|
3360
3492
|
// src/NavItem.tsx
|
|
3361
|
-
import { useId as
|
|
3493
|
+
import { useId as useId3, useState as useState12 } from "react";
|
|
3362
3494
|
import { Collapsible as Collapsible2 } from "@base-ui/react/collapsible";
|
|
3363
|
-
import {
|
|
3495
|
+
import { IconChevronRight as IconChevronRight3, IconDotsVertical as IconDotsVertical2 } from "@tabler/icons-react";
|
|
3496
|
+
|
|
3497
|
+
// src/UrgentMark.tsx
|
|
3498
|
+
import { IconAlertSquareRounded } from "@tabler/icons-react";
|
|
3499
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
3500
|
+
function UrgentMark() {
|
|
3501
|
+
return /* @__PURE__ */ jsx49("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center", "data-urgent": true, children: /* @__PURE__ */ jsx49("div", { className: "flex items-center rounded-full bg-warning-muted p-0.5 signal:shadow-glow-warning", children: /* @__PURE__ */ jsx49(IconAlertSquareRounded, { size: 12, stroke: 2.5, className: "text-warning-default" }) }) });
|
|
3502
|
+
}
|
|
3364
3503
|
|
|
3365
3504
|
// src/CollapsibleSection.tsx
|
|
3366
|
-
import { useEffect as
|
|
3505
|
+
import { useEffect as useEffect7, useRef as useRef11, useState as useState11 } from "react";
|
|
3367
3506
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
3368
3507
|
|
|
3369
3508
|
// src/SectionHeader.tsx
|
|
3370
3509
|
import { IconChevronRight as IconChevronRight2, IconDotsVertical } from "@tabler/icons-react";
|
|
3371
3510
|
import { useRender } from "@base-ui/react/use-render";
|
|
3372
|
-
import { Fragment as Fragment13, jsx as
|
|
3511
|
+
import { Fragment as Fragment13, jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3373
3512
|
function SectionHeader({ title, chevron = false, icon, isExpanded = true, onToggle, trailing, count, actions, menu, menuLabel, showActions = "hover", hover = "fill", look = "heading", render, className }) {
|
|
3374
3513
|
const row = look === "row";
|
|
3375
3514
|
const acts = actions && actions.length > 0 || menu != null;
|
|
3376
3515
|
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";
|
|
3377
3516
|
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";
|
|
3378
3517
|
const titleElement = useRender({
|
|
3379
|
-
render: render ?? (chevron ? /* @__PURE__ */
|
|
3518
|
+
render: render ?? (chevron ? /* @__PURE__ */ jsx50("button", { type: "button", onClick: onToggle, "aria-expanded": isExpanded }) : /* @__PURE__ */ jsx50("span", {})),
|
|
3380
3519
|
props: {
|
|
3381
3520
|
// `text-left`: a button centres its text. `h-full` and `flex-1`: the
|
|
3382
3521
|
// whole row up to the actions is the hit target, as it was when the
|
|
@@ -3385,8 +3524,8 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3385
3524
|
className: cn("flex h-full min-w-0 flex-1 items-center text-left", row || chevron || icon != null ? "gap-2" : "gap-1"),
|
|
3386
3525
|
children: /* @__PURE__ */ jsxs33(Fragment13, { children: [
|
|
3387
3526
|
icon != null ? /* @__PURE__ */ jsxs33("span", { className: "relative flex size-4 shrink-0 items-center justify-center text-text-secondary", children: [
|
|
3388
|
-
/* @__PURE__ */
|
|
3389
|
-
chevron && /* @__PURE__ */
|
|
3527
|
+
/* @__PURE__ */ jsx50("span", { className: cn("flex", chevron && "transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"), children: icon }),
|
|
3528
|
+
chevron && /* @__PURE__ */ jsx50(
|
|
3390
3529
|
IconChevronRight2,
|
|
3391
3530
|
{
|
|
3392
3531
|
size: 16,
|
|
@@ -3394,7 +3533,7 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3394
3533
|
className: cn("absolute opacity-0 transition-[opacity,transform] duration-150 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100", isExpanded && "rotate-90")
|
|
3395
3534
|
}
|
|
3396
3535
|
)
|
|
3397
|
-
] }) : chevron && /* @__PURE__ */
|
|
3536
|
+
] }) : chevron && /* @__PURE__ */ jsx50(
|
|
3398
3537
|
IconChevronRight2,
|
|
3399
3538
|
{
|
|
3400
3539
|
size: 16,
|
|
@@ -3402,11 +3541,11 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3402
3541
|
className: cn("shrink-0 transition-transform duration-150", !row && "text-text-secondary", isExpanded && "rotate-90")
|
|
3403
3542
|
}
|
|
3404
3543
|
),
|
|
3405
|
-
look === "quiet" ? /* @__PURE__ */
|
|
3544
|
+
look === "quiet" ? /* @__PURE__ */ jsx50("span", { className: "min-w-0 truncate text-caption text-text-muted", children: title }) : row ? (
|
|
3406
3545
|
// A row's words: NavItem's size and colour, brightening under the pointer with the row.
|
|
3407
|
-
/* @__PURE__ */
|
|
3408
|
-
) : /* @__PURE__ */
|
|
3409
|
-
count != null && /* @__PURE__ */
|
|
3546
|
+
/* @__PURE__ */ jsx50("span", { className: "min-w-0 flex-1 truncate text-body-2", children: title })
|
|
3547
|
+
) : /* @__PURE__ */ jsx50(SectionLabel, { folds: chevron, children: title }),
|
|
3548
|
+
count != null && /* @__PURE__ */ jsx50("span", { className: cn("ml-1 shrink-0", COUNT_TEXT_CLASSES), children: count })
|
|
3410
3549
|
] })
|
|
3411
3550
|
}
|
|
3412
3551
|
});
|
|
@@ -3431,8 +3570,8 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3431
3570
|
),
|
|
3432
3571
|
children: [
|
|
3433
3572
|
titleElement,
|
|
3434
|
-
trailing != null && /* @__PURE__ */
|
|
3435
|
-
acts && /* @__PURE__ */
|
|
3573
|
+
trailing != null && /* @__PURE__ */ jsx50("div", { className: cn("flex shrink-0 items-center", trailingClasses), children: trailing }),
|
|
3574
|
+
acts && /* @__PURE__ */ jsx50(
|
|
3436
3575
|
"div",
|
|
3437
3576
|
{
|
|
3438
3577
|
className: "-mr-1 flex shrink-0 items-center",
|
|
@@ -3440,21 +3579,21 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3440
3579
|
actions?.map(
|
|
3441
3580
|
(action) => action.menu != null ? (
|
|
3442
3581
|
// `data-section-menu`, as the ⋮ has: the row stays lit while its menu is open.
|
|
3443
|
-
/* @__PURE__ */
|
|
3582
|
+
/* @__PURE__ */ jsx50("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx50(
|
|
3444
3583
|
Menu,
|
|
3445
3584
|
{
|
|
3446
3585
|
align: "right",
|
|
3447
|
-
trigger: /* @__PURE__ */
|
|
3586
|
+
trigger: /* @__PURE__ */ jsx50(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, children: action.icon }),
|
|
3448
3587
|
children: action.menu
|
|
3449
3588
|
}
|
|
3450
3589
|
) }, action.tooltip)
|
|
3451
|
-
) : /* @__PURE__ */
|
|
3590
|
+
) : /* @__PURE__ */ jsx50(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, onClick: action.onClick, children: action.icon }, action.tooltip)
|
|
3452
3591
|
),
|
|
3453
|
-
menu != null && /* @__PURE__ */
|
|
3592
|
+
menu != null && /* @__PURE__ */ jsx50("div", { "data-section-menu": true, className: "flex items-center", children: /* @__PURE__ */ jsx50(
|
|
3454
3593
|
Menu,
|
|
3455
3594
|
{
|
|
3456
3595
|
align: "right",
|
|
3457
|
-
trigger: /* @__PURE__ */
|
|
3596
|
+
trigger: /* @__PURE__ */ jsx50(IconButton, { tooltip: "More options", "aria-label": menuLabel ?? `More options for ${title}`, children: /* @__PURE__ */ jsx50(IconDotsVertical, { size: 16, stroke: 1.5 }) }),
|
|
3458
3597
|
children: menu
|
|
3459
3598
|
}
|
|
3460
3599
|
) })
|
|
@@ -3467,12 +3606,12 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3467
3606
|
}
|
|
3468
3607
|
|
|
3469
3608
|
// src/CollapsibleSection.tsx
|
|
3470
|
-
import { jsx as
|
|
3609
|
+
import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3471
3610
|
var OPEN = "open";
|
|
3472
3611
|
var CLOSED = "closed";
|
|
3473
3612
|
function useOpenFor(openFor, open, setOpen) {
|
|
3474
3613
|
const seen = useRef11(void 0);
|
|
3475
|
-
|
|
3614
|
+
useEffect7(() => {
|
|
3476
3615
|
if (openFor === seen.current) return;
|
|
3477
3616
|
seen.current = openFor;
|
|
3478
3617
|
if (openFor !== void 0 && !open) setOpen(true);
|
|
@@ -3495,7 +3634,7 @@ function writeStored(key, open) {
|
|
|
3495
3634
|
}
|
|
3496
3635
|
}
|
|
3497
3636
|
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 }) {
|
|
3498
|
-
const [openState, setOpenState] =
|
|
3637
|
+
const [openState, setOpenState] = useState11(() => readStored(storageKey) ?? defaultOpen);
|
|
3499
3638
|
const open = openProp ?? openState;
|
|
3500
3639
|
const setOpen = (next) => {
|
|
3501
3640
|
setOpenState(next);
|
|
@@ -3503,28 +3642,28 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
3503
3642
|
onOpenChange?.(next);
|
|
3504
3643
|
};
|
|
3505
3644
|
useOpenFor(openFor, open, setOpen);
|
|
3506
|
-
const
|
|
3507
|
-
return /* @__PURE__ */ jsxs34(Collapsible.Root, { open:
|
|
3508
|
-
/* @__PURE__ */
|
|
3509
|
-
/* @__PURE__ */
|
|
3645
|
+
const shown2 = open && !pending;
|
|
3646
|
+
return /* @__PURE__ */ jsxs34(Collapsible.Root, { open: shown2, onOpenChange: (next, details) => setOpen(pending && details.reason === "trigger-press" ? !open : next), className: cn("flex flex-col", className), children: [
|
|
3647
|
+
/* @__PURE__ */ jsx51(SectionHeader, { title, chevron: true, icon, isExpanded: open, trailing, actions, menu, menuLabel, showActions, look, className: "shrink-0", render: /* @__PURE__ */ jsx51(Collapsible.Trigger, { "aria-expanded": open, "aria-busy": pending && open ? true : void 0 }) }),
|
|
3648
|
+
/* @__PURE__ */ jsx51(
|
|
3510
3649
|
Collapsible.Panel,
|
|
3511
3650
|
{
|
|
3512
3651
|
hiddenUntilFound: true,
|
|
3513
3652
|
className: COLLAPSIBLE_PANEL_CLASSES,
|
|
3514
|
-
children: /* @__PURE__ */
|
|
3653
|
+
children: /* @__PURE__ */ jsx51("div", { className: cn("flex flex-col pt-0.5", (look === "row" || indent) && "pl-6", contentClassName), children })
|
|
3515
3654
|
}
|
|
3516
3655
|
)
|
|
3517
3656
|
] });
|
|
3518
3657
|
}
|
|
3519
3658
|
|
|
3520
3659
|
// src/UnreadDot.tsx
|
|
3521
|
-
import { jsx as
|
|
3660
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
3522
3661
|
function UnreadDot({ className }) {
|
|
3523
|
-
return /* @__PURE__ */
|
|
3662
|
+
return /* @__PURE__ */ jsx52("div", { className: cn("flex h-6 w-6 shrink-0 items-center justify-center", className), "data-unread": true, children: /* @__PURE__ */ jsx52("div", { className: "h-1.5 w-1.5 rounded-full bg-accent-primary" }) });
|
|
3524
3663
|
}
|
|
3525
3664
|
|
|
3526
3665
|
// src/NavItem.tsx
|
|
3527
|
-
import { jsx as
|
|
3666
|
+
import { jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3528
3667
|
function NavItem({
|
|
3529
3668
|
label,
|
|
3530
3669
|
href,
|
|
@@ -3549,8 +3688,8 @@ function NavItem({
|
|
|
3549
3688
|
...props
|
|
3550
3689
|
}) {
|
|
3551
3690
|
const inApp = useInAppClick(href, onClick);
|
|
3552
|
-
const [openState, setOpenState] =
|
|
3553
|
-
const panelId =
|
|
3691
|
+
const [openState, setOpenState] = useState12(defaultOpen);
|
|
3692
|
+
const panelId = useId3();
|
|
3554
3693
|
const hasRows = children != null && children !== false;
|
|
3555
3694
|
const open = openProp ?? openState;
|
|
3556
3695
|
const setOpen = (next) => {
|
|
@@ -3560,7 +3699,7 @@ function NavItem({
|
|
|
3560
3699
|
useOpenFor(hasRows ? openFor : void 0, open, setOpen);
|
|
3561
3700
|
const buttons = (menu != null ? 1 : 0) + (action ? 1 : 0);
|
|
3562
3701
|
const besides = buttons > 0 || hasRows;
|
|
3563
|
-
const mark = unread ? urgent ? /* @__PURE__ */
|
|
3702
|
+
const mark = unread ? urgent ? /* @__PURE__ */ jsx53(UrgentMark, {}) : /* @__PURE__ */ jsx53(UnreadDot, {}) : null;
|
|
3564
3703
|
const stepsAside = buttons > 0 && "transition-opacity group-hover/nav:opacity-0 group-has-[:focus-visible]/nav:opacity-0 group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:opacity-0 [@media(hover:none)]:opacity-0";
|
|
3565
3704
|
const row = /* @__PURE__ */ jsxs35(
|
|
3566
3705
|
"a",
|
|
@@ -3584,7 +3723,7 @@ function NavItem({
|
|
|
3584
3723
|
...props,
|
|
3585
3724
|
onClick: inApp,
|
|
3586
3725
|
children: [
|
|
3587
|
-
(icon || hasRows) && /* @__PURE__ */
|
|
3726
|
+
(icon || hasRows) && /* @__PURE__ */ jsx53(
|
|
3588
3727
|
"span",
|
|
3589
3728
|
{
|
|
3590
3729
|
className: cn(
|
|
@@ -3598,14 +3737,14 @@ function NavItem({
|
|
|
3598
3737
|
tooltip?.trim() ? (
|
|
3599
3738
|
// On the label alone, not the row: the ⋮ and the action keep their
|
|
3600
3739
|
// own tooltips, and the two never stand up at once.
|
|
3601
|
-
/* @__PURE__ */
|
|
3602
|
-
) : /* @__PURE__ */
|
|
3740
|
+
/* @__PURE__ */ jsx53(WithTooltip, { label: tooltip, inline: true, wrapperClassName: "flex min-w-0 flex-1", children: /* @__PURE__ */ jsx53("span", { className: cn("flex-1 truncate", unread && "font-medium"), children: label }) })
|
|
3741
|
+
) : /* @__PURE__ */ jsx53("span", { className: cn("flex-1 truncate", unread && "font-medium"), children: label }),
|
|
3603
3742
|
hint != null && // Takes room only while it shows, so the label gives way to it.
|
|
3604
|
-
/* @__PURE__ */
|
|
3743
|
+
/* @__PURE__ */ jsx53("span", { className: "hidden shrink-0 items-center group-hover/nav:flex group-has-[:focus-visible]/nav:flex", children: hint }),
|
|
3605
3744
|
buttons > 1 && // Two buttons: the second one's room (24px and the 4px between them, the
|
|
3606
3745
|
// row's 8px gap making up the rest), kept only while they show.
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
count ? /* @__PURE__ */
|
|
3746
|
+
/* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: "hidden w-5 shrink-0 group-hover/nav:block group-has-[:focus-visible]/nav:block group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:block [@media(hover:none)]:block" }),
|
|
3747
|
+
count ? /* @__PURE__ */ jsx53(WithTooltip, { label: countLabel ?? `${count} open`, children: /* @__PURE__ */ jsx53(
|
|
3609
3748
|
"span",
|
|
3610
3749
|
{
|
|
3611
3750
|
className: cn(
|
|
@@ -3621,7 +3760,7 @@ function NavItem({
|
|
|
3621
3760
|
// `-mr-1`: the 24px slot's dot then sits on the axis of a count and
|
|
3622
3761
|
// of the ⋮ (8px from the edge to the 16px box), one column with a
|
|
3623
3762
|
// folder heading's dot and ⋮ (Katerina, 5 October).
|
|
3624
|
-
/* @__PURE__ */
|
|
3763
|
+
/* @__PURE__ */ jsx53("span", { className: cn("-mr-1 flex shrink-0", stepsAside), children: mark })
|
|
3625
3764
|
) : buttons > 0 && !count ? (
|
|
3626
3765
|
// Nothing at the right, but a menu: no room is kept at rest, so the
|
|
3627
3766
|
// label has the row's whole width; while the ⋮ shows, its 24px slot
|
|
@@ -3629,7 +3768,7 @@ function NavItem({
|
|
|
3629
3768
|
// `-mr-1`: the ⋮ sits at `right-1`, 4px into the row's padding, so the
|
|
3630
3769
|
// slot does too — at the padding's edge it kept 4px the ⋮ never
|
|
3631
3770
|
// covers, and the label stopped 12px short of the button, not 8.
|
|
3632
|
-
/* @__PURE__ */
|
|
3771
|
+
/* @__PURE__ */ jsx53("span", { "aria-hidden": "true", className: "-mr-1 hidden w-6 shrink-0 group-hover/nav:block group-has-[:focus-visible]/nav:block group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:block [@media(hover:none)]:block" })
|
|
3633
3772
|
) : null
|
|
3634
3773
|
]
|
|
3635
3774
|
}
|
|
@@ -3640,7 +3779,7 @@ function NavItem({
|
|
|
3640
3779
|
row,
|
|
3641
3780
|
hasRows && // `left-1`: the 24px button's 16px arrow then sits where the icon
|
|
3642
3781
|
// sits (the row's px-2), so the icon turns into the arrow in place.
|
|
3643
|
-
/* @__PURE__ */
|
|
3782
|
+
/* @__PURE__ */ jsx53("div", { className: "absolute inset-y-0 left-1 flex items-center opacity-0 transition-opacity group-hover/nav:opacity-100 group-has-[:focus-visible]/nav:opacity-100", children: /* @__PURE__ */ jsx53(
|
|
3644
3783
|
IconButton,
|
|
3645
3784
|
{
|
|
3646
3785
|
tooltip: open ? "Collapse" : "Expand",
|
|
@@ -3648,7 +3787,7 @@ function NavItem({
|
|
|
3648
3787
|
"aria-expanded": open,
|
|
3649
3788
|
"aria-controls": panelId,
|
|
3650
3789
|
onClick: () => setOpen(!open),
|
|
3651
|
-
children: /* @__PURE__ */
|
|
3790
|
+
children: /* @__PURE__ */ jsx53(IconChevronRight3, { size: 16, stroke: 1.5, className: cn("transition-transform duration-150", open && "rotate-90") })
|
|
3652
3791
|
}
|
|
3653
3792
|
) }),
|
|
3654
3793
|
buttons > 0 && // `right-1`: the 24px button's 16px icon ends 8px from the row's
|
|
@@ -3660,12 +3799,12 @@ function NavItem({
|
|
|
3660
3799
|
// On a screen with no hover it always shows: nothing there can point
|
|
3661
3800
|
// at the row, and the menu has no other way in.
|
|
3662
3801
|
/* @__PURE__ */ jsxs35("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: [
|
|
3663
|
-
action && /* @__PURE__ */
|
|
3664
|
-
menu != null && /* @__PURE__ */
|
|
3802
|
+
action && /* @__PURE__ */ jsx53(IconButton, { tooltip: action.tooltip, "aria-label": `${action.tooltip}: ${label}`, onClick: action.onClick, children: action.icon }),
|
|
3803
|
+
menu != null && /* @__PURE__ */ jsx53(
|
|
3665
3804
|
Menu,
|
|
3666
3805
|
{
|
|
3667
3806
|
align: "right",
|
|
3668
|
-
trigger: /* @__PURE__ */
|
|
3807
|
+
trigger: /* @__PURE__ */ jsx53(IconButton, { tooltip: "More options", "aria-label": name, children: /* @__PURE__ */ jsx53(IconDotsVertical2, { size: 16, stroke: 1.5 }) }),
|
|
3669
3808
|
children: menu
|
|
3670
3809
|
}
|
|
3671
3810
|
)
|
|
@@ -3674,24 +3813,21 @@ function NavItem({
|
|
|
3674
3813
|
if (!hasRows) return line;
|
|
3675
3814
|
return /* @__PURE__ */ jsxs35(Collapsible2.Root, { open, onOpenChange: setOpen, className: "flex shrink-0 flex-col", children: [
|
|
3676
3815
|
line,
|
|
3677
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ jsx53(
|
|
3678
3817
|
Collapsible2.Panel,
|
|
3679
3818
|
{
|
|
3680
3819
|
id: panelId,
|
|
3681
3820
|
hiddenUntilFound: true,
|
|
3682
3821
|
className: COLLAPSIBLE_PANEL_CLASSES,
|
|
3683
|
-
children: /* @__PURE__ */
|
|
3822
|
+
children: /* @__PURE__ */ jsx53("div", { className: "flex flex-col gap-0.5 pt-0.5 pl-6", children })
|
|
3684
3823
|
}
|
|
3685
3824
|
)
|
|
3686
3825
|
] });
|
|
3687
3826
|
}
|
|
3688
|
-
function UrgentMark() {
|
|
3689
|
-
return /* @__PURE__ */ jsx52("div", { className: "flex h-6 w-6 shrink-0 items-center justify-center", "data-urgent": true, children: /* @__PURE__ */ jsx52("div", { className: "flex items-center rounded-full bg-warning-muted p-0.5 signal:shadow-glow-warning", children: /* @__PURE__ */ jsx52(IconAlertSquareRounded, { size: 12, stroke: 2.5, className: "text-warning-default" }) }) });
|
|
3690
|
-
}
|
|
3691
3827
|
|
|
3692
3828
|
// src/NavTree.tsx
|
|
3693
|
-
import { useEffect as
|
|
3694
|
-
import { jsx as
|
|
3829
|
+
import { useEffect as useEffect8, useRef as useRef12 } from "react";
|
|
3830
|
+
import { jsx as jsx54, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3695
3831
|
var NAV_TREE_INTENT_MS = 150;
|
|
3696
3832
|
var NAV_TREE_REVEAL_MS = 200;
|
|
3697
3833
|
function holds(nodes, id) {
|
|
@@ -3727,11 +3863,11 @@ function scrollToRow(row) {
|
|
|
3727
3863
|
else if (at.bottom > view.bottom) box.scrollTop += at.bottom - view.bottom;
|
|
3728
3864
|
}
|
|
3729
3865
|
function Line({ message }) {
|
|
3730
|
-
return /* @__PURE__ */
|
|
3866
|
+
return /* @__PURE__ */ jsx54("div", { className: "px-2 py-1", children: /* @__PURE__ */ jsx54(EmptyState, { scope: "section", message }) });
|
|
3731
3867
|
}
|
|
3732
3868
|
function Row({ node, selected, onSelect, opening }) {
|
|
3733
|
-
const under = node.childrenMessage !== void 0 ? /* @__PURE__ */
|
|
3734
|
-
return /* @__PURE__ */
|
|
3869
|
+
const under = node.childrenMessage !== void 0 ? /* @__PURE__ */ jsx54(Line, { message: node.childrenMessage }) : node.children?.length ? node.children.map((child) => /* @__PURE__ */ jsx54(Row, { node: child, selected, onSelect, opening }, child.id)) : node.children === null || node.hasChildren && node.children === void 0 ? /* @__PURE__ */ jsx54(SkeletonList, { rows: 2 }) : void 0;
|
|
3870
|
+
return /* @__PURE__ */ jsx54(
|
|
3735
3871
|
NavItem,
|
|
3736
3872
|
{
|
|
3737
3873
|
href: node.href,
|
|
@@ -3754,7 +3890,7 @@ function Row({ node, selected, onSelect, opening }) {
|
|
|
3754
3890
|
);
|
|
3755
3891
|
}
|
|
3756
3892
|
function Group({ group, selected, onSelect, opening, storageKey }) {
|
|
3757
|
-
return /* @__PURE__ */
|
|
3893
|
+
return /* @__PURE__ */ jsx54(
|
|
3758
3894
|
NavTreeSection,
|
|
3759
3895
|
{
|
|
3760
3896
|
id: group.id,
|
|
@@ -3771,15 +3907,15 @@ function Group({ group, selected, onSelect, opening, storageKey }) {
|
|
|
3771
3907
|
storageKey: storageKey ? `${storageKey}.${group.id}` : void 0,
|
|
3772
3908
|
openFor: opening?.group === group.id ? opening.item : void 0,
|
|
3773
3909
|
onIntent: group.onIntent,
|
|
3774
|
-
children: group.nodes?.map((node) => /* @__PURE__ */
|
|
3910
|
+
children: group.nodes?.map((node) => /* @__PURE__ */ jsx54(Row, { node, selected, onSelect, opening }, node.id))
|
|
3775
3911
|
}
|
|
3776
3912
|
);
|
|
3777
3913
|
}
|
|
3778
3914
|
function NavTreeSection({ id, title, message, loading = false, pending, trailing, actions, menu, icon, defaultOpen = true, open, onOpenChange, storageKey, openFor, onIntent, children }) {
|
|
3779
3915
|
const timer = useRef12(void 0);
|
|
3780
|
-
|
|
3916
|
+
useEffect8(() => () => clearTimeout(timer.current), []);
|
|
3781
3917
|
const intent = onIntent;
|
|
3782
|
-
return /* @__PURE__ */
|
|
3918
|
+
return /* @__PURE__ */ jsx54(
|
|
3783
3919
|
"div",
|
|
3784
3920
|
{
|
|
3785
3921
|
className: "shrink-0 [&+&]:mt-1",
|
|
@@ -3790,7 +3926,7 @@ function NavTreeSection({ id, title, message, loading = false, pending, trailing
|
|
|
3790
3926
|
} : void 0,
|
|
3791
3927
|
onPointerLeave: intent ? () => clearTimeout(timer.current) : void 0,
|
|
3792
3928
|
onFocus: intent,
|
|
3793
|
-
children: /* @__PURE__ */
|
|
3929
|
+
children: /* @__PURE__ */ jsx54(
|
|
3794
3930
|
CollapsibleSection,
|
|
3795
3931
|
{
|
|
3796
3932
|
title,
|
|
@@ -3807,7 +3943,7 @@ function NavTreeSection({ id, title, message, loading = false, pending, trailing
|
|
|
3807
3943
|
icon,
|
|
3808
3944
|
className: "shrink-0",
|
|
3809
3945
|
contentClassName: "gap-0.5",
|
|
3810
|
-
children: message !== void 0 ? /* @__PURE__ */
|
|
3946
|
+
children: message !== void 0 ? /* @__PURE__ */ jsx54(Line, { message }) : loading ? /* @__PURE__ */ jsx54(SkeletonList, { rows: 3 }) : children
|
|
3811
3947
|
}
|
|
3812
3948
|
)
|
|
3813
3949
|
}
|
|
@@ -3820,7 +3956,7 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
|
|
|
3820
3956
|
const waiting = useRef12(void 0);
|
|
3821
3957
|
const latest = useRef12(selected);
|
|
3822
3958
|
latest.current = selected;
|
|
3823
|
-
|
|
3959
|
+
useEffect8(() => {
|
|
3824
3960
|
if (selected === void 0 || scrolled.current === selected || waiting.current !== void 0) return;
|
|
3825
3961
|
waiting.current = setTimeout(() => {
|
|
3826
3962
|
waiting.current = void 0;
|
|
@@ -3830,15 +3966,15 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
|
|
|
3830
3966
|
scrollToRow(row);
|
|
3831
3967
|
}, NAV_TREE_REVEAL_MS);
|
|
3832
3968
|
});
|
|
3833
|
-
|
|
3969
|
+
useEffect8(() => () => clearTimeout(waiting.current), []);
|
|
3834
3970
|
return (
|
|
3835
3971
|
// `contents`: a box to find the current row in, that lays nothing out — the groups stay the column's own.
|
|
3836
3972
|
/* @__PURE__ */ jsxs36("div", { ref: box, className: "contents", children: [
|
|
3837
|
-
title && /* @__PURE__ */
|
|
3838
|
-
groups === void 0 ? children : groups === null ? /* @__PURE__ */
|
|
3973
|
+
title && /* @__PURE__ */ jsx54(SectionHeader, { title, look: "quiet", showActions: "always", actions: titleActions, className: "mt-4 shrink-0" }),
|
|
3974
|
+
groups === void 0 ? children : groups === null ? /* @__PURE__ */ jsx54(SkeletonList, { rows: 5 }) : groups.length === 0 ? (
|
|
3839
3975
|
// No words, no line: an app that says nothing when it has no groups.
|
|
3840
|
-
emptyMessage ? /* @__PURE__ */
|
|
3841
|
-
) : groups.map((group) => /* @__PURE__ */
|
|
3976
|
+
emptyMessage ? /* @__PURE__ */ jsx54(Line, { message: emptyMessage }) : null
|
|
3977
|
+
) : groups.map((group) => /* @__PURE__ */ jsx54(Group, { group, selected, onSelect, opening, storageKey }, group.id))
|
|
3842
3978
|
] })
|
|
3843
3979
|
);
|
|
3844
3980
|
}
|
|
@@ -3846,7 +3982,7 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
|
|
|
3846
3982
|
// src/Popover.tsx
|
|
3847
3983
|
import { useMemo as useMemo4 } from "react";
|
|
3848
3984
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
3849
|
-
import { jsx as
|
|
3985
|
+
import { jsx as jsx55, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3850
3986
|
var GAP5 = 4;
|
|
3851
3987
|
var VIEWPORT_PAD5 = 8;
|
|
3852
3988
|
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
|
|
@@ -3863,8 +3999,8 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
3863
3999
|
actionsRef,
|
|
3864
4000
|
modal: false,
|
|
3865
4001
|
children: [
|
|
3866
|
-
trigger && /* @__PURE__ */
|
|
3867
|
-
/* @__PURE__ */
|
|
4002
|
+
trigger && /* @__PURE__ */ jsx55(BasePopover.Trigger, { render: trigger, disabled: triggerDisabled(trigger) }),
|
|
4003
|
+
/* @__PURE__ */ jsx55(BasePopover.Portal, { children: /* @__PURE__ */ jsx55(
|
|
3868
4004
|
BasePopover.Positioner,
|
|
3869
4005
|
{
|
|
3870
4006
|
anchor: anchorTarget,
|
|
@@ -3873,20 +4009,20 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
3873
4009
|
sideOffset: GAP5,
|
|
3874
4010
|
collisionPadding: VIEWPORT_PAD5,
|
|
3875
4011
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
3876
|
-
children: /* @__PURE__ */
|
|
4012
|
+
children: /* @__PURE__ */ jsx55(
|
|
3877
4013
|
BasePopover.Popup,
|
|
3878
4014
|
{
|
|
3879
4015
|
"aria-label": ariaLabel,
|
|
3880
4016
|
initialFocus: trigger ? void 0 : false,
|
|
3881
4017
|
finalFocus,
|
|
3882
4018
|
className: cn("min-w-[180px] outline-none p-0", className),
|
|
3883
|
-
render: /* @__PURE__ */
|
|
3884
|
-
children: /* @__PURE__ */
|
|
4019
|
+
render: /* @__PURE__ */ jsx55(MenuPanel, {}),
|
|
4020
|
+
children: /* @__PURE__ */ jsx55(
|
|
3885
4021
|
ScrollArea,
|
|
3886
4022
|
{
|
|
3887
4023
|
viewportClassName: maxHeight ?? "max-h-[var(--available-height)]",
|
|
3888
4024
|
contentClassName: cn("flex flex-col p-2", contentClassName),
|
|
3889
|
-
children: /* @__PURE__ */
|
|
4025
|
+
children: /* @__PURE__ */ jsx55(DividerInPanel.Provider, { value: true, children })
|
|
3890
4026
|
}
|
|
3891
4027
|
)
|
|
3892
4028
|
}
|
|
@@ -3899,8 +4035,8 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
3899
4035
|
}
|
|
3900
4036
|
|
|
3901
4037
|
// src/SuggestionMenu.tsx
|
|
3902
|
-
import { useCallback as
|
|
3903
|
-
import { jsx as
|
|
4038
|
+
import { useCallback as useCallback5, useEffect as useEffect9, useId as useId4, useImperativeHandle, useMemo as useMemo5, useRef as useRef13, useState as useState13 } from "react";
|
|
4039
|
+
import { jsx as jsx56, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3904
4040
|
function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sections, itemKey, row, onSelect, handle }) {
|
|
3905
4041
|
const last = useRef13(null);
|
|
3906
4042
|
const anchor = useMemo5(() => {
|
|
@@ -3913,15 +4049,15 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3913
4049
|
contextElement: editorElement ?? void 0
|
|
3914
4050
|
};
|
|
3915
4051
|
}, [rect, editorElement]);
|
|
3916
|
-
const
|
|
3917
|
-
const items = useMemo5(() =>
|
|
4052
|
+
const shown2 = useMemo5(() => sections.filter((section) => section.items.length > 0), [sections]);
|
|
4053
|
+
const items = useMemo5(() => shown2.flatMap((section) => section.items), [shown2]);
|
|
3918
4054
|
const keys = items.map(itemKey).join("\n");
|
|
3919
|
-
const [highlight, setHighlight] =
|
|
3920
|
-
const base =
|
|
4055
|
+
const [highlight, setHighlight] = useState13(0);
|
|
4056
|
+
const base = useId4();
|
|
3921
4057
|
const listboxId = `${base}-list`;
|
|
3922
4058
|
const chosen = useRef13(null);
|
|
3923
|
-
|
|
3924
|
-
|
|
4059
|
+
useEffect9(() => void (chosen.current = highlight > 0 ? keys.split("\n")[highlight] ?? null : null), [highlight]);
|
|
4060
|
+
useEffect9(() => {
|
|
3925
4061
|
const at = chosen.current ? keys.split("\n").indexOf(chosen.current) : -1;
|
|
3926
4062
|
setHighlight(at > 0 ? at : 0);
|
|
3927
4063
|
}, [keys]);
|
|
@@ -3946,7 +4082,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3946
4082
|
}
|
|
3947
4083
|
}), [items, highlight, onSelect]);
|
|
3948
4084
|
const open = rect !== null && items.length > 0;
|
|
3949
|
-
|
|
4085
|
+
useEffect9(() => {
|
|
3950
4086
|
if (!editorElement || !open) return;
|
|
3951
4087
|
editorElement.setAttribute("aria-autocomplete", "list");
|
|
3952
4088
|
editorElement.setAttribute("aria-haspopup", "listbox");
|
|
@@ -3955,18 +4091,18 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3955
4091
|
for (const name of ["aria-autocomplete", "aria-haspopup", "aria-controls", "aria-activedescendant"]) editorElement.removeAttribute(name);
|
|
3956
4092
|
};
|
|
3957
4093
|
}, [editorElement, open, listboxId]);
|
|
3958
|
-
|
|
4094
|
+
useEffect9(() => {
|
|
3959
4095
|
if (!editorElement || !open) return;
|
|
3960
4096
|
editorElement.setAttribute("aria-activedescendant", `${base}-${highlight}`);
|
|
3961
4097
|
}, [editorElement, open, base, highlight]);
|
|
3962
|
-
const keepFocus =
|
|
4098
|
+
const keepFocus = useCallback5((list) => {
|
|
3963
4099
|
const panel = list?.closest('[role="dialog"]');
|
|
3964
4100
|
if (!panel) return;
|
|
3965
4101
|
const keep = (event) => event.preventDefault();
|
|
3966
4102
|
panel.addEventListener("mousedown", keep);
|
|
3967
4103
|
return () => panel.removeEventListener("mousedown", keep);
|
|
3968
4104
|
}, []);
|
|
3969
|
-
const scrollRef =
|
|
4105
|
+
const scrollRef = useCallback5((el) => {
|
|
3970
4106
|
el?.scrollIntoView({ block: "nearest" });
|
|
3971
4107
|
}, []);
|
|
3972
4108
|
if (items.length === 0) return null;
|
|
@@ -3976,7 +4112,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
3976
4112
|
const { label, description, aside, leading, shortcut, hint, size } = row(item);
|
|
3977
4113
|
return (
|
|
3978
4114
|
// A row of a list the editor drives from its caret: focus stays in the text, so the row is no Tab stop.
|
|
3979
|
-
/* @__PURE__ */
|
|
4115
|
+
/* @__PURE__ */ jsx56(
|
|
3980
4116
|
MenuItem,
|
|
3981
4117
|
{
|
|
3982
4118
|
role: "option",
|
|
@@ -4004,22 +4140,22 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
4004
4140
|
};
|
|
4005
4141
|
return (
|
|
4006
4142
|
// finalFocus={false}: focus never left the text, and a list that closes because focus moved elsewhere must not pull it back (71a4577b).
|
|
4007
|
-
/* @__PURE__ */
|
|
4008
|
-
i > 0 && /* @__PURE__ */
|
|
4009
|
-
section.label ? /* @__PURE__ */
|
|
4143
|
+
/* @__PURE__ */ jsx56(Popover, { anchor, open: rect !== null, side: "top", align: "left", className: width, maxHeight, ariaLabel, finalFocus: false, children: /* @__PURE__ */ jsx56("div", { ref: keepFocus, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "flex flex-col gap-0.5", children: shown2.map((section, i) => /* @__PURE__ */ jsxs38("div", { className: "contents", children: [
|
|
4144
|
+
i > 0 && /* @__PURE__ */ jsx56(MenuSeparator, {}),
|
|
4145
|
+
section.label ? /* @__PURE__ */ jsx56("div", { role: "group", "aria-label": section.label, children: /* @__PURE__ */ jsx56(MenuSection, { label: section.label, className: section.className, children: section.items.map(drawRow) }) }) : section.items.map(drawRow)
|
|
4010
4146
|
] }, section.label ?? i)) }) })
|
|
4011
4147
|
);
|
|
4012
4148
|
}
|
|
4013
4149
|
|
|
4014
4150
|
// src/ShowMore.tsx
|
|
4015
|
-
import { useLayoutEffect as useLayoutEffect5, useRef as useRef14, useState as
|
|
4151
|
+
import { useLayoutEffect as useLayoutEffect5, useRef as useRef14, useState as useState14 } from "react";
|
|
4016
4152
|
import { IconChevronDown as IconChevronDown4, IconChevronUp } from "@tabler/icons-react";
|
|
4017
|
-
import { jsx as
|
|
4153
|
+
import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4018
4154
|
var FADE = "linear-gradient(to top, transparent, black 40px)";
|
|
4019
4155
|
function ShowMore({ children, maxHeight = 96, contentClassName, className }) {
|
|
4020
4156
|
const box = useRef14(null);
|
|
4021
|
-
const [open, setOpen] =
|
|
4022
|
-
const [overflows, setOverflows] =
|
|
4157
|
+
const [open, setOpen] = useState14(false);
|
|
4158
|
+
const [overflows, setOverflows] = useState14(false);
|
|
4023
4159
|
useLayoutEffect5(() => {
|
|
4024
4160
|
const el = box.current;
|
|
4025
4161
|
if (!el) return;
|
|
@@ -4032,18 +4168,18 @@ function ShowMore({ children, maxHeight = 96, contentClassName, className }) {
|
|
|
4032
4168
|
}, [maxHeight]);
|
|
4033
4169
|
const cut = overflows && !open;
|
|
4034
4170
|
return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col items-start", className), children: [
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
overflows && /* @__PURE__ */
|
|
4171
|
+
/* @__PURE__ */ jsx57("div", { ref: box, className: cn("relative w-full", cut && "overflow-hidden", contentClassName), style: cut ? { maxHeight, maskImage: FADE, WebkitMaskImage: FADE } : void 0, onFocus: cut ? () => setOpen(true) : void 0, children }),
|
|
4172
|
+
overflows && /* @__PURE__ */ jsx57(Toggle, { open, onToggle: () => setOpen((o) => !o), className: "mt-1" })
|
|
4037
4173
|
] });
|
|
4038
4174
|
}
|
|
4039
4175
|
function Toggle({ open, onToggle, className }) {
|
|
4040
4176
|
const Icon = open ? IconChevronUp : IconChevronDown4;
|
|
4041
|
-
return /* @__PURE__ */
|
|
4177
|
+
return /* @__PURE__ */ jsx57(
|
|
4042
4178
|
Button,
|
|
4043
4179
|
{
|
|
4044
4180
|
variant: "outlined",
|
|
4045
4181
|
size: "small",
|
|
4046
|
-
leadingIcon: /* @__PURE__ */
|
|
4182
|
+
leadingIcon: /* @__PURE__ */ jsx57(Icon, { stroke: 1.5, className: "size-3.5" }),
|
|
4047
4183
|
className,
|
|
4048
4184
|
"aria-expanded": open,
|
|
4049
4185
|
onClick: onToggle,
|
|
@@ -4054,9 +4190,9 @@ function Toggle({ open, onToggle, className }) {
|
|
|
4054
4190
|
|
|
4055
4191
|
// src/Toolbar.tsx
|
|
4056
4192
|
import { Toolbar as BaseToolbar } from "@base-ui/react/toolbar";
|
|
4057
|
-
import { jsx as
|
|
4193
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
4058
4194
|
function Toolbar({ "aria-label": ariaLabel, orientation = "horizontal", loopFocus = true, surface = true, children, className }) {
|
|
4059
|
-
const strip = /* @__PURE__ */
|
|
4195
|
+
const strip = /* @__PURE__ */ jsx58(
|
|
4060
4196
|
BaseToolbar.Root,
|
|
4061
4197
|
{
|
|
4062
4198
|
"aria-label": ariaLabel,
|
|
@@ -4067,27 +4203,27 @@ function Toolbar({ "aria-label": ariaLabel, orientation = "horizontal", loopFocu
|
|
|
4067
4203
|
}
|
|
4068
4204
|
);
|
|
4069
4205
|
if (!surface) return strip;
|
|
4070
|
-
return /* @__PURE__ */
|
|
4206
|
+
return /* @__PURE__ */ jsx58(MenuPanel, { className: "w-fit p-1", children: strip });
|
|
4071
4207
|
}
|
|
4072
4208
|
function ToolbarButton({ ref, disabled, disabledReason, ...props }) {
|
|
4073
|
-
return /* @__PURE__ */
|
|
4209
|
+
return /* @__PURE__ */ jsx58(
|
|
4074
4210
|
BaseToolbar.Button,
|
|
4075
4211
|
{
|
|
4076
4212
|
ref,
|
|
4077
4213
|
disabled: disabled || !!disabledReason,
|
|
4078
4214
|
focusableWhenDisabled: true,
|
|
4079
|
-
render: /* @__PURE__ */
|
|
4215
|
+
render: /* @__PURE__ */ jsx58(IconButton, { disabled, disabledReason, ...props })
|
|
4080
4216
|
}
|
|
4081
4217
|
);
|
|
4082
4218
|
}
|
|
4083
4219
|
function ToolbarLink({ ref, href, ...props }) {
|
|
4084
|
-
return /* @__PURE__ */
|
|
4220
|
+
return /* @__PURE__ */ jsx58(BaseToolbar.Link, { ref, render: /* @__PURE__ */ jsx58(IconButton, { href, ...props }) });
|
|
4085
4221
|
}
|
|
4086
4222
|
function ToolbarInput({ size, ...props }) {
|
|
4087
|
-
return /* @__PURE__ */
|
|
4223
|
+
return /* @__PURE__ */ jsx58(BaseToolbar.Input, { render: /* @__PURE__ */ jsx58(TextInput, { size }), ...props });
|
|
4088
4224
|
}
|
|
4089
4225
|
function ToolbarSeparator({ className }) {
|
|
4090
|
-
return /* @__PURE__ */
|
|
4226
|
+
return /* @__PURE__ */ jsx58(
|
|
4091
4227
|
BaseToolbar.Separator,
|
|
4092
4228
|
{
|
|
4093
4229
|
orientation: "vertical",
|
|
@@ -4097,9 +4233,9 @@ function ToolbarSeparator({ className }) {
|
|
|
4097
4233
|
}
|
|
4098
4234
|
|
|
4099
4235
|
// src/ReactionPicker.tsx
|
|
4100
|
-
import { jsx as
|
|
4236
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
4101
4237
|
function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reactions", surface = true, className }) {
|
|
4102
|
-
return /* @__PURE__ */
|
|
4238
|
+
return /* @__PURE__ */ jsx59(Toolbar, { "aria-label": ariaLabel, surface, className: cn("gap-0.5", className), children: options.map((option) => (
|
|
4103
4239
|
/*
|
|
4104
4240
|
A `ToolbarButton`, not a button in a tooltip wrapper. The wrapper
|
|
4105
4241
|
would become the toolbar's item and the button inside it would never
|
|
@@ -4109,14 +4245,14 @@ function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reaction
|
|
|
4109
4245
|
The tooltip names it for a pointer, `aria-label` for everything else,
|
|
4110
4246
|
and both say the meaning rather than the glyph.
|
|
4111
4247
|
*/
|
|
4112
|
-
/* @__PURE__ */
|
|
4248
|
+
/* @__PURE__ */ jsx59(
|
|
4113
4249
|
ToolbarButton,
|
|
4114
4250
|
{
|
|
4115
4251
|
"aria-label": option.label,
|
|
4116
4252
|
tooltip: option.label,
|
|
4117
4253
|
onClick: () => onSelect(option.emoji),
|
|
4118
4254
|
className: "size-7",
|
|
4119
|
-
children: /* @__PURE__ */
|
|
4255
|
+
children: /* @__PURE__ */ jsx59("span", { "aria-hidden": "true", className: "text-h3 leading-none", children: option.emoji })
|
|
4120
4256
|
},
|
|
4121
4257
|
option.emoji
|
|
4122
4258
|
)
|
|
@@ -4125,23 +4261,23 @@ function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reaction
|
|
|
4125
4261
|
|
|
4126
4262
|
// src/PreviewCard.tsx
|
|
4127
4263
|
import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card";
|
|
4128
|
-
import { jsx as
|
|
4264
|
+
import { jsx as jsx60, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4129
4265
|
var GAP6 = 12;
|
|
4130
4266
|
var VIEWPORT_PAD6 = 8;
|
|
4131
4267
|
var OPEN_DELAY2 = 350;
|
|
4132
4268
|
var CLOSE_DELAY = 200;
|
|
4133
4269
|
function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, closeDelay = CLOSE_DELAY, className, contentClassName, wrapperClassName }) {
|
|
4134
4270
|
return /* @__PURE__ */ jsxs40(BasePreviewCard.Root, { children: [
|
|
4135
|
-
/* @__PURE__ */
|
|
4271
|
+
/* @__PURE__ */ jsx60(
|
|
4136
4272
|
BasePreviewCard.Trigger,
|
|
4137
4273
|
{
|
|
4138
4274
|
delay,
|
|
4139
4275
|
closeDelay,
|
|
4140
|
-
render: /* @__PURE__ */
|
|
4276
|
+
render: /* @__PURE__ */ jsx60("span", { className: cn("inline-flex", wrapperClassName) }),
|
|
4141
4277
|
children
|
|
4142
4278
|
}
|
|
4143
4279
|
),
|
|
4144
|
-
/* @__PURE__ */
|
|
4280
|
+
/* @__PURE__ */ jsx60(BasePreviewCard.Portal, { children: /* @__PURE__ */ jsx60(
|
|
4145
4281
|
BasePreviewCard.Positioner,
|
|
4146
4282
|
{
|
|
4147
4283
|
side,
|
|
@@ -4149,12 +4285,12 @@ function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, c
|
|
|
4149
4285
|
sideOffset: GAP6,
|
|
4150
4286
|
collisionPadding: VIEWPORT_PAD6,
|
|
4151
4287
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
4152
|
-
children: /* @__PURE__ */
|
|
4288
|
+
children: /* @__PURE__ */ jsx60(
|
|
4153
4289
|
BasePreviewCard.Popup,
|
|
4154
4290
|
{
|
|
4155
4291
|
className: cn("w-[360px] p-0 outline-none", className),
|
|
4156
|
-
render: /* @__PURE__ */
|
|
4157
|
-
children: /* @__PURE__ */
|
|
4292
|
+
render: /* @__PURE__ */ jsx60(MenuPanel, {}),
|
|
4293
|
+
children: /* @__PURE__ */ jsx60(ScrollArea, { viewportClassName: "max-h-[min(300px,var(--available-height))]", contentClassName: cn("flex flex-col gap-3 p-3", contentClassName), children: content })
|
|
4158
4294
|
}
|
|
4159
4295
|
)
|
|
4160
4296
|
}
|
|
@@ -4347,7 +4483,7 @@ function childrenOf(object, options) {
|
|
|
4347
4483
|
href: options.hrefOf(child, false),
|
|
4348
4484
|
...key ? { key } : {},
|
|
4349
4485
|
status: { label: status?.value ?? nounOf(child) ?? "File", colour: colourOf(status?.colour) ?? "muted" },
|
|
4350
|
-
...person?.displayName ? { owner: { name: person.displayName, ...person.picture ? { picture: person.picture } : {} } } : {}
|
|
4486
|
+
...person?.displayName ? { owner: { name: person.displayName, ...person.picture ? { picture: person.picture } : {}, ...person.bot ? { bot: true } : {} } } : {}
|
|
4351
4487
|
};
|
|
4352
4488
|
});
|
|
4353
4489
|
}
|
|
@@ -4393,7 +4529,7 @@ function ownerOf(object, options, onAct) {
|
|
|
4393
4529
|
if (!slot) return void 0;
|
|
4394
4530
|
const person = people?.[slot.value];
|
|
4395
4531
|
return {
|
|
4396
|
-
owner: { value: slot.value, options: [{ value: slot.value, label: person?.displayName ?? "\u2014", ...person?.picture ? { picture: person.picture } : {} }] },
|
|
4532
|
+
owner: { value: slot.value, options: [{ value: slot.value, label: person?.displayName ?? "\u2014", ...person?.picture ? { picture: person.picture } : {}, ...person?.bot ? { bot: true } : {} }] },
|
|
4397
4533
|
...slot.label ? { ownerLabel: slot.label } : {}
|
|
4398
4534
|
};
|
|
4399
4535
|
}
|
|
@@ -4419,7 +4555,7 @@ function linkedFrom(object, options) {
|
|
|
4419
4555
|
kind: "message",
|
|
4420
4556
|
title: name,
|
|
4421
4557
|
href,
|
|
4422
|
-
author: { name, ...person?.picture ? { picture: person.picture } : {} },
|
|
4558
|
+
author: { name, ...person?.picture ? { picture: person.picture } : {}, ...person?.bot ? { bot: true } : {} },
|
|
4423
4559
|
...body ? { body } : {},
|
|
4424
4560
|
...updated ? { updated } : {}
|
|
4425
4561
|
};
|
|
@@ -4473,7 +4609,7 @@ function linkStateFrom(object, unread, options) {
|
|
|
4473
4609
|
// src/LinkParts.tsx
|
|
4474
4610
|
import { useContext as useContext7 } from "react";
|
|
4475
4611
|
import { IconCircleCheck, IconCircleDashed as IconCircleDashed2, IconCircleHalf2, IconCircleX, IconFileText, IconMessage2 as IconMessage22 } from "@tabler/icons-react";
|
|
4476
|
-
import { jsx as
|
|
4612
|
+
import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4477
4613
|
var STATUS_ICON = {
|
|
4478
4614
|
neutral: { Icon: IconCircleDashed2, tone: "text-text-secondary" },
|
|
4479
4615
|
blue: { Icon: IconCircleHalf2, tone: "text-info-default" },
|
|
@@ -4482,28 +4618,28 @@ var STATUS_ICON = {
|
|
|
4482
4618
|
};
|
|
4483
4619
|
function StatusIcon({ colour }) {
|
|
4484
4620
|
const { Icon, tone } = STATUS_ICON[colour];
|
|
4485
|
-
return /* @__PURE__ */
|
|
4621
|
+
return /* @__PURE__ */ jsx61(Icon, { size: 14, stroke: 1.5, className: cn("shrink-0", tone), "aria-hidden": true });
|
|
4486
4622
|
}
|
|
4487
4623
|
function StatusMark({ status }) {
|
|
4488
4624
|
return /* @__PURE__ */ jsxs41(WithTooltip, { label: status.label, inline: true, wrapperClassName: "inline-flex shrink-0 items-center", children: [
|
|
4489
|
-
/* @__PURE__ */
|
|
4490
|
-
/* @__PURE__ */
|
|
4625
|
+
/* @__PURE__ */ jsx61(StatusIcon, { colour: status.colour }),
|
|
4626
|
+
/* @__PURE__ */ jsx61("span", { className: "sr-only", children: status.label })
|
|
4491
4627
|
] });
|
|
4492
4628
|
}
|
|
4493
4629
|
function LinkedIcon({ kind, size = 16, tone = "secondary" }) {
|
|
4494
|
-
if (kind === "page") return /* @__PURE__ */
|
|
4495
|
-
return /* @__PURE__ */
|
|
4630
|
+
if (kind === "page") return /* @__PURE__ */ jsx61(IconFileText, { size, stroke: 1.5, className: cn("shrink-0", tone === "secondary" && "text-text-secondary"), "aria-hidden": true });
|
|
4631
|
+
return /* @__PURE__ */ jsx61(KindIcon, { kind, size, tone });
|
|
4496
4632
|
}
|
|
4497
4633
|
function LinkKey({ children, tone = "muted" }) {
|
|
4498
|
-
return /* @__PURE__ */
|
|
4634
|
+
return /* @__PURE__ */ jsx61("span", { className: cn("shrink-0 text-caption tabular-nums", tone === "secondary" ? "text-text-secondary" : "text-text-muted"), children });
|
|
4499
4635
|
}
|
|
4500
4636
|
var KIND_NOUN = { issue: "Issue", project: "Project", topic: "Topic", page: "Document" };
|
|
4501
4637
|
function kindNounOf(linked) {
|
|
4502
4638
|
return linked.noun ?? KIND_NOUN[linked.kind];
|
|
4503
4639
|
}
|
|
4504
4640
|
function LinkTile({ kind, author }) {
|
|
4505
|
-
if (author) return /* @__PURE__ */
|
|
4506
|
-
return /* @__PURE__ */
|
|
4641
|
+
if (author) return /* @__PURE__ */ jsx61(Avatar, { name: author.name, src: author.picture, bot: author.bot, size: 36 });
|
|
4642
|
+
return /* @__PURE__ */ jsx61("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx61(LinkedIcon, { kind }) });
|
|
4507
4643
|
}
|
|
4508
4644
|
function ProgressRing({ done, total }) {
|
|
4509
4645
|
const size = 16;
|
|
@@ -4511,10 +4647,10 @@ function ProgressRing({ done, total }) {
|
|
|
4511
4647
|
const r = (size - stroke) / 2;
|
|
4512
4648
|
const c = 2 * Math.PI * r;
|
|
4513
4649
|
const share = total > 0 ? Math.min(done, total) / total : 0;
|
|
4514
|
-
return /* @__PURE__ */
|
|
4650
|
+
return /* @__PURE__ */ jsx61(WithTooltip, { label: `${done} of ${total} done`, inline: true, wrapperClassName: "inline-flex shrink-0", children: /* @__PURE__ */ jsxs41("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-small tabular-nums text-text-secondary", children: [
|
|
4515
4651
|
/* @__PURE__ */ jsxs41("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "shrink-0 -rotate-90", "aria-hidden": true, children: [
|
|
4516
|
-
/* @__PURE__ */
|
|
4517
|
-
/* @__PURE__ */
|
|
4652
|
+
/* @__PURE__ */ jsx61("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, className: "stroke-border-default" }),
|
|
4653
|
+
/* @__PURE__ */ jsx61("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, strokeLinecap: "round", strokeDasharray: `${c * share} ${c}`, className: "stroke-success-default" })
|
|
4518
4654
|
] }),
|
|
4519
4655
|
done,
|
|
4520
4656
|
"/",
|
|
@@ -4532,10 +4668,10 @@ function CommentCount({ conversation, noun = "comments" }) {
|
|
|
4532
4668
|
const said = countWords(count, noun);
|
|
4533
4669
|
if (boxed || !href) {
|
|
4534
4670
|
return /* @__PURE__ */ jsxs41("span", { className: cn("inline-flex h-6 shrink-0 items-center gap-1 px-1.5 text-small tabular-nums", unread ? "font-medium text-text-primary" : "text-text-secondary"), children: [
|
|
4535
|
-
/* @__PURE__ */
|
|
4536
|
-
/* @__PURE__ */
|
|
4537
|
-
/* @__PURE__ */
|
|
4538
|
-
unread && /* @__PURE__ */
|
|
4671
|
+
/* @__PURE__ */ jsx61(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4672
|
+
/* @__PURE__ */ jsx61("span", { "aria-hidden": true, children: count }),
|
|
4673
|
+
/* @__PURE__ */ jsx61("span", { className: "sr-only", children: unread ? `${said}, unread` : said }),
|
|
4674
|
+
unread && /* @__PURE__ */ jsx61(UnreadDot, { className: "h-auto w-auto" })
|
|
4539
4675
|
] });
|
|
4540
4676
|
}
|
|
4541
4677
|
return (
|
|
@@ -4546,19 +4682,19 @@ function CommentCount({ conversation, noun = "comments" }) {
|
|
|
4546
4682
|
* its 6px and the row's gap part it from the faces and the ring beside it (14px to its icon). The count is in
|
|
4547
4683
|
* the small size (10px).
|
|
4548
4684
|
*/
|
|
4549
|
-
/* @__PURE__ */
|
|
4550
|
-
/* @__PURE__ */
|
|
4551
|
-
/* @__PURE__ */
|
|
4552
|
-
/* @__PURE__ */
|
|
4553
|
-
unread && /* @__PURE__ */
|
|
4685
|
+
/* @__PURE__ */ jsx61("span", { className: cn("relative z-10 inline-flex h-6 shrink-0 rounded-md text-small tabular-nums transition-colors hover:bg-bg-hover", unread ? "font-medium text-text-primary" : "text-text-secondary"), children: /* @__PURE__ */ jsxs41(Link, { href, variant: "plain", className: "flex h-full items-center gap-1 px-1.5", children: [
|
|
4686
|
+
/* @__PURE__ */ jsx61(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
4687
|
+
/* @__PURE__ */ jsx61("span", { "aria-hidden": true, children: count }),
|
|
4688
|
+
/* @__PURE__ */ jsx61("span", { className: "sr-only", children: unread ? `${said}, unread \u2014 open the conversation` : `${said} \u2014 open the conversation` }),
|
|
4689
|
+
unread && /* @__PURE__ */ jsx61(UnreadDot, { className: "h-auto w-auto" })
|
|
4554
4690
|
] }) })
|
|
4555
4691
|
);
|
|
4556
4692
|
}
|
|
4557
4693
|
function OwnerFace({ option }) {
|
|
4558
4694
|
const nobody = !option || option.value === "";
|
|
4559
|
-
return /* @__PURE__ */
|
|
4695
|
+
return /* @__PURE__ */ jsx61(Avatar, { name: nobody ? void 0 : option.label, src: nobody ? void 0 : option.picture, bot: !nobody && option.bot, size: 16 });
|
|
4560
4696
|
}
|
|
4561
|
-
function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false }) {
|
|
4697
|
+
function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false, disabledReason }) {
|
|
4562
4698
|
const statusNow = chosenOf(status);
|
|
4563
4699
|
const ownerNow = chosenOf(owner);
|
|
4564
4700
|
const statusWords = status && (readOnly || !status.onChange);
|
|
@@ -4568,9 +4704,9 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4568
4704
|
// Boxed, they are see-through as the card they sit in is: a field's fill was a dark hole on a selected message (Katerina, 30 Oct).
|
|
4569
4705
|
/* @__PURE__ */ jsxs41("span", { className: cn("flex h-6 min-w-0 items-center text-caption text-text-secondary", statusWords || ownerWords ? "gap-4" : "gap-2"), children: [
|
|
4570
4706
|
status && (statusWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
4571
|
-
statusNow?.colour && /* @__PURE__ */
|
|
4707
|
+
statusNow?.colour && /* @__PURE__ */ jsx61(StatusIcon, { colour: statusNow.colour }),
|
|
4572
4708
|
statusNow?.label ?? "No status"
|
|
4573
|
-
] }) : /* @__PURE__ */
|
|
4709
|
+
] }) : /* @__PURE__ */ jsx61(
|
|
4574
4710
|
Select,
|
|
4575
4711
|
{
|
|
4576
4712
|
size: "small",
|
|
@@ -4579,13 +4715,14 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4579
4715
|
value: status.value ?? "",
|
|
4580
4716
|
onChange: (value) => status.onChange?.(value),
|
|
4581
4717
|
ariaLabel: "Status",
|
|
4582
|
-
|
|
4718
|
+
disabledReason,
|
|
4719
|
+
options: status.options.map((option) => ({ value: option.value, label: option.label, leading: option.colour && /* @__PURE__ */ jsx61(StatusIcon, { colour: option.colour }) }))
|
|
4583
4720
|
}
|
|
4584
4721
|
)),
|
|
4585
4722
|
owner && (ownerWords ? /* @__PURE__ */ jsxs41("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
|
|
4586
|
-
/* @__PURE__ */
|
|
4587
|
-
/* @__PURE__ */
|
|
4588
|
-
] }) : /* @__PURE__ */
|
|
4723
|
+
/* @__PURE__ */ jsx61(OwnerFace, { option: ownerNow }),
|
|
4724
|
+
/* @__PURE__ */ jsx61("span", { className: "truncate", children: ownerNow?.label ?? "Unassigned" })
|
|
4725
|
+
] }) : /* @__PURE__ */ jsx61(
|
|
4589
4726
|
Select,
|
|
4590
4727
|
{
|
|
4591
4728
|
size: "small",
|
|
@@ -4595,7 +4732,8 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false })
|
|
|
4595
4732
|
placeholder: "Unassigned",
|
|
4596
4733
|
onChange: (value) => owner.onChange?.(value),
|
|
4597
4734
|
ariaLabel: ownerLabel,
|
|
4598
|
-
|
|
4735
|
+
disabledReason,
|
|
4736
|
+
options: owner.options.map((option) => ({ value: option.value, label: option.label, leading: /* @__PURE__ */ jsx61(OwnerFace, { option }) }))
|
|
4599
4737
|
}
|
|
4600
4738
|
))
|
|
4601
4739
|
] })
|
|
@@ -4611,40 +4749,40 @@ import { useContext as useContext9 } from "react";
|
|
|
4611
4749
|
// src/LinkRow.tsx
|
|
4612
4750
|
import { useContext as useContext8 } from "react";
|
|
4613
4751
|
import { IconExternalLink } from "@tabler/icons-react";
|
|
4614
|
-
import { jsx as
|
|
4752
|
+
import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4615
4753
|
var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
|
|
4616
4754
|
function LinkUnavailable({ kind, noun, openIn, card = false, deleted = false }) {
|
|
4617
|
-
return /* @__PURE__ */
|
|
4755
|
+
return /* @__PURE__ */ jsx62(UnavailableRow, { kind, words: `${noun} ${deleted ? "deleted" : "not available"}`, openIn: deleted ? void 0 : openIn, card });
|
|
4618
4756
|
}
|
|
4619
4757
|
function UnavailableRow({ kind, words, href, openIn, card = false }) {
|
|
4620
4758
|
const wide = useContext8(inTheBox);
|
|
4621
4759
|
return /* @__PURE__ */ jsxs42(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, "max-w-[480px]"), children: [
|
|
4622
|
-
/* @__PURE__ */
|
|
4623
|
-
/* @__PURE__ */
|
|
4624
|
-
openIn && /* @__PURE__ */
|
|
4760
|
+
/* @__PURE__ */ jsx62("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx62(LinkedIcon, { kind }) }),
|
|
4761
|
+
/* @__PURE__ */ jsx62("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: href && !wide ? /* @__PURE__ */ jsx62(Link, { href, variant: "quiet", children: words }) : words }),
|
|
4762
|
+
openIn && /* @__PURE__ */ jsx62(WithTooltip, { label: `Open in ${openIn.app}`, children: /* @__PURE__ */ jsx62(Button, { href: openIn.href, external: true, size: "small", className: "shrink-0", leadingIcon: /* @__PURE__ */ jsx62(IconExternalLink, { stroke: 1.5, className: "size-3.5" }), "aria-label": `Open in ${openIn.app}`, children: "Open" }) })
|
|
4625
4763
|
] });
|
|
4626
4764
|
}
|
|
4627
4765
|
function linkMetaOf(linked, withWhen = false) {
|
|
4628
4766
|
return [linked.key, kindNounOf(linked), linked.archived ? "Archived" : void 0, linked.subtitle, withWhen ? linked.updated : void 0].filter(Boolean).join(" \xB7 ");
|
|
4629
4767
|
}
|
|
4630
4768
|
function WrittenUrl({ url, block = false }) {
|
|
4631
|
-
const link = /* @__PURE__ */
|
|
4632
|
-
return block ? /* @__PURE__ */
|
|
4769
|
+
const link = /* @__PURE__ */ jsx62(Link, { href: url, external: true, children: url });
|
|
4770
|
+
return block ? /* @__PURE__ */ jsx62("span", { className: "block min-w-0 truncate text-body-2", children: link }) : link;
|
|
4633
4771
|
}
|
|
4634
4772
|
function LinkRow({ link, preview = true }) {
|
|
4635
4773
|
const width = "max-w-[480px]";
|
|
4636
4774
|
if (link.state === "loading") {
|
|
4637
|
-
return /* @__PURE__ */
|
|
4638
|
-
/* @__PURE__ */
|
|
4775
|
+
return /* @__PURE__ */ jsx62("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs42(Card, { fill: "inset", "aria-hidden": true, className: cn(ROW_CLASSES2, width), children: [
|
|
4776
|
+
/* @__PURE__ */ jsx62("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx62(LinkedIcon, { kind: link.kind }) }),
|
|
4639
4777
|
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
4640
|
-
/* @__PURE__ */
|
|
4641
|
-
/* @__PURE__ */
|
|
4778
|
+
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-3 w-2/5" }),
|
|
4779
|
+
/* @__PURE__ */ jsx62(SkeletonBar, { on: "inset", className: "h-2.5 w-1/4" })
|
|
4642
4780
|
] })
|
|
4643
4781
|
] }) });
|
|
4644
4782
|
}
|
|
4645
4783
|
if (link.state === "unavailable") {
|
|
4646
|
-
if (link.url) return /* @__PURE__ */
|
|
4647
|
-
return /* @__PURE__ */
|
|
4784
|
+
if (link.url) return /* @__PURE__ */ jsx62(WrittenUrl, { url: link.url, block: true });
|
|
4785
|
+
return /* @__PURE__ */ jsx62(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, deleted: link.deleted });
|
|
4648
4786
|
}
|
|
4649
4787
|
const { linked } = link;
|
|
4650
4788
|
const status = chosenOf(linked.status);
|
|
@@ -4652,49 +4790,49 @@ function LinkRow({ link, preview = true }) {
|
|
|
4652
4790
|
const said = linked.kind === "message" ? linked.author : void 0;
|
|
4653
4791
|
const meta = said ? "" : linkMetaOf(linked, true) || linked.summary;
|
|
4654
4792
|
const row = /* @__PURE__ */ jsxs42(Card, { fill: "inset", hover: "hairline", className: cn("relative", ROW_CLASSES2, width), children: [
|
|
4655
|
-
/* @__PURE__ */
|
|
4793
|
+
/* @__PURE__ */ jsx62(LinkTile, { kind: linked.kind, author: said }),
|
|
4656
4794
|
said ? (
|
|
4657
4795
|
// Words a person wrote, on one line, as a quote is cut to one (Katerina, 30 Oct): the face, the name, the words
|
|
4658
4796
|
// cut to fit, the time.
|
|
4659
4797
|
/* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
4660
|
-
/* @__PURE__ */
|
|
4661
|
-
linked.body && /* @__PURE__ */
|
|
4662
|
-
linked.updated && /* @__PURE__ */
|
|
4798
|
+
/* @__PURE__ */ jsx62("span", { className: "contents text-body-2-strong text-text-primary", children: linked.href ? /* @__PURE__ */ jsx62(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0", children: said.name }) : /* @__PURE__ */ jsx62("span", { className: "min-w-0 truncate", children: said.name }) }),
|
|
4799
|
+
linked.body && /* @__PURE__ */ jsx62("span", { className: "min-w-0 flex-1 truncate text-caption text-text-secondary", children: linked.body }),
|
|
4800
|
+
linked.updated && /* @__PURE__ */ jsx62("span", { className: cn("ml-auto shrink-0 text-caption text-text-muted", TIME_CLASSES), children: linked.updated })
|
|
4663
4801
|
] })
|
|
4664
4802
|
) : /* @__PURE__ */ jsxs42("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4665
|
-
/* @__PURE__ */
|
|
4666
|
-
meta && /* @__PURE__ */
|
|
4803
|
+
/* @__PURE__ */ jsx62("span", { className: "contents text-body-2-strong text-text-primary", children: linked.href ? /* @__PURE__ */ jsx62(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, children: linked.title }) : /* @__PURE__ */ jsx62("span", { className: "truncate", children: linked.title }) }),
|
|
4804
|
+
meta && /* @__PURE__ */ jsx62("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4667
4805
|
] }),
|
|
4668
4806
|
/* @__PURE__ */ jsxs42("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
4669
|
-
linked.done ? /* @__PURE__ */
|
|
4670
|
-
linked.conversation && /* @__PURE__ */
|
|
4671
|
-
owner && /* @__PURE__ */
|
|
4672
|
-
linked.members && /* @__PURE__ */
|
|
4673
|
-
linked.authors && /* @__PURE__ */
|
|
4807
|
+
linked.done ? /* @__PURE__ */ jsx62(ProgressRing, { done: linked.done.done, total: linked.done.total }) : status?.colour && /* @__PURE__ */ jsx62(StatusMark, { status: { label: status.label, colour: status.colour } }),
|
|
4808
|
+
linked.conversation && /* @__PURE__ */ jsx62(CommentCount, { conversation: linked.conversation, noun: linked.conversation.noun }),
|
|
4809
|
+
owner && /* @__PURE__ */ jsx62(Avatar, { name: owner.label, src: owner.picture, bot: owner.bot, size: 16 }),
|
|
4810
|
+
linked.members && /* @__PURE__ */ jsx62(AvatarGroup, { members: linked.members, size: 16, on: "inset" }),
|
|
4811
|
+
linked.authors && /* @__PURE__ */ jsx62(AvatarGroup, { members: linked.authors, size: 16, on: "inset" })
|
|
4674
4812
|
] })
|
|
4675
4813
|
] });
|
|
4676
|
-
return preview ? /* @__PURE__ */
|
|
4814
|
+
return preview ? /* @__PURE__ */ jsx62(LinkPreview, { linked, block: true, children: row }) : row;
|
|
4677
4815
|
}
|
|
4678
4816
|
|
|
4679
4817
|
// src/LinkCard.tsx
|
|
4680
|
-
import { Fragment as Fragment14, jsx as
|
|
4818
|
+
import { Fragment as Fragment14, jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4681
4819
|
var CARD_CLASSES = "flex flex-col gap-3 p-3";
|
|
4682
4820
|
function CardLink({ href, truncate = false, className, children }) {
|
|
4683
4821
|
const boxed = useContext9(inTheBox);
|
|
4684
|
-
if (boxed || !href) return /* @__PURE__ */
|
|
4685
|
-
return /* @__PURE__ */
|
|
4822
|
+
if (boxed || !href) return /* @__PURE__ */ jsx63("span", { className: cn(truncate && "truncate", className), children });
|
|
4823
|
+
return /* @__PURE__ */ jsx63(Link, { href, variant: "quiet", truncate, className, children });
|
|
4686
4824
|
}
|
|
4687
4825
|
function LinkCard({ link, readOnly = false, bare = false }) {
|
|
4688
4826
|
const boxed = useContext9(inTheBox);
|
|
4689
|
-
if (link.state === "loading") return /* @__PURE__ */
|
|
4827
|
+
if (link.state === "loading") return /* @__PURE__ */ jsx63(LinkCardLoading, { kind: link.kind, shape: link.shape });
|
|
4690
4828
|
if (link.state === "unavailable") {
|
|
4691
|
-
if (link.url) return /* @__PURE__ */
|
|
4692
|
-
return /* @__PURE__ */
|
|
4829
|
+
if (link.url) return /* @__PURE__ */ jsx63(WrittenUrl, { url: link.url, block: true });
|
|
4830
|
+
return /* @__PURE__ */ jsx63(LinkUnavailable, { kind: link.kind, noun: link.noun, openIn: link.openIn, deleted: link.deleted, card: true });
|
|
4693
4831
|
}
|
|
4694
4832
|
const { linked } = link;
|
|
4695
|
-
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */
|
|
4696
|
-
if (bare) return /* @__PURE__ */
|
|
4697
|
-
return /* @__PURE__ */
|
|
4833
|
+
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx63(SaidBody, { linked }) : /* @__PURE__ */ jsx63(CardBody, { linked, readOnly: readOnly || boxed });
|
|
4834
|
+
if (bare) return /* @__PURE__ */ jsx63("div", { className: CARD_CLASSES, children: body });
|
|
4835
|
+
return /* @__PURE__ */ jsx63(Card, { fill: boxed ? "elevated" : "inset", className: cn(CARD_CLASSES, "max-w-[480px]"), children: body });
|
|
4698
4836
|
}
|
|
4699
4837
|
function CardBody({ linked, readOnly }) {
|
|
4700
4838
|
const boxed = useContext9(inTheBox);
|
|
@@ -4703,42 +4841,42 @@ function CardBody({ linked, readOnly }) {
|
|
|
4703
4841
|
const footed = Boolean(linked.status || linked.owner || linked.authors || linked.updated);
|
|
4704
4842
|
return /* @__PURE__ */ jsxs43(Fragment14, { children: [
|
|
4705
4843
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4706
|
-
/* @__PURE__ */
|
|
4844
|
+
/* @__PURE__ */ jsx63(LinkTile, { kind: linked.kind }),
|
|
4707
4845
|
/* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4708
|
-
/* @__PURE__ */
|
|
4709
|
-
meta && /* @__PURE__ */
|
|
4846
|
+
/* @__PURE__ */ jsx63("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx63(CardLink, { href: linked.href, truncate: true, className: "block", children: linked.title }) }),
|
|
4847
|
+
meta && /* @__PURE__ */ jsx63("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
4710
4848
|
] }),
|
|
4711
4849
|
(linked.done || linked.conversation || linked.members) && // On the title's line, not halfway down the header: the ring, the count, the faces, as a row's (Katerina, 30 Oct).
|
|
4712
4850
|
/* @__PURE__ */ jsxs43("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
4713
|
-
linked.done && /* @__PURE__ */
|
|
4714
|
-
linked.conversation && /* @__PURE__ */
|
|
4715
|
-
linked.members && /* @__PURE__ */
|
|
4851
|
+
linked.done && /* @__PURE__ */ jsx63(ProgressRing, { done: linked.done.done, total: linked.done.total }),
|
|
4852
|
+
linked.conversation && /* @__PURE__ */ jsx63(CommentCount, { conversation: linked.conversation, noun: linked.conversation.noun }),
|
|
4853
|
+
linked.members && /* @__PURE__ */ jsx63(AvatarGroup, { members: linked.members, size: 16, on })
|
|
4716
4854
|
] })
|
|
4717
4855
|
] }),
|
|
4718
|
-
linked.summary && /* @__PURE__ */
|
|
4856
|
+
linked.summary && /* @__PURE__ */ jsx63("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.summary }),
|
|
4719
4857
|
linked.children && linked.children.length > 0 && // In a box of their own, a hairline between them, as the card first drew them (Katerina, 29 Oct: "add back the borders").
|
|
4720
|
-
/* @__PURE__ */
|
|
4721
|
-
/* @__PURE__ */
|
|
4722
|
-
child.key && /* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4724
|
-
child.owner ? /* @__PURE__ */
|
|
4858
|
+
/* @__PURE__ */ jsx63("div", { className: "flex flex-col divide-y divide-border-subtle rounded-md border border-border-subtle leaf:divide-border-strong leaf:border-border-strong", children: linked.children.map((child) => /* @__PURE__ */ jsxs43("div", { className: cn("relative flex h-8 items-center gap-2 px-2", !boxed && "hover:bg-bg-active"), children: [
|
|
4859
|
+
/* @__PURE__ */ jsx63(StatusMark, { status: child.status }),
|
|
4860
|
+
child.key && /* @__PURE__ */ jsx63(LinkKey, { children: child.key }),
|
|
4861
|
+
/* @__PURE__ */ jsx63("span", { className: "contents text-body-2 text-text-primary", children: boxed || !child.href ? /* @__PURE__ */ jsx63("span", { className: "min-w-0 flex-1 truncate", children: child.title }) : /* @__PURE__ */ jsx63(Link, { href: child.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0 flex-1", children: child.title }) }),
|
|
4862
|
+
child.owner ? /* @__PURE__ */ jsx63(Avatar, { name: child.owner.name, src: child.owner.picture, bot: child.owner.bot, size: 16 }) : /* @__PURE__ */ jsx63("span", { className: "size-4 shrink-0", "aria-hidden": true })
|
|
4725
4863
|
] }, child.id)) }),
|
|
4726
4864
|
linked.latest && // 12px between the words "Latest conversation" and the quote they name (Katerina, 29 Oct).
|
|
4727
4865
|
/* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-3", children: [
|
|
4728
|
-
/* @__PURE__ */
|
|
4866
|
+
/* @__PURE__ */ jsx63("span", { className: "text-caption text-text-muted", children: "Latest conversation" }),
|
|
4729
4867
|
/* @__PURE__ */ jsxs43("div", { className: cn("flex flex-col gap-1", QUOTE_BAR_CLASSES), children: [
|
|
4730
4868
|
/* @__PURE__ */ jsxs43("span", { className: "flex items-center gap-2 text-caption", children: [
|
|
4731
|
-
/* @__PURE__ */
|
|
4732
|
-
/* @__PURE__ */
|
|
4733
|
-
/* @__PURE__ */
|
|
4869
|
+
/* @__PURE__ */ jsx63(Avatar, { name: linked.latest.author.name, src: linked.latest.author.picture, bot: linked.latest.author.bot, size: 16 }),
|
|
4870
|
+
/* @__PURE__ */ jsx63("span", { className: "text-text-primary", children: linked.latest.author.name }),
|
|
4871
|
+
/* @__PURE__ */ jsx63("span", { className: cn("text-text-muted", TIME_CLASSES), children: linked.latest.at })
|
|
4734
4872
|
] }),
|
|
4735
|
-
/* @__PURE__ */
|
|
4873
|
+
/* @__PURE__ */ jsx63("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.latest.body })
|
|
4736
4874
|
] })
|
|
4737
4875
|
] }),
|
|
4738
4876
|
footed && /* @__PURE__ */ jsxs43("div", { className: "flex min-h-6 items-center gap-2", children: [
|
|
4739
|
-
(linked.status || linked.owner) && /* @__PURE__ */
|
|
4877
|
+
(linked.status || linked.owner) && /* @__PURE__ */ jsx63(LinkPickers, { status: linked.status, owner: linked.owner, ownerLabel: linked.ownerLabel, readOnly }),
|
|
4740
4878
|
linked.authors ? /* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 items-center gap-2 text-caption text-text-secondary", children: [
|
|
4741
|
-
/* @__PURE__ */
|
|
4879
|
+
/* @__PURE__ */ jsx63(AvatarGroup, { members: linked.authors, size: 16, on }),
|
|
4742
4880
|
linked.updated && /* @__PURE__ */ jsxs43("span", { className: "shrink-0 italic", children: [
|
|
4743
4881
|
"Updated ",
|
|
4744
4882
|
linked.updated
|
|
@@ -4754,11 +4892,11 @@ function SaidBody({ linked }) {
|
|
|
4754
4892
|
const author = linked.author;
|
|
4755
4893
|
return /* @__PURE__ */ jsxs43(Fragment14, { children: [
|
|
4756
4894
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
4757
|
-
/* @__PURE__ */
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
linked.updated && /* @__PURE__ */
|
|
4895
|
+
/* @__PURE__ */ jsx63(Avatar, { name: author.name, src: author.picture, bot: author.bot, size: 24 }),
|
|
4896
|
+
/* @__PURE__ */ jsx63("span", { className: "text-body-2-strong text-text-primary", children: linked.updated ? author.name : /* @__PURE__ */ jsx63(CardLink, { href: linked.href, children: author.name }) }),
|
|
4897
|
+
linked.updated && /* @__PURE__ */ jsx63("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx63(CardLink, { href: linked.href, children: linked.updated }) })
|
|
4760
4898
|
] }),
|
|
4761
|
-
/* @__PURE__ */
|
|
4899
|
+
/* @__PURE__ */ jsx63("p", { className: "line-clamp-4 text-body-2 text-text-secondary", children: linked.body ?? linked.title })
|
|
4762
4900
|
] });
|
|
4763
4901
|
}
|
|
4764
4902
|
var KIND_SHAPE = {
|
|
@@ -4772,37 +4910,37 @@ var KIND_SHAPE = {
|
|
|
4772
4910
|
function LinkCardLoading({ kind, shape }) {
|
|
4773
4911
|
const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
|
|
4774
4912
|
const boxed = useContext9(inTheBox);
|
|
4775
|
-
return /* @__PURE__ */
|
|
4913
|
+
return /* @__PURE__ */ jsx63("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs43(Card, { fill: boxed ? "elevated" : "inset", "aria-hidden": true, className: cn(CARD_CLASSES, "max-w-[480px]"), children: [
|
|
4776
4914
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
4777
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ jsx63("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx63(LinkedIcon, { kind }) }),
|
|
4778
4916
|
/* @__PURE__ */ jsxs43("span", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
4779
|
-
/* @__PURE__ */
|
|
4780
|
-
subtitle && /* @__PURE__ */
|
|
4917
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3.5 w-1/2" }),
|
|
4918
|
+
subtitle && /* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-2.5 w-20" })
|
|
4781
4919
|
] }),
|
|
4782
|
-
ring && /* @__PURE__ */
|
|
4920
|
+
ring && /* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", shape: "round", className: "size-4 self-start" })
|
|
4783
4921
|
] }),
|
|
4784
|
-
summary && /* @__PURE__ */
|
|
4785
|
-
rows > 0 && /* @__PURE__ */
|
|
4922
|
+
summary && /* @__PURE__ */ jsx63("div", { className: "flex h-[19.6px] items-center", children: /* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3 w-4/5" }) }),
|
|
4923
|
+
rows > 0 && /* @__PURE__ */ jsx63("div", { className: "flex flex-col divide-y divide-border-subtle rounded-md border border-border-subtle leaf:divide-border-strong leaf:border-border-strong", children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx63("div", { className: "flex h-8 items-center px-2", children: /* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3 w-1/3" }) }, i)) }),
|
|
4786
4924
|
latest && /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-3", children: [
|
|
4787
|
-
/* @__PURE__ */
|
|
4925
|
+
/* @__PURE__ */ jsx63("div", { className: "flex h-[14.4px] items-center", children: /* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-2.5 w-28" }) }),
|
|
4788
4926
|
/* @__PURE__ */ jsxs43("div", { className: cn("flex h-[57.6px] flex-col justify-center gap-2", QUOTE_BAR_CLASSES), children: [
|
|
4789
|
-
/* @__PURE__ */
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
/* @__PURE__ */
|
|
4927
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-2.5 w-24" }),
|
|
4928
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3 w-full" }),
|
|
4929
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3 w-3/5" })
|
|
4792
4930
|
] })
|
|
4793
4931
|
] }),
|
|
4794
|
-
footer !== "none" && /* @__PURE__ */
|
|
4795
|
-
/* @__PURE__ */
|
|
4796
|
-
/* @__PURE__ */
|
|
4932
|
+
footer !== "none" && /* @__PURE__ */ jsx63("div", { className: "flex min-h-6 items-center gap-2", children: footer === "pickers" ? /* @__PURE__ */ jsxs43(Fragment14, { children: [
|
|
4933
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-24" }),
|
|
4934
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-28" })
|
|
4797
4935
|
] }) : footer === "people" ? /* @__PURE__ */ jsxs43(Fragment14, { children: [
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
/* @__PURE__ */
|
|
4800
|
-
] }) : /* @__PURE__ */
|
|
4936
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", shape: "round", className: "size-4" }),
|
|
4937
|
+
/* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3 w-40" })
|
|
4938
|
+
] }) : /* @__PURE__ */ jsx63(SkeletonBar, { on: "inset", className: "h-3 w-40" }) })
|
|
4801
4939
|
] }) });
|
|
4802
4940
|
}
|
|
4803
4941
|
|
|
4804
4942
|
// src/LinkPreview.tsx
|
|
4805
|
-
import { Fragment as Fragment15, jsx as
|
|
4943
|
+
import { Fragment as Fragment15, jsx as jsx64 } from "react/jsx-runtime";
|
|
4806
4944
|
var HOVER = "(hover: hover)";
|
|
4807
4945
|
function subscribe(onChange) {
|
|
4808
4946
|
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
@@ -4820,22 +4958,22 @@ function useCanHover() {
|
|
|
4820
4958
|
}
|
|
4821
4959
|
function LinkPreview({ linked, block = false, children }) {
|
|
4822
4960
|
const canHover = useCanHover();
|
|
4823
|
-
if (!canHover) return /* @__PURE__ */
|
|
4824
|
-
return /* @__PURE__ */
|
|
4961
|
+
if (!canHover) return /* @__PURE__ */ jsx64(Fragment15, { children });
|
|
4962
|
+
return /* @__PURE__ */ jsx64(PreviewCard, { side: "top", contentClassName: "p-0", content: /* @__PURE__ */ jsx64(LinkCard, { link: { state: "ready", linked }, bare: true, readOnly: true }), wrapperClassName: block ? "grid w-full min-w-0 grid-cols-[minmax(0,1fr)]" : "max-w-full", children });
|
|
4825
4963
|
}
|
|
4826
4964
|
function LinkPreviewOpen({ linked }) {
|
|
4827
|
-
return /* @__PURE__ */
|
|
4965
|
+
return /* @__PURE__ */ jsx64(MenuPanel, { className: "w-[360px] p-0", children: /* @__PURE__ */ jsx64(LinkCard, { link: { state: "ready", linked }, bare: true, readOnly: true }) });
|
|
4828
4966
|
}
|
|
4829
4967
|
|
|
4830
4968
|
// src/LinkChip.tsx
|
|
4831
|
-
import { jsx as
|
|
4969
|
+
import { jsx as jsx65, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4832
4970
|
function LinkChip({ link, preview = true }) {
|
|
4833
4971
|
if (link.state === "loading") {
|
|
4834
|
-
return /* @__PURE__ */
|
|
4972
|
+
return /* @__PURE__ */ jsx65(InlineChip, { icon: /* @__PURE__ */ jsx65(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), "aria-busy": true, children: /* @__PURE__ */ jsx65(SkeletonBar, { className: "h-2.5 w-16" }) });
|
|
4835
4973
|
}
|
|
4836
4974
|
if (link.state === "unavailable") {
|
|
4837
|
-
if (link.url) return /* @__PURE__ */
|
|
4838
|
-
return /* @__PURE__ */ jsxs44(InlineChip, { tone: "muted", icon: /* @__PURE__ */
|
|
4975
|
+
if (link.url) return /* @__PURE__ */ jsx65(WrittenUrl, { url: link.url });
|
|
4976
|
+
return /* @__PURE__ */ jsxs44(InlineChip, { tone: "muted", icon: /* @__PURE__ */ jsx65(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), children: [
|
|
4839
4977
|
link.noun,
|
|
4840
4978
|
" ",
|
|
4841
4979
|
link.deleted ? "deleted" : "not available"
|
|
@@ -4847,33 +4985,33 @@ function LinkChip({ link, preview = true }) {
|
|
|
4847
4985
|
const chip = /* @__PURE__ */ jsxs44(
|
|
4848
4986
|
InlineChip,
|
|
4849
4987
|
{
|
|
4850
|
-
icon: said ? /* @__PURE__ */
|
|
4988
|
+
icon: said ? /* @__PURE__ */ jsx65(Avatar, { name: said.name, src: said.picture, bot: said.bot, size: 14 }) : /* @__PURE__ */ jsx65(LinkedIcon, { kind: linked.kind, size: 14, tone: "inherit" }),
|
|
4851
4989
|
href: linked.href || void 0,
|
|
4852
4990
|
className: preview ? "min-w-0 max-w-[40ch]" : "max-w-[min(40ch,calc(100%_-_4px))]",
|
|
4853
4991
|
children: [
|
|
4854
4992
|
linked.key && // 4px more than the chip's gap after it, and kept whole: "ABC-2" never breaks at its hyphen.
|
|
4855
|
-
/* @__PURE__ */
|
|
4856
|
-
/* @__PURE__ */
|
|
4857
|
-
status?.colour && /* @__PURE__ */
|
|
4993
|
+
/* @__PURE__ */ jsx65("span", { className: "mr-1 shrink-0 whitespace-nowrap", children: /* @__PURE__ */ jsx65(LinkKey, { tone: "secondary", children: linked.key }) }),
|
|
4994
|
+
/* @__PURE__ */ jsx65("span", { className: "truncate", children: said ? `${said.name}: ${linked.body ?? linked.title}` : linked.title }),
|
|
4995
|
+
status?.colour && /* @__PURE__ */ jsx65(StatusMark, { status: { label: status.label, colour: status.colour } })
|
|
4858
4996
|
]
|
|
4859
4997
|
}
|
|
4860
4998
|
);
|
|
4861
|
-
return preview ? /* @__PURE__ */
|
|
4999
|
+
return preview ? /* @__PURE__ */ jsx65(LinkPreview, { linked, children: chip }) : chip;
|
|
4862
5000
|
}
|
|
4863
5001
|
|
|
4864
5002
|
// src/AttachedCard.tsx
|
|
4865
5003
|
import { createContext as createContext8, useContext as useContext10 } from "react";
|
|
4866
|
-
import { Fragment as Fragment16, jsx as
|
|
5004
|
+
import { Fragment as Fragment16, jsx as jsx66, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4867
5005
|
var Attached = createContext8(false);
|
|
4868
5006
|
function AttachedCard({ link, children, onRemove }) {
|
|
4869
|
-
const card = link ? /* @__PURE__ */
|
|
5007
|
+
const card = link ? /* @__PURE__ */ jsx66(LinkCard, { link }) : children;
|
|
4870
5008
|
const inside = useContext10(Attached);
|
|
4871
|
-
if (inside) return /* @__PURE__ */
|
|
5009
|
+
if (inside) return /* @__PURE__ */ jsx66(Fragment16, { children: card });
|
|
4872
5010
|
return (
|
|
4873
5011
|
// At most 480px, so it never runs a column's or a wide box's whole width (Katerina, 29 and 30 Oct).
|
|
4874
5012
|
/* @__PURE__ */ jsxs45("div", { className: "group/card relative max-w-[480px]", children: [
|
|
4875
|
-
/* @__PURE__ */
|
|
4876
|
-
onRemove && /* @__PURE__ */
|
|
5013
|
+
/* @__PURE__ */ jsx66(Attached.Provider, { value: true, children: card }),
|
|
5014
|
+
onRemove && /* @__PURE__ */ jsx66(
|
|
4877
5015
|
RemoveBadge,
|
|
4878
5016
|
{
|
|
4879
5017
|
label: "Remove",
|
|
@@ -4887,39 +5025,39 @@ function AttachedCard({ link, children, onRemove }) {
|
|
|
4887
5025
|
|
|
4888
5026
|
// src/PartCard.tsx
|
|
4889
5027
|
import { useContext as useContext11 } from "react";
|
|
4890
|
-
import { jsx as
|
|
5028
|
+
import { jsx as jsx67, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4891
5029
|
function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn, children, maxHeight }) {
|
|
4892
5030
|
const word = noun ?? kindNounOf({ kind }) ?? "File";
|
|
4893
5031
|
const boxed = useContext11(inTheBox);
|
|
4894
|
-
if (state === "loading") return /* @__PURE__ */
|
|
5032
|
+
if (state === "loading") return /* @__PURE__ */ jsx67(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
4895
5033
|
if (state === "unavailable" || state === "deleted") {
|
|
4896
|
-
return /* @__PURE__ */
|
|
5034
|
+
return /* @__PURE__ */ jsx67(LinkUnavailable, { kind, noun: `A part of this ${word.toLowerCase()}`, openIn, deleted: state === "deleted", card: true });
|
|
4897
5035
|
}
|
|
4898
|
-
if (state === "detached") return /* @__PURE__ */
|
|
4899
|
-
if (state === "unaddressable") return /* @__PURE__ */
|
|
5036
|
+
if (state === "detached") return /* @__PURE__ */ jsx67(UnavailableRow, { kind, words: "This part was deleted", card: true });
|
|
5037
|
+
if (state === "unaddressable") return /* @__PURE__ */ jsx67(UnavailableRow, { kind, words: "This part can't be shown", href, card: true });
|
|
4900
5038
|
return (
|
|
4901
5039
|
// At most 480px wide, in a box too; in a box being written in, on the files' fill as the card beside it is.
|
|
4902
5040
|
/* @__PURE__ */ jsxs46(Card, { fill: boxed ? "elevated" : "inset", className: "flex max-w-[480px] flex-col gap-3 p-3", children: [
|
|
4903
5041
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-center gap-3", children: [
|
|
4904
|
-
/* @__PURE__ */
|
|
5042
|
+
/* @__PURE__ */ jsx67(LinkTile, { kind }),
|
|
4905
5043
|
/* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
4906
|
-
/* @__PURE__ */
|
|
4907
|
-
/* @__PURE__ */
|
|
5044
|
+
/* @__PURE__ */ jsx67("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: href && !boxed ? /* @__PURE__ */ jsx67(Link, { href, variant: "quiet", truncate: true, className: "block", children: heading }) : /* @__PURE__ */ jsx67("span", { className: "block truncate", children: heading }) }),
|
|
5045
|
+
/* @__PURE__ */ jsx67("span", { className: "truncate text-caption text-text-secondary", children: partKey ? `A part of ${partKey}` : `A part of this ${word.toLowerCase()}` })
|
|
4908
5046
|
] })
|
|
4909
5047
|
] }),
|
|
4910
|
-
maxHeight !== void 0 ? /* @__PURE__ */
|
|
5048
|
+
maxHeight !== void 0 ? /* @__PURE__ */ jsx67(ShowMore, { maxHeight, contentClassName: QUOTE_BAR_CLASSES, children }) : /* @__PURE__ */ jsx67("div", { className: QUOTE_BAR_CLASSES, children })
|
|
4911
5049
|
] })
|
|
4912
5050
|
);
|
|
4913
5051
|
}
|
|
4914
5052
|
|
|
4915
5053
|
// src/Rail.tsx
|
|
4916
|
-
import { jsx as
|
|
5054
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
4917
5055
|
function Rail({ "aria-label": ariaLabel = "Navigation", children, className }) {
|
|
4918
|
-
return /* @__PURE__ */
|
|
5056
|
+
return /* @__PURE__ */ jsx68("nav", { "aria-label": ariaLabel, className: cn("flex w-16 shrink-0 flex-col items-start gap-2 px-2 py-3", className), children });
|
|
4919
5057
|
}
|
|
4920
5058
|
|
|
4921
5059
|
// src/RailItem.tsx
|
|
4922
|
-
import { jsx as
|
|
5060
|
+
import { jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
4923
5061
|
function RailItem({ href, icon, label, active = false, className, onClick, ...props }) {
|
|
4924
5062
|
const inApp = useInAppClick(href, onClick);
|
|
4925
5063
|
return /* @__PURE__ */ jsxs47(
|
|
@@ -4931,14 +5069,14 @@ function RailItem({ href, icon, label, active = false, className, onClick, ...pr
|
|
|
4931
5069
|
...props,
|
|
4932
5070
|
onClick: inApp,
|
|
4933
5071
|
children: [
|
|
4934
|
-
/* @__PURE__ */
|
|
5072
|
+
/* @__PURE__ */ jsx69(
|
|
4935
5073
|
"div",
|
|
4936
5074
|
{
|
|
4937
5075
|
className: cn(
|
|
4938
5076
|
"flex items-center justify-center rounded-lg p-2 transition-colors",
|
|
4939
5077
|
active ? "bg-bg-selected" : "group-hover:bg-bg-hover"
|
|
4940
5078
|
),
|
|
4941
|
-
children: /* @__PURE__ */
|
|
5079
|
+
children: /* @__PURE__ */ jsx69(
|
|
4942
5080
|
"span",
|
|
4943
5081
|
{
|
|
4944
5082
|
className: cn(
|
|
@@ -4950,14 +5088,14 @@ function RailItem({ href, icon, label, active = false, className, onClick, ...pr
|
|
|
4950
5088
|
)
|
|
4951
5089
|
}
|
|
4952
5090
|
),
|
|
4953
|
-
/* @__PURE__ */
|
|
5091
|
+
/* @__PURE__ */ jsx69("span", { className: cn("text-center text-menu", active ? "text-text-primary" : "text-text-secondary"), children: label })
|
|
4954
5092
|
]
|
|
4955
5093
|
}
|
|
4956
5094
|
);
|
|
4957
5095
|
}
|
|
4958
5096
|
|
|
4959
5097
|
// src/Property.tsx
|
|
4960
|
-
import { jsx as
|
|
5098
|
+
import { jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
4961
5099
|
var VALUE_CLASSES = "contents";
|
|
4962
5100
|
function Property({ label, layout = "row", children, className }) {
|
|
4963
5101
|
if (layout === "stacked") {
|
|
@@ -4966,34 +5104,34 @@ function Property({ label, layout = "row", children, className }) {
|
|
|
4966
5104
|
// Peek's topic-details sections already sit at 12px, Ship's rail was
|
|
4967
5105
|
// 6px, and unifying means the bigger, calmer one.
|
|
4968
5106
|
/* @__PURE__ */ jsxs48("dl", { className: cn("flex flex-col gap-3", className), children: [
|
|
4969
|
-
/* @__PURE__ */
|
|
4970
|
-
/* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ jsx70("dt", { className: "text-menu uppercase tracking-widest text-text-secondary", children: label }),
|
|
5108
|
+
/* @__PURE__ */ jsx70("dd", { className: VALUE_CLASSES, children })
|
|
4971
5109
|
] })
|
|
4972
5110
|
);
|
|
4973
5111
|
}
|
|
4974
5112
|
return /* @__PURE__ */ jsxs48("dl", { className: cn("flex items-center gap-2", className), children: [
|
|
4975
|
-
/* @__PURE__ */
|
|
4976
|
-
/* @__PURE__ */
|
|
5113
|
+
/* @__PURE__ */ jsx70("dt", { className: "w-[68px] shrink-0 text-caption text-text-secondary", children: label }),
|
|
5114
|
+
/* @__PURE__ */ jsx70("dd", { className: VALUE_CLASSES, children })
|
|
4977
5115
|
] });
|
|
4978
5116
|
}
|
|
4979
5117
|
|
|
4980
5118
|
// src/Reaction.tsx
|
|
4981
5119
|
import { Toggle as Toggle2 } from "@base-ui/react/toggle";
|
|
4982
|
-
import { jsx as
|
|
4983
|
-
function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
5120
|
+
import { jsx as jsx71, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5121
|
+
function Reaction({ emoji, count, pressed: pressed2 = false, className, ...props }) {
|
|
4984
5122
|
return (
|
|
4985
5123
|
// @estiva-escape(no-copied-look): W1 (Katerina, 24 September: leave alone): a reaction pill shares four words with a field's box by coincidence
|
|
4986
5124
|
/* @__PURE__ */ jsxs49(
|
|
4987
5125
|
Toggle2,
|
|
4988
5126
|
{
|
|
4989
|
-
pressed,
|
|
5127
|
+
pressed: pressed2,
|
|
4990
5128
|
className: cn(
|
|
4991
5129
|
// Chip's pill at a control's height, so a reaction and a status chip
|
|
4992
5130
|
// read as the same family — 24px matches Button `small`.
|
|
4993
5131
|
"inline-flex h-6 min-h-6 items-center justify-center gap-1.5 rounded-full px-2",
|
|
4994
5132
|
"border transition-colors",
|
|
4995
5133
|
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
4996
|
-
|
|
5134
|
+
pressed2 ? (
|
|
4997
5135
|
/* In the ship theme the accent on its own wash measures 2.70:1
|
|
4998
5136
|
(Finding 4), and the count was the thing that vanished
|
|
4999
5137
|
(Katerina, 2026-09-08). The number reads in the text colour
|
|
@@ -5005,18 +5143,126 @@ function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
|
5005
5143
|
),
|
|
5006
5144
|
...props,
|
|
5007
5145
|
children: [
|
|
5008
|
-
/* @__PURE__ */
|
|
5009
|
-
/* @__PURE__ */
|
|
5146
|
+
/* @__PURE__ */ jsx71("span", { "aria-hidden": "true", className: "shrink-0 text-body-1 leading-none", children: emoji }),
|
|
5147
|
+
/* @__PURE__ */ jsx71("span", { className: CHIP_TEXT_CLASSES, children: count })
|
|
5010
5148
|
]
|
|
5011
5149
|
}
|
|
5012
5150
|
)
|
|
5013
5151
|
);
|
|
5014
5152
|
}
|
|
5015
5153
|
|
|
5154
|
+
// src/ConversationActions.tsx
|
|
5155
|
+
import { useState as useState15 } from "react";
|
|
5156
|
+
import { IconCircleCheck as IconCircleCheck2, IconCircleDashed as IconCircleDashed3, IconMessage2 as IconMessage23, IconMoodPlus } from "@tabler/icons-react";
|
|
5157
|
+
import { Fragment as Fragment17, jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5158
|
+
function ConversationActions({ options, onReact, onReply, resolved = false, onResolve, onReopen, onPickerOpenChange, more, className }) {
|
|
5159
|
+
const [picking, setPicking] = useState15(false);
|
|
5160
|
+
const [strip, setStrip] = useState15(null);
|
|
5161
|
+
const setOpen = (open) => {
|
|
5162
|
+
setPicking(open);
|
|
5163
|
+
onPickerOpenChange?.(open);
|
|
5164
|
+
};
|
|
5165
|
+
const resolves = resolved ? onReopen : onResolve;
|
|
5166
|
+
const answers = !!onReact && !!options || !!onReply;
|
|
5167
|
+
return /* @__PURE__ */ jsx72("div", { ref: setStrip, className: cn("inline-flex", className), children: /* @__PURE__ */ jsxs50(Toolbar, { "aria-label": "Actions", children: [
|
|
5168
|
+
onReact && options && /* @__PURE__ */ jsx72(
|
|
5169
|
+
Popover,
|
|
5170
|
+
{
|
|
5171
|
+
side: "top",
|
|
5172
|
+
align: "right",
|
|
5173
|
+
anchor: strip,
|
|
5174
|
+
ariaLabel: "Reactions",
|
|
5175
|
+
className: "w-auto min-w-0",
|
|
5176
|
+
contentClassName: "p-1",
|
|
5177
|
+
open: picking,
|
|
5178
|
+
onOpenChange: setOpen,
|
|
5179
|
+
trigger: /* @__PURE__ */ jsx72(ToolbarButton, { tooltip: "React", "aria-label": "React", children: /* @__PURE__ */ jsx72(IconMoodPlus, { size: 16, stroke: 1.5 }) }),
|
|
5180
|
+
children: /* @__PURE__ */ jsx72(
|
|
5181
|
+
ReactionPicker,
|
|
5182
|
+
{
|
|
5183
|
+
options: [...options],
|
|
5184
|
+
surface: false,
|
|
5185
|
+
onSelect: (emoji) => {
|
|
5186
|
+
setOpen(false);
|
|
5187
|
+
onReact(emoji);
|
|
5188
|
+
}
|
|
5189
|
+
}
|
|
5190
|
+
)
|
|
5191
|
+
}
|
|
5192
|
+
),
|
|
5193
|
+
onReply && /* @__PURE__ */ jsx72(ToolbarButton, { tooltip: "Reply", "aria-label": "Reply", onClick: onReply, children: /* @__PURE__ */ jsx72(IconMessage23, { size: 16, stroke: 1.5 }) }),
|
|
5194
|
+
resolves && /* @__PURE__ */ jsxs50(Fragment17, { children: [
|
|
5195
|
+
answers && /* @__PURE__ */ jsx72(ToolbarSeparator, {}),
|
|
5196
|
+
resolved ? /* @__PURE__ */ jsx72(ToolbarButton, { tooltip: "Reopen", "aria-label": "Reopen", onClick: onReopen, children: /* @__PURE__ */ jsx72(IconCircleDashed3, { size: 16, stroke: 1.5 }) }) : /* @__PURE__ */ jsx72(ToolbarButton, { variant: "resolve", tooltip: "Resolve", "aria-label": "Resolve", onClick: onResolve, children: /* @__PURE__ */ jsx72(IconCircleCheck2, { size: 16, stroke: 1.5 }) })
|
|
5197
|
+
] }),
|
|
5198
|
+
more && /* @__PURE__ */ jsxs50(Fragment17, { children: [
|
|
5199
|
+
(answers || resolves) && /* @__PURE__ */ jsx72(ToolbarSeparator, {}),
|
|
5200
|
+
more
|
|
5201
|
+
] })
|
|
5202
|
+
] }) });
|
|
5203
|
+
}
|
|
5204
|
+
|
|
5205
|
+
// src/ConversationCard.tsx
|
|
5206
|
+
import { useContext as useContext12, useRef as useRef15, useState as useState19 } from "react";
|
|
5207
|
+
import { IconArrowNarrowRight, IconCircleCheck as IconCircleCheck4, IconDotsVertical as IconDotsVertical4 } from "@tabler/icons-react";
|
|
5208
|
+
|
|
5209
|
+
// src/ConversationMenu.tsx
|
|
5210
|
+
import { IconCircleCheck as IconCircleCheck3, IconCircleDashed as IconCircleDashed4, IconDotsVertical as IconDotsVertical3 } from "@tabler/icons-react";
|
|
5211
|
+
import { jsx as jsx73, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5212
|
+
function ConversationMenu({ resolved = false, onResolve, onReopen, children, onEdit, onDelete, open, onOpenChange, trigger }) {
|
|
5213
|
+
const resolves = resolved ? onReopen : onResolve;
|
|
5214
|
+
return /* @__PURE__ */ jsxs51(
|
|
5215
|
+
Menu,
|
|
5216
|
+
{
|
|
5217
|
+
trigger: trigger ?? /* @__PURE__ */ jsx73(IconButton, { tooltip: "More actions", "aria-label": "More actions", children: /* @__PURE__ */ jsx73(IconDotsVertical3, { size: 16, stroke: 1.5 }) }),
|
|
5218
|
+
align: "right",
|
|
5219
|
+
open,
|
|
5220
|
+
onOpenChange,
|
|
5221
|
+
className: "w-[244px]",
|
|
5222
|
+
children: [
|
|
5223
|
+
resolves && (resolved ? /* @__PURE__ */ jsx73(MenuItem, { leading: /* @__PURE__ */ jsx73(IconCircleDashed4, { size: 16, stroke: 1.5, className: "text-text-secondary" }), label: "Reopen", onClick: onReopen }) : /* @__PURE__ */ jsx73(MenuItem, { leading: /* @__PURE__ */ jsx73(IconCircleCheck3, { size: 16, stroke: 1.5, className: "text-text-secondary" }), label: "Resolve", onClick: onResolve })),
|
|
5224
|
+
children,
|
|
5225
|
+
(resolves || children) && (onEdit || onDelete) && /* @__PURE__ */ jsx73(MenuSeparator, {}),
|
|
5226
|
+
onEdit && /* @__PURE__ */ jsx73(MenuItem, { label: "Edit", onClick: onEdit }),
|
|
5227
|
+
onDelete && /* @__PURE__ */ jsx73(MenuItem, { label: "Delete", destructive: true, onClick: onDelete })
|
|
5228
|
+
]
|
|
5229
|
+
}
|
|
5230
|
+
);
|
|
5231
|
+
}
|
|
5232
|
+
|
|
5233
|
+
// src/EditedMarker.tsx
|
|
5234
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
5235
|
+
function EditedMarker({ edited }) {
|
|
5236
|
+
if (!edited) return null;
|
|
5237
|
+
return /* @__PURE__ */ jsx74(WithTooltip, { label: edited, wrapperClassName: "shrink-0", children: /* @__PURE__ */ jsx74("span", { className: "whitespace-nowrap text-caption text-text-muted", children: "(edited)" }) });
|
|
5238
|
+
}
|
|
5239
|
+
|
|
5240
|
+
// src/MetaText.tsx
|
|
5241
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
5242
|
+
var TONE_CLASSES2 = {
|
|
5243
|
+
muted: "text-text-muted",
|
|
5244
|
+
secondary: "text-text-secondary",
|
|
5245
|
+
success: "text-success-default"
|
|
5246
|
+
};
|
|
5247
|
+
function MetaText({ children, tone = "muted", size = "caption", className }) {
|
|
5248
|
+
return /* @__PURE__ */ jsx75(
|
|
5249
|
+
"span",
|
|
5250
|
+
{
|
|
5251
|
+
className: cn(
|
|
5252
|
+
size === "chip" ? "text-chip font-normal" : "text-caption",
|
|
5253
|
+
TONE_CLASSES2[tone],
|
|
5254
|
+
TIME_CLASSES,
|
|
5255
|
+
className
|
|
5256
|
+
),
|
|
5257
|
+
children
|
|
5258
|
+
}
|
|
5259
|
+
);
|
|
5260
|
+
}
|
|
5261
|
+
|
|
5016
5262
|
// src/ReactionRow.tsx
|
|
5017
|
-
import { useState as
|
|
5018
|
-
import { IconMoodPlus } from "@tabler/icons-react";
|
|
5019
|
-
import { jsx as
|
|
5263
|
+
import { useState as useState16 } from "react";
|
|
5264
|
+
import { IconMoodPlus as IconMoodPlus2 } from "@tabler/icons-react";
|
|
5265
|
+
import { jsx as jsx76, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5020
5266
|
var NAMED = 8;
|
|
5021
5267
|
var meaningOf = (options, emoji) => options.find((o) => o.emoji === emoji)?.label ?? emoji;
|
|
5022
5268
|
function whoReacted(reaction, nameOf, options, viewer) {
|
|
@@ -5030,8 +5276,8 @@ function whoReacted(reaction, nameOf, options, viewer) {
|
|
|
5030
5276
|
return `${list.charAt(0).toUpperCase()}${list.slice(1)} reacted with ${meaningOf(options, reaction.emoji)}`;
|
|
5031
5277
|
}
|
|
5032
5278
|
function AddReactionButton({ options, onPick, className }) {
|
|
5033
|
-
const [picking, setPicking] =
|
|
5034
|
-
return /* @__PURE__ */
|
|
5279
|
+
const [picking, setPicking] = useState16(false);
|
|
5280
|
+
return /* @__PURE__ */ jsx76(
|
|
5035
5281
|
Popover,
|
|
5036
5282
|
{
|
|
5037
5283
|
open: picking,
|
|
@@ -5041,8 +5287,8 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
5041
5287
|
ariaLabel: "Add a reaction",
|
|
5042
5288
|
contentClassName: "p-1",
|
|
5043
5289
|
className: cn("w-auto min-w-0", className),
|
|
5044
|
-
trigger: /* @__PURE__ */
|
|
5045
|
-
children: /* @__PURE__ */
|
|
5290
|
+
trigger: /* @__PURE__ */ jsx76(IconButton, { variant: "muted", tooltip: "Add a reaction", "aria-label": "Add a reaction", children: /* @__PURE__ */ jsx76(IconMoodPlus2, { size: 16, stroke: 1.5 }) }),
|
|
5291
|
+
children: /* @__PURE__ */ jsx76(
|
|
5046
5292
|
ReactionPicker,
|
|
5047
5293
|
{
|
|
5048
5294
|
options: [...options],
|
|
@@ -5057,10 +5303,10 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
5057
5303
|
);
|
|
5058
5304
|
}
|
|
5059
5305
|
function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }) {
|
|
5060
|
-
const
|
|
5061
|
-
if (
|
|
5062
|
-
return /* @__PURE__ */
|
|
5063
|
-
|
|
5306
|
+
const shown2 = reactions.filter((r) => r.by.length > 0);
|
|
5307
|
+
if (shown2.length === 0) return null;
|
|
5308
|
+
return /* @__PURE__ */ jsxs52("div", { "data-reaction-row": true, className: cn("flex flex-wrap items-center gap-1", className), children: [
|
|
5309
|
+
shown2.map((r) => /* @__PURE__ */ jsx76(WithTooltip, { label: whoReacted(r, nameOf, options, viewer), children: /* @__PURE__ */ jsx76(
|
|
5064
5310
|
Reaction,
|
|
5065
5311
|
{
|
|
5066
5312
|
emoji: r.emoji,
|
|
@@ -5071,16 +5317,709 @@ function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }
|
|
|
5071
5317
|
onClick: () => onToggle?.(r.emoji)
|
|
5072
5318
|
}
|
|
5073
5319
|
) }, r.emoji)),
|
|
5074
|
-
onToggle && /* @__PURE__ */
|
|
5320
|
+
onToggle && /* @__PURE__ */ jsx76(AddReactionButton, { options, onPick: onToggle })
|
|
5321
|
+
] });
|
|
5322
|
+
}
|
|
5323
|
+
|
|
5324
|
+
// src/RepliesRow.tsx
|
|
5325
|
+
import { IconChevronRight as IconChevronRight4, IconMessage2 as IconMessage24 } from "@tabler/icons-react";
|
|
5326
|
+
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5327
|
+
var ROW_CLASSES3 = "flex w-full items-center gap-2 pb-1.5 pl-8 pr-2";
|
|
5328
|
+
var OPEN_CLASSES = "border-accent-outline bg-accent-wash";
|
|
5329
|
+
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";
|
|
5330
|
+
function RepliesRow({ count, faces, last, isNew = false, urgent = false, onOpen, open = false }) {
|
|
5331
|
+
const withFaces = !!faces && faces.length > 0;
|
|
5332
|
+
const label = `${count} ${count === 1 ? "reply" : "replies"}`;
|
|
5333
|
+
const inner = /* @__PURE__ */ jsxs53(Fragment18, { children: [
|
|
5334
|
+
withFaces && /* @__PURE__ */ jsx77("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ jsx77(AvatarGroup, { size: 18, members: faces.map((f) => ({ name: f.name, picture: f.picture, bot: f.bot })) }) }),
|
|
5335
|
+
/* @__PURE__ */ jsx77(
|
|
5336
|
+
IconMessage24,
|
|
5337
|
+
{
|
|
5338
|
+
size: 16,
|
|
5339
|
+
stroke: 1.5,
|
|
5340
|
+
className: cn(
|
|
5341
|
+
"shrink-0 text-text-interactive transition-colors group-hover/replies:text-text-primary",
|
|
5342
|
+
withFaces && "hidden"
|
|
5343
|
+
)
|
|
5344
|
+
}
|
|
5345
|
+
),
|
|
5346
|
+
/* @__PURE__ */ jsx77("span", { className: "text-chip font-medium text-text-interactive transition-colors group-hover/replies:text-text-primary", children: label }),
|
|
5347
|
+
last && /* @__PURE__ */ jsx77("span", { className: cn("mt-px text-small leading-3 text-text-muted", TIME_CLASSES), children: last }),
|
|
5348
|
+
/* @__PURE__ */ jsx77(
|
|
5349
|
+
IconChevronRight4,
|
|
5350
|
+
{
|
|
5351
|
+
size: 12,
|
|
5352
|
+
stroke: 2,
|
|
5353
|
+
className: cn("transition-all group-hover/replies:text-text-primary", open ? "rotate-90 text-text-primary" : "text-text-muted group-hover/replies:translate-x-0.5")
|
|
5354
|
+
}
|
|
5355
|
+
)
|
|
5356
|
+
] });
|
|
5357
|
+
const chip = isNew && /* @__PURE__ */ jsxs53(Fragment18, { children: [
|
|
5358
|
+
/* @__PURE__ */ jsx77("span", { className: "h-0.5 w-0.5 shrink-0 rounded-full bg-text-muted" }),
|
|
5359
|
+
/* @__PURE__ */ jsx77(Chip, { type: urgent ? "warning" : "brand", label: "1 new" })
|
|
5360
|
+
] });
|
|
5361
|
+
if (!onOpen) {
|
|
5362
|
+
return /* @__PURE__ */ jsxs53("div", { className: ROW_CLASSES3, children: [
|
|
5363
|
+
/* @__PURE__ */ jsx77("div", { className: BOX_CLASSES, children: inner }),
|
|
5364
|
+
chip
|
|
5365
|
+
] });
|
|
5366
|
+
}
|
|
5367
|
+
return (
|
|
5368
|
+
// @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
|
|
5369
|
+
/* @__PURE__ */ jsxs53("button", { type: "button", className: cn(ROW_CLASSES3, "cursor-pointer text-left"), onClick: onOpen, "aria-expanded": open, "aria-label": `${label}, ${open ? "close" : "open"} the thread`, "data-interactive": true, children: [
|
|
5370
|
+
/* @__PURE__ */ jsx77("span", { className: cn(BOX_CLASSES, open && OPEN_CLASSES), children: inner }),
|
|
5371
|
+
chip
|
|
5372
|
+
] })
|
|
5373
|
+
);
|
|
5374
|
+
}
|
|
5375
|
+
|
|
5376
|
+
// src/ResolveDialog.tsx
|
|
5377
|
+
import { useId as useId5, useState as useState17 } from "react";
|
|
5378
|
+
import { Fragment as Fragment19, jsx as jsx78, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5379
|
+
function ResolveDialog({ onResolve, onCancel, refused }) {
|
|
5380
|
+
const [note, setNote] = useState17("");
|
|
5381
|
+
const [busy, setBusy] = useState17(false);
|
|
5382
|
+
const formId = useId5();
|
|
5383
|
+
return /* @__PURE__ */ jsx78(
|
|
5384
|
+
DialogShell,
|
|
5385
|
+
{
|
|
5386
|
+
title: "Resolve",
|
|
5387
|
+
onClose: onCancel,
|
|
5388
|
+
footer: /* @__PURE__ */ jsxs54(Fragment19, { children: [
|
|
5389
|
+
/* @__PURE__ */ jsx78(Button, { variant: "muted", onClick: onCancel, children: "Cancel" }),
|
|
5390
|
+
/* @__PURE__ */ jsx78(Button, { variant: "resolve", type: "submit", form: formId, disabled: busy, children: "Resolve" })
|
|
5391
|
+
] }),
|
|
5392
|
+
children: /* @__PURE__ */ jsx78(
|
|
5393
|
+
Form,
|
|
5394
|
+
{
|
|
5395
|
+
id: formId,
|
|
5396
|
+
busy,
|
|
5397
|
+
onSubmit: async () => {
|
|
5398
|
+
setBusy(true);
|
|
5399
|
+
try {
|
|
5400
|
+
await onResolve(note);
|
|
5401
|
+
} finally {
|
|
5402
|
+
setBusy(false);
|
|
5403
|
+
}
|
|
5404
|
+
},
|
|
5405
|
+
children: /* @__PURE__ */ jsx78(Field, { label: "Resolution message (optional)", error: refused, children: /* @__PURE__ */ jsx78(Textarea, { autoFocus: true, value: note, onChange: (e) => setNote(e.target.value), placeholder: "Summarize the outcome or decision...", className: "h-[109px]" }) })
|
|
5406
|
+
}
|
|
5407
|
+
)
|
|
5408
|
+
}
|
|
5409
|
+
);
|
|
5410
|
+
}
|
|
5411
|
+
|
|
5412
|
+
// src/threadCard.ts
|
|
5413
|
+
import { createContext as createContext9, useLayoutEffect as useLayoutEffect6, useState as useState18 } from "react";
|
|
5414
|
+
var InThreadCard = createContext9(false);
|
|
5415
|
+
var InConversationItem = createContext9(null);
|
|
5416
|
+
var caretOnOpen = createContext9(0);
|
|
5417
|
+
var LineByLayout = createContext9(false);
|
|
5418
|
+
var FACE_GAP = 4;
|
|
5419
|
+
function useFaceLine(root, active, toDot = false) {
|
|
5420
|
+
const [line, setLine] = useState18(null);
|
|
5421
|
+
useLayoutEffect6(() => {
|
|
5422
|
+
const el = root.current;
|
|
5423
|
+
if (!active || !el) {
|
|
5424
|
+
setLine(null);
|
|
5425
|
+
return;
|
|
5426
|
+
}
|
|
5427
|
+
const measure = () => {
|
|
5428
|
+
const face = el.querySelector("[data-comment-body] [data-face]");
|
|
5429
|
+
const target = toDot ? el.querySelector("[data-dot]") : el.querySelector("[data-thread-replies]") ?? el.querySelector("[data-comment-body]");
|
|
5430
|
+
if (!face || !target) {
|
|
5431
|
+
setLine(null);
|
|
5432
|
+
return;
|
|
5433
|
+
}
|
|
5434
|
+
const box = el.getBoundingClientRect();
|
|
5435
|
+
const origin = box.top + el.clientTop;
|
|
5436
|
+
const to = target.getBoundingClientRect();
|
|
5437
|
+
const top = face.getBoundingClientRect().bottom - origin + FACE_GAP;
|
|
5438
|
+
const bottom = (toDot ? to.top + to.height / 2 : to.bottom) - origin;
|
|
5439
|
+
const next = { top, height: Math.max(0, bottom - top) };
|
|
5440
|
+
setLine((was) => was && Math.abs(was.top - next.top) < 0.01 && Math.abs(was.height - next.height) < 0.01 ? was : next);
|
|
5441
|
+
};
|
|
5442
|
+
measure();
|
|
5443
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
5444
|
+
const watch = new ResizeObserver(measure);
|
|
5445
|
+
watch.observe(el);
|
|
5446
|
+
return () => watch.disconnect();
|
|
5447
|
+
}, [root, active, toDot]);
|
|
5448
|
+
return line;
|
|
5449
|
+
}
|
|
5450
|
+
|
|
5451
|
+
// src/ConversationCard.tsx
|
|
5452
|
+
import { Fragment as Fragment20, jsx as jsx79, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
5453
|
+
function Head({ author, time, timeHref, edited, isNew, urgent, meta }) {
|
|
5454
|
+
return /* @__PURE__ */ jsxs55("div", { className: "flex w-full items-center gap-2", children: [
|
|
5455
|
+
/* @__PURE__ */ jsxs55("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
5456
|
+
/* @__PURE__ */ jsx79("span", { "data-face": true, className: "relative flex shrink-0", children: /* @__PURE__ */ jsx79(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }) }),
|
|
5457
|
+
/* @__PURE__ */ jsx79("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
5458
|
+
timeHref ? /* @__PURE__ */ jsx79(WithTooltip, { label: "Link to this", wrapperClassName: "shrink-0", children: /* @__PURE__ */ jsx79(MetaText, { className: "contents", children: /* @__PURE__ */ jsx79(Link, { href: timeHref, variant: "quiet", "data-interactive": true, children: time }) }) }) : /* @__PURE__ */ jsx79(MetaText, { className: "shrink-0", children: time }),
|
|
5459
|
+
/* @__PURE__ */ jsx79(EditedMarker, { edited }),
|
|
5460
|
+
meta
|
|
5461
|
+
] }),
|
|
5462
|
+
isNew && (urgent ? /* @__PURE__ */ jsx79(UrgentMark, {}) : /* @__PURE__ */ jsx79(UnreadDot, {}))
|
|
5463
|
+
] });
|
|
5464
|
+
}
|
|
5465
|
+
function attentionOf(fresh, urgent, inThreadCard) {
|
|
5466
|
+
if (!fresh || inThreadCard) return void 0;
|
|
5467
|
+
return urgent ? "warning" : "accent";
|
|
5468
|
+
}
|
|
5469
|
+
function EndedLine({ by, note, at }) {
|
|
5470
|
+
return /* @__PURE__ */ jsxs55("div", { "data-resolved": "line", className: "relative flex items-start py-1", children: [
|
|
5471
|
+
/* @__PURE__ */ jsx79("span", { className: "flex h-[17px] w-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx79("span", { "data-dot": true, className: "relative z-10 flex size-2 items-center justify-center rounded-full bg-bg-surface", children: /* @__PURE__ */ jsx79("span", { className: "size-1 rounded-full bg-success-default" }) }) }),
|
|
5472
|
+
/* @__PURE__ */ jsxs55("p", { className: "min-w-0 text-h5 leading-snug", children: [
|
|
5473
|
+
/* @__PURE__ */ jsx79("span", { className: "whitespace-nowrap text-text-primary", children: by }),
|
|
5474
|
+
/* @__PURE__ */ jsx79(IconArrowNarrowRight, { size: 12, stroke: 1.5, className: "mx-1.5 -mt-px inline shrink-0 text-text-primary" }),
|
|
5475
|
+
/* @__PURE__ */ jsx79("span", { className: "text-text-secondary", children: note }),
|
|
5476
|
+
at && /* @__PURE__ */ jsxs55(MetaText, { size: "chip", children: [
|
|
5477
|
+
" \xB7 ",
|
|
5478
|
+
at
|
|
5479
|
+
] })
|
|
5480
|
+
] })
|
|
5481
|
+
] });
|
|
5482
|
+
}
|
|
5483
|
+
function ResolvedCheck({ by, note, at }) {
|
|
5484
|
+
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
5485
|
+
return /* @__PURE__ */ jsx79(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */ jsxs55("span", { className: "flex items-center gap-1 text-caption text-success-default", children: [
|
|
5486
|
+
/* @__PURE__ */ jsx79(IconCircleCheck4, { size: 14, stroke: 1.5 }),
|
|
5487
|
+
"Resolved"
|
|
5488
|
+
] }) });
|
|
5489
|
+
}
|
|
5490
|
+
var FOLDED_WORDS_CLASSES = "[&>div]:line-clamp-1 [&>div]:max-h-[1lh] [&>div>*:not(p):not(ul):not(ol):not(blockquote):not(pre):not(div:only-child)]:hidden [&>div>div:only-child>*:not(p):not(ul):not(ol):not(blockquote):not(pre)]:hidden";
|
|
5491
|
+
function Words({ children, oneLine = false }) {
|
|
5492
|
+
return /* @__PURE__ */ jsx79("div", { className: cn("relative w-full break-words pb-2 pl-8 pr-2 pt-1", oneLine && FOLDED_WORDS_CLASSES), children: /* @__PURE__ */ jsx79("div", { className: "flex flex-col gap-2 text-body-2 text-text-secondary", children }) });
|
|
5493
|
+
}
|
|
5494
|
+
function Reactions({ reactions, refused, readOnly }) {
|
|
5495
|
+
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
5496
|
+
return /* @__PURE__ */ jsxs55("div", { className: "relative flex w-full flex-col gap-1 pb-2 pl-8 pt-1", children: [
|
|
5497
|
+
reactions && /* @__PURE__ */ jsx79(ReactionRow, { ...reactions, onToggle: readOnly ? void 0 : reactions.onToggle }),
|
|
5498
|
+
refused && /* @__PURE__ */ jsxs55(FieldLine, { tone: "error", children: [
|
|
5499
|
+
"Not reacted: ",
|
|
5500
|
+
refused,
|
|
5501
|
+
"."
|
|
5502
|
+
] })
|
|
5503
|
+
] });
|
|
5504
|
+
}
|
|
5505
|
+
function Editing({ author, children }) {
|
|
5506
|
+
return /* @__PURE__ */ jsx79("div", { className: "p-2", children: /* @__PURE__ */ jsxs55("div", { className: "flex items-start gap-2", children: [
|
|
5507
|
+
/* @__PURE__ */ jsx79(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
5508
|
+
/* @__PURE__ */ jsx79("div", { className: "min-w-0 flex-1", children })
|
|
5509
|
+
] }) });
|
|
5510
|
+
}
|
|
5511
|
+
function pressed(e, press) {
|
|
5512
|
+
const target = e.target;
|
|
5513
|
+
if (!e.currentTarget.contains(target)) return;
|
|
5514
|
+
if (e.detail > 1) return;
|
|
5515
|
+
const picked = typeof window === "undefined" ? null : window.getSelection();
|
|
5516
|
+
if (picked && !picked.isCollapsed && picked.anchorNode && e.currentTarget.contains(picked.anchorNode)) return;
|
|
5517
|
+
if (target.closest('button, a, input, textarea, [contenteditable="true"], [role="button"], [role="toolbar"], [data-interactive]')) return;
|
|
5518
|
+
press();
|
|
5519
|
+
}
|
|
5520
|
+
function stillHere(root) {
|
|
5521
|
+
if (!root) return false;
|
|
5522
|
+
try {
|
|
5523
|
+
return root.matches(":hover") || root.querySelector(":focus-visible") !== null;
|
|
5524
|
+
} catch {
|
|
5525
|
+
return root.matches(":hover");
|
|
5526
|
+
}
|
|
5527
|
+
}
|
|
5528
|
+
function useEditing(editing, onEditingChange) {
|
|
5529
|
+
const [own, setOwn] = useState19(false);
|
|
5530
|
+
const now = editing ?? own;
|
|
5531
|
+
const set = (next) => {
|
|
5532
|
+
if (editing === void 0) setOwn(next);
|
|
5533
|
+
onEditingChange?.(next);
|
|
5534
|
+
};
|
|
5535
|
+
return [now, set];
|
|
5536
|
+
}
|
|
5537
|
+
function ConversationCard(props) {
|
|
5538
|
+
const { author, about, files, reactions, reactionRefused, isNew = false, urgent = false, own = false, editor, deleted = false, replies, onReply, resolved, onResolve, resolveRefused, onReopen, selected, onClick, onDelete, deleteNote, menu, className, children } = props;
|
|
5539
|
+
const readOnly = (props.readOnly ?? false) || deleted;
|
|
5540
|
+
const inThreadCard = useContext12(InThreadCard);
|
|
5541
|
+
const item = useContext12(InConversationItem);
|
|
5542
|
+
const [hovered, setHovered] = useState19(false);
|
|
5543
|
+
const [menuOpen, setMenuOpen] = useState19(false);
|
|
5544
|
+
const [picking, setPicking] = useState19(false);
|
|
5545
|
+
const [resolving, setResolving] = useState19(false);
|
|
5546
|
+
const [deleting, setDeleting] = useState19(false);
|
|
5547
|
+
const [editing, setEditing] = useEditing(props.editing, props.onEditingChange);
|
|
5548
|
+
const isEditing = editing && !readOnly && !!editor;
|
|
5549
|
+
const overlay = menuOpen || picking || resolving || deleting;
|
|
5550
|
+
const resolves = resolved ? onReopen : onResolve;
|
|
5551
|
+
const lined = inThreadCard;
|
|
5552
|
+
const toDot = !lined && !!resolved?.note && !isEditing;
|
|
5553
|
+
const root = useRef15(null);
|
|
5554
|
+
const dotLine = useFaceLine(root, toDot, true);
|
|
5555
|
+
const settle = () => requestAnimationFrame(() => setHovered(stillHere(root.current)));
|
|
5556
|
+
const offersMenu = !!resolves || !!menu || own && (!!editor || !!onDelete);
|
|
5557
|
+
const showStrip = hovered && !isEditing && !readOnly;
|
|
5558
|
+
const react = reactions?.onToggle;
|
|
5559
|
+
const press = onClick ?? (readOnly && !replies?.count ? void 0 : item?.toggle);
|
|
5560
|
+
const reply = onReply ?? item?.show;
|
|
5561
|
+
const marked = selected ?? (item && !item.under ? item.open : void 0);
|
|
5562
|
+
const under = !!item?.under;
|
|
5563
|
+
const closed = !inThreadCard && !marked;
|
|
5564
|
+
const folded = !!resolved && closed;
|
|
5565
|
+
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */ jsx79(RepliesRow, { ...replies, onOpen: replies.onOpen ?? (under ? item?.toggle : void 0), open: replies.open ?? (under && !!item?.open), urgent });
|
|
5566
|
+
const aboutShown = !!about && !deleted;
|
|
5567
|
+
return /* @__PURE__ */ jsxs55(Fragment20, { children: [
|
|
5568
|
+
/* @__PURE__ */ jsxs55(
|
|
5569
|
+
Card,
|
|
5570
|
+
{
|
|
5571
|
+
ref: root,
|
|
5572
|
+
fill: "none",
|
|
5573
|
+
hover: readOnly && !press ? "none" : "fill",
|
|
5574
|
+
quietUntilHover: true,
|
|
5575
|
+
hovered,
|
|
5576
|
+
selected: marked,
|
|
5577
|
+
active: isEditing,
|
|
5578
|
+
attention: attentionOf(isNew || !!replies?.isNew, urgent, inThreadCard),
|
|
5579
|
+
className: cn("relative", className),
|
|
5580
|
+
onClick: press && !isEditing && !overlay ? (e) => pressed(e, press) : void 0,
|
|
5581
|
+
onMouseEnter: () => setHovered(true),
|
|
5582
|
+
onMouseLeave: () => {
|
|
5583
|
+
if (picking || menuOpen) return;
|
|
5584
|
+
setHovered(false);
|
|
5585
|
+
},
|
|
5586
|
+
onFocus: () => setHovered(true),
|
|
5587
|
+
onBlur: (e) => {
|
|
5588
|
+
if (picking || menuOpen || e.currentTarget.contains(e.relatedTarget)) return;
|
|
5589
|
+
setHovered(false);
|
|
5590
|
+
},
|
|
5591
|
+
children: [
|
|
5592
|
+
isEditing ? /* @__PURE__ */ jsx79(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs55("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
5593
|
+
deleted ? /* @__PURE__ */ jsx79("p", { className: "w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */ jsxs55(Fragment20, { children: [
|
|
5594
|
+
/* @__PURE__ */ jsx79(
|
|
5595
|
+
Head,
|
|
5596
|
+
{
|
|
5597
|
+
author,
|
|
5598
|
+
time: props.time,
|
|
5599
|
+
timeHref: props.timeHref,
|
|
5600
|
+
edited: props.edited,
|
|
5601
|
+
isNew,
|
|
5602
|
+
urgent,
|
|
5603
|
+
meta: resolved && /* @__PURE__ */ jsx79(ResolvedCheck, { by: resolved.by, note: resolved.note, at: resolved.at })
|
|
5604
|
+
}
|
|
5605
|
+
),
|
|
5606
|
+
aboutShown && // Under the name, above the words (Katerina, 1 November).
|
|
5607
|
+
/* @__PURE__ */ jsx79("div", { className: "relative w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
5608
|
+
/* @__PURE__ */ jsx79(Words, { oneLine: folded, children })
|
|
5609
|
+
] }),
|
|
5610
|
+
!deleted && files && !folded && /* @__PURE__ */ jsx79("div", { className: "relative flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
5611
|
+
!folded && /* @__PURE__ */ jsx79(Reactions, { reactions, refused: reactionRefused, readOnly }),
|
|
5612
|
+
resolved?.note && // Who resolved it and the note, above the way into the replies; the check by the time says "Resolved" (Katerina, 1 November).
|
|
5613
|
+
/* @__PURE__ */ jsx79("div", { className: "relative w-full pb-1", children: /* @__PURE__ */ jsx79("div", { className: "-ml-2 w-[calc(100%+8px)]", children: /* @__PURE__ */ jsx79(EndedLine, { by: resolved.by, note: resolved.note, at: resolved.at }) }) }),
|
|
5614
|
+
repliesRow && /* @__PURE__ */ jsx79("div", { className: "relative w-full", children: repliesRow })
|
|
5615
|
+
] }),
|
|
5616
|
+
dotLine && // One bar from the face to the dot, measured (useFaceLine): 2px, centred under the 24px face, 8px in.
|
|
5617
|
+
// Its top and height come from the measure: where the face ends and the dot stands are not known ahead.
|
|
5618
|
+
/* @__PURE__ */ jsx79("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: dotLine.top, height: dotLine.height } }),
|
|
5619
|
+
showStrip && /* @__PURE__ */ jsx79("div", { className: "absolute right-1 top-1 z-10", children: /* @__PURE__ */ jsx79(
|
|
5620
|
+
ConversationActions,
|
|
5621
|
+
{
|
|
5622
|
+
options: reactions?.options,
|
|
5623
|
+
onReact: react,
|
|
5624
|
+
onPickerOpenChange: (open) => {
|
|
5625
|
+
setPicking(open);
|
|
5626
|
+
if (!open) settle();
|
|
5627
|
+
},
|
|
5628
|
+
onReply: reply,
|
|
5629
|
+
resolved: !!resolved,
|
|
5630
|
+
onResolve: onResolve && (() => setResolving(true)),
|
|
5631
|
+
onReopen,
|
|
5632
|
+
more: offersMenu && /* @__PURE__ */ jsx79(
|
|
5633
|
+
ConversationMenu,
|
|
5634
|
+
{
|
|
5635
|
+
trigger: /* @__PURE__ */ jsx79(ToolbarButton, { tooltip: "More actions", "aria-label": "More actions", children: /* @__PURE__ */ jsx79(IconDotsVertical4, { size: 16, stroke: 1.5 }) }),
|
|
5636
|
+
open: menuOpen,
|
|
5637
|
+
onOpenChange: (open) => {
|
|
5638
|
+
setMenuOpen(open);
|
|
5639
|
+
if (!open) settle();
|
|
5640
|
+
},
|
|
5641
|
+
resolved: !!resolved,
|
|
5642
|
+
onResolve: onResolve && (() => setResolving(true)),
|
|
5643
|
+
onReopen,
|
|
5644
|
+
onEdit: own && editor ? () => setEditing(true) : void 0,
|
|
5645
|
+
onDelete: own && onDelete ? () => setDeleting(true) : void 0,
|
|
5646
|
+
children: menu
|
|
5647
|
+
}
|
|
5648
|
+
)
|
|
5649
|
+
}
|
|
5650
|
+
) })
|
|
5651
|
+
]
|
|
5652
|
+
}
|
|
5653
|
+
),
|
|
5654
|
+
deleting && onDelete && /* @__PURE__ */ jsxs55(ConfirmDialog, { title: "Delete this comment?", confirmLabel: "Delete comment", destructive: true, onConfirm: onDelete, onClose: () => setDeleting(false), children: [
|
|
5655
|
+
/* @__PURE__ */ jsx79("p", { children: deleteNote ?? "It is deleted for everyone." }),
|
|
5656
|
+
replies && replies.count > 0 && /* @__PURE__ */ jsxs55("p", { children: [
|
|
5657
|
+
"Its ",
|
|
5658
|
+
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
5659
|
+
"."
|
|
5660
|
+
] })
|
|
5661
|
+
] }),
|
|
5662
|
+
resolving && onResolve && /* @__PURE__ */ jsx79(
|
|
5663
|
+
ResolveDialog,
|
|
5664
|
+
{
|
|
5665
|
+
refused: resolveRefused,
|
|
5666
|
+
onCancel: () => setResolving(false),
|
|
5667
|
+
onResolve: async (note) => {
|
|
5668
|
+
const ok = await onResolve(note);
|
|
5669
|
+
if (ok !== false) setResolving(false);
|
|
5670
|
+
return ok;
|
|
5671
|
+
}
|
|
5672
|
+
}
|
|
5673
|
+
)
|
|
5674
|
+
] });
|
|
5675
|
+
}
|
|
5676
|
+
function ReplyCard(props) {
|
|
5677
|
+
const { author, about, files, reactions, reactionRefused, isNew = false, urgent = false, own = false, editor, onDelete, deleteNote, menu, className, children } = props;
|
|
5678
|
+
const readOnly = props.readOnly ?? false;
|
|
5679
|
+
const [hovered, setHovered] = useState19(false);
|
|
5680
|
+
const [menuOpen, setMenuOpen] = useState19(false);
|
|
5681
|
+
const [picking, setPicking] = useState19(false);
|
|
5682
|
+
const [deleting, setDeleting] = useState19(false);
|
|
5683
|
+
const [editing, setEditing] = useEditing(props.editing, props.onEditingChange);
|
|
5684
|
+
const isEditing = editing && !readOnly && !!editor;
|
|
5685
|
+
const offersMenu = !!menu || own && (!!editor || !!onDelete);
|
|
5686
|
+
const showStrip = hovered && !isEditing && !readOnly && (offersMenu || !!reactions?.onToggle);
|
|
5687
|
+
const root = useRef15(null);
|
|
5688
|
+
const settle = () => requestAnimationFrame(() => setHovered(stillHere(root.current)));
|
|
5689
|
+
return /* @__PURE__ */ jsxs55(Fragment20, { children: [
|
|
5690
|
+
/* @__PURE__ */ jsxs55(
|
|
5691
|
+
Card,
|
|
5692
|
+
{
|
|
5693
|
+
ref: root,
|
|
5694
|
+
fill: "none",
|
|
5695
|
+
hover: readOnly ? "none" : "fill",
|
|
5696
|
+
quietUntilHover: true,
|
|
5697
|
+
hovered,
|
|
5698
|
+
active: isEditing,
|
|
5699
|
+
attention: attentionOf(isNew, urgent, false),
|
|
5700
|
+
className: cn("relative", className),
|
|
5701
|
+
onMouseEnter: () => setHovered(true),
|
|
5702
|
+
onMouseLeave: () => {
|
|
5703
|
+
if (picking || menuOpen) return;
|
|
5704
|
+
setHovered(false);
|
|
5705
|
+
},
|
|
5706
|
+
onFocus: () => setHovered(true),
|
|
5707
|
+
onBlur: (e) => {
|
|
5708
|
+
if (picking || menuOpen || e.currentTarget.contains(e.relatedTarget)) return;
|
|
5709
|
+
setHovered(false);
|
|
5710
|
+
},
|
|
5711
|
+
children: [
|
|
5712
|
+
isEditing ? /* @__PURE__ */ jsx79(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs55("div", { className: "flex flex-col items-start px-2 pt-2", children: [
|
|
5713
|
+
/* @__PURE__ */ jsx79(Head, { author, time: props.time, timeHref: props.timeHref, edited: props.edited, isNew, urgent }),
|
|
5714
|
+
about && /* @__PURE__ */ jsx79("div", { className: "w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
5715
|
+
/* @__PURE__ */ jsx79(Words, { children }),
|
|
5716
|
+
files && /* @__PURE__ */ jsx79("div", { className: "flex w-full flex-wrap items-start gap-2 pb-2 pl-8 pr-2", children: files }),
|
|
5717
|
+
/* @__PURE__ */ jsx79(Reactions, { reactions, refused: reactionRefused, readOnly })
|
|
5718
|
+
] }),
|
|
5719
|
+
showStrip && /* @__PURE__ */ jsx79(
|
|
5720
|
+
ConversationActions,
|
|
5721
|
+
{
|
|
5722
|
+
className: "absolute right-1 top-1 z-10",
|
|
5723
|
+
options: reactions?.options,
|
|
5724
|
+
onReact: reactions?.onToggle,
|
|
5725
|
+
onPickerOpenChange: (open) => {
|
|
5726
|
+
setPicking(open);
|
|
5727
|
+
if (!open) settle();
|
|
5728
|
+
},
|
|
5729
|
+
more: offersMenu && /* @__PURE__ */ jsx79(
|
|
5730
|
+
ConversationMenu,
|
|
5731
|
+
{
|
|
5732
|
+
trigger: /* @__PURE__ */ jsx79(ToolbarButton, { tooltip: "More actions", "aria-label": "More actions", children: /* @__PURE__ */ jsx79(IconDotsVertical4, { size: 16, stroke: 1.5 }) }),
|
|
5733
|
+
open: menuOpen,
|
|
5734
|
+
onOpenChange: (next) => {
|
|
5735
|
+
setMenuOpen(next);
|
|
5736
|
+
if (!next) settle();
|
|
5737
|
+
},
|
|
5738
|
+
onEdit: own && editor ? () => setEditing(true) : void 0,
|
|
5739
|
+
onDelete: own && onDelete ? () => setDeleting(true) : void 0,
|
|
5740
|
+
children: menu
|
|
5741
|
+
}
|
|
5742
|
+
)
|
|
5743
|
+
}
|
|
5744
|
+
)
|
|
5745
|
+
]
|
|
5746
|
+
}
|
|
5747
|
+
),
|
|
5748
|
+
deleting && onDelete && /* @__PURE__ */ jsx79(ConfirmDialog, { title: "Delete this reply?", confirmLabel: "Delete reply", destructive: true, onConfirm: onDelete, onClose: () => setDeleting(false), children: /* @__PURE__ */ jsx79("p", { children: deleteNote ?? "It is deleted for everyone." }) })
|
|
5749
|
+
] });
|
|
5750
|
+
}
|
|
5751
|
+
|
|
5752
|
+
// src/ConversationLayout.tsx
|
|
5753
|
+
import { useEffect as useEffect10, useLayoutEffect as useLayoutEffect7, useRef as useRef16, useState as useState20 } from "react";
|
|
5754
|
+
|
|
5755
|
+
// src/Panel.tsx
|
|
5756
|
+
import { jsx as jsx80, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
5757
|
+
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
5758
|
+
return /* @__PURE__ */ jsxs56("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
5759
|
+
header ?? /* @__PURE__ */ jsx80(ContainerHeader, { title, chevron, actions }),
|
|
5760
|
+
broken ? (
|
|
5761
|
+
// The message takes the room the body had and centres itself in it.
|
|
5762
|
+
/* @__PURE__ */ jsx80("div", { className: "flex min-h-0 flex-1 flex-col px-4", children })
|
|
5763
|
+
) : /* @__PURE__ */ jsx80(ScrollArea, { className: "min-h-0 flex-1", contentClassName: bodyClassName, viewportRef: bodyRef, onScroll: onBodyScroll, children }),
|
|
5764
|
+
!broken && footer && /* @__PURE__ */ jsx80("div", { className: "shrink-0", children: footer })
|
|
5765
|
+
] });
|
|
5766
|
+
}
|
|
5767
|
+
function Panel(props) {
|
|
5768
|
+
return /* @__PURE__ */ jsx80(
|
|
5769
|
+
ErrorBoundary,
|
|
5770
|
+
{
|
|
5771
|
+
label: "panel",
|
|
5772
|
+
frame: (message) => (
|
|
5773
|
+
// Only the name comes back with the message: the actions and the footer may be what threw.
|
|
5774
|
+
/* @__PURE__ */ jsx80(Frame, { title: props.title, chevron: props.chevron, className: props.className, broken: true, children: message })
|
|
5775
|
+
),
|
|
5776
|
+
children: /* @__PURE__ */ jsx80(Frame, { ...props })
|
|
5777
|
+
}
|
|
5778
|
+
);
|
|
5779
|
+
}
|
|
5780
|
+
|
|
5781
|
+
// src/ConversationLayout.tsx
|
|
5782
|
+
import { Fragment as Fragment21, jsx as jsx81, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
5783
|
+
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
5784
|
+
if (loading) return /* @__PURE__ */ jsx81(SkeletonConversation, {});
|
|
5785
|
+
if (items.length === 0) return /* @__PURE__ */ jsx81(EmptyState, { scope: "section", message: empty });
|
|
5786
|
+
const stateOf = (item) => change && item.thread ? {
|
|
5787
|
+
under,
|
|
5788
|
+
open: open === item.id,
|
|
5789
|
+
toggle: () => change(item.id, under && open === item.id ? void 0 : item.id),
|
|
5790
|
+
show: () => change(item.id, item.id, true)
|
|
5791
|
+
} : null;
|
|
5792
|
+
const draw2 = (item) => {
|
|
5793
|
+
if (!under) {
|
|
5794
|
+
return /* @__PURE__ */ jsx81("div", { "data-conversation-item": item.id, className: "flex flex-col", children: /* @__PURE__ */ jsx81(InConversationItem.Provider, { value: stateOf(item), children: item.card }) }, item.id);
|
|
5795
|
+
}
|
|
5796
|
+
return /* @__PURE__ */ jsx81(UnderItem, { item, isOpen: open === item.id && !!item.thread, state: stateOf(item), caret }, item.id);
|
|
5797
|
+
};
|
|
5798
|
+
if (!under) {
|
|
5799
|
+
return /* @__PURE__ */ jsxs57(Fragment21, { children: [
|
|
5800
|
+
above,
|
|
5801
|
+
items.map(draw2)
|
|
5802
|
+
] });
|
|
5803
|
+
}
|
|
5804
|
+
const resolved = items.filter((item) => item.resolved);
|
|
5805
|
+
const gone = items.filter((item) => item.gone && !item.resolved);
|
|
5806
|
+
const group = (title, list) => list.length > 0 && /* @__PURE__ */ jsx81(
|
|
5807
|
+
CollapsibleSection,
|
|
5808
|
+
{
|
|
5809
|
+
title,
|
|
5810
|
+
trailing: /* @__PURE__ */ jsx81(Chip, { type: "neutral", label: String(list.length) }),
|
|
5811
|
+
defaultOpen: false,
|
|
5812
|
+
openFor: list.some((item) => item.id === open) ? open : void 0,
|
|
5813
|
+
className: "shrink-0",
|
|
5814
|
+
contentClassName: "flex flex-col gap-2",
|
|
5815
|
+
children: list.map(draw2)
|
|
5816
|
+
}
|
|
5817
|
+
);
|
|
5818
|
+
return /* @__PURE__ */ jsxs57(Fragment21, { children: [
|
|
5819
|
+
above,
|
|
5820
|
+
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
5821
|
+
group("On deleted blocks", gone),
|
|
5822
|
+
group("Resolved", resolved)
|
|
5823
|
+
] });
|
|
5824
|
+
}
|
|
5825
|
+
function UnderItem({ item, isOpen, state, caret }) {
|
|
5826
|
+
const root = useRef16(null);
|
|
5827
|
+
const line = useFaceLine(root, isOpen);
|
|
5828
|
+
return /* @__PURE__ */ jsxs57(
|
|
5829
|
+
Card,
|
|
5830
|
+
{
|
|
5831
|
+
ref: root,
|
|
5832
|
+
"data-conversation-item": item.id,
|
|
5833
|
+
"data-open": isOpen || void 0,
|
|
5834
|
+
fill: "none",
|
|
5835
|
+
hover: "hairline",
|
|
5836
|
+
hovered: isOpen,
|
|
5837
|
+
quietUntilHover: !isOpen,
|
|
5838
|
+
className: cn("relative flex flex-col", isOpen && "pb-2"),
|
|
5839
|
+
children: [
|
|
5840
|
+
/* @__PURE__ */ jsx81(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx81(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */ jsxs57(LineByLayout.Provider, { value: true, children: [
|
|
5841
|
+
/* @__PURE__ */ jsx81("div", { className: "-m-px flex flex-col", children: item.card }),
|
|
5842
|
+
isOpen && /* @__PURE__ */ jsx81(caretOnOpen.Provider, { value: caret, children: item.thread })
|
|
5843
|
+
] }) }) }),
|
|
5844
|
+
line && // The face's line, one bar, last so it stands over a hovered card's fill; 19px in, centred under the face.
|
|
5845
|
+
// Its top and height come from the measure: where the face and the last reply end are not known ahead.
|
|
5846
|
+
/* @__PURE__ */ jsx81("span", { "aria-hidden": true, className: "pointer-events-none absolute left-[19px] w-0.5 bg-border-default", style: { top: line.top, height: line.height } })
|
|
5847
|
+
]
|
|
5848
|
+
}
|
|
5849
|
+
);
|
|
5850
|
+
}
|
|
5851
|
+
function ConversationLayout({ threads, items, open, onOpenChange, box, above, loading = false, empty = "No comments yet.", header, title = "Comments", actions, className }) {
|
|
5852
|
+
const body = useRef16(null);
|
|
5853
|
+
const pressed2 = useRef16(null);
|
|
5854
|
+
const itemAt = (id) => body.current?.querySelector(`[data-conversation-item="${CSS.escape(id)}"]`) ?? null;
|
|
5855
|
+
const [caret, setCaret] = useState20(0);
|
|
5856
|
+
const change = onOpenChange ? (id, next, reply = false) => {
|
|
5857
|
+
if (next !== void 0 && next === open) {
|
|
5858
|
+
if (reply) setCaret((n) => n + 1);
|
|
5859
|
+
return;
|
|
5860
|
+
}
|
|
5861
|
+
const item = threads === "under" ? itemAt(id) : null;
|
|
5862
|
+
pressed2.current = item ? { id, top: item.getBoundingClientRect().top } : null;
|
|
5863
|
+
onOpenChange(next);
|
|
5864
|
+
} : void 0;
|
|
5865
|
+
useLayoutEffect7(() => {
|
|
5866
|
+
const at = pressed2.current;
|
|
5867
|
+
pressed2.current = null;
|
|
5868
|
+
const item = at && itemAt(at.id);
|
|
5869
|
+
if (!at || !item || !body.current) return;
|
|
5870
|
+
const moved = item.getBoundingClientRect().top - at.top;
|
|
5871
|
+
if (moved !== 0) body.current.scrollTop += moved;
|
|
5872
|
+
}, [open]);
|
|
5873
|
+
const was = useRef16(open);
|
|
5874
|
+
useEffect10(() => {
|
|
5875
|
+
if (open !== void 0 && open !== was.current) setCaret((n) => n + 1);
|
|
5876
|
+
was.current = open;
|
|
5877
|
+
}, [open]);
|
|
5878
|
+
if (threads === "under") {
|
|
5879
|
+
return /* @__PURE__ */ jsx81(Panel, { className: cn("w-[384px] flex-none", className), title, actions, bodyRef: body, bodyClassName: "flex flex-col gap-2 p-3", footer: box && /* @__PURE__ */ jsx81("div", { className: "p-3", children: box }), children: /* @__PURE__ */ jsx81(List, { items, open, under: true, above, loading, empty, change, caret }) });
|
|
5880
|
+
}
|
|
5881
|
+
const opened = items.find((item) => item.id === open)?.thread;
|
|
5882
|
+
return /* @__PURE__ */ jsxs57("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
5883
|
+
/* @__PURE__ */ jsxs57("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
5884
|
+
header,
|
|
5885
|
+
/* @__PURE__ */ jsx81(ScrollArea, { className: "min-h-0 flex-1", contentClassName: "flex flex-col gap-2 p-4", children: /* @__PURE__ */ jsx81(List, { items, open, under: false, above, loading, empty, change, caret }) }),
|
|
5886
|
+
box && /* @__PURE__ */ jsx81("div", { className: "shrink-0 p-3", children: box })
|
|
5887
|
+
] }),
|
|
5888
|
+
opened && /* @__PURE__ */ jsx81("div", { className: "flex w-[384px] shrink-0 flex-col border-l border-border-subtle", children: /* @__PURE__ */ jsx81(caretOnOpen.Provider, { value: caret, children: opened }) })
|
|
5075
5889
|
] });
|
|
5076
5890
|
}
|
|
5077
5891
|
|
|
5892
|
+
// src/QuotedLine.tsx
|
|
5893
|
+
import { jsx as jsx82, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5894
|
+
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
5895
|
+
function QuotedLine({ words, state = "here", label }) {
|
|
5896
|
+
const shown2 = words ?? label ?? "";
|
|
5897
|
+
return /* @__PURE__ */ jsxs58("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
5898
|
+
/* @__PURE__ */ jsx82(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx82("p", { className: "line-clamp-2 text-caption text-text-secondary", children: /* @__PURE__ */ jsx82("mark", { className: cn("rounded-sm px-0.5 text-text-primary [box-decoration-break:clone]", state === "here" ? "bg-warning-muted" : "bg-bg-inset text-text-secondary", state === "gone" && "line-through"), children: shown2 }) }) }),
|
|
5899
|
+
state !== "here" && /* @__PURE__ */ jsx82("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
5900
|
+
] });
|
|
5901
|
+
}
|
|
5902
|
+
|
|
5903
|
+
// src/ReactionHorizon.tsx
|
|
5904
|
+
import { Fragment as Fragment22, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5905
|
+
function ReactionHorizon({ limit, omitted, cut = false }) {
|
|
5906
|
+
if (omitted <= 0 && !cut) return null;
|
|
5907
|
+
return /* @__PURE__ */ jsxs59("p", { className: "text-caption text-text-muted", children: [
|
|
5908
|
+
omitted > 0 && /* @__PURE__ */ jsxs59(Fragment22, { children: [
|
|
5909
|
+
"Reactions are shown for the latest ",
|
|
5910
|
+
limit,
|
|
5911
|
+
" comments and replies here. ",
|
|
5912
|
+
omitted,
|
|
5913
|
+
" older ",
|
|
5914
|
+
omitted === 1 ? "one was" : "ones were",
|
|
5915
|
+
" not checked."
|
|
5916
|
+
] }),
|
|
5917
|
+
omitted > 0 && cut && " ",
|
|
5918
|
+
cut && "Some reactions may be missing."
|
|
5919
|
+
] });
|
|
5920
|
+
}
|
|
5921
|
+
|
|
5922
|
+
// src/PinnedComment.tsx
|
|
5923
|
+
import { jsx as jsx83, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
5924
|
+
function PinnedComment({ author, time, words, deleted = false }) {
|
|
5925
|
+
return /* @__PURE__ */ jsx83(Card, { fill: "elevated", clip: true, children: deleted ? /* @__PURE__ */ jsx83("p", { className: "p-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */ jsxs60("div", { className: "flex flex-col p-2", children: [
|
|
5926
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex items-center gap-2", children: [
|
|
5927
|
+
/* @__PURE__ */ jsx83(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
5928
|
+
/* @__PURE__ */ jsx83("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
5929
|
+
/* @__PURE__ */ jsx83(MetaText, { className: "shrink-0", children: time })
|
|
5930
|
+
] }),
|
|
5931
|
+
/* @__PURE__ */ jsx83("div", { className: "pb-2 pl-8 pr-2 pt-1", children: /* @__PURE__ */ jsx83("div", { className: "truncate text-caption text-text-secondary", children: words }) })
|
|
5932
|
+
] }) });
|
|
5933
|
+
}
|
|
5934
|
+
|
|
5935
|
+
// src/ArchivedNotice.tsx
|
|
5936
|
+
import { useState as useState21 } from "react";
|
|
5937
|
+
import { IconArchive } from "@tabler/icons-react";
|
|
5938
|
+
import { jsx as jsx84, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
5939
|
+
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
5940
|
+
const [unarchiving, setUnarchiving] = useState21(false);
|
|
5941
|
+
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
5942
|
+
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
5943
|
+
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
5944
|
+
return /* @__PURE__ */ jsxs61(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
5945
|
+
/* @__PURE__ */ jsx84(IconArchive, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
5946
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
5947
|
+
/* @__PURE__ */ jsx84("span", { className: "text-body-2-strong text-text-primary", children: line }),
|
|
5948
|
+
resolution && /* @__PURE__ */ jsx84("p", { className: "whitespace-pre-wrap text-caption text-text-secondary", children: resolution })
|
|
5949
|
+
] }),
|
|
5950
|
+
parent ? onOpenParent && /* @__PURE__ */ jsx84(Button, { variant: "outlined", size: "small", className: "shrink-0", onClick: onOpenParent, children: `Open ${parent}` }) : onUnarchive && /* @__PURE__ */ jsx84(
|
|
5951
|
+
Button,
|
|
5952
|
+
{
|
|
5953
|
+
variant: "outlined",
|
|
5954
|
+
size: "small",
|
|
5955
|
+
className: "shrink-0",
|
|
5956
|
+
disabled: unarchiving,
|
|
5957
|
+
onClick: () => {
|
|
5958
|
+
setUnarchiving(true);
|
|
5959
|
+
void Promise.resolve().then(onUnarchive).finally(() => setUnarchiving(false));
|
|
5960
|
+
},
|
|
5961
|
+
children: "Unarchive"
|
|
5962
|
+
}
|
|
5963
|
+
)
|
|
5964
|
+
] });
|
|
5965
|
+
}
|
|
5966
|
+
|
|
5967
|
+
// src/Thread.tsx
|
|
5968
|
+
import { Children } from "react";
|
|
5969
|
+
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
5970
|
+
import { useContext as useContext13 } from "react";
|
|
5971
|
+
import { Fragment as Fragment23, jsx as jsx85, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
5972
|
+
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
5973
|
+
function Replies({ children, loading }) {
|
|
5974
|
+
if (loading) return /* @__PURE__ */ jsx85(SkeletonConversation, {});
|
|
5975
|
+
if (!anyIn(children)) return /* @__PURE__ */ jsx85(EmptyState, { scope: "section", message: "No replies yet." });
|
|
5976
|
+
return /* @__PURE__ */ jsx85(Fragment23, { children });
|
|
5977
|
+
}
|
|
5978
|
+
function Thread({ place = "beside", start, children, loading = false, resolved = false, box, notice, actions, onClose, title = "Replies", bodyRef, className }) {
|
|
5979
|
+
const foot = notice ?? box;
|
|
5980
|
+
const layoutLine = useContext13(LineByLayout);
|
|
5981
|
+
if (place === "under") {
|
|
5982
|
+
return /* @__PURE__ */ jsxs62("div", { "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
5983
|
+
(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).
|
|
5984
|
+
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
5985
|
+
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
5986
|
+
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
5987
|
+
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
5988
|
+
/* @__PURE__ */ jsxs62("div", { "data-thread-replies": true, className: "relative ml-[19px] mr-2 flex flex-col gap-1 pl-2.5", children: [
|
|
5989
|
+
!layoutLine && /* @__PURE__ */ jsx85("span", { "aria-hidden": true, className: "absolute bottom-0 left-0 top-0 w-0.5 bg-border-default" }),
|
|
5990
|
+
/* @__PURE__ */ jsx85(caretOnOpen.Provider, { value: 0, children: loading ? /* @__PURE__ */ jsx85(SkeletonConversation, {}) : children })
|
|
5991
|
+
] }),
|
|
5992
|
+
foot && /* @__PURE__ */ jsx85("div", { className: "px-2 pt-2", children: foot })
|
|
5993
|
+
] });
|
|
5994
|
+
}
|
|
5995
|
+
return /* @__PURE__ */ jsxs62(
|
|
5996
|
+
Panel,
|
|
5997
|
+
{
|
|
5998
|
+
className,
|
|
5999
|
+
bodyRef,
|
|
6000
|
+
bodyClassName: "flex flex-col",
|
|
6001
|
+
title,
|
|
6002
|
+
actions: /* @__PURE__ */ jsxs62(Fragment23, { children: [
|
|
6003
|
+
resolved && /* @__PURE__ */ jsx85(Chip, { type: "success", label: "Resolved" }),
|
|
6004
|
+
actions,
|
|
6005
|
+
onClose && /* @__PURE__ */ jsx85(IconButton, { tooltip: "Close", "aria-label": "Close", onClick: onClose, children: /* @__PURE__ */ jsx85(IconX6, { size: 16, stroke: 1.5 }) })
|
|
6006
|
+
] }),
|
|
6007
|
+
footer: foot && /* @__PURE__ */ jsx85("div", { className: "p-3", children: foot }),
|
|
6008
|
+
children: [
|
|
6009
|
+
start && /* @__PURE__ */ jsx85("div", { className: "px-4 pb-2 pt-4", children: /* @__PURE__ */ jsx85(PinnedComment, { ...start }) }),
|
|
6010
|
+
/* @__PURE__ */ jsx85(Divider, { look: "section", label: "Replies", className: "px-4 py-2" }),
|
|
6011
|
+
/* @__PURE__ */ jsx85("div", { className: "flex flex-col gap-2 px-4 pb-4", children: /* @__PURE__ */ jsx85(caretOnOpen.Provider, { value: 0, children: /* @__PURE__ */ jsx85(Replies, { loading, children }) }) })
|
|
6012
|
+
]
|
|
6013
|
+
}
|
|
6014
|
+
);
|
|
6015
|
+
}
|
|
6016
|
+
|
|
5078
6017
|
// src/SearchInput.tsx
|
|
5079
6018
|
import "react";
|
|
5080
6019
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
5081
|
-
import { jsx as
|
|
6020
|
+
import { jsx as jsx86, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
5082
6021
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
5083
|
-
return /* @__PURE__ */
|
|
6022
|
+
return /* @__PURE__ */ jsxs63(
|
|
5084
6023
|
"div",
|
|
5085
6024
|
{
|
|
5086
6025
|
className: cn(
|
|
@@ -5092,7 +6031,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
5092
6031
|
className
|
|
5093
6032
|
),
|
|
5094
6033
|
children: [
|
|
5095
|
-
/* @__PURE__ */
|
|
6034
|
+
/* @__PURE__ */ jsx86(
|
|
5096
6035
|
Input3,
|
|
5097
6036
|
{
|
|
5098
6037
|
className: cn("flex-1 min-w-0 text-input-value", BARE_INPUT_CLASSES),
|
|
@@ -5100,81 +6039,87 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
5100
6039
|
...props
|
|
5101
6040
|
}
|
|
5102
6041
|
),
|
|
5103
|
-
shortcut && /* @__PURE__ */
|
|
6042
|
+
shortcut && /* @__PURE__ */ jsx86(Kbd, { children: shortcut })
|
|
5104
6043
|
]
|
|
5105
6044
|
}
|
|
5106
6045
|
);
|
|
5107
6046
|
}
|
|
5108
6047
|
|
|
5109
|
-
// src/
|
|
5110
|
-
import {
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
6048
|
+
// src/PageHeader.tsx
|
|
6049
|
+
import { Fragment as Fragment24 } from "react";
|
|
6050
|
+
import { IconLock } from "@tabler/icons-react";
|
|
6051
|
+
import { Fragment as Fragment25, jsx as jsx87, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6052
|
+
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, actions, className }) {
|
|
6053
|
+
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
6054
|
+
const quiet = words.length > 0 || time != null || members != null;
|
|
6055
|
+
const name = /* @__PURE__ */ jsxs64("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
6056
|
+
leading != null && /* @__PURE__ */ jsx87("span", { className: "flex shrink-0 items-center text-text-secondary", children: leading }),
|
|
6057
|
+
locked && /* @__PURE__ */ jsx87(WithTooltip, { label: "Private", children: /* @__PURE__ */ jsx87(IconLock, { size: 16, stroke: 1.5, role: "img", "aria-label": "Private", className: "shrink-0 text-text-secondary" }) }),
|
|
6058
|
+
typeof title === "string" ? /* @__PURE__ */ jsx87("span", { className: "truncate text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx87("div", { className: "flex min-w-0 items-center", children: title }),
|
|
6059
|
+
after != null && /* @__PURE__ */ jsx87("span", { className: "flex shrink-0 items-center", children: after })
|
|
5119
6060
|
] });
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
),
|
|
5130
|
-
|
|
5131
|
-
}
|
|
5132
|
-
|
|
6061
|
+
const right = quiet || actions != null ? /* @__PURE__ */ jsxs64(Fragment25, { children: [
|
|
6062
|
+
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
6063
|
+
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
6064
|
+
/* @__PURE__ */ jsxs64("div", { className: cn("flex items-center gap-3", actions != null && "pr-2"), children: [
|
|
6065
|
+
words.length > 0 && /* @__PURE__ */ jsx87("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */ jsxs64(Fragment24, { children: [
|
|
6066
|
+
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
|
|
6067
|
+
/* @__PURE__ */ jsx87("span", { "aria-hidden": "true", className: "size-[3px] shrink-0 rounded-full bg-text-muted" }),
|
|
6068
|
+
/* @__PURE__ */ jsx87(MetaText, { tone: one.done ? "success" : "secondary", children: one.label })
|
|
6069
|
+
] }, `${one.label}-${i}`)) }),
|
|
6070
|
+
time && /* @__PURE__ */ jsx87(WithTooltip, { label: time.exact, children: /* @__PURE__ */ jsx87("span", { className: "whitespace-nowrap text-caption italic text-text-muted", children: time.label }) }),
|
|
6071
|
+
members
|
|
6072
|
+
] }),
|
|
6073
|
+
actions
|
|
6074
|
+
] }) : void 0;
|
|
6075
|
+
return /* @__PURE__ */ jsx87(ContainerHeader, { title: name, actions: right, className });
|
|
5133
6076
|
}
|
|
5134
6077
|
|
|
5135
6078
|
// src/ListColumn.tsx
|
|
5136
|
-
import { jsx as
|
|
6079
|
+
import { jsx as jsx88, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
5137
6080
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
5138
|
-
return /* @__PURE__ */
|
|
6081
|
+
return /* @__PURE__ */ jsxs65(
|
|
5139
6082
|
"div",
|
|
5140
6083
|
{
|
|
5141
6084
|
className: cn(
|
|
5142
6085
|
// `shrink-0`: the column keeps its 290px beside a main area that grows.
|
|
5143
|
-
"flex shrink-0 flex-col overflow-hidden border-r border-border-subtle transition-[width,opacity]
|
|
5144
|
-
|
|
6086
|
+
"flex shrink-0 flex-col overflow-hidden border-r border-border-subtle transition-[width,opacity,visibility]",
|
|
6087
|
+
FOLD_MOTION_CLASSES,
|
|
6088
|
+
collapsed ? cn("w-0 border-r-0", FOLDED_CLASSES) : cn("w-[290px]", UNFOLDED_CLASSES),
|
|
5145
6089
|
className
|
|
5146
6090
|
),
|
|
5147
6091
|
"data-collapsed": collapsed || void 0,
|
|
6092
|
+
inert: collapsed,
|
|
5148
6093
|
children: [
|
|
5149
|
-
/* @__PURE__ */
|
|
6094
|
+
/* @__PURE__ */ jsx88(ContainerHeader, { title, chevron, titleMenu, actions }),
|
|
5150
6095
|
above,
|
|
5151
6096
|
broken ? (
|
|
5152
6097
|
// The message takes the room the list had and centres itself in it (Katerina, 19 September).
|
|
5153
|
-
/* @__PURE__ */
|
|
5154
|
-
) : /* @__PURE__ */
|
|
6098
|
+
/* @__PURE__ */ jsx88("div", { className: "flex min-h-0 flex-1 flex-col px-3", children })
|
|
6099
|
+
) : /* @__PURE__ */ jsx88(ScrollArea, { className: "flex-1", contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children })
|
|
5155
6100
|
]
|
|
5156
6101
|
}
|
|
5157
6102
|
);
|
|
5158
6103
|
}
|
|
5159
6104
|
function ListColumn(props) {
|
|
5160
|
-
return /* @__PURE__ */
|
|
6105
|
+
return /* @__PURE__ */ jsx88(
|
|
5161
6106
|
ErrorBoundary,
|
|
5162
6107
|
{
|
|
5163
6108
|
label: "list panel",
|
|
5164
6109
|
frame: (message) => (
|
|
5165
6110
|
// Only the name comes back with the message: the actions and the row above may be what threw.
|
|
5166
|
-
/* @__PURE__ */
|
|
6111
|
+
/* @__PURE__ */ jsx88(Column, { title: props.title, chevron: props.chevron, collapsed: props.collapsed, className: props.className, broken: true, children: message })
|
|
5167
6112
|
),
|
|
5168
|
-
children: /* @__PURE__ */
|
|
6113
|
+
children: /* @__PURE__ */ jsx88(Column, { ...props })
|
|
5169
6114
|
}
|
|
5170
6115
|
);
|
|
5171
6116
|
}
|
|
5172
6117
|
|
|
5173
6118
|
// src/Tabs.tsx
|
|
5174
6119
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
5175
|
-
import { Fragment as
|
|
6120
|
+
import { Fragment as Fragment26, jsx as jsx89, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
5176
6121
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
5177
|
-
return /* @__PURE__ */
|
|
6122
|
+
return /* @__PURE__ */ jsx89(
|
|
5178
6123
|
BaseTabs.Root,
|
|
5179
6124
|
{
|
|
5180
6125
|
value: active,
|
|
@@ -5182,14 +6127,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5182
6127
|
if (details.reason === "none") onChange(value);
|
|
5183
6128
|
},
|
|
5184
6129
|
className,
|
|
5185
|
-
children: /* @__PURE__ */
|
|
6130
|
+
children: /* @__PURE__ */ jsx89(
|
|
5186
6131
|
BaseTabs.List,
|
|
5187
6132
|
{
|
|
5188
6133
|
activateOnFocus: true,
|
|
5189
6134
|
"aria-label": aria["aria-label"],
|
|
5190
6135
|
"aria-labelledby": aria["aria-labelledby"],
|
|
5191
6136
|
className: "flex items-center gap-2",
|
|
5192
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
6137
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs66(
|
|
5193
6138
|
BaseTabs.Tab,
|
|
5194
6139
|
{
|
|
5195
6140
|
value: tab.id,
|
|
@@ -5202,13 +6147,13 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5202
6147
|
),
|
|
5203
6148
|
children: [
|
|
5204
6149
|
tab.icon,
|
|
5205
|
-
/* @__PURE__ */
|
|
6150
|
+
/* @__PURE__ */ jsxs66("span", { className: "flex items-baseline", children: [
|
|
5206
6151
|
tab.label,
|
|
5207
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
6152
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx89("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
5208
6153
|
] }),
|
|
5209
|
-
tab.unread ? /* @__PURE__ */
|
|
5210
|
-
/* @__PURE__ */
|
|
5211
|
-
/* @__PURE__ */
|
|
6154
|
+
tab.unread ? /* @__PURE__ */ jsxs66(Fragment26, { children: [
|
|
6155
|
+
/* @__PURE__ */ jsx89(UnreadDot, { className: "h-auto w-auto" }),
|
|
6156
|
+
/* @__PURE__ */ jsx89("span", { className: "sr-only", children: "new" })
|
|
5212
6157
|
] }) : null
|
|
5213
6158
|
]
|
|
5214
6159
|
},
|
|
@@ -5221,10 +6166,10 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
5221
6166
|
}
|
|
5222
6167
|
|
|
5223
6168
|
// src/Toast.tsx
|
|
5224
|
-
import { createContext as
|
|
6169
|
+
import { createContext as createContext10, useContext as useContext14, useMemo as useMemo6 } from "react";
|
|
5225
6170
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
5226
|
-
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as
|
|
5227
|
-
import { jsx as
|
|
6171
|
+
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
6172
|
+
import { jsx as jsx90, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
5228
6173
|
var SURFACE_STYLES = {
|
|
5229
6174
|
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",
|
|
5230
6175
|
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",
|
|
@@ -5233,9 +6178,9 @@ var SURFACE_STYLES = {
|
|
|
5233
6178
|
error: "bg-error-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"
|
|
5234
6179
|
};
|
|
5235
6180
|
var ICONS2 = {
|
|
5236
|
-
success:
|
|
5237
|
-
brand:
|
|
5238
|
-
neutral:
|
|
6181
|
+
success: IconCircleCheck5,
|
|
6182
|
+
brand: IconCircleCheck5,
|
|
6183
|
+
neutral: IconCircleCheck5,
|
|
5239
6184
|
warning: IconAlertCircle2,
|
|
5240
6185
|
error: IconCircleX2
|
|
5241
6186
|
};
|
|
@@ -5260,19 +6205,19 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
5260
6205
|
);
|
|
5261
6206
|
function LeadingIcon({ type }) {
|
|
5262
6207
|
const Icon = ICONS2[type];
|
|
5263
|
-
return /* @__PURE__ */
|
|
6208
|
+
return /* @__PURE__ */ jsx90(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
5264
6209
|
}
|
|
5265
6210
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
5266
6211
|
const hasAction = !!(actionLabel && onAction);
|
|
5267
|
-
return /* @__PURE__ */
|
|
5268
|
-
/* @__PURE__ */
|
|
5269
|
-
leadingIcon && /* @__PURE__ */
|
|
5270
|
-
/* @__PURE__ */
|
|
6212
|
+
return /* @__PURE__ */ jsxs67("div", { className: pillClassName(type, hasAction, className), children: [
|
|
6213
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
6214
|
+
leadingIcon && /* @__PURE__ */ jsx90(LeadingIcon, { type }),
|
|
6215
|
+
/* @__PURE__ */ jsx90("span", { className: LABEL_CLASSES, children: label })
|
|
5271
6216
|
] }),
|
|
5272
|
-
hasAction && /* @__PURE__ */
|
|
6217
|
+
hasAction && /* @__PURE__ */ jsx90(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
5273
6218
|
] });
|
|
5274
6219
|
}
|
|
5275
|
-
var ToastContext =
|
|
6220
|
+
var ToastContext = createContext10(null);
|
|
5276
6221
|
var VISIBLE_TOASTS = 3;
|
|
5277
6222
|
function ToastProvider({ children }) {
|
|
5278
6223
|
const manager = useMemo6(() => BaseToast.createToastManager(), []);
|
|
@@ -5291,9 +6236,9 @@ function ToastProvider({ children }) {
|
|
|
5291
6236
|
}),
|
|
5292
6237
|
[manager]
|
|
5293
6238
|
);
|
|
5294
|
-
return /* @__PURE__ */
|
|
6239
|
+
return /* @__PURE__ */ jsx90(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs67(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
5295
6240
|
children,
|
|
5296
|
-
/* @__PURE__ */
|
|
6241
|
+
/* @__PURE__ */ jsx90(BaseToast.Portal, { children: /* @__PURE__ */ jsx90(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx90(ToastList, {}) }) })
|
|
5297
6242
|
] }) });
|
|
5298
6243
|
}
|
|
5299
6244
|
function ToastList() {
|
|
@@ -5301,25 +6246,25 @@ function ToastList() {
|
|
|
5301
6246
|
return toasts.map((toast) => {
|
|
5302
6247
|
const type = toast.type ?? "neutral";
|
|
5303
6248
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
5304
|
-
return /* @__PURE__ */
|
|
6249
|
+
return /* @__PURE__ */ jsxs67(
|
|
5305
6250
|
BaseToast.Root,
|
|
5306
6251
|
{
|
|
5307
6252
|
toast,
|
|
5308
6253
|
swipeDirection: ["left", "down"],
|
|
5309
6254
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
5310
6255
|
children: [
|
|
5311
|
-
/* @__PURE__ */
|
|
5312
|
-
leadingIcon && /* @__PURE__ */
|
|
5313
|
-
/* @__PURE__ */
|
|
6256
|
+
/* @__PURE__ */ jsxs67("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
6257
|
+
leadingIcon && /* @__PURE__ */ jsx90(LeadingIcon, { type }),
|
|
6258
|
+
/* @__PURE__ */ jsx90(BaseToast.Title, { render: /* @__PURE__ */ jsx90("span", {}), className: LABEL_CLASSES })
|
|
5314
6259
|
] }),
|
|
5315
|
-
actionLabel && /* @__PURE__ */
|
|
6260
|
+
actionLabel && /* @__PURE__ */ jsx90(
|
|
5316
6261
|
BaseToast.Action,
|
|
5317
6262
|
{
|
|
5318
6263
|
onClick: () => {
|
|
5319
6264
|
onAction?.();
|
|
5320
6265
|
close(toast.id);
|
|
5321
6266
|
},
|
|
5322
|
-
render: /* @__PURE__ */
|
|
6267
|
+
render: /* @__PURE__ */ jsx90(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
5323
6268
|
}
|
|
5324
6269
|
)
|
|
5325
6270
|
]
|
|
@@ -5329,7 +6274,7 @@ function ToastList() {
|
|
|
5329
6274
|
});
|
|
5330
6275
|
}
|
|
5331
6276
|
function useToast() {
|
|
5332
|
-
const ctx =
|
|
6277
|
+
const ctx = useContext14(ToastContext);
|
|
5333
6278
|
if (!ctx) throw new Error("useToast must be used within ToastProvider");
|
|
5334
6279
|
return ctx;
|
|
5335
6280
|
}
|
|
@@ -5337,6 +6282,7 @@ export {
|
|
|
5337
6282
|
AddReactionButton,
|
|
5338
6283
|
AppProvider,
|
|
5339
6284
|
AppShell,
|
|
6285
|
+
ArchivedNotice,
|
|
5340
6286
|
AttachedCard,
|
|
5341
6287
|
AttachmentCard,
|
|
5342
6288
|
Avatar,
|
|
@@ -5360,9 +6306,14 @@ export {
|
|
|
5360
6306
|
CommentCount,
|
|
5361
6307
|
ConfirmDialog,
|
|
5362
6308
|
ContainerHeader,
|
|
6309
|
+
ConversationActions,
|
|
6310
|
+
ConversationCard,
|
|
6311
|
+
ConversationLayout,
|
|
6312
|
+
ConversationMenu,
|
|
5363
6313
|
DialogShell,
|
|
5364
6314
|
Divider,
|
|
5365
6315
|
EditableText,
|
|
6316
|
+
EditedMarker,
|
|
5366
6317
|
EmptyState,
|
|
5367
6318
|
EnterHint,
|
|
5368
6319
|
EntryShell,
|
|
@@ -5402,23 +6353,31 @@ export {
|
|
|
5402
6353
|
MenuSection,
|
|
5403
6354
|
MenuSeparator,
|
|
5404
6355
|
MenuSub,
|
|
6356
|
+
MetaText,
|
|
5405
6357
|
NavItem,
|
|
5406
6358
|
NavTree,
|
|
5407
6359
|
NavTreeSection,
|
|
6360
|
+
PageHeader,
|
|
5408
6361
|
Panel,
|
|
5409
6362
|
PartCard,
|
|
5410
6363
|
Person,
|
|
5411
6364
|
PersonTrigger,
|
|
6365
|
+
PinnedComment,
|
|
5412
6366
|
Popover,
|
|
5413
6367
|
PreviewCard,
|
|
5414
6368
|
ProgressBar,
|
|
5415
6369
|
ProgressRing,
|
|
5416
6370
|
Property,
|
|
6371
|
+
QuotedLine,
|
|
5417
6372
|
Rail,
|
|
5418
6373
|
RailItem,
|
|
5419
6374
|
Reaction,
|
|
6375
|
+
ReactionHorizon,
|
|
5420
6376
|
ReactionPicker,
|
|
5421
6377
|
ReactionRow,
|
|
6378
|
+
RepliesRow,
|
|
6379
|
+
ReplyCard,
|
|
6380
|
+
ResolveDialog,
|
|
5422
6381
|
RichText,
|
|
5423
6382
|
ScrollArea,
|
|
5424
6383
|
SearchInput,
|
|
@@ -5428,6 +6387,7 @@ export {
|
|
|
5428
6387
|
ShowMore,
|
|
5429
6388
|
Sidebar,
|
|
5430
6389
|
SkeletonBar,
|
|
6390
|
+
SkeletonConversation,
|
|
5431
6391
|
SkeletonList,
|
|
5432
6392
|
SkeletonRow,
|
|
5433
6393
|
StatusMark,
|
|
@@ -5435,6 +6395,7 @@ export {
|
|
|
5435
6395
|
Tabs,
|
|
5436
6396
|
TextInput,
|
|
5437
6397
|
Textarea,
|
|
6398
|
+
Thread,
|
|
5438
6399
|
Toast,
|
|
5439
6400
|
ToastProvider,
|
|
5440
6401
|
Toolbar,
|
|
@@ -5446,11 +6407,13 @@ export {
|
|
|
5446
6407
|
TooltipProvider,
|
|
5447
6408
|
TopBar,
|
|
5448
6409
|
UnreadDot,
|
|
6410
|
+
UrgentMark,
|
|
5449
6411
|
WithTooltip,
|
|
5450
6412
|
archivedLine2 as archivedLine,
|
|
5451
6413
|
blockAtY,
|
|
5452
6414
|
calloutLook,
|
|
5453
6415
|
cardShapeMemory,
|
|
6416
|
+
caretOnOpen,
|
|
5454
6417
|
chosenOf,
|
|
5455
6418
|
cn,
|
|
5456
6419
|
hueFor,
|
|
@@ -5466,6 +6429,7 @@ export {
|
|
|
5466
6429
|
thingKindOf,
|
|
5467
6430
|
unavailableMemory,
|
|
5468
6431
|
useCanHover,
|
|
6432
|
+
useSidebarFold,
|
|
5469
6433
|
useToast,
|
|
5470
6434
|
whoReacted
|
|
5471
6435
|
};
|