dabi-lib 1.0.1 → 1.0.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.
- package/dist/components/Accordion.d.ts +23 -0
- package/dist/components/Alert.d.ts +8 -0
- package/dist/components/Button.d.ts +9 -0
- package/dist/components/ButtonGroup.d.ts +9 -0
- package/dist/components/Card.d.ts +5 -0
- package/dist/components/Checkbox.d.ts +8 -0
- package/dist/components/Chip.d.ts +21 -0
- package/dist/components/Confirm.d.ts +10 -0
- package/dist/components/CopyButton.d.ts +11 -0
- package/dist/components/DataTable.d.ts +18 -0
- package/dist/components/Dialog.d.ts +8 -0
- package/dist/components/FloatingActionButton.d.ts +9 -0
- package/dist/components/Input.d.ts +6 -0
- package/dist/components/Item.d.ts +12 -0
- package/dist/components/Pagination.d.ts +13 -0
- package/dist/components/Popover.d.ts +12 -0
- package/dist/components/Select.d.ts +15 -0
- package/dist/components/Separator.d.ts +6 -0
- package/dist/components/Sheet.d.ts +32 -0
- package/dist/components/Skeleton.d.ts +5 -0
- package/dist/components/Spinner.d.ts +1 -0
- package/dist/components/Status.d.ts +6 -0
- package/dist/components/TagInput.d.ts +8 -0
- package/dist/components/Textarea.d.ts +6 -0
- package/dist/components/Toaster.d.ts +1 -0
- package/dist/components/Tooltip.d.ts +8 -0
- package/dist/components/command-menu/CommandMenu.d.ts +18 -0
- package/dist/components/command-menu/CommandMenuItem.d.ts +7 -0
- package/dist/core/Router.d.ts +62 -0
- package/dist/db/index.d.ts +8 -0
- package/dist/hooks/useAlert.d.ts +9 -0
- package/dist/hooks/useConfirm.d.ts +9 -0
- package/dist/hooks/useToast.d.ts +4 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +34 -1
- package/dist/index.js +1710 -1599
- package/dist/server/index.d.ts +11 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/utils/datatable.d.ts +11 -0
- package/dist/vite/index.d.ts +6 -0
- package/package.json +1 -1
- package/src/index.ts +2 -0
- package/vite.config.ts +10 -2
- package/src/assets/react.svg +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
type AccordionBaseProps = Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'>;
|
|
3
|
+
type AccordionSingleProps = {
|
|
4
|
+
type: 'single';
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
collapsible?: boolean;
|
|
8
|
+
onValueChange?: (value: string | undefined) => void;
|
|
9
|
+
};
|
|
10
|
+
type AccordionMultipleProps = {
|
|
11
|
+
type?: 'multiple';
|
|
12
|
+
value?: string[];
|
|
13
|
+
defaultValue?: string[];
|
|
14
|
+
onValueChange?: (value: string[]) => void;
|
|
15
|
+
};
|
|
16
|
+
type AccordionProps = AccordionBaseProps & (AccordionSingleProps | AccordionMultipleProps);
|
|
17
|
+
export declare const Accordion: import('react').ForwardRefExoticComponent<AccordionProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export declare const AccordionItem: import('react').ForwardRefExoticComponent<{
|
|
19
|
+
value: string;
|
|
20
|
+
} & HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export declare const AccordionTrigger: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLButtonElement> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export declare const AccordionContent: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface AlertProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
confirmText?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Alert({ open, onClose, title, message, confirmText, }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const buttonVariants: (props?: ({
|
|
3
|
+
variant?: "link" | "filled" | "outlined" | "tonal" | "ghost" | null | undefined;
|
|
4
|
+
size?: "sm" | "md" | "lg" | "icon" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function Button({ variant, size, children, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { Separator } from './Separator';
|
|
3
|
+
declare const buttonGroupVariants: (props?: ({
|
|
4
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
+
export declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ButtonGroupText({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
variant?: 'elevated' | 'filled' | 'outlined';
|
|
4
|
+
}
|
|
5
|
+
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CheckboxProps {
|
|
2
|
+
checked: boolean;
|
|
3
|
+
onChange: (checked: boolean) => void;
|
|
4
|
+
label?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Checkbox({ checked, onChange, label, disabled, className, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ChipProps = {
|
|
3
|
+
variant?: 'assist' | 'filter' | 'input' | 'suggestion';
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
avatar?: React.ReactNode;
|
|
7
|
+
onDelete?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
8
|
+
onClick?: () => void;
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
colors?: {
|
|
11
|
+
backgroundColorClass?: string;
|
|
12
|
+
textColorClass?: string;
|
|
13
|
+
borderColorClass?: string;
|
|
14
|
+
hoverBackgroundColorClass?: string;
|
|
15
|
+
selectedBackgroundColorClass?: string;
|
|
16
|
+
selectedTextColorClass?: string;
|
|
17
|
+
selectedBorderColorClass?: string;
|
|
18
|
+
selectedHoverBackgroundColorClass?: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export declare const Chip: React.FC<ChipProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ConfirmProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
onConfirm: () => void;
|
|
5
|
+
title: string;
|
|
6
|
+
message: string;
|
|
7
|
+
confirmText?: string;
|
|
8
|
+
cancelText?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Confirm({ open, onClose, onConfirm, title, message, confirmText, cancelText, }: ConfirmProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type Size = "sm" | "md";
|
|
2
|
+
export type Variant = "outlined" | "ghost";
|
|
3
|
+
export interface CopyButtonProps {
|
|
4
|
+
text: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
labelCopied?: string;
|
|
7
|
+
size?: Size;
|
|
8
|
+
variant?: Variant;
|
|
9
|
+
successulCallback?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function CopyButton({ text, label, labelCopied, variant, size, successulCallback }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Alignment } from '../utils/datatable';
|
|
3
|
+
export type ColumnDef<TData> = {
|
|
4
|
+
accessorKey: keyof TData | string;
|
|
5
|
+
header: React.ReactNode | (({ column }: {
|
|
6
|
+
column: ColumnDef<TData>;
|
|
7
|
+
}) => React.ReactNode);
|
|
8
|
+
cell?: ({ row }: {
|
|
9
|
+
row: TData;
|
|
10
|
+
}) => React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export type DataTableProps<TData> = {
|
|
13
|
+
data: TData[];
|
|
14
|
+
columns?: ColumnDef<TData>[];
|
|
15
|
+
headerAlignment?: Alignment;
|
|
16
|
+
cellAlignment?: Alignment;
|
|
17
|
+
};
|
|
18
|
+
export declare function DataTable<TData extends object>({ data, columns, headerAlignment, cellAlignment, }: DataTableProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface DialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
classNameOverlay?: string | undefined;
|
|
7
|
+
}
|
|
8
|
+
export declare function Dialog({ open, onClose, children, classNameOverlay }: DialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FloatingActionButtonProps {
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
label?: string;
|
|
5
|
+
extended?: boolean;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const FloatingActionButton: React.FC<FloatingActionButtonProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React, InputHTMLAttributes } from 'react';
|
|
2
|
+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
variant?: "default" | "ghost";
|
|
5
|
+
}
|
|
6
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ItemProps {
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
leadingContent?: React.ReactNode;
|
|
6
|
+
trailingContent?: React.ReactNode;
|
|
7
|
+
clickable?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
variant?: "first" | "last" | "none" | "rounded";
|
|
11
|
+
}
|
|
12
|
+
export declare function Item({ label, description, leadingContent, trailingContent, clickable, disabled, onClick, variant, }: ItemProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button } from './Button';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare function Pagination({ className, ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function PaginationContent({ className, ...props }: React.ComponentProps<"ul">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PaginationItem({ ...props }: React.ComponentProps<"li">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
type PaginationLinkProps = {
|
|
7
|
+
isActive?: boolean;
|
|
8
|
+
} & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
|
|
9
|
+
declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/react';
|
|
2
|
+
export interface PopoverProps {
|
|
3
|
+
trigger: React.ReactNode;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
onHover?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
placement?: Placement;
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function Popover({ trigger, content, onHover, className, placement, open: controlledOpen, onOpenChange, fullWidth, }: PopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface SelectOption<T> {
|
|
2
|
+
value: T;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface SelectProps<T> {
|
|
6
|
+
options: SelectOption<T>[];
|
|
7
|
+
value?: T | T[];
|
|
8
|
+
onChange: (value: T | T[]) => void;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
withSearch?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function Select<T>({ options, value, onChange, multiple, placeholder, className, disabled, withSearch, }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type SheetSide = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export interface SheetProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
side?: SheetSide;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
title?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* A Sheet component that slides in from different sides of the screen.
|
|
14
|
+
* Supports "top", "bottom", "left", and "right" positions.
|
|
15
|
+
*/
|
|
16
|
+
export declare function Sheet({ isOpen, onClose, side, children, title, description, className, }: SheetProps): React.ReactPortal | null;
|
|
17
|
+
export declare function SheetHeader({ children, className }: {
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function SheetFooter({ children, className }: {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function SheetTitle({ children, className }: {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function SheetDescription({ children, className }: {
|
|
30
|
+
children: React.ReactNode;
|
|
31
|
+
className?: string;
|
|
32
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Spinner({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React, TextareaHTMLAttributes } from 'react';
|
|
2
|
+
export interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
label?: string;
|
|
4
|
+
variant?: "default" | "ghost";
|
|
5
|
+
}
|
|
6
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Toaster(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Placement } from '@floating-ui/react';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
}
|
|
8
|
+
export declare function Tooltip({ children, content, className, placement, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface CommandMenuItemType {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
onSelect: () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface CommandMenuGroupType {
|
|
8
|
+
id: string;
|
|
9
|
+
heading: string;
|
|
10
|
+
items: CommandMenuItemType[];
|
|
11
|
+
}
|
|
12
|
+
export interface CommandMenuProps {
|
|
13
|
+
groups?: CommandMenuGroupType[];
|
|
14
|
+
items?: CommandMenuItemType[];
|
|
15
|
+
open?: boolean;
|
|
16
|
+
onOpenChange?: (open: boolean) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function CommandMenu({ groups, items, open, onOpenChange, }: CommandMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CommandMenuItemProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
onSelect?: () => void;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const CommandMenuItem: React.ForwardRefExoticComponent<CommandMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ColumnDef } from '../components/DataTable';
|
|
2
|
+
import { SheetSide } from '../components/Sheet';
|
|
3
|
+
type DestinationType = "screen" | "dialog" | "bottomSheet" | "sheet" | "list";
|
|
4
|
+
export type Guard = (params?: any) => boolean | Promise<boolean>;
|
|
5
|
+
export interface RouteConfig {
|
|
6
|
+
path: string;
|
|
7
|
+
component?: React.ComponentType<any>;
|
|
8
|
+
type: DestinationType;
|
|
9
|
+
side?: SheetSide;
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
listOptions?: {
|
|
14
|
+
columns: ColumnDef<any>[];
|
|
15
|
+
data: any[];
|
|
16
|
+
};
|
|
17
|
+
canActivate?: Guard[];
|
|
18
|
+
canDeactivate?: Guard[];
|
|
19
|
+
}
|
|
20
|
+
interface NavContextType {
|
|
21
|
+
navigate: (path: string, params?: any) => void;
|
|
22
|
+
popBackStack: () => void;
|
|
23
|
+
currentRoute: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const useNavigation: () => NavContextType;
|
|
26
|
+
export declare class RouteBuilder {
|
|
27
|
+
routes: Record<string, RouteConfig>;
|
|
28
|
+
screen(path: string, component: React.ComponentType<any>, options?: {
|
|
29
|
+
canActivate?: Guard[];
|
|
30
|
+
canDeactivate?: Guard[];
|
|
31
|
+
}): void;
|
|
32
|
+
dialog(path: string, component: React.ComponentType<any>, options?: {
|
|
33
|
+
canActivate?: Guard[];
|
|
34
|
+
canDeactivate?: Guard[];
|
|
35
|
+
}): void;
|
|
36
|
+
bottomSheet(path: string, component: React.ComponentType<any>, options?: {
|
|
37
|
+
canActivate?: Guard[];
|
|
38
|
+
canDeactivate?: Guard[];
|
|
39
|
+
}): void;
|
|
40
|
+
sheet(path: string, component: React.ComponentType<any>, options?: {
|
|
41
|
+
side?: SheetSide;
|
|
42
|
+
title?: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
className?: string;
|
|
45
|
+
canActivate?: Guard[];
|
|
46
|
+
canDeactivate?: Guard[];
|
|
47
|
+
}): void;
|
|
48
|
+
list<T>(path: string, options: {
|
|
49
|
+
title: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
columns: ColumnDef<T>[];
|
|
52
|
+
data: T[];
|
|
53
|
+
canActivate?: Guard[];
|
|
54
|
+
canDeactivate?: Guard[];
|
|
55
|
+
}): void;
|
|
56
|
+
}
|
|
57
|
+
interface NavHostProps {
|
|
58
|
+
startDestination: string;
|
|
59
|
+
builder: (builder: RouteBuilder) => void;
|
|
60
|
+
}
|
|
61
|
+
export declare const NavHost: React.FC<NavHostProps>;
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as Database } from 'better-sqlite3';
|
|
2
|
+
import * as schema from './schema';
|
|
3
|
+
export declare const db: import('drizzle-orm/better-sqlite3').BetterSQLite3Database<typeof schema> & {
|
|
4
|
+
$client: Database.Database;
|
|
5
|
+
};
|
|
6
|
+
export declare function initDb(path: string): import('drizzle-orm/better-sqlite3').BetterSQLite3Database<typeof schema> & {
|
|
7
|
+
$client: Database.Database;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { AlertProps } from '../components/Alert';
|
|
3
|
+
type AlertOptions = Omit<AlertProps, 'open' | 'onClose'>;
|
|
4
|
+
type UseAlertReturn = {
|
|
5
|
+
alert: (options: AlertOptions) => Promise<void>;
|
|
6
|
+
AlertDialog: () => JSX.Element | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const useAlert: () => UseAlertReturn;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { ConfirmProps } from '../components/Confirm';
|
|
3
|
+
type ConfirmOptions = Omit<ConfirmProps, 'open' | 'onClose' | 'onConfirm'>;
|
|
4
|
+
type UseConfirmReturn = {
|
|
5
|
+
confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
6
|
+
ConfirmationDialog: () => JSX.Element | null;
|
|
7
|
+
};
|
|
8
|
+
export declare const useConfirm: () => UseConfirmReturn;
|
|
9
|
+
export {};
|