@estiva-app/ui 0.119.0 → 0.121.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/index.js CHANGED
@@ -2021,7 +2021,7 @@ function MoveDialog({
2021
2021
  description,
2022
2022
  from,
2023
2023
  folders,
2024
- places: places2,
2024
+ places: places3,
2025
2025
  placesIn,
2026
2026
  startAtTop = false,
2027
2027
  topLabel,
@@ -2039,9 +2039,9 @@ function MoveDialog({
2039
2039
  const offered = (id) => !!id && !!destinations?.some((candidate) => candidate.id === id);
2040
2040
  const [pickedFolder, setPickedFolder] = useState5();
2041
2041
  const folder = pickedFolder ?? [startIn, from].find(offered) ?? "";
2042
- const [read, setRead] = useState5(() => places2 ? { [from]: places2 } : {});
2042
+ const [read, setRead] = useState5(() => places3 ? { [from]: places3 } : {});
2043
2043
  const [picked, setPicked] = useState5();
2044
- const requested = useRef7(new Set(places2 ? [from] : []));
2044
+ const requested = useRef7(new Set(places3 ? [from] : []));
2045
2045
  const readPlaces = (id) => {
2046
2046
  if (!placesIn || requested.current.has(id)) return;
2047
2047
  requested.current.add(id);
@@ -2570,7 +2570,8 @@ function SectionHeader({ title, chevron = false, icon, isExpanded = true, onTogg
2570
2570
  {
2571
2571
  className: cn(
2572
2572
  // `relative`: a dot in the last button's place is placed against the row.
2573
- "group relative flex h-[32px] shrink-0 items-center gap-1 px-2",
2573
+ // 28px, a row's height (Katerina, 17 November); 32px until then.
2574
+ "group relative flex h-[28px] shrink-0 items-center gap-1 px-2",
2574
2575
  !row && "transition-colors",
2575
2576
  // A row is NavItem's shape and colour: 6px corners, secondary words that brighten on hover.
2576
2577
  row ? cn(SIDEBAR_ROW_CLASSES, SIDEBAR_ROW_TEXT_CLASSES) : "rounded-lg",
@@ -2873,7 +2874,7 @@ function SkeletonBar({ className, style, on = "surface", shape = "bar" }) {
2873
2874
  }
2874
2875
  var ROW_BAR_WIDTHS = [150, 100, 170, 120, 90, 140, 110, 160];
2875
2876
  function SkeletonRow({ barWidth = 130 }) {
2876
- return /* @__PURE__ */ jsxs29("div", { className: "flex shrink-0 items-center gap-2 px-2 h-[32px] rounded-lg", children: [
2877
+ return /* @__PURE__ */ jsxs29("div", { className: "flex shrink-0 items-center gap-2 px-2 h-[28px] rounded-lg", children: [
2877
2878
  /* @__PURE__ */ jsx37(SkeletonBar, { className: "w-4 h-4 shrink-0" }),
2878
2879
  /* @__PURE__ */ jsx37(SkeletonBar, { className: "h-3.5", style: { width: barWidth } })
2879
2880
  ] });
@@ -4205,7 +4206,7 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
4205
4206
  {
4206
4207
  hiddenUntilFound: true,
4207
4208
  className: COLLAPSIBLE_PANEL_CLASSES,
4208
- children: /* @__PURE__ */ jsx55("div", { className: cn("flex flex-col pt-0.5", (look === "row" || indent) && "pl-6", contentClassName), children })
4209
+ children: /* @__PURE__ */ jsx55("div", { className: cn("flex flex-col", look === "row" || indent ? "ml-[15px] mt-0.5 border-l border-border-default pl-2" : "pt-0.5", contentClassName), children })
4209
4210
  }
4210
4211
  )
4211
4212
  ] });
@@ -4339,10 +4340,11 @@ function NavItem({
4339
4340
  href,
4340
4341
  "aria-current": active ? "page" : void 0,
4341
4342
  className: cn(
4342
- // shrink-0: the row keeps its 32px inside an overflowing flex column
4343
+ // shrink-0: the row keeps its 28px inside an overflowing flex column
4343
4344
  // — without it the list compresses instead of scrolling (the missing-
4344
4345
  // shrink-0 family; Katerina, 2026-09-02).
4345
- "flex h-8 min-w-0 shrink-0 items-center gap-2 px-2 text-body-2",
4346
+ // 28px (Katerina, 17 November: "what if we make the height of the items 28px"); 32px until then.
4347
+ "flex h-7 min-w-0 shrink-0 items-center gap-2 px-2 text-body-2",
4346
4348
  SIDEBAR_ROW_CLASSES,
4347
4349
  active ? "bg-bg-nav-active text-text-primary" : cn(unread ? "text-text-primary" : SIDEBAR_ROW_TEXT_CLASSES, "hover:bg-bg-hover"),
4348
4350
  // With a menu the ⋮ sits beside the link, so the row keeps its hover
@@ -4457,41 +4459,105 @@ function NavItem({
4457
4459
  id: panelId,
4458
4460
  hiddenUntilFound: true,
4459
4461
  className: COLLAPSIBLE_PANEL_CLASSES,
4460
- children: /* @__PURE__ */ jsx58("div", { className: "flex flex-col gap-0.5 pt-0.5 pl-6", children })
4462
+ children: /* @__PURE__ */ jsx58("div", { className: "ml-[15px] mt-0.5 flex flex-col gap-0.5 border-l border-border-default pl-2", children })
4461
4463
  }
4462
4464
  )
4463
4465
  ] });
4464
4466
  }
4465
4467
 
4466
4468
  // src/NavTree.tsx
4467
- import { createContext as createContext8, useContext as useContext8, useEffect as useEffect11, useRef as useRef17, useState as useState18 } from "react";
4469
+ import { createContext as createContext9, useContext as useContext9, useEffect as useEffect11, useRef as useRef17, useState as useState18 } from "react";
4468
4470
 
4469
4471
  // src/revealCurrentRow.ts
4470
- import { useEffect as useEffect10, useRef as useRef16 } from "react";
4472
+ import { createContext as createContext8, useContext as useContext8, useEffect as useEffect10, useLayoutEffect as useLayoutEffect5, useMemo as useMemo4, useRef as useRef16 } from "react";
4471
4473
  var REVEAL_MS = 200;
4472
4474
  function scrollToRow(row) {
4473
4475
  let box = row.parentElement;
4474
4476
  while (box && !(/(auto|scroll)/.test(getComputedStyle(box).overflowY) && box.scrollHeight > box.clientHeight)) box = box.parentElement;
4475
4477
  if (!box || box === document.documentElement || box === document.body) return;
4478
+ scrollRowInto(box, row);
4479
+ }
4480
+ function scrollRowInto(box, row) {
4476
4481
  const at = row.getBoundingClientRect();
4477
4482
  const view = box.getBoundingClientRect();
4478
4483
  if (at.top < view.top) box.scrollTop -= view.top - at.top;
4479
4484
  else if (at.bottom > view.bottom) box.scrollTop += Math.min(at.bottom - view.bottom, at.top - view.top);
4480
4485
  }
4481
- function useRevealCurrentRow(box, current) {
4486
+ var keyOf = (row, current) => current ?? row.getAttribute("href") ?? row.textContent ?? "";
4487
+ var places = /* @__PURE__ */ new Map();
4488
+ var RESTORE_MS = 2e3;
4489
+ var ListPlaceContext = createContext8(null);
4490
+ function useListPlace(box, name) {
4491
+ const restoring = useRef16(false);
4492
+ useLayoutEffect5(() => {
4493
+ const el = box.current;
4494
+ if (!el || !name) return;
4495
+ const want = places.get(name)?.top ?? 0;
4496
+ restoring.current = want > 0;
4497
+ let set = el.scrollTop;
4498
+ const keep = () => places.set(name, { ...places.get(name), top: el.scrollTop });
4499
+ const finish = () => {
4500
+ restoring.current = false;
4501
+ };
4502
+ const restore = () => {
4503
+ if (!restoring.current) return;
4504
+ el.scrollTop = want;
4505
+ set = el.scrollTop;
4506
+ if (Math.abs(el.scrollTop - want) < 1) finish();
4507
+ };
4508
+ restore();
4509
+ const open = el.querySelector('[aria-current="page"]');
4510
+ const key = open && open.getBoundingClientRect().height > 0 ? keyOf(open) : void 0;
4511
+ if (open && key !== void 0 && key !== places.get(name)?.shown) {
4512
+ finish();
4513
+ places.set(name, { ...places.get(name), shown: key });
4514
+ scrollRowInto(el, open);
4515
+ set = el.scrollTop;
4516
+ }
4517
+ const grows = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(restore);
4518
+ if (el.firstElementChild) grows?.observe(el.firstElementChild);
4519
+ const until = setTimeout(finish, RESTORE_MS);
4520
+ const took = () => finish();
4521
+ const scrolled = () => {
4522
+ if (restoring.current && Math.abs(el.scrollTop - set) > 1) finish();
4523
+ if (!restoring.current) keep();
4524
+ };
4525
+ const takes = ["wheel", "touchstart", "pointerdown", "keydown"];
4526
+ el.addEventListener("scroll", scrolled, { passive: true });
4527
+ for (const type of takes) el.addEventListener(type, took, { passive: true });
4528
+ return () => {
4529
+ el.removeEventListener("scroll", scrolled);
4530
+ for (const type of takes) el.removeEventListener(type, took);
4531
+ grows?.disconnect();
4532
+ clearTimeout(until);
4533
+ if (!restoring.current) keep();
4534
+ restoring.current = false;
4535
+ };
4536
+ }, [box, name]);
4537
+ return useMemo4(() => ({ name, restoring }), [name]);
4538
+ }
4539
+ function useRevealCurrentRow(box, current, place) {
4482
4540
  const shown2 = useRef16(void 0);
4541
+ const within = useContext8(ListPlaceContext);
4542
+ const deferred = !place && within !== null;
4483
4543
  useEffect10(() => {
4484
4544
  const root = box.current;
4485
- if (!root) return;
4545
+ if (!root || deferred) return;
4546
+ const was = () => place?.name ? places.get(place.name)?.shown : shown2.current;
4547
+ const showing = (key) => {
4548
+ if (place?.name) places.set(place.name, { ...places.get(place.name), shown: key });
4549
+ else shown2.current = key;
4550
+ };
4486
4551
  let timer;
4487
4552
  const look = () => {
4488
4553
  timer = void 0;
4489
4554
  const row = root.querySelector('[aria-current="page"]');
4490
4555
  if (!row) return;
4491
- const key = current ?? row.getAttribute("href") ?? row.textContent ?? "";
4492
- if (shown2.current === key) return;
4556
+ const key = keyOf(row, current);
4557
+ if (was() === key) return;
4493
4558
  if (row.getBoundingClientRect().height === 0) return;
4494
- shown2.current = key;
4559
+ if (place) place.restoring.current = false;
4560
+ showing(key);
4495
4561
  scrollToRow(row);
4496
4562
  };
4497
4563
  const soon = () => {
@@ -4504,7 +4570,7 @@ function useRevealCurrentRow(box, current) {
4504
4570
  watch?.disconnect();
4505
4571
  if (timer !== void 0) clearTimeout(timer);
4506
4572
  };
4507
- }, [box, current]);
4573
+ }, [box, current, place, deferred]);
4508
4574
  }
4509
4575
 
4510
4576
  // src/NavTree.tsx
@@ -4537,7 +4603,7 @@ function openingFor(groups, selected, selectedParent) {
4537
4603
  function Line({ message }) {
4538
4604
  return /* @__PURE__ */ jsx59(EmptyState, { scope: "rows", message });
4539
4605
  }
4540
- var groupLinked = createContext8(void 0);
4606
+ var groupLinked = createContext9(void 0);
4541
4607
  function groupBox(box, id) {
4542
4608
  const group = [...box?.querySelectorAll("[data-nav-group]") ?? []].find((one) => one.dataset.navGroup === id);
4543
4609
  return group && group.getBoundingClientRect().height > 0 ? group : void 0;
@@ -4601,7 +4667,7 @@ function NavTreeSection({ id, title, message, loading = false, pending = false,
4601
4667
  return () => clearTimeout(wait);
4602
4668
  }, [pending]);
4603
4669
  const intent = onIntent;
4604
- const linkedTo = useContext8(groupLinked);
4670
+ const linkedTo = useContext9(groupLinked);
4605
4671
  const linked = id !== void 0 && linkedTo === id ? id : void 0;
4606
4672
  return /* @__PURE__ */ jsx59(
4607
4673
  "div",
@@ -4639,7 +4705,7 @@ function NavTreeSection({ id, title, message, loading = false, pending = false,
4639
4705
  }
4640
4706
  );
4641
4707
  }
4642
- function NavTree({ title, titleActions, groups, children, selected, selectedParent, selectedGroup, onSelect, emptyMessage = "", storageKey }) {
4708
+ function NavTree({ title, titleActions, groups, children, selected, selectedParent, selectedGroup, onSelect, emptyMessage = "", storageKey, spaced = false }) {
4643
4709
  const opening = groups ? openingFor(groups, selected, selectedParent) : null;
4644
4710
  const box = useRef17(null);
4645
4711
  useRevealCurrentRow(box, selected);
@@ -4659,7 +4725,10 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
4659
4725
  // `contents`: a box to find the current row in, that lays nothing out — the groups stay the column's own.
4660
4726
  /* @__PURE__ */ jsx59("div", { ref: box, className: "contents", children: /* @__PURE__ */ jsxs43(groupLinked.Provider, { value: selectedGroup, children: [
4661
4727
  title && /* @__PURE__ */ jsx59(SectionHeader, { title, look: "quiet", showActions: "always", actions: titleActions, className: "mt-4 shrink-0" }),
4662
- groups === void 0 ? children : groups === null ? /* @__PURE__ */ jsx59(SkeletonList, { rows: 5 }) : groups.length === 0 ? (
4728
+ groups === void 0 ? (
4729
+ // `contents` again: the items stay the column's own; the margin is on each one that follows another.
4730
+ spaced ? /* @__PURE__ */ jsx59("div", { className: "contents [&>*+*]:mt-2", children }) : children
4731
+ ) : groups === null ? /* @__PURE__ */ jsx59(SkeletonList, { rows: 5 }) : groups.length === 0 ? (
4663
4732
  // No words, no line: an app that says nothing when it has no groups.
4664
4733
  emptyMessage ? /* @__PURE__ */ jsx59(Line, { message: emptyMessage }) : null
4665
4734
  ) : groups.map((group) => /* @__PURE__ */ jsx59(Group, { group, selected, onSelect, opening, storageKey }, group.id))
@@ -4668,13 +4737,13 @@ function NavTree({ title, titleActions, groups, children, selected, selectedPare
4668
4737
  }
4669
4738
 
4670
4739
  // src/Popover.tsx
4671
- import { useMemo as useMemo4 } from "react";
4740
+ import { useMemo as useMemo5 } from "react";
4672
4741
  import { Popover as BasePopover } from "@base-ui/react/popover";
4673
4742
  import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
4674
4743
  var GAP6 = 4;
4675
4744
  var VIEWPORT_PAD6 = 8;
4676
4745
  function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
4677
- const anchorTarget = useMemo4(() => {
4746
+ const anchorTarget = useMemo5(() => {
4678
4747
  if (!anchor) return void 0;
4679
4748
  if (anchor instanceof Element || "getBoundingClientRect" in anchor) return anchor;
4680
4749
  return { getBoundingClientRect: () => anchor };
@@ -4723,11 +4792,11 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
4723
4792
  }
4724
4793
 
4725
4794
  // src/SuggestionMenu.tsx
4726
- import { useCallback as useCallback5, useEffect as useEffect12, useId as useId5, useImperativeHandle, useMemo as useMemo5, useRef as useRef18, useState as useState19 } from "react";
4795
+ import { useCallback as useCallback5, useEffect as useEffect12, useId as useId5, useImperativeHandle, useMemo as useMemo6, useRef as useRef18, useState as useState19 } from "react";
4727
4796
  import { jsx as jsx61, jsxs as jsxs45 } from "react/jsx-runtime";
4728
4797
  function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sections, itemKey, row, onSelect, handle }) {
4729
4798
  const last = useRef18(null);
4730
- const anchor = useMemo5(() => {
4799
+ const anchor = useMemo6(() => {
4731
4800
  if (typeof rect !== "function") return rect;
4732
4801
  return {
4733
4802
  getBoundingClientRect: () => {
@@ -4737,8 +4806,8 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
4737
4806
  contextElement: editorElement ?? void 0
4738
4807
  };
4739
4808
  }, [rect, editorElement]);
4740
- const shown2 = useMemo5(() => sections.filter((section) => section.items.length > 0), [sections]);
4741
- const items = useMemo5(() => shown2.flatMap((section) => section.items), [shown2]);
4809
+ const shown2 = useMemo6(() => sections.filter((section) => section.items.length > 0), [sections]);
4810
+ const items = useMemo6(() => shown2.flatMap((section) => section.items), [shown2]);
4742
4811
  const keys = items.map(itemKey).join("\n");
4743
4812
  const [highlight, setHighlight] = useState19(0);
4744
4813
  const base = useId5();
@@ -4836,7 +4905,7 @@ function SuggestionMenu({ rect, editorElement, ariaLabel, width, maxHeight, sect
4836
4905
  }
4837
4906
 
4838
4907
  // src/ShowMore.tsx
4839
- import { useLayoutEffect as useLayoutEffect5, useRef as useRef19, useState as useState20 } from "react";
4908
+ import { useLayoutEffect as useLayoutEffect6, useRef as useRef19, useState as useState20 } from "react";
4840
4909
  import { IconChevronDown as IconChevronDown4, IconChevronUp } from "@tabler/icons-react";
4841
4910
  import { jsx as jsx62, jsxs as jsxs46 } from "react/jsx-runtime";
4842
4911
  var FADE = "linear-gradient(to top, transparent, black 40px)";
@@ -4844,7 +4913,7 @@ function ShowMore({ children, maxHeight = 96, contentClassName, className }) {
4844
4913
  const box = useRef19(null);
4845
4914
  const [open, setOpen] = useState20(false);
4846
4915
  const [overflows, setOverflows] = useState20(false);
4847
- useLayoutEffect5(() => {
4916
+ useLayoutEffect6(() => {
4848
4917
  const el = box.current;
4849
4918
  if (!el) return;
4850
4919
  const measure = () => setOverflows(el.scrollHeight > maxHeight + 1);
@@ -4948,8 +5017,8 @@ function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reaction
4948
5017
  }
4949
5018
 
4950
5019
  // src/linked.ts
4951
- import { createContext as createContext9 } from "react";
4952
- var inTheBox = createContext9(false);
5020
+ import { createContext as createContext10 } from "react";
5021
+ var inTheBox = createContext10(false);
4953
5022
  function chosenOf(picker) {
4954
5023
  return picker?.value === void 0 ? void 0 : picker.options.find((option) => option.value === picker.value);
4955
5024
  }
@@ -5173,7 +5242,7 @@ function titleOf(object) {
5173
5242
  function idOf(object) {
5174
5243
  return object.address ?? object.eventId ?? object.ref;
5175
5244
  }
5176
- function keyOf(object) {
5245
+ function keyOf2(object) {
5177
5246
  return object.meta.find((slot) => (slot.field === "ref" || slot.field === "key") && !slot.isPubkey && slot.value)?.value;
5178
5247
  }
5179
5248
  function ownerSlotOf(object) {
@@ -5192,7 +5261,7 @@ function childrenOf(object, options) {
5192
5261
  const status = child.slots.status;
5193
5262
  const owner = ownerSlotOf(child);
5194
5263
  const person = owner ? child.people?.[owner.value] : void 0;
5195
- const key = keyOf(child);
5264
+ const key = keyOf2(child);
5196
5265
  return {
5197
5266
  id: idOf(child),
5198
5267
  title: titleOf(child),
@@ -5277,7 +5346,7 @@ function linkedFrom(object, options) {
5277
5346
  };
5278
5347
  }
5279
5348
  const onAct = object.archived ? void 0 : options.onAct;
5280
- const key = keyOf(object);
5349
+ const key = keyOf2(object);
5281
5350
  const noun = nounOf(object);
5282
5351
  const status = statusOf(object, onAct);
5283
5352
  const owner = ownerOf(object, options, onAct);
@@ -5325,7 +5394,7 @@ function linkStateFrom(object, unread, options) {
5325
5394
  }
5326
5395
 
5327
5396
  // src/LinkParts.tsx
5328
- import { useContext as useContext9 } from "react";
5397
+ import { useContext as useContext10 } from "react";
5329
5398
  import { IconCircleCheck, IconCircleDashed as IconCircleDashed3, IconCircleHalf2, IconCircleX, IconFileText, IconMessage2 as IconMessage22 } from "@tabler/icons-react";
5330
5399
  import { jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
5331
5400
  var STATUS_ICON = {
@@ -5382,7 +5451,7 @@ function countWords(count, noun) {
5382
5451
  }
5383
5452
  function CommentCount({ conversation, noun = "comments" }) {
5384
5453
  const { count, href, unread = false } = conversation;
5385
- const boxed = useContext9(inTheBox);
5454
+ const boxed = useContext10(inTheBox);
5386
5455
  const said = countWords(count, noun);
5387
5456
  if (boxed || !href) {
5388
5457
  return /* @__PURE__ */ jsxs47("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: [
@@ -5462,10 +5531,10 @@ function LinkPickers({ status, owner, ownerLabel = "Owner", readOnly = false, di
5462
5531
  import { useSyncExternalStore } from "react";
5463
5532
 
5464
5533
  // src/LinkCard.tsx
5465
- import { useContext as useContext11 } from "react";
5534
+ import { useContext as useContext12 } from "react";
5466
5535
 
5467
5536
  // src/LinkRow.tsx
5468
- import { useContext as useContext10 } from "react";
5537
+ import { useContext as useContext11 } from "react";
5469
5538
  import { jsx as jsx66, jsxs as jsxs48 } from "react/jsx-runtime";
5470
5539
  var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
5471
5540
  function LinkUnavailable({ kind, noun, named: named2 = false, card = false, deleted = false, failed = false }) {
@@ -5476,7 +5545,7 @@ function unavailableWords(noun, { named: named2 = false, deleted = false, failed
5476
5545
  return deleted ? `${named2 ? `File in ${noun}` : noun} deleted` : failed ? `Couldn't load this ${word}` : `You can't open this ${word}`;
5477
5546
  }
5478
5547
  function UnavailableRow({ kind, words, href, card = false }) {
5479
- const wide = useContext10(inTheBox);
5548
+ const wide = useContext11(inTheBox);
5480
5549
  return /* @__PURE__ */ jsxs48(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, "max-w-[480px]"), children: [
5481
5550
  /* @__PURE__ */ jsx66("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx66(LinkedIcon, { kind }) }),
5482
5551
  /* @__PURE__ */ jsx66("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: href && !wide ? /* @__PURE__ */ jsx66(Link, { href, variant: "quiet", children: words }) : words })
@@ -5538,12 +5607,12 @@ function LinkRow({ link, preview = true }) {
5538
5607
  import { Fragment as Fragment17, jsx as jsx67, jsxs as jsxs49 } from "react/jsx-runtime";
5539
5608
  var CARD_CLASSES = "flex flex-col gap-3 p-3";
5540
5609
  function CardLink({ href, truncate = false, className, children }) {
5541
- const boxed = useContext11(inTheBox);
5610
+ const boxed = useContext12(inTheBox);
5542
5611
  if (boxed || !href) return /* @__PURE__ */ jsx67("span", { className: cn(truncate && "truncate", className), children });
5543
5612
  return /* @__PURE__ */ jsx67(Link, { href, variant: "quiet", truncate, className, children });
5544
5613
  }
5545
5614
  function LinkCard({ link, readOnly = false, bare = false }) {
5546
- const boxed = useContext11(inTheBox);
5615
+ const boxed = useContext12(inTheBox);
5547
5616
  if (link.state === "loading") return /* @__PURE__ */ jsx67(LinkCardLoading, { kind: link.kind, shape: link.shape });
5548
5617
  if (link.state === "unavailable") {
5549
5618
  if (link.url) return /* @__PURE__ */ jsx67(WrittenUrl, { url: link.url, block: true });
@@ -5555,7 +5624,7 @@ function LinkCard({ link, readOnly = false, bare = false }) {
5555
5624
  return /* @__PURE__ */ jsx67(Card, { fill: boxed ? "elevated" : "inset", className: cn(CARD_CLASSES, "max-w-[480px]"), children: body });
5556
5625
  }
5557
5626
  function CardBody({ linked, readOnly }) {
5558
- const boxed = useContext11(inTheBox);
5627
+ const boxed = useContext12(inTheBox);
5559
5628
  const on = boxed ? "elevated" : "inset";
5560
5629
  const meta = linkMetaOf(linked);
5561
5630
  const footed = Boolean(linked.status || linked.owner || linked.authors || linked.updated);
@@ -5629,7 +5698,7 @@ var KIND_SHAPE = {
5629
5698
  };
5630
5699
  function LinkCardLoading({ kind, shape }) {
5631
5700
  const { subtitle = false, summary = true, rows = 0, latest = false, ring = false, footer = "line" } = shape ?? KIND_SHAPE[kind];
5632
- const boxed = useContext11(inTheBox);
5701
+ const boxed = useContext12(inTheBox);
5633
5702
  return /* @__PURE__ */ jsx67("div", { className: "animate-skeleton-in", "aria-busy": true, children: /* @__PURE__ */ jsxs49(Card, { fill: boxed ? "elevated" : "inset", "aria-hidden": true, className: cn(CARD_CLASSES, "max-w-[480px]"), children: [
5634
5703
  /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-3", children: [
5635
5704
  /* @__PURE__ */ jsx67("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx67(LinkedIcon, { kind }) }),
@@ -5719,9 +5788,9 @@ function LinkChip({ link, preview = true }) {
5719
5788
  }
5720
5789
 
5721
5790
  // src/AttachedCard.tsx
5722
- import { createContext as createContext10, useContext as useContext12, useEffect as useEffect13, useRef as useRef20 } from "react";
5791
+ import { createContext as createContext11, useContext as useContext13, useEffect as useEffect13, useRef as useRef20 } from "react";
5723
5792
  import { Fragment as Fragment19, jsx as jsx70, jsxs as jsxs51 } from "react/jsx-runtime";
5724
- var Attached = createContext10(false);
5793
+ var Attached = createContext11(false);
5725
5794
  function useRememberedHeight(link, remember, box) {
5726
5795
  const memory = remember?.memory;
5727
5796
  const id = remember?.id;
@@ -5756,7 +5825,7 @@ function AttachedCard({ link, children, onRemove, remember }) {
5756
5825
  const { kept, held } = useRememberedHeight(link, remember, box);
5757
5826
  const shown2 = link?.state === "loading" && !link.shape && kept ? { ...link, shape: kept } : link;
5758
5827
  const card = shown2 ? /* @__PURE__ */ jsx70(LinkCard, { link: shown2 }) : children;
5759
- const inside = useContext12(Attached);
5828
+ const inside = useContext13(Attached);
5760
5829
  if (inside) {
5761
5830
  return remember ? /* @__PURE__ */ jsx70("div", { ref: box, style: held, children: card }) : /* @__PURE__ */ jsx70(Fragment19, { children: card });
5762
5831
  }
@@ -5817,11 +5886,11 @@ function CornerMenu({ children, menu }) {
5817
5886
  }
5818
5887
 
5819
5888
  // src/PartCard.tsx
5820
- import { useContext as useContext13 } from "react";
5889
+ import { useContext as useContext14 } from "react";
5821
5890
  import { jsx as jsx72, jsxs as jsxs53 } from "react/jsx-runtime";
5822
5891
  function PartCard({ state = "ready", kind, heading, href, partKey, noun, children, maxHeight }) {
5823
5892
  const word = noun ?? kindNounOf({ kind }) ?? "File";
5824
- const boxed = useContext13(inTheBox);
5893
+ const boxed = useContext14(inTheBox);
5825
5894
  if (state === "loading") return /* @__PURE__ */ jsx72(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
5826
5895
  if (state === "unavailable" || state === "deleted") {
5827
5896
  return /* @__PURE__ */ jsx72(LinkUnavailable, { kind, noun: state === "deleted" ? `A part of this ${word.toLowerCase()}` : word, deleted: state === "deleted", card: true });
@@ -6039,7 +6108,7 @@ function ConversationActions({ options, onReact, onReply, resolved = false, onRe
6039
6108
  }
6040
6109
 
6041
6110
  // src/ConversationCard.tsx
6042
- import { useContext as useContext14, useLayoutEffect as useLayoutEffect7, useRef as useRef21, useState as useState26 } from "react";
6111
+ import { useContext as useContext15, useLayoutEffect as useLayoutEffect8, useRef as useRef21, useState as useState26 } from "react";
6043
6112
  import { IconArrowNarrowRight, IconCircleCheck as IconCircleCheck4, IconDotsVertical as IconDotsVertical5 } from "@tabler/icons-react";
6044
6113
 
6045
6114
  // src/ConversationMenu.tsx
@@ -6075,7 +6144,7 @@ function ConversationMenu({ resolved = false, onResolve, onReopen, resolveHint,
6075
6144
  }
6076
6145
 
6077
6146
  // src/conversationScroll.ts
6078
- import { createContext as createContext11, useEffect as useEffect14, useState as useState22 } from "react";
6147
+ import { createContext as createContext12, useEffect as useEffect14, useState as useState22 } from "react";
6079
6148
  var NEAR_BOTTOM_PX = 80;
6080
6149
  function isNearBottom(el) {
6081
6150
  return el.scrollHeight - el.scrollTop - el.clientHeight <= NEAR_BOTTOM_PX;
@@ -6150,20 +6219,20 @@ function useSteadyScroll(scrollRef, atBottom, ready, key, enabled) {
6150
6219
  }, [scrollRef, atBottom, ready, key, enabled, handle]);
6151
6220
  return handle;
6152
6221
  }
6153
- var places = /* @__PURE__ */ new Map();
6222
+ var places2 = /* @__PURE__ */ new Map();
6154
6223
  function useLeftAt(key) {
6155
6224
  const [taken, setTaken] = useState22();
6156
6225
  if (!key && taken) setTaken(void 0);
6157
6226
  if (key && taken?.key !== key) {
6158
- const left = places.get(key);
6227
+ const left = places2.get(key);
6159
6228
  const at = left && !left.atBottom ? left.leftAt : null;
6160
6229
  setTaken({ key, at });
6161
6230
  return at;
6162
6231
  }
6163
6232
  return key && taken?.key === key ? taken.at : null;
6164
6233
  }
6165
- var sendsInLayout = createContext11(null);
6166
- var repliesDrawn = createContext11(null);
6234
+ var sendsInLayout = createContext12(null);
6235
+ var repliesDrawn = createContext12(null);
6167
6236
 
6168
6237
  // src/EditedMarker.tsx
6169
6238
  import { jsx as jsx81 } from "react/jsx-runtime";
@@ -6303,18 +6372,18 @@ function ResolveDialog({ onResolve, onCancel, refused }) {
6303
6372
  }
6304
6373
 
6305
6374
  // src/threadCard.ts
6306
- import { createContext as createContext12, useLayoutEffect as useLayoutEffect6, useState as useState25 } from "react";
6307
- var InThreadCard = createContext12(false);
6308
- var InConversationItem = createContext12(null);
6309
- var caretOnOpen = createContext12(0);
6310
- var LineByLayout = createContext12(false);
6375
+ import { createContext as createContext13, useLayoutEffect as useLayoutEffect7, useState as useState25 } from "react";
6376
+ var InThreadCard = createContext13(false);
6377
+ var InConversationItem = createContext13(null);
6378
+ var caretOnOpen = createContext13(0);
6379
+ var LineByLayout = createContext13(false);
6311
6380
  var exactTime = (at) => new Date(at).toLocaleString(void 0, { dateStyle: "long", timeStyle: "short" });
6312
6381
  var momentOf = (at) => at !== void 0 && Number.isFinite(at) ? at : void 0;
6313
6382
  var SHOWN_CLASSES = "data-[shown]:animate-shown data-[shown]:rounded-lg motion-reduce:data-[shown]:animate-none motion-reduce:data-[shown]:bg-accent-wash";
6314
6383
  var FACE_GAP = 4;
6315
6384
  function useFaceLine(root, active, toDot = false) {
6316
6385
  const [line, setLine] = useState25(null);
6317
- useLayoutEffect6(() => {
6386
+ useLayoutEffect7(() => {
6318
6387
  const el = root.current;
6319
6388
  if (!active || !el) {
6320
6389
  setLine(null);
@@ -6374,7 +6443,7 @@ function When({ time, at: given, timeHref, timeLabel = "Link to this" }) {
6374
6443
  var fadeBefore = (end) => `linear-gradient(to right, black ${end - 16}px, transparent ${end}px)`;
6375
6444
  function useClearOfStrip(root, strip, shown2) {
6376
6445
  const [end, setEnd] = useState26();
6377
- useLayoutEffect7(() => {
6446
+ useLayoutEffect8(() => {
6378
6447
  const words = root.current?.querySelector("[data-head]");
6379
6448
  if (!shown2 || !words || !strip.current) {
6380
6449
  setEnd(void 0);
@@ -6527,8 +6596,8 @@ function ConversationCard(props) {
6527
6596
  const { author, about, files, reactions, isNew = false, urgent = false, own = false, editor, heading, deleted: isDeleted = false, unseen = false, replies, onReply, resolved, noun = "comment", onResolve, resolveHint, resolveRefused, onReopen, selected, onClick, onDelete, deleteNote, deleteRefused, menu, menuAfter, menuLabel, editLabel, deleteLabel, moreLabel = "More actions", className, children } = props;
6528
6597
  const deleted = isDeleted || unseen;
6529
6598
  const readOnly = (props.readOnly ?? false) || deleted;
6530
- const inThreadCard = useContext14(InThreadCard);
6531
- const item = useContext14(InConversationItem);
6599
+ const inThreadCard = useContext15(InThreadCard);
6600
+ const item = useContext15(InConversationItem);
6532
6601
  const [hovered, setHovered] = useState26(false);
6533
6602
  const [menuOpen, setMenuOpen] = useState26(false);
6534
6603
  const [picking, setPicking] = useState26(false);
@@ -6682,8 +6751,8 @@ function ReplyCard(props) {
6682
6751
  const strip = useRef21(null);
6683
6752
  const wordsEnd = useClearOfStrip(root, strip, showStrip);
6684
6753
  const settle = () => requestAnimationFrame(() => setHovered(stillHere(root.current)));
6685
- const drawn = useContext14(repliesDrawn);
6686
- useLayoutEffect7(() => {
6754
+ const drawn = useContext15(repliesDrawn);
6755
+ useLayoutEffect8(() => {
6687
6756
  if (drawn) drawn.added += 1;
6688
6757
  }, [drawn]);
6689
6758
  return /* @__PURE__ */ jsxs64(Fragment23, { children: [
@@ -6755,7 +6824,7 @@ function ReplyCard(props) {
6755
6824
  }
6756
6825
 
6757
6826
  // src/ConversationLayout.tsx
6758
- import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect8, useRef as useRef22, useState as useState28 } from "react";
6827
+ import { Fragment as Fragment24, useCallback as useCallback6, useEffect as useEffect16, useLayoutEffect as useLayoutEffect9, useRef as useRef22, useState as useState28 } from "react";
6759
6828
 
6760
6829
  // src/Panel.tsx
6761
6830
  import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
@@ -6831,7 +6900,7 @@ function showInConversationWhenDrawn(id, { wait = WAIT_MS, ...options } = {}) {
6831
6900
  }
6832
6901
 
6833
6902
  // src/seenOnScreen.ts
6834
- import { useEffect as useEffect15, useMemo as useMemo6, useState as useState27 } from "react";
6903
+ import { useEffect as useEffect15, useMemo as useMemo7, useState as useState27 } from "react";
6835
6904
  var NONE = /* @__PURE__ */ new Set();
6836
6905
  var DWELL_MS = 1500;
6837
6906
  var TALL_ENOUGH_PX = 120;
@@ -6908,7 +6977,7 @@ function useSeenOnScreen(key) {
6908
6977
  };
6909
6978
  }, [key, watcher]);
6910
6979
  const ids = seen.key === key ? seen.ids : NONE;
6911
- return useMemo6(() => {
6980
+ return useMemo7(() => {
6912
6981
  const handle = { ids };
6913
6982
  watchers.set(handle, watcher);
6914
6983
  return handle;
@@ -7067,7 +7136,7 @@ function ConversationLayout({
7067
7136
  byPress.current = true;
7068
7137
  onOpenChange(next);
7069
7138
  } : void 0;
7070
- useLayoutEffect8(() => {
7139
+ useLayoutEffect9(() => {
7071
7140
  const at = pressed.current;
7072
7141
  pressed.current = null;
7073
7142
  const item = at && itemAt(at.id);
@@ -7087,11 +7156,11 @@ function ConversationLayout({
7087
7156
  const el = body.current;
7088
7157
  if (beside && el) {
7089
7158
  nearBottom.current = isNearBottom(el);
7090
- if (rememberAs && placedFor.current === rememberAs) places.set(rememberAs, { atBottom: nearBottom.current, offset: el.scrollTop, anchor: anchorIn(el), leftAt: Date.now() });
7159
+ if (rememberAs && placedFor.current === rememberAs) places2.set(rememberAs, { atBottom: nearBottom.current, offset: el.scrollTop, anchor: anchorIn(el), leftAt: Date.now() });
7091
7160
  }
7092
7161
  onBodyScroll?.(event);
7093
7162
  };
7094
- useLayoutEffect8(() => {
7163
+ useLayoutEffect9(() => {
7095
7164
  if (!beside) return;
7096
7165
  if (loading) {
7097
7166
  placedFor.current = null;
@@ -7100,13 +7169,13 @@ function ConversationLayout({
7100
7169
  if (placedFor.current === placeKey) return;
7101
7170
  const el = body.current;
7102
7171
  if (!el) return;
7103
- const left = rememberAs ? places.get(rememberAs) : void 0;
7172
+ const left = rememberAs ? places2.get(rememberAs) : void 0;
7104
7173
  const opened2 = open !== void 0 ? itemAt(open) : null;
7105
7174
  if (opened2) {
7106
7175
  landOn(el, opened2);
7107
7176
  markShown(opened2);
7108
7177
  nearBottom.current = isNearBottom(el);
7109
- if (rememberAs) places.set(rememberAs, { atBottom: nearBottom.current, offset: el.scrollTop, anchor: anchorIn(el), leftAt: Date.now() });
7178
+ if (rememberAs) places2.set(rememberAs, { atBottom: nearBottom.current, offset: el.scrollTop, anchor: anchorIn(el), leftAt: Date.now() });
7110
7179
  } else if (left && !left.atBottom) {
7111
7180
  el.scrollTop = left.offset;
7112
7181
  const card = left.anchor && cardIn(el, left.anchor.id);
@@ -7115,11 +7184,11 @@ function ConversationLayout({
7115
7184
  } else {
7116
7185
  el.scrollTop = el.scrollHeight;
7117
7186
  nearBottom.current = true;
7118
- if (rememberAs) places.set(rememberAs, { atBottom: true, offset: el.scrollTop, leftAt: Date.now() });
7187
+ if (rememberAs) places2.set(rememberAs, { atBottom: true, offset: el.scrollTop, leftAt: Date.now() });
7119
7188
  }
7120
7189
  placedFor.current = placeKey;
7121
7190
  }, [beside, placeKey, rememberAs, loading]);
7122
- useLayoutEffect8(() => {
7191
+ useLayoutEffect9(() => {
7123
7192
  const pressedIt = byPress.current;
7124
7193
  byPress.current = false;
7125
7194
  if (!beside || pressedIt || open === void 0 || placedFor.current !== placeKey) return;
@@ -7135,11 +7204,11 @@ function ConversationLayout({
7135
7204
  useEffect16(() => {
7136
7205
  if (!beside || !rememberAs) return;
7137
7206
  return () => {
7138
- const left = places.get(rememberAs);
7139
- if (left) places.set(rememberAs, { ...left, leftAt: Date.now() });
7207
+ const left = places2.get(rememberAs);
7208
+ if (left) places2.set(rememberAs, { ...left, leftAt: Date.now() });
7140
7209
  };
7141
7210
  }, [beside, rememberAs]);
7142
- useLayoutEffect8(() => {
7211
+ useLayoutEffect9(() => {
7143
7212
  if (!beside || loading || !nearBottom.current) return;
7144
7213
  const el = body.current;
7145
7214
  if (el) el.scrollTop = el.scrollHeight;
@@ -7362,7 +7431,7 @@ function NoAccessNotice({ what }) {
7362
7431
  }
7363
7432
 
7364
7433
  // src/Thread.tsx
7365
- import { Children, useCallback as useCallback7, useContext as useContext15, useLayoutEffect as useLayoutEffect9, useRef as useRef23, useState as useState32 } from "react";
7434
+ import { Children, useCallback as useCallback7, useContext as useContext16, useLayoutEffect as useLayoutEffect10, useRef as useRef23, useState as useState32 } from "react";
7366
7435
  import { IconX as IconX6 } from "@tabler/icons-react";
7367
7436
  import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs74 } from "react/jsx-runtime";
7368
7437
  var always = () => true;
@@ -7403,7 +7472,7 @@ function Thread({
7403
7472
  const [drawn] = useState32(() => ({ added: 0 }));
7404
7473
  const last = useRef23(null);
7405
7474
  const steady = useSteadyScroll(body, void 0, always, start?.id, place === "beside");
7406
- useLayoutEffect9(() => {
7475
+ useLayoutEffect10(() => {
7407
7476
  const el = body.current;
7408
7477
  if (place !== "beside" || !el) return;
7409
7478
  const now = { added: drawn.added, start: start?.id };
@@ -7413,7 +7482,7 @@ function Thread({
7413
7482
  steady.rebase();
7414
7483
  });
7415
7484
  const foot = notice ?? box;
7416
- const layoutLine = useContext15(LineByLayout);
7485
+ const layoutLine = useContext16(LineByLayout);
7417
7486
  if (place === "under") {
7418
7487
  return /* @__PURE__ */ jsxs74("div", { ref: under, "data-thread": "under", className: cn("flex flex-col", className), children: [
7419
7488
  (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).
@@ -7516,9 +7585,10 @@ function PageHeader({ title, leading, private: locked = false, after, meta, time
7516
7585
  // src/ListColumn.tsx
7517
7586
  import { useRef as useRef24 } from "react";
7518
7587
  import { jsx as jsx100, jsxs as jsxs77 } from "react/jsx-runtime";
7519
- function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, className, broken = false }) {
7588
+ function Column({ title, chevron = false, titleMenu, actions, above, collapsed = false, children, rememberAs, className, broken = false }) {
7520
7589
  const rows = useRef24(null);
7521
- useRevealCurrentRow(rows);
7590
+ const place = useListPlace(rows, broken ? void 0 : rememberAs);
7591
+ useRevealCurrentRow(rows, void 0, place);
7522
7592
  return /* @__PURE__ */ jsxs77(
7523
7593
  "div",
7524
7594
  {
@@ -7537,7 +7607,7 @@ function Column({ title, chevron = false, titleMenu, actions, above, collapsed =
7537
7607
  broken ? (
7538
7608
  // The message takes the room the list had and centres itself in it (Katerina, 19 September).
7539
7609
  /* @__PURE__ */ jsx100("div", { className: "flex min-h-0 flex-1 flex-col px-3", children })
7540
- ) : /* @__PURE__ */ jsx100(ScrollArea, { className: "flex-1", viewportRef: rows, contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children })
7610
+ ) : /* @__PURE__ */ jsx100(ScrollArea, { className: "flex-1", viewportRef: rows, contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children: /* @__PURE__ */ jsx100(ListPlaceContext.Provider, { value: place, children }) })
7541
7611
  ]
7542
7612
  }
7543
7613
  );
@@ -7557,7 +7627,7 @@ function ListColumn(props) {
7557
7627
  }
7558
7628
 
7559
7629
  // src/ListTable.tsx
7560
- import { createContext as createContext13, useCallback as useCallback8, useContext as useContext16, useLayoutEffect as useLayoutEffect10, useRef as useRef25, useState as useState33 } from "react";
7630
+ import { createContext as createContext14, useCallback as useCallback8, useContext as useContext17, useLayoutEffect as useLayoutEffect11, useRef as useRef25, useState as useState33 } from "react";
7561
7631
  import { jsx as jsx101, jsxs as jsxs78 } from "react/jsx-runtime";
7562
7632
  var WIDTH_PX = { small: 80, medium: 96, large: 112 };
7563
7633
  var WIDTH_CLASSES = { small: "w-20", medium: "w-24", large: "w-28" };
@@ -7567,7 +7637,7 @@ var sizeOf = (column) => column.width ?? DEFAULT_WIDTH;
7567
7637
  var ROW_FRAME_PX = 24 + 16 + 12;
7568
7638
  var GAP_PX = 12;
7569
7639
  var END_PX = 64;
7570
- var ListTableContext = createContext13(null);
7640
+ var ListTableContext = createContext14(null);
7571
7641
  var showsColumn = (column, shown2) => shown2 === "all" || shown2 === "high" && (column.keep ?? "high") === "high";
7572
7642
  var widthOf = (columns, end) => ROW_FRAME_PX + NAME_LEAST_PX + columns.reduce((sum, column) => sum + GAP_PX + WIDTH_PX[sizeOf(column)], 0) + (end ? GAP_PX + END_PX : 0);
7573
7643
  function ListTable({ "aria-label": label, nameLabel = "Name", columns, end = false, headings = true, children, className }) {
@@ -7579,7 +7649,7 @@ function ListTable({ "aria-label": label, nameLabel = "Name", columns, end = fal
7579
7649
  const high = columns.filter((column) => (column.keep ?? "high") === "high");
7580
7650
  setShown(width >= widthOf(columns, end) ? "all" : width >= widthOf(high, end) ? "high" : "none");
7581
7651
  }, [columns, end]);
7582
- useLayoutEffect10(() => {
7652
+ useLayoutEffect11(() => {
7583
7653
  measure();
7584
7654
  const list = box.current;
7585
7655
  if (!list || typeof ResizeObserver === "undefined") return;
@@ -7600,7 +7670,7 @@ function ListTable({ "aria-label": label, nameLabel = "Name", columns, end = fal
7600
7670
  ] }) });
7601
7671
  }
7602
7672
  function ListTableRow({ href, label, description, icon, cells, end, onClick, ...rest }) {
7603
- const table = useContext16(ListTableContext);
7673
+ const table = useContext17(ListTableContext);
7604
7674
  if (!table) throw new Error("ListTableRow is a row of a ListTable: put it inside one.");
7605
7675
  return (
7606
7676
  // A row's look in every list: 8px corners, the fill under the pointer and no edge.
@@ -7677,7 +7747,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
7677
7747
  }
7678
7748
 
7679
7749
  // src/Toast.tsx
7680
- import { createContext as createContext14, useContext as useContext17, useMemo as useMemo7 } from "react";
7750
+ import { createContext as createContext15, useContext as useContext18, useMemo as useMemo8 } from "react";
7681
7751
  import { Toast as BaseToast } from "@base-ui/react/toast";
7682
7752
  import { IconAlertCircle as IconAlertCircle2, IconCircleCheck as IconCircleCheck5, IconCircleX as IconCircleX2 } from "@tabler/icons-react";
7683
7753
  import { jsx as jsx103, jsxs as jsxs80 } from "react/jsx-runtime";
@@ -7728,11 +7798,11 @@ function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAct
7728
7798
  hasAction && /* @__PURE__ */ jsx103(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
7729
7799
  ] });
7730
7800
  }
7731
- var ToastContext = createContext14(null);
7801
+ var ToastContext = createContext15(null);
7732
7802
  var VISIBLE_TOASTS = 3;
7733
7803
  function ToastProvider({ children }) {
7734
- const manager = useMemo7(() => BaseToast.createToastManager(), []);
7735
- const value = useMemo7(
7804
+ const manager = useMemo8(() => BaseToast.createToastManager(), []);
7805
+ const value = useMemo8(
7736
7806
  () => ({
7737
7807
  showToast: ({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, durationMs = 5e3, onClose }) => manager.add({
7738
7808
  title: label,
@@ -7785,7 +7855,7 @@ function ToastList() {
7785
7855
  });
7786
7856
  }
7787
7857
  function useToast() {
7788
- const ctx = useContext17(ToastContext);
7858
+ const ctx = useContext18(ToastContext);
7789
7859
  if (!ctx) throw new Error("useToast must be used within ToastProvider");
7790
7860
  return ctx;
7791
7861
  }