pulsewatch-frontend 0.1.0 → 0.1.2

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 (67) hide show
  1. package/README.md +58 -0
  2. package/dist/PulsePage.d.ts +7 -0
  3. package/dist/api.d.ts +1 -0
  4. package/dist/components/ui/SessionTimeoutDialog.d.ts +6 -0
  5. package/dist/components/ui/alert-dialog.d.ts +14 -0
  6. package/dist/components/ui/alert.d.ts +9 -0
  7. package/dist/components/ui/avatar-group.d.ts +11 -0
  8. package/dist/components/ui/avatar.d.ts +6 -0
  9. package/dist/components/ui/badge.d.ts +9 -0
  10. package/dist/components/ui/button.d.ts +10 -0
  11. package/dist/components/ui/calendar.d.ts +8 -0
  12. package/dist/components/ui/card.d.ts +9 -0
  13. package/dist/components/ui/checkbox.d.ts +4 -0
  14. package/dist/components/ui/collapsible.d.ts +5 -0
  15. package/dist/components/ui/command.d.ts +18 -0
  16. package/dist/components/ui/copy-button.d.ts +5 -0
  17. package/dist/components/ui/dialog.d.ts +15 -0
  18. package/dist/components/ui/dropdown-menu.d.ts +25 -0
  19. package/dist/components/ui/form.d.ts +26 -0
  20. package/dist/components/ui/input-otp.d.ts +11 -0
  21. package/dist/components/ui/input.d.ts +3 -0
  22. package/dist/components/ui/label.d.ts +4 -0
  23. package/dist/components/ui/multi-select.d.ts +13 -0
  24. package/dist/components/ui/popover.d.ts +7 -0
  25. package/dist/components/ui/radio-group.d.ts +5 -0
  26. package/dist/components/ui/scroll-area.d.ts +8 -0
  27. package/dist/components/ui/select.d.ts +15 -0
  28. package/dist/components/ui/separator.d.ts +4 -0
  29. package/dist/components/ui/sheet.d.ts +13 -0
  30. package/dist/components/ui/sidebar.d.ts +69 -0
  31. package/dist/components/ui/skeleton.d.ts +2 -0
  32. package/dist/components/ui/sonner.d.ts +2 -0
  33. package/dist/components/ui/switch.d.ts +4 -0
  34. package/dist/components/ui/table.d.ts +10 -0
  35. package/dist/components/ui/tabs.d.ts +7 -0
  36. package/dist/components/ui/textarea.d.ts +3 -0
  37. package/dist/components/ui/tooltip.d.ts +7 -0
  38. package/dist/hooks/use-dialog-state.d.ts +7 -0
  39. package/dist/hooks/use-mobile.d.ts +1 -0
  40. package/dist/hooks/use-table-url-state.d.ts +54 -0
  41. package/dist/index.d.ts +6 -0
  42. package/dist/index.js +100 -8
  43. package/dist/index.mjs +23464 -11912
  44. package/dist/lib/cookies.d.ts +16 -0
  45. package/dist/lib/handle-server-error.d.ts +1 -0
  46. package/dist/lib/show-submitted-data.d.ts +1 -0
  47. package/dist/lib/utils/error.d.ts +1 -0
  48. package/dist/lib/utils.d.ts +17 -0
  49. package/dist/lib/validation/account-schema.d.ts +8 -0
  50. package/dist/lib/validation/auth-schema.d.ts +6 -0
  51. package/dist/lib/validation/permission-schema.d.ts +10 -0
  52. package/dist/lib/validation/profile-schema.d.ts +8 -0
  53. package/dist/lib/validation/request-schema.d.ts +7 -0
  54. package/dist/lib/validation/sso-schema.d.ts +18 -0
  55. package/dist/lib/validation/teams-schema.d.ts +7 -0
  56. package/dist/lib/validation/user-schema.d.ts +6 -0
  57. package/dist/pulsewatch-frontend.css +1 -1
  58. package/dist/services/monitor.d.ts +10 -0
  59. package/dist/store/hooks.d.ts +14 -0
  60. package/dist/store/index.d.ts +25 -0
  61. package/dist/store/slices/monitorSlice.d.ts +30 -0
  62. package/dist/types.d.ts +27 -0
  63. package/dist/ui/components/MonitorCard.d.ts +12 -0
  64. package/dist/ui/components/MonitorDeleteDialog.d.ts +9 -0
  65. package/dist/ui/components/MonitorFormDialog.d.ts +36 -0
  66. package/dist/ui/pages/MonitorListPage.d.ts +1 -0
  67. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # PulseWatch Frontend
