@homebound/beam 3.19.0 → 3.20.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
@@ -18885,7 +18885,7 @@ function invertSpacing(value) {
18885
18885
 
18886
18886
  // src/components/Layout/GridTableLayout/GridTableLayout.tsx
18887
18887
  import { useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
18888
- import React17, { useCallback as useCallback25, useEffect as useEffect28, useLayoutEffect as useLayoutEffect4, useMemo as useMemo38, useRef as useRef48, useState as useState44 } from "react";
18888
+ import React17, { useCallback as useCallback26, useEffect as useEffect28, useLayoutEffect as useLayoutEffect4, useMemo as useMemo38, useRef as useRef48, useState as useState45 } from "react";
18889
18889
 
18890
18890
  // src/components/ButtonMenu.tsx
18891
18891
  import { useRef as useRef46 } from "react";
@@ -19912,6 +19912,39 @@ function LoadingTable(props) {
19912
19912
  ] });
19913
19913
  }
19914
19914
 
19915
+ // src/components/Layout/GridTableLayout/usePersistedTableView.ts
19916
+ import { useCallback as useCallback25, useState as useState44 } from "react";
19917
+ function usePersistedTableView(defaultView, persist) {
19918
+ const storageKey = persist ? getGridTableViewStorageKey(window.location.pathname) : void 0;
19919
+ const [view, setView] = useState44(() => {
19920
+ if (!storageKey) return defaultView;
19921
+ try {
19922
+ return parseStoredTableView(localStorage.getItem(storageKey)) ?? defaultView;
19923
+ } catch {
19924
+ return defaultView;
19925
+ }
19926
+ });
19927
+ const setViewAndPersist = useCallback25(
19928
+ (next) => {
19929
+ setView(next);
19930
+ if (storageKey) {
19931
+ try {
19932
+ localStorage.setItem(storageKey, next);
19933
+ } catch {
19934
+ }
19935
+ }
19936
+ },
19937
+ [storageKey]
19938
+ );
19939
+ return [view, setViewAndPersist];
19940
+ }
19941
+ function getGridTableViewStorageKey(pathname) {
19942
+ return `beam.gridTableLayout.view.${pathname}`;
19943
+ }
19944
+ function parseStoredTableView(raw) {
19945
+ return raw === "list" || raw === "card" ? raw : void 0;
19946
+ }
19947
+
19915
19948
  // src/components/Layout/GridTableLayout/GridTableLayout.tsx
19916
19949
  import { trussProps as trussProps72, maybeCssVar as maybeCssVar41 } from "@homebound/truss/runtime";
19917
19950
  import { Fragment as Fragment36, jsx as jsx148, jsxs as jsxs75 } from "react/jsx-runtime";
@@ -19941,7 +19974,7 @@ function GridTableLayoutComponent(props) {
19941
19974
  return columns.some((c) => c.canHide);
19942
19975
  }, [columns, hideEditColumns]);
19943
19976
  const api = useMemo38(() => tableProps.api ?? new GridTableApiImpl(), [tableProps.api]);
19944
- const [view, setView] = useState44(defaultView);
19977
+ const [view, setView] = usePersistedTableView(defaultView, !!withCardView);
19945
19978
  const clientSearch = layoutState?.search === "client" ? layoutState.searchString : void 0;
19946
19979
  const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView);
19947
19980
  const isVirtualized = tableProps.as === "virtual";
