@evinvest/uikit 0.25.0 → 0.27.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.
Files changed (69) hide show
  1. package/README.md +142 -8
  2. package/dist/components/account-menu.js +70 -0
  3. package/dist/components/account-menu.js.map +1 -0
  4. package/dist/components/alert-dialog.js +5 -4
  5. package/dist/components/alert-dialog.js.map +1 -1
  6. package/dist/components/app-shell.js +11 -0
  7. package/dist/components/app-shell.js.map +1 -1
  8. package/dist/components/command.js +129 -20
  9. package/dist/components/command.js.map +1 -1
  10. package/dist/components/context-menu.js +8 -8
  11. package/dist/components/context-menu.js.map +1 -1
  12. package/dist/components/dialog.js +6 -4
  13. package/dist/components/dialog.js.map +1 -1
  14. package/dist/components/drawer.js +15 -9
  15. package/dist/components/drawer.js.map +1 -1
  16. package/dist/components/dropdown-menu.js +13 -10
  17. package/dist/components/dropdown-menu.js.map +1 -1
  18. package/dist/components/info-tip.js +2 -2
  19. package/dist/components/info-tip.js.map +1 -1
  20. package/dist/components/list-rows.js +73 -0
  21. package/dist/components/list-rows.js.map +1 -0
  22. package/dist/components/menubar.js +18 -5
  23. package/dist/components/menubar.js.map +1 -1
  24. package/dist/components/navigation-menu.js +2 -2
  25. package/dist/components/navigation-menu.js.map +1 -1
  26. package/dist/components/popover.js +2 -2
  27. package/dist/components/popover.js.map +1 -1
  28. package/dist/components/select.js +2 -2
  29. package/dist/components/select.js.map +1 -1
  30. package/dist/components/sheet.js +12 -5
  31. package/dist/components/sheet.js.map +1 -1
  32. package/dist/components/sonner.js +1 -0
  33. package/dist/components/sonner.js.map +1 -1
  34. package/dist/components/table.js +24 -7
  35. package/dist/components/table.js.map +1 -1
  36. package/dist/components/toggle-group.js +1 -1
  37. package/dist/components/toggle-group.js.map +1 -1
  38. package/dist/components/top-bar.js +21 -0
  39. package/dist/components/top-bar.js.map +1 -0
  40. package/dist/generated/alert-dialog.js +2 -2
  41. package/dist/generated/alert-dialog.js.map +1 -1
  42. package/dist/generated/context-menu.js +1 -1
  43. package/dist/generated/context-menu.js.map +1 -1
  44. package/dist/generated/dialog.js +3 -3
  45. package/dist/generated/dialog.js.map +1 -1
  46. package/dist/generated/drawer.js +1 -1
  47. package/dist/generated/drawer.js.map +1 -1
  48. package/dist/generated/dropdown-menu.js +1 -1
  49. package/dist/generated/dropdown-menu.js.map +1 -1
  50. package/dist/generated/menubar.js +1 -1
  51. package/dist/generated/menubar.js.map +1 -1
  52. package/dist/generated/sheet.js +3 -3
  53. package/dist/generated/sheet.js.map +1 -1
  54. package/dist/generated/table.js +20 -3
  55. package/dist/generated/table.js.map +1 -1
  56. package/dist/generated/toggle.js +2 -2
  57. package/dist/generated/toggle.js.map +1 -1
  58. package/dist/index.d.ts +199 -27
  59. package/dist/index.js +5 -2
  60. package/dist/primitives/dismissable-layer.js +80 -15
  61. package/dist/primitives/dismissable-layer.js.map +1 -1
  62. package/dist/primitives/focus-scope.js +22 -6
  63. package/dist/primitives/focus-scope.js.map +1 -1
  64. package/dist/primitives/use-roving-focus.js +13 -7
  65. package/dist/primitives/use-roving-focus.js.map +1 -1
  66. package/package.json +1 -1
  67. package/styles/ev.css +4 -2
  68. package/styles/theme.css +34 -2
  69. package/styles/tokens.css +42 -5