2
+
3
+ A modern, responsive, and drop-in React component for uptime monitoring and status pages. This package provides the full frontend interface for the PulseWatch monitoring system, decoupled from the authentication layer so it can be easily integrated into existing admin dashboards or internal tools.
4
+
5
+ ## Features
6
+
7
+ - 📊 **Real-time Monitoring Dashboard**: View status, uptime percentages, and response times.
8
+ - 📈 **Interactive Charts**: Visual history of latency and uptime.
9
+ - 🔔 **Notifications Management**: Configure alerts for your monitors.
10
+ - 🌓 **Dark/Light Mode**: Built-in theme support.
11
+ - 🔌 **Socket.io Integration**: Live updates for monitor status.
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ npm install pulsewatch-frontend
17
+ # or
18
+ yarn add pulsewatch-frontend
19
+ # or
20
+ pnpm add pulsewatch-frontend
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Import the component and the CSS styles in your React application:
26
+
27
+ ```tsx
28
+ import { PulseWatch } from "pulsewatch-frontend";
29
+ import "pulsewatch-frontend/style.css";
30
+
31
+ function App() {
32
+ return (
33
+ <div style={{ height: "100vh" }}>
34
+ <PulseWatch apiBase="https://api.your-uptime-service.com" />
35
+ </div>
36
+ );
37
+ }
38
+ ```
39
+
40
+ ### Props
41
+
42
+ | Prop | Type | Description |
43
+ | --------- | -------- | -------------------------------------------------------------------------------- |
44
+ | `apiBase` | `string` | The base URL of your PulseWatch backend API (e.g., `http://localhost:3000/api`). |
45
+
46
+ ## Backend Requirement
47
+
48
+ This package requires a compatible PulseWatch backend running. Ensure your backend returns the expected data format for monitors, results, and notifications.
49
+
50
+ ## Development
51
+
52
+ To build the library locally:
53
+
54
+ ```bash
55
+ npm run build
56
+ ```
57
+
58
+ The output will be in the `dist` folder.
@@ -0,0 +1,7 @@
1
+ export interface PulsePageProps {
2
+ apiBase: string;
3
+ token?: string;
4
+ theme?: "light" | "dark";
5
+ basePath?: string;
6
+ }
7
+ export declare function PulsePage({ apiBase, token, basePath }: PulsePageProps): import("react/jsx-runtime").JSX.Element;
package/dist/api.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export declare const api: import('axios').AxiosInstance;
2
+ export declare function configureApi(baseUrl: string, token?: string): void;
2
3
  export declare function setToken(token: string | null): void;
