@camstack/ui-library 0.1.29 → 0.1.30
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/package.json +1 -1
- package/dist/index.d.cts +0 -716
- package/dist/index.d.ts +0 -716
- package/dist/theme/index.d.cts +0 -128
- package/dist/theme/index.d.ts +0 -128
package/dist/index.d.ts
DELETED
|
@@ -1,716 +0,0 @@
|
|
|
1
|
-
import { UseThemeModeReturn } from './theme/index.js';
|
|
2
|
-
export { CamStackColorTokens, CamStackTheme, DeepPartial, ThemeMode, ThemeProvider, createTheme, darkColors, defaultTheme, lightColors, themeToCss, useThemeMode } from './theme/index.js';
|
|
3
|
-
import { ClassValue } from 'clsx';
|
|
4
|
-
import { LucideIcon } from 'lucide-react';
|
|
5
|
-
import * as react from 'react';
|
|
6
|
-
import react__default, { ButtonHTMLAttributes, HTMLAttributes, LabelHTMLAttributes, InputHTMLAttributes, ReactNode, SelectHTMLAttributes } from 'react';
|
|
7
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
8
|
-
import { VariantProps } from 'class-variance-authority';
|
|
9
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
|
-
import { ColumnDef, SortingState, ColumnFiltersState, PaginationState } from '@tanstack/react-table';
|
|
11
|
-
export { ColumnDef, ColumnFiltersState, PaginationState, SortingState } from '@tanstack/react-table';
|
|
12
|
-
import { PipelineSlot, PipelineAddonSchema, InferenceCapabilities, PipelineSchema, PipelineTemplate, LabelData } from '@camstack/types';
|
|
13
|
-
import { createTRPCClient } from '@trpc/client';
|
|
14
|
-
|
|
15
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
16
|
-
|
|
17
|
-
type ProviderType = 'frigate' | 'scrypted' | 'reolink' | 'homeAssistant' | 'rtsp';
|
|
18
|
-
declare const providerIcons: Record<ProviderType, LucideIcon>;
|
|
19
|
-
|
|
20
|
-
type StatusType = 'online' | 'offline' | 'degraded' | 'unknown';
|
|
21
|
-
declare const statusIcons: Record<StatusType, LucideIcon>;
|
|
22
|
-
|
|
23
|
-
declare const buttonVariants: (props?: ({
|
|
24
|
-
variant?: "primary" | "danger" | "secondary" | "ghost" | "outline" | null | undefined;
|
|
25
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
26
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
27
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
28
|
-
}
|
|
29
|
-
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
30
|
-
|
|
31
|
-
declare const iconButtonVariants: (props?: ({
|
|
32
|
-
variant?: "primary" | "danger" | "secondary" | "ghost" | "outline" | null | undefined;
|
|
33
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
34
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
|
-
interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>, VariantProps<typeof iconButtonVariants> {
|
|
36
|
-
icon: LucideIcon;
|
|
37
|
-
'aria-label': string;
|
|
38
|
-
}
|
|
39
|
-
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
40
|
-
|
|
41
|
-
declare const badgeVariants: (props?: ({
|
|
42
|
-
variant?: "success" | "warning" | "danger" | "info" | "default" | null | undefined;
|
|
43
|
-
styleVariant?: "outline" | "solid" | null | undefined;
|
|
44
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
45
|
-
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'style'>, VariantProps<typeof badgeVariants> {
|
|
46
|
-
style?: 'solid' | 'outline';
|
|
47
|
-
}
|
|
48
|
-
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
49
|
-
|
|
50
|
-
declare const cardVariants: (props?: ({
|
|
51
|
-
variant?: "flat" | "bordered" | null | undefined;
|
|
52
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
53
|
-
interface CardProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof cardVariants> {
|
|
54
|
-
}
|
|
55
|
-
declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
|
|
56
|
-
|
|
57
|
-
interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
58
|
-
}
|
|
59
|
-
declare const Label: react.ForwardRefExoticComponent<LabelProps & react.RefAttributes<HTMLLabelElement>>;
|
|
60
|
-
|
|
61
|
-
declare const separatorVariants: (props?: ({
|
|
62
|
-
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
63
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
64
|
-
interface SeparatorProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof separatorVariants> {
|
|
65
|
-
}
|
|
66
|
-
declare const Separator: react.ForwardRefExoticComponent<SeparatorProps & react.RefAttributes<HTMLDivElement>>;
|
|
67
|
-
|
|
68
|
-
interface SkeletonProps extends HTMLAttributes<HTMLDivElement> {
|
|
69
|
-
}
|
|
70
|
-
declare const Skeleton: react.ForwardRefExoticComponent<SkeletonProps & react.RefAttributes<HTMLDivElement>>;
|
|
71
|
-
|
|
72
|
-
declare const inputVariants: (props?: ({
|
|
73
|
-
state?: "default" | "error" | null | undefined;
|
|
74
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
75
|
-
interface InputProps extends InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
76
|
-
leftSlot?: ReactNode;
|
|
77
|
-
rightSlot?: ReactNode;
|
|
78
|
-
}
|
|
79
|
-
declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
|
|
80
|
-
|
|
81
|
-
interface SelectOption {
|
|
82
|
-
value: string;
|
|
83
|
-
label: string;
|
|
84
|
-
}
|
|
85
|
-
interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
|
|
86
|
-
options: SelectOption[];
|
|
87
|
-
}
|
|
88
|
-
declare const Select: react.ForwardRefExoticComponent<SelectProps & react.RefAttributes<HTMLSelectElement>>;
|
|
89
|
-
|
|
90
|
-
interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
91
|
-
}
|
|
92
|
-
declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
|
|
93
|
-
|
|
94
|
-
interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
|
|
95
|
-
checked: boolean;
|
|
96
|
-
onCheckedChange: (checked: boolean) => void;
|
|
97
|
-
label?: string;
|
|
98
|
-
}
|
|
99
|
-
declare const Switch: react.ForwardRefExoticComponent<SwitchProps & react.RefAttributes<HTMLButtonElement>>;
|
|
100
|
-
|
|
101
|
-
interface DialogProps {
|
|
102
|
-
children: ReactNode;
|
|
103
|
-
open?: boolean;
|
|
104
|
-
onOpenChange?: (open: boolean) => void;
|
|
105
|
-
}
|
|
106
|
-
declare function Dialog({ children, open: controlledOpen, onOpenChange }: DialogProps): react_jsx_runtime.JSX.Element;
|
|
107
|
-
declare function DialogTrigger({ children, ...props }: HTMLAttributes<HTMLButtonElement>): react_jsx_runtime.JSX.Element;
|
|
108
|
-
declare const contentVariants: (props?: ({
|
|
109
|
-
width?: "sm" | "md" | "lg" | null | undefined;
|
|
110
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
111
|
-
interface DialogContentProps extends HTMLAttributes<HTMLDialogElement>, VariantProps<typeof contentVariants> {
|
|
112
|
-
}
|
|
113
|
-
declare const DialogContent: react.ForwardRefExoticComponent<DialogContentProps & react.RefAttributes<HTMLDialogElement>>;
|
|
114
|
-
declare function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
115
|
-
declare function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
116
|
-
declare function DialogTitle({ className, ...props }: HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
|
|
117
|
-
declare function DialogDescription({ className, ...props }: HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
|
|
118
|
-
|
|
119
|
-
declare function Dropdown({ children }: {
|
|
120
|
-
children: ReactNode;
|
|
121
|
-
}): react_jsx_runtime.JSX.Element;
|
|
122
|
-
declare function DropdownTrigger({ children, ...props }: ButtonHTMLAttributes<HTMLButtonElement>): react_jsx_runtime.JSX.Element;
|
|
123
|
-
declare function DropdownContent({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element | null;
|
|
124
|
-
interface DropdownItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
125
|
-
icon?: LucideIcon;
|
|
126
|
-
variant?: 'default' | 'danger';
|
|
127
|
-
}
|
|
128
|
-
declare function DropdownItem({ className, icon: Icon, variant, children, onClick, ...props }: DropdownItemProps): react_jsx_runtime.JSX.Element;
|
|
129
|
-
|
|
130
|
-
declare function Tooltip({ children }: {
|
|
131
|
-
children: ReactNode;
|
|
132
|
-
}): react_jsx_runtime.JSX.Element;
|
|
133
|
-
declare function TooltipTrigger({ children, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
134
|
-
declare function TooltipContent({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
135
|
-
|
|
136
|
-
interface PopoverProps {
|
|
137
|
-
children: ReactNode;
|
|
138
|
-
open?: boolean;
|
|
139
|
-
onOpenChange?: (open: boolean) => void;
|
|
140
|
-
}
|
|
141
|
-
declare function Popover({ children, open: controlledOpen, onOpenChange }: PopoverProps): react_jsx_runtime.JSX.Element;
|
|
142
|
-
declare function PopoverTrigger({ children, ...props }: ButtonHTMLAttributes<HTMLButtonElement>): react_jsx_runtime.JSX.Element;
|
|
143
|
-
declare function PopoverContent({ className, children, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element | null;
|
|
144
|
-
|
|
145
|
-
interface TabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
146
|
-
value?: string;
|
|
147
|
-
onValueChange?: (value: string) => void;
|
|
148
|
-
defaultValue?: string;
|
|
149
|
-
}
|
|
150
|
-
declare function Tabs({ value: controlledValue, onValueChange, defaultValue, className, ...props }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
151
|
-
declare function TabsList({ className, ...props }: HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
152
|
-
interface TabsTriggerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
153
|
-
value: string;
|
|
154
|
-
}
|
|
155
|
-
declare function TabsTrigger({ value, className, ...props }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
156
|
-
interface TabsContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
157
|
-
value: string;
|
|
158
|
-
}
|
|
159
|
-
declare function TabsContent({ value, className, ...props }: TabsContentProps): react_jsx_runtime.JSX.Element | null;
|
|
160
|
-
|
|
161
|
-
interface ScrollAreaProps extends HTMLAttributes<HTMLDivElement> {
|
|
162
|
-
}
|
|
163
|
-
declare const ScrollArea: react.ForwardRefExoticComponent<ScrollAreaProps & react.RefAttributes<HTMLDivElement>>;
|
|
164
|
-
|
|
165
|
-
interface FloatingPanelProps {
|
|
166
|
-
/** Panel title displayed in the title bar */
|
|
167
|
-
title: string;
|
|
168
|
-
/** Called when the close button is clicked */
|
|
169
|
-
onClose: () => void;
|
|
170
|
-
/** Panel content */
|
|
171
|
-
children: ReactNode;
|
|
172
|
-
/** Default width in pixels */
|
|
173
|
-
defaultWidth?: number;
|
|
174
|
-
/** Default height in pixels */
|
|
175
|
-
defaultHeight?: number;
|
|
176
|
-
/** Minimum width in pixels */
|
|
177
|
-
minWidth?: number;
|
|
178
|
-
/** Minimum height in pixels */
|
|
179
|
-
minHeight?: number;
|
|
180
|
-
/** Offset index to stagger multiple panels (adds 30px offset per index) */
|
|
181
|
-
offsetIndex?: number;
|
|
182
|
-
/** Additional CSS classes for the panel container */
|
|
183
|
-
className?: string;
|
|
184
|
-
}
|
|
185
|
-
declare function FloatingPanel({ title, onClose, children, defaultWidth, defaultHeight, minWidth, minHeight, offsetIndex, className, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
|
|
186
|
-
|
|
187
|
-
type Status = 'online' | 'offline' | 'degraded' | 'unknown';
|
|
188
|
-
interface StatusBadgeProps {
|
|
189
|
-
status: Status;
|
|
190
|
-
showDot?: boolean;
|
|
191
|
-
showLabel?: boolean;
|
|
192
|
-
size?: 'sm' | 'md';
|
|
193
|
-
className?: string;
|
|
194
|
-
}
|
|
195
|
-
declare function StatusBadge({ status, showDot, showLabel, size, className, }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
196
|
-
|
|
197
|
-
interface ProviderBadgeProps {
|
|
198
|
-
provider: ProviderType;
|
|
199
|
-
showLabel?: boolean;
|
|
200
|
-
className?: string;
|
|
201
|
-
}
|
|
202
|
-
declare function ProviderBadge({ provider, showLabel, className, }: ProviderBadgeProps): react_jsx_runtime.JSX.Element;
|
|
203
|
-
|
|
204
|
-
type SemanticBadgeVariant = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
205
|
-
interface SemanticBadgeProps {
|
|
206
|
-
children: react__default.ReactNode;
|
|
207
|
-
variant?: SemanticBadgeVariant;
|
|
208
|
-
/** Use monospace font (good for versions, codes) */
|
|
209
|
-
mono?: boolean;
|
|
210
|
-
className?: string;
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* General-purpose badge with semantic color variants.
|
|
214
|
-
* Solid background with dark text for maximum contrast.
|
|
215
|
-
*/
|
|
216
|
-
declare function SemanticBadge({ children, variant, mono, className }: SemanticBadgeProps): react_jsx_runtime.JSX.Element;
|
|
217
|
-
interface VersionBadgeProps {
|
|
218
|
-
version: string;
|
|
219
|
-
preRelease?: boolean;
|
|
220
|
-
className?: string;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Version badge — auto-detects pre-release versions.
|
|
224
|
-
* Stable = success (green), Pre-release = warning (amber).
|
|
225
|
-
*/
|
|
226
|
-
declare function VersionBadge({ version, preRelease, className }: VersionBadgeProps): react_jsx_runtime.JSX.Element;
|
|
227
|
-
|
|
228
|
-
interface FormFieldProps {
|
|
229
|
-
label: string;
|
|
230
|
-
description?: string;
|
|
231
|
-
error?: string;
|
|
232
|
-
required?: boolean;
|
|
233
|
-
children: ReactNode;
|
|
234
|
-
orientation?: 'vertical' | 'horizontal';
|
|
235
|
-
className?: string;
|
|
236
|
-
}
|
|
237
|
-
declare function FormField({ label, description, error, required, children, orientation, className, }: FormFieldProps): react_jsx_runtime.JSX.Element;
|
|
238
|
-
|
|
239
|
-
interface PageHeaderProps {
|
|
240
|
-
title: string;
|
|
241
|
-
subtitle?: string;
|
|
242
|
-
actions?: ReactNode;
|
|
243
|
-
className?: string;
|
|
244
|
-
}
|
|
245
|
-
declare function PageHeader({ title, subtitle, actions, className }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
246
|
-
|
|
247
|
-
interface EmptyStateProps {
|
|
248
|
-
icon?: LucideIcon;
|
|
249
|
-
title: string;
|
|
250
|
-
description?: string;
|
|
251
|
-
action?: ReactNode;
|
|
252
|
-
className?: string;
|
|
253
|
-
}
|
|
254
|
-
declare function EmptyState({ icon: Icon, title, description, action, className, }: EmptyStateProps): react_jsx_runtime.JSX.Element;
|
|
255
|
-
|
|
256
|
-
interface ConfirmDialogProps {
|
|
257
|
-
title: string;
|
|
258
|
-
message: string;
|
|
259
|
-
confirmLabel?: string;
|
|
260
|
-
cancelLabel?: string;
|
|
261
|
-
onConfirm: () => void;
|
|
262
|
-
onCancel: () => void;
|
|
263
|
-
variant?: 'danger' | 'default';
|
|
264
|
-
open: boolean;
|
|
265
|
-
onOpenChange: (open: boolean) => void;
|
|
266
|
-
}
|
|
267
|
-
declare function ConfirmDialog({ title, message, confirmLabel, cancelLabel, onConfirm, onCancel, variant, open, onOpenChange, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
|
|
268
|
-
|
|
269
|
-
interface StatCardProps {
|
|
270
|
-
value: string | number;
|
|
271
|
-
label: string;
|
|
272
|
-
trend?: {
|
|
273
|
-
value: number;
|
|
274
|
-
direction: 'up' | 'down';
|
|
275
|
-
};
|
|
276
|
-
className?: string;
|
|
277
|
-
}
|
|
278
|
-
declare function StatCard({ value, label, trend, className }: StatCardProps): react_jsx_runtime.JSX.Element;
|
|
279
|
-
|
|
280
|
-
interface KeyValueListProps {
|
|
281
|
-
items: {
|
|
282
|
-
key: string;
|
|
283
|
-
value: ReactNode;
|
|
284
|
-
}[];
|
|
285
|
-
className?: string;
|
|
286
|
-
}
|
|
287
|
-
declare function KeyValueList({ items, className }: KeyValueListProps): react_jsx_runtime.JSX.Element;
|
|
288
|
-
|
|
289
|
-
interface CodeBlockProps {
|
|
290
|
-
children: string;
|
|
291
|
-
maxHeight?: number;
|
|
292
|
-
className?: string;
|
|
293
|
-
}
|
|
294
|
-
declare function CodeBlock({ children, maxHeight, className }: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
295
|
-
|
|
296
|
-
type FilterDef = {
|
|
297
|
-
type: 'search';
|
|
298
|
-
key: string;
|
|
299
|
-
placeholder?: string;
|
|
300
|
-
} | {
|
|
301
|
-
type: 'select';
|
|
302
|
-
key: string;
|
|
303
|
-
label: string;
|
|
304
|
-
options: {
|
|
305
|
-
value: string;
|
|
306
|
-
label: string;
|
|
307
|
-
}[];
|
|
308
|
-
} | {
|
|
309
|
-
type: 'badge-toggle';
|
|
310
|
-
key: string;
|
|
311
|
-
options: {
|
|
312
|
-
value: string;
|
|
313
|
-
label: string;
|
|
314
|
-
}[];
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
interface FilterBarProps {
|
|
318
|
-
filters: FilterDef[];
|
|
319
|
-
values: Record<string, unknown>;
|
|
320
|
-
onChange: (values: Record<string, unknown>) => void;
|
|
321
|
-
className?: string;
|
|
322
|
-
}
|
|
323
|
-
declare function FilterBar({ filters, values, onChange, className }: FilterBarProps): react_jsx_runtime.JSX.Element;
|
|
324
|
-
|
|
325
|
-
interface SidebarItemProps {
|
|
326
|
-
label: string;
|
|
327
|
-
icon: LucideIcon;
|
|
328
|
-
href: string;
|
|
329
|
-
badge?: string | number;
|
|
330
|
-
active?: boolean;
|
|
331
|
-
className?: string;
|
|
332
|
-
}
|
|
333
|
-
declare function SidebarItem({ label, icon: Icon, href, badge, active, className, }: SidebarItemProps): react_jsx_runtime.JSX.Element;
|
|
334
|
-
|
|
335
|
-
interface SidebarSection {
|
|
336
|
-
label?: string;
|
|
337
|
-
items: SidebarItemProps[];
|
|
338
|
-
}
|
|
339
|
-
interface SidebarProps {
|
|
340
|
-
logo?: ReactNode;
|
|
341
|
-
sections: SidebarSection[];
|
|
342
|
-
footer?: SidebarItemProps[];
|
|
343
|
-
className?: string;
|
|
344
|
-
}
|
|
345
|
-
declare function Sidebar({ logo, sections, footer, className }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
346
|
-
|
|
347
|
-
interface AppShellProps {
|
|
348
|
-
sidebar: SidebarProps;
|
|
349
|
-
header?: {
|
|
350
|
-
breadcrumbs?: {
|
|
351
|
-
label: string;
|
|
352
|
-
href?: string;
|
|
353
|
-
}[];
|
|
354
|
-
actions?: ReactNode;
|
|
355
|
-
};
|
|
356
|
-
children: ReactNode;
|
|
357
|
-
className?: string;
|
|
358
|
-
}
|
|
359
|
-
declare function AppShell({ sidebar, header, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
360
|
-
|
|
361
|
-
interface DataTableAction {
|
|
362
|
-
label: string;
|
|
363
|
-
icon?: LucideIcon;
|
|
364
|
-
onClick: () => void;
|
|
365
|
-
variant?: 'danger' | 'default';
|
|
366
|
-
}
|
|
367
|
-
interface DataTableProps<T> {
|
|
368
|
-
data: T[];
|
|
369
|
-
columns: ColumnDef<T, unknown>[];
|
|
370
|
-
sorting?: SortingState;
|
|
371
|
-
onSortingChange?: (sorting: SortingState) => void;
|
|
372
|
-
filtering?: ColumnFiltersState;
|
|
373
|
-
onFilteringChange?: (filtering: ColumnFiltersState) => void;
|
|
374
|
-
pagination?: {
|
|
375
|
-
page: number;
|
|
376
|
-
pageSize: number;
|
|
377
|
-
total: number;
|
|
378
|
-
};
|
|
379
|
-
onPaginationChange?: (pagination: PaginationState) => void;
|
|
380
|
-
loading?: boolean;
|
|
381
|
-
emptyState?: ReactNode;
|
|
382
|
-
rowActions?: (row: T) => DataTableAction[];
|
|
383
|
-
onRowClick?: (row: T) => void;
|
|
384
|
-
selectable?: boolean;
|
|
385
|
-
compact?: boolean;
|
|
386
|
-
stickyHeader?: boolean;
|
|
387
|
-
className?: string;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
declare function DataTable<T>({ data, columns: userColumns, sorting, onSortingChange, filtering, onFilteringChange, pagination, onPaginationChange, loading, emptyState, rowActions, onRowClick, selectable, compact, stickyHeader, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
391
|
-
|
|
392
|
-
interface DeviceCardBadge {
|
|
393
|
-
/** Badge label text */
|
|
394
|
-
label: string;
|
|
395
|
-
/** Optional icon rendered before the label */
|
|
396
|
-
icon?: ReactNode;
|
|
397
|
-
/** Click handler — makes the badge interactive */
|
|
398
|
-
onClick?: () => void;
|
|
399
|
-
}
|
|
400
|
-
interface DeviceCardAction {
|
|
401
|
-
/** Icon to render */
|
|
402
|
-
icon: ReactNode;
|
|
403
|
-
/** Tooltip / aria-label */
|
|
404
|
-
label: string;
|
|
405
|
-
/** Click handler */
|
|
406
|
-
onClick: () => void;
|
|
407
|
-
}
|
|
408
|
-
interface DeviceCardProps {
|
|
409
|
-
/** Primary title (e.g., device name) */
|
|
410
|
-
title: string;
|
|
411
|
-
/** Secondary text (e.g., model, IP) */
|
|
412
|
-
subtitle?: string;
|
|
413
|
-
/** Status: determines the color of the status dot */
|
|
414
|
-
status?: 'online' | 'offline' | 'warning' | 'unknown';
|
|
415
|
-
/** Whether this card is currently selected */
|
|
416
|
-
selected?: boolean;
|
|
417
|
-
/** Click handler for the card body */
|
|
418
|
-
onClick?: () => void;
|
|
419
|
-
/** Clickable badges (e.g., stream profiles) */
|
|
420
|
-
badges?: DeviceCardBadge[];
|
|
421
|
-
/** Action icons shown at the bottom (e.g., PTZ, events) */
|
|
422
|
-
actions?: DeviceCardAction[];
|
|
423
|
-
/** Content rendered at the bottom when status is offline (e.g., Connect button) */
|
|
424
|
-
offlineAction?: ReactNode;
|
|
425
|
-
/** Additional CSS classes */
|
|
426
|
-
className?: string;
|
|
427
|
-
}
|
|
428
|
-
declare function DeviceCard({ title, subtitle, status, selected, onClick, badges, actions, offlineAction, className, }: DeviceCardProps): react_jsx_runtime.JSX.Element;
|
|
429
|
-
|
|
430
|
-
interface DeviceGridProps {
|
|
431
|
-
/** Grid items */
|
|
432
|
-
children: ReactNode;
|
|
433
|
-
/** Minimum card width in pixels (default 220) */
|
|
434
|
-
minCardWidth?: number;
|
|
435
|
-
/** Gap between cards in Tailwind spacing units (default 3) */
|
|
436
|
-
gap?: number;
|
|
437
|
-
/** Additional CSS classes */
|
|
438
|
-
className?: string;
|
|
439
|
-
}
|
|
440
|
-
declare function DeviceGrid({ children, minCardWidth, gap, className, }: DeviceGridProps): react_jsx_runtime.JSX.Element;
|
|
441
|
-
|
|
442
|
-
interface PipelineStepDisplayConfig {
|
|
443
|
-
readonly addonId: string;
|
|
444
|
-
readonly addonName: string;
|
|
445
|
-
readonly slot: PipelineSlot;
|
|
446
|
-
readonly inputClasses: readonly string[];
|
|
447
|
-
readonly outputClasses: readonly string[];
|
|
448
|
-
readonly enabled: boolean;
|
|
449
|
-
readonly agentId: string;
|
|
450
|
-
readonly runtime: string;
|
|
451
|
-
readonly backend: string;
|
|
452
|
-
readonly modelId: string;
|
|
453
|
-
readonly confidence: number;
|
|
454
|
-
readonly classFilters: readonly string[];
|
|
455
|
-
readonly children: readonly PipelineStepDisplayConfig[];
|
|
456
|
-
}
|
|
457
|
-
interface PipelineStepProps {
|
|
458
|
-
readonly step: PipelineStepDisplayConfig;
|
|
459
|
-
readonly schema: PipelineAddonSchema | null;
|
|
460
|
-
/** Full schema map so children can look up their own schema */
|
|
461
|
-
readonly allSchemas: ReadonlyMap<string, PipelineAddonSchema>;
|
|
462
|
-
readonly capabilities: InferenceCapabilities;
|
|
463
|
-
readonly depth?: number;
|
|
464
|
-
readonly onChange: (updated: PipelineStepDisplayConfig) => void;
|
|
465
|
-
readonly onDelete?: (addonId: string) => void;
|
|
466
|
-
readonly readOnly?: boolean;
|
|
467
|
-
}
|
|
468
|
-
declare function PipelineStep({ step, schema, allSchemas, capabilities, depth, onChange, onDelete, readOnly, }: PipelineStepProps): react_jsx_runtime.JSX.Element;
|
|
469
|
-
|
|
470
|
-
interface PipelineRuntimeOption {
|
|
471
|
-
readonly id: string;
|
|
472
|
-
readonly label: string;
|
|
473
|
-
readonly available: boolean;
|
|
474
|
-
/** Platform score for this backend (higher = better) */
|
|
475
|
-
readonly platformScore?: number;
|
|
476
|
-
/** Whether this is the best-scored backend */
|
|
477
|
-
readonly isBest?: boolean;
|
|
478
|
-
}
|
|
479
|
-
interface PipelineRuntimeSelectorProps {
|
|
480
|
-
readonly options: readonly PipelineRuntimeOption[];
|
|
481
|
-
readonly value: string;
|
|
482
|
-
readonly onChange: (value: string) => void;
|
|
483
|
-
}
|
|
484
|
-
declare function PipelineRuntimeSelector({ options, value, onChange }: PipelineRuntimeSelectorProps): react_jsx_runtime.JSX.Element;
|
|
485
|
-
|
|
486
|
-
interface PipelineBuilderProps {
|
|
487
|
-
readonly schema: PipelineSchema;
|
|
488
|
-
readonly capabilities: InferenceCapabilities;
|
|
489
|
-
readonly steps: readonly PipelineStepDisplayConfig[];
|
|
490
|
-
readonly onChange: (steps: readonly PipelineStepDisplayConfig[]) => void;
|
|
491
|
-
readonly templates: readonly PipelineTemplate[];
|
|
492
|
-
readonly selectedTemplateId: string | null;
|
|
493
|
-
readonly onSelectTemplate: (id: string | null) => void;
|
|
494
|
-
readonly onSaveTemplate: (name: string, steps: readonly PipelineStepDisplayConfig[]) => void;
|
|
495
|
-
readonly onUpdateTemplate: (id: string, steps: readonly PipelineStepDisplayConfig[]) => void;
|
|
496
|
-
readonly onDeleteTemplate: (id: string) => void;
|
|
497
|
-
readonly readOnly?: boolean;
|
|
498
|
-
/** Addon IDs to exclude from the pipeline (e.g. 'motion-detection' for benchmark) */
|
|
499
|
-
readonly excludeAddons?: readonly string[];
|
|
500
|
-
}
|
|
501
|
-
declare function PipelineBuilder({ schema, capabilities, steps, onChange, templates, selectedTemplateId, onSelectTemplate, onSaveTemplate, onUpdateTemplate, onDeleteTemplate, readOnly, excludeAddons, }: PipelineBuilderProps): react_jsx_runtime.JSX.Element;
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* Detection class colors — single source of truth.
|
|
505
|
-
*
|
|
506
|
-
* Used by: DetectionCanvas (UI), result-annotator (server-side SVG),
|
|
507
|
-
* admin-ui event viewer, and any other place that visualizes detections.
|
|
508
|
-
*/
|
|
509
|
-
/** Fixed colors for known detection classes */
|
|
510
|
-
declare const CLASS_COLORS: Readonly<Record<string, string>>;
|
|
511
|
-
/** Primary/default color when nothing else matches */
|
|
512
|
-
declare const DEFAULT_COLOR = "#f59e42";
|
|
513
|
-
/**
|
|
514
|
-
* Get the color for a detection class name.
|
|
515
|
-
* Returns a fixed color for known classes, or a deterministic hash-based color for unknown ones.
|
|
516
|
-
*/
|
|
517
|
-
declare function getClassColor(className: string, customColors?: Readonly<Record<string, string>>): string;
|
|
518
|
-
|
|
519
|
-
/** @deprecated Use CLASS_COLORS from detection-colors instead */
|
|
520
|
-
declare const DEFAULT_CLASS_COLORS: Readonly<Record<string, string>>;
|
|
521
|
-
|
|
522
|
-
interface Detection {
|
|
523
|
-
/** Display class name (e.g., 'person', 'vehicle', 'face') */
|
|
524
|
-
readonly className: string;
|
|
525
|
-
/** Confidence score 0-1 */
|
|
526
|
-
readonly confidence: number;
|
|
527
|
-
/** Bounding box [x1, y1, x2, y2] in pixel coordinates */
|
|
528
|
-
readonly bbox: readonly [number, number, number, number];
|
|
529
|
-
/** Sub-detections from cropper steps (face box, plate box) — for debug */
|
|
530
|
-
readonly children?: readonly Detection[];
|
|
531
|
-
/** Accumulated labels from all classifier/recognizer steps */
|
|
532
|
-
readonly labelsData?: readonly LabelData[];
|
|
533
|
-
/** Base64-encoded binary segmentation mask (from -seg models) */
|
|
534
|
-
readonly mask?: string;
|
|
535
|
-
/** Mask pixel width */
|
|
536
|
-
readonly maskWidth?: number;
|
|
537
|
-
/** Mask pixel height */
|
|
538
|
-
readonly maskHeight?: number;
|
|
539
|
-
}
|
|
540
|
-
interface DetectionCanvasProps {
|
|
541
|
-
/** Image source (data URL or regular URL) */
|
|
542
|
-
readonly src: string | null;
|
|
543
|
-
/** Image dimensions (used for bbox coordinate mapping) */
|
|
544
|
-
readonly imageWidth: number;
|
|
545
|
-
readonly imageHeight: number;
|
|
546
|
-
/** Detections to overlay */
|
|
547
|
-
readonly detections?: readonly Detection[];
|
|
548
|
-
/** Custom class → hex color mapping (merged with defaults) */
|
|
549
|
-
readonly classColors?: Readonly<Record<string, string>>;
|
|
550
|
-
/** Aspect ratio CSS value (default: auto based on image dimensions) */
|
|
551
|
-
readonly aspectRatio?: string;
|
|
552
|
-
/** Additional CSS classes on the container */
|
|
553
|
-
readonly className?: string;
|
|
554
|
-
/** Placeholder content when no image is loaded */
|
|
555
|
-
readonly placeholder?: ReactNode;
|
|
556
|
-
/** Show confidence percentage in bbox labels */
|
|
557
|
-
readonly showConfidence?: boolean;
|
|
558
|
-
/** Minimum confidence to display (0-1, default: 0) */
|
|
559
|
-
readonly minConfidence?: number;
|
|
560
|
-
/** Border width for bboxes in px (default: 2) */
|
|
561
|
-
readonly borderWidth?: number;
|
|
562
|
-
}
|
|
563
|
-
declare function DetectionCanvas({ src, imageWidth, imageHeight, detections, classColors, aspectRatio, className, placeholder, showConfidence, minConfidence, borderWidth, }: DetectionCanvasProps): react_jsx_runtime.JSX.Element;
|
|
564
|
-
|
|
565
|
-
interface DetectionResultTreeProps {
|
|
566
|
-
readonly detections: readonly Detection[];
|
|
567
|
-
readonly classColors?: Readonly<Record<string, string>>;
|
|
568
|
-
readonly className?: string;
|
|
569
|
-
/** Set of detection path keys that are hidden (e.g., "0", "0.1", "0.1.2") */
|
|
570
|
-
readonly hiddenKeys?: ReadonlySet<string>;
|
|
571
|
-
/** Callback when a detection's visibility is toggled */
|
|
572
|
-
readonly onToggleVisibility?: (key: string, visible: boolean) => void;
|
|
573
|
-
}
|
|
574
|
-
declare function DetectionResultTree({ detections, classColors, className, hiddenKeys, onToggleVisibility, }: DetectionResultTreeProps): react_jsx_runtime.JSX.Element;
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
* StepTimings — displays pipeline execution timings per step.
|
|
578
|
-
*/
|
|
579
|
-
interface StepTimingsProps {
|
|
580
|
-
readonly timings: Readonly<Record<string, number>>;
|
|
581
|
-
readonly totalMs?: number;
|
|
582
|
-
readonly className?: string;
|
|
583
|
-
}
|
|
584
|
-
declare function StepTimings({ timings, totalMs, className }: StepTimingsProps): react_jsx_runtime.JSX.Element | null;
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* ImageSelector — select from reference images or upload custom image.
|
|
588
|
-
* Used by benchmark Image Tester and any addon page that needs image input.
|
|
589
|
-
*/
|
|
590
|
-
interface ReferenceImage {
|
|
591
|
-
readonly id: string;
|
|
592
|
-
readonly filename: string;
|
|
593
|
-
readonly sizeKB?: number;
|
|
594
|
-
}
|
|
595
|
-
interface ImageSelectorProps {
|
|
596
|
-
readonly images: readonly ReferenceImage[];
|
|
597
|
-
readonly selectedFilename: string;
|
|
598
|
-
readonly uploadedName?: string;
|
|
599
|
-
readonly onSelect: (filename: string) => void;
|
|
600
|
-
readonly onUpload: (base64: string, filename: string, dataUrl: string) => void;
|
|
601
|
-
readonly className?: string;
|
|
602
|
-
}
|
|
603
|
-
declare function ImageSelector({ images, selectedFilename, uploadedName, onSelect, onUpload, className, }: ImageSelectorProps): react_jsx_runtime.JSX.Element;
|
|
604
|
-
|
|
605
|
-
/**
|
|
606
|
-
* InferenceConfigSelector — cascading selectors for runtime/backend/model.
|
|
607
|
-
*
|
|
608
|
-
* Used by benchmark Engine tab, Image Tester pipeline steps, and admin-ui
|
|
609
|
-
* pipeline configuration. Shows only valid combinations based on capabilities.
|
|
610
|
-
*/
|
|
611
|
-
interface InferenceBackendOption {
|
|
612
|
-
readonly id: string;
|
|
613
|
-
readonly label: string;
|
|
614
|
-
readonly available: boolean;
|
|
615
|
-
}
|
|
616
|
-
interface InferenceModelOption {
|
|
617
|
-
readonly id: string;
|
|
618
|
-
readonly name: string;
|
|
619
|
-
readonly downloaded?: boolean;
|
|
620
|
-
}
|
|
621
|
-
interface InferenceAgentOption {
|
|
622
|
-
readonly id: string;
|
|
623
|
-
readonly name: string;
|
|
624
|
-
readonly status: 'online' | 'offline' | 'busy';
|
|
625
|
-
}
|
|
626
|
-
interface InferenceConfigSelectorProps {
|
|
627
|
-
readonly runtime: 'node' | 'python';
|
|
628
|
-
readonly backend: string;
|
|
629
|
-
readonly modelId: string;
|
|
630
|
-
readonly agentId?: string;
|
|
631
|
-
readonly runtimes: readonly {
|
|
632
|
-
value: string;
|
|
633
|
-
label: string;
|
|
634
|
-
available: boolean;
|
|
635
|
-
}[];
|
|
636
|
-
readonly backends: readonly InferenceBackendOption[];
|
|
637
|
-
readonly models: readonly InferenceModelOption[];
|
|
638
|
-
readonly agents?: readonly InferenceAgentOption[];
|
|
639
|
-
readonly onRuntimeChange: (rt: 'node' | 'python') => void;
|
|
640
|
-
readonly onBackendChange: (id: string) => void;
|
|
641
|
-
readonly onModelChange: (id: string) => void;
|
|
642
|
-
readonly onAgentChange?: (id: string) => void;
|
|
643
|
-
readonly layout?: 'horizontal' | 'vertical' | 'grid';
|
|
644
|
-
readonly className?: string;
|
|
645
|
-
/** Show agent selector (default: false) */
|
|
646
|
-
readonly showAgent?: boolean;
|
|
647
|
-
}
|
|
648
|
-
declare function InferenceConfigSelector({ runtime, backend, modelId, agentId, runtimes, backends, models, agents, onRuntimeChange, onBackendChange, onModelChange, onAgentChange, layout, className, showAgent, }: InferenceConfigSelectorProps): react_jsx_runtime.JSX.Element;
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
* Standard props for addon page components.
|
|
652
|
-
*
|
|
653
|
-
* Every addon page receives these props from the AddonPageLoader in admin-ui.
|
|
654
|
-
* Use this type for your page's default export:
|
|
655
|
-
*
|
|
656
|
-
* ```tsx
|
|
657
|
-
* import type { AddonPageProps } from '@camstack/ui'
|
|
658
|
-
*
|
|
659
|
-
* export default function MyAddonPage({ trpc, theme, navigate }: AddonPageProps) {
|
|
660
|
-
* return <div>Hello from my addon!</div>
|
|
661
|
-
* }
|
|
662
|
-
* ```
|
|
663
|
-
*/
|
|
664
|
-
interface AddonPageProps {
|
|
665
|
-
/** tRPC client — fully typed access to all backend routes */
|
|
666
|
-
readonly trpc: any;
|
|
667
|
-
/** Current theme state */
|
|
668
|
-
readonly theme: {
|
|
669
|
-
readonly isDark: boolean;
|
|
670
|
-
};
|
|
671
|
-
/** Navigate to a route within the admin UI */
|
|
672
|
-
readonly navigate: (path: string) => void;
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
interface MountAddonPageOptions {
|
|
676
|
-
/** Backend server URL (default: 'https://localhost:4443') */
|
|
677
|
-
serverUrl?: string;
|
|
678
|
-
/** Title shown in the dev toolbar */
|
|
679
|
-
title?: string;
|
|
680
|
-
/** Root element ID (default: 'root') */
|
|
681
|
-
rootId?: string;
|
|
682
|
-
}
|
|
683
|
-
/**
|
|
684
|
-
* Mount an addon page component with the full dev shell.
|
|
685
|
-
*
|
|
686
|
-
* @param PageComponent - The addon page component (must accept AddonPageProps)
|
|
687
|
-
* @param options - Configuration options
|
|
688
|
-
*/
|
|
689
|
-
declare function mountAddonPage(PageComponent: (props: AddonPageProps) => any, options?: MountAddonPageOptions): void;
|
|
690
|
-
|
|
691
|
-
interface LoginFormProps {
|
|
692
|
-
onLogin: (username: string, password: string) => Promise<void>;
|
|
693
|
-
serverUrl?: string;
|
|
694
|
-
logoSrc?: string;
|
|
695
|
-
error?: string;
|
|
696
|
-
className?: string;
|
|
697
|
-
}
|
|
698
|
-
declare function LoginForm({ onLogin, serverUrl, logoSrc, error: externalError, className, }: LoginFormProps): react_jsx_runtime.JSX.Element;
|
|
699
|
-
|
|
700
|
-
interface DevShellProps {
|
|
701
|
-
children: (props: {
|
|
702
|
-
trpc: ReturnType<typeof createTRPCClient>;
|
|
703
|
-
theme: UseThemeModeReturn;
|
|
704
|
-
}) => ReactNode;
|
|
705
|
-
serverUrl?: string;
|
|
706
|
-
title?: string;
|
|
707
|
-
}
|
|
708
|
-
interface DevShellContextValue {
|
|
709
|
-
trpc: ReturnType<typeof createTRPCClient>;
|
|
710
|
-
token: string;
|
|
711
|
-
logout: () => void;
|
|
712
|
-
}
|
|
713
|
-
declare function useDevShell(): DevShellContextValue;
|
|
714
|
-
declare function DevShell({ children, serverUrl, title, }: DevShellProps): react_jsx_runtime.JSX.Element;
|
|
715
|
-
|
|
716
|
-
export { type AddonPageProps, AppShell, type AppShellProps, Badge, type BadgeProps, Button, type ButtonProps, CLASS_COLORS, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_CLASS_COLORS, DEFAULT_COLOR, DataTable, type DataTableAction, type DataTableProps, type Detection, DetectionCanvas, type DetectionCanvasProps, DetectionResultTree, type DetectionResultTreeProps, DevShell, type DevShellProps, DeviceCard, type DeviceCardAction, type DeviceCardBadge, type DeviceCardProps, DeviceGrid, type DeviceGridProps, Dialog, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterDef, FloatingPanel, type FloatingPanelProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, ImageSelector, type ImageSelectorProps, type InferenceAgentOption, type InferenceBackendOption, InferenceConfigSelector, type InferenceConfigSelectorProps, type InferenceModelOption, Input, type InputProps, KeyValueList, type KeyValueListProps, Label, type LabelProps, LoginForm, type LoginFormProps, type MountAddonPageOptions, PageHeader, type PageHeaderProps, PipelineBuilder, type PipelineBuilderProps, type PipelineRuntimeOption, PipelineRuntimeSelector, PipelineStep, type PipelineStepDisplayConfig, type PipelineStepProps, Popover, PopoverContent, PopoverTrigger, ProviderBadge, type ProviderBadgeProps, type ProviderType, type ReferenceImage, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, SemanticBadge, type SemanticBadgeProps, type SemanticBadgeVariant, Separator, type SeparatorProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSection, Skeleton, type SkeletonProps, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusType, StepTimings, type StepTimingsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, UseThemeModeReturn, VersionBadge, type VersionBadgeProps, cn, getClassColor, mountAddonPage, providerIcons, statusIcons, useDevShell };
|