tempest-react-sdk 0.5.1 → 0.8.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 (51) hide show
  1. package/README.md +206 -35
  2. package/bin/create-tempest-app.mjs +248 -0
  3. package/bin/tempest.mjs +282 -0
  4. package/dist/styles.css +1 -1
  5. package/dist/sw.cjs +2 -0
  6. package/dist/sw.cjs.map +1 -0
  7. package/dist/sw.d.ts +103 -0
  8. package/dist/sw.js +95 -0
  9. package/dist/sw.js.map +1 -0
  10. package/dist/tempest-react-sdk.cjs +4 -4
  11. package/dist/tempest-react-sdk.cjs.map +1 -1
  12. package/dist/tempest-react-sdk.d.ts +1697 -7
  13. package/dist/tempest-react-sdk.js +4485 -2989
  14. package/dist/tempest-react-sdk.js.map +1 -1
  15. package/dist/vite.cjs +2 -0
  16. package/dist/vite.cjs.map +1 -0
  17. package/dist/vite.d.ts +62 -0
  18. package/dist/vite.js +46 -0
  19. package/dist/vite.js.map +1 -0
  20. package/package.json +34 -2
  21. package/template/README.md +37 -0
  22. package/template/_env.example +2 -0
  23. package/template/_gitignore +9 -0
  24. package/template/_prettierrc.json +9 -0
  25. package/template/eslint.config.js +44 -0
  26. package/template/index.html +12 -0
  27. package/template/package.json +38 -0
  28. package/template/src/App.tsx +15 -0
  29. package/template/src/layouts/RootLayout.tsx +28 -0
  30. package/template/src/lib/api.ts +17 -0
  31. package/template/src/main.tsx +10 -0
  32. package/template/src/pages/Dashboard.tsx +19 -0
  33. package/template/src/pages/Home.tsx +16 -0
  34. package/template/src/pages/Login.tsx +27 -0
  35. package/template/src/routes.tsx +27 -0
  36. package/template/src/stores/auth.ts +15 -0
  37. package/template/src/vite-env.d.ts +1 -0
  38. package/template/tsconfig.json +26 -0
  39. package/template/vite.config.ts +7 -0
  40. package/template-pwa/README.md +64 -0
  41. package/template-pwa/_env.example +7 -0
  42. package/template-pwa/index.html +22 -0
  43. package/template-pwa/package.json +6 -0
  44. package/template-pwa/public/icon-maskable.svg +4 -0
  45. package/template-pwa/public/icon.svg +4 -0
  46. package/template-pwa/public/manifest.webmanifest +35 -0
  47. package/template-pwa/src/main.tsx +36 -0
  48. package/template-pwa/src/pages/Dashboard.tsx +73 -0
  49. package/template-pwa/src/sw.ts +35 -0
  50. package/template-pwa/src/vite-env.d.ts +12 -0
  51. package/template-pwa/vite.sw.config.ts +27 -0
@@ -1,38 +1,73 @@
1
+ import { AnimationEventHandler } from 'react';
2
+ import { AriaRole } from 'react';
3
+ import { BrowserRouter } from 'react-router-dom';
1
4
  import { ButtonHTMLAttributes } from 'react';
5
+ import { ChangeEventHandler } from 'react';
6
+ import { ClipboardEventHandler } from 'react';
2
7
  import { Component } from 'react';
3
8
  import { ComponentType } from 'react';
9
+ import { CompositionEventHandler } from 'react';
4
10
  import { Control } from 'react-hook-form';
5
11
  import { Controller } from 'react-hook-form';
6
12
  import { ControllerRenderProps } from 'react-hook-form';
7
13
  import { CSSProperties } from 'react';
8
14
  import { default as default_2 } from 'dexie';
9
15
  import { DefaultOptions } from '@tanstack/react-query';
16
+ import { DOMElement } from 'react';
17
+ import { DragEventHandler } from 'react';
10
18
  import { ErrorInfo } from 'react';
11
19
  import { FieldArrayWithId } from 'react-hook-form';
12
20
  import { FieldError } from 'react-hook-form';
13
21
  import { FieldErrors } from 'react-hook-form';
14
22
  import { FieldPath } from 'react-hook-form';
15
23
  import { FieldValues } from 'react-hook-form';
24
+ import { FocusEventHandler } from 'react';
16
25
  import { FormHTMLAttributes } from 'react';
17
26
  import { FormProvider } from 'react-hook-form';
18
27
  import { ForwardRefExoticComponent } from 'react';
28
+ import { HashRouter } from 'react-router-dom';
19
29
  import { HTMLAttributes } from 'react';
30
+ import { ImgHTMLAttributes } from 'react';
31
+ import { InputEventHandler } from 'react';
20
32
  import { InputHTMLAttributes } from 'react';
21
33
  import { JSX } from 'react/jsx-runtime';
34
+ import { JSX as JSX_2 } from 'react';
35
+ import { KeyboardEventHandler } from 'react';
36
+ import { LabelHTMLAttributes } from 'react';
22
37
  import { lazy } from 'react';
38
+ import { Link } from 'react-router-dom';
39
+ import { MemoryRouter } from 'react-router-dom';
40
+ import { MouseEventHandler } from 'react';
41
+ import { Navigate } from 'react-router-dom';
42
+ import { NavigateOptions } from 'react-router-dom';
43
+ import { NavLink } from 'react-router-dom';
44
+ import { Outlet } from 'react-router-dom';
45
+ import { Params } from 'react-router-dom';
23
46
  import { Path } from 'react-hook-form';
24
47
  import { PersistOptions } from 'zustand/middleware';
48
+ import { PointerEventHandler } from 'react';
25
49
  import { QueryClient } from '@tanstack/react-query';
26
50
  import { ReactElement } from 'react';
51
+ import { ReactEventHandler } from 'react';
27
52
  import { ReactNode } from 'react';
28
53
  import { ReactPortal } from 'react';
54
+ import { redirect } from 'react-router-dom';
29
55
  import { RefAttributes } from 'react';
30
56
  import { RefObject } from 'react';
57
+ import { Route } from 'react-router-dom';
58
+ import { Routes } from 'react-router-dom';
31
59
  import { SelectHTMLAttributes } from 'react';
60
+ import { StateCreator } from 'zustand';
32
61
  import { StoreApi } from 'zustand';
62
+ import { SubmitEventHandler } from 'react';
33
63
  import { SubmitHandler } from 'react-hook-form';
34
64
  import { Table as Table_2 } from 'dexie';
35
65
  import { TextareaHTMLAttributes } from 'react';
66
+ import { To } from 'react-router-dom';
67
+ import { ToggleEventHandler } from 'react';
68
+ import { TouchEventHandler } from 'react';
69
+ import { TransitionEventHandler } from 'react';
70
+ import { UIEventHandler } from 'react';
36
71
  import { UseBoundStore } from 'zustand';
37
72
  import { useFieldArray } from 'react-hook-form';
38
73
  import { UseFieldArrayReturn } from 'react-hook-form';
@@ -42,7 +77,14 @@ import { UseFormProps } from 'react-hook-form';
42
77
  import { UseFormRegister } from 'react-hook-form';
43
78
  import { UseFormReturn } from 'react-hook-form';
44
79
  import { useFormState } from 'react-hook-form';
80
+ import { useLocation } from 'react-router-dom';
81
+ import { useMatch } from 'react-router-dom';
82
+ import { useNavigate } from 'react-router-dom';
83
+ import { useParams } from 'react-router-dom';
84
+ import { useRouteError } from 'react-router-dom';
85
+ import { useSearchParams } from 'react-router-dom';
45
86
  import { useWatch } from 'react-hook-form';
87
+ import { WheelEventHandler } from 'react';
46
88
  import { z } from 'zod';
47
89
 
48
90
  /**
@@ -136,6 +178,68 @@ export declare interface ApiError {
136
178
  body?: unknown;
137
179
  }
138
180
 
181
+ /**
182
+ * Compose the Tempest app-wide providers in one place: error boundary →
183
+ * TanStack Query → theme → i18n. Query and theme are on by default; i18n and
184
+ * the error boundary mount only when configured. Each provider can be disabled
185
+ * or tuned independently, so an app's `main.tsx` stays a single declarative
186
+ * block instead of a hand-nested provider pyramid.
187
+ *
188
+ * @example
189
+ * <AppProviders
190
+ * errorBoundary={{ fallback: <Crash /> }}
191
+ * i18n={{ locale: "pt-BR", messages }}
192
+ * >
193
+ * <AppRouter routes={routes} />
194
+ * </AppProviders>
195
+ */
196
+ export declare function AppProviders({ children, query, theme, i18n, errorBoundary }: AppProvidersProps): JSX.Element;
197
+
198
+ export declare interface AppProvidersProps {
199
+ children: ReactNode;
200
+ /**
201
+ * TanStack Query config. Enabled by default with SDK defaults; pass `false`
202
+ * to opt out (e.g. the app already mounts its own `QueryProvider`).
203
+ */
204
+ query?: Omit<QueryProviderProps, "children"> | false;
205
+ /**
206
+ * Theme config. Enabled by default; pass `false` to opt out.
207
+ */
208
+ theme?: Omit<ThemeProviderProps, "children"> | false;
209
+ /**
210
+ * i18n config. Opt-in: provide `locale` + `messages` to mount the provider.
211
+ */
212
+ i18n?: Omit<I18nProviderProps, "children">;
213
+ /**
214
+ * Top-level error boundary. Opt-in: provide a `fallback` to wrap the tree.
215
+ */
216
+ errorBoundary?: Omit<ErrorBoundaryProps, "children">;
217
+ }
218
+
219
+ /**
220
+ * Render a full React Router (v7, declarative mode) from a {@link defineRoutes}
221
+ * tree: picks the history strategy, wraps everything in a `<Suspense>` boundary
222
+ * for `lazy` routes, and applies per-route `guard` redirects. This is the
223
+ * single entry point apps mount at their root.
224
+ *
225
+ * @example
226
+ * <AppRouter routes={routes} fallback={<Spinner />} />
227
+ */
228
+ export declare function AppRouter({ routes, router, basename, initialEntries, fallback, }: AppRouterProps): JSX.Element;
229
+
230
+ export declare interface AppRouterProps {
231
+ /** Declarative route tree, ideally built with {@link defineRoutes}. */
232
+ routes: TempestRouteObject[];
233
+ /** History strategy (default: `"browser"`). */
234
+ router?: RouterKind;
235
+ /** App-wide base path forwarded to the underlying router. */
236
+ basename?: string;
237
+ /** Initial URLs for the `"memory"` router (tests / non-DOM hosts). */
238
+ initialEntries?: string[];
239
+ /** Suspense fallback shown while a `lazy` route chunk loads. */
240
+ fallback?: ReactNode;
241
+ }
242
+
139
243
  /**
140
244
  * Full app layout — composes [[Navbar]] + [[Sidebar]] + content +
141
245
  * [[BottomNavigation]] + footer with responsive behaviour:
@@ -191,6 +295,29 @@ export declare interface AspectRatioProps extends HTMLAttributes<HTMLDivElement>
191
295
  children?: ReactNode;
192
296
  }
193
297
 
298
+ /**
299
+ * Assert that a code path is unreachable, throwing at runtime if reached.
300
+ *
301
+ * Use in the `default` branch of an exhaustive `switch` so TypeScript flags any
302
+ * unhandled union member at compile time and the runtime fails loudly if an
303
+ * unexpected value slips through.
304
+ *
305
+ * @param value - The value that should be of type `never`.
306
+ * @param message - Optional custom error message.
307
+ * @throws {Error} Always.
308
+ *
309
+ * @example
310
+ * type Shape = "circle" | "square";
311
+ * function area(shape: Shape): number {
312
+ * switch (shape) {
313
+ * case "circle": return 1;
314
+ * case "square": return 2;
315
+ * default: return assertNever(shape);
316
+ * }
317
+ * }
318
+ */
319
+ export declare function assertNever(value: never, message?: string): never;
320
+
194
321
  export declare type AsyncStatus = "idle" | "pending" | "success" | "error";
195
322
 