@@ -0,0 +1,6 @@
1
+ interface SessionTimeoutDialogProps {
2
+ open: boolean;
3
+ onOpenChange: (open: boolean) => void;
4
+ }
5
+ export declare function SessionTimeoutDialog({ open, onOpenChange }: SessionTimeoutDialogProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
3
+ declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
+ declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
10
+ declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
11
+ declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
12
+ declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): import("react/jsx-runtime").JSX.Element;
13
+ declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): import("react/jsx-runtime").JSX.Element;
14
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "default" | "destructive" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
+ export { Alert, AlertTitle, AlertDescription };
@@ -0,0 +1,11 @@
1
+ interface AvatarGroupProps {
2
+ items: Array<{
3
+ id: string;
4
+ name: string;
5
+ }>;
6
+ maxDisplay?: number;
7
+ size?: 'sm' | 'md' | 'lg';
8
+ className?: string;
9
+ }
10
+ export declare function AvatarGroup({ items, maxDisplay, size, className, }: AvatarGroupProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
5
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
6
+ export { Avatar, AvatarImage, AvatarFallback };
@@ -0,0 +1,9 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "success" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
7
+ asChild?: boolean;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ export { Badge, badgeVariants };
@@ -0,0 +1,10 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export { Button, buttonVariants };
@@ -0,0 +1,8 @@
1
+ import { DayButton, DayPicker } from 'react-day-picker';
2
+ import { Button } from './button';
3
+ import * as React from 'react';
4
+ declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
+ buttonVariant?: React.ComponentProps<typeof Button>['variant'];
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
8
+ export { Calendar, CalendarDayButton };
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ declare function Card({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
2
+ declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,18 @@
1
+ import { Command as CommandPrimitive } from 'cmdk';
2
+ import { Dialog } from './dialog';
3
+ import * as React from 'react';
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
13
+ declare function CommandEmpty({ ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
14
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
15
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
16
+ declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
17
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
18
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,5 @@
1
+ interface CopyButtonProps {
2
+ text: string;
3
+ }
4
+ export declare function CopyButton({ text }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
15
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
8
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
9
+ inset?: boolean;
10
+ variant?: 'default' | 'destructive';
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): import("react/jsx-runtime").JSX.Element;
13
+ declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("react/jsx-runtime").JSX.Element;
14
+ declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): import("react/jsx-runtime").JSX.Element;
15
+ declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
16
+ inset?: boolean;
17
+ }): import("react/jsx-runtime").JSX.Element;
18
+ declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
19
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
20
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
21
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
22
+ inset?: boolean;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
25
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
@@ -0,0 +1,26 @@
1
+ import { ControllerProps, FieldPath, FieldValues } from 'react-hook-form';
2
+ import { Slot } from '@radix-ui/react-slot';
3
+ import * as React from 'react';
4
+ import * as LabelPrimitive from '@radix-ui/react-label';
5
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import('react-hook-form').FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
6
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
7
+ declare const useFormField: () => {
8
+ invalid: boolean;
9
+ isDirty: boolean;
10
+ isTouched: boolean;
11
+ isValidating: boolean;
12
+ error?: import('react-hook-form').FieldError;
13
+ id: string;
14
+ name: string;
15
+ formItemId: string;
16
+ formDescriptionId: string;
17
+ formMessageId: string;
18
+ };
19
+ declare function FormItem({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
20
+ declare function FormLabel({ className, children, required, ...props }: React.ComponentProps<typeof LabelPrimitive.Root> & {
21
+ required?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
24
+ declare function FormDescription({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element;
25
+ declare function FormMessage({ className, ...props }: React.ComponentProps<'p'>): import("react/jsx-runtime").JSX.Element | null;
26
+ export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -0,0 +1,11 @@
1
+ import { OTPInput } from 'input-otp';
2
+ import * as React from 'react';
3
+ declare function InputOTP({ className, containerClassName, ...props }: React.ComponentProps<typeof OTPInput> & {
4
+ containerClassName?: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare function InputOTPGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
7
+ declare function InputOTPSlot({ index, className, ...props }: React.ComponentProps<'div'> & {
8
+ index: number;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ declare function InputOTPSeparator({ ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
11
+ export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): import("react/jsx-runtime").JSX.Element;
3
+ export { Input };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Label };
@@ -0,0 +1,13 @@
1
+ export interface Option {
2
+ label: string;
3
+ value: string;
4
+ }
5
+ interface MultiSelectProps {
6
+ options: Option[];
7
+ selected: string[];
8
+ onChange: (selected: string[]) => void;
9
+ placeholder?: string;
10
+ className?: string;
11
+ }
12
+ export declare function MultiSelect({ options, selected, onChange, placeholder, className, }: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
7
+ export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
3
+ declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
5
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
3
+ interface ScrollAreaProps extends React.ComponentProps<typeof ScrollAreaPrimitive.Root> {
4
+ orientation?: 'vertical' | 'horizontal';
5
+ }
6
+ declare function ScrollArea({ className, children, orientation, ...props }: ScrollAreaProps): import("react/jsx-runtime").JSX.Element;
7
+ declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
8
+ export { ScrollArea, ScrollBar };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: 'sm' | 'default';
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Separator };
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
3
+ declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
6
+ declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
7
+ side?: 'top' | 'right' | 'bottom' | 'left';
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
13
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -0,0 +1,69 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { Button } from './button';
3
+ import { Input } from './input';
4
+ import { Separator } from './separator';
5
+ import { TooltipContent } from './tooltip';
6
+ import * as React from 'react';
7
+ type SidebarContextProps = {
8
+ state: 'expanded' | 'collapsed';
9
+ open: boolean;
10
+ setOpen: (open: boolean) => void;
11
+ openMobile: boolean;
12
+ setOpenMobile: (open: boolean) => void;
13
+ isMobile: boolean;
14
+ toggleSidebar: () => void;
15
+ };
16
+ declare function useSidebar(): SidebarContextProps;
17
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<'div'> & {
18
+ defaultOpen?: boolean;
19
+ open?: boolean;
20
+ onOpenChange?: (open: boolean) => void;
21
+ }): import("react/jsx-runtime").JSX.Element;
22
+ declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<'div'> & {
23
+ side?: 'left' | 'right';
24
+ variant?: 'sidebar' | 'floating' | 'inset';
25
+ collapsible?: 'offcanvas' | 'icon' | 'none';
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
28
+ declare function SidebarRail({ className, ...props }: React.ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
29
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
30
+ declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
31
+ declare function SidebarHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
32
+ declare function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
33
+ declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
34
+ declare function SidebarContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
35
+ declare function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
36
+ declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<'div'> & {
37
+ asChild?: boolean;
38
+ }): import("react/jsx-runtime").JSX.Element;
39
+ declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<'button'> & {
40
+ asChild?: boolean;
41
+ }): import("react/jsx-runtime").JSX.Element;
42
+ declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
43
+ declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
44
+ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
45
+ declare const sidebarMenuButtonVariants: (props?: ({
46
+ variant?: "default" | "outline" | null | undefined;
47
+ size?: "default" | "sm" | "lg" | null | undefined;
48
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
49
+ declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
50
+ asChild?: boolean;
51
+ isActive?: boolean;
52
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
53
+ } & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
54
+ declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<'button'> & {
55
+ asChild?: boolean;
56
+ showOnHover?: boolean;
57
+ }): import("react/jsx-runtime").JSX.Element;
58
+ declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
59
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<'div'> & {
60
+ showIcon?: boolean;
61
+ }): import("react/jsx-runtime").JSX.Element;
62
+ declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
63
+ declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
64
+ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<'a'> & {
65
+ asChild?: boolean;
66
+ size?: 'sm' | 'md';
67
+ isActive?: boolean;
68
+ }): import("react/jsx-runtime").JSX.Element;
69
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar, };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,2 @@
1
+ import { ToasterProps } from 'sonner';
2
+ export declare function Toaster({ ...props }: ToasterProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
3
+ declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ declare function Table({ className, ...props }: React.ComponentProps<'table'>): import("react/jsx-runtime").JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): import("react/jsx-runtime").JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): import("react/jsx-runtime").JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): import("react/jsx-runtime").JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): import("react/jsx-runtime").JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
3
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): import("react/jsx-runtime").JSX.Element;
3
+ export { Textarea };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Custom hook for confirm dialog
3
+ * @param initialState string | null
4
+ * @returns A stateful value, and a function to update it.
5
+ * @example const [open, setOpen] = useDialogState<"approve" | "reject">()
6
+ */
7
+ export default function useDialogState<T extends string | boolean>(initialState?: T | null): readonly [T | null, (str: T | null) => void];
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,54 @@
1
+ import { ColumnFiltersState, OnChangeFn, PaginationState, SortingState } from '@tanstack/react-table';
2
+ type SearchRecord = Record<string, unknown>;
3
+ export type NavigateFn = (opts: {
4
+ search: true | SearchRecord | ((prev: SearchRecord) => Partial<SearchRecord> | SearchRecord);
5
+ replace?: boolean;
6
+ }) => void;
7
+ type UseTableUrlStateParams = {
8
+ search: SearchRecord;
9
+ navigate: NavigateFn;
10
+ pagination?: {
11
+ pageKey?: string;
12
+ pageSizeKey?: string;
13
+ defaultPage?: number;
14
+ defaultPageSize?: number;
15
+ };
16
+ sorting?: {
17
+ sortByKey?: string;
18
+ sortOrderKey?: string;
19
+ defaultSorting?: SortingState;
20
+ };
21
+ globalFilter?: {
22
+ enabled?: boolean;
23
+ key?: string;
24
+ trim?: boolean;
25
+ };
26
+ columnFilters?: Array<{
27
+ columnId: string;
28
+ searchKey: string;
29
+ type?: 'string';
30
+ serialize?: (value: unknown) => unknown;
31
+ deserialize?: (value: unknown) => unknown;
32
+ } | {
33
+ columnId: string;
34
+ searchKey: string;
35
+ type: 'array';
36
+ serialize?: (value: unknown) => unknown;
37
+ deserialize?: (value: unknown) => unknown;
38
+ }>;
39
+ };
40
+ type UseTableUrlStateReturn = {
41
+ globalFilter?: string;
42
+ onGlobalFilterChange?: OnChangeFn<string>;
43
+ columnFilters: ColumnFiltersState;
44
+ onColumnFiltersChange: OnChangeFn<ColumnFiltersState>;
45
+ pagination: PaginationState;
46
+ onPaginationChange: OnChangeFn<PaginationState>;
47
+ sorting: SortingState;
48
+ onSortingChange: OnChangeFn<SortingState>;
49
+ ensurePageInRange: (pageCount: number, opts?: {
50
+ resetTo?: 'first' | 'last';
51
+ }) => void;
52
+ };
53
+ export declare function useTableUrlState(params: UseTableUrlStateParams): UseTableUrlStateReturn;
54
+ export {};
package/dist/index.d.ts CHANGED
@@ -4,3 +4,9 @@ export type PulseWatchProps = {
4
4
  export declare function PulseWatch({ apiBase }: PulseWatchProps): import("react/jsx-runtime").JSX.Element;
5
5
  export { createRouteTree } from './router';
6
6
  export { api } from './api';
7
+ export { PulsePage } from './PulsePage';
8
+ export declare const pulseNavItems: {
9
+ title: string;
10
+ url: string;
11
+ icon: string;
12
+ }[];