@estiva-app/ui 0.100.0 → 0.102.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/AskedBlocks.d.ts +30 -0
- package/dist/AskedBlocks.d.ts.map +1 -0
- package/dist/DeletedNotice.d.ts +17 -0
- package/dist/DeletedNotice.d.ts.map +1 -0
- package/dist/DocumentEditor.d.ts +39 -6
- package/dist/DocumentEditor.d.ts.map +1 -1
- package/dist/IconButton.d.ts +7 -1
- package/dist/IconButton.d.ts.map +1 -1
- package/dist/LinkRow.d.ts +7 -10
- package/dist/LinkRow.d.ts.map +1 -1
- package/dist/NoAccessNotice.d.ts +13 -0
- package/dist/NoAccessNotice.d.ts.map +1 -0
- package/dist/PartCard.d.ts +3 -3
- package/dist/PartCard.d.ts.map +1 -1
- package/dist/editor.d.ts +1 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +311 -8
- package/dist/editor.js.map +4 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +433 -389
- package/dist/index.js.map +4 -4
- package/dist/linked.d.ts +2 -2
- package/dist/linked.d.ts.map +1 -1
- package/dist/linkedFrom.d.ts.map +1 -1
- package/package.json +1 -1
- package/registry.json +95 -7
- package/src/AskedBlocks.ts +158 -0
- package/src/DeletedNotice.mdx +43 -0
- package/src/DeletedNotice.stories.tsx +29 -0
- package/src/DeletedNotice.test.tsx +46 -0
- package/src/DeletedNotice.tsx +47 -0
- package/src/DocumentEditor.mdx +5 -1
- package/src/DocumentEditor.stories.tsx +84 -0
- package/src/DocumentEditor.test.tsx +188 -0
- package/src/DocumentEditor.tsx +294 -14
- package/src/IconButton.mdx +4 -0
- package/src/IconButton.stories.tsx +28 -1
- package/src/IconButton.test.tsx +30 -0
- package/src/IconButton.tsx +22 -1
- package/src/LinkCard.test.tsx +4 -6
- package/src/LinkCard.tsx +1 -1
- package/src/LinkRow.mdx +1 -1
- package/src/LinkRow.stories.tsx +3 -3
- package/src/LinkRow.test.tsx +2 -2
- package/src/LinkRow.tsx +11 -20
- package/src/NoAccessNotice.mdx +40 -0
- package/src/NoAccessNotice.stories.tsx +17 -0
- package/src/NoAccessNotice.tsx +18 -0
- package/src/PartCard.test.tsx +2 -2
- package/src/PartCard.tsx +5 -4
- package/src/Toolbar.test.tsx +15 -0
- package/src/UnreadDot.mdx +3 -0
- package/src/editor.ts +1 -0
- package/src/index.ts +2 -0
- package/src/linked.ts +2 -2
- package/src/linkedFrom.test.tsx +4 -7
- package/src/linkedFrom.ts +0 -2
- package/src/registry/registry.test.ts +5 -4
- package/stories/Choosing.mdx +2 -0
package/dist/index.js
CHANGED
|
@@ -327,7 +327,7 @@ function TooltipTrigger({ label, shortcut, placement = "top", children }) {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
// src/IconButton.tsx
|
|
330
|
-
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
330
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
331
331
|
function IconButton({
|
|
332
332
|
variant = "muted",
|
|
333
333
|
pressed,
|
|
@@ -341,6 +341,7 @@ function IconButton({
|
|
|
341
341
|
tooltipPlacement,
|
|
342
342
|
type = "button",
|
|
343
343
|
href,
|
|
344
|
+
unread = false,
|
|
344
345
|
...props
|
|
345
346
|
}) {
|
|
346
347
|
const formBusy = useFormBusy();
|
|
@@ -375,6 +376,8 @@ function IconButton({
|
|
|
375
376
|
variant === "resolve" && "hover:bg-success-muted hover:text-success-default",
|
|
376
377
|
pressed && "bg-bg-active text-text-primary",
|
|
377
378
|
glow && "signal:shadow-glow-accent",
|
|
379
|
+
// The dot's box, before `className` so a button placed `absolute` stays where it was put.
|
|
380
|
+
unread && "relative",
|
|
378
381
|
// `pointer-events-none` only where the button is truly out of reach:
|
|
379
382
|
// with a `disabledReason` the button IS the tooltip's trigger, and a
|
|
380
383
|
// trigger the pointer cannot land on never opens one. Base UI already
|
|
@@ -383,7 +386,12 @@ function IconButton({
|
|
|
383
386
|
off && "cursor-not-allowed",
|
|
384
387
|
className
|
|
385
388
|
);
|
|
386
|
-
const
|
|
389
|
+
const name = unread && props["aria-label"] ? `${props["aria-label"]}, new` : props["aria-label"];
|
|
390
|
+
const dot = unread ? /* @__PURE__ */ jsx6("span", { "aria-hidden": true, className: "pointer-events-none absolute right-px top-px h-1.5 w-1.5 rounded-full bg-accent-primary", "data-unread-dot": true }) : null;
|
|
391
|
+
const button = href && !unusable ? /* @__PURE__ */ jsxs2("a", { href, className: look(false), ...anchor, "aria-label": name, onClick: inApp, children: [
|
|
392
|
+
children,
|
|
393
|
+
dot
|
|
394
|
+
] }) : /* @__PURE__ */ jsxs2(
|
|
387
395
|
BaseButton,
|
|
388
396
|
{
|
|
389
397
|
type,
|
|
@@ -392,7 +400,11 @@ function IconButton({
|
|
|
392
400
|
className: (state) => look(state.disabled),
|
|
393
401
|
"aria-pressed": pressed,
|
|
394
402
|
...props,
|
|
395
|
-
|
|
403
|
+
"aria-label": name,
|
|
404
|
+
children: [
|
|
405
|
+
children,
|
|
406
|
+
dot
|
|
407
|
+
]
|
|
396
408
|
}
|
|
397
409
|
);
|
|
398
410
|
const label = disabledReason ?? tooltip;
|
|
@@ -404,13 +416,13 @@ function IconButton({
|
|
|
404
416
|
|
|
405
417
|
// src/ScrollArea.tsx
|
|
406
418
|
import { ScrollArea as BaseScrollArea } from "@base-ui/react/scroll-area";
|
|
407
|
-
import { jsx as jsx7, jsxs as
|
|
419
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
408
420
|
var BAR = "z-10 flex touch-none select-none rounded-full opacity-0 transition-opacity delay-300 data-[hovering]:opacity-100 data-[hovering]:delay-0 data-[scrolling]:opacity-100 data-[scrolling]:delay-0";
|
|
409
421
|
var THUMB = "rounded-full bg-border-strong";
|
|
410
422
|
function ScrollArea({ orientation = "vertical", className, viewportClassName, contentClassName, viewportRef, onScroll, children }) {
|
|
411
423
|
const vertical = orientation !== "horizontal";
|
|
412
424
|
const horizontal = orientation !== "vertical";
|
|
413
|
-
return /* @__PURE__ */
|
|
425
|
+
return /* @__PURE__ */ jsxs3(BaseScrollArea.Root, { className: cn("relative min-h-0 min-w-0", className), children: [
|
|
414
426
|
/* @__PURE__ */ jsx7(
|
|
415
427
|
BaseScrollArea.Viewport,
|
|
416
428
|
{
|
|
@@ -463,7 +475,7 @@ function shortcutLabel(keys, apple = isApplePlatform()) {
|
|
|
463
475
|
}
|
|
464
476
|
|
|
465
477
|
// src/TopBar.tsx
|
|
466
|
-
import { jsx as jsx9, jsxs as
|
|
478
|
+
import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
467
479
|
function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceholder = "Search\u2026", right, className }) {
|
|
468
480
|
const floating = variant === "floating";
|
|
469
481
|
const searchRef = useRef(onSearch);
|
|
@@ -482,11 +494,11 @@ function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceho
|
|
|
482
494
|
window.addEventListener("keydown", onKey);
|
|
483
495
|
return () => window.removeEventListener("keydown", onKey);
|
|
484
496
|
}, [searches]);
|
|
485
|
-
const centre = search ?? (onSearch && /* @__PURE__ */
|
|
497
|
+
const centre = search ?? (onSearch && /* @__PURE__ */ jsxs4(BaseButton2, { type: "button", onMouseDown: (event) => event.preventDefault(), onClick: onSearch, className: cn("flex w-[290px] cursor-pointer items-center gap-2 px-3 py-2", FIELD_SHELL_CLASSES), children: [
|
|
486
498
|
/* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1 truncate text-left text-input-value text-text-muted", children: searchPlaceholder }),
|
|
487
499
|
/* @__PURE__ */ jsx9(Kbd, { children: shortcutLabel("Mod-K") })
|
|
488
500
|
] }));
|
|
489
|
-
return /* @__PURE__ */
|
|
501
|
+
return /* @__PURE__ */ jsxs4(
|
|
490
502
|
"header",
|
|
491
503
|
{
|
|
492
504
|
className: cn(
|
|
@@ -496,7 +508,7 @@ function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceho
|
|
|
496
508
|
className
|
|
497
509
|
),
|
|
498
510
|
children: [
|
|
499
|
-
(menu || logo) && /* @__PURE__ */
|
|
511
|
+
(menu || logo) && /* @__PURE__ */ jsxs4("div", { className: cn("flex shrink-0 items-center gap-2", floating && "pointer-events-auto"), children: [
|
|
500
512
|
menu,
|
|
501
513
|
logo && /* @__PURE__ */ jsx9("div", { className: "flex items-center text-body-2-strong text-text-primary", children: logo })
|
|
502
514
|
] }),
|
|
@@ -508,7 +520,7 @@ function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceho
|
|
|
508
520
|
}
|
|
509
521
|
|
|
510
522
|
// src/AppShell.tsx
|
|
511
|
-
import { Fragment, jsx as jsx10, jsxs as
|
|
523
|
+
import { Fragment, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
512
524
|
function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlaceholder, identity, banner, nav, navOpen = true, onNavOpenChange, children }) {
|
|
513
525
|
const fold = onNavOpenChange && /* @__PURE__ */ jsx10(
|
|
514
526
|
IconButton,
|
|
@@ -548,11 +560,11 @@ function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlace
|
|
|
548
560
|
// `signal-canvas`: in the Signal theme, the preset draws the control-room dot
|
|
549
561
|
// grid behind everything in the frame (Peek's, moved here with the frame:
|
|
550
562
|
// UIG-14, Katerina, 19 September — the canvas is the theme's, not an app's).
|
|
551
|
-
/* @__PURE__ */
|
|
563
|
+
/* @__PURE__ */ jsxs5("div", { className: "signal-canvas relative h-full min-h-0 overflow-hidden bg-bg-base", children: [
|
|
552
564
|
bar,
|
|
553
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex h-full pb-4 pr-4 pt-[52px]", children: [
|
|
554
566
|
folding,
|
|
555
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ jsxs5(
|
|
556
568
|
"div",
|
|
557
569
|
{
|
|
558
570
|
className: cn(
|
|
@@ -569,7 +581,7 @@ function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlace
|
|
|
569
581
|
] })
|
|
570
582
|
);
|
|
571
583
|
}
|
|
572
|
-
const column = /* @__PURE__ */
|
|
584
|
+
const column = /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
573
585
|
banner,
|
|
574
586
|
/* @__PURE__ */ jsx10(ScrollArea, { className: "min-h-0 flex-1", contentClassName: "flex min-h-full flex-col", children: /* @__PURE__ */ jsx10("main", { className: "flex min-w-0 flex-1 flex-col", children }) })
|
|
575
587
|
] });
|
|
@@ -583,9 +595,9 @@ function AppShell({ variant = "solid", menu, logo, search, onSearch, searchPlace
|
|
|
583
595
|
range — the whole page scrolls, navigation and top bar included.
|
|
584
596
|
`relative` claims such strays for the shell; `overflow-hidden` clips
|
|
585
597
|
them at its edge. Either alone seals nothing. */
|
|
586
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ jsxs5("div", { className: "relative flex h-full min-h-0 flex-col overflow-hidden bg-bg-base text-text-primary", children: [
|
|
587
599
|
bar,
|
|
588
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex min-h-0 flex-1", children: [
|
|
589
601
|
folding,
|
|
590
602
|
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 })
|
|
591
603
|
] })
|
|
@@ -661,7 +673,7 @@ import {
|
|
|
661
673
|
import { useRef as useRef2 } from "react";
|
|
662
674
|
import { Dialog } from "@base-ui/react/dialog";
|
|
663
675
|
import { IconX } from "@tabler/icons-react";
|
|
664
|
-
import { jsx as jsx11, jsxs as
|
|
676
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
665
677
|
function Lightbox({ src, alt, onClose, className }) {
|
|
666
678
|
const popupRef = useRef2(null);
|
|
667
679
|
return /* @__PURE__ */ jsx11(
|
|
@@ -671,9 +683,9 @@ function Lightbox({ src, alt, onClose, className }) {
|
|
|
671
683
|
onOpenChange: (open) => {
|
|
672
684
|
if (!open) onClose();
|
|
673
685
|
},
|
|
674
|
-
children: /* @__PURE__ */
|
|
686
|
+
children: /* @__PURE__ */ jsxs6(Dialog.Portal, { children: [
|
|
675
687
|
/* @__PURE__ */ jsx11(Dialog.Backdrop, { className: "fixed inset-0 z-40 bg-scrim-strong" }),
|
|
676
|
-
/* @__PURE__ */
|
|
688
|
+
/* @__PURE__ */ jsxs6(
|
|
677
689
|
Dialog.Popup,
|
|
678
690
|
{
|
|
679
691
|
ref: popupRef,
|
|
@@ -708,7 +720,7 @@ function Lightbox({ src, alt, onClose, className }) {
|
|
|
708
720
|
}
|
|
709
721
|
|
|
710
722
|
// src/AttachmentCard.tsx
|
|
711
|
-
import { Fragment as Fragment2, jsx as jsx12, jsxs as
|
|
723
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
712
724
|
var ICON_BY_EXTENSION = {
|
|
713
725
|
pdf: IconFileTypePdf,
|
|
714
726
|
doc: IconFileTypeDocx,
|
|
@@ -885,7 +897,7 @@ function AttachmentCard({
|
|
|
885
897
|
const warning = state === "warning";
|
|
886
898
|
return (
|
|
887
899
|
// @estiva-escape(no-restyled-part): a failed or warning file's strong hairline is AttachmentCard's own state; Card's attention hairlines are the soft ones (UIG-9, Katerina 17 September)
|
|
888
|
-
/* @__PURE__ */
|
|
900
|
+
/* @__PURE__ */ jsxs7(
|
|
889
901
|
Card,
|
|
890
902
|
{
|
|
891
903
|
fill: "elevated",
|
|
@@ -893,7 +905,7 @@ function AttachmentCard({
|
|
|
893
905
|
...props,
|
|
894
906
|
children: [
|
|
895
907
|
/* @__PURE__ */ jsx12("div", { className: cn(TILE_CLASSES, "overflow-hidden"), children: state === "uploading" ? /* @__PURE__ */ jsx12(IconLoader2, { size: 16, stroke: 1.5, className: "animate-spin" }) : failed ? /* @__PURE__ */ jsx12(IconAlertCircle, { size: 16, stroke: 1.5, className: "text-error-default" }) : warning ? /* @__PURE__ */ jsx12(IconAlertTriangle, { size: 16, stroke: 1.5, className: "text-warning-default" }) : image && src ? /* @__PURE__ */ jsx12("img", { src, alt: name, className: "size-full object-cover" }) : /* @__PURE__ */ jsx12("span", { className: "text-menu font-semibold", children: typeLabelOf(name) }) }),
|
|
896
|
-
/* @__PURE__ */
|
|
908
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-[1px] min-w-0", children: [
|
|
897
909
|
/* @__PURE__ */ jsx12(Truncating, { text: name, className: NAME_CLASSES, placement: onRemove ? "bottom" : void 0 }),
|
|
898
910
|
/* @__PURE__ */ jsx12(
|
|
899
911
|
Truncating,
|
|
@@ -941,9 +953,9 @@ function AttachmentCard({
|
|
|
941
953
|
// The ready picture's shell — its 112px area and the name row under it — so nothing below moves as it
|
|
942
954
|
// arrives (Peek OPT-10: a loading box 34px shorter than the card it became pushed the conversation).
|
|
943
955
|
// @estiva-escape(no-restyled-part): the loading pulse is AttachmentCard's own state; Card has no loading state (UIG-9, Katerina 17 September)
|
|
944
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ jsxs7(Card, { role: "status", fill: "inset", "aria-busy": "true", "aria-label": `Loading ${name}`, clip: true, className: cn("flex flex-col w-[180px] animate-pulse", className), ...props, children: [
|
|
945
957
|
/* @__PURE__ */ jsx12("div", { className: "w-full h-28" }),
|
|
946
|
-
/* @__PURE__ */
|
|
958
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-1 pl-2 pr-1 py-1 min-w-0", children: [
|
|
947
959
|
/* @__PURE__ */ jsx12(Truncating, { text: name, className: "flex-1 text-caption text-text-primary truncate", wrapperClassName: "flex-1" }),
|
|
948
960
|
downloadControl
|
|
949
961
|
] })
|
|
@@ -953,9 +965,9 @@ function AttachmentCard({
|
|
|
953
965
|
if (drawnState === "unreadable") {
|
|
954
966
|
return (
|
|
955
967
|
// @estiva-escape(no-restyled-part): a file that could not be read is faded as well as dashed, AttachmentCard's own state; Card has no faded state (UIG-9, Katerina 17 September)
|
|
956
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ jsxs7(Card, { fill: "inset", unreadable: true, className: cn("flex items-center gap-2 w-[240px] p-1.5 opacity-70", className), ...props, children: [
|
|
957
969
|
/* @__PURE__ */ jsx12("div", { className: TILE_CLASSES, children: /* @__PURE__ */ jsx12(TypeIcon, { name }) }),
|
|
958
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-[1px] min-w-0 text-left", children: [
|
|
959
971
|
/* @__PURE__ */ jsx12(Truncating, { text: name, className: NAME_CLASSES }),
|
|
960
972
|
/* @__PURE__ */ jsx12("span", { className: cn(NOTE_CLASSES, "text-text-secondary"), children: note ?? "Could not be loaded" })
|
|
961
973
|
] })
|
|
@@ -964,8 +976,8 @@ function AttachmentCard({
|
|
|
964
976
|
}
|
|
965
977
|
if (image && picture) {
|
|
966
978
|
const thumbnail = /* @__PURE__ */ jsx12("img", { src: picture, alt: alt ?? name, className: "w-full h-28 object-cover" });
|
|
967
|
-
return /* @__PURE__ */
|
|
968
|
-
/* @__PURE__ */
|
|
979
|
+
return /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
980
|
+
/* @__PURE__ */ jsxs7(Card, { fill: "inset", hover: "hairline", clip: true, className: cn("group relative flex flex-col w-[180px]", className), ...props, children: [
|
|
969
981
|
openPicture ? /* @__PURE__ */ jsx12(
|
|
970
982
|
BaseButton3,
|
|
971
983
|
{
|
|
@@ -979,7 +991,7 @@ function AttachmentCard({
|
|
|
979
991
|
children: thumbnail
|
|
980
992
|
}
|
|
981
993
|
) : /* @__PURE__ */ jsx12("div", { className: "block w-full", children: thumbnail }),
|
|
982
|
-
/* @__PURE__ */
|
|
994
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-1 pl-2 pr-1 py-1 min-w-0", children: [
|
|
983
995
|
/* @__PURE__ */ jsx12(Truncating, { text: name, className: "flex-1 text-caption text-text-primary truncate", wrapperClassName: "flex-1" }),
|
|
984
996
|
downloadControl
|
|
985
997
|
] })
|
|
@@ -987,16 +999,16 @@ function AttachmentCard({
|
|
|
987
999
|
viewer
|
|
988
1000
|
] });
|
|
989
1001
|
}
|
|
990
|
-
const body = /* @__PURE__ */
|
|
1002
|
+
const body = /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
991
1003
|
/* @__PURE__ */ jsx12("div", { className: TILE_CLASSES, children: /* @__PURE__ */ jsx12(TypeIcon, { name }) }),
|
|
992
|
-
/* @__PURE__ */
|
|
1004
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex flex-col gap-[1px] min-w-0 text-left", children: [
|
|
993
1005
|
/* @__PURE__ */ jsx12(Truncating, { text: name, className: NAME_CLASSES }),
|
|
994
1006
|
/* @__PURE__ */ jsx12("span", { className: cn(NOTE_CLASSES, "text-text-secondary"), children: note ?? `${typeLabelOf(name)} \xB7 ${sizeText}` })
|
|
995
1007
|
] })
|
|
996
1008
|
] });
|
|
997
1009
|
return (
|
|
998
1010
|
// @estiva-escape(no-restyled-part): a file that cannot be opened is faded, AttachmentCard's own state; Card has no faded state (UIG-9, Katerina 17 September)
|
|
999
|
-
/* @__PURE__ */
|
|
1011
|
+
/* @__PURE__ */ jsxs7(Card, { fill: "inset", hover: address ? "hairline" : "none", className: cn("group flex items-center gap-2 w-[240px] p-1.5 pr-1", !address && "opacity-70", className), ...props, children: [
|
|
1000
1012
|
address ? /* @__PURE__ */ jsx12(Link, { href: address, external: true, variant: "plain", className: "flex items-center gap-2 min-w-0 flex-1", onClick: (event) => event.stopPropagation(), children: body }) : /* @__PURE__ */ jsx12("div", { className: "flex items-center gap-2 min-w-0 flex-1", children: body }),
|
|
1001
1013
|
downloadControl
|
|
1002
1014
|
] })
|
|
@@ -1006,7 +1018,7 @@ function AttachmentCard({
|
|
|
1006
1018
|
// src/Avatar.tsx
|
|
1007
1019
|
import { Avatar as BaseAvatar } from "@base-ui/react/avatar";
|
|
1008
1020
|
import { IconUserFilled } from "@tabler/icons-react";
|
|
1009
|
-
import { jsx as jsx13, jsxs as
|
|
1021
|
+
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1010
1022
|
var HUES = ["#56c8ff", "#ff8f6b", "#4ade8c", "#b18cff", "#ffc94d", "#ff7eb0", "#7ea8ff", "#5fdfd6"];
|
|
1011
1023
|
var hueFor = (key) => {
|
|
1012
1024
|
let h = 0;
|
|
@@ -1043,7 +1055,7 @@ function Avatar({ src, name, alt = "", size = 36, label: spoken, bot = false, cl
|
|
|
1043
1055
|
const label = name || alt;
|
|
1044
1056
|
const pictureFor = usePictureFor();
|
|
1045
1057
|
const picture = src ?? (label && pictureFor ? pictureFor(label) ?? void 0 : void 0);
|
|
1046
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ jsxs8(
|
|
1047
1059
|
BaseAvatar.Root,
|
|
1048
1060
|
{
|
|
1049
1061
|
render: /* @__PURE__ */ jsx13("div", {}),
|
|
@@ -1111,7 +1123,7 @@ function AvatarGroup({ members, size = 24, on = "surface" }) {
|
|
|
1111
1123
|
|
|
1112
1124
|
// src/Button.tsx
|
|
1113
1125
|
import { Button as BaseButton4 } from "@base-ui/react/button";
|
|
1114
|
-
import { jsx as jsx15, jsxs as
|
|
1126
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1115
1127
|
function Button({
|
|
1116
1128
|
variant = "muted",
|
|
1117
1129
|
size = "default",
|
|
@@ -1166,10 +1178,10 @@ function Button({
|
|
|
1166
1178
|
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",
|
|
1167
1179
|
className
|
|
1168
1180
|
);
|
|
1169
|
-
const button = href && !unusable ? /* @__PURE__ */
|
|
1181
|
+
const button = href && !unusable ? /* @__PURE__ */ jsxs9("a", { href, ...external ? { target: "_blank", rel: "noopener noreferrer" } : {}, className: look(false), ...anchor, onClick: inApp, children: [
|
|
1170
1182
|
leadingIcon,
|
|
1171
1183
|
children
|
|
1172
|
-
] }) : /* @__PURE__ */
|
|
1184
|
+
] }) : /* @__PURE__ */ jsxs9(BaseButton4, { type, disabled: unusable, focusableWhenDisabled: !!disabledReason, className: (state) => look(state.disabled), ...props, children: [
|
|
1173
1185
|
leadingIcon,
|
|
1174
1186
|
children
|
|
1175
1187
|
] });
|
|
@@ -1177,11 +1189,11 @@ function Button({
|
|
|
1177
1189
|
}
|
|
1178
1190
|
|
|
1179
1191
|
// src/MembersPill.tsx
|
|
1180
|
-
import { jsx as jsx16, jsxs as
|
|
1192
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1181
1193
|
function MembersPill({ members, count, onClick, className }) {
|
|
1182
1194
|
const total = count ?? members.length;
|
|
1183
1195
|
if (total === 0) return null;
|
|
1184
|
-
return /* @__PURE__ */
|
|
1196
|
+
return /* @__PURE__ */ jsxs10(Button, { variant: "outlined", "aria-label": `${total} ${total === 1 ? "member" : "members"}`, disabled: !onClick, onClick, className: cn("gap-2 pl-[3px] pr-2", className), children: [
|
|
1185
1197
|
/* @__PURE__ */ jsx16(AvatarGroup, { members }),
|
|
1186
1198
|
/* @__PURE__ */ jsx16("span", { className: cn(MONO_CAPTION_CLASSES, "signal:tabular-nums"), children: total })
|
|
1187
1199
|
] });
|
|
@@ -1192,7 +1204,7 @@ import { useEffect as useEffect4, useRef as useRef7, useState as useState5 } fro
|
|
|
1192
1204
|
|
|
1193
1205
|
// src/EmptyState.tsx
|
|
1194
1206
|
import { IconMessage2 } from "@tabler/icons-react";
|
|
1195
|
-
import { jsx as jsx17, jsxs as
|
|
1207
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1196
1208
|
function EmptyState({ icon, message, scope = "page", action, className }) {
|
|
1197
1209
|
if (scope === "rows") {
|
|
1198
1210
|
return /* @__PURE__ */ jsx17("div", { className: cn("px-2 py-1", className), children: /* @__PURE__ */ jsx17("p", { className: "text-caption text-text-muted", children: message }) });
|
|
@@ -1200,12 +1212,12 @@ function EmptyState({ icon, message, scope = "page", action, className }) {
|
|
|
1200
1212
|
if (scope === "section") {
|
|
1201
1213
|
const line = /* @__PURE__ */ jsx17("p", { className: cn("text-caption text-text-muted", !action && className), children: message });
|
|
1202
1214
|
if (!action) return line;
|
|
1203
|
-
return /* @__PURE__ */
|
|
1215
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn("flex items-center justify-between gap-2", className), children: [
|
|
1204
1216
|
line,
|
|
1205
1217
|
/* @__PURE__ */ jsx17(Button, { variant: "muted", onClick: action.onClick, children: action.label })
|
|
1206
1218
|
] });
|
|
1207
1219
|
}
|
|
1208
|
-
return /* @__PURE__ */
|
|
1220
|
+
return /* @__PURE__ */ jsxs11("div", { className: cn("flex flex-1 flex-col items-center justify-center gap-2", className), children: [
|
|
1209
1221
|
/* @__PURE__ */ jsx17("span", { className: "text-text-secondary", children: icon ?? /* @__PURE__ */ jsx17(IconMessage2, { size: 16, stroke: 1.5 }) }),
|
|
1210
1222
|
/* @__PURE__ */ jsx17("p", { className: "text-body-2 text-text-secondary text-center", children: message }),
|
|
1211
1223
|
action && /* @__PURE__ */ jsx17(Button, { variant: "outlined", className: "mt-2", onClick: action.onClick, children: action.label })
|
|
@@ -1215,7 +1227,7 @@ function EmptyState({ icon, message, scope = "page", action, className }) {
|
|
|
1215
1227
|
// src/Field.tsx
|
|
1216
1228
|
import { cloneElement, isValidElement } from "react";
|
|
1217
1229
|
import { Field as BaseField } from "@base-ui/react/field";
|
|
1218
|
-
import { jsx as jsx18, jsxs as
|
|
1230
|
+
import { jsx as jsx18, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1219
1231
|
var LINE_STYLES = {
|
|
1220
1232
|
helper: "text-caption text-text-muted",
|
|
1221
1233
|
warning: "text-caption text-warning-default",
|
|
@@ -1229,12 +1241,12 @@ function Field({ label, required = false, helper, error, children }) {
|
|
|
1229
1241
|
// `group/field`: the label, the box and the line under it are one thing under the pointer —
|
|
1230
1242
|
// anywhere in it strengthens the box's border, as hovering the box does (Katerina, 28 September).
|
|
1231
1243
|
// Before, the 8px between the label and the box was a gap where the border went out again.
|
|
1232
|
-
/* @__PURE__ */
|
|
1233
|
-
/* @__PURE__ */
|
|
1244
|
+
/* @__PURE__ */ jsxs12(BaseField.Root, { invalid: !!error, className: "group/field flex flex-col gap-2", children: [
|
|
1245
|
+
/* @__PURE__ */ jsxs12(BaseField.Label, { className: cn("text-input-label text-text-primary", required && "flex items-center"), children: [
|
|
1234
1246
|
label,
|
|
1235
1247
|
required && /* @__PURE__ */ jsx18("span", { "aria-hidden": "true", className: "text-error-default ml-0.5", children: "*" })
|
|
1236
1248
|
] }),
|
|
1237
|
-
/* @__PURE__ */
|
|
1249
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col gap-1.5", children: [
|
|
1238
1250
|
control,
|
|
1239
1251
|
error != null ? /* @__PURE__ */ jsx18(BaseField.Error, { match: true, className: LINE_STYLES.error, children: error }) : helper != null ? /* @__PURE__ */ jsx18(BaseField.Description, { className: LINE_STYLES.helper, children: helper }) : null
|
|
1240
1252
|
] })
|
|
@@ -1297,7 +1309,7 @@ function SectionLabel({
|
|
|
1297
1309
|
}
|
|
1298
1310
|
|
|
1299
1311
|
// src/Divider.tsx
|
|
1300
|
-
import { jsx as jsx20, jsxs as
|
|
1312
|
+
import { jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1301
1313
|
var DividerInPanel = createContext4(false);
|
|
1302
1314
|
function Divider({ orientation = "horizontal", label, tone = "default", look = "caption", sticky = false, className }) {
|
|
1303
1315
|
const inset = useContext4(DividerInPanel) ? "mx-0" : "mx-3";
|
|
@@ -1308,13 +1320,13 @@ function Divider({ orientation = "horizontal", label, tone = "default", look = "
|
|
|
1308
1320
|
const id = typeof label === "string" ? void 0 : labelId;
|
|
1309
1321
|
const stays = sticky && "sticky top-0 z-10 bg-bg-surface";
|
|
1310
1322
|
if (look === "section") {
|
|
1311
|
-
return /* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ jsxs13(Separator, { orientation: "horizontal", ...named2, className: cn("flex shrink-0 items-center gap-2 px-2 py-1.5", stays, className), children: [
|
|
1312
1324
|
/* @__PURE__ */ jsx20("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border-subtle" }),
|
|
1313
1325
|
/* @__PURE__ */ jsx20("span", { id, className: "flex min-w-0", children: /* @__PURE__ */ jsx20(SectionLabel, { tone: "muted", truncate: true, children: label }) }),
|
|
1314
1326
|
/* @__PURE__ */ jsx20("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border-subtle" })
|
|
1315
1327
|
] });
|
|
1316
1328
|
}
|
|
1317
|
-
return /* @__PURE__ */
|
|
1329
|
+
return /* @__PURE__ */ jsxs13(
|
|
1318
1330
|
Separator,
|
|
1319
1331
|
{
|
|
1320
1332
|
orientation: "horizontal",
|
|
@@ -1344,7 +1356,7 @@ function triggerDisabled(trigger) {
|
|
|
1344
1356
|
}
|
|
1345
1357
|
|
|
1346
1358
|
// src/Menu.tsx
|
|
1347
|
-
import { Fragment as Fragment3, jsx as jsx21, jsxs as
|
|
1359
|
+
import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1348
1360
|
var MenuContext = createContext5(null);
|
|
1349
1361
|
function MenuPanel({ children, className, ...props }) {
|
|
1350
1362
|
return /* @__PURE__ */ jsx21(
|
|
@@ -1379,7 +1391,7 @@ var VIEWPORT_PAD2 = 8;
|
|
|
1379
1391
|
var HOVER_OPEN_DELAY = 0;
|
|
1380
1392
|
var HOVER_CLOSE_DELAY = 150;
|
|
1381
1393
|
function Menu({ trigger, align = "left", openOnHover = false, open, onOpenChange, actionsRef, children, className, contentClassName }) {
|
|
1382
|
-
return /* @__PURE__ */
|
|
1394
|
+
return /* @__PURE__ */ jsxs14(
|
|
1383
1395
|
BaseMenu.Root,
|
|
1384
1396
|
{
|
|
1385
1397
|
open,
|
|
@@ -1427,7 +1439,7 @@ function MenuSub({ label, leading, selected, children, className }) {
|
|
|
1427
1439
|
'[@estiva-app/ui] Menu: `openOnHover` and `MenuSub` cannot be used together \u2014 leaving the submenu panel strands the menu open. Open this menu on a press instead. See Menu.mdx, "Hover-opened menus".'
|
|
1428
1440
|
);
|
|
1429
1441
|
}
|
|
1430
|
-
return /* @__PURE__ */
|
|
1442
|
+
return /* @__PURE__ */ jsxs14(BaseMenu.SubmenuRoot, { children: [
|
|
1431
1443
|
/* @__PURE__ */ jsx21(
|
|
1432
1444
|
BaseMenu.SubmenuTrigger,
|
|
1433
1445
|
{
|
|
@@ -1490,10 +1502,10 @@ function menuItemClassName({ size, selected, shut = false, className }) {
|
|
|
1490
1502
|
function MenuItemBody({ label, children, size = "default", description, aside, leading, trailing, hint, shortcut, submenu, destructive, selected, shut = false }) {
|
|
1491
1503
|
const labelColour = shut ? "text-text-disabled" : destructive ? "text-error-default" : "text-text-primary";
|
|
1492
1504
|
const edge = trailing ?? (shortcut ? /* @__PURE__ */ jsx21(Kbd, { children: shortcut }) : submenu ? /* @__PURE__ */ jsx21(IconChevronRight, { size: 16, stroke: 1.5, className: "shrink-0 text-text-muted" }) : null);
|
|
1493
|
-
return /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsxs14(Fragment3, { children: [
|
|
1494
1506
|
leading && /* @__PURE__ */ jsx21("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
1495
|
-
children ?? /* @__PURE__ */
|
|
1496
|
-
aside ? /* @__PURE__ */
|
|
1507
|
+
children ?? /* @__PURE__ */ jsxs14("span", { className: cn("flex min-w-0 flex-1 flex-col", size === "tall" && "gap-[2px]"), children: [
|
|
1508
|
+
aside ? /* @__PURE__ */ jsxs14("span", { className: "flex min-w-0 items-baseline gap-2", children: [
|
|
1497
1509
|
/* @__PURE__ */ jsx21("span", { className: cn("truncate text-body-2", labelColour), children: label }),
|
|
1498
1510
|
/* @__PURE__ */ jsx21("span", { className: cn("shrink-0 text-caption", shut ? "text-text-disabled" : "text-text-muted"), children: aside })
|
|
1499
1511
|
] }) : /* @__PURE__ */ jsx21("span", { className: cn("truncate text-body-2", labelColour), children: label }),
|
|
@@ -1503,7 +1515,7 @@ function MenuItemBody({ label, children, size = "default", description, aside, l
|
|
|
1503
1515
|
// the wider of the two and never changes, so revealing the hint moves
|
|
1504
1516
|
// nothing. No transition here either — the hint switches on the same
|
|
1505
1517
|
// :hover / `selected` as the fill, in the same frame.
|
|
1506
|
-
/* @__PURE__ */
|
|
1518
|
+
/* @__PURE__ */ jsxs14("span", { className: "grid shrink-0 items-center justify-items-end [&>*]:col-start-1 [&>*]:row-start-1", children: [
|
|
1507
1519
|
edge && /* @__PURE__ */ jsx21("span", { className: cn("flex items-center", hint && "group-hover:opacity-0 group-data-[highlighted]:opacity-0", hint && selected && "opacity-0"), children: edge }),
|
|
1508
1520
|
hint && /* @__PURE__ */ jsx21("span", { className: cn("flex items-center opacity-0 group-hover:opacity-100 group-data-[highlighted]:opacity-100", selected && "opacity-100"), children: hint })
|
|
1509
1521
|
] })
|
|
@@ -1551,7 +1563,7 @@ function MenuItem({ label, children, size = "default", description, aside, leadi
|
|
|
1551
1563
|
);
|
|
1552
1564
|
}
|
|
1553
1565
|
function EnterHint({ target }) {
|
|
1554
|
-
return /* @__PURE__ */
|
|
1566
|
+
return /* @__PURE__ */ jsxs14("span", { className: "flex shrink-0 items-center gap-1.5 text-text-muted", children: [
|
|
1555
1567
|
/* @__PURE__ */ jsx21(Kbd, { children: "\u21A9 Enter" }),
|
|
1556
1568
|
target && /* @__PURE__ */ jsx21("span", { className: "text-menu signal:font-mono signal:text-small signal:tracking-wider leaf:font-mono leaf:text-small leaf:tracking-wider", children: target })
|
|
1557
1569
|
] });
|
|
@@ -1560,12 +1572,12 @@ function MenuSection({ label, children, className }) {
|
|
|
1560
1572
|
const inMenu = useContext5(MenuContext) !== null;
|
|
1561
1573
|
const heading = /* @__PURE__ */ jsx21("div", { className: cn("flex h-8 items-center px-2", className), children: /* @__PURE__ */ jsx21(SectionLabel, { tone: "secondary", children: label }) });
|
|
1562
1574
|
if (!inMenu) {
|
|
1563
|
-
return /* @__PURE__ */
|
|
1575
|
+
return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-0.5", children: [
|
|
1564
1576
|
heading,
|
|
1565
1577
|
children
|
|
1566
1578
|
] });
|
|
1567
1579
|
}
|
|
1568
|
-
return /* @__PURE__ */
|
|
1580
|
+
return /* @__PURE__ */ jsxs14(BaseMenu.Group, { className: "flex flex-col gap-0.5", children: [
|
|
1569
1581
|
/* @__PURE__ */ jsx21(BaseMenu.GroupLabel, { render: heading }),
|
|
1570
1582
|
children
|
|
1571
1583
|
] });
|
|
@@ -1578,10 +1590,10 @@ function MenuRow({ children, className }) {
|
|
|
1578
1590
|
}
|
|
1579
1591
|
|
|
1580
1592
|
// src/ContainerHeader.tsx
|
|
1581
|
-
import { jsx as jsx22, jsxs as
|
|
1593
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1582
1594
|
function ContainerHeader({ title, chevron = false, titleMenu, actions, className }) {
|
|
1583
1595
|
const text = typeof title === "string";
|
|
1584
|
-
const name = /* @__PURE__ */
|
|
1596
|
+
const name = /* @__PURE__ */ jsxs15("div", { className: cn("flex items-center gap-1", text ? "shrink-0" : "min-w-0 flex-1"), children: [
|
|
1585
1597
|
text ? /* @__PURE__ */ jsx22("span", { className: "whitespace-nowrap text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx22("div", { className: "min-w-0 flex-1", children: title }),
|
|
1586
1598
|
(chevron || titleMenu != null) && /* @__PURE__ */ jsx22(IconChevronDown, { size: 12, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
1587
1599
|
] });
|
|
@@ -1591,7 +1603,7 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1591
1603
|
// (pl-2.5 + the button's px-1.5 = pl-4): the words stay where a title's
|
|
1592
1604
|
// are, and the fill is inside the bar — a negative margin had it clipped
|
|
1593
1605
|
// (Katerina, 5 October).
|
|
1594
|
-
/* @__PURE__ */
|
|
1606
|
+
/* @__PURE__ */ jsxs15("div", { className: cn("flex h-12 shrink-0 items-center justify-between overflow-hidden border-b border-border-subtle py-2 pr-4", titleMenu != null ? "pl-2.5" : "pl-4", className), children: [
|
|
1595
1607
|
/* @__PURE__ */ jsx22("div", { className: cn("flex items-center gap-2 overflow-hidden", text ? "shrink-0" : "min-w-0 flex-1"), children: titleMenu != null ? /* @__PURE__ */ jsx22(
|
|
1596
1608
|
Menu,
|
|
1597
1609
|
{
|
|
@@ -1605,7 +1617,7 @@ function ContainerHeader({ title, chevron = false, titleMenu, actions, className
|
|
|
1605
1617
|
}
|
|
1606
1618
|
|
|
1607
1619
|
// src/DialogShell.tsx
|
|
1608
|
-
import { jsx as jsx23, jsxs as
|
|
1620
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1609
1621
|
function DialogShell({ title, onClose, headerContent, footer, children, bodyClassName, bodyMaxHeight, width = 502, alert = false }) {
|
|
1610
1622
|
const Parts = alert ? AlertDialog : Dialog2;
|
|
1611
1623
|
const popupRef = useRef4(null);
|
|
@@ -1616,9 +1628,9 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
1616
1628
|
onOpenChange: (open) => {
|
|
1617
1629
|
if (!open) onClose();
|
|
1618
1630
|
},
|
|
1619
|
-
children: /* @__PURE__ */
|
|
1631
|
+
children: /* @__PURE__ */ jsxs16(Parts.Portal, { children: [
|
|
1620
1632
|
/* @__PURE__ */ jsx23(Parts.Backdrop, { className: "fixed inset-0 z-40 bg-scrim" }),
|
|
1621
|
-
/* @__PURE__ */ jsx23("div", { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */
|
|
1633
|
+
/* @__PURE__ */ jsx23("div", { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxs16(
|
|
1622
1634
|
Parts.Popup,
|
|
1623
1635
|
{
|
|
1624
1636
|
ref: popupRef,
|
|
@@ -1760,7 +1772,7 @@ function Form({ onSubmit, busy: ownBusy = false, enterSends = true, layout = "fi
|
|
|
1760
1772
|
}
|
|
1761
1773
|
|
|
1762
1774
|
// src/FormDialog.tsx
|
|
1763
|
-
import { Fragment as Fragment4, jsx as jsx25, jsxs as
|
|
1775
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1764
1776
|
function FormDialog({ title, submitLabel, busyLabel, submitVariant = "primary", ready = true, onSubmit, onClose, children }) {
|
|
1765
1777
|
const [busy, setBusy] = useState3(false);
|
|
1766
1778
|
const sending = useRef6(false);
|
|
@@ -1791,7 +1803,7 @@ function FormDialog({ title, submitLabel, busyLabel, submitVariant = "primary",
|
|
|
1791
1803
|
{
|
|
1792
1804
|
title,
|
|
1793
1805
|
onClose: close,
|
|
1794
|
-
footer: /* @__PURE__ */
|
|
1806
|
+
footer: /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
|
1795
1807
|
/* @__PURE__ */ jsx25(Button, { variant: "muted", onClick: close, disabled: busy, children: "Cancel" }),
|
|
1796
1808
|
/* @__PURE__ */ jsx25(Button, { variant: submitVariant, type: "submit", form: formId, disabled: !ready || busy, children: busy && busyLabel ? busyLabel : submitLabel })
|
|
1797
1809
|
] }),
|
|
@@ -1804,7 +1816,7 @@ function FormDialog({ title, submitLabel, busyLabel, submitVariant = "primary",
|
|
|
1804
1816
|
import { IconCheck, IconChevronDown as IconChevronDown2 } from "@tabler/icons-react";
|
|
1805
1817
|
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
1806
1818
|
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
1807
|
-
import { jsx as jsx26, jsxs as
|
|
1819
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1808
1820
|
var GAP3 = 4;
|
|
1809
1821
|
var VIEWPORT_PAD3 = 8;
|
|
1810
1822
|
function Select({ value, onChange, options, size = "default", fill = "field", ariaLabel, placeholder = "Select\u2026", disabled, disabledReason, className, ...aria }) {
|
|
@@ -1816,7 +1828,7 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1816
1828
|
}, [held]);
|
|
1817
1829
|
const trigger = (
|
|
1818
1830
|
// @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
|
|
1819
|
-
/* @__PURE__ */
|
|
1831
|
+
/* @__PURE__ */ jsxs18(
|
|
1820
1832
|
BaseSelect.Trigger,
|
|
1821
1833
|
{
|
|
1822
1834
|
"aria-label": ariaLabel,
|
|
@@ -1851,7 +1863,7 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1851
1863
|
className
|
|
1852
1864
|
),
|
|
1853
1865
|
children: [
|
|
1854
|
-
/* @__PURE__ */
|
|
1866
|
+
/* @__PURE__ */ jsxs18("span", { className: cn("flex min-w-0 items-center gap-2", !selected && "text-text-muted"), children: [
|
|
1855
1867
|
selected?.leading && /* @__PURE__ */ jsx26("span", { className: "flex shrink-0 items-center", children: selected.leading }),
|
|
1856
1868
|
/* @__PURE__ */ jsx26(BaseSelect.Value, { className: "truncate", children: () => selected?.label ?? placeholder })
|
|
1857
1869
|
] }),
|
|
@@ -1865,7 +1877,7 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1865
1877
|
}
|
|
1866
1878
|
)
|
|
1867
1879
|
);
|
|
1868
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsxs18(
|
|
1869
1881
|
BaseSelect.Root,
|
|
1870
1882
|
{
|
|
1871
1883
|
value,
|
|
@@ -1894,13 +1906,13 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1894
1906
|
{
|
|
1895
1907
|
render: /* @__PURE__ */ jsx26(MenuPanel, {}),
|
|
1896
1908
|
className: "min-w-[var(--anchor-width)] p-0",
|
|
1897
|
-
children: /* @__PURE__ */ jsx26(ScrollArea, { viewportClassName: "max-h-[min(288px,var(--available-height))]", contentClassName: "flex flex-col gap-0.5 p-2", children: options.map((option) => /* @__PURE__ */
|
|
1909
|
+
children: /* @__PURE__ */ jsx26(ScrollArea, { viewportClassName: "max-h-[min(288px,var(--available-height))]", contentClassName: "flex flex-col gap-0.5 p-2", children: options.map((option) => /* @__PURE__ */ jsxs18(
|
|
1898
1910
|
BaseSelect.Item,
|
|
1899
1911
|
{
|
|
1900
1912
|
value: option.value,
|
|
1901
1913
|
className: cn(menuItemClassName({ size: "default" }), "justify-between data-[selected]:font-medium"),
|
|
1902
1914
|
children: [
|
|
1903
|
-
/* @__PURE__ */
|
|
1915
|
+
/* @__PURE__ */ jsxs18("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
1904
1916
|
option.leading && /* @__PURE__ */ jsx26("span", { className: "flex shrink-0 items-center", children: option.leading }),
|
|
1905
1917
|
/* @__PURE__ */ jsx26(BaseSelect.ItemText, { className: "truncate text-body-2 text-text-primary", children: option.label })
|
|
1906
1918
|
] }),
|
|
@@ -1924,7 +1936,7 @@ function Select({ value, onChange, options, size = "default", fill = "field", ar
|
|
|
1924
1936
|
}
|
|
1925
1937
|
|
|
1926
1938
|
// src/MoveDialog.tsx
|
|
1927
|
-
import { Fragment as Fragment5, jsx as jsx27, jsxs as
|
|
1939
|
+
import { Fragment as Fragment5, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1928
1940
|
var TOP = "__top__";
|
|
1929
1941
|
function MoveDialog({
|
|
1930
1942
|
title,
|
|
@@ -1986,8 +1998,8 @@ function MoveDialog({
|
|
|
1986
1998
|
ready,
|
|
1987
1999
|
onSubmit: () => onMove(nests ? { folder, parent: parent === TOP ? "" : parent } : { folder }),
|
|
1988
2000
|
onClose,
|
|
1989
|
-
children: destinations?.length === 0 ? /* @__PURE__ */ jsx27(EmptyState, { scope: "section", message: noFolder }) : /* @__PURE__ */
|
|
1990
|
-
/* @__PURE__ */
|
|
2001
|
+
children: destinations?.length === 0 ? /* @__PURE__ */ jsx27(EmptyState, { scope: "section", message: noFolder }) : /* @__PURE__ */ jsxs19(Fragment5, { children: [
|
|
2002
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-2", children: [
|
|
1991
2003
|
/* @__PURE__ */ jsx27("p", { className: "text-body-2-strong text-text-primary", children: title }),
|
|
1992
2004
|
/* @__PURE__ */ jsx27("p", { className: "text-body-2 text-text-secondary", children: description })
|
|
1993
2005
|
] }),
|
|
@@ -2025,7 +2037,7 @@ import { useId as useId3, useState as useState7 } from "react";
|
|
|
2025
2037
|
import { IconArrowLeft, IconUserMinus, IconUserPlus } from "@tabler/icons-react";
|
|
2026
2038
|
|
|
2027
2039
|
// src/Chip.tsx
|
|
2028
|
-
import { Fragment as Fragment6, jsx as jsx28, jsxs as
|
|
2040
|
+
import { Fragment as Fragment6, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2029
2041
|
var typeStyles = {
|
|
2030
2042
|
neutral: "bg-bg-inset text-text-primary",
|
|
2031
2043
|
brand: "bg-accent-muted text-accent-text signal:border signal:border-accent-outline",
|
|
@@ -2037,7 +2049,7 @@ var typeStyles = {
|
|
|
2037
2049
|
function Chip({ type = "neutral", label, leadingIcon, trailingIcon, href, onClick, className }) {
|
|
2038
2050
|
const inApp = useInAppClick(href, onClick);
|
|
2039
2051
|
const classes = cn("inline-flex min-w-0 items-center justify-center gap-1.5 rounded-full max-h-[20px] px-2 py-1", typeStyles[type], className);
|
|
2040
|
-
const inside = /* @__PURE__ */
|
|
2052
|
+
const inside = /* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
2041
2053
|
leadingIcon && /* @__PURE__ */ jsx28("span", { className: "flex size-3 shrink-0 items-center justify-center", children: leadingIcon }),
|
|
2042
2054
|
label && // A chip given a `max-w-*` cuts a long label with an ellipsis instead
|
|
2043
2055
|
// of growing past it — Ship's project chip on an issue row
|
|
@@ -2059,7 +2071,7 @@ import { useMemo as useMemo2, useState as useState6 } from "react";
|
|
|
2059
2071
|
import { Button as BaseButton6 } from "@base-ui/react/button";
|
|
2060
2072
|
import { Combobox } from "@base-ui/react/combobox";
|
|
2061
2073
|
import { IconX as IconX4 } from "@tabler/icons-react";
|
|
2062
|
-
import { jsx as jsx29, jsxs as
|
|
2074
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2063
2075
|
var CHIP_BOX = (
|
|
2064
2076
|
// Curved, not a pill (Katerina, 2026-09-01): the Avatar keeps its own
|
|
2065
2077
|
// rounded-sm corners — never a forced circle — and the chip's corner
|
|
@@ -2070,7 +2082,7 @@ var CHIP_LABEL = "text-caption font-medium text-text-primary";
|
|
|
2070
2082
|
var CHIP_REMOVE = "size-4 flex items-center justify-center rounded-full hover:bg-bg-hover text-text-secondary";
|
|
2071
2083
|
var chipPadding = (leading, removable) => cn(leading ? "pl-[2px]" : "pl-2", removable ? "pr-1" : "pr-2");
|
|
2072
2084
|
function InputChip({ label, leading, onRemove, removeLabel, truncate, className }) {
|
|
2073
|
-
return /* @__PURE__ */
|
|
2085
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn(CHIP_BOX, chipPadding(!!leading, !!onRemove), className), children: [
|
|
2074
2086
|
leading && /* @__PURE__ */ jsx29("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
2075
2087
|
/* @__PURE__ */ jsx29("span", { className: cn(CHIP_LABEL, truncate && "min-w-0 truncate"), children: label }),
|
|
2076
2088
|
onRemove && /* @__PURE__ */ jsx29(
|
|
@@ -2137,7 +2149,7 @@ function ChipInput({
|
|
|
2137
2149
|
setQuery("");
|
|
2138
2150
|
}
|
|
2139
2151
|
}
|
|
2140
|
-
return /* @__PURE__ */
|
|
2152
|
+
return /* @__PURE__ */ jsxs21(
|
|
2141
2153
|
Combobox.Root,
|
|
2142
2154
|
{
|
|
2143
2155
|
multiple: true,
|
|
@@ -2154,8 +2166,8 @@ function ChipInput({
|
|
|
2154
2166
|
filter,
|
|
2155
2167
|
itemToStringLabel: (option) => option.label,
|
|
2156
2168
|
children: [
|
|
2157
|
-
/* @__PURE__ */
|
|
2158
|
-
value.map((option) => /* @__PURE__ */
|
|
2169
|
+
/* @__PURE__ */ jsxs21(Combobox.Chips, { ref: setBox, className: cn(FIELD_SHELL_CLASSES, FIELD_SHELL_FOCUS_CLASSES, "px-3 py-1.5 flex flex-wrap items-center gap-1.5 min-h-[38px] cursor-text"), children: [
|
|
2170
|
+
value.map((option) => /* @__PURE__ */ jsxs21(Combobox.Chip, { className: cn(CHIP_BOX, chipPadding(!!chipLeading, true)), children: [
|
|
2159
2171
|
chipLeading && /* @__PURE__ */ jsx29("span", { className: "flex shrink-0 items-center", children: chipLeading(option) }),
|
|
2160
2172
|
/* @__PURE__ */ jsx29("span", { className: CHIP_LABEL, children: option.label }),
|
|
2161
2173
|
/* @__PURE__ */ jsx29(Combobox.ChipRemove, { className: CHIP_REMOVE, "aria-label": `Remove ${option.label}`, children: /* @__PURE__ */ jsx29(IconX4, { size: 10, stroke: 1.5 }) })
|
|
@@ -2205,7 +2217,7 @@ var GAP4 = 4;
|
|
|
2205
2217
|
var VIEWPORT_PAD4 = 8;
|
|
2206
2218
|
|
|
2207
2219
|
// src/MembersDialog.tsx
|
|
2208
|
-
import { Fragment as Fragment7, jsx as jsx30, jsxs as
|
|
2220
|
+
import { Fragment as Fragment7, jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2209
2221
|
var LEADING_CLASSES = "size-8 rounded-md bg-accent-muted flex items-center justify-center shrink-0 text-accent-text";
|
|
2210
2222
|
function MembersDialog({ members, count, self, candidates = [], onAdd, note, initialView = "list", onClose }) {
|
|
2211
2223
|
const [view, setView] = useState7(onAdd ? initialView : "list");
|
|
@@ -2236,12 +2248,12 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2236
2248
|
{
|
|
2237
2249
|
title: "Add members",
|
|
2238
2250
|
onClose,
|
|
2239
|
-
headerContent: /* @__PURE__ */
|
|
2251
|
+
headerContent: /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2240
2252
|
/* @__PURE__ */ jsx30(IconButton, { tooltip: "Back to members", "aria-label": "Back to members", className: "-ml-2", onClick: () => setView("list"), children: /* @__PURE__ */ jsx30(IconArrowLeft, { size: 16, stroke: 1.5 }) }),
|
|
2241
2253
|
/* @__PURE__ */ jsx30("span", { className: "truncate text-h4 text-text-primary", children: "Add members" })
|
|
2242
2254
|
] }),
|
|
2243
2255
|
bodyClassName: "flex flex-col gap-6",
|
|
2244
|
-
footer: /* @__PURE__ */
|
|
2256
|
+
footer: /* @__PURE__ */ jsxs22(Fragment7, { children: [
|
|
2245
2257
|
/* @__PURE__ */ jsx30(Button, { variant: "muted", onClick: onClose, children: "Cancel" }),
|
|
2246
2258
|
/* @__PURE__ */ jsx30(Button, { variant: "primary", type: "submit", form: formId, disabled: chosen.length === 0, children: "Invite" })
|
|
2247
2259
|
] }),
|
|
@@ -2261,19 +2273,19 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2261
2273
|
}
|
|
2262
2274
|
);
|
|
2263
2275
|
}
|
|
2264
|
-
return /* @__PURE__ */
|
|
2276
|
+
return /* @__PURE__ */ jsxs22(
|
|
2265
2277
|
DialogShell,
|
|
2266
2278
|
{
|
|
2267
2279
|
title: "Members",
|
|
2268
2280
|
onClose,
|
|
2269
|
-
headerContent: /* @__PURE__ */
|
|
2281
|
+
headerContent: /* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2270
2282
|
/* @__PURE__ */ jsx30("span", { className: "truncate text-h4 text-text-primary", children: "Members" }),
|
|
2271
2283
|
/* @__PURE__ */ jsx30(Chip, { label: String(count ?? members.length) })
|
|
2272
2284
|
] }),
|
|
2273
2285
|
bodyMaxHeight: "max-h-[400px]",
|
|
2274
2286
|
bodyClassName: "p-0 py-2",
|
|
2275
2287
|
children: [
|
|
2276
|
-
(selfOnTop || onAdd) && /* @__PURE__ */
|
|
2288
|
+
(selfOnTop || onAdd) && /* @__PURE__ */ jsxs22("div", { className: "flex flex-col px-2", children: [
|
|
2277
2289
|
selfOnTop && /* @__PURE__ */ jsx30(
|
|
2278
2290
|
MenuItem,
|
|
2279
2291
|
{
|
|
@@ -2296,9 +2308,9 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2296
2308
|
}
|
|
2297
2309
|
)
|
|
2298
2310
|
] }),
|
|
2299
|
-
roster.map((member) => /* @__PURE__ */
|
|
2311
|
+
roster.map((member) => /* @__PURE__ */ jsxs22("div", { className: "flex h-12 items-center gap-3 px-5", children: [
|
|
2300
2312
|
/* @__PURE__ */ jsx30(Avatar, { size: 32, name: member.name, src: member.picture, bot: member.bot }),
|
|
2301
|
-
/* @__PURE__ */
|
|
2313
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-1 flex-col justify-center gap-[2px]", children: [
|
|
2302
2314
|
/* @__PURE__ */ jsx30("div", { className: "truncate text-body-2 text-text-primary", children: member.name }),
|
|
2303
2315
|
member.caption && /* @__PURE__ */ jsx30("div", { className: "truncate text-caption text-text-secondary", children: member.caption })
|
|
2304
2316
|
] }),
|
|
@@ -2312,7 +2324,7 @@ function MembersDialog({ members, count, self, candidates = [], onAdd, note, ini
|
|
|
2312
2324
|
|
|
2313
2325
|
// src/Banner.tsx
|
|
2314
2326
|
import { IconX as IconX5 } from "@tabler/icons-react";
|
|
2315
|
-
import { jsx as jsx31, jsxs as
|
|
2327
|
+
import { jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2316
2328
|
var TONE_STYLES = {
|
|
2317
2329
|
ok: "bg-success-muted text-success-default",
|
|
2318
2330
|
error: "bg-error-muted text-error-default",
|
|
@@ -2325,7 +2337,7 @@ function Banner({ tone, children, icon, action, onDismiss, dismissLabel = "Dismi
|
|
|
2325
2337
|
return /* @__PURE__ */ jsx31("div", { role, className: cn("px-4 py-2 text-body-2", TONE_STYLES[tone], className), children });
|
|
2326
2338
|
}
|
|
2327
2339
|
const oneLine = Boolean(icon || action);
|
|
2328
|
-
return /* @__PURE__ */
|
|
2340
|
+
return /* @__PURE__ */ jsxs23("div", { role, className: cn("flex items-center gap-3 px-4 py-2 text-body-2", TONE_STYLES[tone], className), children: [
|
|
2329
2341
|
icon && /* @__PURE__ */ jsx31("span", { className: "flex shrink-0", children: icon }),
|
|
2330
2342
|
/* @__PURE__ */ jsx31("span", { className: cn("min-w-0 flex-1", oneLine && "truncate"), children }),
|
|
2331
2343
|
action && /* @__PURE__ */ jsx31(Button, { variant: "muted", size: "small", className: "shrink-0", onClick: action.onClick, children: action.label }),
|
|
@@ -2336,7 +2348,7 @@ function Banner({ tone, children, icon, action, onDismiss, dismissLabel = "Dismi
|
|
|
2336
2348
|
// src/BlockHandle.tsx
|
|
2337
2349
|
import { useCallback as useCallback2, useEffect as useEffect5, useRef as useRef8, useState as useState8 } from "react";
|
|
2338
2350
|
import { IconGripVertical } from "@tabler/icons-react";
|
|
2339
|
-
import { jsx as jsx32, jsxs as
|
|
2351
|
+
import { jsx as jsx32, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2340
2352
|
function readId(element) {
|
|
2341
2353
|
const own = element.getAttribute("data-block-id") ?? element.querySelector("[data-block-id]")?.getAttribute("data-block-id");
|
|
2342
2354
|
return own || void 0;
|
|
@@ -2401,7 +2413,7 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2401
2413
|
setLine(null);
|
|
2402
2414
|
editing?.endDrag();
|
|
2403
2415
|
};
|
|
2404
|
-
return /* @__PURE__ */
|
|
2416
|
+
return /* @__PURE__ */ jsxs24(
|
|
2405
2417
|
"div",
|
|
2406
2418
|
{
|
|
2407
2419
|
ref: frame,
|
|
@@ -2433,7 +2445,7 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2433
2445
|
/* @__PURE__ */ jsx32("div", { "aria-hidden": true, className: "absolute inset-y-0 -left-7 w-7" }),
|
|
2434
2446
|
line !== null && /* @__PURE__ */ jsx32("div", { "aria-hidden": true, className: "pointer-events-none absolute inset-x-0 h-px bg-accent-primary", style: { top: line } }),
|
|
2435
2447
|
block && (rows || own) && // The top is the block's, measured: it depends on the document, not on a size of ours.
|
|
2436
|
-
/* @__PURE__ */ jsx32("div", { className: cn("absolute -left-7", rows && "cursor-grab active:cursor-grabbing"), style: { top }, children: /* @__PURE__ */
|
|
2448
|
+
/* @__PURE__ */ jsx32("div", { className: cn("absolute -left-7", rows && "cursor-grab active:cursor-grabbing"), style: { top }, children: /* @__PURE__ */ jsxs24(
|
|
2437
2449
|
Menu,
|
|
2438
2450
|
{
|
|
2439
2451
|
open,
|
|
@@ -2478,7 +2490,7 @@ function BlockHandle({ actions, editing, children, className }) {
|
|
|
2478
2490
|
import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
|
|
2479
2491
|
import { Field as BaseField2 } from "@base-ui/react/field";
|
|
2480
2492
|
import { IconCheck as IconCheck2 } from "@tabler/icons-react";
|
|
2481
|
-
import { jsx as jsx33, jsxs as
|
|
2493
|
+
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2482
2494
|
function squareClasses(checked, disabled, interactive, className) {
|
|
2483
2495
|
return cn(
|
|
2484
2496
|
"inline-flex items-center justify-center size-4 shrink-0 rounded-sm border transition-colors",
|
|
@@ -2497,7 +2509,7 @@ function Checkbox({ checked, onChange, disabled: ownDisabled = false, label, row
|
|
|
2497
2509
|
if (!onChange) {
|
|
2498
2510
|
const picture = /* @__PURE__ */ jsx33("span", { "aria-hidden": "true", className: squareClasses(checked, disabled, false, className), children: /* @__PURE__ */ jsx33("span", { className: tickClasses(checked), children: /* @__PURE__ */ jsx33(IconCheck2, { size: 12, stroke: 3 }) }) });
|
|
2499
2511
|
if (label === void 0) return picture;
|
|
2500
|
-
return /* @__PURE__ */
|
|
2512
|
+
return /* @__PURE__ */ jsxs25("span", { className: "flex items-center gap-2", children: [
|
|
2501
2513
|
picture,
|
|
2502
2514
|
/* @__PURE__ */ jsx33("span", { className: WORDS_CLASSES, children: label })
|
|
2503
2515
|
] });
|
|
@@ -2517,13 +2529,13 @@ function Checkbox({ checked, onChange, disabled: ownDisabled = false, label, row
|
|
|
2517
2529
|
);
|
|
2518
2530
|
if (label === void 0) return box;
|
|
2519
2531
|
if (row) {
|
|
2520
|
-
return /* @__PURE__ */ jsx33(BaseField2.Root, { disabled, children: /* @__PURE__ */
|
|
2532
|
+
return /* @__PURE__ */ jsx33(BaseField2.Root, { disabled, children: /* @__PURE__ */ jsxs25(BaseField2.Label, { className: cn(ROW_CLASSES, checked && "bg-bg-selected", !disabled && "cursor-pointer hover:bg-bg-hover"), children: [
|
|
2521
2533
|
leading,
|
|
2522
2534
|
/* @__PURE__ */ jsx33("span", { className: cn("flex-1 min-w-0 truncate", WORDS_CLASSES), children: label }),
|
|
2523
2535
|
box
|
|
2524
2536
|
] }) });
|
|
2525
2537
|
}
|
|
2526
|
-
return /* @__PURE__ */ jsx33(BaseField2.Root, { disabled, children: /* @__PURE__ */
|
|
2538
|
+
return /* @__PURE__ */ jsx33(BaseField2.Root, { disabled, children: /* @__PURE__ */ jsxs25(BaseField2.Label, { className: cn("flex items-center gap-2", !disabled && "cursor-pointer"), children: [
|
|
2527
2539
|
box,
|
|
2528
2540
|
/* @__PURE__ */ jsx33("span", { className: WORDS_CLASSES, children: label })
|
|
2529
2541
|
] }) });
|
|
@@ -2544,14 +2556,14 @@ import { Autocomplete } from "@base-ui/react/autocomplete";
|
|
|
2544
2556
|
import { IconLoader2 as IconLoader22, IconSearch } from "@tabler/icons-react";
|
|
2545
2557
|
|
|
2546
2558
|
// src/Skeleton.tsx
|
|
2547
|
-
import { jsx as jsx34, jsxs as
|
|
2559
|
+
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2548
2560
|
var SKELETON_SHAPE = { bar: "rounded-sm", round: "rounded-full", control: "rounded-md" };
|
|
2549
2561
|
function SkeletonBar({ className, style, on = "surface", shape = "bar" }) {
|
|
2550
2562
|
return /* @__PURE__ */ jsx34("div", { className: cn("animate-pulse", SKELETON_SHAPE[shape], on === "inset" ? "bg-bg-active" : "bg-bg-inset", className), style });
|
|
2551
2563
|
}
|
|
2552
2564
|
var ROW_BAR_WIDTHS = [150, 100, 170, 120, 90, 140, 110, 160];
|
|
2553
2565
|
function SkeletonRow({ barWidth = 130 }) {
|
|
2554
|
-
return /* @__PURE__ */
|
|
2566
|
+
return /* @__PURE__ */ jsxs26("div", { className: "flex shrink-0 items-center gap-2 px-2 h-[32px] rounded-lg", children: [
|
|
2555
2567
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "w-4 h-4 shrink-0" }),
|
|
2556
2568
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "h-3.5", style: { width: barWidth } })
|
|
2557
2569
|
] });
|
|
@@ -2560,20 +2572,20 @@ function SkeletonList({ rows = 8, className }) {
|
|
|
2560
2572
|
return /* @__PURE__ */ jsx34("div", { className: cn("flex flex-col gap-0.5 animate-skeleton-in", className), "aria-hidden": true, children: Array.from({ length: rows }, (_, i) => /* @__PURE__ */ jsx34(SkeletonRow, { barWidth: ROW_BAR_WIDTHS[i % ROW_BAR_WIDTHS.length] }, i)) });
|
|
2561
2573
|
}
|
|
2562
2574
|
function SkeletonCard({ secondLine }) {
|
|
2563
|
-
return /* @__PURE__ */
|
|
2564
|
-
/* @__PURE__ */
|
|
2575
|
+
return /* @__PURE__ */ jsxs26("div", { className: "rounded-lg px-2 pt-2", children: [
|
|
2576
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex w-full items-center gap-2", children: [
|
|
2565
2577
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "h-6 w-6 shrink-0" }),
|
|
2566
2578
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "h-3.5 w-[110px]" }),
|
|
2567
2579
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "h-3 w-10" })
|
|
2568
2580
|
] }),
|
|
2569
|
-
/* @__PURE__ */
|
|
2581
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex flex-col gap-2 pb-2 pl-8 pr-2 pt-2", children: [
|
|
2570
2582
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "h-3.5 w-full" }),
|
|
2571
2583
|
/* @__PURE__ */ jsx34(SkeletonBar, { className: "h-3.5 max-w-full", style: { width: secondLine } })
|
|
2572
2584
|
] })
|
|
2573
2585
|
] });
|
|
2574
2586
|
}
|
|
2575
2587
|
function SkeletonConversation({ className }) {
|
|
2576
|
-
return /* @__PURE__ */
|
|
2588
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn("flex flex-col gap-2 animate-skeleton-in", className), "aria-hidden": true, children: [
|
|
2577
2589
|
/* @__PURE__ */ jsx34(SkeletonCard, { secondLine: 420 }),
|
|
2578
2590
|
/* @__PURE__ */ jsx34(SkeletonCard, { secondLine: 300 }),
|
|
2579
2591
|
/* @__PURE__ */ jsx34(SkeletonCard, { secondLine: 500 })
|
|
@@ -2581,7 +2593,7 @@ function SkeletonConversation({ className }) {
|
|
|
2581
2593
|
}
|
|
2582
2594
|
|
|
2583
2595
|
// src/CommandPalette.tsx
|
|
2584
|
-
import { Fragment as Fragment8, jsx as jsx35, jsxs as
|
|
2596
|
+
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2585
2597
|
var PaletteContext = createContext6(null);
|
|
2586
2598
|
function usePalette(part) {
|
|
2587
2599
|
const palette = useContext6(PaletteContext);
|
|
@@ -2607,7 +2619,7 @@ function CommandPalette({ open, onOpenChange, label, where, modKey = "Ctrl", chi
|
|
|
2607
2619
|
return () => cancelAnimationFrame(frame);
|
|
2608
2620
|
});
|
|
2609
2621
|
const context = useMemo3(() => ({ where, modKey, popupRef }), [where, modKey]);
|
|
2610
|
-
return /* @__PURE__ */ jsx35(Dialog3.Root, { open, onOpenChange: (next) => onOpenChange(next), children: /* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ jsx35(Dialog3.Root, { open, onOpenChange: (next) => onOpenChange(next), children: /* @__PURE__ */ jsxs27(Dialog3.Portal, { children: [
|
|
2611
2623
|
/* @__PURE__ */ jsx35(Dialog3.Backdrop, { className: "fixed inset-0 z-40 bg-scrim" }),
|
|
2612
2624
|
/* @__PURE__ */ jsx35(Dialog3.Viewport, { className: "fixed inset-0 z-50 flex items-start justify-center pt-[16vh]", children: /* @__PURE__ */ jsx35(
|
|
2613
2625
|
Dialog3.Popup,
|
|
@@ -2636,9 +2648,9 @@ function useBack(chip, popupRef) {
|
|
|
2636
2648
|
}
|
|
2637
2649
|
function Footer({ keys }) {
|
|
2638
2650
|
const { where } = usePalette("The footer");
|
|
2639
|
-
return /* @__PURE__ */
|
|
2651
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("flex h-9 shrink-0 items-center gap-4 border-t border-border-subtle px-5", MONO_CAPTION_CLASSES, "signal:text-text-muted leaf:font-mono leaf:text-small"), children: [
|
|
2640
2652
|
/* @__PURE__ */ jsx35("span", { className: "min-w-0 flex-1 truncate", children: where }),
|
|
2641
|
-
keys.map(([key, word]) => /* @__PURE__ */
|
|
2653
|
+
keys.map(([key, word]) => /* @__PURE__ */ jsxs27("span", { className: "flex shrink-0 items-center gap-1.5", children: [
|
|
2642
2654
|
/* @__PURE__ */ jsx35(Kbd, { children: key }),
|
|
2643
2655
|
" ",
|
|
2644
2656
|
word
|
|
@@ -2716,7 +2728,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2716
2728
|
...chip && query === "" ? [["Backspace", "back"]] : [],
|
|
2717
2729
|
["Esc", "close"]
|
|
2718
2730
|
];
|
|
2719
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ jsxs27(
|
|
2720
2732
|
Autocomplete.Root,
|
|
2721
2733
|
{
|
|
2722
2734
|
items,
|
|
@@ -2739,7 +2751,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2739
2751
|
setLitId(id);
|
|
2740
2752
|
},
|
|
2741
2753
|
children: [
|
|
2742
|
-
/* @__PURE__ */
|
|
2754
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex h-12 shrink-0 items-center gap-3 border-b border-border-subtle px-5", children: [
|
|
2743
2755
|
/* @__PURE__ */ jsx35(IconSearch, { size: 16, stroke: 1.5, className: "shrink-0 text-text-secondary" }),
|
|
2744
2756
|
chip && /* @__PURE__ */ jsx35(LevelChip, { chip, onBack: back }),
|
|
2745
2757
|
/* @__PURE__ */ jsx35(
|
|
@@ -2754,9 +2766,9 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2754
2766
|
}
|
|
2755
2767
|
)
|
|
2756
2768
|
] }),
|
|
2757
|
-
/* @__PURE__ */
|
|
2769
|
+
/* @__PURE__ */ jsxs27(ScrollArea, { viewportClassName: "max-h-[420px]", contentClassName: "flex flex-col p-2", children: [
|
|
2758
2770
|
children != null && /* @__PURE__ */ jsx35("div", { className: "flex flex-col gap-2 px-3 pb-2 pt-3", children }),
|
|
2759
|
-
/* @__PURE__ */ jsx35(Autocomplete.List, { className: "flex flex-col", children: (group) => /* @__PURE__ */
|
|
2771
|
+
/* @__PURE__ */ jsx35(Autocomplete.List, { className: "flex flex-col", children: (group) => /* @__PURE__ */ jsxs27(Autocomplete.Group, { items: group.items, className: "flex flex-col gap-0.5", children: [
|
|
2760
2772
|
/* @__PURE__ */ jsx35(Autocomplete.GroupLabel, { className: "flex h-7 shrink-0 items-center px-3", children: /* @__PURE__ */ jsx35(SectionLabel, { tone: "secondary", children: group.value }) }),
|
|
2761
2773
|
/* @__PURE__ */ jsx35(Autocomplete.Collection, { children: (row) => (
|
|
2762
2774
|
/* The menu row, as the list's own option — the way Select
|
|
@@ -2775,7 +2787,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
2775
2787
|
) }, row.id)
|
|
2776
2788
|
) })
|
|
2777
2789
|
] }, group.value) }),
|
|
2778
|
-
/* @__PURE__ */ jsx35(Autocomplete.Status, { className: "flex items-center gap-2 px-3 [&:not(:empty)]:h-8", children: pending && /* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsx35(Autocomplete.Status, { className: "flex items-center gap-2 px-3 [&:not(:empty)]:h-8", children: pending && /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
2779
2791
|
/* @__PURE__ */ jsx35(IconLoader22, { size: 12, stroke: 1.5, className: "shrink-0 animate-spin text-text-muted" }),
|
|
2780
2792
|
/* @__PURE__ */ jsx35("span", { className: "text-caption text-text-muted", children: pending })
|
|
2781
2793
|
] }) }),
|
|
@@ -2833,14 +2845,14 @@ function CommandPaletteForm({ chip, icon, submitLabel, onSubmit, submitWaits, wo
|
|
|
2833
2845
|
...backNamed ? [["Backspace", "back"]] : [],
|
|
2834
2846
|
["Esc", "close"]
|
|
2835
2847
|
];
|
|
2836
|
-
return /* @__PURE__ */
|
|
2837
|
-
/* @__PURE__ */
|
|
2848
|
+
return /* @__PURE__ */ jsxs27("div", { ref: frameRef, tabIndex: -1, onKeyDown, onFocus: measure, onBlur: measure, onInput: measure, className: "flex min-h-0 flex-col outline-none", children: [
|
|
2849
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex h-12 shrink-0 items-center gap-3 border-b border-border-subtle px-5", children: [
|
|
2838
2850
|
icon != null && /* @__PURE__ */ jsx35("span", { className: "flex shrink-0 items-center text-text-secondary", children: icon }),
|
|
2839
2851
|
/* @__PURE__ */ jsx35(LevelChip, { chip, onBack: back })
|
|
2840
2852
|
] }),
|
|
2841
|
-
/* @__PURE__ */
|
|
2853
|
+
/* @__PURE__ */ jsxs27(Form, { "data-command-palette-fields": "", busy, enterSends: false, onSubmit: submit, layout: "free", className: "flex min-h-0 flex-col", children: [
|
|
2842
2854
|
/* @__PURE__ */ jsx35(ScrollArea, { viewportClassName: "max-h-[420px]", contentClassName: "flex flex-col px-5 py-4", children: /* @__PURE__ */ jsx35("div", { className: FIELDS_CLASSES, children }) }),
|
|
2843
|
-
/* @__PURE__ */
|
|
2855
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex shrink-0 items-center gap-3 px-5 pb-4", children: [
|
|
2844
2856
|
/* @__PURE__ */ jsx35("div", { className: "min-w-0 flex-1", children: working ? /* @__PURE__ */ jsx35(FieldLine, { children: working.line }) : error ? /* @__PURE__ */ jsx35(FieldLine, { tone: "error", children: error }) : null }),
|
|
2845
2857
|
/* @__PURE__ */ jsx35(
|
|
2846
2858
|
Button,
|
|
@@ -2860,8 +2872,8 @@ function CommandPaletteForm({ chip, icon, submitLabel, onSubmit, submitWaits, wo
|
|
|
2860
2872
|
}
|
|
2861
2873
|
var BAR_WIDTHS = ["w-4/5", "w-3/5", "w-2/3"];
|
|
2862
2874
|
function CommandPaletteWorking({ children, bars = 2 }) {
|
|
2863
|
-
return /* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
2875
|
+
return /* @__PURE__ */ jsxs27("div", { role: "status", className: "flex flex-col gap-2", children: [
|
|
2876
|
+
/* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2 text-caption text-text-secondary", children: [
|
|
2865
2877
|
/* @__PURE__ */ jsx35(IconLoader22, { size: 14, stroke: 1.5, className: "shrink-0 animate-spin" }),
|
|
2866
2878
|
children
|
|
2867
2879
|
] }),
|
|
@@ -2870,7 +2882,7 @@ function CommandPaletteWorking({ children, bars = 2 }) {
|
|
|
2870
2882
|
}
|
|
2871
2883
|
function CommandPaletteAnswer({ children, note }) {
|
|
2872
2884
|
const paragraphs = children.split(/\n\s*\n/).filter((p) => p.trim() !== "");
|
|
2873
|
-
return /* @__PURE__ */
|
|
2885
|
+
return /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
|
|
2874
2886
|
paragraphs.map((paragraph, i) => /* @__PURE__ */ jsx35("p", { className: "whitespace-pre-wrap text-body-2 text-text-primary", children: paragraph.split(/\s*(\[\d+\])/).map(
|
|
2875
2887
|
(part, j) => /^\[\d+\]$/.test(part) ? /* @__PURE__ */ jsx35("sup", { className: "ml-0.5 font-mono text-small text-accent-text", children: part.slice(1, -1) }, j) : part
|
|
2876
2888
|
) }, i)),
|
|
@@ -2881,8 +2893,8 @@ function CommandPaletteQuote({ children }) {
|
|
|
2881
2893
|
return /* @__PURE__ */ jsx35("p", { className: "whitespace-pre-wrap border-l-2 border-border-default pl-3 text-body-2 text-text-primary", children });
|
|
2882
2894
|
}
|
|
2883
2895
|
function CommandPaletteProposal({ source, mark, children }) {
|
|
2884
|
-
return /* @__PURE__ */
|
|
2885
|
-
/* @__PURE__ */
|
|
2896
|
+
return /* @__PURE__ */ jsxs27(Card, { fill: "surface", className: "flex flex-col gap-1 p-3", children: [
|
|
2897
|
+
/* @__PURE__ */ jsxs27("span", { className: "flex items-center gap-2 text-caption text-text-secondary", children: [
|
|
2886
2898
|
mark,
|
|
2887
2899
|
source
|
|
2888
2900
|
] }),
|
|
@@ -2891,7 +2903,7 @@ function CommandPaletteProposal({ source, mark, children }) {
|
|
|
2891
2903
|
}
|
|
2892
2904
|
|
|
2893
2905
|
// src/InlineChip.tsx
|
|
2894
|
-
import { Fragment as Fragment9, jsx as jsx36, jsxs as
|
|
2906
|
+
import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2895
2907
|
var INLINE_CHIP_CLASSES = "inline-flex h-[1.4em] items-baseline gap-1 rounded-sm px-1 mx-0.5 align-baseline text-body-2 font-normal select-none [&>:is(svg,img,:empty)]:self-center [&>:has(svg,img)]:self-center";
|
|
2896
2908
|
var INLINE_CHIP_TONE_CLASSES = {
|
|
2897
2909
|
/** A thing or a place — anything that is not a person. */
|
|
@@ -2917,7 +2929,7 @@ function inlineChipClassName(tone, className) {
|
|
|
2917
2929
|
}
|
|
2918
2930
|
function InlineChip({ tone = "neutral", icon, href, className, children, ...props }) {
|
|
2919
2931
|
const inApp = useInAppClick(href, props.onClick);
|
|
2920
|
-
const body = /* @__PURE__ */
|
|
2932
|
+
const body = /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
2921
2933
|
icon && /* @__PURE__ */ jsx36("span", { className: "flex size-4 shrink-0 items-center justify-center self-center text-text-secondary", children: icon }),
|
|
2922
2934
|
children
|
|
2923
2935
|
] });
|
|
@@ -2948,7 +2960,7 @@ function codeColours(text, language) {
|
|
|
2948
2960
|
}
|
|
2949
2961
|
|
|
2950
2962
|
// src/RichText.tsx
|
|
2951
|
-
import { Fragment as Fragment11, jsx as jsx37, jsxs as
|
|
2963
|
+
import { Fragment as Fragment11, jsx as jsx37, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2952
2964
|
var RICH_TEXT_CLASSES = {
|
|
2953
2965
|
/* Blocks 8px apart (Katerina, 9 October; 4 before). A list's own items stay together. */
|
|
2954
2966
|
base: "flex flex-col gap-2 break-words text-text-secondary",
|
|
@@ -3005,7 +3017,7 @@ function textWithLinks(text, renderText) {
|
|
|
3005
3017
|
if (bare) {
|
|
3006
3018
|
return (
|
|
3007
3019
|
// An address has no spaces to wrap at, so it may break anywhere.
|
|
3008
|
-
/* @__PURE__ */
|
|
3020
|
+
/* @__PURE__ */ jsxs29("span", { className: "break-all", children: [
|
|
3009
3021
|
/* @__PURE__ */ jsx37(Link, { href: bare[1], external: true, onClick: keepToLink, children: bare[1] }),
|
|
3010
3022
|
bare[2]
|
|
3011
3023
|
] }, i)
|
|
@@ -3025,7 +3037,7 @@ function Runs({ runs, draw: draw2 }) {
|
|
|
3025
3037
|
if (run.marks.includes("code")) {
|
|
3026
3038
|
return /* @__PURE__ */ jsx37("code", { children: run.text }, i);
|
|
3027
3039
|
}
|
|
3028
|
-
let node = run.text.split("\n").map((line, j) => /* @__PURE__ */
|
|
3040
|
+
let node = run.text.split("\n").map((line, j) => /* @__PURE__ */ jsxs29("span", { children: [
|
|
3029
3041
|
j > 0 && /* @__PURE__ */ jsx37("br", {}),
|
|
3030
3042
|
textWithLinks(line, draw2.renderText)
|
|
3031
3043
|
] }, j));
|
|
@@ -3043,14 +3055,14 @@ function Table({ block, draw: draw2 }) {
|
|
|
3043
3055
|
const header = named(cell) === "tableHeader";
|
|
3044
3056
|
const Cell = header ? "th" : "td";
|
|
3045
3057
|
const { colspan, rowspan } = cell.attrs ?? {};
|
|
3046
|
-
return /* @__PURE__ */
|
|
3058
|
+
return /* @__PURE__ */ jsxs29(
|
|
3047
3059
|
Cell,
|
|
3048
3060
|
{
|
|
3049
3061
|
"data-block-id": cell.id,
|
|
3050
3062
|
colSpan: colspan && colspan > 1 ? colspan : void 0,
|
|
3051
3063
|
rowSpan: rowspan && rowspan > 1 ? rowspan : void 0,
|
|
3052
3064
|
children: [
|
|
3053
|
-
(cell.children ?? []).map((child, j) => /* @__PURE__ */
|
|
3065
|
+
(cell.children ?? []).map((child, j) => /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
|
3054
3066
|
/* @__PURE__ */ jsx37(Runs, { runs: child.inline, draw: draw2 }),
|
|
3055
3067
|
draw2.renderAfter?.(child)
|
|
3056
3068
|
] }, j)),
|
|
@@ -3063,7 +3075,7 @@ function Table({ block, draw: draw2 }) {
|
|
|
3063
3075
|
});
|
|
3064
3076
|
const first = rows[0].children ?? [];
|
|
3065
3077
|
const headerRow = first.length > 0 && first.every((cell) => named(cell) === "tableHeader");
|
|
3066
|
-
return /* @__PURE__ */
|
|
3078
|
+
return /* @__PURE__ */ jsxs29("table", { "data-block-id": block.id, children: [
|
|
3067
3079
|
headerRow && /* @__PURE__ */ jsx37("thead", { children: /* @__PURE__ */ jsx37("tr", { "data-block-id": rows[0].id, children: cells(rows[0]) }) }),
|
|
3068
3080
|
/* @__PURE__ */ jsx37("tbody", { children: (headerRow ? rows.slice(1) : rows).map((row, i) => /* @__PURE__ */ jsx37("tr", { "data-block-id": row.id, children: cells(row) }, row.id ?? i)) })
|
|
3069
3081
|
] });
|
|
@@ -3071,7 +3083,7 @@ function Table({ block, draw: draw2 }) {
|
|
|
3071
3083
|
var wordsOf = (item) => (item.inline ?? []).map((run) => run.text).join("").trim();
|
|
3072
3084
|
function ListItem({ item, draw: draw2, below }) {
|
|
3073
3085
|
if (typeof item.checked !== "boolean") {
|
|
3074
|
-
return /* @__PURE__ */
|
|
3086
|
+
return /* @__PURE__ */ jsxs29("li", { "data-block-id": item.id, children: [
|
|
3075
3087
|
/* @__PURE__ */ jsx37(Runs, { runs: item.inline, draw: draw2 }),
|
|
3076
3088
|
draw2.renderAfter?.(item),
|
|
3077
3089
|
below
|
|
@@ -3081,9 +3093,9 @@ function ListItem({ item, draw: draw2, below }) {
|
|
|
3081
3093
|
const id = item.id;
|
|
3082
3094
|
const name = wordsOf(item) || "Item";
|
|
3083
3095
|
const control = onTick && id ? (next) => onTick(id, next) : void 0;
|
|
3084
|
-
return /* @__PURE__ */
|
|
3096
|
+
return /* @__PURE__ */ jsxs29("li", { "data-block-id": id, "data-checked": String(item.checked), children: [
|
|
3085
3097
|
/* @__PURE__ */ jsx37("span", { "data-checklist-box": "", ...control ? {} : { role: "checkbox", "aria-checked": item.checked, "aria-readonly": true, "aria-label": name }, children: /* @__PURE__ */ jsx37(Checkbox, { checked: item.checked, onChange: control, "aria-label": name }) }),
|
|
3086
|
-
/* @__PURE__ */
|
|
3098
|
+
/* @__PURE__ */ jsxs29("div", { children: [
|
|
3087
3099
|
/* @__PURE__ */ jsx37("p", { children: /* @__PURE__ */ jsx37(Runs, { runs: item.inline, draw: draw2 }) }),
|
|
3088
3100
|
draw2.renderAfter?.(item),
|
|
3089
3101
|
below
|
|
@@ -3111,7 +3123,7 @@ function Block({ block, draw: draw2 }) {
|
|
|
3111
3123
|
const lineOfWords = block.type === "paragraph" || block.type === "heading" || block.type === "blockquote";
|
|
3112
3124
|
const after = lineOfWords ? draw2.renderAfter?.(block) : void 0;
|
|
3113
3125
|
if (after === void 0 || after === null || after === false) return drawn;
|
|
3114
|
-
return /* @__PURE__ */
|
|
3126
|
+
return /* @__PURE__ */ jsxs29(Fragment11, { children: [
|
|
3115
3127
|
drawn,
|
|
3116
3128
|
after
|
|
3117
3129
|
] });
|
|
@@ -3153,7 +3165,7 @@ function Drawn({ block, draw: draw2 }) {
|
|
|
3153
3165
|
break;
|
|
3154
3166
|
}
|
|
3155
3167
|
}
|
|
3156
|
-
return /* @__PURE__ */
|
|
3168
|
+
return /* @__PURE__ */ jsxs29("div", { "data-block-id": block.id, "data-block-type": named(block), children: [
|
|
3157
3169
|
runs,
|
|
3158
3170
|
(block.children ?? []).map((child, i) => /* @__PURE__ */ jsx37(Block, { block: child, draw: draw2 }, child.id ?? i))
|
|
3159
3171
|
] });
|
|
@@ -3204,13 +3216,13 @@ function KindIcon({ kind, size = 16, tone = "secondary", className }) {
|
|
|
3204
3216
|
import { useCallback as useCallback3, useRef as useRef10 } from "react";
|
|
3205
3217
|
|
|
3206
3218
|
// src/Person.tsx
|
|
3207
|
-
import { jsx as jsx39, jsxs as
|
|
3219
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3208
3220
|
function Person({ name, picture, bot, fallback = "\u2014", size = 20, className }) {
|
|
3209
3221
|
return (
|
|
3210
3222
|
// gap-2: the face-to-name distance is one rule (8px) wherever a person
|
|
3211
3223
|
// appears — Katerina, 2026-09-01, set on Person so PersonTrigger and every
|
|
3212
3224
|
// row agree by construction.
|
|
3213
|
-
/* @__PURE__ */
|
|
3225
|
+
/* @__PURE__ */ jsxs30("span", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
3214
3226
|
/* @__PURE__ */ jsx39(Avatar, { name, src: picture, bot, size }),
|
|
3215
3227
|
/* @__PURE__ */ jsx39("span", { className: cn("truncate", !name && "text-text-muted"), children: name ?? fallback })
|
|
3216
3228
|
] })
|
|
@@ -3220,7 +3232,7 @@ function Person({ name, picture, bot, fallback = "\u2014", size = 20, className
|
|
|
3220
3232
|
// src/PersonTrigger.tsx
|
|
3221
3233
|
import { Button as BaseButton7 } from "@base-ui/react/button";
|
|
3222
3234
|
import { IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
|
|
3223
|
-
import { jsx as jsx40, jsxs as
|
|
3235
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3224
3236
|
function PersonTrigger({ name, picture, bot, fallback, size, open = false, compact = false, className, ...props }) {
|
|
3225
3237
|
if (compact) {
|
|
3226
3238
|
return /* @__PURE__ */ jsx40(
|
|
@@ -3238,7 +3250,7 @@ function PersonTrigger({ name, picture, bot, fallback, size, open = false, compa
|
|
|
3238
3250
|
}
|
|
3239
3251
|
return (
|
|
3240
3252
|
// @estiva-escape(no-copied-look): N5 (Katerina, 24 September: record only): a row that fills on hover, as NavItem also does
|
|
3241
|
-
/* @__PURE__ */
|
|
3253
|
+
/* @__PURE__ */ jsxs31(
|
|
3242
3254
|
BaseButton7,
|
|
3243
3255
|
{
|
|
3244
3256
|
type: "button",
|
|
@@ -3265,7 +3277,7 @@ function PersonTrigger({ name, picture, bot, fallback, size, open = false, compa
|
|
|
3265
3277
|
}
|
|
3266
3278
|
|
|
3267
3279
|
// src/IdentityMenu.tsx
|
|
3268
|
-
import { Fragment as Fragment12, jsx as jsx41, jsxs as
|
|
3280
|
+
import { Fragment as Fragment12, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3269
3281
|
function IdentityPanel({ className, onClose = () => {
|
|
3270
3282
|
}, ...rest }) {
|
|
3271
3283
|
return /* @__PURE__ */ jsx41(MenuPanel, { className: cn("w-72", className), children: /* @__PURE__ */ jsx41(IdentityRows, { ...rest, onClose }) });
|
|
@@ -3276,23 +3288,23 @@ function IdentityRows({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, on
|
|
|
3276
3288
|
action();
|
|
3277
3289
|
};
|
|
3278
3290
|
const appRows = typeof children === "function" ? children(onClose) : children;
|
|
3279
|
-
return /* @__PURE__ */
|
|
3280
|
-
/* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
3292
|
+
/* @__PURE__ */ jsxs32(MenuSection, { label: signedIn ? "Signed in as" : "Acting as", children: [
|
|
3281
3293
|
/* @__PURE__ */ jsx41(MenuRow, { children: /* @__PURE__ */ jsx41("div", { className: "flex min-w-0 text-body-2-strong", children: /* @__PURE__ */ jsx41(Person, { name: me.name, picture: me.picture, fallback: "Anonymous", size: 28 }) }) }),
|
|
3282
3294
|
/* @__PURE__ */ jsx41(Note, { children: signedIn ? "Your Estiva ID. The same person you are in every Estiva app." : "A key held by this browser only. Nobody else knows who you are." }),
|
|
3283
|
-
me.email && /* @__PURE__ */
|
|
3295
|
+
me.email && /* @__PURE__ */ jsxs32(Note, { children: [
|
|
3284
3296
|
me.email,
|
|
3285
3297
|
" \xB7 known to Estiva, never published to the relay"
|
|
3286
3298
|
] })
|
|
3287
3299
|
] }),
|
|
3288
|
-
relayUrl && /* @__PURE__ */
|
|
3300
|
+
relayUrl && /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
3289
3301
|
/* @__PURE__ */ jsx41(Divider, { className: "mx-0 my-2" }),
|
|
3290
|
-
/* @__PURE__ */
|
|
3302
|
+
/* @__PURE__ */ jsxs32(MenuSection, { label: "Workspace", children: [
|
|
3291
3303
|
/* @__PURE__ */ jsx41(MenuRow, { children: /* @__PURE__ */ jsx41("span", { className: "break-all font-mono text-caption text-text-primary", children: relayUrl }) }),
|
|
3292
3304
|
/* @__PURE__ */ jsx41(Note, { children: "Everyone on this relay shares this workspace, in every app." })
|
|
3293
3305
|
] })
|
|
3294
3306
|
] }),
|
|
3295
|
-
appRows && /* @__PURE__ */
|
|
3307
|
+
appRows && /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
3296
3308
|
/* @__PURE__ */ jsx41(Divider, { className: "mx-0 my-2" }),
|
|
3297
3309
|
appRows
|
|
3298
3310
|
] }),
|
|
@@ -3433,7 +3445,7 @@ var Textarea = forwardRef3(function Textarea2({ className, ...props }, ref) {
|
|
|
3433
3445
|
|
|
3434
3446
|
// src/ConfirmDialog.tsx
|
|
3435
3447
|
import { useRef as useRef11, useState as useState10 } from "react";
|
|
3436
|
-
import { Fragment as Fragment13, jsx as jsx45, jsxs as
|
|
3448
|
+
import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3437
3449
|
function ConfirmDialog({ title, children, confirmLabel, destructive = false, onConfirm, onClose, alternative }) {
|
|
3438
3450
|
const [busy, setBusy] = useState10(false);
|
|
3439
3451
|
const closed = useRef11(false);
|
|
@@ -3457,13 +3469,13 @@ function ConfirmDialog({ title, children, confirmLabel, destructive = false, onC
|
|
|
3457
3469
|
alert: true,
|
|
3458
3470
|
title,
|
|
3459
3471
|
onClose: close,
|
|
3460
|
-
footer: /* @__PURE__ */
|
|
3472
|
+
footer: /* @__PURE__ */ jsxs33(Fragment13, { children: [
|
|
3461
3473
|
/* @__PURE__ */ jsx45(Button, { variant: "muted", onClick: close, disabled: busy, children: "Cancel" }),
|
|
3462
3474
|
/* @__PURE__ */ jsx45(Button, { variant: destructive ? "destructive" : "primary", onClick: () => void confirm(), disabled: busy, children: confirmLabel })
|
|
3463
3475
|
] }),
|
|
3464
|
-
children: /* @__PURE__ */
|
|
3476
|
+
children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-3 text-body-2 text-text-primary", children: [
|
|
3465
3477
|
children,
|
|
3466
|
-
alternative && /* @__PURE__ */
|
|
3478
|
+
alternative && /* @__PURE__ */ jsxs33("div", { className: "flex flex-col items-start gap-2", children: [
|
|
3467
3479
|
/* @__PURE__ */ jsx45("p", { children: alternative.sentence }),
|
|
3468
3480
|
/* @__PURE__ */ jsx45(Button, { variant: "outlined", size: "small", onClick: alternative.onClick, disabled: busy, children: alternative.label })
|
|
3469
3481
|
] })
|
|
@@ -3477,7 +3489,7 @@ import { useEffect as useEffect7, useRef as useRef12, useState as useState11 } f
|
|
|
3477
3489
|
import { Field as BaseField4 } from "@base-ui/react/field";
|
|
3478
3490
|
import { Input as Input2 } from "@base-ui/react/input";
|
|
3479
3491
|
import { IconPencil, IconPlus } from "@tabler/icons-react";
|
|
3480
|
-
import { Fragment as Fragment14, jsx as jsx46, jsxs as
|
|
3492
|
+
import { Fragment as Fragment14, jsx as jsx46, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3481
3493
|
var saved = (answer) => answer === true || typeof answer === "object" && answer.kind !== "error";
|
|
3482
3494
|
function EditableText(props) {
|
|
3483
3495
|
return props.manner === "buttons" ? /* @__PURE__ */ jsx46(WithButtons, { ...props }) : /* @__PURE__ */ jsx46(Inline, { ...props });
|
|
@@ -3650,19 +3662,19 @@ function WithButtons({
|
|
|
3650
3662
|
};
|
|
3651
3663
|
const line = outcome && /* @__PURE__ */ jsx46(FieldLine, { tone: outcome.kind, children: outcome.message });
|
|
3652
3664
|
if (editing) {
|
|
3653
|
-
const buttons = /* @__PURE__ */
|
|
3665
|
+
const buttons = /* @__PURE__ */ jsxs34(Fragment14, { children: [
|
|
3654
3666
|
/* @__PURE__ */ jsx46(Button, { variant: "primary", size: "small", type: "submit", disabled: !canSave || busy, children: busy ? "Saving\u2026" : "Save" }),
|
|
3655
3667
|
/* @__PURE__ */ jsx46(Button, { variant: "outlined", size: "small", onClick: cancel, children: "Cancel" })
|
|
3656
3668
|
] });
|
|
3657
3669
|
return (
|
|
3658
3670
|
// The package Form: Enter in the one-line field saves, Ctrl+Enter from the text area; it locks while saving.
|
|
3659
|
-
/* @__PURE__ */
|
|
3660
|
-
multiline ? /* @__PURE__ */
|
|
3671
|
+
/* @__PURE__ */ jsxs34(Form, { busy, onSubmit: save, layout: "free", className: cn("flex flex-col gap-2", className), children: [
|
|
3672
|
+
multiline ? /* @__PURE__ */ jsxs34(Fragment14, { children: [
|
|
3661
3673
|
/* @__PURE__ */ jsx46(Textarea, { autoFocus: true, rows: 4, value: draft, onChange: (event) => type(event.target.value), "aria-label": label, placeholder: fieldPlaceholder, onKeyDown }),
|
|
3662
3674
|
draftNote?.(draft),
|
|
3663
3675
|
/* @__PURE__ */ jsx46("div", { className: "flex items-center gap-2", children: buttons })
|
|
3664
|
-
] }) : /* @__PURE__ */
|
|
3665
|
-
/* @__PURE__ */
|
|
3676
|
+
] }) : /* @__PURE__ */ jsxs34(Fragment14, { children: [
|
|
3677
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
|
|
3666
3678
|
/* @__PURE__ */ jsx46(TextInput, { autoFocus: true, value: draft, onChange: (event) => type(event.target.value), "aria-label": label, placeholder: fieldPlaceholder, onKeyDown }),
|
|
3667
3679
|
buttons
|
|
3668
3680
|
] }),
|
|
@@ -3673,8 +3685,8 @@ function WithButtons({
|
|
|
3673
3685
|
);
|
|
3674
3686
|
}
|
|
3675
3687
|
const shown2 = display ?? value;
|
|
3676
|
-
return /* @__PURE__ */
|
|
3677
|
-
/* @__PURE__ */
|
|
3688
|
+
return /* @__PURE__ */ jsxs34("div", { className: cn("flex flex-col gap-3", className), children: [
|
|
3689
|
+
/* @__PURE__ */ jsxs34("div", { className: cn("flex gap-2", multiline ? "items-start" : "items-center"), children: [
|
|
3678
3690
|
!shown2 ? (
|
|
3679
3691
|
// Nothing yet: the kit's empty line for one part of a page, 12px and muted, as Peek's "No summary yet." (2 November).
|
|
3680
3692
|
/* @__PURE__ */ jsx46(EmptyState, { scope: "section", message: placeholder, className: "min-w-0 flex-1" })
|
|
@@ -3696,10 +3708,10 @@ function WithButtons({
|
|
|
3696
3708
|
|
|
3697
3709
|
// src/EntryShell.tsx
|
|
3698
3710
|
import { cloneElement as cloneElement2 } from "react";
|
|
3699
|
-
import { jsx as jsx47, jsxs as
|
|
3711
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3700
3712
|
var isEmpty = (node) => node == null || node === false || typeof node === "string" && node.trim() === "";
|
|
3701
3713
|
function EntryShell({ logo, busy = false, busyLabel = "Loading", message, action, className }) {
|
|
3702
|
-
return /* @__PURE__ */ jsx47("div", { className: cn("min-h-screen bg-bg-base flex items-center justify-center p-6", className), children: busy ? /* @__PURE__ */ jsx47("div", { role: "status", "aria-busy": "true", "aria-label": busyLabel, className: "flex flex-col items-center gap-4", children: cloneElement2(logo, { className: cn(logo.props.className, "animate-skeleton-in animate-pulse") }) }) : /* @__PURE__ */
|
|
3714
|
+
return /* @__PURE__ */ jsx47("div", { className: cn("min-h-screen bg-bg-base flex items-center justify-center p-6", className), children: busy ? /* @__PURE__ */ jsx47("div", { role: "status", "aria-busy": "true", "aria-label": busyLabel, className: "flex flex-col items-center gap-4", children: cloneElement2(logo, { className: cn(logo.props.className, "animate-skeleton-in animate-pulse") }) }) : /* @__PURE__ */ jsxs35("div", { className: "flex flex-col items-center gap-4", children: [
|
|
3703
3715
|
logo,
|
|
3704
3716
|
!isEmpty(message) && /* @__PURE__ */ jsx47("p", { role: "status", className: "text-body-2 text-text-secondary max-w-sm text-center", children: message }),
|
|
3705
3717
|
action && /* @__PURE__ */ jsx47(Button, { variant: "primary", type: "button", onClick: action.onClick, disabled: action.disabled, children: action.label })
|
|
@@ -3754,7 +3766,7 @@ function ProgressBar({ value, max, label, variant = "default", className }) {
|
|
|
3754
3766
|
|
|
3755
3767
|
// src/Breadcrumb.tsx
|
|
3756
3768
|
import { Fragment as Fragment15, useCallback as useCallback4, useLayoutEffect as useLayoutEffect4, useRef as useRef13, useState as useState12 } from "react";
|
|
3757
|
-
import { jsx as jsx50, jsxs as
|
|
3769
|
+
import { jsx as jsx50, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3758
3770
|
function Breadcrumb({ items, className }) {
|
|
3759
3771
|
const navRef = useRef13(null);
|
|
3760
3772
|
const labelRefs = useRef13([]);
|
|
@@ -3797,7 +3809,7 @@ function Breadcrumb({ items, className }) {
|
|
|
3797
3809
|
// truncates and is measured.
|
|
3798
3810
|
/* @__PURE__ */ jsx50("span", { className: cn("flex min-w-0", item.mono && "shrink-0 font-mono text-caption", tone, "hover:text-text-primary"), children: /* @__PURE__ */ jsx50(Link, { ref: setLabelRef, variant: "plain", truncate: true, href: item.href, onClick: item.onClick, children: item.label }) })
|
|
3799
3811
|
) : /* @__PURE__ */ jsx50("span", { ref: setLabelRef, className: text, "aria-current": last ? "page" : void 0, children: item.label });
|
|
3800
|
-
return /* @__PURE__ */
|
|
3812
|
+
return /* @__PURE__ */ jsxs36(Fragment15, { children: [
|
|
3801
3813
|
index > 0 && /* @__PURE__ */ jsx50("span", { "aria-hidden": "true", className: "shrink-0 text-text-muted", children: "/" }),
|
|
3802
3814
|
item.icon && /* @__PURE__ */ jsx50("span", { "aria-hidden": "true", className: cn("flex shrink-0", tone), children: item.icon }),
|
|
3803
3815
|
truncated.has(index) ? (
|
|
@@ -3829,7 +3841,7 @@ import { Collapsible } from "@base-ui/react/collapsible";
|
|
|
3829
3841
|
// src/SectionHeader.tsx
|
|
3830
3842
|
import { IconChevronRight as IconChevronRight2, IconDotsVertical } from "@tabler/icons-react";
|
|
3831
3843
|
import { useRender } from "@base-ui/react/use-render";
|
|
3832
|
-
import { Fragment as Fragment16, jsx as jsx52, jsxs as
|
|
3844
|
+
import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3833
3845
|
function SectionHeader({ title, chevron = false, icon, isExpanded = true, onToggle, trailing, count, actions, menu, menuLabel, showActions = "hover", hover = "fill", look = "heading", render, className }) {
|
|
3834
3846
|
const row = look === "row";
|
|
3835
3847
|
const acts = actions && actions.length > 0 || menu != null;
|
|
@@ -3843,8 +3855,8 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3843
3855
|
// row itself carried the click.
|
|
3844
3856
|
// An icon is a row's: NavItem's 8px after it.
|
|
3845
3857
|
className: cn("flex h-full min-w-0 flex-1 items-center text-left", row || chevron || icon != null ? "gap-2" : "gap-1"),
|
|
3846
|
-
children: /* @__PURE__ */
|
|
3847
|
-
icon != null ? /* @__PURE__ */
|
|
3858
|
+
children: /* @__PURE__ */ jsxs37(Fragment16, { children: [
|
|
3859
|
+
icon != null ? /* @__PURE__ */ jsxs37("span", { className: "relative flex size-4 shrink-0 items-center justify-center text-text-secondary", children: [
|
|
3848
3860
|
/* @__PURE__ */ jsx52("span", { className: cn("flex", chevron && "transition-opacity group-hover:opacity-0 group-has-[:focus-visible]:opacity-0"), children: icon }),
|
|
3849
3861
|
chevron && /* @__PURE__ */ jsx52(
|
|
3850
3862
|
IconChevronRight2,
|
|
@@ -3870,7 +3882,7 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3870
3882
|
] })
|
|
3871
3883
|
}
|
|
3872
3884
|
});
|
|
3873
|
-
return /* @__PURE__ */
|
|
3885
|
+
return /* @__PURE__ */ jsxs37(
|
|
3874
3886
|
"div",
|
|
3875
3887
|
{
|
|
3876
3888
|
className: cn(
|
|
@@ -3896,7 +3908,7 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3896
3908
|
"div",
|
|
3897
3909
|
{
|
|
3898
3910
|
className: "-mr-1 flex shrink-0 items-center",
|
|
3899
|
-
children: /* @__PURE__ */
|
|
3911
|
+
children: /* @__PURE__ */ jsxs37("div", { className: cn("flex items-center gap-1", reveal), children: [
|
|
3900
3912
|
actions?.map(
|
|
3901
3913
|
(action) => action.menu != null ? (
|
|
3902
3914
|
// `data-section-menu`, as the ⋮ has: the row stays lit while its menu is open.
|
|
@@ -3927,7 +3939,7 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
|
|
|
3927
3939
|
}
|
|
3928
3940
|
|
|
3929
3941
|
// src/CollapsibleSection.tsx
|
|
3930
|
-
import { jsx as jsx53, jsxs as
|
|
3942
|
+
import { jsx as jsx53, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3931
3943
|
var OPEN = "open";
|
|
3932
3944
|
var CLOSED = "closed";
|
|
3933
3945
|
function useOpenFor(openFor, open, setOpen, link) {
|
|
@@ -3977,7 +3989,7 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
3977
3989
|
};
|
|
3978
3990
|
useOpenFor(openFor, open, setOpen, useContext7(sectionLinked));
|
|
3979
3991
|
const shown2 = open && !pending;
|
|
3980
|
-
return /* @__PURE__ */
|
|
3992
|
+
return /* @__PURE__ */ jsxs38(Collapsible.Root, { open: shown2, onOpenChange: (next, details) => setOpen(pending && details.reason === "trigger-press" ? !open : next), className: cn("flex flex-col", className), children: [
|
|
3981
3993
|
/* @__PURE__ */ jsx53(SectionHeader, { title, chevron: true, icon, isExpanded: open, trailing, actions, menu, menuLabel, showActions, look, className: "shrink-0", render: /* @__PURE__ */ jsx53(Collapsible.Trigger, { "aria-expanded": open, "aria-busy": pending && open ? true : void 0 }) }),
|
|
3982
3994
|
/* @__PURE__ */ jsx53(
|
|
3983
3995
|
Collapsible.Panel,
|
|
@@ -3997,7 +4009,7 @@ function UnreadDot({ className }) {
|
|
|
3997
4009
|
}
|
|
3998
4010
|
|
|
3999
4011
|
// src/NavItem.tsx
|
|
4000
|
-
import { jsx as jsx55, jsxs as
|
|
4012
|
+
import { jsx as jsx55, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4001
4013
|
function NavItem({
|
|
4002
4014
|
label,
|
|
4003
4015
|
href,
|
|
@@ -4036,7 +4048,7 @@ function NavItem({
|
|
|
4036
4048
|
const besides = buttons > 0 || hasRows;
|
|
4037
4049
|
const mark = unread ? urgent ? /* @__PURE__ */ jsx55(UrgentMark, {}) : /* @__PURE__ */ jsx55(UnreadDot, {}) : null;
|
|
4038
4050
|
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";
|
|
4039
|
-
const row = /* @__PURE__ */
|
|
4051
|
+
const row = /* @__PURE__ */ jsxs39(
|
|
4040
4052
|
"a",
|
|
4041
4053
|
{
|
|
4042
4054
|
href,
|
|
@@ -4110,7 +4122,7 @@ function NavItem({
|
|
|
4110
4122
|
);
|
|
4111
4123
|
if (!besides && hint == null) return row;
|
|
4112
4124
|
const name = menuLabel ?? `More options for ${label}`;
|
|
4113
|
-
const line = /* @__PURE__ */
|
|
4125
|
+
const line = /* @__PURE__ */ jsxs39("div", { className: "group/nav relative shrink-0", children: [
|
|
4114
4126
|
row,
|
|
4115
4127
|
hasRows && // `left-1`: the 24px button's 16px arrow then sits where the icon
|
|
4116
4128
|
// sits (the row's px-2), so the icon turns into the arrow in place.
|
|
@@ -4133,7 +4145,7 @@ function NavItem({
|
|
|
4133
4145
|
// right of the slot's centre.
|
|
4134
4146
|
// On a screen with no hover it always shows: nothing there can point
|
|
4135
4147
|
// at the row, and the menu has no other way in.
|
|
4136
|
-
/* @__PURE__ */
|
|
4148
|
+
/* @__PURE__ */ jsxs39("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: [
|
|
4137
4149
|
action && /* @__PURE__ */ jsx55(IconButton, { tooltip: action.tooltip, "aria-label": `${action.tooltip}: ${label}`, onClick: action.onClick, children: action.icon }),
|
|
4138
4150
|
menu != null && /* @__PURE__ */ jsx55(
|
|
4139
4151
|
Menu,
|
|
@@ -4146,7 +4158,7 @@ function NavItem({
|
|
|
4146
4158
|
] })
|
|
4147
4159
|
] });
|
|
4148
4160
|
if (!hasRows) return line;
|
|
4149
|
-
return /* @__PURE__ */
|
|
4161
|
+
return /* @__PURE__ */ jsxs39(Collapsible2.Root, { open, onOpenChange: setOpen, className: "flex shrink-0 flex-col", children: [
|
|
4150
4162
|
line,
|
|
4151
4163
|
/* @__PURE__ */ jsx55(
|
|
4152
4164
|
Collapsible2.Panel,
|
|
@@ -4162,7 +4174,7 @@ function NavItem({
|
|
|
4162
4174
|
|
|
4163
4175
|
// src/NavTree.tsx
|
|
4164
4176
|
import { createContext as createContext8, useContext as useContext8, useEffect as useEffect9, useRef as useRef15, useState as useState15 } from "react";
|
|
4165
|
-
import { jsx as jsx56, jsxs as
|
|
4177
|
+
import { jsx as jsx56, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4166
4178
|
var NAV_TREE_INTENT_MS = 150;
|
|
4167
4179
|
var NAV_TREE_REVEAL_MS = 200;
|
|
4168
4180
|
var NAV_TREE_PENDING_MS = 2e3;
|
|
@@ -4331,7 +4343,7 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
|
|
|
4331
4343
|
});
|
|
4332
4344
|
return (
|
|
4333
4345
|
// `contents`: a box to find the current row in, that lays nothing out — the groups stay the column's own.
|
|
4334
|
-
/* @__PURE__ */ jsx56("div", { ref: box, className: "contents", children: /* @__PURE__ */
|
|
4346
|
+
/* @__PURE__ */ jsx56("div", { ref: box, className: "contents", children: /* @__PURE__ */ jsxs40(groupLinked.Provider, { value: selectedGroup, children: [
|
|
4335
4347
|
title && /* @__PURE__ */ jsx56(SectionHeader, { title, look: "quiet", showActions: "always", actions: titleActions, className: "mt-4 shrink-0" }),
|
|
4336
4348
|
groups === void 0 ? children : groups === null ? /* @__PURE__ */ jsx56(SkeletonList, { rows: 5 }) : groups.length === 0 ? (
|
|
4337
4349
|
// No words, no line: an app that says nothing when it has no groups.
|
|
@@ -4344,7 +4356,7 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
|
|
|
4344
4356
|
// src/Popover.tsx
|
|
4345
4357
|
import { useMemo as useMemo4 } from "react";
|
|
4346
4358
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
4347
|
-
import { jsx as jsx57, jsxs as
|
|
4359
|
+
import { jsx as jsx57, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4348
4360
|
var GAP5 = 4;
|
|
4349
4361
|
var VIEWPORT_PAD5 = 8;
|
|
4350
4362
|
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
|
|
@@ -4353,7 +4365,7 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
4353
4365
|
if (anchor instanceof Element || "getBoundingClientRect" in anchor) return anchor;
|
|
4354
4366
|
return { getBoundingClientRect: () => anchor };
|
|
4355
4367
|
}, [anchor]);
|
|
4356
|
-
return /* @__PURE__ */
|
|
4368
|
+
return /* @__PURE__ */ jsxs41(
|
|
4357
4369
|
BasePopover.Root,
|
|
4358
4370
|
{
|
|
4359
4371
|
open,
|
|
@@ -4398,7 +4410,7 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
4398
4410
|
|
|
4399
4411
|
// src/SuggestionMenu.tsx
|
|
4400
4412
|
import { useCallback as useCallback5, useEffect as useEffect10, useId as useId5, useImperativeHandle, useMemo as useMemo5, useRef as useRef16, useState as useState16 } from "react";
|
|
4401
|
-
import { jsx as jsx58, jsxs as
|
|
4413
|
+
import { jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4402
4414
|
function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sections, itemKey, row, onSelect, handle }) {
|
|
4403
4415
|
const last = useRef16(null);
|
|
4404
4416
|
const anchor = useMemo5(() => {
|
|
@@ -4502,7 +4514,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
4502
4514
|
};
|
|
4503
4515
|
return (
|
|
4504
4516
|
// finalFocus={false}: focus never left the text, and a list that closes because focus moved elsewhere must not pull it back (71a4577b).
|
|
4505
|
-
/* @__PURE__ */ jsx58(Popover, { anchor, open: rect !== null, side: "top", align: "left", className: width, maxHeight, ariaLabel, finalFocus: false, children: /* @__PURE__ */ jsx58("div", { ref: keepFocus, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "flex flex-col gap-0.5", children: shown2.map((section, i) => /* @__PURE__ */
|
|
4517
|
+
/* @__PURE__ */ jsx58(Popover, { anchor, open: rect !== null, side: "top", align: "left", className: width, maxHeight, ariaLabel, finalFocus: false, children: /* @__PURE__ */ jsx58("div", { ref: keepFocus, id: listboxId, role: "listbox", "aria-label": ariaLabel, className: "flex flex-col gap-0.5", children: shown2.map((section, i) => /* @__PURE__ */ jsxs42("div", { className: "contents", children: [
|
|
4506
4518
|
i > 0 && /* @__PURE__ */ jsx58(MenuSeparator, {}),
|
|
4507
4519
|
section.label ? /* @__PURE__ */ jsx58("div", { role: "group", "aria-label": section.label, children: /* @__PURE__ */ jsx58(MenuSection, { label: section.label, className: section.className, children: section.items.map(drawRow) }) }) : section.items.map(drawRow)
|
|
4508
4520
|
] }, section.label ?? i)) }) })
|
|
@@ -4512,7 +4524,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
|
|
|
4512
4524
|
// src/ShowMore.tsx
|
|
4513
4525
|
import { useLayoutEffect as useLayoutEffect5, useRef as useRef17, useState as useState17 } from "react";
|
|
4514
4526
|
import { IconChevronDown as IconChevronDown4, IconChevronUp } from "@tabler/icons-react";
|
|
4515
|
-
import { jsx as jsx59, jsxs as
|
|
4527
|
+
import { jsx as jsx59, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4516
4528
|
var FADE = "linear-gradient(to top, transparent, black 40px)";
|
|
4517
4529
|
function ShowMore({ children, maxHeight = 96, contentClassName, className }) {
|
|
4518
4530
|
const box = useRef17(null);
|
|
@@ -4529,7 +4541,7 @@ function ShowMore({ children, maxHeight = 96, contentClassName, className }) {
|
|
|
4529
4541
|
return () => observer.disconnect();
|
|
4530
4542
|
}, [maxHeight]);
|
|
4531
4543
|
const cut = overflows && !open;
|
|
4532
|
-
return /* @__PURE__ */
|
|
4544
|
+
return /* @__PURE__ */ jsxs43("div", { className: cn("flex flex-col items-start", className), children: [
|
|
4533
4545
|
/* @__PURE__ */ jsx59("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 }),
|
|
4534
4546
|
overflows && /* @__PURE__ */ jsx59(Toggle, { open, onToggle: () => setOpen((o) => !o), className: "mt-1" })
|
|
4535
4547
|
] });
|
|
@@ -4623,13 +4635,13 @@ function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reaction
|
|
|
4623
4635
|
|
|
4624
4636
|
// src/PreviewCard.tsx
|
|
4625
4637
|
import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card";
|
|
4626
|
-
import { jsx as jsx62, jsxs as
|
|
4638
|
+
import { jsx as jsx62, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4627
4639
|
var GAP6 = 12;
|
|
4628
4640
|
var VIEWPORT_PAD6 = 8;
|
|
4629
4641
|
var OPEN_DELAY2 = 350;
|
|
4630
4642
|
var CLOSE_DELAY = 200;
|
|
4631
4643
|
function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, closeDelay = CLOSE_DELAY, className, contentClassName, wrapperClassName }) {
|
|
4632
|
-
return /* @__PURE__ */
|
|
4644
|
+
return /* @__PURE__ */ jsxs44(BasePreviewCard.Root, { children: [
|
|
4633
4645
|
/* @__PURE__ */ jsx62(
|
|
4634
4646
|
BasePreviewCard.Trigger,
|
|
4635
4647
|
{
|
|
@@ -4956,12 +4968,10 @@ function linkStateFrom(object, unread, options) {
|
|
|
4956
4968
|
const written = unread.url ? { url: unread.url } : {};
|
|
4957
4969
|
if (object === null) return { state: "unavailable", kind: unread.kind, noun: unread.noun, ...unread.deleted ? { deleted: true } : {}, ...written };
|
|
4958
4970
|
if (object.unreachable) {
|
|
4959
|
-
const href = object.openUrl && /^https:\/\//i.test(object.openUrl) ? object.openUrl : void 0;
|
|
4960
4971
|
return {
|
|
4961
4972
|
state: "unavailable",
|
|
4962
4973
|
kind: linkedKindOfKind(object.kind),
|
|
4963
4974
|
noun: nounOf(object) || unread.noun,
|
|
4964
|
-
...href ? { openIn: { app: object.appName ?? "its app", href } } : {},
|
|
4965
4975
|
...written
|
|
4966
4976
|
};
|
|
4967
4977
|
}
|
|
@@ -4971,7 +4981,7 @@ function linkStateFrom(object, unread, options) {
|
|
|
4971
4981
|
// src/LinkParts.tsx
|
|
4972
4982
|
import { useContext as useContext9 } from "react";
|
|
4973
4983
|
import { IconCircleCheck, IconCircleDashed as IconCircleDashed2, IconCircleHalf2, IconCircleX, IconFileText, IconMessage2 as IconMessage22 } from "@tabler/icons-react";
|
|
4974
|
-
import { jsx as jsx63, jsxs as
|
|
4984
|
+
import { jsx as jsx63, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4975
4985
|
var STATUS_ICON = {
|
|
4976
4986
|
neutral: { Icon: IconCircleDashed2, tone: "text-text-secondary" },
|
|
4977
4987
|
blue: { Icon: IconCircleHalf2, tone: "text-info-default" },
|
|
@@ -4983,7 +4993,7 @@ function StatusIcon({ colour }) {
|
|
|
4983
4993
|
return /* @__PURE__ */ jsx63(Icon, { size: 14, stroke: 1.5, className: cn("shrink-0", tone), "aria-hidden": true });
|
|
4984
4994
|
}
|
|
4985
4995
|
function StatusMark({ status }) {
|
|
4986
|
-
return /* @__PURE__ */
|
|
4996
|
+
return /* @__PURE__ */ jsxs45(WithTooltip, { label: status.label, inline: true, wrapperClassName: "inline-flex shrink-0 items-center", children: [
|
|
4987
4997
|
/* @__PURE__ */ jsx63(StatusIcon, { colour: status.colour }),
|
|
4988
4998
|
/* @__PURE__ */ jsx63("span", { className: "sr-only", children: status.label })
|
|
4989
4999
|
] });
|
|
@@ -5009,8 +5019,8 @@ function ProgressRing({ done, total }) {
|
|
|
5009
5019
|
const r = (size - stroke) / 2;
|
|
5010
5020
|
const c = 2 * Math.PI * r;
|
|
5011
5021
|
const share = total > 0 ? Math.min(done, total) / total : 0;
|
|
5012
|
-
return /* @__PURE__ */ jsx63(WithTooltip, { label: `${done} of ${total} done`, inline: true, wrapperClassName: "inline-flex shrink-0", children: /* @__PURE__ */
|
|
5013
|
-
/* @__PURE__ */
|
|
5022
|
+
return /* @__PURE__ */ jsx63(WithTooltip, { label: `${done} of ${total} done`, inline: true, wrapperClassName: "inline-flex shrink-0", children: /* @__PURE__ */ jsxs45("span", { className: "inline-flex shrink-0 items-center gap-1.5 text-small tabular-nums text-text-secondary", children: [
|
|
5023
|
+
/* @__PURE__ */ jsxs45("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, className: "shrink-0 -rotate-90", "aria-hidden": true, children: [
|
|
5014
5024
|
/* @__PURE__ */ jsx63("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, className: "stroke-border-default" }),
|
|
5015
5025
|
/* @__PURE__ */ jsx63("circle", { cx: size / 2, cy: size / 2, r, fill: "none", strokeWidth: stroke, strokeLinecap: "round", strokeDasharray: `${c * share} ${c}`, className: "stroke-success-default" })
|
|
5016
5026
|
] }),
|
|
@@ -5029,7 +5039,7 @@ function CommentCount({ conversation, noun = "comments" }) {
|
|
|
5029
5039
|
const boxed = useContext9(inTheBox);
|
|
5030
5040
|
const said = countWords(count, noun);
|
|
5031
5041
|
if (boxed || !href) {
|
|
5032
|
-
return /* @__PURE__ */
|
|
5042
|
+
return /* @__PURE__ */ jsxs45("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: [
|
|
5033
5043
|
/* @__PURE__ */ jsx63(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
5034
5044
|
/* @__PURE__ */ jsx63("span", { "aria-hidden": true, children: count }),
|
|
5035
5045
|
/* @__PURE__ */ jsx63("span", { className: "sr-only", children: unread ? `${said}, unread` : said }),
|
|
@@ -5044,7 +5054,7 @@ function CommentCount({ conversation, noun = "comments" }) {
|
|
|
5044
5054
|
* 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
|
|
5045
5055
|
* the small size (10px).
|
|
5046
5056
|
*/
|
|
5047
|
-
/* @__PURE__ */ jsx63("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__ */
|
|
5057
|
+
/* @__PURE__ */ jsx63("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__ */ jsxs45(Link, { href, variant: "plain", className: "flex h-full items-center gap-1 px-1.5", children: [
|
|
5048
5058
|
/* @__PURE__ */ jsx63(IconMessage22, { size: 14, stroke: 1.5, "aria-hidden": true }),
|
|
5049
5059
|
/* @__PURE__ */ jsx63("span", { "aria-hidden": true, children: count }),
|
|
5050
5060
|
/* @__PURE__ */ jsx63("span", { className: "sr-only", children: unread ? `${said}, unread \u2014 open the conversation` : `${said} \u2014 open the conversation` }),
|
|
@@ -5064,8 +5074,8 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false, di
|
|
|
5064
5074
|
return (
|
|
5065
5075
|
// As words, 16px apart, so the status and the person read as two things; as boxed pickers their borders already part them (Katerina, 29 Oct).
|
|
5066
5076
|
// 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).
|
|
5067
|
-
/* @__PURE__ */
|
|
5068
|
-
status && (statusWords ? /* @__PURE__ */
|
|
5077
|
+
/* @__PURE__ */ jsxs45("span", { className: cn("flex h-6 min-w-0 items-center text-caption text-text-secondary", statusWords || ownerWords ? "gap-4" : "gap-2"), children: [
|
|
5078
|
+
status && (statusWords ? /* @__PURE__ */ jsxs45("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
5069
5079
|
statusNow?.colour && /* @__PURE__ */ jsx63(StatusIcon, { colour: statusNow.colour }),
|
|
5070
5080
|
statusNow?.label ?? "No status"
|
|
5071
5081
|
] }) : /* @__PURE__ */ jsx63(
|
|
@@ -5081,7 +5091,7 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false, di
|
|
|
5081
5091
|
options: status.options.map((option) => ({ value: option.value, label: option.label, leading: option.colour && /* @__PURE__ */ jsx63(StatusIcon, { colour: option.colour }) }))
|
|
5082
5092
|
}
|
|
5083
5093
|
)),
|
|
5084
|
-
owner && (ownerWords ? /* @__PURE__ */
|
|
5094
|
+
owner && (ownerWords ? /* @__PURE__ */ jsxs45("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
|
|
5085
5095
|
/* @__PURE__ */ jsx63(OwnerFace, { option: ownerNow }),
|
|
5086
5096
|
/* @__PURE__ */ jsx63("span", { className: "truncate", children: ownerNow?.label ?? "Unassigned" })
|
|
5087
5097
|
] }) : /* @__PURE__ */ jsx63(
|
|
@@ -5110,18 +5120,17 @@ import { useContext as useContext11 } from "react";
|
|
|
5110
5120
|
|
|
5111
5121
|
// src/LinkRow.tsx
|
|
5112
5122
|
import { useContext as useContext10 } from "react";
|
|
5113
|
-
import {
|
|
5114
|
-
import { jsx as jsx64, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5123
|
+
import { jsx as jsx64, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5115
5124
|
var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
|
|
5116
|
-
function LinkUnavailable({ kind, noun,
|
|
5117
|
-
|
|
5125
|
+
function LinkUnavailable({ kind, noun, card = false, deleted = false }) {
|
|
5126
|
+
const word = /^[A-Z][a-z]*$/.test(noun) ? noun.toLowerCase() : noun;
|
|
5127
|
+
return /* @__PURE__ */ jsx64(UnavailableRow, { kind, words: deleted ? `${noun} deleted` : `You can't open this ${word}`, card });
|
|
5118
5128
|
}
|
|
5119
|
-
function UnavailableRow({ kind, words, href,
|
|
5129
|
+
function UnavailableRow({ kind, words, href, card = false }) {
|
|
5120
5130
|
const wide = useContext10(inTheBox);
|
|
5121
|
-
return /* @__PURE__ */
|
|
5131
|
+
return /* @__PURE__ */ jsxs46(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, "max-w-[480px]"), children: [
|
|
5122
5132
|
/* @__PURE__ */ jsx64("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx64(LinkedIcon, { kind }) }),
|
|
5123
|
-
/* @__PURE__ */ jsx64("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: href && !wide ? /* @__PURE__ */ jsx64(Link, { href, variant: "quiet", children: words }) : words })
|
|
5124
|
-
openIn && /* @__PURE__ */ jsx64(WithTooltip, { label: `Open in ${openIn.app}`, children: /* @__PURE__ */ jsx64(Button, { href: openIn.href, external: true, size: "small", className: "shrink-0", leadingIcon: /* @__PURE__ */ jsx64(IconExternalLink, { stroke: 1.5, className: "size-3.5" }), "aria-label": `Open in ${openIn.app}`, children: "Open" }) })
|
|
5133
|
+
/* @__PURE__ */ jsx64("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: href && !wide ? /* @__PURE__ */ jsx64(Link, { href, variant: "quiet", children: words }) : words })
|
|
5125
5134
|
] });
|
|
5126
5135
|
}
|
|
5127
5136
|
function linkMetaOf(linked, withWhen = false) {
|
|
@@ -5134,9 +5143,9 @@ function WrittenUrl({ url, block = false }) {
|
|
|
5134
5143
|
function LinkRow({ link, preview = true }) {
|
|
5135
5144
|
const width = "max-w-[480px]";
|
|
5136
5145
|
if (link.state === "loading") {
|
|
5137
|
-
return /* @__PURE__ */ jsx64("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */
|
|
5146
|
+
return /* @__PURE__ */ jsx64("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs46(Card, { fill: "inset", "aria-hidden": true, className: cn(ROW_CLASSES2, width), children: [
|
|
5138
5147
|
/* @__PURE__ */ jsx64("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx64(LinkedIcon, { kind: link.kind }) }),
|
|
5139
|
-
/* @__PURE__ */
|
|
5148
|
+
/* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
5140
5149
|
/* @__PURE__ */ jsx64(SkeletonBar, { on: "inset", className: "h-3 w-2/5" }),
|
|
5141
5150
|
/* @__PURE__ */ jsx64(SkeletonBar, { on: "inset", className: "h-2.5 w-1/4" })
|
|
5142
5151
|
] })
|
|
@@ -5144,28 +5153,28 @@ function LinkRow({ link, preview = true }) {
|
|
|
5144
5153
|
}
|
|
5145
5154
|
if (link.state === "unavailable") {
|
|
5146
5155
|
if (link.url) return /* @__PURE__ */ jsx64(WrittenUrl, { url: link.url, block: true });
|
|
5147
|
-
return /* @__PURE__ */ jsx64(LinkUnavailable, { kind: link.kind, noun: link.noun,
|
|
5156
|
+
return /* @__PURE__ */ jsx64(LinkUnavailable, { kind: link.kind, noun: link.noun, deleted: link.deleted });
|
|
5148
5157
|
}
|
|
5149
5158
|
const { linked } = link;
|
|
5150
5159
|
const status = chosenOf(linked.status);
|
|
5151
5160
|
const owner = chosenOf(linked.owner);
|
|
5152
5161
|
const said = linked.kind === "message" ? linked.author : void 0;
|
|
5153
5162
|
const meta = said ? "" : linkMetaOf(linked, true) || linked.summary;
|
|
5154
|
-
const row = /* @__PURE__ */
|
|
5163
|
+
const row = /* @__PURE__ */ jsxs46(Card, { fill: "inset", hover: "hairline", className: cn("relative", ROW_CLASSES2, width), children: [
|
|
5155
5164
|
/* @__PURE__ */ jsx64(LinkTile, { kind: linked.kind, author: said }),
|
|
5156
5165
|
said ? (
|
|
5157
5166
|
// Words a person wrote, on one line, as a quote is cut to one (Katerina, 30 Oct): the face, the name, the words
|
|
5158
5167
|
// cut to fit, the time.
|
|
5159
|
-
/* @__PURE__ */
|
|
5168
|
+
/* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 items-baseline gap-2", children: [
|
|
5160
5169
|
/* @__PURE__ */ jsx64("span", { className: "contents text-body-2-strong text-text-primary", children: linked.href ? /* @__PURE__ */ jsx64(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0", children: said.name }) : /* @__PURE__ */ jsx64("span", { className: "min-w-0 truncate", children: said.name }) }),
|
|
5161
5170
|
linked.body && /* @__PURE__ */ jsx64("span", { className: "min-w-0 flex-1 truncate text-caption text-text-secondary", children: linked.body }),
|
|
5162
5171
|
linked.updated && /* @__PURE__ */ jsx64("span", { className: cn("ml-auto shrink-0 text-caption text-text-muted", TIME_CLASSES), children: linked.updated })
|
|
5163
5172
|
] })
|
|
5164
|
-
) : /* @__PURE__ */
|
|
5173
|
+
) : /* @__PURE__ */ jsxs46("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
5165
5174
|
/* @__PURE__ */ jsx64("span", { className: "contents text-body-2-strong text-text-primary", children: linked.href ? /* @__PURE__ */ jsx64(Link, { href: linked.href, variant: "quiet", cover: true, truncate: true, children: linked.title }) : /* @__PURE__ */ jsx64("span", { className: "truncate", children: linked.title }) }),
|
|
5166
5175
|
meta && /* @__PURE__ */ jsx64("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
5167
5176
|
] }),
|
|
5168
|
-
/* @__PURE__ */
|
|
5177
|
+
/* @__PURE__ */ jsxs46("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
5169
5178
|
linked.done ? /* @__PURE__ */ jsx64(ProgressRing, { done: linked.done.done, total: linked.done.total }) : status?.colour && /* @__PURE__ */ jsx64(StatusMark, { status: { label: status.label, colour: status.colour } }),
|
|
5170
5179
|
linked.conversation && /* @__PURE__ */ jsx64(CommentCount, { conversation: linked.conversation, noun: linked.conversation.noun }),
|
|
5171
5180
|
owner && /* @__PURE__ */ jsx64(Avatar, { name: owner.label, src: owner.picture, bot: owner.bot, size: 16 }),
|
|
@@ -5177,7 +5186,7 @@ function LinkRow({ link, preview = true }) {
|
|
|
5177
5186
|
}
|
|
5178
5187
|
|
|
5179
5188
|
// src/LinkCard.tsx
|
|
5180
|
-
import { Fragment as Fragment17, jsx as jsx65, jsxs as
|
|
5189
|
+
import { Fragment as Fragment17, jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5181
5190
|
var CARD_CLASSES = "flex flex-col gap-3 p-3";
|
|
5182
5191
|
function CardLink({ href, truncate = false, className, children }) {
|
|
5183
5192
|
const boxed = useContext11(inTheBox);
|
|
@@ -5189,7 +5198,7 @@ function LinkCard({ link, readOnly = false, bare = false }) {
|
|
|
5189
5198
|
if (link.state === "loading") return /* @__PURE__ */ jsx65(LinkCardLoading, { kind: link.kind, shape: link.shape });
|
|
5190
5199
|
if (link.state === "unavailable") {
|
|
5191
5200
|
if (link.url) return /* @__PURE__ */ jsx65(WrittenUrl, { url: link.url, block: true });
|
|
5192
|
-
return /* @__PURE__ */ jsx65(LinkUnavailable, { kind: link.kind, noun: link.noun,
|
|
5201
|
+
return /* @__PURE__ */ jsx65(LinkUnavailable, { kind: link.kind, noun: link.noun, deleted: link.deleted, card: true });
|
|
5193
5202
|
}
|
|
5194
5203
|
const { linked } = link;
|
|
5195
5204
|
const body = linked.kind === "message" && linked.author ? /* @__PURE__ */ jsx65(SaidBody, { linked }) : /* @__PURE__ */ jsx65(CardBody, { linked, readOnly: readOnly || boxed });
|
|
@@ -5201,15 +5210,15 @@ function CardBody({ linked, readOnly }) {
|
|
|
5201
5210
|
const on = boxed ? "elevated" : "inset";
|
|
5202
5211
|
const meta = linkMetaOf(linked);
|
|
5203
5212
|
const footed = Boolean(linked.status || linked.owner || linked.authors || linked.updated);
|
|
5204
|
-
return /* @__PURE__ */
|
|
5205
|
-
/* @__PURE__ */
|
|
5213
|
+
return /* @__PURE__ */ jsxs47(Fragment17, { children: [
|
|
5214
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-3", children: [
|
|
5206
5215
|
/* @__PURE__ */ jsx65(LinkTile, { kind: linked.kind }),
|
|
5207
|
-
/* @__PURE__ */
|
|
5216
|
+
/* @__PURE__ */ jsxs47("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
5208
5217
|
/* @__PURE__ */ jsx65("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: /* @__PURE__ */ jsx65(CardLink, { href: linked.href, truncate: true, className: "block", children: linked.title }) }),
|
|
5209
5218
|
meta && /* @__PURE__ */ jsx65("span", { className: "truncate text-caption text-text-secondary", children: meta })
|
|
5210
5219
|
] }),
|
|
5211
5220
|
(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).
|
|
5212
|
-
/* @__PURE__ */
|
|
5221
|
+
/* @__PURE__ */ jsxs47("span", { className: "flex h-[19.6px] shrink-0 items-center gap-2 self-start", children: [
|
|
5213
5222
|
linked.done && /* @__PURE__ */ jsx65(ProgressRing, { done: linked.done.done, total: linked.done.total }),
|
|
5214
5223
|
linked.conversation && /* @__PURE__ */ jsx65(CommentCount, { conversation: linked.conversation, noun: linked.conversation.noun }),
|
|
5215
5224
|
linked.members && /* @__PURE__ */ jsx65(AvatarGroup, { members: linked.members, size: 16, on })
|
|
@@ -5217,17 +5226,17 @@ function CardBody({ linked, readOnly }) {
|
|
|
5217
5226
|
] }),
|
|
5218
5227
|
linked.summary && /* @__PURE__ */ jsx65("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.summary }),
|
|
5219
5228
|
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").
|
|
5220
|
-
/* @__PURE__ */ jsx65("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__ */
|
|
5229
|
+
/* @__PURE__ */ jsx65("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__ */ jsxs47("div", { className: cn("relative flex h-8 items-center gap-2 px-2", !boxed && "hover:bg-bg-active"), children: [
|
|
5221
5230
|
/* @__PURE__ */ jsx65(StatusMark, { status: child.status }),
|
|
5222
5231
|
child.key && /* @__PURE__ */ jsx65(LinkKey, { children: child.key }),
|
|
5223
5232
|
/* @__PURE__ */ jsx65("span", { className: "contents text-body-2 text-text-primary", children: boxed || !child.href ? /* @__PURE__ */ jsx65("span", { className: "min-w-0 flex-1 truncate", children: child.title }) : /* @__PURE__ */ jsx65(Link, { href: child.href, variant: "quiet", cover: true, truncate: true, className: "min-w-0 flex-1", children: child.title }) }),
|
|
5224
5233
|
child.owner ? /* @__PURE__ */ jsx65(Avatar, { name: child.owner.name, src: child.owner.picture, bot: child.owner.bot, size: 16 }) : /* @__PURE__ */ jsx65("span", { className: "size-4 shrink-0", "aria-hidden": true })
|
|
5225
5234
|
] }, child.id)) }),
|
|
5226
5235
|
linked.latest && // 12px between the words "Latest conversation" and the quote they name (Katerina, 29 Oct).
|
|
5227
|
-
/* @__PURE__ */
|
|
5236
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-3", children: [
|
|
5228
5237
|
/* @__PURE__ */ jsx65("span", { className: "text-caption text-text-muted", children: "Latest conversation" }),
|
|
5229
|
-
/* @__PURE__ */
|
|
5230
|
-
/* @__PURE__ */
|
|
5238
|
+
/* @__PURE__ */ jsxs47("div", { className: cn("flex flex-col gap-1", QUOTE_BAR_CLASSES), children: [
|
|
5239
|
+
/* @__PURE__ */ jsxs47("span", { className: "flex items-center gap-2 text-caption", children: [
|
|
5231
5240
|
/* @__PURE__ */ jsx65(Avatar, { name: linked.latest.author.name, src: linked.latest.author.picture, bot: linked.latest.author.bot, size: 16 }),
|
|
5232
5241
|
/* @__PURE__ */ jsx65("span", { className: "text-text-primary", children: linked.latest.author.name }),
|
|
5233
5242
|
/* @__PURE__ */ jsx65("span", { className: cn("text-text-muted", TIME_CLASSES), children: linked.latest.at })
|
|
@@ -5235,15 +5244,15 @@ function CardBody({ linked, readOnly }) {
|
|
|
5235
5244
|
/* @__PURE__ */ jsx65("p", { className: "line-clamp-2 text-body-2 text-text-secondary", children: linked.latest.body })
|
|
5236
5245
|
] })
|
|
5237
5246
|
] }),
|
|
5238
|
-
footed && /* @__PURE__ */
|
|
5247
|
+
footed && /* @__PURE__ */ jsxs47("div", { className: "flex min-h-6 items-center gap-2", children: [
|
|
5239
5248
|
(linked.status || linked.owner) && /* @__PURE__ */ jsx65(LinkPickers, { status: linked.status, owner: linked.owner, ownerLabel: linked.ownerLabel, readOnly }),
|
|
5240
|
-
linked.authors ? /* @__PURE__ */
|
|
5249
|
+
linked.authors ? /* @__PURE__ */ jsxs47("span", { className: "flex min-w-0 items-center gap-2 text-caption text-text-secondary", children: [
|
|
5241
5250
|
/* @__PURE__ */ jsx65(AvatarGroup, { members: linked.authors, size: 16, on }),
|
|
5242
|
-
linked.updated && /* @__PURE__ */
|
|
5251
|
+
linked.updated && /* @__PURE__ */ jsxs47("span", { className: "shrink-0 italic", children: [
|
|
5243
5252
|
"Updated ",
|
|
5244
5253
|
linked.updated
|
|
5245
5254
|
] })
|
|
5246
|
-
] }) : !linked.status && !linked.owner && linked.updated && /* @__PURE__ */
|
|
5255
|
+
] }) : !linked.status && !linked.owner && linked.updated && /* @__PURE__ */ jsxs47("span", { className: "text-caption italic text-text-secondary", children: [
|
|
5247
5256
|
"Updated ",
|
|
5248
5257
|
linked.updated
|
|
5249
5258
|
] })
|
|
@@ -5252,8 +5261,8 @@ function CardBody({ linked, readOnly }) {
|
|
|
5252
5261
|
}
|
|
5253
5262
|
function SaidBody({ linked }) {
|
|
5254
5263
|
const author = linked.author;
|
|
5255
|
-
return /* @__PURE__ */
|
|
5256
|
-
/* @__PURE__ */
|
|
5264
|
+
return /* @__PURE__ */ jsxs47(Fragment17, { children: [
|
|
5265
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-2", children: [
|
|
5257
5266
|
/* @__PURE__ */ jsx65(Avatar, { name: author.name, src: author.picture, bot: author.bot, size: 24 }),
|
|
5258
5267
|
/* @__PURE__ */ jsx65("span", { className: "text-body-2-strong text-text-primary", children: linked.updated ? author.name : /* @__PURE__ */ jsx65(CardLink, { href: linked.href, children: author.name }) }),
|
|
5259
5268
|
linked.updated && /* @__PURE__ */ jsx65("span", { className: cn("text-caption text-text-muted", TIME_CLASSES), children: /* @__PURE__ */ jsx65(CardLink, { href: linked.href, children: linked.updated }) })
|
|
@@ -5272,10 +5281,10 @@ var KIND_SHAPE = {
|
|
|
5272
5281
|
function LinkCardLoading({ kind, shape }) {
|
|
5273
5282
|
const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
|
|
5274
5283
|
const boxed = useContext11(inTheBox);
|
|
5275
|
-
return /* @__PURE__ */ jsx65("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */
|
|
5276
|
-
/* @__PURE__ */
|
|
5284
|
+
return /* @__PURE__ */ jsx65("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs47(Card, { fill: boxed ? "elevated" : "inset", "aria-hidden": true, className: cn(CARD_CLASSES, "max-w-[480px]"), children: [
|
|
5285
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex items-center gap-3", children: [
|
|
5277
5286
|
/* @__PURE__ */ jsx65("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx65(LinkedIcon, { kind }) }),
|
|
5278
|
-
/* @__PURE__ */
|
|
5287
|
+
/* @__PURE__ */ jsxs47("span", { className: "flex min-w-0 flex-1 flex-col gap-1.5", children: [
|
|
5279
5288
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3.5 w-1/2" }),
|
|
5280
5289
|
subtitle && /* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-2.5 w-20" })
|
|
5281
5290
|
] }),
|
|
@@ -5283,18 +5292,18 @@ function LinkCardLoading({ kind, shape }) {
|
|
|
5283
5292
|
] }),
|
|
5284
5293
|
summary && /* @__PURE__ */ jsx65("div", { className: "flex h-[19.6px] items-center", children: /* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3 w-4/5" }) }),
|
|
5285
5294
|
rows > 0 && /* @__PURE__ */ jsx65("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__ */ jsx65("div", { className: "flex h-8 items-center px-2", children: /* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3 w-1/3" }) }, i)) }),
|
|
5286
|
-
latest && /* @__PURE__ */
|
|
5295
|
+
latest && /* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-3", children: [
|
|
5287
5296
|
/* @__PURE__ */ jsx65("div", { className: "flex h-[14.4px] items-center", children: /* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-2.5 w-28" }) }),
|
|
5288
|
-
/* @__PURE__ */
|
|
5297
|
+
/* @__PURE__ */ jsxs47("div", { className: cn("flex h-[57.6px] flex-col justify-center gap-2", QUOTE_BAR_CLASSES), children: [
|
|
5289
5298
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-2.5 w-24" }),
|
|
5290
5299
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3 w-full" }),
|
|
5291
5300
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3 w-3/5" })
|
|
5292
5301
|
] })
|
|
5293
5302
|
] }),
|
|
5294
|
-
footer !== "none" && /* @__PURE__ */ jsx65("div", { className: "flex min-h-6 items-center gap-2", children: footer === "pickers" ? /* @__PURE__ */
|
|
5303
|
+
footer !== "none" && /* @__PURE__ */ jsx65("div", { className: "flex min-h-6 items-center gap-2", children: footer === "pickers" ? /* @__PURE__ */ jsxs47(Fragment17, { children: [
|
|
5295
5304
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-24" }),
|
|
5296
5305
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", shape: "control", className: "h-6 w-28" })
|
|
5297
|
-
] }) : footer === "people" ? /* @__PURE__ */
|
|
5306
|
+
] }) : footer === "people" ? /* @__PURE__ */ jsxs47(Fragment17, { children: [
|
|
5298
5307
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", shape: "round", className: "size-4" }),
|
|
5299
5308
|
/* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3 w-40" })
|
|
5300
5309
|
] }) : /* @__PURE__ */ jsx65(SkeletonBar, { on: "inset", className: "h-3 w-40" }) })
|
|
@@ -5328,14 +5337,14 @@ function LinkPreviewOpen({ linked }) {
|
|
|
5328
5337
|
}
|
|
5329
5338
|
|
|
5330
5339
|
// src/LinkChip.tsx
|
|
5331
|
-
import { jsx as jsx67, jsxs as
|
|
5340
|
+
import { jsx as jsx67, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5332
5341
|
function LinkChip({ link, preview = true }) {
|
|
5333
5342
|
if (link.state === "loading") {
|
|
5334
5343
|
return /* @__PURE__ */ jsx67(InlineChip, { icon: /* @__PURE__ */ jsx67(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), "aria-busy": true, children: /* @__PURE__ */ jsx67(SkeletonBar, { className: "h-2.5 w-16" }) });
|
|
5335
5344
|
}
|
|
5336
5345
|
if (link.state === "unavailable") {
|
|
5337
5346
|
if (link.url) return /* @__PURE__ */ jsx67(WrittenUrl, { url: link.url });
|
|
5338
|
-
return /* @__PURE__ */
|
|
5347
|
+
return /* @__PURE__ */ jsxs48(InlineChip, { tone: "muted", icon: /* @__PURE__ */ jsx67(LinkedIcon, { kind: link.kind, size: 14, tone: "inherit" }), children: [
|
|
5339
5348
|
link.noun,
|
|
5340
5349
|
" ",
|
|
5341
5350
|
link.deleted ? "deleted" : "not available"
|
|
@@ -5344,7 +5353,7 @@ function LinkChip({ link, preview = true }) {
|
|
|
5344
5353
|
const { linked } = link;
|
|
5345
5354
|
const status = chosenOf(linked.status);
|
|
5346
5355
|
const said = linked.kind === "message" && linked.author;
|
|
5347
|
-
const chip = /* @__PURE__ */
|
|
5356
|
+
const chip = /* @__PURE__ */ jsxs48(
|
|
5348
5357
|
InlineChip,
|
|
5349
5358
|
{
|
|
5350
5359
|
icon: said ? /* @__PURE__ */ jsx67(Avatar, { name: said.name, src: said.picture, bot: said.bot, size: 14 }) : /* @__PURE__ */ jsx67(LinkedIcon, { kind: linked.kind, size: 14, tone: "inherit" }),
|
|
@@ -5363,7 +5372,7 @@ function LinkChip({ link, preview = true }) {
|
|
|
5363
5372
|
|
|
5364
5373
|
// src/AttachedCard.tsx
|
|
5365
5374
|
import { createContext as createContext10, useContext as useContext12, useEffect as useEffect11, useRef as useRef18 } from "react";
|
|
5366
|
-
import { Fragment as Fragment19, jsx as jsx68, jsxs as
|
|
5375
|
+
import { Fragment as Fragment19, jsx as jsx68, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5367
5376
|
var Attached = createContext10(false);
|
|
5368
5377
|
function useRememberedHeight(link, remember, box) {
|
|
5369
5378
|
const memory = remember?.memory;
|
|
@@ -5405,7 +5414,7 @@ function AttachedCard({ link, children, onRemove, remember }) {
|
|
|
5405
5414
|
}
|
|
5406
5415
|
return (
|
|
5407
5416
|
// At most 480px, so it never runs a column's or a wide box's whole width (Katerina, 29 and 30 Oct).
|
|
5408
|
-
/* @__PURE__ */
|
|
5417
|
+
/* @__PURE__ */ jsxs49("div", { ref: box, className: "group/card relative max-w-[480px]", style: held, children: [
|
|
5409
5418
|
/* @__PURE__ */ jsx68(Attached.Provider, { value: true, children: card }),
|
|
5410
5419
|
onRemove && /* @__PURE__ */ jsx68(
|
|
5411
5420
|
RemoveBadge,
|
|
@@ -5421,22 +5430,22 @@ function AttachedCard({ link, children, onRemove, remember }) {
|
|
|
5421
5430
|
|
|
5422
5431
|
// src/PartCard.tsx
|
|
5423
5432
|
import { useContext as useContext13 } from "react";
|
|
5424
|
-
import { jsx as jsx69, jsxs as
|
|
5425
|
-
function PartCard({ state = "ready", kind, heading, href, partKey, noun,
|
|
5433
|
+
import { jsx as jsx69, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5434
|
+
function PartCard({ state = "ready", kind, heading, href, partKey, noun, children, maxHeight }) {
|
|
5426
5435
|
const word = noun ?? kindNounOf({ kind }) ?? "File";
|
|
5427
5436
|
const boxed = useContext13(inTheBox);
|
|
5428
5437
|
if (state === "loading") return /* @__PURE__ */ jsx69(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
5429
5438
|
if (state === "unavailable" || state === "deleted") {
|
|
5430
|
-
return /* @__PURE__ */ jsx69(LinkUnavailable, { kind, noun: `A part of this ${word.toLowerCase()}
|
|
5439
|
+
return /* @__PURE__ */ jsx69(LinkUnavailable, { kind, noun: state === "deleted" ? `A part of this ${word.toLowerCase()}` : word, deleted: state === "deleted", card: true });
|
|
5431
5440
|
}
|
|
5432
5441
|
if (state === "detached") return /* @__PURE__ */ jsx69(UnavailableRow, { kind, words: "This part was deleted", card: true });
|
|
5433
5442
|
if (state === "unaddressable") return /* @__PURE__ */ jsx69(UnavailableRow, { kind, words: "This part can't be shown", href, card: true });
|
|
5434
5443
|
return (
|
|
5435
5444
|
// At most 480px wide, in a box too; in a box being written in, on the files' fill as the card beside it is.
|
|
5436
|
-
/* @__PURE__ */
|
|
5437
|
-
/* @__PURE__ */
|
|
5445
|
+
/* @__PURE__ */ jsxs50(Card, { fill: boxed ? "elevated" : "inset", className: "flex max-w-[480px] flex-col gap-3 p-3", children: [
|
|
5446
|
+
/* @__PURE__ */ jsxs50("div", { className: "flex items-center gap-3", children: [
|
|
5438
5447
|
/* @__PURE__ */ jsx69(LinkTile, { kind }),
|
|
5439
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ jsxs50("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
5440
5449
|
/* @__PURE__ */ jsx69("span", { className: "block min-w-0 text-body-2-strong text-text-primary", children: href && !boxed ? /* @__PURE__ */ jsx69(Link, { href, variant: "quiet", truncate: true, className: "block", children: heading }) : /* @__PURE__ */ jsx69("span", { className: "block truncate", children: heading }) }),
|
|
5441
5450
|
/* @__PURE__ */ jsx69("span", { className: "truncate text-caption text-text-secondary", children: partKey ? `A part of ${partKey}` : `A part of this ${word.toLowerCase()}` })
|
|
5442
5451
|
] })
|
|
@@ -5453,10 +5462,10 @@ function Rail({ "aria-label": ariaLabel = "Navigation", children, className }) {
|
|
|
5453
5462
|
}
|
|
5454
5463
|
|
|
5455
5464
|
// src/RailItem.tsx
|
|
5456
|
-
import { jsx as jsx71, jsxs as
|
|
5465
|
+
import { jsx as jsx71, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5457
5466
|
function RailItem({ href, icon, label, active = false, className, onClick, ...props }) {
|
|
5458
5467
|
const inApp = useInAppClick(href, onClick);
|
|
5459
|
-
return /* @__PURE__ */
|
|
5468
|
+
return /* @__PURE__ */ jsxs51(
|
|
5460
5469
|
"a",
|
|
5461
5470
|
{
|
|
5462
5471
|
href,
|
|
@@ -5491,7 +5500,7 @@ function RailItem({ href, icon, label, active = false, className, onClick, ...pr
|
|
|
5491
5500
|
}
|
|
5492
5501
|
|
|
5493
5502
|
// src/Property.tsx
|
|
5494
|
-
import { jsx as jsx72, jsxs as
|
|
5503
|
+
import { jsx as jsx72, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5495
5504
|
var VALUE_CLASSES = "contents";
|
|
5496
5505
|
function Property({ label, layout = "row", children, className }) {
|
|
5497
5506
|
if (layout === "stacked") {
|
|
@@ -5499,13 +5508,13 @@ function Property({ label, layout = "row", children, className }) {
|
|
|
5499
5508
|
// gap-3 — the one label-above-content distance (Katerina, 2026-09-01):
|
|
5500
5509
|
// Peek's topic-details sections already sit at 12px, Ship's rail was
|
|
5501
5510
|
// 6px, and unifying means the bigger, calmer one.
|
|
5502
|
-
/* @__PURE__ */
|
|
5511
|
+
/* @__PURE__ */ jsxs52("dl", { className: cn("flex flex-col gap-3", className), children: [
|
|
5503
5512
|
/* @__PURE__ */ jsx72("dt", { className: "text-menu uppercase tracking-widest text-text-secondary", children: label }),
|
|
5504
5513
|
/* @__PURE__ */ jsx72("dd", { className: VALUE_CLASSES, children })
|
|
5505
5514
|
] })
|
|
5506
5515
|
);
|
|
5507
5516
|
}
|
|
5508
|
-
return /* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ jsxs52("dl", { className: cn("flex items-center gap-2", className), children: [
|
|
5509
5518
|
/* @__PURE__ */ jsx72("dt", { className: "w-[68px] shrink-0 text-caption text-text-secondary", children: label }),
|
|
5510
5519
|
/* @__PURE__ */ jsx72("dd", { className: VALUE_CLASSES, children })
|
|
5511
5520
|
] });
|
|
@@ -5513,11 +5522,11 @@ function Property({ label, layout = "row", children, className }) {
|
|
|
5513
5522
|
|
|
5514
5523
|
// src/Reaction.tsx
|
|
5515
5524
|
import { Toggle as Toggle2 } from "@base-ui/react/toggle";
|
|
5516
|
-
import { jsx as jsx73, jsxs as
|
|
5525
|
+
import { jsx as jsx73, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5517
5526
|
function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
5518
5527
|
return (
|
|
5519
5528
|
// @estiva-escape(no-copied-look): W1 (Katerina, 24 September: leave alone): a reaction pill shares four words with a field's box by coincidence
|
|
5520
|
-
/* @__PURE__ */
|
|
5529
|
+
/* @__PURE__ */ jsxs53(
|
|
5521
5530
|
Toggle2,
|
|
5522
5531
|
{
|
|
5523
5532
|
pressed,
|
|
@@ -5550,7 +5559,7 @@ function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
|
5550
5559
|
// src/ConversationActions.tsx
|
|
5551
5560
|
import { useState as useState18 } from "react";
|
|
5552
5561
|
import { IconCircleCheck as IconCircleCheck2, IconCircleDashed as IconCircleDashed3, IconMessage2 as IconMessage23, IconMoodPlus } from "@tabler/icons-react";
|
|
5553
|
-
import { Fragment as Fragment20, jsx as jsx74, jsxs as
|
|
5562
|
+
import { Fragment as Fragment20, jsx as jsx74, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5554
5563
|
function ConversationActions({ options, onReact, onReply, resolved = false, onResolve, onReopen, onPickerOpenChange, more, className }) {
|
|
5555
5564
|
const [picking, setPicking] = useState18(false);
|
|
5556
5565
|
const [strip, setStrip] = useState18(null);
|
|
@@ -5560,7 +5569,7 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5560
5569
|
};
|
|
5561
5570
|
const resolves = resolved ? onReopen : onResolve;
|
|
5562
5571
|
const answers = !!onReact && !!options || !!onReply;
|
|
5563
|
-
return /* @__PURE__ */ jsx74("div", { ref: setStrip, className: cn("inline-flex", className), children: /* @__PURE__ */
|
|
5572
|
+
return /* @__PURE__ */ jsx74("div", { ref: setStrip, className: cn("inline-flex", className), children: /* @__PURE__ */ jsxs54(Toolbar, { "aria-label": "Actions", children: [
|
|
5564
5573
|
onReact && options && /* @__PURE__ */ jsx74(
|
|
5565
5574
|
Popover,
|
|
5566
5575
|
{
|
|
@@ -5587,11 +5596,11 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
|
|
|
5587
5596
|
}
|
|
5588
5597
|
),
|
|
5589
5598
|
onReply && /* @__PURE__ */ jsx74(ToolbarButton, { tooltip: "Reply", "aria-label": "Reply", onClick: onReply, children: /* @__PURE__ */ jsx74(IconMessage23, { size: 16, stroke: 1.5 }) }),
|
|
5590
|
-
resolves && /* @__PURE__ */
|
|
5599
|
+
resolves && /* @__PURE__ */ jsxs54(Fragment20, { children: [
|
|
5591
5600
|
answers && /* @__PURE__ */ jsx74(ToolbarSeparator, {}),
|
|
5592
5601
|
resolved ? /* @__PURE__ */ jsx74(ToolbarButton, { tooltip: "Reopen", "aria-label": "Reopen", onClick: onReopen, children: /* @__PURE__ */ jsx74(IconCircleDashed3, { size: 16, stroke: 1.5 }) }) : /* @__PURE__ */ jsx74(ToolbarButton, { variant: "resolve", tooltip: "Resolve", "aria-label": "Resolve", onClick: onResolve, children: /* @__PURE__ */ jsx74(IconCircleCheck2, { size: 16, stroke: 1.5 }) })
|
|
5593
5602
|
] }),
|
|
5594
|
-
more && /* @__PURE__ */
|
|
5603
|
+
more && /* @__PURE__ */ jsxs54(Fragment20, { children: [
|
|
5595
5604
|
(answers || resolves) && /* @__PURE__ */ jsx74(ToolbarSeparator, {}),
|
|
5596
5605
|
more
|
|
5597
5606
|
] })
|
|
@@ -5604,18 +5613,18 @@ import { IconArrowNarrowRight, IconCircleCheck as IconCircleCheck4, IconDotsVert
|
|
|
5604
5613
|
|
|
5605
5614
|
// src/ConversationMenu.tsx
|
|
5606
5615
|
import { IconCircleCheck as IconCircleCheck3, IconCircleDashed as IconCircleDashed4, IconDotsVertical as IconDotsVertical3 } from "@tabler/icons-react";
|
|
5607
|
-
import { Fragment as Fragment21, jsx as jsx75, jsxs as
|
|
5616
|
+
import { Fragment as Fragment21, jsx as jsx75, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
5608
5617
|
function ConversationMenu({ resolved = false, onResolve, onReopen, resolveHint, children, label, onEdit, editLabel = "Edit", after, onDelete, deleteLabel = "Delete", moreLabel = "More actions", open, onOpenChange, trigger }) {
|
|
5609
5618
|
const resolves = resolved ? onReopen : onResolve;
|
|
5610
|
-
const first = (resolves || children) && /* @__PURE__ */
|
|
5619
|
+
const first = (resolves || children) && /* @__PURE__ */ jsxs55(Fragment21, { children: [
|
|
5611
5620
|
resolves && (resolved ? /* @__PURE__ */ jsx75(MenuItem, { leading: /* @__PURE__ */ jsx75(IconCircleDashed4, { size: 16, stroke: 1.5, className: "text-text-secondary" }), label: "Reopen", onClick: onReopen }) : /* @__PURE__ */ jsx75(MenuItem, { leading: /* @__PURE__ */ jsx75(IconCircleCheck3, { size: 16, stroke: 1.5, className: "text-text-secondary" }), label: "Resolve", shortcut: resolveHint, onClick: onResolve })),
|
|
5612
5621
|
children
|
|
5613
5622
|
] });
|
|
5614
|
-
const middle = (onEdit || after) && /* @__PURE__ */
|
|
5623
|
+
const middle = (onEdit || after) && /* @__PURE__ */ jsxs55(Fragment21, { children: [
|
|
5615
5624
|
onEdit && /* @__PURE__ */ jsx75(MenuItem, { label: editLabel, onClick: onEdit }),
|
|
5616
5625
|
after
|
|
5617
5626
|
] });
|
|
5618
|
-
return /* @__PURE__ */
|
|
5627
|
+
return /* @__PURE__ */ jsxs55(
|
|
5619
5628
|
Menu,
|
|
5620
5629
|
{
|
|
5621
5630
|
trigger: trigger ?? /* @__PURE__ */ jsx75(IconButton, { tooltip: moreLabel, "aria-label": moreLabel, children: /* @__PURE__ */ jsx75(IconDotsVertical3, { size: 16, stroke: 1.5 }) }),
|
|
@@ -5752,7 +5761,7 @@ function MetaText({ children, tone = "muted", size = "caption", className }) {
|
|
|
5752
5761
|
// src/ReactionRow.tsx
|
|
5753
5762
|
import { useState as useState20 } from "react";
|
|
5754
5763
|
import { IconMoodPlus as IconMoodPlus2 } from "@tabler/icons-react";
|
|
5755
|
-
import { jsx as jsx78, jsxs as
|
|
5764
|
+
import { jsx as jsx78, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
5756
5765
|
var NAMED = 8;
|
|
5757
5766
|
var meaningOf = (options, emoji) => options.find((o) => o.emoji === emoji)?.label ?? emoji;
|
|
5758
5767
|
function whoReacted(reaction, nameOf, options, viewer) {
|
|
@@ -5795,7 +5804,7 @@ function AddReactionButton({ options, onPick, className }) {
|
|
|
5795
5804
|
function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }) {
|
|
5796
5805
|
const shown2 = reactions.filter((r) => r.by.length > 0);
|
|
5797
5806
|
if (shown2.length === 0) return null;
|
|
5798
|
-
return /* @__PURE__ */
|
|
5807
|
+
return /* @__PURE__ */ jsxs56("div", { "data-reaction-row": true, className: cn("flex flex-wrap items-center gap-1", className), children: [
|
|
5799
5808
|
shown2.map((r) => /* @__PURE__ */ jsx78(WithTooltip, { label: whoReacted(r, nameOf, options, viewer), children: /* @__PURE__ */ jsx78(
|
|
5800
5809
|
Reaction,
|
|
5801
5810
|
{
|
|
@@ -5813,7 +5822,7 @@ function ReactionRow({ reactions, options, nameOf, viewer, onToggle, className }
|
|
|
5813
5822
|
|
|
5814
5823
|
// src/RepliesRow.tsx
|
|
5815
5824
|
import { IconChevronRight as IconChevronRight4, IconMessage2 as IconMessage24 } from "@tabler/icons-react";
|
|
5816
|
-
import { Fragment as Fragment22, jsx as jsx79, jsxs as
|
|
5825
|
+
import { Fragment as Fragment22, jsx as jsx79, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
5817
5826
|
var ROW_CLASSES3 = "flex w-full items-center gap-2 pb-1.5 pl-8 pr-2";
|
|
5818
5827
|
var OPEN_CLASSES = "border-accent-outline bg-accent-wash";
|
|
5819
5828
|
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";
|
|
@@ -5822,7 +5831,7 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
5822
5831
|
const label = `${count} ${count === 1 ? "reply" : "replies"}`;
|
|
5823
5832
|
const fresh = newCount ?? (isNew ? 1 : 0);
|
|
5824
5833
|
const name = newCount ? `${label}, ${newCount} new` : label;
|
|
5825
|
-
const inner = /* @__PURE__ */
|
|
5834
|
+
const inner = /* @__PURE__ */ jsxs57(Fragment22, { children: [
|
|
5826
5835
|
withFaces && /* @__PURE__ */ jsx79("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ jsx79(AvatarGroup, { size: 18, members: faces.map((f) => ({ name: f.name, picture: f.picture, bot: f.bot })) }) }),
|
|
5827
5836
|
/* @__PURE__ */ jsx79(
|
|
5828
5837
|
IconMessage24,
|
|
@@ -5846,19 +5855,19 @@ function RepliesRow({ count, faces, last, isNew = false, newCount, urgent = fals
|
|
|
5846
5855
|
}
|
|
5847
5856
|
)
|
|
5848
5857
|
] });
|
|
5849
|
-
const chip = fresh > 0 && /* @__PURE__ */
|
|
5858
|
+
const chip = fresh > 0 && /* @__PURE__ */ jsxs57(Fragment22, { children: [
|
|
5850
5859
|
/* @__PURE__ */ jsx79("span", { className: "h-0.5 w-0.5 shrink-0 rounded-full bg-text-muted" }),
|
|
5851
5860
|
/* @__PURE__ */ jsx79(Chip, { type: urgent ? "warning" : "brand", label: `${fresh} new` })
|
|
5852
5861
|
] });
|
|
5853
5862
|
if (!onOpen) {
|
|
5854
|
-
return /* @__PURE__ */
|
|
5863
|
+
return /* @__PURE__ */ jsxs57("div", { className: ROW_CLASSES3, children: [
|
|
5855
5864
|
/* @__PURE__ */ jsx79("div", { className: BOX_CLASSES, children: inner }),
|
|
5856
5865
|
chip
|
|
5857
5866
|
] });
|
|
5858
5867
|
}
|
|
5859
5868
|
return (
|
|
5860
5869
|
// @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
|
|
5861
|
-
/* @__PURE__ */
|
|
5870
|
+
/* @__PURE__ */ jsxs57("button", { type: "button", className: cn(ROW_CLASSES3, "cursor-pointer text-left"), onClick: onOpen, "aria-expanded": open, "aria-label": `${name}, ${open ? "close" : "open"} the thread`, "data-interactive": true, children: [
|
|
5862
5871
|
/* @__PURE__ */ jsx79("span", { className: cn(BOX_CLASSES, open && OPEN_CLASSES), children: inner }),
|
|
5863
5872
|
chip
|
|
5864
5873
|
] })
|
|
@@ -5919,7 +5928,7 @@ function useFaceLine(root, active, toDot = false) {
|
|
|
5919
5928
|
}
|
|
5920
5929
|
|
|
5921
5930
|
// src/ConversationCard.tsx
|
|
5922
|
-
import { Fragment as Fragment23, jsx as jsx81, jsxs as
|
|
5931
|
+
import { Fragment as Fragment23, jsx as jsx81, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5923
5932
|
function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
5924
5933
|
const at = momentOf(given);
|
|
5925
5934
|
const exact = at === void 0 ? void 0 : exactTime(at);
|
|
@@ -5930,8 +5939,8 @@ function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
|
|
|
5930
5939
|
return /* @__PURE__ */ jsx81(MetaText, { className: "shrink-0", children: exact ? /* @__PURE__ */ jsx81(WithTooltip, { label: exact, children: said }) : time });
|
|
5931
5940
|
}
|
|
5932
5941
|
function Head({ author, time, at, timeHref, timeLabel, edited, isNew, urgent, meta }) {
|
|
5933
|
-
return /* @__PURE__ */
|
|
5934
|
-
/* @__PURE__ */
|
|
5942
|
+
return /* @__PURE__ */ jsxs58("div", { className: "flex w-full items-center gap-2", children: [
|
|
5943
|
+
/* @__PURE__ */ jsxs58("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
5935
5944
|
/* @__PURE__ */ jsx81("span", { "data-face": true, className: "relative flex shrink-0", children: /* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }) }),
|
|
5936
5945
|
/* @__PURE__ */ jsx81("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
5937
5946
|
/* @__PURE__ */ jsx81(When, { time, at, timeHref, timeLabel }),
|
|
@@ -5946,13 +5955,13 @@ function attentionOf(fresh, urgent, inThreadCard) {
|
|
|
5946
5955
|
return urgent ? "warning" : "accent";
|
|
5947
5956
|
}
|
|
5948
5957
|
function EndedLine({ by, note, at }) {
|
|
5949
|
-
return /* @__PURE__ */
|
|
5958
|
+
return /* @__PURE__ */ jsxs58("div", { "data-resolved": "line", className: "relative flex items-start py-1", children: [
|
|
5950
5959
|
/* @__PURE__ */ jsx81("span", { className: "flex h-[17px] w-10 shrink-0 items-center justify-center", children: /* @__PURE__ */ jsx81("span", { "data-dot": true, className: "relative z-10 flex size-2 items-center justify-center rounded-full bg-bg-surface", children: /* @__PURE__ */ jsx81("span", { className: "size-1 rounded-full bg-success-default" }) }) }),
|
|
5951
|
-
/* @__PURE__ */
|
|
5960
|
+
/* @__PURE__ */ jsxs58("p", { className: "min-w-0 text-h5 leading-snug", children: [
|
|
5952
5961
|
/* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-text-primary", children: by }),
|
|
5953
5962
|
/* @__PURE__ */ jsx81(IconArrowNarrowRight, { size: 12, stroke: 1.5, className: "mx-1.5 -mt-px inline shrink-0 text-text-primary" }),
|
|
5954
5963
|
/* @__PURE__ */ jsx81("span", { className: "text-text-secondary", children: note }),
|
|
5955
|
-
at && /* @__PURE__ */
|
|
5964
|
+
at && /* @__PURE__ */ jsxs58(MetaText, { size: "chip", children: [
|
|
5956
5965
|
" \xB7 ",
|
|
5957
5966
|
at
|
|
5958
5967
|
] })
|
|
@@ -5961,7 +5970,7 @@ function EndedLine({ by, note, at }) {
|
|
|
5961
5970
|
}
|
|
5962
5971
|
function ResolvedCheck({ by, note, at }) {
|
|
5963
5972
|
const said = `Resolved by ${by}${at ? `, ${at}` : ""}${note ? `: ${note}` : ""}`;
|
|
5964
|
-
return /* @__PURE__ */ jsx81(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */
|
|
5973
|
+
return /* @__PURE__ */ jsx81(WithTooltip, { label: said, wrapperClassName: "flex shrink-0", children: /* @__PURE__ */ jsxs58("span", { className: "flex items-center gap-1 text-caption text-success-default", children: [
|
|
5965
5974
|
/* @__PURE__ */ jsx81(IconCircleCheck4, { size: 14, stroke: 1.5 }),
|
|
5966
5975
|
"Resolved"
|
|
5967
5976
|
] }) });
|
|
@@ -5971,9 +5980,9 @@ function Words({ children }) {
|
|
|
5971
5980
|
}
|
|
5972
5981
|
function Reactions({ reactions, refused, readOnly }) {
|
|
5973
5982
|
if ((!reactions || reactions.reactions.length === 0) && !refused) return null;
|
|
5974
|
-
return /* @__PURE__ */
|
|
5983
|
+
return /* @__PURE__ */ jsxs58("div", { className: "relative flex w-full flex-col gap-1 pb-2 pl-8 pt-1", children: [
|
|
5975
5984
|
reactions && /* @__PURE__ */ jsx81(ReactionRow, { ...reactions, onToggle: readOnly ? void 0 : reactions.onToggle }),
|
|
5976
|
-
refused && /* @__PURE__ */
|
|
5985
|
+
refused && /* @__PURE__ */ jsxs58(FieldLine, { tone: "error", children: [
|
|
5977
5986
|
"Not reacted: ",
|
|
5978
5987
|
refused,
|
|
5979
5988
|
"."
|
|
@@ -5981,7 +5990,7 @@ function Reactions({ reactions, refused, readOnly }) {
|
|
|
5981
5990
|
] });
|
|
5982
5991
|
}
|
|
5983
5992
|
function Editing({ author, children }) {
|
|
5984
|
-
return /* @__PURE__ */ jsx81("div", { className: "p-2", children: /* @__PURE__ */
|
|
5993
|
+
return /* @__PURE__ */ jsx81("div", { className: "p-2", children: /* @__PURE__ */ jsxs58("div", { className: "flex items-start gap-2", children: [
|
|
5985
5994
|
/* @__PURE__ */ jsx81(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot, className: "mt-1 shrink-0" }),
|
|
5986
5995
|
/* @__PURE__ */ jsx81("div", { className: "min-w-0 flex-1", children })
|
|
5987
5996
|
] }) });
|
|
@@ -6031,8 +6040,8 @@ function ConversationCard(props) {
|
|
|
6031
6040
|
const under = !!item?.under;
|
|
6032
6041
|
const repliesRow = replies && replies.count > 0 && /* @__PURE__ */ jsx81(RepliesRow, { ...replies, onOpen: replies.onOpen ?? (under ? item?.toggle : void 0), open: replies.open ?? (under && !!item?.open), urgent });
|
|
6033
6042
|
const aboutShown = !!about && !deleted;
|
|
6034
|
-
return /* @__PURE__ */
|
|
6035
|
-
/* @__PURE__ */
|
|
6043
|
+
return /* @__PURE__ */ jsxs58(Fragment23, { children: [
|
|
6044
|
+
/* @__PURE__ */ jsxs58(
|
|
6036
6045
|
Card,
|
|
6037
6046
|
{
|
|
6038
6047
|
ref: root,
|
|
@@ -6057,8 +6066,8 @@ function ConversationCard(props) {
|
|
|
6057
6066
|
setHovered(false);
|
|
6058
6067
|
},
|
|
6059
6068
|
children: [
|
|
6060
|
-
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */
|
|
6061
|
-
deleted ? /* @__PURE__ */ jsx81("p", { className: "w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */
|
|
6069
|
+
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs58("div", { "data-comment-body": true, className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6070
|
+
deleted ? /* @__PURE__ */ jsx81("p", { className: "w-full pb-2 pl-8 pr-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */ jsxs58(Fragment23, { children: [
|
|
6062
6071
|
/* @__PURE__ */ jsx81(
|
|
6063
6072
|
Head,
|
|
6064
6073
|
{
|
|
@@ -6126,9 +6135,9 @@ function ConversationCard(props) {
|
|
|
6126
6135
|
]
|
|
6127
6136
|
}
|
|
6128
6137
|
),
|
|
6129
|
-
deleting && onDelete && /* @__PURE__ */ jsx81(ConfirmDialog, { title: `Delete this ${noun}?`, confirmLabel: `Delete ${noun}`, destructive: true, onConfirm: onDelete, onClose: () => setDeleting(false), children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx81("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */
|
|
6138
|
+
deleting && onDelete && /* @__PURE__ */ jsx81(ConfirmDialog, { title: `Delete this ${noun}?`, confirmLabel: `Delete ${noun}`, destructive: true, onConfirm: onDelete, onClose: () => setDeleting(false), children: deleteNote !== void 0 ? typeof deleteNote === "string" ? /* @__PURE__ */ jsx81("p", { children: deleteNote }) : deleteNote : /* @__PURE__ */ jsxs58(Fragment23, { children: [
|
|
6130
6139
|
/* @__PURE__ */ jsx81("p", { children: "It is deleted for everyone." }),
|
|
6131
|
-
replies && replies.count > 0 && /* @__PURE__ */
|
|
6140
|
+
replies && replies.count > 0 && /* @__PURE__ */ jsxs58("p", { children: [
|
|
6132
6141
|
"Its ",
|
|
6133
6142
|
replies.count === 1 ? "reply stays" : `${replies.count} replies stay`,
|
|
6134
6143
|
"."
|
|
@@ -6165,8 +6174,8 @@ function ReplyCard(props) {
|
|
|
6165
6174
|
useLayoutEffect7(() => {
|
|
6166
6175
|
if (drawn) drawn.added += 1;
|
|
6167
6176
|
}, [drawn]);
|
|
6168
|
-
return /* @__PURE__ */
|
|
6169
|
-
/* @__PURE__ */
|
|
6177
|
+
return /* @__PURE__ */ jsxs58(Fragment23, { children: [
|
|
6178
|
+
/* @__PURE__ */ jsxs58(
|
|
6170
6179
|
Card,
|
|
6171
6180
|
{
|
|
6172
6181
|
ref: root,
|
|
@@ -6189,7 +6198,7 @@ function ReplyCard(props) {
|
|
|
6189
6198
|
setHovered(false);
|
|
6190
6199
|
},
|
|
6191
6200
|
children: [
|
|
6192
|
-
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */
|
|
6201
|
+
isEditing ? /* @__PURE__ */ jsx81(Editing, { author, children: editor(() => setEditing(false)) }) : /* @__PURE__ */ jsxs58("div", { className: "flex flex-col items-start px-2 pt-2", children: [
|
|
6193
6202
|
/* @__PURE__ */ jsx81(Head, { author, time: props.time, at: props.at, timeHref: props.timeHref, timeLabel: props.timeLabel, edited: props.edited, isNew, urgent }),
|
|
6194
6203
|
about && /* @__PURE__ */ jsx81("div", { className: "w-full pl-8 pr-2 pt-0.5", children: about }),
|
|
6195
6204
|
/* @__PURE__ */ jsx81(Words, { children }),
|
|
@@ -6237,9 +6246,9 @@ function ReplyCard(props) {
|
|
|
6237
6246
|
import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect14, useLayoutEffect as useLayoutEffect8, useRef as useRef20, useState as useState25 } from "react";
|
|
6238
6247
|
|
|
6239
6248
|
// src/Panel.tsx
|
|
6240
|
-
import { jsx as jsx82, jsxs as
|
|
6249
|
+
import { jsx as jsx82, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
6241
6250
|
function Frame({ title, chevron = false, actions, header, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
6242
|
-
return /* @__PURE__ */
|
|
6251
|
+
return /* @__PURE__ */ jsxs59("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
6243
6252
|
header ?? /* @__PURE__ */ jsx82(ContainerHeader, { title, chevron, actions }),
|
|
6244
6253
|
broken ? (
|
|
6245
6254
|
// The message takes the room the body had and centres itself in it.
|
|
@@ -6361,7 +6370,7 @@ function useWatchSeen(seen, root, attribute) {
|
|
|
6361
6370
|
}
|
|
6362
6371
|
|
|
6363
6372
|
// src/ConversationLayout.tsx
|
|
6364
|
-
import { Fragment as Fragment25, jsx as jsx83, jsxs as
|
|
6373
|
+
import { Fragment as Fragment25, jsx as jsx83, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
6365
6374
|
var threadOf = (item) => typeof item?.thread === "function" ? item.thread() : item?.thread;
|
|
6366
6375
|
function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
6367
6376
|
if (loading) return /* @__PURE__ */ jsx83(SkeletonConversation, {});
|
|
@@ -6374,7 +6383,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6374
6383
|
} : null;
|
|
6375
6384
|
const draw2 = (item) => {
|
|
6376
6385
|
if (!under) {
|
|
6377
|
-
return /* @__PURE__ */
|
|
6386
|
+
return /* @__PURE__ */ jsxs60(Fragment24, { children: [
|
|
6378
6387
|
item.before,
|
|
6379
6388
|
/* @__PURE__ */ jsx83("div", { "data-conversation-item": item.id, className: cn("flex flex-col", SHOWN_CLASSES), children: /* @__PURE__ */ jsx83(InConversationItem.Provider, { value: stateOf(item), children: item.card }) })
|
|
6380
6389
|
] }, item.id);
|
|
@@ -6395,10 +6404,10 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6395
6404
|
seen.set(name, count);
|
|
6396
6405
|
stretches.push({ key: `${item.day === void 0 ? "no-day" : `day:${name}`}#${count}`, day: item.day, items: [item] });
|
|
6397
6406
|
}
|
|
6398
|
-
return /* @__PURE__ */
|
|
6407
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
6399
6408
|
above,
|
|
6400
6409
|
stretches.map(
|
|
6401
|
-
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx83(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */
|
|
6410
|
+
(stretch) => stretch.day === void 0 ? /* @__PURE__ */ jsx83(Fragment24, { children: stretch.items.map(draw2) }, stretch.key) : /* @__PURE__ */ jsxs60("div", { className: "flex flex-col gap-2", children: [
|
|
6402
6411
|
/* @__PURE__ */ jsx83(Divider, { look: "section", label: stretch.day, sticky: true }),
|
|
6403
6412
|
stretch.items.map(draw2)
|
|
6404
6413
|
] }, stretch.key)
|
|
@@ -6419,7 +6428,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6419
6428
|
children: list.map(draw2)
|
|
6420
6429
|
}
|
|
6421
6430
|
);
|
|
6422
|
-
return /* @__PURE__ */
|
|
6431
|
+
return /* @__PURE__ */ jsxs60(Fragment25, { children: [
|
|
6423
6432
|
above,
|
|
6424
6433
|
items.filter((item) => !item.resolved && !item.gone).map(draw2),
|
|
6425
6434
|
group("On deleted blocks", gone),
|
|
@@ -6429,7 +6438,7 @@ function List({ items, open, under, above, loading, empty, change, caret }) {
|
|
|
6429
6438
|
function UnderItem({ item, isOpen, state, caret }) {
|
|
6430
6439
|
const root = useRef20(null);
|
|
6431
6440
|
const line = useFaceLine(root, isOpen);
|
|
6432
|
-
return /* @__PURE__ */
|
|
6441
|
+
return /* @__PURE__ */ jsxs60(
|
|
6433
6442
|
Card,
|
|
6434
6443
|
{
|
|
6435
6444
|
ref: root,
|
|
@@ -6441,7 +6450,7 @@ function UnderItem({ item, isOpen, state, caret }) {
|
|
|
6441
6450
|
quietUntilHover: !isOpen,
|
|
6442
6451
|
className: cn("relative flex flex-col", isOpen && "pb-2", SHOWN_CLASSES),
|
|
6443
6452
|
children: [
|
|
6444
|
-
/* @__PURE__ */ jsx83(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx83(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */
|
|
6453
|
+
/* @__PURE__ */ jsx83(InConversationItem.Provider, { value: state, children: /* @__PURE__ */ jsx83(InThreadCard.Provider, { value: isOpen, children: /* @__PURE__ */ jsxs60(LineByLayout.Provider, { value: true, children: [
|
|
6445
6454
|
/* @__PURE__ */ jsx83("div", { className: "-m-px flex flex-col", children: item.card }),
|
|
6446
6455
|
isOpen && /* @__PURE__ */ jsx83(caretOnOpen.Provider, { value: caret, children: threadOf(item) })
|
|
6447
6456
|
] }) }) }),
|
|
@@ -6570,7 +6579,7 @@ function ConversationLayout({
|
|
|
6570
6579
|
// The body at least the column's height: the comments start at its top, and the note under them (`below`) is pushed
|
|
6571
6580
|
// to its foot, so with few comments it sits on the box, as a short conversation's last line does in Peek's two
|
|
6572
6581
|
// columns (Katerina, 2 November); with many it comes after them, and scrolls with them.
|
|
6573
|
-
/* @__PURE__ */
|
|
6582
|
+
/* @__PURE__ */ jsxs60(Panel, { className: cn("w-[384px] flex-none", className), title, actions, bodyRef: setBody, bodyClassName: "flex min-h-full flex-col gap-2 p-3", footer: box && /* @__PURE__ */ jsx83("div", { className: "p-3", children: box }), children: [
|
|
6574
6583
|
/* @__PURE__ */ jsx83(List, { items, open, under: true, above, loading, empty, change, caret }),
|
|
6575
6584
|
!loading && below != null && below !== false && below !== "" && /* @__PURE__ */ jsx83("div", { className: "mt-auto flex flex-col gap-2", children: below })
|
|
6576
6585
|
] })
|
|
@@ -6578,21 +6587,21 @@ function ConversationLayout({
|
|
|
6578
6587
|
}
|
|
6579
6588
|
const opened = threadOf(items.find((item) => item.id === open));
|
|
6580
6589
|
const side = opened || aside;
|
|
6581
|
-
return /* @__PURE__ */
|
|
6590
|
+
return /* @__PURE__ */ jsxs60("div", { className: cn("flex min-h-0 min-w-0 flex-1", className), children: [
|
|
6582
6591
|
/* @__PURE__ */ jsx83(
|
|
6583
6592
|
ErrorBoundary,
|
|
6584
6593
|
{
|
|
6585
6594
|
label: "conversation",
|
|
6586
|
-
frame: (message) => /* @__PURE__ */
|
|
6595
|
+
frame: (message) => /* @__PURE__ */ jsxs60("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6587
6596
|
/* @__PURE__ */ jsx83(ContainerHeader, { title }),
|
|
6588
6597
|
/* @__PURE__ */ jsx83("div", { className: "flex min-h-0 flex-1 flex-col px-4", children: message })
|
|
6589
6598
|
] }),
|
|
6590
|
-
children: /* @__PURE__ */
|
|
6599
|
+
children: /* @__PURE__ */ jsxs60("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
6591
6600
|
header,
|
|
6592
|
-
/* @__PURE__ */
|
|
6601
|
+
/* @__PURE__ */ jsxs60(ScrollArea, { className: "min-h-0 flex-1", viewportRef: setBody, onScroll: scrolled, contentClassName: "flex min-h-full flex-col", children: [
|
|
6593
6602
|
top != null && top !== false && top !== "" && /* @__PURE__ */ jsx83("div", { className: "shrink-0 px-4 pt-4", children: top }),
|
|
6594
6603
|
/* @__PURE__ */ jsx83("div", { className: "min-h-0 flex-1" }),
|
|
6595
|
-
/* @__PURE__ */
|
|
6604
|
+
/* @__PURE__ */ jsxs60("div", { className: "flex shrink-0 flex-col gap-2 p-4", children: [
|
|
6596
6605
|
/* @__PURE__ */ jsx83(List, { items, open, under: false, above, loading, empty, change, caret }),
|
|
6597
6606
|
!loading && below
|
|
6598
6607
|
] })
|
|
@@ -6609,10 +6618,10 @@ function ConversationLayout({
|
|
|
6609
6618
|
}
|
|
6610
6619
|
|
|
6611
6620
|
// src/ConversationPlace.tsx
|
|
6612
|
-
import { jsx as jsx84, jsxs as
|
|
6621
|
+
import { jsx as jsx84, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
6613
6622
|
function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
6614
|
-
return /* @__PURE__ */
|
|
6615
|
-
/* @__PURE__ */
|
|
6623
|
+
return /* @__PURE__ */ jsxs61("div", { className: cn("flex flex-col gap-1", className), ...props, children: [
|
|
6624
|
+
/* @__PURE__ */ jsxs61("div", { className: "flex items-center gap-2", children: [
|
|
6616
6625
|
/* @__PURE__ */ jsx84(Chip, { type: "neutral", label: relation }),
|
|
6617
6626
|
place && /* @__PURE__ */ jsx84("span", { className: "truncate text-caption text-text-muted", children: place })
|
|
6618
6627
|
] }),
|
|
@@ -6621,20 +6630,20 @@ function ConversationPlace({ relation, place, children, className, ...props }) {
|
|
|
6621
6630
|
}
|
|
6622
6631
|
|
|
6623
6632
|
// src/QuotedLine.tsx
|
|
6624
|
-
import { jsx as jsx85, jsxs as
|
|
6633
|
+
import { jsx as jsx85, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
6625
6634
|
var SINCE = { reworded: "Changed since", gone: "Deleted from the page" };
|
|
6626
6635
|
function QuotedLine({ words, state = "here", label }) {
|
|
6627
6636
|
const shown2 = words ?? label ?? "";
|
|
6628
|
-
return /* @__PURE__ */
|
|
6637
|
+
return /* @__PURE__ */ jsxs62("div", { "data-quoted": words ? state : "part", className: "flex w-full min-w-0 flex-col gap-0.5", children: [
|
|
6629
6638
|
/* @__PURE__ */ jsx85(WithTooltip, { label: shown2, wrapperClassName: "flex min-w-0", children: /* @__PURE__ */ jsx85("p", { className: "line-clamp-2 text-caption text-text-secondary", children: /* @__PURE__ */ jsx85("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 }) }) }),
|
|
6630
6639
|
state !== "here" && /* @__PURE__ */ jsx85("span", { className: "text-caption italic text-text-muted", children: SINCE[state] })
|
|
6631
6640
|
] });
|
|
6632
6641
|
}
|
|
6633
6642
|
|
|
6634
6643
|
// src/ReactionHorizon.tsx
|
|
6635
|
-
import { Fragment as Fragment26, jsx as jsx86, jsxs as
|
|
6644
|
+
import { Fragment as Fragment26, jsx as jsx86, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
6636
6645
|
function Said({ limit, omitted, noun }) {
|
|
6637
|
-
return /* @__PURE__ */
|
|
6646
|
+
return /* @__PURE__ */ jsxs63(Fragment26, { children: [
|
|
6638
6647
|
"Reactions are shown for the latest ",
|
|
6639
6648
|
limit,
|
|
6640
6649
|
" ",
|
|
@@ -6649,8 +6658,8 @@ function Said({ limit, omitted, noun }) {
|
|
|
6649
6658
|
function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepRoom = false }) {
|
|
6650
6659
|
const room = keepRoom && omitted <= 0 && /* @__PURE__ */ jsx86("p", { "aria-hidden": true, className: "invisible text-caption text-text-muted", children: /* @__PURE__ */ jsx86(Said, { limit, omitted: 1, noun }) });
|
|
6651
6660
|
if (omitted <= 0 && !cut) return room || null;
|
|
6652
|
-
return /* @__PURE__ */
|
|
6653
|
-
/* @__PURE__ */
|
|
6661
|
+
return /* @__PURE__ */ jsxs63(Fragment26, { children: [
|
|
6662
|
+
/* @__PURE__ */ jsxs63("p", { className: "text-caption text-text-muted", children: [
|
|
6654
6663
|
omitted > 0 && /* @__PURE__ */ jsx86(Said, { limit, omitted, noun }),
|
|
6655
6664
|
omitted > 0 && cut && " ",
|
|
6656
6665
|
cut && "Some reactions may be missing."
|
|
@@ -6660,11 +6669,11 @@ function ReactionHorizon({ limit, omitted, cut = false, noun = "comments", keepR
|
|
|
6660
6669
|
}
|
|
6661
6670
|
|
|
6662
6671
|
// src/PinnedComment.tsx
|
|
6663
|
-
import { jsx as jsx87, jsxs as
|
|
6672
|
+
import { jsx as jsx87, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
6664
6673
|
function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
6665
6674
|
const at = momentOf(given);
|
|
6666
|
-
return /* @__PURE__ */ jsx87(Card, { fill: "elevated", clip: true, children: deleted ? /* @__PURE__ */ jsx87("p", { className: "p-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */
|
|
6667
|
-
/* @__PURE__ */
|
|
6675
|
+
return /* @__PURE__ */ jsx87(Card, { fill: "elevated", clip: true, children: deleted ? /* @__PURE__ */ jsx87("p", { className: "p-2 text-caption italic text-text-muted", children: "This comment was deleted." }) : /* @__PURE__ */ jsxs64("div", { className: "flex flex-col p-2", children: [
|
|
6676
|
+
/* @__PURE__ */ jsxs64("div", { className: "flex items-center gap-2", children: [
|
|
6668
6677
|
/* @__PURE__ */ jsx87(Avatar, { size: 24, src: author.picture, alt: author.name, bot: author.bot }),
|
|
6669
6678
|
/* @__PURE__ */ jsx87("span", { className: "min-w-0 truncate text-body-2-strong text-text-primary", children: author.name }),
|
|
6670
6679
|
/* @__PURE__ */ jsx87(MetaText, { className: "shrink-0", children: at === void 0 ? time : /* @__PURE__ */ jsx87(WithTooltip, { label: exactTime(at), children: /* @__PURE__ */ jsx87("time", { dateTime: new Date(at).toISOString(), children: time }) }) })
|
|
@@ -6675,13 +6684,13 @@ function PinnedComment({ author, time, at: given, words, deleted = false }) {
|
|
|
6675
6684
|
|
|
6676
6685
|
// src/ArchiveDialog.tsx
|
|
6677
6686
|
import { useState as useState26 } from "react";
|
|
6678
|
-
import { jsx as jsx88, jsxs as
|
|
6687
|
+
import { jsx as jsx88, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
6679
6688
|
var listOf = (parts) => parts.length <= 1 ? parts[0] ?? "" : `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`;
|
|
6680
6689
|
function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, onClose, onArchive }) {
|
|
6681
6690
|
const [resolution, setResolution] = useState26("");
|
|
6682
6691
|
const where = apps.length ? `, ${listOf(apps.map((app) => `in ${app}`))}` : "";
|
|
6683
|
-
return /* @__PURE__ */
|
|
6684
|
-
/* @__PURE__ */
|
|
6692
|
+
return /* @__PURE__ */ jsxs65(FormDialog, { title: `Archive \u201C${title}\u201D?`, submitLabel: `Archive ${what}`, ready: hides !== null, onSubmit: () => onArchive(resolution.trim()), onClose, children: [
|
|
6693
|
+
/* @__PURE__ */ jsxs65("div", { className: "flex flex-col gap-2 text-body-2 text-text-primary", children: [
|
|
6685
6694
|
/* @__PURE__ */ jsx88("p", { children: hides === null ? `Counting what archiving this ${what} would hide\u2026` : hides.length ? `This hides the ${what} and ${listOf(hides)} from every list${where}.` : `This hides the ${what} from every list${where}.` }),
|
|
6686
6695
|
staysVisible.length > 0 && /* @__PURE__ */ jsx88("p", { children: `${listOf(staysVisible)} stay visible there.` }),
|
|
6687
6696
|
/* @__PURE__ */ jsx88("p", { className: "text-text-secondary", children: getBack })
|
|
@@ -6701,15 +6710,15 @@ function ArchiveDialog({ title, what, hides, staysVisible = [], apps, getBack, o
|
|
|
6701
6710
|
// src/ArchivedNotice.tsx
|
|
6702
6711
|
import { useState as useState27 } from "react";
|
|
6703
6712
|
import { IconArchive } from "@tabler/icons-react";
|
|
6704
|
-
import { jsx as jsx89, jsxs as
|
|
6713
|
+
import { jsx as jsx89, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
6705
6714
|
function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive, onOpenParent }) {
|
|
6706
6715
|
const [unarchiving, setUnarchiving] = useState27(false);
|
|
6707
6716
|
const parent = withWhat ?? (withTitle ? "parent" : void 0);
|
|
6708
6717
|
const named2 = withTitle ? ` \u201C${withTitle}\u201D` : "";
|
|
6709
6718
|
const line = parent ? `Archived with its ${parent}${named2} by ${by} \xB7 ${when}` : `Archived by ${by} \xB7 ${when}`;
|
|
6710
|
-
return /* @__PURE__ */
|
|
6719
|
+
return /* @__PURE__ */ jsxs66(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
6711
6720
|
/* @__PURE__ */ jsx89(IconArchive, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
6712
|
-
/* @__PURE__ */
|
|
6721
|
+
/* @__PURE__ */ jsxs66("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
6713
6722
|
/* @__PURE__ */ jsx89("span", { className: "text-body-2-strong text-text-primary", children: line }),
|
|
6714
6723
|
resolution && /* @__PURE__ */ jsx89("p", { className: "whitespace-pre-wrap text-caption text-text-secondary", children: resolution })
|
|
6715
6724
|
] }),
|
|
@@ -6730,16 +6739,49 @@ function ArchivedNotice({ by, when, resolution, withWhat, withTitle, onUnarchive
|
|
|
6730
6739
|
] });
|
|
6731
6740
|
}
|
|
6732
6741
|
|
|
6742
|
+
// src/DeletedNotice.tsx
|
|
6743
|
+
import { useState as useState28 } from "react";
|
|
6744
|
+
import { IconTrash } from "@tabler/icons-react";
|
|
6745
|
+
import { jsx as jsx90, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
6746
|
+
function DeletedNotice({ by, when, onRestore }) {
|
|
6747
|
+
const [restoring, setRestoring] = useState28(false);
|
|
6748
|
+
return /* @__PURE__ */ jsxs67(Card, { fill: "inset", className: "flex items-start gap-3 px-4 py-3", children: [
|
|
6749
|
+
/* @__PURE__ */ jsx90(IconTrash, { size: 16, stroke: 1.5, className: "mt-0.5 shrink-0 text-text-muted" }),
|
|
6750
|
+
/* @__PURE__ */ jsx90("span", { className: "min-w-0 flex-1 text-body-2-strong text-text-primary", children: `Deleted by ${by} \xB7 ${when}` }),
|
|
6751
|
+
onRestore && /* @__PURE__ */ jsx90(
|
|
6752
|
+
Button,
|
|
6753
|
+
{
|
|
6754
|
+
variant: "outlined",
|
|
6755
|
+
size: "small",
|
|
6756
|
+
className: "shrink-0",
|
|
6757
|
+
disabled: restoring,
|
|
6758
|
+
onClick: () => {
|
|
6759
|
+
setRestoring(true);
|
|
6760
|
+
void Promise.resolve().then(onRestore).finally(() => setRestoring(false));
|
|
6761
|
+
},
|
|
6762
|
+
children: "Restore"
|
|
6763
|
+
}
|
|
6764
|
+
)
|
|
6765
|
+
] });
|
|
6766
|
+
}
|
|
6767
|
+
|
|
6768
|
+
// src/NoAccessNotice.tsx
|
|
6769
|
+
import { IconLock } from "@tabler/icons-react";
|
|
6770
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
6771
|
+
function NoAccessNotice({ what }) {
|
|
6772
|
+
return /* @__PURE__ */ jsx91(EmptyState, { scope: "page", icon: /* @__PURE__ */ jsx91(IconLock, { size: 16, stroke: 1.5 }), message: `You can't open this ${what}` });
|
|
6773
|
+
}
|
|
6774
|
+
|
|
6733
6775
|
// src/Thread.tsx
|
|
6734
|
-
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef21, useState as
|
|
6776
|
+
import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef21, useState as useState29 } from "react";
|
|
6735
6777
|
import { IconX as IconX6 } from "@tabler/icons-react";
|
|
6736
|
-
import { Fragment as Fragment27, jsx as
|
|
6778
|
+
import { Fragment as Fragment27, jsx as jsx92, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
6737
6779
|
var always = () => true;
|
|
6738
6780
|
var anyIn = (children) => Children.toArray(children).length > 0;
|
|
6739
6781
|
function Replies({ children, loading, empty }) {
|
|
6740
|
-
if (loading) return /* @__PURE__ */
|
|
6741
|
-
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */
|
|
6742
|
-
return /* @__PURE__ */
|
|
6782
|
+
if (loading) return /* @__PURE__ */ jsx92(SkeletonConversation, {});
|
|
6783
|
+
if (!anyIn(children)) return typeof empty === "string" ? /* @__PURE__ */ jsx92(EmptyState, { scope: "section", message: empty }) : /* @__PURE__ */ jsx92(Fragment27, { children: empty });
|
|
6784
|
+
return /* @__PURE__ */ jsx92(Fragment27, { children });
|
|
6743
6785
|
}
|
|
6744
6786
|
function Thread({
|
|
6745
6787
|
place = "beside",
|
|
@@ -6769,7 +6811,7 @@ function Thread({
|
|
|
6769
6811
|
);
|
|
6770
6812
|
const under = useRef21(null);
|
|
6771
6813
|
useWatchSeen(seen, place === "under" ? under : body, "data-reply-id");
|
|
6772
|
-
const [drawn] =
|
|
6814
|
+
const [drawn] = useState29(() => ({ added: 0 }));
|
|
6773
6815
|
const last = useRef21(null);
|
|
6774
6816
|
const steady = useSteadyScroll(body, void 0, always, start?.id, place === "beside");
|
|
6775
6817
|
useLayoutEffect9(() => {
|
|
@@ -6784,36 +6826,36 @@ function Thread({
|
|
|
6784
6826
|
const foot = notice ?? box;
|
|
6785
6827
|
const layoutLine = useContext15(LineByLayout);
|
|
6786
6828
|
if (place === "under") {
|
|
6787
|
-
return /* @__PURE__ */
|
|
6829
|
+
return /* @__PURE__ */ jsxs68("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
|
|
6788
6830
|
(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).
|
|
6789
6831
|
// 8px from the one card's right edge too, as the box under them: a hovered reply never touches it (Katerina, 31 October).
|
|
6790
6832
|
// 2px, as the line from the comment's face that runs into it (Katerina, 1 November), and drawn the same way, a
|
|
6791
6833
|
// filled bar rather than a border: a border snaps to the screen's pixels on its own, and at some zooms the two
|
|
6792
6834
|
// stood a pixel apart (Katerina: "the line breaks in the middle").
|
|
6793
|
-
/* @__PURE__ */
|
|
6794
|
-
!layoutLine && /* @__PURE__ */
|
|
6795
|
-
/* @__PURE__ */
|
|
6835
|
+
/* @__PURE__ */ jsxs68("div", { "data-thread-replies": true, className: "relative ml-[19px] mr-2 flex flex-col gap-1 pl-2.5", children: [
|
|
6836
|
+
!layoutLine && /* @__PURE__ */ jsx92("span", { "aria-hidden": true, className: "absolute bottom-0 left-0 top-0 w-0.5 bg-border-default" }),
|
|
6837
|
+
/* @__PURE__ */ jsx92(caretOnOpen.Provider, { value: 0, children: loading ? /* @__PURE__ */ jsx92(SkeletonConversation, {}) : children })
|
|
6796
6838
|
] }),
|
|
6797
|
-
foot && /* @__PURE__ */
|
|
6839
|
+
foot && /* @__PURE__ */ jsx92("div", { className: "px-2 pt-2", children: foot })
|
|
6798
6840
|
] });
|
|
6799
6841
|
}
|
|
6800
|
-
return /* @__PURE__ */
|
|
6842
|
+
return /* @__PURE__ */ jsxs68(
|
|
6801
6843
|
Panel,
|
|
6802
6844
|
{
|
|
6803
6845
|
className,
|
|
6804
6846
|
bodyRef: setBody,
|
|
6805
6847
|
bodyClassName: "flex flex-col",
|
|
6806
6848
|
title,
|
|
6807
|
-
actions: /* @__PURE__ */
|
|
6808
|
-
resolved && /* @__PURE__ */
|
|
6849
|
+
actions: /* @__PURE__ */ jsxs68(Fragment27, { children: [
|
|
6850
|
+
resolved && /* @__PURE__ */ jsx92(Chip, { type: "success", label: "Resolved" }),
|
|
6809
6851
|
actions,
|
|
6810
|
-
onClose && /* @__PURE__ */
|
|
6852
|
+
onClose && /* @__PURE__ */ jsx92(IconButton, { tooltip: "Close", "aria-label": closeLabel, onClick: onClose, children: /* @__PURE__ */ jsx92(IconX6, { size: 16, stroke: 1.5 }) })
|
|
6811
6853
|
] }),
|
|
6812
|
-
footer: foot && /* @__PURE__ */
|
|
6854
|
+
footer: foot && /* @__PURE__ */ jsx92("div", { className: "p-3", children: foot }),
|
|
6813
6855
|
children: [
|
|
6814
|
-
start && /* @__PURE__ */
|
|
6815
|
-
/* @__PURE__ */
|
|
6816
|
-
/* @__PURE__ */
|
|
6856
|
+
start && /* @__PURE__ */ jsx92("div", { className: cn("px-4 pb-2 pt-4", SHOWN_CLASSES), "data-thread-start": start.id, children: /* @__PURE__ */ jsx92(PinnedComment, { author: start.author, time: start.time, at: start.at, words: start.words, deleted: start.deleted }) }),
|
|
6857
|
+
/* @__PURE__ */ jsx92(Divider, { look: "section", label: "Replies", className: "px-4 py-2" }),
|
|
6858
|
+
/* @__PURE__ */ jsx92("div", { className: "flex flex-col gap-2 px-4 pb-4", children: /* @__PURE__ */ jsx92(caretOnOpen.Provider, { value: 0, children: /* @__PURE__ */ jsx92(repliesDrawn.Provider, { value: drawn, children: /* @__PURE__ */ jsx92(Replies, { loading, empty, children }) }) }) })
|
|
6817
6859
|
]
|
|
6818
6860
|
}
|
|
6819
6861
|
);
|
|
@@ -6866,9 +6908,9 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
|
|
|
6866
6908
|
// src/SearchInput.tsx
|
|
6867
6909
|
import "react";
|
|
6868
6910
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
6869
|
-
import { jsx as
|
|
6911
|
+
import { jsx as jsx93, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
6870
6912
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
6871
|
-
return /* @__PURE__ */
|
|
6913
|
+
return /* @__PURE__ */ jsxs69(
|
|
6872
6914
|
"div",
|
|
6873
6915
|
{
|
|
6874
6916
|
className: cn(
|
|
@@ -6880,7 +6922,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
6880
6922
|
className
|
|
6881
6923
|
),
|
|
6882
6924
|
children: [
|
|
6883
|
-
/* @__PURE__ */
|
|
6925
|
+
/* @__PURE__ */ jsx93(
|
|
6884
6926
|
Input3,
|
|
6885
6927
|
{
|
|
6886
6928
|
className: cn("flex-1 min-w-0 text-input-value", BARE_INPUT_CLASSES),
|
|
@@ -6888,7 +6930,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
6888
6930
|
...props
|
|
6889
6931
|
}
|
|
6890
6932
|
),
|
|
6891
|
-
shortcut && /* @__PURE__ */
|
|
6933
|
+
shortcut && /* @__PURE__ */ jsx93(Kbd, { children: shortcut })
|
|
6892
6934
|
]
|
|
6893
6935
|
}
|
|
6894
6936
|
);
|
|
@@ -6896,38 +6938,38 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
6896
6938
|
|
|
6897
6939
|
// src/PageHeader.tsx
|
|
6898
6940
|
import { Fragment as Fragment28 } from "react";
|
|
6899
|
-
import { IconLock } from "@tabler/icons-react";
|
|
6900
|
-
import { Fragment as Fragment29, jsx as
|
|
6941
|
+
import { IconLock as IconLock2 } from "@tabler/icons-react";
|
|
6942
|
+
import { Fragment as Fragment29, jsx as jsx94, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
6901
6943
|
function PageHeader({ title, leading, private: locked = false, after, meta, time, members, actions, className }) {
|
|
6902
6944
|
const words = (meta ?? []).map((one) => typeof one === "string" ? { label: one } : one);
|
|
6903
6945
|
const quiet = words.length > 0 || time != null || members != null;
|
|
6904
|
-
const name = /* @__PURE__ */
|
|
6905
|
-
leading != null && /* @__PURE__ */
|
|
6906
|
-
locked && /* @__PURE__ */
|
|
6907
|
-
typeof title === "string" ? /* @__PURE__ */
|
|
6908
|
-
after != null && /* @__PURE__ */
|
|
6946
|
+
const name = /* @__PURE__ */ jsxs70("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
6947
|
+
leading != null && /* @__PURE__ */ jsx94("span", { className: "flex shrink-0 items-center text-text-secondary", children: leading }),
|
|
6948
|
+
locked && /* @__PURE__ */ jsx94(WithTooltip, { label: "Private", children: /* @__PURE__ */ jsx94(IconLock2, { size: 16, stroke: 1.5, role: "img", "aria-label": "Private", className: "shrink-0 text-text-secondary" }) }),
|
|
6949
|
+
typeof title === "string" ? /* @__PURE__ */ jsx94("span", { className: "truncate text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx94("div", { className: "flex min-w-0 items-center", children: title }),
|
|
6950
|
+
after != null && /* @__PURE__ */ jsx94("span", { className: "flex shrink-0 items-center", children: after })
|
|
6909
6951
|
] });
|
|
6910
|
-
const right = quiet || actions != null ? /* @__PURE__ */
|
|
6952
|
+
const right = quiet || actions != null ? /* @__PURE__ */ jsxs70(Fragment29, { children: [
|
|
6911
6953
|
quiet && // The quiet group: 12px between its parts, and 12px clear of the buttons — the bar sets
|
|
6912
6954
|
// its actions 4px apart, so the group adds the other 8px, as Peek's and Leaf's bars do.
|
|
6913
|
-
/* @__PURE__ */
|
|
6914
|
-
words.length > 0 && /* @__PURE__ */
|
|
6955
|
+
/* @__PURE__ */ jsxs70("div", { className: cn("flex items-center gap-3", actions != null && "pr-2"), children: [
|
|
6956
|
+
words.length > 0 && /* @__PURE__ */ jsx94("div", { className: "flex items-center gap-2", children: words.map((one, i) => /* @__PURE__ */ jsxs70(Fragment28, { children: [
|
|
6915
6957
|
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
|
|
6916
|
-
/* @__PURE__ */
|
|
6917
|
-
/* @__PURE__ */
|
|
6958
|
+
/* @__PURE__ */ jsx94("span", { "aria-hidden": "true", className: "size-[3px] shrink-0 rounded-full bg-text-muted" }),
|
|
6959
|
+
/* @__PURE__ */ jsx94(MetaText, { tone: one.done ? "success" : "secondary", children: one.label })
|
|
6918
6960
|
] }, `${one.label}-${i}`)) }),
|
|
6919
|
-
time && /* @__PURE__ */
|
|
6961
|
+
time && /* @__PURE__ */ jsx94(WithTooltip, { label: time.exact, children: /* @__PURE__ */ jsx94("span", { className: "whitespace-nowrap text-caption italic text-text-muted", children: time.label }) }),
|
|
6920
6962
|
members
|
|
6921
6963
|
] }),
|
|
6922
6964
|
actions
|
|
6923
6965
|
] }) : void 0;
|
|
6924
|
-
return /* @__PURE__ */
|
|
6966
|
+
return /* @__PURE__ */ jsx94(ContainerHeader, { title: name, actions: right, className });
|
|
6925
6967
|
}
|
|
6926
6968
|
|
|
6927
6969
|
// src/ListColumn.tsx
|
|
6928
|
-
import { jsx as
|
|
6970
|
+
import { jsx as jsx95, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
6929
6971
|
function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
|
|
6930
|
-
return /* @__PURE__ */
|
|
6972
|
+
return /* @__PURE__ */ jsxs71(
|
|
6931
6973
|
"div",
|
|
6932
6974
|
{
|
|
6933
6975
|
className: cn(
|
|
@@ -6940,35 +6982,35 @@ function Column({ title, chevron = false, titleMenu, actions, above, collapsed =
|
|
|
6940
6982
|
"data-collapsed": collapsed || void 0,
|
|
6941
6983
|
inert: collapsed,
|
|
6942
6984
|
children: [
|
|
6943
|
-
/* @__PURE__ */
|
|
6985
|
+
/* @__PURE__ */ jsx95(ContainerHeader, { title, chevron, titleMenu, actions }),
|
|
6944
6986
|
above,
|
|
6945
6987
|
broken ? (
|
|
6946
6988
|
// The message takes the room the list had and centres itself in it (Katerina, 19 September).
|
|
6947
|
-
/* @__PURE__ */
|
|
6948
|
-
) : /* @__PURE__ */
|
|
6989
|
+
/* @__PURE__ */ jsx95("div", { className: "flex min-h-0 flex-1 flex-col px-3", children })
|
|
6990
|
+
) : /* @__PURE__ */ jsx95(ScrollArea, { className: "flex-1", contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children })
|
|
6949
6991
|
]
|
|
6950
6992
|
}
|
|
6951
6993
|
);
|
|
6952
6994
|
}
|
|
6953
6995
|
function ListColumn(props) {
|
|
6954
|
-
return /* @__PURE__ */
|
|
6996
|
+
return /* @__PURE__ */ jsx95(
|
|
6955
6997
|
ErrorBoundary,
|
|
6956
6998
|
{
|
|
6957
6999
|
label: "list panel",
|
|
6958
7000
|
frame: (message) => (
|
|
6959
7001
|
// Only the name comes back with the message: the actions and the row above may be what threw.
|
|
6960
|
-
/* @__PURE__ */
|
|
7002
|
+
/* @__PURE__ */ jsx95(Column, { title: props.title, chevron: props.chevron, collapsed: props.collapsed, className: props.className, broken: true, children: message })
|
|
6961
7003
|
),
|
|
6962
|
-
children: /* @__PURE__ */
|
|
7004
|
+
children: /* @__PURE__ */ jsx95(Column, { ...props })
|
|
6963
7005
|
}
|
|
6964
7006
|
);
|
|
6965
7007
|
}
|
|
6966
7008
|
|
|
6967
7009
|
// src/Tabs.tsx
|
|
6968
7010
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
6969
|
-
import { Fragment as Fragment30, jsx as
|
|
7011
|
+
import { Fragment as Fragment30, jsx as jsx96, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
6970
7012
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
6971
|
-
return /* @__PURE__ */
|
|
7013
|
+
return /* @__PURE__ */ jsx96(
|
|
6972
7014
|
BaseTabs.Root,
|
|
6973
7015
|
{
|
|
6974
7016
|
value: active,
|
|
@@ -6976,14 +7018,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
6976
7018
|
if (details.reason === "none") onChange(value);
|
|
6977
7019
|
},
|
|
6978
7020
|
className,
|
|
6979
|
-
children: /* @__PURE__ */
|
|
7021
|
+
children: /* @__PURE__ */ jsx96(
|
|
6980
7022
|
BaseTabs.List,
|
|
6981
7023
|
{
|
|
6982
7024
|
activateOnFocus: true,
|
|
6983
7025
|
"aria-label": aria["aria-label"],
|
|
6984
7026
|
"aria-labelledby": aria["aria-labelledby"],
|
|
6985
7027
|
className: "flex items-center gap-2",
|
|
6986
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
7028
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs72(
|
|
6987
7029
|
BaseTabs.Tab,
|
|
6988
7030
|
{
|
|
6989
7031
|
value: tab.id,
|
|
@@ -6996,13 +7038,13 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
6996
7038
|
),
|
|
6997
7039
|
children: [
|
|
6998
7040
|
tab.icon,
|
|
6999
|
-
/* @__PURE__ */
|
|
7041
|
+
/* @__PURE__ */ jsxs72("span", { className: "flex items-baseline", children: [
|
|
7000
7042
|
tab.label,
|
|
7001
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
7043
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx96("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
7002
7044
|
] }),
|
|
7003
|
-
tab.unread ? /* @__PURE__ */
|
|
7004
|
-
/* @__PURE__ */
|
|
7005
|
-
/* @__PURE__ */
|
|
7045
|
+
tab.unread ? /* @__PURE__ */ jsxs72(Fragment30, { children: [
|
|
7046
|
+
/* @__PURE__ */ jsx96(UnreadDot, { className: "h-auto w-auto" }),
|
|
7047
|
+
/* @__PURE__ */ jsx96("span", { className: "sr-only", children: "new" })
|
|
7006
7048
|
] }) : null
|
|
7007
7049
|
]
|
|
7008
7050
|
},
|
|
@@ -7018,7 +7060,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
7018
7060
|
import { createContext as createContext13, useContext as useContext16, useMemo as useMemo7 } from "react";
|
|
7019
7061
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
7020
7062
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
|
|
7021
|
-
import { jsx as
|
|
7063
|
+
import { jsx as jsx97, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
7022
7064
|
var SURFACE_STYLES = {
|
|
7023
7065
|
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",
|
|
7024
7066
|
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",
|
|
@@ -7054,16 +7096,16 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
7054
7096
|
);
|
|
7055
7097
|
function LeadingIcon({ type }) {
|
|
7056
7098
|
const Icon = ICONS2[type];
|
|
7057
|
-
return /* @__PURE__ */
|
|
7099
|
+
return /* @__PURE__ */ jsx97(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
7058
7100
|
}
|
|
7059
7101
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
7060
7102
|
const hasAction = !!(actionLabel && onAction);
|
|
7061
|
-
return /* @__PURE__ */
|
|
7062
|
-
/* @__PURE__ */
|
|
7063
|
-
leadingIcon && /* @__PURE__ */
|
|
7064
|
-
/* @__PURE__ */
|
|
7103
|
+
return /* @__PURE__ */ jsxs73("div", { className: pillClassName(type, hasAction, className), children: [
|
|
7104
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7105
|
+
leadingIcon && /* @__PURE__ */ jsx97(LeadingIcon, { type }),
|
|
7106
|
+
/* @__PURE__ */ jsx97("span", { className: LABEL_CLASSES, children: label })
|
|
7065
7107
|
] }),
|
|
7066
|
-
hasAction && /* @__PURE__ */
|
|
7108
|
+
hasAction && /* @__PURE__ */ jsx97(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
7067
7109
|
] });
|
|
7068
7110
|
}
|
|
7069
7111
|
var ToastContext = createContext13(null);
|
|
@@ -7085,9 +7127,9 @@ function ToastProvider({ children }) {
|
|
|
7085
7127
|
}),
|
|
7086
7128
|
[manager]
|
|
7087
7129
|
);
|
|
7088
|
-
return /* @__PURE__ */
|
|
7130
|
+
return /* @__PURE__ */ jsx97(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs73(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
7089
7131
|
children,
|
|
7090
|
-
/* @__PURE__ */
|
|
7132
|
+
/* @__PURE__ */ jsx97(BaseToast.Portal, { children: /* @__PURE__ */ jsx97(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx97(ToastList, {}) }) })
|
|
7091
7133
|
] }) });
|
|
7092
7134
|
}
|
|
7093
7135
|
function ToastList() {
|
|
@@ -7095,25 +7137,25 @@ function ToastList() {
|
|
|
7095
7137
|
return toasts.map((toast) => {
|
|
7096
7138
|
const type = toast.type ?? "neutral";
|
|
7097
7139
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
7098
|
-
return /* @__PURE__ */
|
|
7140
|
+
return /* @__PURE__ */ jsxs73(
|
|
7099
7141
|
BaseToast.Root,
|
|
7100
7142
|
{
|
|
7101
7143
|
toast,
|
|
7102
7144
|
swipeDirection: ["left", "down"],
|
|
7103
7145
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
7104
7146
|
children: [
|
|
7105
|
-
/* @__PURE__ */
|
|
7106
|
-
leadingIcon && /* @__PURE__ */
|
|
7107
|
-
/* @__PURE__ */
|
|
7147
|
+
/* @__PURE__ */ jsxs73("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
7148
|
+
leadingIcon && /* @__PURE__ */ jsx97(LeadingIcon, { type }),
|
|
7149
|
+
/* @__PURE__ */ jsx97(BaseToast.Title, { render: /* @__PURE__ */ jsx97("span", {}), className: LABEL_CLASSES })
|
|
7108
7150
|
] }),
|
|
7109
|
-
actionLabel && /* @__PURE__ */
|
|
7151
|
+
actionLabel && /* @__PURE__ */ jsx97(
|
|
7110
7152
|
BaseToast.Action,
|
|
7111
7153
|
{
|
|
7112
7154
|
onClick: () => {
|
|
7113
7155
|
onAction?.();
|
|
7114
7156
|
close(toast.id);
|
|
7115
7157
|
},
|
|
7116
|
-
render: /* @__PURE__ */
|
|
7158
|
+
render: /* @__PURE__ */ jsx97(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
7117
7159
|
}
|
|
7118
7160
|
)
|
|
7119
7161
|
]
|
|
@@ -7161,6 +7203,7 @@ export {
|
|
|
7161
7203
|
ConversationLayout,
|
|
7162
7204
|
ConversationMenu,
|
|
7163
7205
|
ConversationPlace,
|
|
7206
|
+
DeletedNotice,
|
|
7164
7207
|
DialogShell,
|
|
7165
7208
|
Divider,
|
|
7166
7209
|
EditableText,
|
|
@@ -7211,6 +7254,7 @@ export {
|
|
|
7211
7254
|
NavItem,
|
|
7212
7255
|
NavTree,
|
|
7213
7256
|
NavTreeSection,
|
|
7257
|
+
NoAccessNotice,
|
|
7214
7258
|
PageHeader,
|
|
7215
7259
|
Panel,
|
|
7216
7260
|
PartCard,
|