196
323
  export declare interface AudioPlayer {
@@ -429,6 +556,8 @@ export declare interface BreakpointHelpers {
429
556
  /** Pixel value paired with each breakpoint key. */
430
557
  export declare const BREAKPOINTS: Record<Breakpoint, number>;
431
558
 
559
+ export { BrowserRouter }
560
+
432
561
  /**
433
562
  * Primary action button with variants, sizes and a loading state that
434
563
  * preserves layout via an absolutely-positioned spinner.
@@ -465,6 +594,58 @@ export declare const CACHE_TIME: {
465
594
  readonly LONG: number;
466
595
  };
467
596
 
597
+ /**
598
+ * Standalone month-grid date picker. Renders a header with the month/year and
599
+ * prev/next buttons, a weekday row, and a 6x7 grid of day buttons. Selection and
600
+ * the visible month can each be controlled or uncontrolled. Grid arithmetic uses
601
+ * plain `Date` math — no external date libraries.
602
+ *
603
+ * Keyboard: arrow keys move focus by day (left/right) or week (up/down), and
604
+ * Enter/Space selects the focused day.
605
+ */
606
+ export declare function Calendar({ value, defaultValue, onChange, month, onMonthChange, minDate, maxDate, weekStartsOn, className, ...props }: CalendarProps): JSX.Element;
607
+
608
+ export declare interface CalendarProps extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue"> {
609
+ /** Controlled selected date. */
610
+ value?: Date;
611
+ /** Initial selected date for the uncontrolled case. */
612
+ defaultValue?: Date;
613
+ /** Called with the newly selected date. */
614
+ onChange?: (date: Date) => void;
615
+ /** Controlled visible month (any day within it). */
616
+ month?: Date;
617
+ /** Called when the visible month changes (prev/next). */
618
+ onMonthChange?: (month: Date) => void;
619
+ /** Earliest selectable date (inclusive). */
620
+ minDate?: Date;
621
+ /** Latest selectable date (inclusive). */
622
+ maxDate?: Date;
623
+ /** First column of the week — `0` Sunday (default) or `1` Monday. */
624
+ weekStartsOn?: WeekStart;
625
+ }
626
+
627
+ /**
628
+ * Convert `value` to `camelCase`.
629
+ *
630
+ * Splits on spaces, hyphens, underscores and other non-alphanumeric runs,
631
+ * lowercases the first word, and capitalizes each subsequent word.
632
+ *
633
+ * @example
634
+ * camelCase("hello world"); // "helloWorld"
635
+ * camelCase("foo-bar_baz"); // "fooBarBaz"
636
+ * camelCase("API response"); // "apiResponse"
637
+ */
638
+ export declare function camelCase(value: string): string;
639
+
640
+ /**
641
+ * Uppercase the first character of `value`, leaving the rest untouched.
642
+ *
643
+ * @example
644
+ * capitalize("hello world"); // "Hello world"
645
+ * capitalize(""); // ""
646
+ */
647
+ export declare function capitalize(value: string): string;
648
+
468
649
  /**
469
650
  * Card container with optional header (title + actions) and footer slot.
470
651
  * Use `flush` when you need to host content (tables, lists) without inner padding.
@@ -485,6 +666,40 @@ export declare interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>,
485
666
  elevation?: CardElevation;
486
667
  }
487
668
 
669
+ /**
670
+ * Horizontal content slider showing one slide at a time.
671
+ *
672
+ * - Track translates by the active index (`translateX(-index * 100%)`).
673
+ * - Prev/next arrows (disabled at the ends unless `loop`); dot indicators jump.
674
+ * - Controlled (`index`) or uncontrolled (`defaultIndex`).
675
+ * - Arrow Left/Right on the focused region navigates.
676
+ *
677
+ * @example
678
+ * <Carousel loop>
679
+ * <img src="/1.jpg" alt="" />
680
+ * <img src="/2.jpg" alt="" />
681
+ * <img src="/3.jpg" alt="" />
682
+ * </Carousel>
683
+ */
684
+ export declare function Carousel({ children, loop, showArrows, showDots, index, defaultIndex, onIndexChange, className, ...props }: CarouselProps): JSX.Element;
685
+
686
+ export declare interface CarouselProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
687
+ /** Slides — one rendered at a time. */
688
+ children: ReactNode[];
689
+ /** Wrap around at the ends instead of stopping. Default `false`. */
690
+ loop?: boolean;
691
+ /** Show prev/next arrow buttons. Default `true`. */
692
+ showArrows?: boolean;
693
+ /** Show dot indicators. Default `true`. */
694
+ showDots?: boolean;
695
+ /** Controlled active index. */
696
+ index?: number;
697
+ /** Initial index for uncontrolled use. Default `0`. */
698
+ defaultIndex?: number;
699
+ /** Called whenever the active index changes. */
700
+ onIndexChange?: (index: number) => void;
701
+ }
702
+
488
703
  export declare type Catalog = Record<string, Messages>;
489
704
 
490
705
  /**
@@ -550,6 +765,23 @@ export declare interface ChipInputProps {
550
765
  className?: string;
551
766
  }
552
767
 
768
+ /**
769
+ * Split a list into consecutive chunks of at most `size` items.
770
+ *
771
+ * The final chunk may be smaller than `size`. An empty input yields `[]`.
772
+ *
773
+ * @param items - The list to split.
774
+ * @param size - Maximum chunk length; must be `>= 1`.
775
+ * @throws {RangeError} When `size` is less than `1`.
776
+ *
777
+ * @example
778
+ * chunk([1, 2, 3, 4, 5], 2); // [[1, 2], [3, 4], [5]]
779
+ *
780
+ * @example
781
+ * chunk([], 3); // []
782
+ */
783
+ export declare function chunk<T>(items: T[], size: number): T[][];
784
+
553
785
  /**
554
786
  * Clamp `value` between `min` and `max` (inclusive).
555
787
  *
@@ -562,6 +794,25 @@ export declare function clamp(value: number, min: number, max: number): number;
562
794
 
563
795
  declare type ClassValue = string | number | bigint | boolean | null | undefined | ClassValue[];
564
796
 
797
+ /**
798
+ * Wraps its children in a `<div>` and invokes `onOutside` whenever a
799
+ * `mousedown` or `touchstart` event occurs outside that subtree.
800
+ *
801
+ * Useful for dismissing popovers, dropdowns and menus on outside interaction.
802
+ * Listeners are attached to `document` on mount and removed on unmount.
803
+ *
804
+ * @param props - The click-outside props, plus any `<div>` attributes.
805
+ * @returns The wrapper element containing the children.
806
+ */
807
+ export declare function ClickOutside({ onOutside, children, ...props }: ClickOutsideProps): ReactNode;
808
+
809
+ export declare interface ClickOutsideProps extends HTMLAttributes<HTMLDivElement> {
810
+ /** Called when a pointer event lands outside the wrapped subtree. */
811
+ onOutside: (event: MouseEvent | TouchEvent) => void;
812
+ /** Content wrapped by the outside-click boundary. */
813
+ children: ReactNode;
814
+ }
815
+
565
816
  /**
566
817
  * Tiny classnames helper. Accepts strings, falsy values and nested arrays.
567
818
  *
@@ -575,6 +826,31 @@ value: string;
575
826
  onChange: (value: string) => void;
576
827
  } & RefAttributes<HTMLInputElement>>;
577
828
 
829
+ /**
830
+ * A single expand/collapse region — a lighter alternative to `Accordion` for
831
+ * one toggleable block. The trigger is a `<button aria-expanded aria-controls>`
832
+ * wired to a content region sharing the same id; the region is `hidden` while
833
+ * closed. Works controlled (`open` + `onOpenChange`) or uncontrolled
834
+ * (`defaultOpen`).
835
+ *
836
+ * @param props - {@link CollapsibleProps}.
837
+ * @returns The collapsible container.
838
+ */
839
+ export declare function Collapsible({ open, defaultOpen, onOpenChange, trigger, className, children, ...props }: CollapsibleProps): JSX.Element;
840
+
841
+ export declare interface CollapsibleProps extends HTMLAttributes<HTMLDivElement> {
842
+ /** Controlled open state. When provided the component is controlled. */
843
+ open?: boolean;
844
+ /** Initial open state for the uncontrolled variant. Default `false`. */
845
+ defaultOpen?: boolean;
846
+ /** Fired with the next open state whenever the trigger is activated. */
847
+ onOpenChange?: (open: boolean) => void;
848
+ /** Content rendered inside the trigger button. */
849
+ trigger: ReactNode;
850
+ /** Collapsible content, hidden while closed. */
851
+ children: ReactNode;
852
+ }
853
+
578
854
  /**
579
855
  * Combobox — text input with a filterable dropdown of options.
580
856
  *
@@ -605,6 +881,65 @@ export declare interface ComboboxProps {
605
881
  className?: string;
606
882
  }
607
883
 
884
+ /**
885
+ * A ⌘K-style command palette: an overlay dialog with a search input that
886
+ * substring-filters items by label and keywords, groups results, and supports
887
+ * full keyboard navigation (Arrow up/down, Enter, Escape). Traps focus while
888
+ * open.
889
+ */
890
+ export declare function Command({ open, onOpenChange, items, placeholder, emptyMessage, className, }: CommandProps): ReactPortal | null;
891
+
892
+ export declare interface CommandItem {
893
+ /** Stable unique identifier for the item. */
894
+ id: string;
895
+ /** Human-readable label shown in the list and matched against the query. */
896
+ label: string;
897
+ /** Optional group heading; items sharing a group are rendered together. */
898
+ group?: string;
899
+ /** Extra terms matched against the query in addition to `label`. */
900
+ keywords?: string[];
901
+ /** Invoked when the item is chosen (click or Enter on the active row). */
902
+ onSelect: () => void;
903
+ /** Optional leading icon. */
904
+ icon?: ReactNode;
905
+ }
906
+
907
+ export declare interface CommandProps {
908
+ /** Whether the palette is visible. */
909
+ open: boolean;
910
+ /** Called with the next open state (Escape, selection, backdrop click). */
911
+ onOpenChange: (open: boolean) => void;
912
+ /** Candidate items to filter and display. */
913
+ items: CommandItem[];
914
+ /** Placeholder for the search input. */
915
+ placeholder?: string;
916
+ /** Rendered when no item matches the current query. */
917
+ emptyMessage?: ReactNode;
918
+ /** Forwarded to the dialog element. */
919
+ className?: string;
920
+ }
921
+
922
+ /**
923
+ * Conditionally wraps its children with `wrapper`.
924
+ *
925
+ * Renders `wrapper(children)` when `condition` is `true`, otherwise renders the
926
+ * children unchanged. Avoids duplicating a subtree just to add an optional
927
+ * wrapping element (e.g. a link, tooltip or boundary).
928
+ *
929
+ * @param props - The conditional-wrapper props.
930
+ * @returns The wrapped children when `condition` is `true`, else the children.
931
+ */
932
+ export declare function ConditionalWrapper({ condition, wrapper, children, }: ConditionalWrapperProps): ReactNode;
933
+
934
+ export declare interface ConditionalWrapperProps {
935
+ /** When `true`, the children are passed through `wrapper`. */
936
+ condition: boolean;
937
+ /** Wrapping function applied to the children when `condition` is `true`. */
938
+ wrapper: (children: ReactNode) => ReactNode;
939
+ /** Content that may be wrapped. */
940
+ children: ReactNode;
941
+ }
942
+
608
943
  /**
609
944
  * Quick confirmation prompt built on top of {@link Modal}. Use for destructive
610
945
  * actions with `variant="danger"`.
@@ -644,10 +979,65 @@ export declare interface ContainerProps extends HTMLAttributes<HTMLDivElement> {
644
979
 
645
980
  export declare type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
646
981
 
982
+ /**
983
+ * Right-click context menu.
984
+ *
985
+ * - Opens at the cursor position on `onContextMenu` (default browser menu suppressed).
986
+ * - Rendered through a {@link Portal} so it escapes parent overflow/stacking contexts.
987
+ * - Closes on outside click, Escape, or item selection.
988
+ * - Arrow Up/Down move focus across selectable items; Enter activates the focused item.
989
+ *
990
+ * @param props - The context menu props.
991
+ * @returns The trigger wrapper plus the portalled menu when open.
992
+ */
993
+ export declare function ContextMenu({ items, children, className }: ContextMenuProps): JSX.Element;
994
+
995
+ export declare type ContextMenuItem = {
996
+ label: ReactNode;
997
+ onSelect?: () => void;
998
+ disabled?: boolean;
999
+ danger?: boolean;
1000
+ } | {
1001
+ separator: true;
1002
+ };
1003
+
1004
+ export declare interface ContextMenuProps {
1005
+ /** Menu entries — selectable items and separators. */
1006
+ items: ContextMenuItem[];
1007
+ /** Trigger area. Right-clicking anywhere within opens the menu at the cursor. */
1008
+ children: ReactNode;
1009
+ /** Extra class names forwarded to the menu element. */
1010
+ className?: string;
1011
+ }
1012
+
647
1013
  export { Control }
648
1014
 
649
1015
  export { Controller }
650
1016
 