@@ -20036,7 +20069,7 @@ function useGridTableLayoutState({
20036
20069
  const groupBy = useGroupBy(maybeGroupBy ?? {
20037
20070
  none: "none"
20038
20071
  });
20039
- const [searchString, setSearchString] = useState44("");
20072
+ const [searchString, setSearchString] = useState45("");
20040
20073
  const columnsFallback = "unset-columns";
20041
20074
  const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(persistedColumns?.storageKey ?? columnsFallback, void 0);
20042
20075
  const paginationFallbackKey = "unset-pagination";
@@ -20046,7 +20079,7 @@ function useGridTableLayoutState({
20046
20079
  100
20047
20080
  // default page size
20048
20081
  );
20049
- const [page, setPage] = useState44({
20082
+ const [page, setPage] = useState45({
20050
20083
  offset: 0,
20051
20084
  limit: persistedPageSize
20052
20085
  });
@@ -20078,7 +20111,7 @@ function useGridTableLayoutState({
20078
20111
  };
20079
20112
  }
20080
20113
  function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
20081
- const syncHeightVar = useCallback25(() => {
20114
+ const syncHeightVar = useCallback26(() => {
20082
20115
  const tableWrapper = tableWrapperRef.current;
20083
20116
  if (!tableWrapper) return;
20084
20117
  if (!enabled) {
@@ -20156,7 +20189,7 @@ function PreventBrowserScroll({
20156
20189
  }
20157
20190
 
20158
20191
  // src/components/Layout/RightPaneLayout/RightPaneContext.tsx
20159
- import React18, { useCallback as useCallback26, useContext as useContext18, useMemo as useMemo39, useState as useState45 } from "react";
20192
+ import React18, { useCallback as useCallback27, useContext as useContext18, useMemo as useMemo39, useState as useState46 } from "react";
20160
20193
  import { jsx as jsx150 } from "react/jsx-runtime";
20161
20194
  var RightPaneContext = React18.createContext({
20162
20195
  openInPane: () => {
@@ -20169,17 +20202,17 @@ var RightPaneContext = React18.createContext({
20169
20202
  rightPaneContent: null
20170
20203
  });
20171
20204
  function RightPaneProvider({ children }) {
20172
- const [rightPaneContent, setRightPaneContent] = useState45(void 0);
20173
- const [isRightPaneOpen, setIsRightPaneOpen] = useState45(false);
20174
- const openInPane = useCallback26(
20205
+ const [rightPaneContent, setRightPaneContent] = useState46(void 0);
20206
+ const [isRightPaneOpen, setIsRightPaneOpen] = useState46(false);
20207
+ const openInPane = useCallback27(
20175
20208
  (opts) => {
20176
20209
  setRightPaneContent(opts?.content);
20177
20210
  setIsRightPaneOpen(true);
20178
20211
  },
20179
20212
  [setRightPaneContent]
20180
20213
  );
20181
- const closePane = useCallback26(() => setIsRightPaneOpen(false), []);
20182
- const clearPane = useCallback26(() => setRightPaneContent(void 0), [setRightPaneContent]);
20214
+ const closePane = useCallback27(() => setIsRightPaneOpen(false), []);
20215
+ const clearPane = useCallback27(() => setRightPaneContent(void 0), [setRightPaneContent]);
20183
20216
  const context = useMemo39(
20184
20217
  () => ({ openInPane, closePane, clearPane, rightPaneContent, isRightPaneOpen }),
20185
20218
  [openInPane, closePane, rightPaneContent, clearPane, isRightPaneOpen]
@@ -20323,7 +20356,7 @@ function ScrollableFooter(props) {
20323
20356
 
20324
20357
  // src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
20325
20358
  import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
20326
- import { useEffect as useEffect30, useState as useState46 } from "react";
20359
+ import { useEffect as useEffect30, useState as useState47 } from "react";
20327
20360
 
20328
20361
  // src/components/Layout/TableReviewLayout/SidePanel.tsx
20329
20362
  import { jsx as jsx153, jsxs as jsxs77 } from "react/jsx-runtime";
@@ -20363,7 +20396,7 @@ function TableReviewLayout(props) {
20363
20396
  rightPaneWidth = defaultRightPaneWidth
20364
20397
  } = props;
20365
20398
  const tid = useTestIds(props, "tableReviewLayout");
20366
- const [isPanelVisible, setIsPanelVisible] = useState46(!!panelContent);
20399
+ const [isPanelVisible, setIsPanelVisible] = useState47(!!panelContent);
20367
20400
  useEffect30(() => {
20368
20401
  setIsPanelVisible(!!panelContent);
20369
20402
  }, [panelContent]);
@@ -20729,7 +20762,7 @@ import { useHover as useHover16 } from "react-aria";
20729
20762
 
20730
20763
  // src/components/Tag.tsx
20731
20764
  import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
20732
- import { useRef as useRef52, useState as useState47 } from "react";
20765
+ import { useRef as useRef52, useState as useState48 } from "react";
20733
20766
  import { trussProps as trussProps76 } from "@homebound/truss/runtime";
20734
20767
  import { jsx as jsx158, jsxs as jsxs81 } from "react/jsx-runtime";
20735
20768
  function Tag(props) {
@@ -20742,7 +20775,7 @@ function Tag(props) {
20742
20775
  } = props;
20743
20776
  const typeStyles2 = getStyles(type);
20744
20777
  const tid = useTestIds(otherProps);
20745
- const [showTooltip, setShowTooltip] = useState47(false);
20778
+ const [showTooltip, setShowTooltip] = useState48(false);
20746
20779
  const ref = useRef52(null);
20747
20780
  useResizeObserver6({
20748
20781
  ref,
@@ -20952,7 +20985,7 @@ function Copy(props) {
20952
20985
 
20953
20986
  // src/components/DnDGrid/DnDGrid.tsx
20954
20987
  import equal2 from "fast-deep-equal";
20955
- import { useCallback as useCallback27, useRef as useRef53 } from "react";
20988
+ import { useCallback as useCallback28, useRef as useRef53 } from "react";
20956
20989
 
20957
20990
  // src/components/DnDGrid/DnDGridContext.tsx
20958
20991
  import { createContext as createContext10, useContext as useContext20 } from "react";
@@ -20988,19 +21021,19 @@ function DnDGrid(props) {
20988
21021
  const activeStyles3 = activeItemStyles ?? {
20989
21022
  boxShadow: "bshModal"
20990
21023
  };
20991
- const getGridItems = useCallback27(() => {
21024
+ const getGridItems = useCallback28(() => {
20992
21025
  return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
20993
21026
  }, []);
20994
- const getGridItemIdOrder = useCallback27(() => {
21027
+ const getGridItemIdOrder = useCallback28(() => {
20995
21028
  return getGridItems().map((child) => child.getAttribute(gridItemIdKey)).filter(isDefined);
20996
21029
  }, [getGridItems]);
20997
- const initReorder = useCallback27(() => {
21030
+ const initReorder = useCallback28(() => {
20998
21031
  if (gridEl.current && dragEl.current) {
20999
21032
  initialOrder.current = getGridItemIdOrder();
21000
21033
  setInlineStyles(dragEl.current, activeStyles3);
21001
21034
  }
21002
21035
  }, [getGridItemIdOrder, activeStyles3]);
21003
- const commitReorder = useCallback27(() => {
21036
+ const commitReorder = useCallback28(() => {
21004
21037
  if (gridEl.current && dragEl.current) {
21005
21038
  const currentOrder = getGridItemIdOrder();
21006
21039
  if (!equal2(currentOrder, initialOrder.current)) onReorder(currentOrder);
@@ -21010,7 +21043,7 @@ function DnDGrid(props) {
21010
21043
  initialOrder.current = currentOrder;
21011
21044
  }
21012
21045
  }, [onReorder, getGridItemIdOrder, activeStyles3]);
21013
- const cancelReorder = useCallback27(() => {
21046
+ const cancelReorder = useCallback28(() => {
21014
21047
  if (gridEl.current && dragEl.current && initialOrder.current) {
21015
21048
  const currentOrder = getGridItemIdOrder();
21016
21049
  if (!equal2(currentOrder, initialOrder.current)) {
@@ -21032,7 +21065,7 @@ function DnDGrid(props) {
21032
21065
  reorderViaKeyboard.current = false;
21033
21066
  }
21034
21067
  }, [getGridItemIdOrder, getGridItems, activeStyles3]);
21035
- const onMove = useCallback27((e) => {
21068
+ const onMove = useCallback28((e) => {
21036
21069
  if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
21037
21070
  const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX;
21038
21071
  const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY;
@@ -21055,7 +21088,7 @@ function DnDGrid(props) {
21055
21088
  }
21056
21089
  }
21057
21090
  }, []);
21058
- const onDragStart = useCallback27((e) => {
21091
+ const onDragStart = useCallback28((e) => {
21059
21092
  if (!reorderViaKeyboard.current && dragEl.current && gridEl.current) {
21060
21093
  initReorder();
21061
21094
  const rect = dragEl.current.getBoundingClientRect();
@@ -21085,7 +21118,7 @@ function DnDGrid(props) {
21085
21118
  gridEl.current.addEventListener("touchmove", onMove);
21086
21119
  }
21087
21120
  }, [initReorder, onMove, activeStyles3]);
21088
- const onDragEnd = useCallback27((e) => {
21121
+ const onDragEnd = useCallback28((e) => {
21089
21122
  if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
21090
21123
  e.preventDefault();
21091
21124
  cloneEl.current.replaceWith(dragEl.current);
@@ -21098,7 +21131,7 @@ function DnDGrid(props) {
21098
21131
  gridEl.current.removeEventListener("touchmove", onMove);
21099
21132
  }
21100
21133
  }, [commitReorder, onMove]);
21101
- const onDragHandleKeyDown = useCallback27((e) => {
21134
+ const onDragHandleKeyDown = useCallback28((e) => {
21102
21135
  const moveHandle = e.target;
21103
21136
  if (dragEl.current instanceof HTMLElement && moveHandle instanceof HTMLElement && gridEl.current) {
21104
21137
  const isSpaceKey = e.key === " ";
@@ -21470,7 +21503,7 @@ function HomeboundLogo(props) {
21470
21503
 
21471
21504
  // src/components/MaxLines.tsx
21472
21505
  import { useLayoutEffect as useLayoutEffect5, useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
21473
- import { useCallback as useCallback28, useEffect as useEffect32, useRef as useRef54, useState as useState48 } from "react";
21506
+ import { useCallback as useCallback29, useEffect as useEffect32, useRef as useRef54, useState as useState49 } from "react";
21474
21507
  import { trussProps as trussProps83, maybeCssVar as maybeCssVar47 } from "@homebound/truss/runtime";
21475
21508
  import { jsx as jsx167, jsxs as jsxs84 } from "react/jsx-runtime";
21476
21509
  function MaxLines({
@@ -21478,8 +21511,8 @@ function MaxLines({
21478
21511
  children
21479
21512
  }) {
21480
21513
  const elRef = useRef54(null);
21481
- const [hasMore, setHasMore] = useState48(false);
21482
- const [expanded, setExpanded] = useState48(false);
21514
+ const [hasMore, setHasMore] = useState49(false);
21515
+ const [expanded, setExpanded] = useState49(false);
21483
21516
  useLayoutEffect5(() => {
21484
21517
  if (!elRef.current) return;
21485
21518
  setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
@@ -21487,7 +21520,7 @@ function MaxLines({
21487
21520
  useEffect32(() => {
21488
21521
  setExpanded(false);
21489
21522
  }, [children]);
21490
- const onResize = useCallback28(() => {
21523
+ const onResize = useCallback29(() => {
21491
21524
  if (!elRef.current) return;
21492
21525
  !expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
21493
21526
  }, [expanded]);
@@ -21517,7 +21550,7 @@ import { camelCase as camelCase6 } from "change-case";
21517
21550
  // src/components/AppNav/AppNavGroup.tsx
21518
21551
  import { useResizeObserver as useResizeObserver8 } from "@react-aria/utils";
21519
21552
  import { camelCase as camelCase5, kebabCase } from "change-case";
21520
- import { useCallback as useCallback30, useEffect as useEffect33, useMemo as useMemo48, useState as useState50 } from "react";
21553
+ import { useCallback as useCallback31, useEffect as useEffect33, useMemo as useMemo48, useState as useState51 } from "react";
21521
21554
 
21522
21555
  // src/components/AppNav/AppNavGroupTrigger.tsx
21523
21556
  import { useMemo as useMemo47, useRef as useRef55 } from "react";
@@ -21685,7 +21718,7 @@ function entryHasIcons(item) {
21685
21718
  }
21686
21719
 
21687
21720
  // src/components/AppNav/useAppNavGroupExpanded.ts
21688
- import { useCallback as useCallback29, useState as useState49 } from "react";
21721
+ import { useCallback as useCallback30, useState as useState50 } from "react";
21689
21722
  var APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY = "beam.appNav.expandedLinkGroups";
21690
21723
  function loadStored() {
21691
21724
  try {
@@ -21704,13 +21737,13 @@ function persistLabel(label, expanded) {
21704
21737
  }
21705
21738
  function useAppNavGroupExpanded(linkGroup) {
21706
21739
  const { label } = linkGroup;
21707
- const [userExpanded, setUserExpanded] = useState49(() => {
21740
+ const [userExpanded, setUserExpanded] = useState50(() => {
21708
21741
  const stored = loadStored();
21709
21742
  return label in stored ? stored[label] : null;
21710
21743
  });
21711
21744
  const hasActiveLink = appNavLinkGroupLinks(linkGroup).some((l) => l.active);
21712
21745
  const expanded = userExpanded !== null ? userExpanded : hasActiveLink ? true : linkGroup.defaultExpanded ?? false;
21713
- const onToggle = useCallback29(() => {
21746
+ const onToggle = useCallback30(() => {
21714
21747
  const next = !expanded;
21715
21748
  setUserExpanded(next);
21716
21749
  persistLabel(label, next);
@@ -21745,15 +21778,15 @@ function AppNavGroupDisclosure(props) {
21745
21778
  } = useAppNavGroupExpanded(linkGroup);
21746
21779
  const tid = useTestIds(props, "linkGroup");
21747
21780
  const navGroupId = `nav-group-${kebabCase(linkGroup.label)}`;
21748
- const [contentEl, setContentEl] = useState50(null);
21781
+ const [contentEl, setContentEl] = useState51(null);
21749
21782
  const contentRef = useMemo48(() => ({
21750
21783
  current: contentEl
21751
21784
  }), [contentEl]);
21752
- const [contentHeight, setContentHeight] = useState50(expanded ? "auto" : "0");
21785
+ const [contentHeight, setContentHeight] = useState51(expanded ? "auto" : "0");
21753
21786
  useEffect33(() => {
21754
21787
  setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
21755
21788
  }, [expanded, contentEl]);
21756
- const onResize = useCallback30(() => {
21789
+ const onResize = useCallback31(() => {
21757
21790
  if (contentEl && expanded) {
21758
21791
  setContentHeight(`${contentEl.scrollHeight}px`);
21759
21792
  }
@@ -21894,7 +21927,7 @@ function AppNavItems(props) {
21894
21927
 
21895
21928
  // src/components/Navbar/NavbarMobileMenu.tsx
21896
21929
  import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
21897
- import { useEffect as useEffect34, useState as useState51 } from "react";
21930
+ import { useEffect as useEffect34, useState as useState52 } from "react";
21898
21931
  import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll2 } from "react-aria";
21899
21932
  import { createPortal as createPortal6 } from "react-dom";
21900
21933
  import { useLocation } from "react-router-dom";
@@ -21905,7 +21938,7 @@ function NavbarMobileMenu(props) {
21905
21938
  items
21906
21939
  } = props;
21907
21940
  const tid = useTestIds(props, "navbar");
21908
- const [isOpen, setIsOpen] = useState51(false);
21941
+ const [isOpen, setIsOpen] = useState52(false);
21909
21942
  const {
21910
21943
  pathname,
21911
21944
  search
@@ -22073,7 +22106,7 @@ function NavbarUserMenu({
22073
22106
 
22074
22107
  // src/components/Tabs.tsx
22075
22108
  import { camelCase as camelCase7 } from "change-case";
22076
- import { useEffect as useEffect35, useMemo as useMemo49, useRef as useRef56, useState as useState52 } from "react";
22109
+ import { useEffect as useEffect35, useMemo as useMemo49, useRef as useRef56, useState as useState53 } from "react";
22077
22110
  import { mergeProps as mergeProps27, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
22078
22111
  import { matchPath } from "react-router";
22079
22112
  import { Link as Link5, useLocation as useLocation2 } from "react-router-dom";
@@ -22134,7 +22167,7 @@ function Tabs(props) {
22134
22167
  focusProps
22135
22168
  } = useFocusRing15();
22136
22169
  const tid = useTestIds(others, "tabs");
22137
- const [active, setActive] = useState52(selected);
22170
+ const [active, setActive] = useState53(selected);
22138
22171
  const ref = useRef56(null);
22139
22172
  useEffect35(() => setActive(selected), [selected]);
22140
22173
  function onKeyUp(e) {
@@ -22372,7 +22405,7 @@ function PageHeader2(props) {
22372
22405
 
22373
22406
  // src/components/ScrollShadows.tsx
22374
22407
  import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
22375
- import { useCallback as useCallback31, useMemo as useMemo50, useRef as useRef57, useState as useState53 } from "react";
22408
+ import { useCallback as useCallback32, useMemo as useMemo50, useRef as useRef57, useState as useState54 } from "react";
22376
22409
  import { trussProps as trussProps91, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
22377
22410
  import { jsx as jsx177, jsxs as jsxs92 } from "react/jsx-runtime";
22378
22411
  function ScrollShadows(props) {
@@ -22390,8 +22423,8 @@ function ScrollShadows(props) {
22390
22423
  if (!bgColor.includes("rgba")) {
22391
22424
  throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
22392
22425
  }
22393
- const [showStartShadow, setShowStartShadow] = useState53(false);
22394
- const [showEndShadow, setShowEndShadow] = useState53(false);
22426
+ const [showStartShadow, setShowStartShadow] = useState54(false);
22427
+ const [showEndShadow, setShowEndShadow] = useState54(false);
22395
22428
  const scrollRef = useRef57(null);
22396
22429
  const [startShadowStyles, endShadowStyles] = useMemo50(() => {
22397
22430
  const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
@@ -22444,7 +22477,7 @@ function ScrollShadows(props) {
22444
22477
  }
22445
22478
  }];
22446
22479
  }, [horizontal, bgColor]);
22447
- const updateScrollProps = useCallback31((el) => {
22480
+ const updateScrollProps = useCallback32((el) => {
22448
22481
  const {
22449
22482
  scrollTop,
22450
22483
  scrollHeight,
@@ -22459,7 +22492,7 @@ function ScrollShadows(props) {
22459
22492
  setShowStartShadow(start > 0);
22460
22493
  setShowEndShadow(start + boxSize < end);
22461
22494
  }, [horizontal]);
22462
- const onResize = useCallback31(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
22495
+ const onResize = useCallback32(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
22463
22496
  useResizeObserver9({
22464
22497
  ref: scrollRef,
22465
22498
  onResize
@@ -22510,12 +22543,12 @@ function ScrollShadows(props) {
22510
22543
  // src/layouts/SideNavLayout/SideNavLayoutContext.tsx
22511
22544
  import {
22512
22545
  createContext as createContext12,
22513
- useCallback as useCallback32,
22546
+ useCallback as useCallback33,
22514
22547
  useContext as useContext23,
22515
22548
  useEffect as useEffect36,
22516
22549
  useMemo as useMemo51,
22517
22550
  useRef as useRef58,
22518
- useState as useState54
22551
+ useState as useState55
22519
22552
  } from "react";
22520
22553
  import { jsx as jsx178 } from "react/jsx-runtime";
22521
22554
  var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
@@ -22541,7 +22574,7 @@ function resolveInitialNavState(defaultNavState) {
22541
22574
  }
22542
22575
  var SideNavLayoutContext = createContext12(void 0);
22543
22576
  function SideNavLayoutProvider(props) {
22544
- const [navState, setNavStateInternal] = useState54(
22577
+ const [navState, setNavStateInternal] = useState55(
22545
22578
  () => resolveInitialNavState(props.defaultNavState)
22546
22579
  );
22547
22580
  const bp = useBreakpoint();
@@ -22552,7 +22585,7 @@ function SideNavLayoutProvider(props) {
22552
22585
  }
22553
22586
  prevMdAndUp.current = bp.mdAndUp;
22554
22587
  }, [bp.mdAndUp]);
22555
- const setNavState = useCallback32((value2) => {
22588
+ const setNavState = useCallback33((value2) => {
22556
22589
  setNavStateInternal((prev) => {
22557
22590
  const next = typeof value2 === "function" ? value2(prev) : value2;
22558
22591
  if (next === "expanded" || next === "collapse") {
@@ -22631,10 +22664,10 @@ function SideNav(props) {
22631
22664
  }
22632
22665
 
22633
22666
  // src/components/Snackbar/useSnackbar.tsx
22634
- import { useCallback as useCallback33, useEffect as useEffect37 } from "react";
22667
+ import { useCallback as useCallback34, useEffect as useEffect37 } from "react";
22635
22668
  function useSnackbar() {
22636
22669
  const { setNotices, setOffset } = useSnackbarContext();
22637
- const onClose = useCallback33(
22670
+ const onClose = useCallback34(
22638
22671
  (noticeId) => {
22639
22672
  setNotices((prev) => {
22640
22673
  let returnValue = prev;
@@ -22651,7 +22684,7 @@ function useSnackbar() {
22651
22684
  // eslint-disable-next-line react-hooks/exhaustive-deps
22652
22685
  []
22653
22686
  );
22654
- const triggerNotice = useCallback33(
22687
+ const triggerNotice = useCallback34(
22655
22688
  (props) => {
22656
22689
  const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
22657
22690
  let maybeTimeout;
@@ -22680,7 +22713,7 @@ function useSnackbar() {
22680
22713
  },
22681
22714
  [onClose, setNotices]
22682
22715
  );
22683
- const closeNotice = useCallback33((id) => onClose(id), [onClose]);
22716
+ const closeNotice = useCallback34((id) => onClose(id), [onClose]);
22684
22717
  const useSnackbarOffset = ({ bottom }) => useEffect37(() => {
22685
22718
  setOffset({ bottom });
22686
22719
  return () => setOffset({});
@@ -23161,10 +23194,10 @@ function visit(rows, fn) {
23161
23194
  }
23162
23195
 
23163
23196
  // src/components/Toast/useToast.tsx
23164
- import { useCallback as useCallback34 } from "react";
23197
+ import { useCallback as useCallback35 } from "react";
23165
23198
  function useToast() {
23166
23199
  const { setNotice, clear } = useToastContext();
23167
- const showToast = useCallback34((props) => setNotice(props), [setNotice]);
23200
+ const showToast = useCallback35((props) => setNotice(props), [setNotice]);
23168
23201
  return { showToast, clear };
23169
23202
  }
23170
23203
 
@@ -23287,7 +23320,7 @@ import { useMemo as useMemo53, useRef as useRef61 } from "react";
23287
23320
  import { mergeProps as mergeProps30, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
23288
23321
 
23289
23322
  // src/layouts/useAutoHideOnScroll.ts
23290
- import { useLayoutEffect as useLayoutEffect6, useRef as useRef60, useState as useState55 } from "react";
23323
+ import { useLayoutEffect as useLayoutEffect6, useRef as useRef60, useState as useState56 } from "react";
23291
23324
  var THRESHOLD = 80;
23292
23325
  function getInitialAutoHideState() {
23293
23326
  if (typeof window === "undefined" || window.scrollY <= 0) {
@@ -23297,9 +23330,9 @@ function getInitialAutoHideState() {
23297
23330
  }
23298
23331
  function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
23299
23332
  const initial = getInitialAutoHideState();
23300
- const [state, setState] = useState55(initial.state);
23333
+ const [state, setState] = useState56(initial.state);
23301
23334
  const stateRef = useRef60(initial.state);
23302
- const [atTop, setAtTop] = useState55(initial.atTop);
23335
+ const [atTop, setAtTop] = useState56(initial.atTop);
23303
23336
  const atTopRef = useRef60(initial.atTop);
23304
23337
  const getTopOffsetRef = useRef60(getTopOffset);
23305
23338
  getTopOffsetRef.current = getTopOffset;
@@ -23378,10 +23411,10 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
23378
23411
 
23379
23412
  // src/layouts/useMeasuredHeight.ts
23380
23413
  import { useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
23381
- import { useCallback as useCallback35, useLayoutEffect as useLayoutEffect7, useState as useState56 } from "react";
23414
+ import { useCallback as useCallback36, useLayoutEffect as useLayoutEffect7, useState as useState57 } from "react";
23382
23415
  function useMeasuredHeight(ref, enabled) {
23383
- const [height, setHeight] = useState56(0);
23384
- const syncElementHeight = useCallback35(() => {
23416
+ const [height, setHeight] = useState57(0);
23417
+ const syncElementHeight = useCallback36(() => {
23385
23418
  const el = ref.current;
23386
23419
  const next = el ? Math.round(el.getBoundingClientRect().height) : 0;
23387
23420
  setHeight((prev) => prev === next ? prev : next);
@@ -23475,7 +23508,7 @@ function NavbarLayout(props) {
23475
23508
  }
23476
23509
 
23477
23510
  // src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
23478
- import { useCallback as useCallback36, useMemo as useMemo54, useRef as useRef62 } from "react";
23511
+ import { useCallback as useCallback37, useMemo as useMemo54, useRef as useRef62 } from "react";
23479
23512
  import { mergeProps as mergeProps31, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
23480
23513
  import { jsx as jsx188, jsxs as jsxs100 } from "react/jsx-runtime";
23481
23514
  var __maybeInc22 = (inc) => {
@@ -23490,7 +23523,7 @@ function PageHeaderLayout(props) {
23490
23523
  const navbarHeight = useNavbarLayoutHeight();
23491
23524
  const navbarHeightRef = useRef62(navbarHeight);
23492
23525
  navbarHeightRef.current = navbarHeight;
23493
- const getNavbarBottom = useCallback36(() => navbarHeightRef.current, []);
23526
+ const getNavbarBottom = useCallback37(() => navbarHeightRef.current, []);
23494
23527
  const headerMetricsRef = useRef62(null);
23495
23528
  const spacerRef = useRef62(null);
23496
23529
  const headerHeight = useMeasuredHeight(headerMetricsRef, true);