package/dist/index.d.ts CHANGED
@@ -71,6 +71,21 @@ interface PortalProviderProps {
71
71
  declare function PortalProvider({ container, children }: PortalProviderProps): React.JSX.Element;
72
72
  declare function Portal({ children, container }: PortalProps): React.ReactPortal | null;
73
73
 
74
+ type LayerRef = React.RefObject<HTMLDivElement | null>;
75
+ /**
76
+ * Elements carrying this attribute are outside every layer without being a
77
+ * click away from any: a press there dismisses nothing (the toaster).
78
+ */
79
+ declare const LAYER_IGNORE_ATTR = "data-dismissable-layer-ignore";
80
+ /**
81
+ * Marks `children` as rendered inside `layer` (the ref `useDismissableLayer`
82
+ * returned), so a layer among them always stacks above it — even when both
83
+ * open in the same commit. Wrap the overlay's content in it.
84
+ */
85
+ declare function DismissableLayerScope({ layer, children }: {
86
+ layer: LayerRef;
87
+ children?: React.ReactNode;
88
+ }): React.JSX.Element;
74
89
  /** Why a layer is being dismissed: the event itself, for a caller that treats keys and pointers apart. */
75
90
  type DismissEvent = PointerEvent | KeyboardEvent;
76
91
  /**
@@ -78,14 +93,25 @@ type DismissEvent = PointerEvent | KeyboardEvent;
78
93
  * dep-light core of every overlay's "click away to close". Pass refs to any
79
94
  * nodes that should NOT count as outside (e.g. the trigger), via `exclude`.
80
95
  *
81
- * Layers stack, in the order they opened: Escape dismisses only the topmost
82
- * layer on this stack, and a pointer-down inside a layer opened above this one
83
- * is not outside it — so a Select's list inside a Dialog closes the list, not
84
- * the Dialog. The stack knows only the overlays built on this hook: a
85
- * `Drawer` or `CommandDialog` (Escape in their own React `onKeyDown`) is not
86
- * on it, and a menu that also closes on Escape in its React `onKeyDown` lets
87
- * the key bubble through React's tree to what holds it. Moving those onto the
88
- * stack is a follow-up.
96
+ * Layers stack: a layer rendered inside another's `DismissableLayerScope`
97
+ * sits above it, the rest in the order they opened. Escape dismisses only the
98
+ * topmost layer, and a pointer-down inside a layer above this one is not
99
+ * outside it — so a Select's list inside a Dialog closes the list, not the
100
+ * Dialog. The Escape goes to the layer that was on top when the key was
101
+ * pressed, even if a handler on its way closed that layer first.
102
+ *
103
+ * `modal: true` makes the layer a barrier: while it is open, the layers below
104
+ * ignore every pointer-down — a press on its scrim closes it alone. Elements
105
+ * marked with `LAYER_IGNORE_ATTR` (the toaster) are outside no layer.
106
+ *
107
+ * `pointerOutside: false` keeps the layer on the stack (it takes Escape, and
108
+ * the layers below see a pointer-down inside it as inside) but leaves outside
109
+ * clicks to the caller — for an overlay whose own scrim is what "outside"
110
+ * means (Drawer, CommandDialog).
111
+ *
112
+ * The stack is shared through `globalThis`, so every copy of this module on
113
+ * the page sees one stack; parent links need one React context, so they hold
114
+ * within a copy only.
89
115
  *
90
116
  * Mirrors the dismiss behaviour Rust expresses with a full-screen backdrop.
91
117
  */
@@ -93,6 +119,10 @@ declare function useDismissableLayer(opts: {
93
119
  enabled: boolean;
94
120
  onDismiss: (event: DismissEvent) => void;
95
121
  exclude?: Array<React.RefObject<Element | null>>;
122
+ /** Dismiss on a pointer-down outside the layer. Default `true`. */
123
+ pointerOutside?: boolean;
124
+ /** Bar the layers below from pointer-downs while open. Default `false`. */
125
+ modal?: boolean;
96
126
  }): React.RefObject<HTMLDivElement | null>;
97
127
 
98
128
  type Side = "top" | "right" | "bottom" | "left";
@@ -138,16 +168,34 @@ declare function useFloating(opts: {
138
168
  offset?: number;
139
169
  }): FloatingResult;
140
170
 
171
+ /**
172
+ * Where focus lands when the scope opens. `first` is the first Tab stop inside
173
+ * (an input, an alert dialog's least destructive action); `container` is the
174
+ * scope root itself, so a reader starts at the top and the first Tab reaches the
175
+ * first control — right for a panel of content, where the first stop may be an
176
+ * action one keypress away from firing.
177
+ */
178
+ type InitialFocus = "first" | "container";
179
+ interface FocusScopeOptions {
180
+ /** Default `first`; falls back to the container when nothing inside is focusable. */
181
+ initialFocus?: InitialFocus;
182
+ /**
183
+ * Where focus goes back on close when the element focused before opening is
184
+ * no use: `<body>` (Safari does not focus a clicked button), or detached (the
185
+ * opener was re-rendered away). Pass the overlay's trigger.
186
+ */
187
+ returnFocusTo?: React.RefObject<HTMLElement | null>;
188
+ }
141
189
  /**
142
190
  * Traps Tab focus inside the returned ref's subtree and restores focus to the
143
191
  * previously-focused element on unmount — the dep-light core of dialogs/menus,
144
- * replacing `@radix-ui/react-focus-scope`. On mount, focuses the first
145
- * focusable (or the container itself).
192
+ * replacing `@radix-ui/react-focus-scope`. On mount, focuses per
193
+ * `initialFocus`; the root gets `tabindex="-1"` whenever it is the target.
146
194
  *
147
195
  * Rust dialogs rely on the browser's native focus order within a fixed overlay;
148
196
  * see the README "Limitations".
149
197
  */
150
- declare function useFocusScope(enabled: boolean): React.RefObject<HTMLDivElement | null>;
198
+ declare function useFocusScope(enabled: boolean, { initialFocus, returnFocusTo }?: FocusScopeOptions): React.RefObject<HTMLDivElement | null>;
151
199
 
152
200
  /**
153
201
  * Keeps an overlay mounted through its exit animation. Enter animations
@@ -178,10 +226,15 @@ declare function usePresence(present: boolean): {
178
226
  * Returns an `onKeyDown` to spread on the container and the active index; items
179
227
  * should set `tabIndex={index === activeIndex ? 0 : -1}`.
180
228
  *
229
+ * `count` may be a getter: containers whose items are only known from the DOM
230
+ * (menus with conditionally rendered or disabled items, inline sub-menus) pass
231
+ * one so the bound is read at keydown time — never during render, which keeps
232
+ * the hook safe under SSR.
233
+ *
181
234
  * Mirrors the keyboard navigation Rust drives with a focused-index signal.
182
235
  */
183
236
  declare function useRovingFocus(opts: {
184
- count: number;
237
+ count: number | (() => number);
185
238
  orientation?: "horizontal" | "vertical" | "both";
186
239
  loop?: boolean;
187
240
  initial?: number;
@@ -679,15 +732,74 @@ interface ServerErrorProps {
679
732
  /** 500 — server error. The "Try again" button runs `reset` or reloads the page. */
680
733
  declare function ServerError({ linkComponent, homeHref, reset }: ServerErrorProps): React.JSX.Element;
681
734
 
682
- declare function Table({ className, ...props }: React.ComponentProps<"table">): React.JSX.Element;
735
+ declare const tableVariants: {
736
+ readonly default: "[--table-px:initial] [--table-py:initial] [--table-head-ink:initial] [--table-head-text:initial] [--table-head-tracking:initial] [--table-head-case:initial]";
737
+ readonly card: "[--table-px:calc(var(--spacing)*5)] [--table-py:calc(var(--spacing)*3)] [--table-head-ink:var(--ink-soft)] [--table-head-text:var(--text-xs)] [--table-head-tracking:var(--tracking-wide)] [--table-head-case:uppercase] [&>thead>tr:hover]:bg-transparent";
738
+ };
739
+ type TableVariant = keyof typeof tableVariants;
740
+ declare const tableDensities: {
741
+ readonly default: "[--table-dense-py:initial] [--table-head-h:initial]";
742
+ readonly compact: "[--table-dense-py:calc(var(--spacing)*1.5)] [--table-head-h:calc(var(--spacing)*8)]";
743
+ };
744
+ type TableDensity = keyof typeof tableDensities;
745
+ declare const tableAligns: {
746
+ readonly start: "text-start";
747
+ readonly end: "text-end tabular-nums";
748
+ };
749
+ type TableAlign = keyof typeof tableAligns;
750
+
751
+ interface TableProps extends React.ComponentProps<"table"> {
752
+ variant?: TableVariant;
753
+ density?: TableDensity;
754
+ }
755
+ declare function Table({ variant, density, className, ...props }: TableProps): React.JSX.Element;
756
+ /** The surface a `variant="card"` table sits in, edge to edge. */
757
+ declare function TableCard({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
683
758
  declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
684
759
  declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
685
760
  declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
686
761
  declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
687
- declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
688
- declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
762
+ interface TableHeadProps extends Omit<React.ComponentProps<"th">, "align"> {
763
+ align?: TableAlign;
764
+ }
765
+ declare function TableHead({ align, className, ...props }: TableHeadProps): React.JSX.Element;
766
+ interface TableCellProps extends Omit<React.ComponentProps<"td">, "align"> {
767
+ align?: TableAlign;
768
+ }
769
+ declare function TableCell({ align, className, ...props }: TableCellProps): React.JSX.Element;
689
770
  declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
690
771
 
772
+ type ListRowsVariant = "plain" | "card";
773
+ interface ListRowsProps extends React.ComponentProps<"ul"> {
774
+ variant?: ListRowsVariant;
775
+ }
776
+ declare function ListRows({ variant, className, ...props }: ListRowsProps): React.JSX.Element;
777
+ interface ListRowProps extends Omit<React.ComponentProps<"li">, "value"> {
778
+ /** The row's title. Omit it (and `value`) to lay the row out yourself. */
779
+ label?: React.ReactNode;
780
+ /** A caption a step down under the label. */
781
+ description?: React.ReactNode;
782
+ /** Trailing value, right-aligned and truncated rather than pushing the row wide. */
783
+ value?: React.ReactNode;
784
+ }
785
+ /**
786
+ * One row: label (and description) leading, value trailing, then `children`
787
+ * (a badge, an action). With neither `label` nor `value` the children are the
788
+ * whole row.
789
+ */
790
+ declare function ListRow({ label, description, value, className, children, ...props }: ListRowProps): React.JSX.Element;
791
+ interface ListRowLabelProps extends Omit<React.ComponentProps<"div">, "title"> {
792
+ description?: React.ReactNode;
793
+ }
794
+ /** The leading block on its own, for a row you compose by hand. */
795
+ declare function ListRowLabel({ description, className, children, ...props }: ListRowLabelProps): React.JSX.Element;
796
+ /**
797
+ * The trailing value. It shares the label's type step, so the muted tone and
798
+ * the lighter weight are what keep the label reading first; digits are tabular
799
+ * so a figure in one row lines up with the next.
800
+ */
801
+ declare function ListRowValue({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
802
+
691
803
  type AccordionType = "single" | "multiple";
692
804
  interface AccordionProps extends Omit<React.ComponentProps<"div">, "onChange"> {
693
805
  type?: AccordionType;
@@ -804,7 +916,7 @@ declare function TabsContent({ className, value, children, ...props }: TabsConte
804
916
 
805
917
  declare const toggleVariantClasses: {
806
918
  readonly bare: "bg-transparent";
807
- readonly outline: "border border-input bg-transparent shadow-xs hover:bg-hover hover:text-ink";
919
+ readonly outline: "border border-input bg-transparent shadow-xs hover:bg-hover hover:text-ink data-[state=on]:border-primary";
808
920
  };
809
921
  type ToggleVariant = keyof typeof toggleVariantClasses;
810
922
  declare const toggleSizeClasses: {
@@ -1086,15 +1198,18 @@ interface DropdownMenuTriggerProps extends React.ComponentProps<"button"> {
1086
1198
  declare function DropdownMenuTrigger({ asChild, onClick, ...props }: DropdownMenuTriggerProps): React.JSX.Element;
1087
1199
  interface DropdownMenuContentProps extends React.ComponentProps<"div"> {
1088
1200
  sideOffset?: number;
1201
+ align?: "start" | "center" | "end";
1089
1202
  }
1090
- declare function DropdownMenuContent({ className, sideOffset, children, ...props }: DropdownMenuContentProps): React.JSX.Element | null;
1203
+ declare function DropdownMenuContent({ className, sideOffset, align, children, ...props }: DropdownMenuContentProps): React.JSX.Element | null;
1091
1204
  declare function DropdownMenuGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
1092
1205
  interface DropdownMenuItemProps extends React.ComponentProps<"div"> {
1206
+ /** Render the child (a link) as the item. */
1207
+ asChild?: boolean;
1093
1208
  inset?: boolean;
1094
1209
  variant?: "neutral" | "destructive";
1095
1210
  disabled?: boolean;
1096
1211
  }
1097
- declare function DropdownMenuItem({ className, inset, variant, disabled, onClick, onKeyDown, ...props }: DropdownMenuItemProps): React.JSX.Element;
1212
+ declare function DropdownMenuItem({ asChild, className, inset, variant, disabled, onClick, onKeyDown, ...props }: DropdownMenuItemProps): React.JSX.Element;
1098
1213
  interface DropdownMenuCheckboxItemProps extends React.ComponentProps<"div"> {
1099
1214
  checked?: boolean;
1100
1215
  disabled?: boolean;
@@ -1277,8 +1392,10 @@ interface DialogOverlayProps extends React.ComponentProps<"div"> {
1277
1392
  declare function DialogOverlay({ className, ...props }: DialogOverlayProps): React.JSX.Element;
1278
1393
  interface DialogContentProps extends React.ComponentProps<"div"> {
1279
1394
  showCloseButton?: boolean;
1395
+ /** Where focus lands on open. Default `first` — a dialog is usually a short form. */
1396
+ initialFocus?: InitialFocus;
1280
1397
  }
1281
- declare function DialogContent({ className, children, showCloseButton, ...props }: DialogContentProps): React.JSX.Element | null;
1398
+ declare function DialogContent({ className, children, showCloseButton, initialFocus, ...props }: DialogContentProps): React.JSX.Element | null;
1282
1399
  interface DialogCloseProps extends React.ComponentProps<"button"> {
1283
1400
  asChild?: boolean;
1284
1401
  }
@@ -1332,8 +1449,14 @@ interface SheetOverlayProps extends React.ComponentProps<"div"> {
1332
1449
  declare function SheetOverlay({ className, ...props }: SheetOverlayProps): React.JSX.Element;
1333
1450
  interface SheetContentProps extends React.ComponentProps<"div"> {
1334
1451
  side?: "top" | "right" | "bottom" | "left";
1452
+ /**
1453
+ * Where focus lands on open. Default `container`: a sheet is a panel of
1454
+ * content, and its first Tab stop is as likely an action as a field — the
1455
+ * panel itself takes focus and the first Tab reaches the first control.
1456
+ */
1457
+ initialFocus?: InitialFocus;
1335
1458
  }
1336
- declare function SheetContent({ className, children, side, ...props }: SheetContentProps): React.JSX.Element | null;
1459
+ declare function SheetContent({ className, children, side, initialFocus, ...props }: SheetContentProps): React.JSX.Element | null;
1337
1460
  interface SheetCloseProps extends React.ComponentProps<"button"> {
1338
1461
  asChild?: boolean;
1339
1462
  }
@@ -1468,16 +1591,18 @@ interface CommandProps extends React.ComponentProps<"div"> {
1468
1591
  search?: string;
1469
1592
  defaultSearch?: string;
1470
1593
  onSearchChange?: (search: string) => void;
1594
+ shouldFilter?: boolean;
1471
1595
  }
1472
- declare function Command({ className, search, defaultSearch, onSearchChange, children, ...props }: CommandProps): React.JSX.Element;
1596
+ declare function Command({ className, search, defaultSearch, onSearchChange, shouldFilter, children, ref, onKeyDown, ...props }: CommandProps): React.JSX.Element;
1473
1597
  interface CommandDialogProps {
1474
1598
  open?: boolean;
1475
1599
  defaultOpen?: boolean;
1476
1600
  onOpenChange?: (open: boolean) => void;
1601
+ shouldFilter?: boolean;
1477
1602
  className?: string;
1478
1603
  children?: React.ReactNode;
1479
1604
  }
1480
- declare function CommandDialog({ open, defaultOpen, onOpenChange, className, children, }: CommandDialogProps): React.JSX.Element | null;
1605
+ declare function CommandDialog({ open, defaultOpen, onOpenChange, shouldFilter, className, children, }: CommandDialogProps): React.JSX.Element | null;
1481
1606
  declare function CommandInput({ className, ...props }: React.ComponentProps<"input">): React.JSX.Element;
1482
1607
  declare function CommandList({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
1483
1608
  declare function CommandEmpty({ className, children, ...props }: React.ComponentProps<"div">): React.JSX.Element | null;
@@ -1490,7 +1615,7 @@ interface CommandItemProps extends Omit<React.ComponentProps<"div">, "onSelect">
1490
1615
  disabled?: boolean;
1491
1616
  onSelect?: (value: string) => void;
1492
1617
  }
1493
- declare function CommandItem({ className, value, disabled, onSelect, children, ...props }: CommandItemProps): React.JSX.Element | null;
1618
+ declare function CommandItem({ className, value, disabled, onSelect, id: idProp, onPointerMove, children, ...props }: CommandItemProps): React.JSX.Element | null;
1494
1619
  declare function CommandSeparator({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
1495
1620
  declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
1496
1621
 
@@ -1869,6 +1994,8 @@ interface AppShellProps extends React.ComponentProps<"div"> {
1869
1994
  rail?: React.ReactNode;
1870
1995
  /** The phone's tab bar — a `BottomTabBar`. Pinned to the viewport bottom below `breakpoint`. */
1871
1996
  tabBar?: React.ReactNode;
1997
+ /** A `TopBar`, pinned over the column from `breakpoint` up (a phone titles its screen with `MobileAppBar`). */
1998
+ topBar?: React.ReactNode;
1872
1999
  /** Strips above the page (`SystemBanner`s). An empty slot takes no room. */
1873
2000
  banner?: React.ReactNode;
1874
2001
  /** Default `lg`. */
@@ -1878,15 +2005,15 @@ interface AppShellProps extends React.ComponentProps<"div"> {
1878
2005
  }
1879
2006
  /**
1880
2007
  * The signed-in app's frame: a rail beside a content column on a wide screen, a
1881
- * bottom tab bar under it on a phone. Layout only — the nav, the banners and the
1882
- * page are slots, so the shell knows nothing about routes, roles or data.
2008
+ * bottom tab bar under it on a phone. Layout only — the nav, the top bar, the banners
2009
+ * and the page are slots, so the shell knows nothing about routes, roles or data.
1883
2010
  *
1884
2011
  * Fills the viewport less `--ev-shell-offset` (the room a host shell's own header
1885
2012
  * takes); the rail sticks under that offset at full remaining height and scrolls
1886
2013
  * by itself when it cannot fit. The column reserves the tab bar's height plus
1887
2014
  * the bottom safe area, so the bar never covers content.
1888
2015
  */
1889
- declare function AppShell({ rail, tabBar, banner, breakpoint, mainProps, className, children, ...props }: AppShellProps): React.JSX.Element;
2016
+ declare function AppShell({ rail, tabBar, topBar, banner, breakpoint, mainProps, className, children, ...props }: AppShellProps): React.JSX.Element;
1890
2017
 
1891
2018
  /**
1892
2019
  * How a {@link NavItem} decides it is the current one.
@@ -2086,6 +2213,51 @@ interface BottomTabBarProps extends Omit<React.ComponentProps<"nav">, "children"
2086
2213
  */
2087
2214
  declare function BottomTabBar({ items, pathname, linkComponent, onItemIntent, onNavigate, labels, className, ...props }: BottomTabBarProps): React.JSX.Element;
2088
2215
 
2216
+ interface TopBarProps extends React.ComponentProps<"header"> {
2217
+ /** The app switcher, or the service's name. */
2218
+ start?: React.ReactNode;
2219
+ /** Service stats, then an `AccountMenu` last. */
2220
+ end?: React.ReactNode;
2221
+ }
2222
+ /**
2223
+ * The wide screen's utility bar over the content column: who and where, never
2224
+ * product nav (that is the rail's). Layout only — `AppShell.topBar` pins it.
2225
+ */
2226
+ declare function TopBar({ start, end, className, ...props }: TopBarProps): React.JSX.Element;
2227
+
2228
+ interface AccountMenuLabels {
2229
+ /** Accessible name of the trigger. Default `"Account"`. */
2230
+ trigger?: string;
2231
+ /** Default `"Manage account"`. */
2232
+ manage?: string;
2233
+ /** Default `"Switch account"`. */
2234
+ switchAccount?: string;
2235
+ /** Default `"Sign out"`. */
2236
+ signOut?: string;
2237
+ }
2238
+ interface AccountMenuProps {
2239
+ account: {
2240
+ name?: string | null | undefined;
2241
+ email: string;
2242
+ };
2243
+ /** The account center, on the identity provider's origin; no item without it. */
2244
+ manageHref?: string | undefined;
2245
+ /** A full page load to the sign-in that offers the account chooser. */
2246
+ switchHref: string;
2247
+ /** The service's own entries, between the account center and switching. Draws `label`, `icon`, `external`. */
2248
+ groups?: readonly NavGroup[];
2249
+ onSignOut: () => void;
2250
+ linkComponent?: React.ElementType;
2251
+ labels?: AccountMenuLabels;
2252
+ className?: string;
2253
+ }
2254
+ /**
2255
+ * Who is signed in, top right. The order is fixed — the account, the account
2256
+ * center, the service's groups, switching, signing out — so every service's
2257
+ * menu reads the same; a service adds groups and nothing else.
2258
+ */
2259
+ declare function AccountMenu({ account, manageHref, switchHref, groups, onSignOut, linkComponent, labels, className, }: AccountMenuProps): React.JSX.Element;
2260
+
2089
2261
  interface MobileAppBarLabels {
2090
2262
  /** Accessible name of the back control. Default `"Back"`. */
2091
2263
  back?: string;
@@ -2281,4 +2453,4 @@ interface SettledProps extends Omit<React.ComponentProps<"div">, "children"> {
2281
2453
  */
2282
2454
  declare function Settled({ loading, skeleton, children, ...props }: SettledProps): React.JSX.Element;
2283
2455
 
2284
- export { type Accent, Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, type AlertDialogOverlayProps, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertTitle, type AlertVariant, type Align, AppShell, type AppShellProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeVariant, type BookSide, BottomTabBar, type BottomTabBarLabels, type BottomTabBarProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonVariantsOptions, Calendar, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselEdgeFade, CarouselItem, CarouselNext, CarouselPrevious, type CarouselProps, type ChartConfig, ChartContainer, type ChartItem, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Check, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupProps, CommandInput, CommandItem, type CommandItemProps, CommandList, type CommandProps, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, type DismissEvent, Display, Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, type DrawerProps, DrawerTitle, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyMediaVariant, EmptyTitle, Eyebrow, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, FieldTitle, type FloatingResult, Footer, type FooterLink, type FooterLinkGroup, type FooterOffice, type FooterProps, Forbidden, Form, FormControl, FormDescription, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, type HoverCardContentProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, type HoverIntentHandlers, InfoTip, InfoTipContent, type InfoTipContentProps, type InfoTipProps, InfoTipTrigger, type InfoTipTriggerProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupButtonSize, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputOTPSlotProps, type InputProps, type InputSize, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemMediaProps, type ItemMediaVariant, type ItemProps, ItemSeparator, type ItemSize, ItemTitle, type ItemVariant, Kbd, KbdGroup, Label, Logo, type LogoProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarMenuProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, type MenubarSubProps, MenubarSubTrigger, MenubarTrigger, MobileAppBar, type MobileAppBarBack, type MobileAppBarLabels, type MobileAppBarProps, NativeSelect, NativeSelectGroup, NativeSelectOption, type NativeSelectProps, type NativeSelectSize, NavBadge, type NavBadgeProps, type NavBadgeVariant, NavDot, type NavDotProps, type NavDotTone, type NavGroup, type NavItem, type NavItemState, type NavMatch, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFound, OpenOrdersEmpty, OrderBook, OrderBookHead, type OrderBookHeadProps, OrderBookRow, type OrderBookRowProps, OrderBookSpread, OrderForm, OrderFormRow, type OrderFormRowProps, OrderFormSubmit, type OrderFormSubmitProps, type OrderSide, PageFrame, type PageFrameProps, type PageFrameWidth, PageHeading, type PageHeadingProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, type Polarity, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, PortalProvider, type PortalProviderProps, Progress, type ProgressProps, Prose, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, ResourceError, type ResourceErrorLabels, type ResourceErrorProps, ScrollArea, ScrollBar, type ScrollBarOrientation, type ScrollBarProps, Section, SectionDescriptor, type SectionDescriptorProps, SectionHead, type SectionHeadProps, SectionLabel, type SectionLabelProps, type SectionLabelTone, SectionNav, type SectionNavGroup, type SectionNavItem, type SectionNavLabels, type SectionNavProps, type SectionProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, type SelectTriggerSize, SelectValue, type SelectValueProps, Separator, type SeparatorOrientation, type SeparatorProps, ServerError, type ServerErrorProps, Settled, type SettledProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, type SheetOverlayProps, type SheetProps, SheetTitle, SheetTrigger, type SheetTriggerProps, type ShellBreakpoint, ShellNav, type ShellNavLabels, type ShellNavProps, type Side, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, type SidebarMenuButtonSize, SidebarMenuItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Slot, type SlotProps, Spinner, Stat, type StatProps, type StatusLinkData, type StatusPageProps, StatusScreen, type StatusScreenProps, type Surface, Switch, type SwitchProps, SystemBanner, type SystemBannerLabels, type SystemBannerProps, type SystemBannerTone, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, type TabsTriggerProps, Terminal, type TerminalArea, TerminalChart, TerminalPane, TerminalPaneBody, TerminalPaneHeader, type TerminalPaneProps, TerminalTicker, Textarea, type TextareaProps, type TextareaSize, TickerStat, type TickerStatProps, type Toast, type ToastFn, type ToastOptions, type ToastPosition, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleSize, type ToggleVariant, type ToggleVariantsOptions, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TradesTapeRow, type TradesTapeRowProps, buttonVariants, cn, isNavItemActive, isPlainLeftClick, mergeRefs, navItemMatch, navigationMenuTriggerStyle, resolveActiveNavItem, statusCtaClass, toast, toggleVariants, useControllableState, useDismissableLayer, useFloating, useFocusScope, useHoverIntent, usePendingNavigation, usePresence, useRovingFocus, useSidebar };
2456
+ export { type Accent, Accordion, AccordionContent, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, AccountMenu, type AccountMenuLabels, type AccountMenuProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, type AlertDialogOverlayProps, type AlertDialogProps, AlertDialogTitle, AlertDialogTrigger, type AlertDialogTriggerProps, type AlertProps, AlertTitle, type AlertVariant, type Align, AppShell, type AppShellProps, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, type BadgeVariant, type BookSide, BottomTabBar, type BottomTabBarLabels, type BottomTabBarProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, type BreadcrumbLinkProps, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, type ButtonGroupOrientation, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, type ButtonGroupTextProps, type ButtonProps, type ButtonSize, type ButtonVariant, type ButtonVariantsOptions, Calendar, type CalendarProps, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselEdgeFade, CarouselItem, CarouselNext, CarouselPrevious, type CarouselProps, type ChartConfig, ChartContainer, type ChartItem, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Check, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, type CollapsibleProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, type CommandGroupProps, CommandInput, CommandItem, type CommandItemProps, CommandList, type CommandProps, CommandSeparator, CommandShortcut, Container, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, type ContextMenuCheckboxItemProps, ContextMenuContent, ContextMenuGroup, ContextMenuItem, type ContextMenuItemProps, ContextMenuLabel, type ContextMenuLabelProps, ContextMenuPortal, type ContextMenuProps, ContextMenuRadioGroup, type ContextMenuRadioGroupProps, ContextMenuRadioItem, type ContextMenuRadioItemProps, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, type ContextMenuSubProps, ContextMenuSubTrigger, type ContextMenuSubTriggerProps, ContextMenuTrigger, type ContextMenuTriggerProps, DateTimePicker, type DateTimePickerLabels, type DateTimePickerProps, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, type DialogOverlayProps, DialogPortal, type DialogPortalProps, type DialogProps, DialogTitle, DialogTrigger, type DialogTriggerProps, type DismissEvent, DismissableLayerScope, Display, Drawer, DrawerClose, type DrawerCloseProps, DrawerContent, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, type DrawerProps, DrawerTitle, DrawerTrigger, type DrawerTriggerProps, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, type EmptyMediaProps, type EmptyMediaVariant, EmptyTitle, Eyebrow, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, type FieldOrientation, FieldSeparator, FieldSet, FieldTitle, type FloatingResult, Footer, type FooterLink, type FooterLinkGroup, type FooterOffice, type FooterProps, Forbidden, Form, FormControl, FormDescription, FormItem, FormLabel, FormMessage, HoverCard, HoverCardContent, type HoverCardContentProps, type HoverCardProps, HoverCardTrigger, type HoverCardTriggerProps, type HoverIntentHandlers, InfoTip, InfoTipContent, type InfoTipContentProps, type InfoTipProps, InfoTipTrigger, type InfoTipTriggerProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonAlign, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupButtonSize, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, type InputOTPProps, InputOTPSeparator, InputOTPSlot, type InputOTPSlotProps, type InputProps, type InputSize, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, type ItemMediaProps, type ItemMediaVariant, type ItemProps, ItemSeparator, type ItemSize, ItemTitle, type ItemVariant, Kbd, KbdGroup, LAYER_IGNORE_ATTR, Label, ListRow, ListRowLabel, type ListRowLabelProps, type ListRowProps, ListRowValue, ListRows, type ListRowsProps, type ListRowsVariant, Logo, type LogoProps, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, type MenubarMenuProps, MenubarRadioGroup, type MenubarRadioGroupProps, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, type MenubarSubProps, MenubarSubTrigger, MenubarTrigger, MobileAppBar, type MobileAppBarBack, type MobileAppBarLabels, type MobileAppBarProps, NativeSelect, NativeSelectGroup, NativeSelectOption, type NativeSelectProps, type NativeSelectSize, NavBadge, type NavBadgeProps, type NavBadgeVariant, NavDot, type NavDotProps, type NavDotTone, type NavGroup, type NavItem, type NavItemState, type NavMatch, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, type NavigationMenuItemProps, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFound, OpenOrdersEmpty, OrderBook, OrderBookHead, type OrderBookHeadProps, OrderBookRow, type OrderBookRowProps, OrderBookSpread, OrderForm, OrderFormRow, type OrderFormRowProps, OrderFormSubmit, type OrderFormSubmitProps, type OrderSide, PageFrame, type PageFrameProps, type PageFrameWidth, PageHeading, type PageHeadingProps, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, type PaginationLinkProps, PaginationNext, PaginationPrevious, type Polarity, Popover, PopoverAnchor, type PopoverAnchorProps, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, Portal, type PortalProps, PortalProvider, type PortalProviderProps, Progress, type ProgressProps, Prose, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type ResizableDirection, ResizableHandle, type ResizableHandleProps, ResizablePanel, ResizablePanelGroup, type ResizablePanelGroupProps, type ResizablePanelProps, ResourceError, type ResourceErrorLabels, type ResourceErrorProps, ScrollArea, ScrollBar, type ScrollBarOrientation, type ScrollBarProps, Section, SectionDescriptor, type SectionDescriptorProps, SectionHead, type SectionHeadProps, SectionLabel, type SectionLabelProps, type SectionLabelTone, SectionNav, type SectionNavGroup, type SectionNavItem, type SectionNavLabels, type SectionNavProps, type SectionProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, type SelectItemProps, SelectLabel, type SelectProps, SelectSeparator, SelectTrigger, type SelectTriggerProps, type SelectTriggerSize, SelectValue, type SelectValueProps, Separator, type SeparatorOrientation, type SeparatorProps, ServerError, type ServerErrorProps, Settled, type SettledProps, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, type SheetOverlayProps, type SheetProps, SheetTitle, SheetTrigger, type SheetTriggerProps, type ShellBreakpoint, ShellNav, type ShellNavLabels, type ShellNavProps, type Side, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, type SidebarGroupLabelProps, SidebarHeader, SidebarInset, SidebarMenu, SidebarMenuButton, type SidebarMenuButtonProps, type SidebarMenuButtonSize, SidebarMenuItem, type SidebarProps, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, type SliderProps, Slot, type SlotProps, Spinner, Stat, type StatProps, type StatusLinkData, type StatusPageProps, StatusScreen, type StatusScreenProps, type Surface, Switch, type SwitchProps, SystemBanner, type SystemBannerLabels, type SystemBannerProps, type SystemBannerTone, Table, type TableAlign, TableBody, TableCaption, TableCard, TableCell, type TableCellProps, type TableDensity, TableFooter, TableHead, type TableHeadProps, TableHeader, type TableProps, TableRow, type TableVariant, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsProps, TabsTrigger, type TabsTriggerProps, Terminal, type TerminalArea, TerminalChart, TerminalPane, TerminalPaneBody, TerminalPaneHeader, type TerminalPaneProps, TerminalTicker, Textarea, type TextareaProps, type TextareaSize, TickerStat, type TickerStatProps, type Toast, type ToastFn, type ToastOptions, type ToastPosition, type ToastState, type ToastVariant, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToggleSize, type ToggleVariant, type ToggleVariantsOptions, Tooltip, TooltipContent, type TooltipContentProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, TooltipTrigger, type TooltipTriggerProps, TopBar, type TopBarProps, TradesTapeRow, type TradesTapeRowProps, buttonVariants, cn, isNavItemActive, isPlainLeftClick, mergeRefs, navItemMatch, navigationMenuTriggerStyle, resolveActiveNavItem, statusCtaClass, toast, toggleVariants, useControllableState, useDismissableLayer, useFloating, useFocusScope, useHoverIntent, usePendingNavigation, usePresence, useRovingFocus, useSidebar };
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ export { cn } from "./lib/cn.js";
2
2
  export { Slot } from "./primitives/slot.js";
3
3
  export { useControllableState } from "./primitives/use-controllable-state.js";
4
4
  export { Portal, PortalProvider } from "./primitives/portal.js";
5
- export { useDismissableLayer } from "./primitives/dismissable-layer.js";
5
+ export { useDismissableLayer, DismissableLayerScope, LAYER_IGNORE_ATTR } from "./primitives/dismissable-layer.js";
6
6
  export { useFloating } from "./primitives/use-floating.js";
7
7
  export { useFocusScope } from "./primitives/focus-scope.js";
8
8
  export { usePresence } from "./primitives/presence.js";
@@ -33,7 +33,8 @@ export { Separator } from "./components/separator.js";
33
33
  export { Skeleton } from "./components/skeleton.js";
34
34
  export { Spinner } from "./components/spinner.js";
35
35
  export { StatusScreen, NotFound, Forbidden, ServerError, statusCtaClass, } from "./components/status-screen.js";
36
- export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, } from "./components/table.js";
36
+ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption, TableCard, } from "./components/table.js";
37
+ export { ListRows, ListRow, ListRowLabel, ListRowValue, } from "./components/list-rows.js";
37
38
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, } from "./components/accordion.js";
38
39
  export { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "./components/collapsible.js";
39
40
  export { Container, } from "./components/container.js";
@@ -77,6 +78,8 @@ export { usePendingNavigation } from "./components/use-shell-nav.js";
77
78
  export { ShellNav } from "./components/shell-nav.js";
78
79
  export { NavBadge, NavDot } from "./components/nav-badge.js";
79
80
  export { BottomTabBar } from "./components/bottom-tab-bar.js";
81
+ export { TopBar } from "./components/top-bar.js";
82
+ export { AccountMenu } from "./components/account-menu.js";
80
83
  export { MobileAppBar } from "./components/mobile-app-bar.js";
81
84
  export { PageFrame, PageHeading, SectionLabel } from "./components/page-frame.js";
82
85
  export { SectionNav } from "./components/section-nav.js";
@@ -1,13 +1,77 @@
1
1
  "use client";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import * as React from "react";
3
- const stack = [];
4
- function isInsideHigherLayer(own, target) {
5
- const index = stack.indexOf(own);
6
- if (index < 0) return false;
7
- return stack.slice(index + 1).some((layer) => layer.current?.contains(target) ?? false);
4
+ const STORE_KEY = /* @__PURE__ */ Symbol.for("@evinvest/uikit/dismissable-layers@1");
5
+ function isStore(value) {
6
+ return typeof value === "object" && value !== null && "stack" in value && Array.isArray(value.stack);
7
+ }
8
+ function sharedStore() {
9
+ const existing = Reflect.get(globalThis, STORE_KEY);
10
+ if (isStore(existing)) return existing;
11
+ const store2 = {
12
+ stack: [],
13
+ info: /* @__PURE__ */ new WeakMap(),
14
+ seen: /* @__PURE__ */ new WeakMap(),
15
+ snapshot: (event) => {
16
+ if (!store2.seen.has(event)) store2.seen.set(event, store2.stack.slice());
17
+ }
18
+ };
19
+ Reflect.set(globalThis, STORE_KEY, store2);
20
+ return store2;
21
+ }
22
+ const store = sharedStore();
23
+ const LAYER_IGNORE_ATTR = "data-dismissable-layer-ignore";
24
+ function layersAt(event) {
25
+ return store.seen.get(event) ?? store.stack;
26
+ }
27
+ function isPointerOutside(own, event) {
28
+ const target = event.target;
29
+ if (!(target instanceof Node)) return false;
30
+ const el = target instanceof Element ? target : target.parentElement;
31
+ if (el?.closest(`[${LAYER_IGNORE_ATTR}]`)) return false;
32
+ const layers = layersAt(event);
33
+ const index = layers.indexOf(own);
34
+ if (index < 0) return true;
35
+ const above = layers.slice(index + 1);
36
+ if (above.some((layer) => store.info.get(layer)?.modal === true)) return false;
37
+ return !above.some((layer) => layer.current?.contains(target) ?? false);
38
+ }
39
+ function ownsEscape(own, event) {
40
+ const layers = layersAt(event);
41
+ return layers[layers.length - 1] === own;
42
+ }
43
+ function isDescendant(layer, ancestor) {
44
+ for (let p = store.info.get(layer)?.parent ?? null; p; p = store.info.get(p)?.parent ?? null) {
45
+ if (p === ancestor) return true;
46
+ }
47
+ return false;
48
+ }
49
+ function push(layer) {
50
+ const { stack } = store;
51
+ if (stack.length === 0) {
52
+ window.addEventListener("keydown", store.snapshot, true);
53
+ window.addEventListener("pointerdown", store.snapshot, true);
54
+ }
55
+ const firstChild = stack.findIndex((other) => isDescendant(other, layer));
56
+ if (firstChild < 0) stack.push(layer);
57
+ else stack.splice(firstChild, 0, layer);
58
+ }
59
+ function pop(layer) {
60
+ const { stack } = store;
61
+ const index = stack.indexOf(layer);
62
+ if (index >= 0) stack.splice(index, 1);
63
+ if (stack.length === 0) {
64
+ window.removeEventListener("keydown", store.snapshot, true);
65
+ window.removeEventListener("pointerdown", store.snapshot, true);
66
+ }
67
+ }
68
+ const ParentLayerContext = React.createContext(null);
69
+ function DismissableLayerScope({ layer, children }) {
70
+ return /* @__PURE__ */ jsx(ParentLayerContext.Provider, { value: layer, children });
8
71
  }
9
72
  function useDismissableLayer(opts) {
10
- const { enabled, onDismiss, exclude } = opts;
73
+ const { enabled, onDismiss, exclude, pointerOutside = true, modal = false } = opts;
74
+ const parent = React.useContext(ParentLayerContext);
11
75
  const ref = React.useRef(null);
12
76
  const onDismissRef = React.useRef(onDismiss);
13
77
  const excludeRef = React.useRef(exclude);
@@ -17,32 +81,33 @@ function useDismissableLayer(opts) {
17
81
  });
18
82
  React.useEffect(() => {
19
83
  if (!enabled) return;
20
- stack.push(ref);
84
+ store.info.set(ref, { parent, modal });
85
+ push(ref);
21
86
  function onPointerDown(event) {
22
87
  const target = event.target;
23
- if (!target) return;
88
+ if (!(target instanceof Node)) return;
24
89
  if (ref.current && ref.current.contains(target)) return;
25
90
  for (const r of excludeRef.current ?? []) {
26
91
  if (r.current && r.current.contains(target)) return;
27
92
  }
28
- if (isInsideHigherLayer(ref, target)) return;
29
- onDismissRef.current(event);
93
+ if (isPointerOutside(ref, event)) onDismissRef.current(event);
30
94
  }
31
95
  function onKeyDown(event) {
32
- if (event.key === "Escape" && stack[stack.length - 1] === ref) onDismissRef.current(event);
96
+ if (event.key === "Escape" && ownsEscape(ref, event)) onDismissRef.current(event);
33
97
  }
34
- document.addEventListener("pointerdown", onPointerDown, true);
98
+ if (pointerOutside) document.addEventListener("pointerdown", onPointerDown, true);
35
99
  document.addEventListener("keydown", onKeyDown);
36
100
  return () => {
37
- const index = stack.indexOf(ref);
38
- if (index >= 0) stack.splice(index, 1);
101
+ pop(ref);
39
102
  document.removeEventListener("pointerdown", onPointerDown, true);
40
103
  document.removeEventListener("keydown", onKeyDown);
41
104
  };
42
- }, [enabled]);
105
+ }, [enabled, pointerOutside, modal, parent]);
43
106
  return ref;
44
107
  }
45
108
  export {
109
+ DismissableLayerScope,
110
+ LAYER_IGNORE_ATTR,
46
111
  useDismissableLayer
47
112
  };
48
113
  //# sourceMappingURL=dismissable-layer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/primitives/dismissable-layer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\ntype LayerRef = React.RefObject<HTMLDivElement | null>;\n\n// The open layers, oldest first. An overlay opened inside another (a Select in\n// a Dialog, a Popover in a Drawer) is portaled out of its parent's subtree, so\n// \"outside the parent\" would include it: the stack is what tells a nested\n// layer from the rest of the page.\nconst stack: LayerRef[] = [];\n\nfunction isInsideHigherLayer(own: LayerRef, target: Node): boolean {\n const index = stack.indexOf(own);\n // Not on the stack (a listener outliving its cleanup): nothing is above it.\n if (index < 0) return false;\n return stack.slice(index + 1).some((layer) => layer.current?.contains(target) ?? false);\n}\n\n/** Why a layer is being dismissed: the event itself, for a caller that treats keys and pointers apart. */\nexport type DismissEvent = PointerEvent | KeyboardEvent;\n\n/**\n * Calls `onDismiss` on Escape or on a pointer-down outside the layer — the\n * dep-light core of every overlay's \"click away to close\". Pass refs to any\n * nodes that should NOT count as outside (e.g. the trigger), via `exclude`.\n *\n * Layers stack, in the order they opened: Escape dismisses only the topmost\n * layer on this stack, and a pointer-down inside a layer opened above this one\n * is not outside it — so a Select's list inside a Dialog closes the list, not\n * the Dialog. The stack knows only the overlays built on this hook: a\n * `Drawer` or `CommandDialog` (Escape in their own React `onKeyDown`) is not\n * on it, and a menu that also closes on Escape in its React `onKeyDown` lets\n * the key bubble through React's tree to what holds it. Moving those onto the\n * stack is a follow-up.\n *\n * Mirrors the dismiss behaviour Rust expresses with a full-screen backdrop.\n */\nexport function useDismissableLayer(opts: {\n enabled: boolean;\n onDismiss: (event: DismissEvent) => void;\n exclude?: Array<React.RefObject<Element | null>>;\n}): React.RefObject<HTMLDivElement | null> {\n const { enabled, onDismiss, exclude } = opts;\n const ref = React.useRef<HTMLDivElement | null>(null);\n const onDismissRef = React.useRef(onDismiss);\n // Callers pass `exclude` inline, a new array each render: read through a ref,\n // or the effect would re-run and move this layer to the top of the stack.\n const excludeRef = React.useRef(exclude);\n React.useEffect(() => {\n onDismissRef.current = onDismiss;\n excludeRef.current = exclude;\n });\n\n React.useEffect(() => {\n if (!enabled) return;\n stack.push(ref);\n\n function onPointerDown(event: PointerEvent) {\n const target = event.target as Node | null;\n if (!target) return;\n if (ref.current && ref.current.contains(target)) return;\n for (const r of excludeRef.current ?? []) {\n if (r.current && r.current.contains(target)) return;\n }\n if (isInsideHigherLayer(ref, target)) return;\n onDismissRef.current(event);\n }\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === \"Escape\" && stack[stack.length - 1] === ref) onDismissRef.current(event);\n }\n\n document.addEventListener(\"pointerdown\", onPointerDown, true);\n document.addEventListener(\"keydown\", onKeyDown);\n return () => {\n const index = stack.indexOf(ref);\n if (index >= 0) stack.splice(index, 1);\n document.removeEventListener(\"pointerdown\", onPointerDown, true);\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [enabled]);\n\n return ref;\n}\n"],"mappings":";AAEA,YAAY,WAAW;AAQvB,MAAM,QAAoB,CAAC;AAE3B,SAAS,oBAAoB,KAAe,QAAuB;AACjE,QAAM,QAAQ,MAAM,QAAQ,GAAG;AAE/B,MAAI,QAAQ,EAAG,QAAO;AACtB,SAAO,MAAM,MAAM,QAAQ,CAAC,EAAE,KAAK,CAAC,UAAU,MAAM,SAAS,SAAS,MAAM,KAAK,KAAK;AACxF;AAqBO,SAAS,oBAAoB,MAIO;AACzC,QAAM,EAAE,SAAS,WAAW,QAAQ,IAAI;AACxC,QAAM,MAAM,MAAM,OAA8B,IAAI;AACpD,QAAM,eAAe,MAAM,OAAO,SAAS;AAG3C,QAAM,aAAa,MAAM,OAAO,OAAO;AACvC,QAAM,UAAU,MAAM;AACpB,iBAAa,UAAU;AACvB,eAAW,UAAU;AAAA,EACvB,CAAC;AAED,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,QAAS;AACd,UAAM,KAAK,GAAG;AAEd,aAAS,cAAc,OAAqB;AAC1C,YAAM,SAAS,MAAM;AACrB,UAAI,CAAC,OAAQ;AACb,UAAI,IAAI,WAAW,IAAI,QAAQ,SAAS,MAAM,EAAG;AACjD,iBAAW,KAAK,WAAW,WAAW,CAAC,GAAG;AACxC,YAAI,EAAE,WAAW,EAAE,QAAQ,SAAS,MAAM,EAAG;AAAA,MAC/C;AACA,UAAI,oBAAoB,KAAK,MAAM,EAAG;AACtC,mBAAa,QAAQ,KAAK;AAAA,IAC5B;AAEA,aAAS,UAAU,OAAsB;AACvC,UAAI,MAAM,QAAQ,YAAY,MAAM,MAAM,SAAS,CAAC,MAAM,IAAK,cAAa,QAAQ,KAAK;AAAA,IAC3F;AAEA,aAAS,iBAAiB,eAAe,eAAe,IAAI;AAC5D,aAAS,iBAAiB,WAAW,SAAS;AAC9C,WAAO,MAAM;AACX,YAAM,QAAQ,MAAM,QAAQ,GAAG;AAC/B,UAAI,SAAS,EAAG,OAAM,OAAO,OAAO,CAAC;AACrC,eAAS,oBAAoB,eAAe,eAAe,IAAI;AAC/D,eAAS,oBAAoB,WAAW,SAAS;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,OAAO,CAAC;AAEZ,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../src/primitives/dismissable-layer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\ntype LayerRef = React.RefObject<HTMLDivElement | null>;\n\ninterface LayerInfo {\n /** The layer this one was rendered inside, from context — not the one below it on the stack. */\n parent: LayerRef | null;\n modal: boolean;\n}\n\ninterface LayerStore {\n // The open layers, bottom first. An overlay opened inside another (a Select\n // in a Dialog, a Popover in a Drawer) is portaled out of its parent's\n // subtree, so \"outside the parent\" would include it: the stack is what tells\n // a nested layer from the rest of the page.\n stack: LayerRef[];\n info: WeakMap<LayerRef, LayerInfo>;\n // The stack as it stood when an event started its trip. By the time the\n // document hears an Escape, a React `onKeyDown` on the way (a Select's, a\n // consumer's) may already have closed the top layer and — a discrete update\n // commits synchronously — popped it, so the layer below would find itself\n // on top and close on the same key; a pointer-down can close an upper modal\n // the same way and lift its barrier mid-flight. Taken in the window's\n // capture phase, which runs before any DOM listener, React's root included.\n seen: WeakMap<Event, LayerRef[]>;\n snapshot: (event: Event) => void;\n}\n\n// One stack per page, not per module copy: a micro-frontend that bundles its\n// own uikit must see the host's layers, and the host its. Versioned, so a copy\n// with a different store shape keeps to itself instead of misreading this one.\nconst STORE_KEY = Symbol.for(\"@evinvest/uikit/dismissable-layers@1\");\n\nfunction isStore(value: unknown): value is LayerStore {\n return typeof value === \"object\" && value !== null && \"stack\" in value && Array.isArray(value.stack);\n}\n\nfunction sharedStore(): LayerStore {\n const existing: unknown = Reflect.get(globalThis, STORE_KEY);\n if (isStore(existing)) return existing;\n const store: LayerStore = {\n stack: [],\n info: new WeakMap(),\n seen: new WeakMap(),\n snapshot: (event) => {\n if (!store.seen.has(event)) store.seen.set(event, store.stack.slice());\n },\n };\n Reflect.set(globalThis, STORE_KEY, store);\n return store;\n}\n\nconst store = sharedStore();\n\n/**\n * Elements carrying this attribute are outside every layer without being a\n * click away from any: a press there dismisses nothing (the toaster).\n */\nexport const LAYER_IGNORE_ATTR = \"data-dismissable-layer-ignore\";\n\nfunction layersAt(event: Event): LayerRef[] {\n // An event dispatched where the window never sees it falls back to the live stack.\n return store.seen.get(event) ?? store.stack;\n}\n\nfunction isPointerOutside(own: LayerRef, event: PointerEvent): boolean {\n const target = event.target;\n if (!(target instanceof Node)) return false;\n const el = target instanceof Element ? target : target.parentElement;\n if (el?.closest(`[${LAYER_IGNORE_ATTR}]`)) return false;\n const layers = layersAt(event);\n const index = layers.indexOf(own);\n // Not on the stack (a listener outliving its cleanup): nothing is above it.\n if (index < 0) return true;\n const above = layers.slice(index + 1);\n // A modal above is a barrier: whatever the press landed on — its scrim, its\n // panel, a toast over it — the modal answers for it, not the layers below.\n if (above.some((layer) => store.info.get(layer)?.modal === true)) return false;\n return !above.some((layer) => layer.current?.contains(target) ?? false);\n}\n\nfunction ownsEscape(own: LayerRef, event: KeyboardEvent): boolean {\n const layers = layersAt(event);\n return layers[layers.length - 1] === own;\n}\n\nfunction isDescendant(layer: LayerRef, ancestor: LayerRef): boolean {\n for (let p = store.info.get(layer)?.parent ?? null; p; p = store.info.get(p)?.parent ?? null) {\n if (p === ancestor) return true;\n }\n return false;\n}\n\nfunction push(layer: LayerRef) {\n const { stack } = store;\n if (stack.length === 0) {\n window.addEventListener(\"keydown\", store.snapshot, true);\n window.addEventListener(\"pointerdown\", store.snapshot, true);\n }\n // Children's effects run before their parent's, so a layer opened in the\n // same commit as one nested in it (`defaultOpen` on both, a shared `open`)\n // arrives second: it goes below its first descendant, not on top.\n const firstChild = stack.findIndex((other) => isDescendant(other, layer));\n if (firstChild < 0) stack.push(layer);\n else stack.splice(firstChild, 0, layer);\n}\n\nfunction pop(layer: LayerRef) {\n const { stack } = store;\n const index = stack.indexOf(layer);\n if (index >= 0) stack.splice(index, 1);\n if (stack.length === 0) {\n window.removeEventListener(\"keydown\", store.snapshot, true);\n window.removeEventListener(\"pointerdown\", store.snapshot, true);\n }\n}\n\nconst ParentLayerContext = React.createContext<LayerRef | null>(null);\n\n/**\n * Marks `children` as rendered inside `layer` (the ref `useDismissableLayer`\n * returned), so a layer among them always stacks above it — even when both\n * open in the same commit. Wrap the overlay's content in it.\n */\nexport function DismissableLayerScope({ layer, children }: { layer: LayerRef; children?: React.ReactNode }) {\n return <ParentLayerContext.Provider value={layer}>{children}</ParentLayerContext.Provider>;\n}\n\n/** Why a layer is being dismissed: the event itself, for a caller that treats keys and pointers apart. */\nexport type DismissEvent = PointerEvent | KeyboardEvent;\n\n/**\n * Calls `onDismiss` on Escape or on a pointer-down outside the layer — the\n * dep-light core of every overlay's \"click away to close\". Pass refs to any\n * nodes that should NOT count as outside (e.g. the trigger), via `exclude`.\n *\n * Layers stack: a layer rendered inside another's `DismissableLayerScope`\n * sits above it, the rest in the order they opened. Escape dismisses only the\n * topmost layer, and a pointer-down inside a layer above this one is not\n * outside it — so a Select's list inside a Dialog closes the list, not the\n * Dialog. The Escape goes to the layer that was on top when the key was\n * pressed, even if a handler on its way closed that layer first.\n *\n * `modal: true` makes the layer a barrier: while it is open, the layers below\n * ignore every pointer-down — a press on its scrim closes it alone. Elements\n * marked with `LAYER_IGNORE_ATTR` (the toaster) are outside no layer.\n *\n * `pointerOutside: false` keeps the layer on the stack (it takes Escape, and\n * the layers below see a pointer-down inside it as inside) but leaves outside\n * clicks to the caller — for an overlay whose own scrim is what \"outside\"\n * means (Drawer, CommandDialog).\n *\n * The stack is shared through `globalThis`, so every copy of this module on\n * the page sees one stack; parent links need one React context, so they hold\n * within a copy only.\n *\n * Mirrors the dismiss behaviour Rust expresses with a full-screen backdrop.\n */\nexport function useDismissableLayer(opts: {\n enabled: boolean;\n onDismiss: (event: DismissEvent) => void;\n exclude?: Array<React.RefObject<Element | null>>;\n /** Dismiss on a pointer-down outside the layer. Default `true`. */\n pointerOutside?: boolean;\n /** Bar the layers below from pointer-downs while open. Default `false`. */\n modal?: boolean;\n}): React.RefObject<HTMLDivElement | null> {\n const { enabled, onDismiss, exclude, pointerOutside = true, modal = false } = opts;\n const parent = React.useContext(ParentLayerContext);\n const ref = React.useRef<HTMLDivElement | null>(null);\n const onDismissRef = React.useRef(onDismiss);\n // Callers pass `exclude` inline, a new array each render: read through a ref,\n // or the effect would re-run and move this layer to the top of the stack.\n const excludeRef = React.useRef(exclude);\n React.useEffect(() => {\n onDismissRef.current = onDismiss;\n excludeRef.current = exclude;\n });\n\n React.useEffect(() => {\n if (!enabled) return;\n store.info.set(ref, { parent, modal });\n push(ref);\n\n function onPointerDown(event: PointerEvent) {\n const target = event.target;\n if (!(target instanceof Node)) return;\n if (ref.current && ref.current.contains(target)) return;\n for (const r of excludeRef.current ?? []) {\n if (r.current && r.current.contains(target)) return;\n }\n if (isPointerOutside(ref, event)) onDismissRef.current(event);\n }\n\n function onKeyDown(event: KeyboardEvent) {\n if (event.key === \"Escape\" && ownsEscape(ref, event)) onDismissRef.current(event);\n }\n\n if (pointerOutside) document.addEventListener(\"pointerdown\", onPointerDown, true);\n document.addEventListener(\"keydown\", onKeyDown);\n return () => {\n pop(ref);\n document.removeEventListener(\"pointerdown\", onPointerDown, true);\n document.removeEventListener(\"keydown\", onKeyDown);\n };\n }, [enabled, pointerOutside, modal, parent]);\n\n return ref;\n}\n"],"mappings":"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","names":["store"]}