1017
+ /**
1018
+ * Button that copies a string to the clipboard and shows a transient "copied"
1019
+ * state for `timeout` milliseconds.
1020
+ *
1021
+ * When `children` are provided they are rendered in both states; otherwise the
1022
+ * label toggles between "Copy" and "Copied". The reset timer is cleared on
1023
+ * unmount to avoid setting state on an unmounted component.
1024
+ *
1025
+ * @example
1026
+ * <CopyButton value="npm i tempest-react-sdk" />
1027
+ */
1028
+ export declare function CopyButton({ value, timeout, children, onCopied, className, onClick, ...props }: CopyButtonProps): JSX.Element;
1029
+
1030
+ export declare interface CopyButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1031
+ /** Text written to the clipboard when the button is clicked. */
1032
+ value: string;
1033
+ /** How long (ms) the "copied" state stays active before resetting. Defaults to 2000. */
1034
+ timeout?: number;
1035
+ /** Optional label. Falls back to "Copy" / "Copied" based on state. */
1036
+ children?: ReactNode;
1037
+ /** Called after a successful clipboard write. */
1038
+ onCopied?: () => void;
1039
+ }
1040
+
651
1041
  export declare const CPFInput: ForwardRefExoticComponent<Omit<InputProps, "value" | "onChange"> & {
652
1042
  value: string;
653
1043
  onChange: (value: string) => void;
@@ -933,6 +1323,23 @@ export declare function createQueryKeys<TKey extends string, TEntries extends Re
933
1323
  */
934
1324
  export declare function createRefreshQueue(refresh: () => Promise<void>): () => Promise<void>;
935
1325
 
1326
+ /**
1327
+ * Attach auto-generated selector hooks to a Zustand store. Instead of writing
1328
+ * `useStore((s) => s.user)` at every call site, you get `useStore.use.user()`
1329
+ * — one memoized selector per top-level state key.
1330
+ *
1331
+ * @typeParam S - The bound store hook type returned by `create`/{@link createStore}.
1332
+ * @param store - The bound Zustand hook.
1333
+ * @returns The same hook with a `.use` namespace of field selectors.
1334
+ *
1335
+ * @example
1336
+ * const useCart = createSelectors(
1337
+ * createStore<CartState>((set) => ({ items: [], add: (id) => ... })),
1338
+ * );
1339
+ * const items = useCart.use.items(); // subscribes only to `items`
1340
+ */
1341
+ export declare function createSelectors<S extends UseBoundStore<StoreApi<object>>>(store: S): WithSelectors<S>;
1342
+
936
1343
  /**
937
1344
  * Build a [[TelemetryAdapter]] backed by `@sentry/browser`. The Sentry SDK
938
1345
  * is supplied by the caller (not bundled) so apps that already initialise
@@ -969,6 +1376,63 @@ export declare interface CreateSentryTelemetryAdapterOptions {
969
1376
  breadcrumbCategory?: string;
970
1377
  }
971
1378
 
1379
+ /**
1380
+ * Create a typed Zustand store with optional `persist` middleware, wired with
1381
+ * Tempest defaults. This is the generic counterpart to `createAuthStore`: use
1382
+ * it for any domain slice (cart, preferences, wizard state, …) without
1383
+ * re-writing the persistence boilerplate in every app.
1384
+ *
1385
+ * @typeParam T - The store state shape (state + actions).
1386
+ * @param initializer - Standard Zustand `StateCreator` (`(set, get) => state`).
1387
+ * @param options - Optional persistence configuration.
1388
+ * @returns A bound Zustand hook (`useStore`) with the usual `getState`/`setState`/`subscribe` API.
1389
+ *
1390
+ * @example
1391
+ * interface CartState {
1392
+ * items: string[];
1393
+ * add: (id: string) => void;
1394
+ * clear: () => void;
1395
+ * }
1396
+ *
1397
+ * const useCart = createStore<CartState>(
1398
+ * (set) => ({
1399
+ * items: [],
1400
+ * add: (id) => set((s) => ({ items: [...s.items, id] })),
1401
+ * clear: () => set({ items: [] }),
1402
+ * }),
1403
+ * { persist: { name: "cart", partialize: (s) => ({ items: s.items }) } },
1404
+ * );
1405
+ */
1406
+ export declare function createStore<T>(initializer: StateCreator<T, [], []>, options?: CreateStoreOptions<T>): UseBoundStore<StoreApi<T>>;
1407
+
1408
+ /**
1409
+ * Options accepted by {@link createStore}.
1410
+ */
1411
+ export declare interface CreateStoreOptions<T> {
1412
+ /** Enable `localStorage`/`sessionStorage` persistence for the store. */
1413
+ persist?: CreateStorePersistOptions<T>;
1414
+ }
1415
+
1416
+ /**
1417
+ * Persistence options for {@link createStore}. Mirrors the subset of Zustand's
1418
+ * `persist` middleware that apps usually need, with sensible Tempest defaults.
1419
+ */
1420
+ export declare interface CreateStorePersistOptions<T> {
1421
+ /** Storage key (required to enable persistence). */
1422
+ name: string;
1423
+ /** Which Web Storage to use (default: `"local"`). */
1424
+ storage?: "local" | "session";
1425
+ /**
1426
+ * Pick the slice of state to persist. Defaults to persisting the whole
1427
+ * state. Use this to avoid writing transient/derived fields.
1428
+ */
1429
+ partialize?: PersistOptions<T, Partial<T>>["partialize"];
1430
+ /** Persisted schema version, forwarded to Zustand for migrations. */
1431
+ version?: number;
1432
+ /** Migration function forwarded to Zustand's `persist` middleware. */
1433
+ migrate?: PersistOptions<T, Partial<T>>["migrate"];
1434
+ }
1435
+
972
1436
  /**
973
1437
  * Open a WebSocket with automatic exponential-backoff reconnect, optional
974
1438
  * heartbeat pings, and typed JSON parsing.
@@ -1004,6 +1468,93 @@ export declare interface CreateWebSocketOptions<T> {
1004
1468
  onStatusChange?: (status: WebSocketStatus) => void;
1005
1469
  }
1006
1470
 
1471
+ /**
1472
+ * Generic, typed list that renders a `<ul>` with one `<li>` per item.
1473
+ *
1474
+ * The component is generic over the item type so `renderItem` and
1475
+ * `keyExtractor` infer their argument types from `items`. When `items` is
1476
+ * empty it renders `empty` (or nothing) instead of an empty list.
1477
+ *
1478
+ * @param items - The collection to render.
1479
+ * @param renderItem - Renders the contents of each list item.
1480
+ * @param keyExtractor - Optional stable key derivation (defaults to index).
1481
+ * @param empty - Optional node shown when there are no items.
1482
+ * @returns The rendered list, or the `empty` node when there are no items.
1483
+ */
1484
+ export declare function DataList<T>({ items, renderItem, keyExtractor, empty, className, ...props }: DataListProps<T>): JSX.Element;
1485
+
1486
+ export declare interface DataListProps<T> extends HTMLAttributes<HTMLUListElement> {
1487
+ /** The collection to render, one `<li>` per item. */
1488
+ items: readonly T[];
1489
+ /** Renders the contents of each list item. */
1490
+ renderItem: (item: T, index: number) => ReactNode;
1491
+ /** Derives a stable React key for each item (defaults to the index). */
1492
+ keyExtractor?: (item: T, index: number) => string | number;
1493
+ /** Node rendered in place of the list when `items` is empty. */
1494
+ empty?: ReactNode;
1495
+ }
1496
+
1497
+ /**
1498
+ * Stateful, headless data table built on top of {@link Table}. Adds
1499
+ * client-side searching, click-to-sort columns, and pagination while
1500
+ * delegating all table markup to the underlying Table component.
1501
+ *
1502
+ * - Clicking a sortable header cycles asc → desc → unsorted.
1503
+ * - Search matches a case-insensitive substring across `searchKeys`
1504
+ * (or every string/number column when not provided).
1505
+ * - Pagination is hidden when the result fits on a single page.
1506
+ */
1507
+ export declare function DataTable<T>({ data, columns, pageSize, searchable, searchKeys, initialSort, rowKey, emptyMessage, className, ...rest }: DataTableProps<T>): JSX.Element;
1508
+
1509
+ /**
1510
+ * Column definition for {@link DataTable}. Extends the headless {@link Table}
1511
+ * column shape with a typed `key`, opt-in sorting, and the visual options that
1512
+ * are forwarded to the underlying Table cell.
1513
+ */
1514
+ export declare interface DataTableColumn<T> {
1515
+ /** Property of the row this column reads from. Doubles as the cell key. */
1516
+ key: keyof T;
1517
+ /** Column heading. */
1518
+ header: ReactNode;
1519
+ /** Custom cell renderer. Defaults to `String(row[key])`. */
1520
+ render?: (row: T) => ReactNode;
1521
+ /** Enable click-to-sort on this column's header. */
1522
+ sortable?: boolean;
1523
+ /** Text alignment forwarded to the Table cell. */
1524
+ align?: TableAlign;
1525
+ /** Responsive visibility priority forwarded to the Table cell. */
1526
+ priority?: TablePriority;
1527
+ /** Fixed column width forwarded to the Table cell. */
1528
+ width?: string | number;
1529
+ }
1530
+
1531
+ export declare interface DataTableProps<T> extends HTMLAttributes<HTMLDivElement> {
1532
+ /** Full, unfiltered dataset. Sorting/filtering/pagination happen client-side. */
1533
+ data: T[];
1534
+ /** Column definitions. */
1535
+ columns: DataTableColumn<T>[];
1536
+ /** Rows per page. Default 10. */
1537
+ pageSize?: number;
1538
+ /** Render a search input above the table. Default false. */
1539
+ searchable?: boolean;
1540
+ /**
1541
+ * Keys to match the search term against. When omitted, every column whose
1542
+ * value is a string or number is searched.
1543
+ */
1544
+ searchKeys?: (keyof T)[];
1545
+ /** Initial sort applied before any header interaction. */
1546
+ initialSort?: DataTableSort<T>;
1547
+ /** Stable key extractor for rows. Defaults to the row index. */
1548
+ rowKey?: (row: T, index: number) => string | number;
1549
+ /** Content shown when no rows match. */
1550
+ emptyMessage?: ReactNode;
1551
+ }
1552
+
1553
+ export declare interface DataTableSort<T> {
1554
+ key: keyof T;
1555
+ direction: SortDirection;
1556
+ }
1557
+
1007
1558
  /**
1008
1559
  * Thin wrapper around the native `<input type="date">` (or `datetime-local`,
1009
1560
  * `time`, `month`). For richer pickers, pair with `react-datepicker` directly
@@ -1027,6 +1578,22 @@ export declare interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLIn
1027
1578
  wrapperClassName?: string;
1028
1579
  }
1029
1580
 
1581
+ /**
1582
+ * Create a trailing-edge debounced version of `fn`.
1583
+ *
1584
+ * The wrapped function delays invoking `fn` until `wait` milliseconds have
1585
+ * elapsed since the last time it was called. Only the latest arguments are
1586
+ * used. Call `.cancel()` to clear any pending invocation.
1587
+ *
1588
+ * @example
1589
+ * const save = debounce((q: string) => search(q), 300);
1590
+ * save("a"); save("ab"); save("abc"); // only "abc" runs after 300ms
1591
+ * save.cancel(); // nothing runs
1592
+ */
1593
+ export declare function debounce<A extends unknown[]>(fn: (...args: A) => void, wait: number): ((...args: A) => void) & {
1594
+ cancel: () => void;
1595
+ };
1596
+
1030
1597
  export declare interface DecodedJWT {
1031
1598
  header: Record<string, unknown>;
1032
1599
  payload: Record<string, unknown> & {
@@ -1046,6 +1613,63 @@ export declare interface DecodedJWT {
1046
1613
  */
1047
1614
  export declare function decodeJWT(token: string): DecodedJWT;
1048
1615
 
1616
+ /**
1617
+ * Recursively merge `source` into `target`, returning a new object.
1618
+ *
1619
+ * - Plain objects are merged key by key, recursing into nested plain objects.
1620
+ * - Arrays and non-plain values (dates, class instances, primitives) replace
1621
+ * the target value entirely — they are not merged element by element.
1622
+ * - Neither `target` nor `source` is mutated.
1623
+ *
1624
+ * @example
1625
+ * deepMerge(
1626
+ * { a: 1, nested: { x: 1, y: 2 } },
1627
+ * { nested: { y: 20, z: 30 } },
1628
+ * );
1629
+ * // { a: 1, nested: { x: 1, y: 20, z: 30 } }
1630
+ *
1631
+ * @example
1632
+ * deepMerge({ tags: ["a", "b"] }, { tags: ["c"] });
1633
+ * // { tags: ["c"] } (arrays replaced, not merged)
1634
+ */
1635
+ export declare function deepMerge<T>(target: T, source: Partial<T>): T;
1636
+
1637
+ /**
1638
+ * Identity helper that types a declarative route tree. Use it so editors give
1639
+ * autocomplete and type-checking on every node; the array is returned as-is.
1640
+ *
1641
+ * @example
1642
+ * export const routes = defineRoutes([
1643
+ * { path: "/", element: <Layout />, children: [
1644
+ * { index: true, lazy: () => import("./pages/Home") },
1645
+ * { path: "settings", lazy: () => import("./pages/Settings"),
1646
+ * guard: () => useAuth.getState().isAuthenticated, redirectTo: "/login" },
1647
+ * ] },
1648
+ * ]);
1649
+ */
1650
+ export declare function defineRoutes(routes: TempestRouteObject[]): TempestRouteObject[];
1651
+
1652
+ /**
1653
+ * Renders a semantic `<dl>` of term/description pairs with minimal
1654
+ * token-based key/value styling.
1655
+ *
1656
+ * @param items - The term/description pairs to render.
1657
+ * @returns The rendered description list.
1658
+ */
1659
+ export declare function DescriptionList({ items, className, ...props }: DescriptionListProps): JSX.Element;
1660
+
1661
+ export declare interface DescriptionListItem {
1662
+ /** The key/label rendered inside a `<dt>`. */
1663
+ term: ReactNode;
1664
+ /** The value rendered inside a `<dd>`. */
1665
+ description: ReactNode;
1666
+ }
1667
+
1668
+ export declare interface DescriptionListProps extends HTMLAttributes<HTMLDListElement> {
1669
+ /** Term/description pairs rendered as `<dt>`/`<dd>` rows. */
1670
+ items: DescriptionListItem[];
1671
+ }
1672
+
1049
1673
  /**
1050
1674
  * Horizontal or vertical visual separator. When `label` is provided in
1051
1675
  * horizontal mode the divider splits and centers the label between two lines.
@@ -1215,6 +1839,23 @@ export declare interface ErrorStateProps {
1215
1839
  className?: string;
1216
1840
  }
1217
1841
 
1842
+ /**
1843
+ * Renders a form-field error message as a `<p role="alert">`.
1844
+ *
1845
+ * Renders `null` when there are no children, so it can be placed
1846
+ * unconditionally below a field and only appears when an error is present.
1847
+ * Styled with the `--tempest-danger` token (falling back to a red default).
1848
+ *
1849
+ * @param props - The error-text props, plus any `<p>` attributes.
1850
+ * @returns The alert paragraph, or `null` when there is no message.
1851
+ */
1852
+ export declare function ErrorText({ children, className, ...props }: ErrorTextProps): ReactNode;
1853
+
1854
+ export declare interface ErrorTextProps extends HTMLAttributes<HTMLParagraphElement> {
1855
+ /** The error message. When empty, the component renders nothing. */
1856
+ children?: ReactNode;
1857
+ }
1858
+
1218
1859
  export declare function estimatePasswordStrength(value: string): PasswordStrength;
1219
1860
 
1220
1861
  export declare interface EventStreamController {
@@ -1300,6 +1941,20 @@ export declare type FilterPredicate<T> = (item: T, search: string) => boolean;
1300
1941
 
1301
1942
  export declare type FlagValue = boolean | string | number | null;
1302
1943
 
1944
+ /**
1945
+ * Typed, JSX-friendly list renderer.
1946
+ *
1947
+ * Maps over `each`, calling `children(item, index)` for every entry. When
1948
+ * `each` is empty, it renders `fallback` (or nothing). The generic parameter is
1949
+ * inferred from `each`, so the render callback's `item` is fully typed:
1950
+ * `<For each={users}>{(user) => <li>{user.name}</li>}</For>`.
1951
+ *
1952
+ * @typeParam T - The element type of the `each` collection.
1953
+ * @param props - The list-rendering props.
1954
+ * @returns The mapped children, or the fallback when `each` is empty.
1955
+ */
1956
+ export declare function For<T>({ each, children, fallback }: ForProps<T>): ReactNode;
1957
+
1303
1958
  /**
1304
1959
  * Form wrapper with a built-in layout variant. Replaces ad-hoc `<form>` +
1305
1960
  * `<Stack>` / `<Grid>` boilerplate; pair with [[FormRow]], [[FormSection]],
@@ -1336,12 +1991,40 @@ export declare interface FormActionsProps extends HTMLAttributes<HTMLDivElement>
1336
1991
  gap?: number | string;
1337
1992
  }
1338
1993
 
1994
+ /**
1995
+ * Format a byte count as a human-readable size string.
1996
+ *
1997
+ * Scales through B, KB, MB, GB and TB using 1024 as the base. `decimals`
1998
+ * controls the fractional digits for scaled units (default 1); `0` bytes
1999
+ * always renders as `"0 B"`.
2000
+ *
2001
+ * @example
2002
+ * formatBytes(0); // "0 B"
2003
+ * formatBytes(1536); // "1.5 KB"
2004
+ * formatBytes(1048576); // "1 MB"
2005
+ * formatBytes(1536, 2); // "1.50 KB"
2006
+ */
2007
+ export declare function formatBytes(bytes: number, decimals?: number): string;
2008
+
1339
2009
  /** Format an 11-digit Brazilian CEP-like value as `00000-000`. */
1340
2010
  export declare function formatCEP(value: string): string;
1341
2011
 
1342
2012
  /** Format an unmasked CNPJ-shaped value as `00.000.000/0000-00`. */
1343
2013
  export declare function formatCNPJ(value: string): string;
1344
2014
 
2015
+ /**
2016
+ * Format a number using compact notation (e.g. `1.2K`, `3.4M`).
2017
+ *
2018
+ * Wraps `Intl.NumberFormat` with `notation: "compact"`. The `locale` defaults
2019
+ * to `"en-US"`.
2020
+ *
2021
+ * @example
2022
+ * formatCompactNumber(1234); // "1.2K"
2023
+ * formatCompactNumber(5600000); // "5.6M"
2024
+ * formatCompactNumber(1234, "pt-BR"); // "1,2 mil"
2025
+ */
2026
+ export declare function formatCompactNumber(value: number, locale?: string): string;
2027
+
1345
2028
  /**
1346
2029
  * Apply the Brazilian CPF mask `XXX.XXX.XXX-XX`.
1347
2030
  *
@@ -1494,6 +2177,15 @@ export declare interface FormSectionProps extends Omit<HTMLAttributes<HTMLElemen
1494
2177
  description?: ReactNode;
1495
2178
  }
1496
2179
 
2180
+ export declare interface ForProps<T> {
2181
+ /** The collection to iterate over. */
2182
+ each: readonly T[];
2183
+ /** Render function called for each item with its index. */
2184
+ children: (item: T, index: number) => ReactNode;
2185
+ /** Rendered when `each` is empty. Defaults to `null`. */
2186
+ fallback?: ReactNode;
2187
+ }
2188
+
1497
2189
  /**
1498
2190
  * Generate an RFC4122 v4 idempotency key (UUID). Use as the value for an
1499
2191
  * `Idempotency-Key` header on POST/PATCH requests that must not run twice.
@@ -1597,6 +2289,21 @@ export declare interface GridProps extends HTMLAttributes<HTMLDivElement> {
1597
2289
  children?: ReactNode;
1598
2290
  }
1599
2291
 
2292
+ /**
2293
+ * Group items of a list into buckets keyed by the result of `key`.
2294
+ *
2295
+ * Items preserve their original order within each bucket.
2296
+ *
2297
+ * @example
2298
+ * groupBy([1, 2, 3, 4], (n) => (n % 2 === 0 ? "even" : "odd"));
2299
+ * // { odd: [1, 3], even: [2, 4] }
2300
+ *
2301
+ * @example
2302
+ * groupBy([{ city: "SP" }, { city: "RJ" }, { city: "SP" }], (u) => u.city);
2303
+ * // { SP: [{ city: "SP" }, { city: "SP" }], RJ: [{ city: "RJ" }] }
2304
+ */
2305
+ export declare function groupBy<T, K extends PropertyKey>(items: T[], key: (item: T) => K): Record<K, T[]>;
2306
+
1600
2307
  /**
1601
2308
  * Minimal subset of [`@growthbook/growthbook`](https://docs.growthbook.io/lib/js)
1602
2309
  * used by the adapter. Pass a `GrowthBook` instance directly.
@@ -1608,6 +2315,8 @@ export declare interface GrowthBookLike {
1608
2315
  setRenderer?: (renderer: () => void) => void;
1609
2316
  }
1610
2317
 
2318
+ export { HashRouter }
2319
+
1611
2320
  /** Inverse of `<Show>` — hides children when the condition matches. */
1612
2321
  export declare function Hide({ above, below, only, children }: HideProps): ReactNode;
1613
2322
 
@@ -1621,6 +2330,34 @@ export declare interface HideProps {
1621
2330
  children: ReactNode;
1622
2331
  }
1623
2332
 
2333
+ /**
2334
+ * Content preview shown when the trigger is hovered or focused.
2335
+ *
2336
+ * - Opens after `openDelay` on `mouseenter`/`focus`.
2337
+ * - Closes after `closeDelay` on `mouseleave`/`blur`.
2338
+ * - Positioned relative to the trigger via `placement`.
2339
+ * - The card is rendered as a labelled `role="dialog"` region; the trigger stays keyboard focusable.
2340
+ *
2341
+ * @param props - The hover card props.
2342
+ * @returns The trigger wrapper and the anchored card when open.
2343
+ */
2344
+ export declare function HoverCard({ trigger, children, openDelay, closeDelay, placement, className, ...rest }: HoverCardProps): JSX.Element;
2345
+
2346
+ export declare type HoverCardPlacement = "top" | "bottom" | "left" | "right";
2347
+
2348
+ export declare interface HoverCardProps extends HTMLAttributes<HTMLDivElement> {
2349
+ /** Element the user hovers/focuses to reveal the card. */
2350
+ trigger: ReactNode;
2351
+ /** Card content shown while hovering/focusing the trigger or the card itself. */
2352
+ children: ReactNode;
2353
+ /** Delay in ms before opening on mouseenter/focus. Default 300. */
2354
+ openDelay?: number;
2355
+ /** Delay in ms before closing on mouseleave/blur. Default 150. */
2356
+ closeDelay?: number;
2357
+ /** Where the card is anchored relative to the trigger. Default "bottom". */
2358
+ placement?: HoverCardPlacement;
2359
+ }
2360
+
1624
2361
  export declare interface I18n {
1625
2362
  /** Currently active locale. */
1626
2363
  locale: string;
@@ -1669,6 +2406,32 @@ export declare interface I18nProviderProps {
1669
2406
  storageKey?: string | null;
1670
2407
  }
1671
2408
 
2409
+ /**
2410
+ * Renders an `<img>` with native lazy loading and a one-shot fallback.
2411
+ *
2412
+ * On the first load error the source is swapped to `fallback` (when provided),
2413
+ * guarded so a failing fallback cannot loop the `onError` handler.
2414
+ *
2415
+ * @param src - The primary image source URL.
2416
+ * @param fallback - Optional source used once when `src` fails to load.
2417
+ * @param alt - Accessible alternative text for the image.
2418
+ * @param lazy - Whether to use `loading="lazy"` (default `true`).
2419
+ * @returns The rendered image element.
2420
+ */
2421
+ declare function Image_2({ src, fallback, alt, lazy, className, onError, ...props }: ImageProps): JSX.Element;
2422
+ export { Image_2 as Image }
2423
+
2424
+ export declare interface ImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src"> {
2425
+ /** Primary image source URL. */
2426
+ src: string;
2427
+ /** Fallback source swapped in once if the primary `src` fails to load. */
2428
+ fallback?: string;
2429
+ /** Alternative text describing the image (required for accessibility). */
2430
+ alt: string;
2431
+ /** When true (default) uses native lazy loading; otherwise loads eagerly. */
2432
+ lazy?: boolean;
2433
+ }
2434
+
1672
2435
  export declare interface InMemoryFlagsOptions {
1673
2436
  initial?: Record<string, FlagValue>;
1674
2437
  }
@@ -1727,17 +2490,72 @@ export declare interface InstallPushHandlerOptions {
1727
2490
  * Install a `message` listener that activates a waiting worker when the host
1728
2491
  * app sends `{ type: "SKIP_WAITING" }`.
1729
2492
  */
1730
- export declare function installSkipWaitingListener(): void;
1731
-
1732
- export declare type InterpolationValues = Record<string, string | number>;
2493
+ export declare function installSkipWaitingListener(): void;
2494
+
2495
+ export declare type InterpolationValues = Record<string, string | number>;
2496
+
2497
+ /**
2498
+ * Type guard asserting a value is neither `null` nor `undefined`.
2499
+ *
2500
+ * Useful for narrowing in `Array.prototype.filter` to drop nullish entries
2501
+ * while preserving the element type.
2502
+ *
2503
+ * @example
2504
+ * const xs: (number | null)[] = [1, null, 2];
2505
+ * const clean: number[] = xs.filter(isDefined); // [1, 2]
2506
+ */
2507
+ export declare function isDefined<T>(value: T | null | undefined): value is T;
2508
+
2509
+ /**
2510
+ * Check whether a value is considered "empty".
2511
+ *
2512
+ * Returns `true` for `null`, `undefined`, empty strings, empty arrays, empty
2513
+ * plain objects, and empty `Map`/`Set` instances. Returns `false` for numbers
2514
+ * (including `0` and `NaN`), booleans, and dates, which are never empty.
2515
+ *
2516
+ * @example
2517
+ * isEmpty(null); // true
2518
+ * isEmpty(""); // true
2519
+ * isEmpty([]); // true
2520
+ * isEmpty({}); // true
2521
+ * isEmpty(new Map()); // true
2522
+ * isEmpty(0); // false
2523
+ * isEmpty(false); // false
2524
+ * isEmpty(new Date()); // false
2525
+ */
2526
+ export declare function isEmpty(value: unknown): boolean;
2527
+
2528
+ /**
2529
+ * Return true when the JWT's `exp` claim is in the past (or missing).
2530
+ *
2531
+ * @param token - JWT to inspect.
2532
+ * @param leewaySeconds - Treat tokens expiring within this window as expired.
2533
+ */
2534
+ export declare function isJWTExpired(token: string, leewaySeconds?: number): boolean;
2535
+
2536
+ /**
2537
+ * Type guard asserting a value is a number, excluding `NaN`.
2538
+ *
2539
+ * @example
2540
+ * isNumber(42); // true
2541
+ * isNumber(NaN); // false
2542
+ * isNumber("42"); // false
2543
+ */
2544
+ export declare function isNumber(value: unknown): value is number;
1733
2545
 
1734
2546
  /**
1735
- * Return true when the JWT's `exp` claim is in the past (or missing).
2547
+ * Type guard asserting a value is a plain object literal.
1736
2548
  *
1737
- * @param token - JWT to inspect.
1738
- * @param leewaySeconds - Treat tokens expiring within this window as expired.
2549
+ * Returns `false` for arrays, `null`, dates, maps, sets, and class instances —
2550
+ * only objects created from `{}` / `Object.create(null)` / object literals pass.
2551
+ *
2552
+ * @example
2553
+ * isPlainObject({ a: 1 }); // true
2554
+ * isPlainObject([]); // false
2555
+ * isPlainObject(null); // false
2556
+ * isPlainObject(new Date()); // false
1739
2557
  */
1740
- export declare function isJWTExpired(token: string, leewaySeconds?: number): boolean;
2558
+ export declare function isPlainObject(value: unknown): value is Record<string, unknown>;
1741
2559
 
1742
2560
  /**
1743
2561
  * Convenience check for environments where the Push API is unavailable
@@ -1748,6 +2566,15 @@ export declare function isPushSupported(): boolean;
1748
2566
  /** True when the Web Share API is available in this environment. */
1749
2567
  export declare function isShareSupported(): boolean;
1750
2568
 
2569
+ /**
2570
+ * Type guard asserting a value is a string primitive.
2571
+ *
2572
+ * @example
2573
+ * isString("hi"); // true
2574
+ * isString(42); // false
2575
+ */
2576
+ export declare function isString(value: unknown): value is string;
2577
+
1751
2578
  /**
1752
2579
  * Renders a `<kbd>` styled like a keyboard key — useful for shortcut hints.
1753
2580
  * Compose multiple keys by rendering siblings: `<Kbd>Ctrl</Kbd> + <Kbd>K</Kbd>`.
@@ -1760,6 +2587,19 @@ export declare interface KbdProps extends HTMLAttributes<HTMLElement> {
1760
2587
 
1761
2588
  export declare type KbdSize = "sm" | "md" | "lg";
1762
2589
 
2590
+ /**
2591
+ * Convert `value` to `kebab-case`.
2592
+ *
2593
+ * Splits camelCase boundaries and non-alphanumeric runs, then joins with `-`
2594
+ * and lowercases.
2595
+ *
2596
+ * @example
2597
+ * kebabCase("helloWorld"); // "hello-world"
2598
+ * kebabCase("foo_bar baz"); // "foo-bar-baz"
2599
+ * kebabCase("APIResponse"); // "api-response"
2600
+ */
2601
+ export declare function kebabCase(value: string): string;
2602
+
1763
2603
  export declare interface KeyboardShortcut {
1764
2604
  /** Key name (`"k"`, `"Enter"`, `"Escape"`, `"ArrowDown"`, etc.). Case-insensitive. */
1765
2605
  key: string;
@@ -1773,6 +2613,20 @@ export declare interface KeyboardShortcut {
1773
2613
 
1774
2614
  declare type KeyBuilder = (...args: any[]) => readonly unknown[];
1775
2615
 
2616
+ /**
2617
+ * A form `<label>`. Associate it with a control via `htmlFor`. When `required`
2618
+ * is set, a decorative asterisk (`aria-hidden`) is appended.
2619
+ *
2620
+ * @param props - {@link LabelProps}.
2621
+ * @returns The label element.
2622
+ */
2623
+ export declare const Label: ForwardRefExoticComponent<LabelProps & RefAttributes<HTMLLabelElement>>;
2624
+
2625
+ export declare interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
2626
+ /** When `true` appends a danger-colored asterisk marking the field as required. */
2627
+ required?: boolean;
2628
+ }
2629
+
1776
2630
  declare interface LayoutProps {
1777
2631
  /** Field arrangement. `stack` stacks fields vertically, `inline` lines them up in a wrapping row, `grid` arranges them in `columns` equal-width tracks. Default `stack`. */
1778
2632
  layout?: FormLayout;
@@ -1818,6 +2672,8 @@ export declare interface LDClientLike {
1818
2672
  off?: (event: string, handler: () => void) => void;
1819
2673
  }
1820
2674
 
2675
+ export { Link }
2676
+
1821
2677
  export declare interface ListOptions<TItem> {
1822
2678
  /** Property to order by. Default: `keyPath`. */
1823
2679
  orderBy?: keyof TItem & string;
@@ -1858,6 +2714,72 @@ export declare interface LoggerSink {
1858
2714
 
1859
2715
  export declare type LogLevel = "debug" | "info" | "warn" | "error";
1860
2716
 
2717
+ /**
2718
+ * Memoize only the most recent call of `fn`, keyed by shallow-equal arguments.
2719
+ *
2720
+ * If the next call has the same arguments (compared with `Object.is` per
2721
+ * position and equal length), the cached result is returned without re-running
2722
+ * `fn`. Any different argument list recomputes and replaces the cache.
2723
+ *
2724
+ * @example
2725
+ * const select = memoizeOne((a: number, b: number) => a + b);
2726
+ * select(1, 2); // computes 3
2727
+ * select(1, 2); // cached 3
2728
+ * select(2, 2); // recomputes 4
2729
+ */
2730
+ export declare function memoizeOne<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R;
2731
+
2732
+ export { MemoryRouter }
2733
+
2734
+ /**
2735
+ * Application menubar (File / Edit-style).
2736
+ *
2737
+ * - `role="menubar"`; each menu is a button that opens a dropdown.
2738
+ * - Arrow Left/Right moves between menus (wrapping); opening one closes others.
2739
+ * - Closes on outside click, Escape, or selecting an item.
2740
+ * - Items may carry a `shortcut` (right-aligned) or be a `{ separator: true }`.
2741
+ *
2742
+ * @example
2743
+ * <Menubar
2744
+ * menus={[
2745
+ * {
2746
+ * label: "File",
2747
+ * items: [
2748
+ * { label: "New", shortcut: "⌘N", onSelect: () => create() },
2749
+ * { separator: true },
2750
+ * { label: "Quit", onSelect: () => quit() },
2751
+ * ],
2752
+ * },
2753
+ * ]}
2754
+ * />
2755
+ */
2756
+ export declare function Menubar({ menus, className, ...props }: MenubarProps): JSX.Element;
2757
+
2758
+ export declare type MenubarItem = {
2759
+ /** Visible label for the action. */
2760
+ label: ReactNode;
2761
+ /** Invoked when the action is selected. */
2762
+ onSelect?: () => void;
2763
+ /** Disable the action. */
2764
+ disabled?: boolean;
2765
+ /** Optional shortcut hint rendered right-aligned (e.g. `"⌘S"`). */
2766
+ shortcut?: string;
2767
+ } | {
2768
+ separator: true;
2769
+ };
2770
+
2771
+ export declare interface MenubarMenu {
2772
+ /** Top-level menu label (e.g. `"File"`). */
2773
+ label: ReactNode;
2774
+ /** Items shown in the menu's dropdown. */
2775
+ items: MenubarItem[];
2776
+ }
2777
+
2778
+ export declare interface MenubarProps extends HTMLAttributes<HTMLDivElement> {
2779
+ /** Top-level menus rendered left-to-right. */
2780
+ menus: MenubarMenu[];
2781
+ }
2782
+
1861
2783
  export declare type Messages = Record<string, string>;
1862
2784
 
1863
2785
  /**
@@ -1885,6 +2807,18 @@ export declare interface ModalProps {
1885
2807
 
1886
2808
  export declare type ModalSize = "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
1887
2809
 
2810
+ /**
2811
+ * Render a monetary amount given in cents as a localized currency string
2812
+ * inside a `<span>`.
2813
+ *
2814
+ * The integer cents are divided by 100 and formatted with `Intl.NumberFormat`.
2815
+ *
2816
+ * @example
2817
+ * <Money cents={1990} /> // "R$ 19,90"
2818
+ * <Money cents={500} currency="USD" locale="en-US" /> // "$5.00"
2819
+ */
2820
+ export declare function Money({ cents, currency, locale, ...props }: MoneyProps): JSX.Element;
2821
+
1888
2822
  /**
1889
2823
  * Currency-masked input. Stores the value as an integer number of cents to
1890
2824
  * avoid floating-point error. Suitable for `react-hook-form` once you adapt
@@ -1902,6 +2836,15 @@ export declare interface MoneyInputProps extends Omit<InputProps, "value" | "onC
1902
2836
  locale?: string;
1903
2837
  }
1904
2838
 
2839
+ export declare interface MoneyProps extends HTMLAttributes<HTMLSpanElement> {
2840
+ /** Amount in the smallest currency unit (e.g. cents). */
2841
+ cents: number;
2842
+ /** ISO 4217 currency code. Defaults to "BRL". */
2843
+ currency?: string;
2844
+ /** BCP 47 locale used for formatting. Defaults to "pt-BR". */
2845
+ locale?: string;
2846
+ }
2847
+
1905
2848
  /**
1906
2849
  * Top app bar. Three-slot layout (logo / nav / actions) that collapses
1907
2850
  * gracefully on mobile (nav slot wraps below).
@@ -1932,6 +2875,52 @@ export declare interface NavbarProps extends HTMLAttributes<HTMLElement> {
1932
2875
 
1933
2876
  export declare type NavbarTone = "surface" | "primary" | "transparent";
1934
2877
 
2878
+ export { Navigate }
2879
+
2880
+ export { NavigateOptions }
2881
+
2882
+ /**
2883
+ * Horizontal navigation menu with hover/click/focus dropdown submenus.
2884
+ *
2885
+ * - Top-level items render in a `<nav><ul>`.
2886
+ * - Items with `children` open a submenu panel (`role="menu"`) on hover, focus,
2887
+ * or click. Only one panel is open at a time.
2888
+ * - Closes on outside click, Escape, or selecting a leaf entry.
2889
+ *
2890
+ * @example
2891
+ * <NavigationMenu
2892
+ * items={[
2893
+ * { label: "Home", href: "/" },
2894
+ * {
2895
+ * label: "Products",
2896
+ * children: [
2897
+ * { label: "Analytics", href: "/analytics" },
2898
+ * { label: "Billing", onSelect: () => openBilling() },
2899
+ * ],
2900
+ * },
2901
+ * ]}
2902
+ * />
2903
+ */
2904
+ export declare function NavigationMenu({ items, className, ...props }: NavigationMenuProps): JSX.Element;
2905
+
2906
+ export declare interface NavigationMenuItem {
2907
+ /** Visible label for the entry. */
2908
+ label: ReactNode;
2909
+ /** When set, the entry renders as an anchor. */
2910
+ href?: string;
2911
+ /** Invoked when the entry is activated (click / Enter). */
2912
+ onSelect?: () => void;
2913
+ /** Nested entries — presence turns the item into a submenu trigger. */
2914
+ children?: NavigationMenuItem[];
2915
+ }
2916
+
2917
+ export declare interface NavigationMenuProps extends HTMLAttributes<HTMLElement> {
2918
+ /** Top-level navigation entries. */
2919
+ items: NavigationMenuItem[];
2920
+ }
2921
+
2922
+ export { NavLink }
2923
+
1935
2924
  export declare interface OAuthCredential {
1936
2925
  /** Provider-issued ID token (JWT). */
1937
2926
  idToken: string;
@@ -2000,6 +2989,29 @@ export declare interface OfflineStoreConfig<TItem> {
2000
2989
  ownerField?: keyof TItem & string;
2001
2990
  }
2002
2991
 
2992
+ /**
2993
+ * Create a new object with the given `keys` removed from `obj`.
2994
+ *
2995
+ * The input is never mutated.
2996
+ *
2997
+ * @example
2998
+ * omit({ id: 1, name: "Ana", age: 30 }, ["age"]);
2999
+ * // { id: 1, name: "Ana" }
3000
+ */
3001
+ export declare function omit<T extends object, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
3002
+
3003
+ /**
3004
+ * Wrap `fn` so it runs at most once; subsequent calls return the cached result.
3005
+ *
3006
+ * @example
3007
+ * const init = once(() => expensiveSetup());
3008
+ * init(); // runs expensiveSetup()
3009
+ * init(); // returns the same cached result, no re-run
3010
+ */
3011
+ export declare function once<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R;
3012
+
3013
+ export { Outlet }
3014
+
2003
3015
  /**
2004
3016
  * Page wrapper with header + (optional) toolbar + content + footer. Pairs
2005
3017
  * with `Container` when you want a max-width content well.
@@ -2048,6 +3060,8 @@ export declare interface PaginationProps {
2048
3060
  className?: string;
2049
3061
  }
2050
3062
 
3063
+ export { Params }
3064
+
2051
3065
  /**
2052
3066
  * Validate an unknown response payload against a zod schema.
2053
3067
  *
@@ -2100,6 +3114,17 @@ value: string;
2100
3114
  onChange: (value: string) => void;
2101
3115
  } & RefAttributes<HTMLInputElement>>;
2102
3116
 
3117
+ /**
3118
+ * Create a new object containing only the given `keys` from `obj`.
3119
+ *
3120
+ * Missing keys are skipped. The input is never mutated.
3121
+ *
3122
+ * @example
3123
+ * pick({ id: 1, name: "Ana", age: 30 }, ["id", "name"]);
3124
+ * // { id: 1, name: "Ana" }
3125
+ */
3126
+ export declare function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
3127
+
2103
3128
  /**
2104
3129
  * One-time-password style input — N independent cells, paste support, auto-
2105
3130
  * advance on input, backspace flows back, arrow keys navigate.
@@ -2167,6 +3192,19 @@ export declare interface PlayAudioOptions {
2167
3192
  onError?: (error: unknown) => void;
2168
3193
  }
2169
3194
 
3195
+ /**
3196
+ * Pick the singular or plural form of a word based on `count`.
3197
+ *
3198
+ * Returns only the word (never the count). When `plural` is omitted it defaults
3199
+ * to `singular + "s"`.
3200
+ *
3201
+ * @example
3202
+ * pluralize(1, "item"); // "item"
3203
+ * pluralize(3, "item"); // "items"
3204
+ * pluralize(2, "person", "people"); // "people"
3205
+ */
3206
+ export declare function pluralize(count: number, singular: string, plural?: string): string;
3207
+
2170
3208
  /**
2171
3209
  * Lightweight popover. Renders a positioned panel anchored to a trigger,
2172
3210
  * dismissed on outside click / Escape. Does NOT include collision detection
@@ -2198,6 +3236,28 @@ export declare interface PopoverProps {
2198
3236
  className?: string;
2199
3237
  }
2200
3238
 
3239
+ /**
3240
+ * Renders its children into a different part of the DOM tree via a React portal.
3241
+ *
3242
+ * Useful for overlays (modals, tooltips, dropdowns) that must escape parent
3243
+ * overflow/stacking contexts. Defaults to `document.body` when no `container`
3244
+ * is provided.
3245
+ *
3246
+ * SSR-safe: renders `null` on the server and on the first client render, then
3247
+ * mounts the portal after hydration (when `document` is available).
3248
+ *
3249
+ * @param props - The portal props.
3250
+ * @returns The portal node once mounted, otherwise `null`.
3251
+ */
3252
+ export declare function Portal({ children, container }: PortalProps): ReactNode;
3253
+
3254
+ export declare interface PortalProps {
3255
+ /** Content rendered through the portal. */
3256
+ children: ReactNode;
3257
+ /** Target DOM node to render into. Defaults to `document.body`. */
3258
+ container?: Element | null;
3259
+ }
3260
+
2201
3261
  /**
2202
3262
  * Minimal subset of `posthog-js` used by the adapter. Pass either the real
2203
3263
  * default export (`import posthog from "posthog-js"`) or a stubbed object
@@ -2304,6 +3364,39 @@ export declare interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputEl
2304
3364
  wrapperClassName?: string;
2305
3365
  }
2306
3366
 
3367
+ /**
3368
+ * Generate a collision-resistant id suitable for client-side UI keys.
3369
+ *
3370
+ * Uses `crypto.randomUUID()` when available, falling back to a
3371
+ * timestamp + `Math.random()` combination otherwise. When `prefix` is given,
3372
+ * the result is formatted as `${prefix}-${id}`.
3373
+ *
3374
+ * @example
3375
+ * randomId(); // "9f1c2b3a-..." (uuid) or "lq3f8k-4a9z1" (fallback)
3376
+ * randomId("user"); // "user-9f1c2b3a-..."
3377
+ */
3378
+ export declare function randomId(prefix?: string): string;
3379
+
3380
+ /**
3381
+ * Build a numeric range from `start` (inclusive) to `end` (exclusive).
3382
+ *
3383
+ * - `step` defaults to `1` and may be negative for descending ranges.
3384
+ * - Returns an empty array when no progress can be made toward `end`
3385
+ * (wrong-direction step, zero step, or `start === end`).
3386
+ *
3387
+ * @param start - First value of the range.
3388
+ * @param end - Exclusive upper (or lower, for negative step) bound.
3389
+ * @param step - Increment between values; defaults to `1`.
3390
+ *
3391
+ * @example
3392
+ * range(0, 5); // [0, 1, 2, 3, 4]
3393
+ * range(0, 10, 2); // [0, 2, 4, 6, 8]
3394
+ * range(5, 0, -1); // [5, 4, 3, 2, 1]
3395
+ * range(0, 5, -1); // [] (wrong direction)
3396
+ * range(3, 3); // []
3397
+ */
3398
+ export declare function range(start: number, end: number, step?: number): number[];
3399
+
2307
3400
  /**
2308
3401
  * Dual-thumb range slider. Built on two native `<input type="range">` so it
2309
3402
  * stays accessible and works with keyboards/screen readers without
@@ -2349,6 +3442,8 @@ export declare interface RatingStarsProps {
2349
3442
  className?: string;
2350
3443
  }
2351
3444
 
3445
+ export { redirect }
3446
+
2352
3447
  /** Recommended refetch intervals (milliseconds). */
2353
3448
  export declare const REFETCH_TIME: {
2354
3449
  readonly REALTIME: number;
@@ -2385,6 +3480,18 @@ export declare interface RegisterServiceWorkerOptions {
2385
3480
  onError?: (error: unknown) => void;
2386
3481
  }
2387
3482
 
3483
+ /**
3484
+ * Render a date as a human-friendly relative-time string (e.g. "5 min atrás")
3485
+ * inside a semantic `<time>` element with a machine-readable `dateTime`.
3486
+ *
3487
+ * Delegates the wording to the `relativeTime` util; "pt" maps to its "pt-BR"
3488
+ * locale.
3489
+ *
3490
+ * @example
3491
+ * <RelativeTime date={post.createdAt} locale="en" />
3492
+ */
3493
+ export declare function RelativeTime({ date, locale, ...props }: RelativeTimeProps): JSX.Element;
3494
+
2388
3495
  /**
2389
3496
  * Render a `Date` / ISO string as a relative-time string. Supports past and
2390
3497
  * future, PT-BR (default) and English.
@@ -2400,11 +3507,42 @@ export declare function relativeTime(input: Date | string | number, options?: {
2400
3507
 
2401
3508
  export declare type RelativeTimeLocale = "pt-BR" | "en";
2402
3509
 
3510
+ export declare interface RelativeTimeProps extends HTMLAttributes<HTMLTimeElement> {
3511
+ /** The instant to render relative to now. */
3512
+ date: Date | string | number;
3513
+ /** Output language. Defaults to "pt". */
3514
+ locale?: "pt" | "en";
3515
+ }
3516
+
2403
3517
  export declare interface RequestOptions extends Omit<RequestInit, "body"> {
2404
3518
  body?: unknown;
2405
3519
  params?: Record<string, string | number | boolean | undefined | null>;
2406
3520
  }
2407
3521
 
3522
+ /**
3523
+ * A two-pane split layout with a draggable divider. The first pane is sized via
3524
+ * `flex-basis` as a percentage; the second pane fills the rest. Drag the divider
3525
+ * with a pointer, or focus it and use the arrow keys to adjust by 2% steps.
3526
+ *
3527
+ * The size is clamped to `[min, max]` at all times.
3528
+ */
3529
+ export declare function Resizable({ direction, defaultSize, min, max, children, className, ...props }: ResizableProps): JSX.Element;
3530
+
3531
+ export declare type ResizableDirection = "horizontal" | "vertical";
3532
+
3533
+ export declare interface ResizableProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
3534
+ /** Split orientation. `horizontal` (default) places panes side by side. */
3535
+ direction?: ResizableDirection;
3536
+ /** Initial size of the first pane, as a percentage. Defaults to `50`. */
3537
+ defaultSize?: number;
3538
+ /** Lower clamp for the first pane size, in percent. Defaults to `10`. */
3539
+ min?: number;
3540
+ /** Upper clamp for the first pane size, in percent. Defaults to `90`. */
3541
+ max?: number;
3542
+ /** Exactly two panes — `[paneA, paneB]`. */
3543
+ children: [ReactNode, ReactNode];
3544
+ }
3545
+
2408
3546
  export declare type ResolvedTheme = "light" | "dark";
2409
3547
 
2410
3548
  declare type Resolver<T> = (values: unknown, context: unknown, options: {
@@ -2464,6 +3602,39 @@ export declare interface RetryOptions {
2464
3602
  signal?: AbortSignal;
2465
3603
  }
2466
3604
 
3605
+ export { Route }
3606
+
3607
+ /**
3608
+ * Declarative route guard built on React Router's `<Navigate>`. Renders its
3609
+ * children when `when` is truthy, otherwise redirects. Pairs naturally with
3610
+ * `createAuthStore` for protected areas.
3611
+ *
3612
+ * @example
3613
+ * <RouteGuard when={useAuthStore((s) => s.isAuthenticated)} redirectTo="/login">
3614
+ * <Outlet />
3615
+ * </RouteGuard>
3616
+ */
3617
+ export declare function RouteGuard({ when, redirectTo, replace, children }: RouteGuardProps): JSX.Element;
3618
+
3619
+ export declare interface RouteGuardProps {
3620
+ /**
3621
+ * Whether access is allowed. Pass a boolean or anything truthy/falsy —
3622
+ * typically `useAuthStore((s) => s.isAuthenticated)`.
3623
+ */
3624
+ when: boolean;
3625
+ /** Where to redirect when `when` is falsy (default: `"/"`). */
3626
+ redirectTo?: string;
3627
+ /** Replace history entry on redirect instead of pushing (default: true). */
3628
+ replace?: boolean;
3629
+ /** Protected content, usually `<Outlet />` for a guarded layout route. */
3630
+ children: ReactNode;
3631
+ }
3632
+
3633
+ /** Router history strategy used by {@link AppRouter}. */
3634
+ export declare type RouterKind = "browser" | "hash" | "memory";
3635
+
3636
+ export { Routes }
3637
+
2467
3638
  /**
2468
3639
  * Apply `env(safe-area-inset-*)` padding so content avoids iOS notch /
2469
3640
  * Android navbar / device chrome. Wrap the outermost container of pages
@@ -2486,6 +3657,23 @@ export declare interface SafeAreaProps extends HTMLAttributes<HTMLDivElement> {
2486
3657
  children?: ReactNode;
2487
3658
  }
2488
3659
 
3660
+ /**
3661
+ * A styled scroll container that overflows on the chosen axis and renders a
3662
+ * thin custom scrollbar (WebKit) while staying fully functional in browsers
3663
+ * without scrollbar styling. Forwards `className`, `style` and the ref to the
3664
+ * underlying `<div>`.
3665
+ */
3666
+ export declare const ScrollArea: ForwardRefExoticComponent<ScrollAreaProps & RefAttributes<HTMLDivElement>>;
3667
+
3668
+ export declare type ScrollAreaOrientation = "vertical" | "horizontal" | "both";
3669
+
3670
+ export declare interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {
3671
+ /** Caps the container height; numbers are treated as pixels. */
3672
+ maxHeight?: number | string;
3673
+ /** Which axis scrolls. Default `"vertical"`. */
3674
+ orientation?: ScrollAreaOrientation;
3675
+ }
3676
+
2489
3677
  /**
2490
3678
  * Search input with magnifier icon and a clear button. Controlled component:
2491
3679
  * pass `value` and `onChange`.
@@ -2688,6 +3876,14 @@ export declare interface SkeletonProps {
2688
3876
  */
2689
3877
  export declare function skipWaiting(worker: ServiceWorker): void;
2690
3878
 
3879
+ /**
3880
+ * Resolve after `ms` milliseconds.
3881
+ *
3882
+ * @example
3883
+ * await sleep(500); // pauses for half a second
3884
+ */
3885
+ export declare function sleep(ms: number): Promise<void>;
3886
+
2691
3887
  /**
2692
3888
  * Convert a string into a URL-safe slug.
2693
3889
  *
@@ -2701,6 +3897,8 @@ export declare function skipWaiting(worker: ServiceWorker): void;
2701
3897
  */
2702
3898
  export declare function slugify(input: string): string;
2703
3899
 
3900
+ export declare type SortDirection = "asc" | "desc";
3901
+
2704
3902
  /**
2705
3903
  * Flex spacer — pushes siblings apart inside a flex container. Equivalent
2706
3904
  * to `<div style={{ flex: 1 }}>` but typed and intent-revealing.
@@ -2994,6 +4192,38 @@ export declare interface TelemetryUser {
2994
4192
  traits?: Record<string, unknown>;
2995
4193
  }
2996
4194
 
4195
+ /**
4196
+ * A single declarative route node. Mirrors React Router's nested `<Route>`
4197
+ * model but adds first-class `lazy` (code-split with retry) and `guard`
4198
+ * (redirect when a predicate fails) so apps describe their route tree as data.
4199
+ */
4200
+ export declare interface TempestRouteObject {
4201
+ /** URL segment, e.g. `"dashboard"` or `":id"`. Omit for an index route. */
4202
+ path?: string;
4203
+ /** Marks this as the index route of its parent. Mutually exclusive with `path`. */
4204
+ index?: boolean;
4205
+ /** Element rendered for this route. Ignored when `lazy` is provided. */
4206
+ element?: ReactNode;
4207
+ /**
4208
+ * Code-split component loader. Wrapped with `lazyWithRetry` and rendered
4209
+ * under the {@link AppRouter} `<Suspense>` boundary.
4210
+ */
4211
+ lazy?: () => Promise<{
4212
+ default: ComponentType<unknown>;
4213
+ }>;
4214
+ /** Nested child routes (rendered through this route's `<Outlet />`). */
4215
+ children?: TempestRouteObject[];
4216
+ /**
4217
+ * Access guard. When `false` (or a function returning `false`), the route
4218
+ * renders a redirect to {@link redirectTo} instead of its element.
4219
+ */
4220
+ guard?: boolean | (() => boolean);
4221
+ /** Destination used when `guard` fails (default: `"/"`). */
4222
+ redirectTo?: string;
4223
+ /** Match the path case-sensitively. */
4224
+ caseSensitive?: boolean;
4225
+ }
4226
+
2997
4227
  /**
2998
4228
  * Multi-line text input. Mirrors the {@link Input} API for label/helper/error.
2999
4229
  */
@@ -3054,6 +4284,23 @@ export declare interface ThemeProviderProps {
3054
4284
  attribute?: string;
3055
4285
  }
3056
4286
 
4287
+ /**
4288
+ * Create a throttled version of `fn` with leading and trailing edges.
4289
+ *
4290
+ * `fn` runs immediately on the first call (leading edge), then at most once
4291
+ * per `wait` milliseconds. If calls happen during the wait window, the last
4292
+ * one fires on the trailing edge. Call `.cancel()` to drop any pending
4293
+ * trailing call and reset the window.
4294
+ *
4295
+ * @example
4296
+ * const onScroll = throttle(() => render(), 200);
4297
+ * window.addEventListener("scroll", onScroll);
4298
+ * onScroll.cancel();
4299
+ */
4300
+ export declare function throttle<A extends unknown[]>(fn: (...args: A) => void, wait: number): ((...args: A) => void) & {
4301
+ cancel: () => void;
4302
+ };
4303
+
3057
4304
  /**
3058
4305
  * Vertical event timeline — activity feeds, order trackers, audit logs.
3059
4306
  * Each entry has a marker (color or custom icon), title, optional
@@ -3091,6 +4338,8 @@ export declare interface TimelineProps extends HTMLAttributes<HTMLOListElement>
3091
4338
  connector?: boolean;
3092
4339
  }
3093
4340
 
4341
+ export { To }
4342
+
3094
4343
  export declare interface ToastApi {
3095
4344
  show: (options: ToastOptions) => string;
3096
4345
  dismiss: (id: string) => void;
@@ -3126,6 +4375,61 @@ export declare interface ToastProviderProps {
3126
4375
 
3127
4376
  export declare type ToastVariant = "success" | "warning" | "error" | "info";
3128
4377
 
4378
+ /**
4379
+ * A pressable two-state button — like a checkbox styled as a button.
4380
+ *
4381
+ * Works controlled (pass `pressed` + `onPressedChange`) or uncontrolled
4382
+ * (pass `defaultPressed`). Renders a native `<button type="button">` exposing
4383
+ * its state through `aria-pressed`.
4384
+ *
4385
+ * @param props - {@link ToggleProps}.
4386
+ * @returns The toggle button element.
4387
+ */
4388
+ export declare const Toggle: ForwardRefExoticComponent<ToggleProps & RefAttributes<HTMLButtonElement>>;
4389
+
4390
+ /**
4391
+ * A set of {@link ToggleGroupItem}s that share selection state via context.
4392
+ *
4393
+ * In `single` mode the value is a `string` (empty string when nothing is
4394
+ * selected); in `multiple` mode it is a `string[]`. Works controlled (pass
4395
+ * `value` + `onValueChange`) or uncontrolled (pass `defaultValue`).
4396
+ *
4397
+ * @param props - {@link ToggleGroupProps}.
4398
+ * @returns A `role="group"` container wrapping the items.
4399
+ */
4400
+ export declare function ToggleGroup({ type, value, defaultValue, onValueChange, className, children, ...props }: ToggleGroupProps): JSX.Element;
4401
+
4402
+ /**
4403
+ * A single selectable item inside a {@link ToggleGroup}. Reads and updates the
4404
+ * group's shared state through context.
4405
+ *
4406
+ * @param props - {@link ToggleGroupItemProps}.
4407
+ * @returns A `role="button"` element exposing its state via `aria-pressed`.
4408
+ */
4409
+ export declare function ToggleGroupItem({ value, disabled, className, children, ...props }: ToggleGroupItemProps): JSX.Element;
4410
+
4411
+ export declare interface ToggleGroupItemProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onClick"> {
4412
+ /** Stable value identifying this item within the group. */
4413
+ value: string;
4414
+ /** Disables the item. */
4415
+ disabled?: boolean;
4416
+ children: ReactNode;
4417
+ }
4418
+
4419
+ export declare interface ToggleGroupProps extends HTMLAttributes<HTMLDivElement> {
4420
+ /** Selection mode. `"single"` keeps one value; `"multiple"` keeps a set. Default `"single"`. */
4421
+ type?: ToggleGroupType;
4422
+ /** Controlled value — `string` for `single`, `string[]` for `multiple`. */
4423
+ value?: string | string[];
4424
+ /** Uncontrolled initial value. */
4425
+ defaultValue?: string | string[];
4426
+ /** Fired with the next value whenever the selection changes. */
4427
+ onValueChange?: (value: string | string[]) => void;
4428
+ children: ReactNode;
4429
+ }
4430
+
4431
+ export declare type ToggleGroupType = "single" | "multiple";
4432
+
3129
4433
  export declare interface ToggleHelpers {
3130
4434
  toggle: () => void;
3131
4435
  setTrue: () => void;
@@ -3133,6 +4437,23 @@ export declare interface ToggleHelpers {
3133
4437
  set: (next: boolean) => void;
3134
4438
  }
3135
4439
 
4440
+ export declare interface ToggleProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
4441
+ /** Controlled pressed state. When provided the component is controlled. */
4442
+ pressed?: boolean;
4443
+ /** Initial pressed state for the uncontrolled variant. Default `false`. */
4444
+ defaultPressed?: boolean;
4445
+ /** Fired with the next pressed state whenever the toggle is activated. */
4446
+ onPressedChange?: (pressed: boolean) => void;
4447
+ /** Visual size. Default `"md"`. */
4448
+ size?: ToggleSize;
4449
+ /** Visual style. Default `"default"`. */
4450
+ variant?: ToggleVariant;
4451
+ }
4452
+
4453
+ export declare type ToggleSize = "sm" | "md" | "lg";
4454
+
4455
+ export declare type ToggleVariant = "default" | "outline";
4456
+
3136
4457
  /**
3137
4458
  * Lightweight tooltip. Shows on hover and on focus (keyboard-friendly). Wraps
3138
4459
  * a single child element via `cloneElement`, so the trigger keeps its own ref
@@ -3165,6 +4486,40 @@ export declare interface TooltipProps {
3165
4486
  */
3166
4487
  export declare function truncate(input: string, max: number, suffix?: string): string;
3167
4488
 
4489
+ /**
4490
+ * Clamp text to a fixed number of lines using a CSS line-clamp, adding an
4491
+ * ellipsis on overflow. The line count is driven by the
4492
+ * `--tempest-clamp-lines` custom property.
4493
+ *
4494
+ * @example
4495
+ * <TruncateText lines={2}>{longDescription}</TruncateText>
4496
+ */
4497
+ export declare function TruncateText({ lines, className, style, children, ...props }: TruncateTextProps): JSX.Element;
4498
+
4499
+ export declare interface TruncateTextProps extends HTMLAttributes<HTMLDivElement> {
4500
+ /** Maximum number of lines to show before clamping. Defaults to 1. */
4501
+ lines?: number;
4502
+ /** Content to clamp. */
4503
+ children: ReactNode;
4504
+ }
4505
+
4506
+ /**
4507
+ * Remove duplicate items, keeping the first occurrence of each distinct key.
4508
+ *
4509
+ * Equality is determined by the value returned from `key` (compared with `===`).
4510
+ *
4511
+ * @example
4512
+ * uniqueBy([1, 2, 2, 3, 1], (n) => n); // [1, 2, 3]
4513
+ *
4514
+ * @example
4515
+ * uniqueBy(
4516
+ * [{ id: 1, v: "a" }, { id: 1, v: "b" }, { id: 2, v: "c" }],
4517
+ * (u) => u.id,
4518
+ * );
4519
+ * // [{ id: 1, v: "a" }, { id: 2, v: "c" }]
4520
+ */
4521
+ export declare function uniqueBy<T>(items: T[], key: (item: T) => unknown): T[];
4522
+
3168
4523
  /** Strip any masking and return only digits. */
3169
4524
  export declare function unmask(value: string): string;
3170
4525
 
@@ -3523,6 +4878,8 @@ export declare interface UseKeyboardShortcutOptions {
3523
4878
  */
3524
4879
  export declare function useLocalStorage<T>(key: string, defaultValue: T, options?: LocalStorageOptions<T>): [T, (value: T | ((prev: T) => T)) => void, () => void];
3525
4880
 
4881
+ export { useLocation }
4882
+
3526
4883
  /**
3527
4884
  * Detect long-press / long-tap gestures. Fires `fn` after `delay` ms
3528
4885
  * while the element is held. Cancels on move beyond `moveThreshold` or
@@ -3541,6 +4898,8 @@ export declare interface UseLongPressOptions {
3541
4898
  moveThreshold?: number;
3542
4899
  }
3543
4900
 
4901
+ export { useMatch }
4902
+
3544
4903
  /**
3545
4904
  * Subscribe to a CSS media query and re-render on match changes.
3546
4905
  *
@@ -3549,6 +4908,8 @@ export declare interface UseLongPressOptions {
3549
4908
  */
3550
4909
  export declare function useMediaQuery(query: string): boolean;
3551
4910
 
4911
+ export { useNavigate }
4912
+
3552
4913
  /**
3553
4914
  * Run an OAuth-callback "exchange" exactly once on mount. Designed for
3554
4915
  * `/callback` routes that receive provider redirects and need to swap a
@@ -3622,6 +4983,8 @@ export declare interface UsePaginationResult {
3622
4983
  reset: () => void;
3623
4984
  }
3624
4985
 
4986
+ export { useParams }
4987
+
3625
4988
  /**
3626
4989
  * Poll an async factory on a fixed interval. Skips overlapping requests if a
3627
4990
  * prior call has not finished. Pause via `disabled` or `stopWhen`.
@@ -3699,12 +5062,16 @@ export declare interface UsePushSubscriptionResult {
3699
5062
  */
3700
5063
  export declare function useResizeObserver(ref: RefObject<Element | null>): ElementSize | null;
3701
5064
 
5065
+ export { useRouteError }
5066
+
3702
5067
  /**
3703
5068
  * Lock `<body>` scroll while `active` is true. Restores the previous overflow
3704
5069
  * value on unmount. Safe to nest: stacks the restoration via a counter.
3705
5070
  */
3706
5071
  export declare function useScrollLock(active: boolean): void;
3707
5072
 
5073
+ export { useSearchParams }
5074
+
3708
5075
  /**
3709
5076
  * Returns a stable function reference that always invokes the latest
3710
5077
  * `callback` argument. Use to break dependency cycles in effects without
@@ -3901,6 +5268,301 @@ export declare interface VirtualListProps<T> {
3901
5268
  style?: CSSProperties;
3902
5269
  }
3903
5270
 
5271
+ /**
5272
+ * Render content that is hidden visually but remains available to screen
5273
+ * readers — the standard "sr-only" pattern. Useful for accessible labels on
5274
+ * icon-only controls.
5275
+ *
5276
+ * @example
5277
+ * <button><Icon /><VisuallyHidden>Close</VisuallyHidden></button>
5278
+ */
5279
+ export declare function VisuallyHidden({ as, className, children, ...props }: VisuallyHiddenProps): DOMElement< {
5280
+ defaultChecked?: boolean | undefined;
5281
+ defaultValue?: string | number | readonly string[] | undefined;
5282
+ suppressContentEditableWarning?: boolean | undefined;
5283
+ suppressHydrationWarning?: boolean | undefined;
5284
+ accessKey?: string | undefined;
5285
+ autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {});
5286
+ autoFocus?: boolean | undefined;
5287
+ contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
5288
+ contextMenu?: string | undefined;
5289
+ dir?: string | undefined;
5290
+ draggable?: (boolean | "true" | "false") | undefined;
5291
+ enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined;
5292
+ hidden?: boolean | undefined;
5293
+ id?: string | undefined;
5294
+ lang?: string | undefined;
5295
+ nonce?: string | undefined;
5296
+ slot?: string | undefined;
5297
+ spellCheck?: (boolean | "true" | "false") | undefined;
5298
+ style?: CSSProperties | undefined;
5299
+ tabIndex?: number | undefined;
5300
+ title?: string | undefined;
5301
+ translate?: "yes" | "no" | undefined;
5302
+ radioGroup?: string | undefined;
5303
+ role?: AriaRole | undefined;
5304
+ about?: string | undefined;
5305
+ content?: string | undefined;
5306
+ datatype?: string | undefined;
5307
+ inlist?: any;
5308
+ prefix?: string | undefined;
5309
+ property?: string | undefined;
5310
+ rel?: string | undefined;
5311
+ resource?: string | undefined;
5312
+ rev?: string | undefined;
5313
+ typeof?: string | undefined;
5314
+ vocab?: string | undefined;
5315
+ autoCorrect?: string | undefined;
5316
+ autoSave?: string | undefined;
5317
+ color?: string | undefined;
5318
+ itemProp?: string | undefined;
5319
+ itemScope?: boolean | undefined;
5320
+ itemType?: string | undefined;
5321
+ itemID?: string | undefined;
5322
+ itemRef?: string | undefined;
5323
+ results?: number | undefined;
5324
+ security?: string | undefined;
5325
+ unselectable?: "on" | "off" | undefined;
5326
+ popover?: "" | "auto" | "manual" | "hint" | undefined;
5327
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined;
5328
+ popoverTarget?: string | undefined;
5329
+ inert?: boolean | undefined;
5330
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
5331
+ is?: string | undefined;
5332
+ exportparts?: string | undefined;
5333
+ part?: string | undefined;
5334
+ "aria-activedescendant"?: string | undefined;
5335
+ "aria-atomic"?: (boolean | "true" | "false") | undefined;
5336
+ "aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
5337
+ "aria-braillelabel"?: string | undefined;
5338
+ "aria-brailleroledescription"?: string | undefined;
5339
+ "aria-busy"?: (boolean | "true" | "false") | undefined;
5340
+ "aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
5341
+ "aria-colcount"?: number | undefined;
5342
+ "aria-colindex"?: number | undefined;
5343
+ "aria-colindextext"?: string | undefined;
5344
+ "aria-colspan"?: number | undefined;
5345
+ "aria-controls"?: string | undefined;
5346
+ "aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
5347
+ "aria-describedby"?: string | undefined;
5348
+ "aria-description"?: string | undefined;
5349
+ "aria-details"?: string | undefined;
5350
+ "aria-disabled"?: (boolean | "true" | "false") | undefined;
5351
+ "aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
5352
+ "aria-errormessage"?: string | undefined;
5353
+ "aria-expanded"?: (boolean | "true" | "false") | undefined;
5354
+ "aria-flowto"?: string | undefined;
5355
+ "aria-grabbed"?: (boolean | "true" | "false") | undefined;
5356
+ "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
5357
+ "aria-hidden"?: (boolean | "true" | "false") | undefined;
5358
+ "aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
5359
+ "aria-keyshortcuts"?: string | undefined;
5360
+ "aria-label"?: string | undefined;
5361
+ "aria-labelledby"?: string | undefined;
5362
+ "aria-level"?: number | undefined;
5363
+ "aria-live"?: "off" | "assertive" | "polite" | undefined;
5364
+ "aria-modal"?: (boolean | "true" | "false") | undefined;
5365
+ "aria-multiline"?: (boolean | "true" | "false") | undefined;
5366
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
5367
+ "aria-orientation"?: "horizontal" | "vertical" | undefined;
5368
+ "aria-owns"?: string | undefined;
5369
+ "aria-placeholder"?: string | undefined;
5370
+ "aria-posinset"?: number | undefined;
5371
+ "aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
5372
+ "aria-readonly"?: (boolean | "true" | "false") | undefined;
5373
+ "aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
5374
+ "aria-required"?: (boolean | "true" | "false") | undefined;
5375
+ "aria-roledescription"?: string | undefined;
5376
+ "aria-rowcount"?: number | undefined;
5377
+ "aria-rowindex"?: number | undefined;
5378
+ "aria-rowindextext"?: string | undefined;
5379
+ "aria-rowspan"?: number | undefined;
5380
+ "aria-selected"?: (boolean | "true" | "false") | undefined;
5381
+ "aria-setsize"?: number | undefined;
5382
+ "aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
5383
+ "aria-valuemax"?: number | undefined;
5384
+ "aria-valuemin"?: number | undefined;
5385
+ "aria-valuenow"?: number | undefined;
5386
+ "aria-valuetext"?: string | undefined;
5387
+ dangerouslySetInnerHTML?: {
5388
+ __html: string | TrustedHTML;
5389
+ } | undefined;
5390
+ onCopy?: ClipboardEventHandler<HTMLElement> | undefined;
5391
+ onCopyCapture?: ClipboardEventHandler<HTMLElement> | undefined;
5392
+ onCut?: ClipboardEventHandler<HTMLElement> | undefined;
5393
+ onCutCapture?: ClipboardEventHandler<HTMLElement> | undefined;
5394
+ onPaste?: ClipboardEventHandler<HTMLElement> | undefined;
5395
+ onPasteCapture?: ClipboardEventHandler<HTMLElement> | undefined;
5396
+ onCompositionEnd?: CompositionEventHandler<HTMLElement> | undefined;
5397
+ onCompositionEndCapture?: CompositionEventHandler<HTMLElement> | undefined;
5398
+ onCompositionStart?: CompositionEventHandler<HTMLElement> | undefined;
5399
+ onCompositionStartCapture?: CompositionEventHandler<HTMLElement> | undefined;
5400
+ onCompositionUpdate?: CompositionEventHandler<HTMLElement> | undefined;
5401
+ onCompositionUpdateCapture?: CompositionEventHandler<HTMLElement> | undefined;
5402
+ onFocus?: FocusEventHandler<HTMLElement> | undefined;
5403
+ onFocusCapture?: FocusEventHandler<HTMLElement> | undefined;
5404
+ onBlur?: FocusEventHandler<HTMLElement> | undefined;
5405
+ onBlurCapture?: FocusEventHandler<HTMLElement> | undefined;
5406
+ onChange?: ChangeEventHandler<HTMLElement, Element> | undefined;
5407
+ onChangeCapture?: ChangeEventHandler<HTMLElement, Element> | undefined;
5408
+ onBeforeInput?: InputEventHandler<HTMLElement> | undefined;
5409
+ onBeforeInputCapture?: InputEventHandler<HTMLElement> | undefined;
5410
+ onInput?: InputEventHandler<HTMLElement> | undefined;
5411
+ onInputCapture?: InputEventHandler<HTMLElement> | undefined;
5412
+ onReset?: ReactEventHandler<HTMLElement> | undefined;
5413
+ onResetCapture?: ReactEventHandler<HTMLElement> | undefined;
5414
+ onSubmit?: SubmitEventHandler<HTMLElement> | undefined;
5415
+ onSubmitCapture?: SubmitEventHandler<HTMLElement> | undefined;
5416
+ onInvalid?: ReactEventHandler<HTMLElement> | undefined;
5417
+ onInvalidCapture?: ReactEventHandler<HTMLElement> | undefined;
5418
+ onLoad?: ReactEventHandler<HTMLElement> | undefined;
5419
+ onLoadCapture?: ReactEventHandler<HTMLElement> | undefined;
5420
+ onError?: ReactEventHandler<HTMLElement> | undefined;
5421
+ onErrorCapture?: ReactEventHandler<HTMLElement> | undefined;
5422
+ onKeyDown?: KeyboardEventHandler<HTMLElement> | undefined;
5423
+ onKeyDownCapture?: KeyboardEventHandler<HTMLElement> | undefined;
5424
+ onKeyPress?: KeyboardEventHandler<HTMLElement> | undefined;
5425
+ onKeyPressCapture?: KeyboardEventHandler<HTMLElement> | undefined;
5426
+ onKeyUp?: KeyboardEventHandler<HTMLElement> | undefined;
5427
+ onKeyUpCapture?: KeyboardEventHandler<HTMLElement> | undefined;
5428
+ onAbort?: ReactEventHandler<HTMLElement> | undefined;
5429
+ onAbortCapture?: ReactEventHandler<HTMLElement> | undefined;
5430
+ onCanPlay?: ReactEventHandler<HTMLElement> | undefined;
5431
+ onCanPlayCapture?: ReactEventHandler<HTMLElement> | undefined;
5432
+ onCanPlayThrough?: ReactEventHandler<HTMLElement> | undefined;
5433
+ onCanPlayThroughCapture?: ReactEventHandler<HTMLElement> | undefined;
5434
+ onDurationChange?: ReactEventHandler<HTMLElement> | undefined;
5435
+ onDurationChangeCapture?: ReactEventHandler<HTMLElement> | undefined;
5436
+ onEmptied?: ReactEventHandler<HTMLElement> | undefined;
5437
+ onEmptiedCapture?: ReactEventHandler<HTMLElement> | undefined;
5438
+ onEncrypted?: ReactEventHandler<HTMLElement> | undefined;
5439
+ onEncryptedCapture?: ReactEventHandler<HTMLElement> | undefined;
5440
+ onEnded?: ReactEventHandler<HTMLElement> | undefined;
5441
+ onEndedCapture?: ReactEventHandler<HTMLElement> | undefined;
5442
+ onLoadedData?: ReactEventHandler<HTMLElement> | undefined;
5443
+ onLoadedDataCapture?: ReactEventHandler<HTMLElement> | undefined;
5444
+ onLoadedMetadata?: ReactEventHandler<HTMLElement> | undefined;
5445
+ onLoadedMetadataCapture?: ReactEventHandler<HTMLElement> | undefined;
5446
+ onLoadStart?: ReactEventHandler<HTMLElement> | undefined;
5447
+ onLoadStartCapture?: ReactEventHandler<HTMLElement> | undefined;
5448
+ onPause?: ReactEventHandler<HTMLElement> | undefined;
5449
+ onPauseCapture?: ReactEventHandler<HTMLElement> | undefined;
5450
+ onPlay?: ReactEventHandler<HTMLElement> | undefined;
5451
+ onPlayCapture?: ReactEventHandler<HTMLElement> | undefined;
5452
+ onPlaying?: ReactEventHandler<HTMLElement> | undefined;
5453
+ onPlayingCapture?: ReactEventHandler<HTMLElement> | undefined;
5454
+ onProgress?: ReactEventHandler<HTMLElement> | undefined;
5455
+ onProgressCapture?: ReactEventHandler<HTMLElement> | undefined;
5456
+ onRateChange?: ReactEventHandler<HTMLElement> | undefined;
5457
+ onRateChangeCapture?: ReactEventHandler<HTMLElement> | undefined;
5458
+ onSeeked?: ReactEventHandler<HTMLElement> | undefined;
5459
+ onSeekedCapture?: ReactEventHandler<HTMLElement> | undefined;
5460
+ onSeeking?: ReactEventHandler<HTMLElement> | undefined;
5461
+ onSeekingCapture?: ReactEventHandler<HTMLElement> | undefined;
5462
+ onStalled?: ReactEventHandler<HTMLElement> | undefined;
5463
+ onStalledCapture?: ReactEventHandler<HTMLElement> | undefined;
5464
+ onSuspend?: ReactEventHandler<HTMLElement> | undefined;
5465
+ onSuspendCapture?: ReactEventHandler<HTMLElement> | undefined;
5466
+ onTimeUpdate?: ReactEventHandler<HTMLElement> | undefined;
5467
+ onTimeUpdateCapture?: ReactEventHandler<HTMLElement> | undefined;
5468
+ onVolumeChange?: ReactEventHandler<HTMLElement> | undefined;
5469
+ onVolumeChangeCapture?: ReactEventHandler<HTMLElement> | undefined;
5470
+ onWaiting?: ReactEventHandler<HTMLElement> | undefined;
5471
+ onWaitingCapture?: ReactEventHandler<HTMLElement> | undefined;
5472
+ onAuxClick?: MouseEventHandler<HTMLElement> | undefined;
5473
+ onAuxClickCapture?: MouseEventHandler<HTMLElement> | undefined;
5474
+ onClick?: MouseEventHandler<HTMLElement> | undefined;
5475
+ onClickCapture?: MouseEventHandler<HTMLElement> | undefined;
5476
+ onContextMenu?: MouseEventHandler<HTMLElement> | undefined;
5477
+ onContextMenuCapture?: MouseEventHandler<HTMLElement> | undefined;
5478
+ onDoubleClick?: MouseEventHandler<HTMLElement> | undefined;
5479
+ onDoubleClickCapture?: MouseEventHandler<HTMLElement> | undefined;
5480
+ onDrag?: DragEventHandler<HTMLElement> | undefined;
5481
+ onDragCapture?: DragEventHandler<HTMLElement> | undefined;
5482
+ onDragEnd?: DragEventHandler<HTMLElement> | undefined;
5483
+ onDragEndCapture?: DragEventHandler<HTMLElement> | undefined;
5484
+ onDragEnter?: DragEventHandler<HTMLElement> | undefined;
5485
+ onDragEnterCapture?: DragEventHandler<HTMLElement> | undefined;
5486
+ onDragExit?: DragEventHandler<HTMLElement> | undefined;
5487
+ onDragExitCapture?: DragEventHandler<HTMLElement> | undefined;
5488
+ onDragLeave?: DragEventHandler<HTMLElement> | undefined;
5489
+ onDragLeaveCapture?: DragEventHandler<HTMLElement> | undefined;
5490
+ onDragOver?: DragEventHandler<HTMLElement> | undefined;
5491
+ onDragOverCapture?: DragEventHandler<HTMLElement> | undefined;
5492
+ onDragStart?: DragEventHandler<HTMLElement> | undefined;
5493
+ onDragStartCapture?: DragEventHandler<HTMLElement> | undefined;
5494
+ onDrop?: DragEventHandler<HTMLElement> | undefined;
5495
+ onDropCapture?: DragEventHandler<HTMLElement> | undefined;
5496
+ onMouseDown?: MouseEventHandler<HTMLElement> | undefined;
5497
+ onMouseDownCapture?: MouseEventHandler<HTMLElement> | undefined;
5498
+ onMouseEnter?: MouseEventHandler<HTMLElement> | undefined;
5499
+ onMouseLeave?: MouseEventHandler<HTMLElement> | undefined;
5500
+ onMouseMove?: MouseEventHandler<HTMLElement> | undefined;
5501
+ onMouseMoveCapture?: MouseEventHandler<HTMLElement> | undefined;
5502
+ onMouseOut?: MouseEventHandler<HTMLElement> | undefined;
5503
+ onMouseOutCapture?: MouseEventHandler<HTMLElement> | undefined;
5504
+ onMouseOver?: MouseEventHandler<HTMLElement> | undefined;
5505
+ onMouseOverCapture?: MouseEventHandler<HTMLElement> | undefined;
5506
+ onMouseUp?: MouseEventHandler<HTMLElement> | undefined;
5507
+ onMouseUpCapture?: MouseEventHandler<HTMLElement> | undefined;
5508
+ onSelect?: ReactEventHandler<HTMLElement> | undefined;
5509
+ onSelectCapture?: ReactEventHandler<HTMLElement> | undefined;
5510
+ onTouchCancel?: TouchEventHandler<HTMLElement> | undefined;
5511
+ onTouchCancelCapture?: TouchEventHandler<HTMLElement> | undefined;
5512
+ onTouchEnd?: TouchEventHandler<HTMLElement> | undefined;
5513
+ onTouchEndCapture?: TouchEventHandler<HTMLElement> | undefined;
5514
+ onTouchMove?: TouchEventHandler<HTMLElement> | undefined;
5515
+ onTouchMoveCapture?: TouchEventHandler<HTMLElement> | undefined;
5516
+ onTouchStart?: TouchEventHandler<HTMLElement> | undefined;
5517
+ onTouchStartCapture?: TouchEventHandler<HTMLElement> | undefined;
5518
+ onPointerDown?: PointerEventHandler<HTMLElement> | undefined;
5519
+ onPointerDownCapture?: PointerEventHandler<HTMLElement> | undefined;
5520
+ onPointerMove?: PointerEventHandler<HTMLElement> | undefined;
5521
+ onPointerMoveCapture?: PointerEventHandler<HTMLElement> | undefined;
5522
+ onPointerUp?: PointerEventHandler<HTMLElement> | undefined;
5523
+ onPointerUpCapture?: PointerEventHandler<HTMLElement> | undefined;
5524
+ onPointerCancel?: PointerEventHandler<HTMLElement> | undefined;
5525
+ onPointerCancelCapture?: PointerEventHandler<HTMLElement> | undefined;
5526
+ onPointerEnter?: PointerEventHandler<HTMLElement> | undefined;
5527
+ onPointerLeave?: PointerEventHandler<HTMLElement> | undefined;
5528
+ onPointerOver?: PointerEventHandler<HTMLElement> | undefined;
5529
+ onPointerOverCapture?: PointerEventHandler<HTMLElement> | undefined;
5530
+ onPointerOut?: PointerEventHandler<HTMLElement> | undefined;
5531
+ onPointerOutCapture?: PointerEventHandler<HTMLElement> | undefined;
5532
+ onGotPointerCapture?: PointerEventHandler<HTMLElement> | undefined;
5533
+ onGotPointerCaptureCapture?: PointerEventHandler<HTMLElement> | undefined;
5534
+ onLostPointerCapture?: PointerEventHandler<HTMLElement> | undefined;
5535
+ onLostPointerCaptureCapture?: PointerEventHandler<HTMLElement> | undefined;
5536
+ onScroll?: UIEventHandler<HTMLElement> | undefined;
5537
+ onScrollCapture?: UIEventHandler<HTMLElement> | undefined;
5538
+ onScrollEnd?: UIEventHandler<HTMLElement> | undefined;
5539
+ onScrollEndCapture?: UIEventHandler<HTMLElement> | undefined;
5540
+ onWheel?: WheelEventHandler<HTMLElement> | undefined;
5541
+ onWheelCapture?: WheelEventHandler<HTMLElement> | undefined;
5542
+ onAnimationStart?: AnimationEventHandler<HTMLElement> | undefined;
5543
+ onAnimationStartCapture?: AnimationEventHandler<HTMLElement> | undefined;
5544
+ onAnimationEnd?: AnimationEventHandler<HTMLElement> | undefined;
5545
+ onAnimationEndCapture?: AnimationEventHandler<HTMLElement> | undefined;
5546
+ onAnimationIteration?: AnimationEventHandler<HTMLElement> | undefined;
5547
+ onAnimationIterationCapture?: AnimationEventHandler<HTMLElement> | undefined;
5548
+ onToggle?: ToggleEventHandler<HTMLElement> | undefined;
5549
+ onBeforeToggle?: ToggleEventHandler<HTMLElement> | undefined;
5550
+ onTransitionCancel?: TransitionEventHandler<HTMLElement> | undefined;
5551
+ onTransitionCancelCapture?: TransitionEventHandler<HTMLElement> | undefined;
5552
+ onTransitionEnd?: TransitionEventHandler<HTMLElement> | undefined;
5553
+ onTransitionEndCapture?: TransitionEventHandler<HTMLElement> | undefined;
5554
+ onTransitionRun?: TransitionEventHandler<HTMLElement> | undefined;
5555
+ onTransitionRunCapture?: TransitionEventHandler<HTMLElement> | undefined;
5556
+ onTransitionStart?: TransitionEventHandler<HTMLElement> | undefined;
5557
+ onTransitionStartCapture?: TransitionEventHandler<HTMLElement> | undefined;
5558
+ className: string;
5559
+ }, Element>;
5560
+
5561
+ export declare interface VisuallyHiddenProps extends HTMLAttributes<HTMLElement> {
5562
+ /** Intrinsic element to render. Defaults to "span". */
5563
+ as?: keyof JSX_2.IntrinsicElements;
5564
+ }
5565
+
3904
5566
  /**
3905
5567
  * Browser-side Web Push helper. Wraps `Notification.requestPermission`,
3906
5568
  * `pushManager.subscribe`, and the corresponding teardown. Transport is up to
@@ -3990,11 +5652,39 @@ export declare interface WebSocketMessage<T> {
3990
5652
 
3991
5653
  export declare type WebSocketStatus = "idle" | "connecting" | "open" | "closing" | "closed" | "error";
3992
5654
 
5655
+ export declare type WeekStart = 0 | 1;
5656
+
3993
5657
  export declare interface WindowSize {
3994
5658
  width: number;
3995
5659
  height: number;
3996
5660
  }
3997
5661
 
5662
+ /**
5663
+ * A bound Zustand hook augmented with auto-generated per-field selector hooks
5664
+ * under `.use`. Reading a single field via `store.use.field()` subscribes the
5665
+ * component only to that field, avoiding re-renders when unrelated slices change.
5666
+ */
5667
+ export declare type WithSelectors<S> = S extends {
5668
+ getState: () => infer T;
5669
+ } ? S & {
5670
+ use: {
5671
+ [K in keyof T]: () => T[K];
5672
+ };
5673
+ } : never;
5674
+
5675
+ /**
5676
+ * Race `promise` against a timeout.
5677
+ *
5678
+ * Resolves/rejects with `promise` when it settles first. If `ms` elapses
5679
+ * before that, the returned promise rejects with an `Error` whose `name` is
5680
+ * `"TimeoutError"`.
5681
+ *
5682
+ * @example
5683
+ * await withTimeout(fetch("/slow"), 3000);
5684
+ * await withTimeout(fetch("/slow"), 3000, "request too slow");
5685
+ */
5686
+ export declare function withTimeout<T>(promise: Promise<T>, ms: number, message?: string): Promise<T>;
5687
+
3998
5688
  /**
3999
5689
  * Minimal `react-hook-form` resolver built on top of zod. Mirrors the shape
4000
5690
  * produced by `@hookform/resolvers/zod` so it can be passed straight to