@salilvnair/dui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/chunks/EditorView.shell-BGH2VhWM.js +460 -0
- package/dist/chunks/EditorView.shell-BGH2VhWM.js.map +1 -0
- package/dist/chunks/daakia-icons-DxWnX_IQ.js +1726 -0
- package/dist/chunks/daakia-icons-DxWnX_IQ.js.map +1 -0
- package/dist/icons/daakia-icons.d.ts +304 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +17032 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/components/button/AIButtonView.d.ts +20 -0
- package/dist/lib/components/button/ButtonView.d.ts +28 -0
- package/dist/lib/components/button/DropDownButtonView.d.ts +19 -0
- package/dist/lib/components/button/IconButtonView.d.ts +22 -0
- package/dist/lib/components/button/SegmentedView.d.ts +17 -0
- package/dist/lib/components/button/SplitButtonView.d.ts +23 -0
- package/dist/lib/components/chips/ChipView.d.ts +21 -0
- package/dist/lib/components/display/CodeBlockView.d.ts +11 -0
- package/dist/lib/components/display/ColoredTextView.d.ts +18 -0
- package/dist/lib/components/display/CopyButtonView.d.ts +11 -0
- package/dist/lib/components/display/DataTableView.d.ts +27 -0
- package/dist/lib/components/display/DottedCardView.d.ts +10 -0
- package/dist/lib/components/display/EmptyStateView.d.ts +14 -0
- package/dist/lib/components/display/ExpandableLogEntryView.d.ts +14 -0
- package/dist/lib/components/display/FeatureCategoryView.d.ts +18 -0
- package/dist/lib/components/display/HudView.d.ts +25 -0
- package/dist/lib/components/display/JsonTreeView.d.ts +11 -0
- package/dist/lib/components/display/LiveColorCustomizer.d.ts +21 -0
- package/dist/lib/components/display/LoaderView.d.ts +12 -0
- package/dist/lib/components/display/MarkdownView.d.ts +19 -0
- package/dist/lib/components/display/PromptCardView.d.ts +33 -0
- package/dist/lib/components/display/PromptLibraryEditorView.d.ts +32 -0
- package/dist/lib/components/display/PromptLibraryListView.d.ts +30 -0
- package/dist/lib/components/display/StageView.d.ts +26 -0
- package/dist/lib/components/display/StatsCardView.d.ts +15 -0
- package/dist/lib/components/display/StatusIndicatorView.d.ts +14 -0
- package/dist/lib/components/display/ToastView.d.ts +19 -0
- package/dist/lib/components/display/YamlKeyChip.d.ts +15 -0
- package/dist/lib/components/input/CheckboxView.d.ts +15 -0
- package/dist/lib/components/input/DebugEditorView.d.ts +26 -0
- package/dist/lib/components/input/DiffEditorView.d.ts +18 -0
- package/dist/lib/components/input/DiffEditorView.fallback.d.ts +2 -0
- package/dist/lib/components/input/DiffEditorView.monaco.d.ts +2 -0
- package/dist/lib/components/input/DurationInputView.d.ts +15 -0
- package/dist/lib/components/input/EditorView.d.ts +222 -0
- package/dist/lib/components/input/EditorView.fallback.d.ts +10 -0
- package/dist/lib/components/input/EditorView.monaco.d.ts +2 -0
- package/dist/lib/components/input/EditorView.shell.d.ts +13 -0
- package/dist/lib/components/input/FormDataTableView.d.ts +22 -0
- package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +22 -0
- package/dist/lib/components/input/HighlightedInputView.d.ts +26 -0
- package/dist/lib/components/input/KeyValueTableRowView.d.ts +31 -0
- package/dist/lib/components/input/KeyValueTableView.d.ts +59 -0
- package/dist/lib/components/input/MergedInputView.d.ts +43 -0
- package/dist/lib/components/input/MultilineInputView.d.ts +15 -0
- package/dist/lib/components/input/SearchInputView.d.ts +17 -0
- package/dist/lib/components/input/SegmentedControlView.d.ts +23 -0
- package/dist/lib/components/input/SelectInputView.d.ts +31 -0
- package/dist/lib/components/input/SelectTextInputView.d.ts +44 -0
- package/dist/lib/components/input/SliderView.d.ts +15 -0
- package/dist/lib/components/input/TabView.d.ts +28 -0
- package/dist/lib/components/input/TagInputView.d.ts +10 -0
- package/dist/lib/components/input/TextInputView.d.ts +36 -0
- package/dist/lib/components/input/ThemeCardSelectorView.d.ts +18 -0
- package/dist/lib/components/input/ToggleSwitchView.d.ts +19 -0
- package/dist/lib/components/layout/BottomPanelView.d.ts +16 -0
- package/dist/lib/components/layout/CollapsibleSectionView.d.ts +14 -0
- package/dist/lib/components/layout/DebugView.d.ts +63 -0
- package/dist/lib/components/layout/FolderView.d.ts +85 -0
- package/dist/lib/components/layout/ResizablePanelView.d.ts +10 -0
- package/dist/lib/components/layout/SettingsNavView.d.ts +29 -0
- package/dist/lib/components/layout/SideNavView.d.ts +39 -0
- package/dist/lib/components/layout/SpacerView.d.ts +7 -0
- package/dist/lib/components/layout/SplitPanelView.d.ts +33 -0
- package/dist/lib/components/modal/ContextMenuView.d.ts +28 -0
- package/dist/lib/components/modal/InfoPopupView.d.ts +17 -0
- package/dist/lib/components/modal/ModalView.d.ts +41 -0
- package/dist/lib/components/rearrange/RearrangeView.d.ts +34 -0
- package/dist/lib/components/tabs/PilledTabView.d.ts +19 -0
- package/dist/lib/components/tabs/TabBarView.d.ts +28 -0
- package/dist/lib/components/tabs/TabView.d.ts +34 -0
- package/dist/lib/core/ButtonBase.d.ts +28 -0
- package/dist/lib/core/CardBase.d.ts +21 -0
- package/dist/lib/core/ChipBase.d.ts +21 -0
- package/dist/lib/core/DisplayBase.d.ts +21 -0
- package/dist/lib/core/DuiContext.d.ts +53 -0
- package/dist/lib/core/DuiTokens.d.ts +115 -0
- package/dist/lib/core/DuiTypes.d.ts +29 -0
- package/dist/lib/core/EditorBase.d.ts +13 -0
- package/dist/lib/core/InputBase.d.ts +25 -0
- package/dist/lib/core/MenuBase.d.ts +23 -0
- package/dist/lib/core/NavBase.d.ts +26 -0
- package/dist/lib/core/OverlayBase.d.ts +20 -0
- package/dist/lib/core/SelectBase.d.ts +22 -0
- package/dist/lib/core/TabBase.d.ts +25 -0
- package/dist/lib/core/TableBase.d.ts +19 -0
- package/dist/lib/core/ToggleBase.d.ts +19 -0
- package/dist/lib/core/index.d.ts +25 -0
- package/dist/lib/index.d.ts +159 -0
- package/dist/lib/monaco-runtime.d.ts +29 -0
- package/dist/lib/theme/core.d.ts +8 -0
- package/dist/lib/theme/editor.d.ts +11 -0
- package/dist/lib/theme/utils.d.ts +6 -0
- package/dist/monaco-setup.d.ts +4 -0
- package/dist/monaco-setup.js +883 -0
- package/dist/monaco-setup.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/style.js +2 -0
- package/dist/style.js.map +1 -0
- package/dist/theme/core.js +191 -0
- package/dist/theme/core.js.map +1 -0
- package/dist/theme/editor.js +104 -0
- package/dist/theme/editor.js.map +1 -0
- package/dist/theme/utils.js +67 -0
- package/dist/theme/utils.js.map +1 -0
- package/package.json +81 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from '../../core/DuiTypes';
|
|
2
|
+
export type AIButtonAction = 'generate' | 'fuzz' | 'explain' | 'fix' | 'ask' | 'suggest';
|
|
3
|
+
export interface AIButtonViewProps {
|
|
4
|
+
action?: AIButtonAction;
|
|
5
|
+
label?: string;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Falls back to DuiProvider size when omitted. */
|
|
10
|
+
size?: DuiSize;
|
|
11
|
+
/** Shorthand for size="sm" — kept for backwards compat. */
|
|
12
|
+
compact?: boolean;
|
|
13
|
+
accentColor?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
width?: DuiWidth;
|
|
16
|
+
borderRadius?: DuiRadius | number;
|
|
17
|
+
color?: string;
|
|
18
|
+
fontStyle?: DuiFontStyle;
|
|
19
|
+
}
|
|
20
|
+
export declare function AIButtonView({ action, label, onClick, loading, disabled, size, compact, accentColor, className, width, borderRadius, color, fontStyle, }: AIButtonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { DuiSize, DuiWidth, DuiRadius, DuiFontStyle } from '../../core/DuiTypes';
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'accent';
|
|
4
|
+
/** `'default'` is kept for backwards-compat and resolves to context size. */
|
|
5
|
+
export type ButtonSize = 'default' | DuiSize;
|
|
6
|
+
export interface ButtonViewProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
size?: ButtonSize;
|
|
9
|
+
/** true = token border-radius (default), false = 0px (square) */
|
|
10
|
+
rounded?: boolean;
|
|
11
|
+
iconLeft?: ReactNode;
|
|
12
|
+
iconRight?: ReactNode;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
/** Override accent color for primary/focus ring */
|
|
15
|
+
accentColor?: string;
|
|
16
|
+
/** Alias for children — shown as button label text */
|
|
17
|
+
label?: string;
|
|
18
|
+
width?: DuiWidth;
|
|
19
|
+
borderRadius?: DuiRadius | number;
|
|
20
|
+
/** Text color override */
|
|
21
|
+
color?: string;
|
|
22
|
+
/** Primary/accent color (alias for accentColor with context-level support) */
|
|
23
|
+
defaultColor?: string;
|
|
24
|
+
/** Color for active/focus ring state */
|
|
25
|
+
activeColor?: string;
|
|
26
|
+
fontStyle?: DuiFontStyle;
|
|
27
|
+
}
|
|
28
|
+
export declare function ButtonView({ variant, size, rounded, iconLeft, iconRight, loading, accentColor, label, children, disabled, style, className, width, borderRadius, color, defaultColor, activeColor, fontStyle, ...rest }: ButtonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ButtonVariant, ButtonSize } from './ButtonView';
|
|
2
|
+
import { ContextMenuItem } from '../modal/ContextMenuView';
|
|
3
|
+
export interface DropDownButtonViewProps {
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional icon shown to the left of the label text */
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
/** Falls back to DuiProvider size when omitted or 'default'. */
|
|
9
|
+
size?: ButtonSize;
|
|
10
|
+
rounded?: boolean;
|
|
11
|
+
items: ContextMenuItem[];
|
|
12
|
+
accentColor?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onPrimaryClick?: () => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
/** Dropdown alignment. 'right' keeps menu right-edge aligned with button (opens leftward). */
|
|
17
|
+
align?: 'auto' | 'left' | 'right';
|
|
18
|
+
}
|
|
19
|
+
export declare function DropDownButtonView({ label, icon, variant, size, rounded, items, accentColor, disabled, onPrimaryClick, className, align, }: DropDownButtonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { DuiRadius } from '../../core/DuiTypes';
|
|
3
|
+
export type IconButtonSize = 'default' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
|
+
export type IconButtonVariant = 'ghost' | 'filled';
|
|
5
|
+
export interface IconButtonViewProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
icon: ReactNode;
|
|
7
|
+
size?: IconButtonSize;
|
|
8
|
+
/** true = 4px radius (default), false = 0px */
|
|
9
|
+
rounded?: boolean;
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
variant?: IconButtonVariant;
|
|
12
|
+
/** Override accent color */
|
|
13
|
+
accentColor?: string;
|
|
14
|
+
/** Color when active=true */
|
|
15
|
+
activeColor?: string;
|
|
16
|
+
/** Shows active state */
|
|
17
|
+
active?: boolean;
|
|
18
|
+
borderRadius?: DuiRadius | number;
|
|
19
|
+
/** Text/icon color override */
|
|
20
|
+
color?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function IconButtonView({ icon, size, rounded, tooltip, variant, accentColor, activeColor, active, disabled, style, className, borderRadius, color, ...rest }: IconButtonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
3
|
+
export interface SegmentedOption {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface SegmentedViewProps {
|
|
9
|
+
options: SegmentedOption[];
|
|
10
|
+
value: string;
|
|
11
|
+
onChange: (id: string) => void;
|
|
12
|
+
size?: DuiSize;
|
|
13
|
+
accentColor?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function SegmentedView({ options, value, onChange, size, accentColor, className, style, }: SegmentedViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
2
|
+
export interface SplitButtonViewItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
iconColor?: string;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
dividerBefore?: boolean;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}
|
|
11
|
+
export type SplitButtonViewVariant = 'primary' | 'secondary' | 'danger';
|
|
12
|
+
export interface SplitButtonViewProps {
|
|
13
|
+
label: string;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
variant?: SplitButtonViewVariant;
|
|
16
|
+
items: SplitButtonViewItem[];
|
|
17
|
+
onClick: () => void;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Falls back to DuiProvider size when omitted. */
|
|
20
|
+
size?: DuiSize;
|
|
21
|
+
accentColor?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare function SplitButtonView({ label, icon, variant, items, onClick, disabled, size, accentColor, }: SplitButtonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
3
|
+
/** `'xs'` is a sub-sm alias kept for dense protocol badges. */
|
|
4
|
+
export type ChipViewSize = 'xs' | DuiSize;
|
|
5
|
+
export interface ChipViewProps {
|
|
6
|
+
label: string;
|
|
7
|
+
/** CSS variable or raw color value — drives text, border, and auto-derived bg */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Override background explicitly instead of deriving from color */
|
|
10
|
+
bg?: string;
|
|
11
|
+
/** Size — falls back to DuiProvider context when omitted (resolves to 'sm' equivalent). */
|
|
12
|
+
size?: ChipViewSize;
|
|
13
|
+
/** true = rounded-full (default), false = token border-radius */
|
|
14
|
+
rounded?: boolean;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
/** Filled background instead of translucent */
|
|
17
|
+
active?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
export declare function ChipView({ label, color, bg, size, rounded, onClick, active, className, style, }: ChipViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CodeBlockViewProps {
|
|
2
|
+
code: string;
|
|
3
|
+
language?: string;
|
|
4
|
+
showCopyButton?: boolean;
|
|
5
|
+
showLineNumbers?: boolean;
|
|
6
|
+
maxHeight?: string;
|
|
7
|
+
accentColor?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function CodeBlockView({ code, language, showCopyButton, showLineNumbers, maxHeight, accentColor, className, style, }: CodeBlockViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ColorToken {
|
|
2
|
+
text: string;
|
|
3
|
+
color?: string;
|
|
4
|
+
bold?: boolean;
|
|
5
|
+
italic?: boolean;
|
|
6
|
+
mono?: boolean;
|
|
7
|
+
underline?: boolean;
|
|
8
|
+
copyable?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface ColoredTextViewProps {
|
|
11
|
+
tokens: ColorToken[];
|
|
12
|
+
fontSize?: string;
|
|
13
|
+
lineHeight?: number;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export declare function ColoredTextView({ tokens, fontSize, lineHeight, className, style, }: ColoredTextViewProps): import("react").JSX.Element;
|
|
18
|
+
export declare function parseXmlTokens(xml: string): ColorToken[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
2
|
+
export interface CopyButtonViewProps {
|
|
3
|
+
text: string;
|
|
4
|
+
/** DUI size token — controls button dimensions and icon size (default: 'md') */
|
|
5
|
+
size?: DuiSize;
|
|
6
|
+
title?: string;
|
|
7
|
+
accentColor?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare function CopyButtonView({ text, size, title, accentColor, className, style, }: CopyButtonViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
2
|
+
export interface DataTableColumn<T = Record<string, unknown>> {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
width?: string | number;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
renderCell?: (row: T, value: unknown) => React.ReactNode;
|
|
8
|
+
align?: 'left' | 'center' | 'right';
|
|
9
|
+
}
|
|
10
|
+
export interface DataTableViewProps<T = Record<string, unknown>> {
|
|
11
|
+
columns: DataTableColumn<T>[];
|
|
12
|
+
rows: T[];
|
|
13
|
+
keyField?: string;
|
|
14
|
+
onRowClick?: (row: T) => void;
|
|
15
|
+
renderExpanded?: (row: T) => React.ReactNode;
|
|
16
|
+
emptyTitle?: string;
|
|
17
|
+
emptyMessage?: string;
|
|
18
|
+
striped?: boolean;
|
|
19
|
+
/** Reduces padding to match 'sm' size. Prefer `size` for token-aligned sizing. */
|
|
20
|
+
compact?: boolean;
|
|
21
|
+
/** Falls back to DuiProvider size when omitted. */
|
|
22
|
+
size?: DuiSize;
|
|
23
|
+
sortable?: boolean;
|
|
24
|
+
maxHeight?: string;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function DataTableView<T extends Record<string, unknown>>({ columns, rows, keyField, onRowClick, renderExpanded, emptyTitle, emptyMessage, striped, compact, size, maxHeight, className, }: DataTableViewProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DottedCardViewProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
title?: string;
|
|
4
|
+
expandable?: boolean;
|
|
5
|
+
defaultExpanded?: boolean;
|
|
6
|
+
accentColor?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
}
|
|
10
|
+
export declare function DottedCardView({ children, title, expandable, defaultExpanded, accentColor, className, style, }: DottedCardViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface EmptyStateAction {
|
|
2
|
+
label: string;
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
}
|
|
5
|
+
export interface EmptyStateViewProps {
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
title: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
action?: EmptyStateAction;
|
|
10
|
+
accentColor?: string;
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function EmptyStateView({ icon, title, message, action, accentColor, compact, className, }: EmptyStateViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ExpandableLogEntryViewProps {
|
|
2
|
+
icon: React.ReactNode;
|
|
3
|
+
title: string;
|
|
4
|
+
/** Short colored label shown after the title (e.g. method, status) */
|
|
5
|
+
badge?: string;
|
|
6
|
+
/** CSS color or var() for badge text + tinted background */
|
|
7
|
+
badgeColor?: string;
|
|
8
|
+
/** Unix ms timestamp — renders as HH:MM:SS AM/PM if provided */
|
|
9
|
+
timestamp?: number;
|
|
10
|
+
defaultExpanded?: boolean;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ExpandableLogEntryView({ icon, title, badge, badgeColor, timestamp, defaultExpanded, children, className, }: ExpandableLogEntryViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface FeatureItem {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
onToggle: (enabled: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface FeatureCategoryViewProps {
|
|
9
|
+
categoryLabel: string;
|
|
10
|
+
categoryColor?: string;
|
|
11
|
+
features: FeatureItem[];
|
|
12
|
+
defaultExpanded?: boolean;
|
|
13
|
+
categoryEnabled?: boolean;
|
|
14
|
+
onCategoryToggle?: (enabled: boolean) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
export declare function FeatureCategoryView({ categoryLabel, categoryColor, features, defaultExpanded, categoryEnabled, onCategoryToggle, className, style, }: FeatureCategoryViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface HudItem {
|
|
2
|
+
id: string;
|
|
3
|
+
icon: React.ReactNode;
|
|
4
|
+
onClick?: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
/** Renders a highlighted active state (e.g. "mute breakpoints" toggled on) */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
/** Separator before this item */
|
|
10
|
+
separator?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface HudViewProps {
|
|
13
|
+
items: HudItem[];
|
|
14
|
+
/** Short status text rendered after the last item */
|
|
15
|
+
status?: string;
|
|
16
|
+
/** Optional accent color — sets --dui-hud-accent CSS custom property */
|
|
17
|
+
accentColor?: string;
|
|
18
|
+
/** Optional color used for the active (toggled) button state — sets --dui-hud-active-color */
|
|
19
|
+
activeColor?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
onDragEnd?: (x: number, y: number) => void;
|
|
22
|
+
/** Embed in a positioned container — uses position:relative, drag disabled. For showcase/preview use. */
|
|
23
|
+
contained?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export declare function HudView({ items, status, accentColor, activeColor, className, onDragEnd, contained, }: HudViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface JsonTreeViewProps {
|
|
2
|
+
data: unknown;
|
|
3
|
+
/** Optional label shown as the root key */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** Expand nodes at depth < defaultExpandDepth (default: 2) */
|
|
6
|
+
defaultExpandDepth?: number;
|
|
7
|
+
/** Stop rendering children beyond this depth (default: 8) */
|
|
8
|
+
maxDepth?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function JsonTreeView({ data, name, defaultExpandDepth, maxDepth, className, }: JsonTreeViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface LiveColorVar {
|
|
2
|
+
/** CSS custom property name, e.g. "--color-primary" */
|
|
3
|
+
cssVar: string;
|
|
4
|
+
/** YAML theme key, e.g. "brand.primary" */
|
|
5
|
+
yamlKey: string;
|
|
6
|
+
/** Human-readable label shown above the swatch */
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface LiveColorCustomizerProps {
|
|
10
|
+
vars: LiveColorVar[];
|
|
11
|
+
title?: string;
|
|
12
|
+
/** When true the grid is always visible; the toggle button is hidden (used when embedded in LivePlayground). */
|
|
13
|
+
forceOpen?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* When provided, color changes call this instead of document.documentElement.setProperty.
|
|
16
|
+
* Use this to scope changes to a specific container (e.g. the live preview pane).
|
|
17
|
+
* value=null means the override is being reset/removed.
|
|
18
|
+
*/
|
|
19
|
+
onVarChange?: (cssVar: string, value: string | null) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function LiveColorCustomizer({ vars, title, forceOpen, onVarChange }: LiveColorCustomizerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type LoaderVariant = 'spinner' | 'dots' | 'skeleton' | 'pulse' | 'progress-bar';
|
|
2
|
+
export type LoaderSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface LoaderViewProps {
|
|
4
|
+
variant?: LoaderVariant;
|
|
5
|
+
size?: LoaderSize;
|
|
6
|
+
accentColor?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
fullscreen?: boolean;
|
|
9
|
+
progress?: number;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function LoaderView({ variant, size, accentColor, label, fullscreen, progress, className, }: LoaderViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LanguageFn } from 'highlight.js';
|
|
2
|
+
/**
|
|
3
|
+
* Register an additional highlight.js language for MarkdownView's code
|
|
4
|
+
* blocks (and its `highlightAuto()` fallback) without waiting on a dui
|
|
5
|
+
* version bump. Call once at app startup, before any MarkdownView renders:
|
|
6
|
+
*
|
|
7
|
+
* import lua from 'highlight.js/lib/languages/lua';
|
|
8
|
+
* registerMarkdownLanguage('lua', lua);
|
|
9
|
+
*
|
|
10
|
+
* Safe to call multiple times / re-register the same name (highlight.js
|
|
11
|
+
* itself is idempotent about this).
|
|
12
|
+
*/
|
|
13
|
+
export declare function registerMarkdownLanguage(name: string, definition: LanguageFn): void;
|
|
14
|
+
export interface MarkdownViewProps {
|
|
15
|
+
content: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export declare function MarkdownView({ content, className, style }: MarkdownViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface PromptCardViewProps {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
content: string;
|
|
6
|
+
protocol?: string;
|
|
7
|
+
protocolColor?: string;
|
|
8
|
+
isCustom?: boolean;
|
|
9
|
+
onUse?: (id: string) => void;
|
|
10
|
+
onEdit?: (id: string) => void;
|
|
11
|
+
onDelete?: (id: string) => void;
|
|
12
|
+
onCopy?: (id: string) => void;
|
|
13
|
+
onClick?: (id: string) => void;
|
|
14
|
+
accentColor?: string;
|
|
15
|
+
selected?: boolean;
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Override CSS variables for fine-grained theme control */
|
|
18
|
+
colors?: {
|
|
19
|
+
avatarBg?: string;
|
|
20
|
+
avatarText?: string;
|
|
21
|
+
titleText?: string;
|
|
22
|
+
bodyText?: string;
|
|
23
|
+
customBadgeBg?: string;
|
|
24
|
+
customBadgeText?: string;
|
|
25
|
+
chipColor?: string;
|
|
26
|
+
actionIconColor?: string;
|
|
27
|
+
actionDeleteColor?: string;
|
|
28
|
+
rowBg?: string;
|
|
29
|
+
rowBgHover?: string;
|
|
30
|
+
rowBgSelected?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare function PromptCardView({ id, title, description, content, protocol, protocolColor, isCustom, onUse, onEdit, onDelete, onCopy, onClick, accentColor, selected, colors, className, }: PromptCardViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface PromptLibraryVariable {
|
|
2
|
+
pill: string;
|
|
3
|
+
insert: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PromptLibraryEditorTab {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface PromptLibraryEditorViewProps {
|
|
12
|
+
title: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
/** Trigger breadcrumb shown below description */
|
|
15
|
+
triggerLabel?: string;
|
|
16
|
+
avatarColor?: string;
|
|
17
|
+
isCustom?: boolean;
|
|
18
|
+
isDirty?: boolean;
|
|
19
|
+
variables?: PromptLibraryVariable[];
|
|
20
|
+
tabs?: PromptLibraryEditorTab[];
|
|
21
|
+
activeTabId?: string;
|
|
22
|
+
onTabChange?: (id: string) => void;
|
|
23
|
+
content: string;
|
|
24
|
+
onContentChange?: (content: string) => void;
|
|
25
|
+
viewMode?: 'preview' | 'edit';
|
|
26
|
+
onViewModeChange?: (mode: 'preview' | 'edit') => void;
|
|
27
|
+
onSave?: () => void;
|
|
28
|
+
onVariableInsert?: (insert: string) => void;
|
|
29
|
+
accentColor?: string;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function PromptLibraryEditorView({ title, description, triggerLabel, avatarColor, isCustom, isDirty, variables, tabs, activeTabId, onTabChange, content, onContentChange, viewMode, onViewModeChange, onSave, onVariableInsert, accentColor, className, }: PromptLibraryEditorViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface PromptLibraryItem {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
avatarColor?: string;
|
|
6
|
+
protocol?: string;
|
|
7
|
+
protocolColor?: string;
|
|
8
|
+
isCustom?: boolean;
|
|
9
|
+
isModified?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface PromptLibraryCategory {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
items: PromptLibraryItem[];
|
|
15
|
+
}
|
|
16
|
+
export interface PromptLibrarySection {
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
categories: PromptLibraryCategory[];
|
|
20
|
+
}
|
|
21
|
+
export interface PromptLibraryListViewProps {
|
|
22
|
+
sections: PromptLibrarySection[];
|
|
23
|
+
activeId?: string;
|
|
24
|
+
onSelect?: (id: string) => void;
|
|
25
|
+
search?: string;
|
|
26
|
+
onSearchChange?: (v: string) => void;
|
|
27
|
+
accentColor?: string;
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function PromptLibraryListView({ sections, activeId, onSelect, search, onSearchChange, accentColor, className, }: PromptLibraryListViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StageView — stage status indicators for multi-step processes.
|
|
3
|
+
*
|
|
4
|
+
* Three variants:
|
|
5
|
+
* StageCheck — completed step (green check ring, static)
|
|
6
|
+
* StageSpin — active / in-progress step (rotating spinner ring)
|
|
7
|
+
* StagePulse — pending / waiting step (pulsing dot, draws attention without spinning)
|
|
8
|
+
*
|
|
9
|
+
* All three accept the same base props for consistency.
|
|
10
|
+
*/
|
|
11
|
+
export interface StageViewBaseProps {
|
|
12
|
+
/** Step label shown to the right of the indicator */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Sub-label / description shown below label */
|
|
15
|
+
sublabel?: string;
|
|
16
|
+
/** Override accent color */
|
|
17
|
+
color?: string;
|
|
18
|
+
/** Ring / icon size in px (default 20) */
|
|
19
|
+
size?: number;
|
|
20
|
+
/** Text size in px (default 12) */
|
|
21
|
+
textSize?: number;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function StageCheck({ label, sublabel, color, size, textSize, className }: StageViewBaseProps): import("react").JSX.Element;
|
|
25
|
+
export declare function StageSpin({ label, sublabel, color, size, textSize, className }: StageViewBaseProps): import("react").JSX.Element;
|
|
26
|
+
export declare function StagePulse({ label, sublabel, color, size, textSize, className }: StageViewBaseProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type StatsTrend = 'up' | 'down' | 'neutral';
|
|
2
|
+
export interface StatsCardViewProps {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
subValue?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
unit?: string;
|
|
8
|
+
trend?: StatsTrend;
|
|
9
|
+
trendValue?: string;
|
|
10
|
+
accentColor?: string;
|
|
11
|
+
compact?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare function StatsCardView({ label, value, subValue, icon, unit, trend, trendValue, accentColor, compact, className, style, }: StatsCardViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type StatusState = 'idle' | 'connecting' | 'connected' | 'disconnected' | 'error';
|
|
2
|
+
export type StatusSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface StatusIndicatorViewProps {
|
|
4
|
+
status: StatusState;
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Secondary text shown below the label */
|
|
7
|
+
subtext?: string;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
size?: StatusSize;
|
|
10
|
+
/** Override the dot + label color (CSS variable or value) */
|
|
11
|
+
accentColor?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function StatusIndicatorView({ status, label, subtext, showLabel, size, accentColor, className, }: StatusIndicatorViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type ToastVariant = 'success' | 'error' | 'warning' | 'info';
|
|
2
|
+
export interface Toast {
|
|
3
|
+
id: string;
|
|
4
|
+
variant: ToastVariant;
|
|
5
|
+
title: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ToastViewProps {
|
|
10
|
+
toasts: Toast[];
|
|
11
|
+
onDismiss: (id: string) => void;
|
|
12
|
+
position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
|
|
13
|
+
}
|
|
14
|
+
export declare function ToastView({ toasts, onDismiss, position }: ToastViewProps): import('react').ReactPortal | null;
|
|
15
|
+
export declare function useToast(): {
|
|
16
|
+
subscribe: (fn: (t: Toast[]) => void) => () => void;
|
|
17
|
+
toast: (variant: ToastVariant, title: string, message?: string, duration?: number) => string;
|
|
18
|
+
dismiss: (id: string) => void;
|
|
19
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface YamlKeyChipProps {
|
|
3
|
+
/** The YAML key name, e.g. "brand.primary" or "component_button.primary_bg" */
|
|
4
|
+
yamlKey: string;
|
|
5
|
+
/** Accent color for the badge (CSS var or raw). Defaults to --color-primary. */
|
|
6
|
+
color?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Monospace badge showing a YAML theme key name.
|
|
13
|
+
* Used in LiveColorCustomizer to let users know which YAML key controls each color.
|
|
14
|
+
*/
|
|
15
|
+
export declare function YamlKeyChip({ yamlKey, color, onClick, className, style, }: YamlKeyChipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DuiSize } from '../../core/DuiTypes';
|
|
2
|
+
/** @deprecated Use `DuiSize` directly. */
|
|
3
|
+
export type CheckboxSize = DuiSize;
|
|
4
|
+
export interface CheckboxViewProps {
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange?: (checked: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
/** Falls back to DuiProvider size when omitted. */
|
|
10
|
+
size?: DuiSize;
|
|
11
|
+
accentColor?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function CheckboxView({ checked, onChange, disabled, indeterminate, size, accentColor, label, className, }: CheckboxViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EditorViewProps } from './EditorView';
|
|
2
|
+
/** Abstract debug adapter — consumer provides the implementation. */
|
|
3
|
+
export interface DebugEditorAdapter {
|
|
4
|
+
/** Called when user clicks in the breakpoint gutter to toggle a breakpoint. */
|
|
5
|
+
onToggleBreakpoint?: (line: number) => void;
|
|
6
|
+
/** Called when user right-clicks a glyph in the breakpoint gutter. */
|
|
7
|
+
onGlyphContextMenu?: (line: number, pos: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}) => void;
|
|
11
|
+
/** Called after Monaco mounts — use to attach AI autocomplete or other plugins. */
|
|
12
|
+
onEditorMount?: (editor: unknown, monaco: unknown) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface DebugEditorViewProps extends Omit<EditorViewProps, 'debugSupported' | 'onToggleBreakpoint' | 'onGlyphContextMenu' | 'onEditorMount'> {
|
|
15
|
+
/** Pluggable debug adapter — consumer supplies all callbacks. */
|
|
16
|
+
adapter?: DebugEditorAdapter;
|
|
17
|
+
/** Active breakpoint line numbers. */
|
|
18
|
+
breakpoints?: number[];
|
|
19
|
+
/** Line numbers whose breakpoints are disabled (greyed out). */
|
|
20
|
+
disabledBreakpoints?: number[];
|
|
21
|
+
/** Line numbers with conditional breakpoints (shown in amber). */
|
|
22
|
+
conditionalBreakpointLines?: number[];
|
|
23
|
+
/** Currently paused line — rendered with a yellow highlight bar. */
|
|
24
|
+
pausedLine?: number | null;
|
|
25
|
+
}
|
|
26
|
+
export declare function DebugEditorView({ adapter, breakpoints, disabledBreakpoints, conditionalBreakpointLines, pausedLine, ...rest }: DebugEditorViewProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface DiffEditorViewProps {
|
|
2
|
+
original: string;
|
|
3
|
+
modified: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
height?: number | string;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
renderSideBySide?: boolean;
|
|
8
|
+
wordWrap?: boolean;
|
|
9
|
+
fontSize?: number;
|
|
10
|
+
theme?: string;
|
|
11
|
+
onMount?: (editor: any, monaco: any) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* DUI's diff editor. Same optionality contract as EditorView: Monaco-backed
|
|
15
|
+
* once the consumer installs the Monaco packages and imports
|
|
16
|
+
* '@salilvnair/dui/monaco-setup'; a plain-text line diff otherwise.
|
|
17
|
+
*/
|
|
18
|
+
export declare function DiffEditorView(props: DiffEditorViewProps): import("react").JSX.Element;
|