@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.
Files changed (116) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -0
  3. package/dist/chunks/EditorView.shell-BGH2VhWM.js +460 -0
  4. package/dist/chunks/EditorView.shell-BGH2VhWM.js.map +1 -0
  5. package/dist/chunks/daakia-icons-DxWnX_IQ.js +1726 -0
  6. package/dist/chunks/daakia-icons-DxWnX_IQ.js.map +1 -0
  7. package/dist/icons/daakia-icons.d.ts +304 -0
  8. package/dist/index.d.ts +2 -0
  9. package/dist/index.js +17032 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/lib/components/button/AIButtonView.d.ts +20 -0
  12. package/dist/lib/components/button/ButtonView.d.ts +28 -0
  13. package/dist/lib/components/button/DropDownButtonView.d.ts +19 -0
  14. package/dist/lib/components/button/IconButtonView.d.ts +22 -0
  15. package/dist/lib/components/button/SegmentedView.d.ts +17 -0
  16. package/dist/lib/components/button/SplitButtonView.d.ts +23 -0
  17. package/dist/lib/components/chips/ChipView.d.ts +21 -0
  18. package/dist/lib/components/display/CodeBlockView.d.ts +11 -0
  19. package/dist/lib/components/display/ColoredTextView.d.ts +18 -0
  20. package/dist/lib/components/display/CopyButtonView.d.ts +11 -0
  21. package/dist/lib/components/display/DataTableView.d.ts +27 -0
  22. package/dist/lib/components/display/DottedCardView.d.ts +10 -0
  23. package/dist/lib/components/display/EmptyStateView.d.ts +14 -0
  24. package/dist/lib/components/display/ExpandableLogEntryView.d.ts +14 -0
  25. package/dist/lib/components/display/FeatureCategoryView.d.ts +18 -0
  26. package/dist/lib/components/display/HudView.d.ts +25 -0
  27. package/dist/lib/components/display/JsonTreeView.d.ts +11 -0
  28. package/dist/lib/components/display/LiveColorCustomizer.d.ts +21 -0
  29. package/dist/lib/components/display/LoaderView.d.ts +12 -0
  30. package/dist/lib/components/display/MarkdownView.d.ts +19 -0
  31. package/dist/lib/components/display/PromptCardView.d.ts +33 -0
  32. package/dist/lib/components/display/PromptLibraryEditorView.d.ts +32 -0
  33. package/dist/lib/components/display/PromptLibraryListView.d.ts +30 -0
  34. package/dist/lib/components/display/StageView.d.ts +26 -0
  35. package/dist/lib/components/display/StatsCardView.d.ts +15 -0
  36. package/dist/lib/components/display/StatusIndicatorView.d.ts +14 -0
  37. package/dist/lib/components/display/ToastView.d.ts +19 -0
  38. package/dist/lib/components/display/YamlKeyChip.d.ts +15 -0
  39. package/dist/lib/components/input/CheckboxView.d.ts +15 -0
  40. package/dist/lib/components/input/DebugEditorView.d.ts +26 -0
  41. package/dist/lib/components/input/DiffEditorView.d.ts +18 -0
  42. package/dist/lib/components/input/DiffEditorView.fallback.d.ts +2 -0
  43. package/dist/lib/components/input/DiffEditorView.monaco.d.ts +2 -0
  44. package/dist/lib/components/input/DurationInputView.d.ts +15 -0
  45. package/dist/lib/components/input/EditorView.d.ts +222 -0
  46. package/dist/lib/components/input/EditorView.fallback.d.ts +10 -0
  47. package/dist/lib/components/input/EditorView.monaco.d.ts +2 -0
  48. package/dist/lib/components/input/EditorView.shell.d.ts +13 -0
  49. package/dist/lib/components/input/FormDataTableView.d.ts +22 -0
  50. package/dist/lib/components/input/HiddenKeyValueItemView.d.ts +22 -0
  51. package/dist/lib/components/input/HighlightedInputView.d.ts +26 -0
  52. package/dist/lib/components/input/KeyValueTableRowView.d.ts +31 -0
  53. package/dist/lib/components/input/KeyValueTableView.d.ts +59 -0
  54. package/dist/lib/components/input/MergedInputView.d.ts +43 -0
  55. package/dist/lib/components/input/MultilineInputView.d.ts +15 -0
  56. package/dist/lib/components/input/SearchInputView.d.ts +17 -0
  57. package/dist/lib/components/input/SegmentedControlView.d.ts +23 -0
  58. package/dist/lib/components/input/SelectInputView.d.ts +31 -0
  59. package/dist/lib/components/input/SelectTextInputView.d.ts +44 -0
  60. package/dist/lib/components/input/SliderView.d.ts +15 -0
  61. package/dist/lib/components/input/TabView.d.ts +28 -0
  62. package/dist/lib/components/input/TagInputView.d.ts +10 -0
  63. package/dist/lib/components/input/TextInputView.d.ts +36 -0
  64. package/dist/lib/components/input/ThemeCardSelectorView.d.ts +18 -0
  65. package/dist/lib/components/input/ToggleSwitchView.d.ts +19 -0
  66. package/dist/lib/components/layout/BottomPanelView.d.ts +16 -0
  67. package/dist/lib/components/layout/CollapsibleSectionView.d.ts +14 -0
  68. package/dist/lib/components/layout/DebugView.d.ts +63 -0
  69. package/dist/lib/components/layout/FolderView.d.ts +85 -0
  70. package/dist/lib/components/layout/ResizablePanelView.d.ts +10 -0
  71. package/dist/lib/components/layout/SettingsNavView.d.ts +29 -0
  72. package/dist/lib/components/layout/SideNavView.d.ts +39 -0
  73. package/dist/lib/components/layout/SpacerView.d.ts +7 -0
  74. package/dist/lib/components/layout/SplitPanelView.d.ts +33 -0
  75. package/dist/lib/components/modal/ContextMenuView.d.ts +28 -0
  76. package/dist/lib/components/modal/InfoPopupView.d.ts +17 -0
  77. package/dist/lib/components/modal/ModalView.d.ts +41 -0
  78. package/dist/lib/components/rearrange/RearrangeView.d.ts +34 -0
  79. package/dist/lib/components/tabs/PilledTabView.d.ts +19 -0
  80. package/dist/lib/components/tabs/TabBarView.d.ts +28 -0
  81. package/dist/lib/components/tabs/TabView.d.ts +34 -0
  82. package/dist/lib/core/ButtonBase.d.ts +28 -0
  83. package/dist/lib/core/CardBase.d.ts +21 -0
  84. package/dist/lib/core/ChipBase.d.ts +21 -0
  85. package/dist/lib/core/DisplayBase.d.ts +21 -0
  86. package/dist/lib/core/DuiContext.d.ts +53 -0
  87. package/dist/lib/core/DuiTokens.d.ts +115 -0
  88. package/dist/lib/core/DuiTypes.d.ts +29 -0
  89. package/dist/lib/core/EditorBase.d.ts +13 -0
  90. package/dist/lib/core/InputBase.d.ts +25 -0
  91. package/dist/lib/core/MenuBase.d.ts +23 -0
  92. package/dist/lib/core/NavBase.d.ts +26 -0
  93. package/dist/lib/core/OverlayBase.d.ts +20 -0
  94. package/dist/lib/core/SelectBase.d.ts +22 -0
  95. package/dist/lib/core/TabBase.d.ts +25 -0
  96. package/dist/lib/core/TableBase.d.ts +19 -0
  97. package/dist/lib/core/ToggleBase.d.ts +19 -0
  98. package/dist/lib/core/index.d.ts +25 -0
  99. package/dist/lib/index.d.ts +159 -0
  100. package/dist/lib/monaco-runtime.d.ts +29 -0
  101. package/dist/lib/theme/core.d.ts +8 -0
  102. package/dist/lib/theme/editor.d.ts +11 -0
  103. package/dist/lib/theme/utils.d.ts +6 -0
  104. package/dist/monaco-setup.d.ts +4 -0
  105. package/dist/monaco-setup.js +883 -0
  106. package/dist/monaco-setup.js.map +1 -0
  107. package/dist/style.css +1 -0
  108. package/dist/style.js +2 -0
  109. package/dist/style.js.map +1 -0
  110. package/dist/theme/core.js +191 -0
  111. package/dist/theme/core.js.map +1 -0
  112. package/dist/theme/editor.js +104 -0
  113. package/dist/theme/editor.js.map +1 -0
  114. package/dist/theme/utils.js +67 -0
  115. package/dist/theme/utils.js.map +1 -0
  116. package/package.json +81 -0
@@ -0,0 +1,28 @@
1
+ import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from '../../core/DuiTypes';
2
+ export interface TabItem {
3
+ id: string;
4
+ label: string;
5
+ badge?: number;
6
+ dot?: boolean;
7
+ dotColor?: string;
8
+ badgeColor?: string;
9
+ }
10
+ export type TabVariant = 'pill' | 'underline' | 'chip' | 'picker';
11
+ export interface TabViewProps {
12
+ tabs: TabItem[];
13
+ activeTab: string;
14
+ onChange: (id: string) => void;
15
+ /** Falls back to DuiProvider context when omitted. */
16
+ size?: DuiSize;
17
+ variant?: TabVariant;
18
+ accentColor?: string;
19
+ className?: string;
20
+ width?: DuiWidth;
21
+ borderRadius?: DuiRadius | number;
22
+ /** Text color for inactive tabs */
23
+ color?: string;
24
+ /** Color for the active tab indicator and text */
25
+ activeColor?: string;
26
+ fontStyle?: DuiFontStyle;
27
+ }
28
+ export declare function TabView({ tabs, activeTab, onChange, size, variant, accentColor, className, width, borderRadius, color, activeColor, fontStyle, }: TabViewProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface TagInputViewProps {
2
+ tags: string[];
3
+ onChange: (tags: string[]) => void;
4
+ placeholder?: string;
5
+ accentColor?: string;
6
+ maxTags?: number;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare function TagInputView({ tags, onChange, placeholder, accentColor, maxTags, disabled, className, }: TagInputViewProps): import("react").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from '../../core/DuiTypes';
3
+ /** `'default'` is kept for backwards-compat and resolves to context size. */
4
+ export type TextInputSize = 'default' | DuiSize;
5
+ export interface TextInputViewProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'> {
6
+ size?: TextInputSize;
7
+ /** true = token border-radius (default), false = 0px square */
8
+ rounded?: boolean;
9
+ /** Override focus border / ring color (CSS var or raw) */
10
+ accentColor?: string;
11
+ /** Red border state */
12
+ error?: boolean;
13
+ /** Icon rendered inside the left edge (alias: prefixIcon) */
14
+ iconLeft?: ReactNode;
15
+ /** Icon rendered inside the right edge (alias: suffixIcon). Ignored when masked=true. */
16
+ iconRight?: ReactNode;
17
+ /** Alias for iconLeft */
18
+ prefixIcon?: ReactNode;
19
+ /** Alias for iconRight. Ignored when masked=true. */
20
+ suffixIcon?: ReactNode;
21
+ /** When true, value is hidden (type=password) with an eye toggle button on the right */
22
+ masked?: boolean;
23
+ /** Custom icons for the masked toggle. Defaults to EyeOffIcon (hidden) / EyeIcon (shown). */
24
+ maskIcon?: {
25
+ hidden?: ReactNode;
26
+ shown?: ReactNode;
27
+ };
28
+ /** When true: no border, transparent bg, no focus ring — for embedding inside containers that supply their own chrome */
29
+ naked?: boolean;
30
+ width?: DuiWidth;
31
+ borderRadius?: DuiRadius | number;
32
+ /** Text color override */
33
+ color?: string;
34
+ fontStyle?: DuiFontStyle;
35
+ }
36
+ export declare const TextInputView: import('react').ForwardRefExoticComponent<TextInputViewProps & import('react').RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,18 @@
1
+ export interface ThemeOption {
2
+ value: string;
3
+ label: string;
4
+ description?: string;
5
+ preview?: {
6
+ bg: string;
7
+ panel: string;
8
+ accent: string;
9
+ text: string;
10
+ };
11
+ }
12
+ export interface ThemeCardSelectorViewProps {
13
+ options: ThemeOption[];
14
+ value: string;
15
+ onChange: (value: string) => void;
16
+ className?: string;
17
+ }
18
+ export declare function ThemeCardSelectorView({ options, value, onChange, className, }: ThemeCardSelectorViewProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { DuiSize } from '../../core/DuiTypes';
2
+ /** Accepts all 4 canonical sizes (maps to DuiToggle tokens). */
3
+ export type ToggleSwitchSize = DuiSize;
4
+ export interface ToggleSwitchViewProps {
5
+ checked: boolean;
6
+ onChange: (checked: boolean) => void;
7
+ disabled?: boolean;
8
+ /** Falls back to DuiProvider context when omitted. */
9
+ size?: ToggleSwitchSize;
10
+ accentColor?: string;
11
+ label?: string;
12
+ labelPosition?: 'left' | 'right';
13
+ className?: string;
14
+ /** Color when checked — alias for accentColor with context-level support */
15
+ activeColor?: string;
16
+ /** Label text color override */
17
+ color?: string;
18
+ }
19
+ export declare function ToggleSwitchView({ checked, onChange, disabled, size, accentColor, label, labelPosition, className, activeColor, color, }: ToggleSwitchViewProps): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ export interface BottomPanelTab {
2
+ id: string;
3
+ label: string;
4
+ icon?: React.ReactNode;
5
+ content: React.ReactNode;
6
+ }
7
+ export interface BottomPanelViewProps {
8
+ tabs: BottomPanelTab[];
9
+ defaultHeight?: number;
10
+ minHeight?: number;
11
+ maxHeight?: number;
12
+ defaultCollapsed?: boolean;
13
+ accentColor?: string;
14
+ className?: string;
15
+ }
16
+ export declare function BottomPanelView({ tabs, defaultHeight, minHeight, maxHeight, defaultCollapsed, accentColor, className, }: BottomPanelViewProps): import("react").JSX.Element;
@@ -0,0 +1,14 @@
1
+ export interface CollapsibleSectionViewProps {
2
+ title: string;
3
+ expanded: boolean;
4
+ onToggle: () => void;
5
+ /** Count badge shown next to title */
6
+ badge?: number;
7
+ /** Accent color for title chip + badge. Accepts any CSS color or var(). */
8
+ accentColor?: string;
9
+ /** Slot rendered on the far right of the header (action buttons etc.) */
10
+ headerRight?: React.ReactNode;
11
+ children: React.ReactNode;
12
+ className?: string;
13
+ }
14
+ export declare function CollapsibleSectionView({ title, expanded, onToggle, badge, accentColor, headerRight, children, className, }: CollapsibleSectionViewProps): import("react").JSX.Element;
@@ -0,0 +1,63 @@
1
+ import { ReactNode } from 'react';
2
+ export interface DebugVariable {
3
+ name: string;
4
+ value: unknown;
5
+ type?: string;
6
+ }
7
+ export interface DebugCallFrame {
8
+ fn: string;
9
+ file?: string;
10
+ line?: number | null;
11
+ col?: number;
12
+ isUser?: boolean;
13
+ }
14
+ export interface DebugBreakpoint {
15
+ /** Consumer-defined key that groups breakpoints (e.g. "tabId:phase"). */
16
+ key: string;
17
+ line: number;
18
+ disabled?: boolean;
19
+ condition?: string;
20
+ /** Display label shown in the breakpoints list. */
21
+ label?: string;
22
+ /** Optional badge rendered before the label (e.g. HTTP method chip). */
23
+ badge?: ReactNode;
24
+ }
25
+ /** Current state of the debug session — provided by consumer. */
26
+ export interface DebugSession {
27
+ active: boolean;
28
+ status: 'idle' | 'running' | 'paused';
29
+ pausedLine?: number | null;
30
+ variables?: DebugVariable[];
31
+ callStack?: DebugCallFrame[];
32
+ breakpoints?: DebugBreakpoint[];
33
+ breakpointsMuted?: boolean;
34
+ }
35
+ /** All action callbacks — consumer provides implementations. */
36
+ export interface DebugActions {
37
+ onContinue?: () => void;
38
+ onStepOver?: () => void;
39
+ onStepInto?: () => void;
40
+ onStepOut?: () => void;
41
+ onRestart?: () => void;
42
+ onStop?: () => void;
43
+ onAddWatchExpression?: (expr: string) => void;
44
+ onRemoveWatchExpression?: (expr: string) => void;
45
+ onClearWatchExpressions?: () => void;
46
+ onToggleBreakpoint?: (key: string, line: number, currentlyDisabled: boolean) => void;
47
+ onRemoveBreakpoint?: (key: string, line: number) => void;
48
+ onNavigateBreakpoint?: (key: string, line: number) => void;
49
+ onToggleMuteBreakpoints?: () => void;
50
+ onClearAllBreakpoints?: () => void;
51
+ /** Called when user clicks Restart Frame in call stack. */
52
+ onRestartFrame?: (frameIndex: number) => void;
53
+ }
54
+ export interface DebugViewProps {
55
+ session: DebugSession;
56
+ actions?: DebugActions;
57
+ /** Controlled watch expressions — managed externally. */
58
+ watchExpressions?: string[];
59
+ accentColor?: string;
60
+ title?: string;
61
+ className?: string;
62
+ }
63
+ export declare function DebugView({ session, actions, watchExpressions, accentColor, title, className, }: DebugViewProps): import("react").JSX.Element;
@@ -0,0 +1,85 @@
1
+ import { ReactNode } from 'react';
2
+ import { ContextMenuItem } from '../modal/ContextMenuView';
3
+ export interface FolderNode<T = unknown> {
4
+ id: string;
5
+ label: string;
6
+ children?: FolderNode<T>[];
7
+ items?: T[];
8
+ data?: unknown;
9
+ }
10
+ export interface FolderAction<T = unknown> {
11
+ id: string;
12
+ icon: ReactNode;
13
+ tooltip?: string;
14
+ disabled?: boolean | ((node: FolderNode<T>) => boolean);
15
+ onClick: (node: FolderNode<T>, e: React.MouseEvent) => void;
16
+ }
17
+ export interface FolderRunnerTab {
18
+ id: string;
19
+ label: string;
20
+ badge?: number;
21
+ dot?: boolean;
22
+ content: ReactNode;
23
+ }
24
+ export interface FolderRunnerConfig<T = unknown> {
25
+ title?: string;
26
+ subtitle?: string | ((node: FolderNode<T>) => string);
27
+ tabs: FolderRunnerTab[];
28
+ saveLabel?: string;
29
+ onSave?: (tabId: string, node: FolderNode<T>) => void;
30
+ accentColor?: string;
31
+ }
32
+ export type DropPosition = 'before' | 'inside' | 'after';
33
+ /** Summary entry shown in the folder-move confirm modal */
34
+ export interface MoveSummaryEntry {
35
+ label: string;
36
+ /** 'folder' shows a folder icon; 'item' shows the accent-color dot */
37
+ type: 'folder' | 'item';
38
+ }
39
+ export interface FolderViewProps<T = unknown> {
40
+ nodes: FolderNode<T>[];
41
+ accentColor?: string;
42
+ folderActions?: FolderAction<T>[];
43
+ contextMenuItems?: (node: FolderNode<T>) => ContextMenuItem[];
44
+ runner?: FolderRunnerConfig<T>;
45
+ defaultExpandedIds?: Set<string>;
46
+ expandedIds?: Set<string>;
47
+ onToggle?: (id: string) => void;
48
+ renderItem?: (item: T, node: FolderNode<T>, depth: number) => ReactNode;
49
+ onRename?: (id: string, newName: string) => void;
50
+ onFolderClick?: (node: FolderNode<T>) => void;
51
+ emptyLabel?: string;
52
+ className?: string;
53
+ indentPx?: number;
54
+ onContextMenu?: (e: React.MouseEvent, node: FolderNode<T>) => void;
55
+ /** Enable HTML5 drag-and-drop reordering/nesting of folder nodes */
56
+ draggable?: boolean;
57
+ /** Guard per-node draggability (e.g. pinned/protected folders) */
58
+ isDraggableNode?: (node: FolderNode<T>) => boolean;
59
+ /** Called when a folder node is dropped. position = where relative to targetId. */
60
+ onMove?: (dragId: string, targetId: string, position: DropPosition) => void;
61
+ /** Show a confirm modal before calling onMove */
62
+ confirmFolderMove?: boolean;
63
+ /** Return extra entries shown in the confirm modal body (sub-folders + items that will move) */
64
+ getMoveSummary?: (dragId: string) => MoveSummaryEntry[];
65
+ /** Enable HTML5 drag-and-drop for items inside nodes */
66
+ draggableItems?: boolean;
67
+ /** Required when draggableItems=true — stable unique ID per item */
68
+ getItemId?: (item: T) => string;
69
+ /**
70
+ * Called when an item is dropped.
71
+ * targetKind='node' → dropped onto a folder node (position is always 'inside')
72
+ * targetKind='item' → dropped onto a sibling item (position is 'before'|'after')
73
+ */
74
+ onItemMove?: (itemId: string, targetId: string, targetKind: 'node' | 'item', position: DropPosition) => void;
75
+ inlineCreate?: {
76
+ parentId: string | null;
77
+ } | null;
78
+ onInlineCreateCommit?: (parentId: string | null, name: string) => void;
79
+ onInlineCreateCancel?: () => void;
80
+ /** Pass a folder node id to trigger inline rename mode on that folder */
81
+ renamingNodeId?: string | null;
82
+ /** Called after the rename input is committed or cancelled so the caller can clear renamingNodeId */
83
+ onRenameDone?: () => void;
84
+ }
85
+ export declare function FolderView<T = unknown>({ nodes, accentColor, folderActions, contextMenuItems, runner, defaultExpandedIds, expandedIds: controlled, onToggle, renderItem, onRename, onFolderClick, onContextMenu, emptyLabel, className, indentPx, draggable, isDraggableNode, onMove, confirmFolderMove, getMoveSummary, draggableItems, getItemId, onItemMove, inlineCreate, onInlineCreateCommit, onInlineCreateCancel, renamingNodeId, onRenameDone, }: FolderViewProps<T>): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ export interface ResizablePanelViewProps {
2
+ defaultHeight: number;
3
+ minHeight?: number;
4
+ maxHeight?: number;
5
+ borderRadius?: number;
6
+ children: React.ReactNode;
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ }
10
+ export declare function ResizablePanelView({ defaultHeight, minHeight, maxHeight, borderRadius, children, className, style, }: ResizablePanelViewProps): import("react").JSX.Element;
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ import { DuiSize, DuiRadius, DuiFontStyle } from '../../core/DuiTypes';
3
+ export interface SettingsNavItem {
4
+ id: string;
5
+ label: string;
6
+ description?: string;
7
+ icon?: ReactNode;
8
+ badge?: string;
9
+ }
10
+ export interface SettingsNavGroup {
11
+ title?: string;
12
+ items: SettingsNavItem[];
13
+ }
14
+ export interface SettingsNavViewProps {
15
+ groups: SettingsNavGroup[];
16
+ activeId?: string;
17
+ onSelect?: (id: string) => void;
18
+ accentColor?: string;
19
+ className?: string;
20
+ /** Falls back to DuiProvider size when omitted. */
21
+ size?: DuiSize;
22
+ borderRadius?: DuiRadius | number;
23
+ /** Text color for inactive items */
24
+ color?: string;
25
+ /** Color for active item text and indicator */
26
+ activeColor?: string;
27
+ fontStyle?: DuiFontStyle;
28
+ }
29
+ export declare function SettingsNavView({ groups, activeId, onSelect, accentColor, className, size, borderRadius, color, activeColor, fontStyle, }: SettingsNavViewProps): import("react").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { DuiSize } from '../../core/DuiTypes';
2
+ export interface SideNavItem {
3
+ id: string;
4
+ label: string;
5
+ icon?: React.ReactNode;
6
+ /** Accent-colored pill badge — e.g. "New", 3 */
7
+ badge?: number | string;
8
+ /** Plain muted count shown right of group header label */
9
+ count?: number;
10
+ /** When true: renders as uppercase section header (non-selectable, collapsible) */
11
+ isGroup?: boolean;
12
+ children?: SideNavItem[];
13
+ }
14
+ export interface SideNavViewProps {
15
+ items: SideNavItem[];
16
+ activeId?: string;
17
+ onSelect?: (id: string) => void;
18
+ collapsible?: boolean;
19
+ defaultCollapsed?: boolean;
20
+ /** Controlled collapsed state — overrides internal state when provided */
21
+ collapsed?: boolean;
22
+ onCollapsedChange?: (collapsed: boolean) => void;
23
+ defaultOpenIds?: string[];
24
+ width?: number;
25
+ collapsedWidth?: number;
26
+ accentColor?: string;
27
+ /** Render a search box above the nav items */
28
+ searchable?: boolean;
29
+ searchPlaceholder?: string;
30
+ /** Message shown when no items match the search */
31
+ emptyText?: string;
32
+ /** Falls back to DuiProvider context when omitted. */
33
+ size?: DuiSize;
34
+ className?: string;
35
+ style?: React.CSSProperties;
36
+ }
37
+ export declare function countLeaves(items: SideNavItem[]): number;
38
+ export declare function filterItems(items: SideNavItem[], q: string): SideNavItem[];
39
+ export declare function SideNavView({ items, activeId, onSelect, collapsible, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, defaultOpenIds, width, collapsedWidth, accentColor, searchable, searchPlaceholder, emptyText, size, className, style, }: SideNavViewProps): import("react").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface SpacerViewProps {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ spacing?: 'sm' | 'md' | 'lg';
5
+ className?: string;
6
+ }
7
+ export declare function SpacerView({ orientation, spacing, className }: SpacerViewProps): React.JSX.Element;
@@ -0,0 +1,33 @@
1
+ export type SplitDirection = 'horizontal' | 'vertical';
2
+ export interface SplitPanelViewProps {
3
+ direction?: SplitDirection;
4
+ first: React.ReactNode;
5
+ second: React.ReactNode;
6
+ /** Initial split (0–100%) for the first panel. Uncontrolled default. */
7
+ defaultSplit?: number;
8
+ /** Controlled split value. When provided, overrides internal state — wire with onResize. */
9
+ split?: number;
10
+ /** Min px size for first panel */
11
+ minFirst?: number;
12
+ /** Min px size for second panel */
13
+ minSecond?: number;
14
+ /** Min % size for first panel (0–100). Takes precedence over minFirst when set — the divider can't drag below this. */
15
+ minFirstPct?: number;
16
+ /** Min % size for second panel (0–100). Takes precedence over minSecond when set. */
17
+ minSecondPct?: number;
18
+ accentColor?: string;
19
+ /** Fired on every drag move and on double-click reset */
20
+ onResize?: (split: number) => void;
21
+ /** Fired once when drag ends (pointer up) or on double-click reset */
22
+ onResizeEnd?: (split: number) => void;
23
+ /** Fired when the handle is clicked without dragging (e.g. to collapse/expand) */
24
+ onHandleClick?: () => void;
25
+ /**
26
+ * Tooltip shown on pill hover. Pass `null` to suppress.
27
+ * Defaults to "Double-click to reset Alt+/ / Drag to resize" with a styled kbd badge.
28
+ */
29
+ pillTooltip?: React.ReactNode | null;
30
+ style?: React.CSSProperties;
31
+ className?: string;
32
+ }
33
+ export declare function SplitPanelView({ direction, first, second, defaultSplit, split: splitProp, minFirst, minSecond, minFirstPct, minSecondPct, accentColor, onResize, onResizeEnd, onHandleClick, pillTooltip, style, className, }: SplitPanelViewProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ export interface ContextMenuItem {
2
+ id: string;
3
+ label: string;
4
+ icon?: React.ReactNode;
5
+ iconColor?: string;
6
+ shortcut?: string;
7
+ danger?: boolean;
8
+ disabled?: boolean;
9
+ separator?: boolean;
10
+ children?: ContextMenuItem[];
11
+ onClick?: () => void;
12
+ }
13
+ export type ContextMenuWidth = 'auto' | 'sm' | 'md' | 'lg' | number;
14
+ export interface ContextMenuViewProps {
15
+ items: ContextMenuItem[];
16
+ anchorEl: HTMLElement | null;
17
+ open: boolean;
18
+ onClose: () => void;
19
+ width?: ContextMenuWidth;
20
+ rounded?: boolean;
21
+ matchAnchorWidth?: boolean;
22
+ position?: {
23
+ x: number;
24
+ y: number;
25
+ };
26
+ align?: 'auto' | 'left' | 'right';
27
+ }
28
+ export declare function ContextMenuView({ items, anchorEl, open, onClose, width, rounded, matchAnchorWidth, position, align, }: ContextMenuViewProps): import('react').ReactPortal | null;
@@ -0,0 +1,17 @@
1
+ export interface InfoPopupItem {
2
+ code: string;
3
+ description: string;
4
+ }
5
+ export interface InfoPopupViewProps {
6
+ open: boolean;
7
+ onClose: () => void;
8
+ anchorEl?: HTMLElement | null;
9
+ title: string;
10
+ description?: string;
11
+ items?: InfoPopupItem[];
12
+ footer?: string;
13
+ wikiLabel?: string;
14
+ wikiHref?: string;
15
+ width?: number;
16
+ }
17
+ export declare function InfoPopupView({ open, onClose, anchorEl, title, description, items, footer, wikiLabel, wikiHref, width, }: InfoPopupViewProps): import('react').ReactPortal | null;
@@ -0,0 +1,41 @@
1
+ export type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
2
+ /**
3
+ * 'popout' — centered overlay with backdrop, portalled to document.body (default)
4
+ * 'inline' — bare card with no backdrop, no portal; parent controls positioning
5
+ */
6
+ export type ModalMode = 'popout' | 'inline';
7
+ export interface ModalViewProps {
8
+ open: boolean;
9
+ onClose: () => void;
10
+ title?: string;
11
+ /** Secondary text shown below the title in the header */
12
+ subtitle?: string;
13
+ /** Node rendered to the left of the title block — e.g. a coloured icon circle */
14
+ headerIcon?: React.ReactNode;
15
+ children?: React.ReactNode;
16
+ footerLeft?: React.ReactNode;
17
+ footerRight?: React.ReactNode;
18
+ size?: ModalSize;
19
+ showCloseIcon?: boolean;
20
+ /** Optional CSS color value for a tinted header background (e.g. 'var(--color-protocol-rest)') */
21
+ headerColor?: string;
22
+ /** When true, renders the header as a left→right gradient (accent tint → surface) instead of a flat tint */
23
+ headerGradient?: boolean;
24
+ /** Optional node rendered in the header right area, before the X button */
25
+ headerRight?: React.ReactNode;
26
+ /** When true, removes body padding (e.g. for full-bleed editor modals) */
27
+ noPadding?: boolean;
28
+ /** When true, uses var(--color-elevated) for the card background instead of var(--color-surface) */
29
+ elevated?: boolean;
30
+ className?: string;
31
+ /**
32
+ * 'popout' (default) — portal + backdrop + centered overlay
33
+ * 'inline' — bare card, no portal, no backdrop; parent div handles positioning
34
+ */
35
+ mode?: ModalMode;
36
+ /** Override the default 85vh max-height of the modal card */
37
+ maxHeight?: string;
38
+ /** Extra styles merged onto the body div (e.g. flex column layout for nested flex children) */
39
+ bodyStyle?: React.CSSProperties;
40
+ }
41
+ export declare function ModalView({ open, onClose, title, subtitle, headerIcon, children, footerLeft, footerRight, size, showCloseIcon, headerColor, headerGradient, headerRight, noPadding, elevated, mode, maxHeight, bodyStyle, }: ModalViewProps): import("react").JSX.Element | null;
@@ -0,0 +1,34 @@
1
+ import { CSSProperties } from 'react';
2
+ import { DuiSize } from '../../core/DuiTypes';
3
+ export interface RearrangeItem {
4
+ /** Stable unique id. */
5
+ id: string;
6
+ /** Visible label (or pass `render` for custom content). */
7
+ label?: string;
8
+ /** Enabled state — shows a checkbox when `selectable` is on. */
9
+ enabled?: boolean;
10
+ /** Optional leading glyph / emoji. */
11
+ icon?: string;
12
+ /** Optional custom row content (overrides label). */
13
+ render?: () => React.ReactNode;
14
+ /** Lock this row from being reordered or toggled. */
15
+ locked?: boolean;
16
+ }
17
+ export interface RearrangeViewProps {
18
+ items: RearrangeItem[];
19
+ /** Fired with the new ordered/toggled list on any change. */
20
+ onChange: (items: RearrangeItem[]) => void;
21
+ /** Show an enable/disable checkbox per row. Default: true. */
22
+ selectable?: boolean;
23
+ /** Accent color (CSS var or value) for the active drop indicator + checkbox. */
24
+ accentColor?: string;
25
+ size?: DuiSize;
26
+ className?: string;
27
+ style?: CSSProperties;
28
+ }
29
+ /**
30
+ * RearrangeView — a drag-to-reorder list with an optional enable/disable checkbox
31
+ * per row. Theme-aware (DUI CSS variables). Reordering uses native HTML5 drag and
32
+ * drop with a live drop indicator; the checkbox uses DUI's CheckboxView.
33
+ */
34
+ export declare function RearrangeView({ items, onChange, selectable, accentColor, size, className, style, }: RearrangeViewProps): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ export interface PilledTab {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ export interface PilledTabViewProps {
6
+ tabs: PilledTab[];
7
+ activeId: string;
8
+ onChange: (id: string) => void;
9
+ /** CSS color or variable for the active pill background. Defaults to indigo. */
10
+ accentColor?: string;
11
+ /**
12
+ * `'rounded'` — subtle rounded corners (default, border-radius 8/6).
13
+ * `'pill'` — fully pill-shaped corners (border-radius 999).
14
+ */
15
+ mode?: 'rounded' | 'pill';
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ }
19
+ export declare function PilledTabView({ tabs, activeId, onChange, accentColor, mode, className, style, }: PilledTabViewProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { DuiSize } from '../../core/DuiTypes';
2
+ export type TabBarProtocol = 'rest' | 'graphql' | 'websocket' | 'grpc' | 'soap' | 'ai' | 'mcp';
3
+ export type TabBarTabType = 'request' | 'settings' | 'mock-server' | 'daakia-ai';
4
+ export type RealtimeProtocol = 'websocket' | 'sse' | 'socketio' | 'mqtt';
5
+ export interface TabBarTab {
6
+ id: string;
7
+ label: string;
8
+ type?: TabBarTabType;
9
+ protocol?: TabBarProtocol;
10
+ method?: string;
11
+ dirty?: boolean;
12
+ pinned?: boolean;
13
+ rtProtocol?: RealtimeProtocol;
14
+ }
15
+ export interface TabBarViewProps {
16
+ tabs: TabBarTab[];
17
+ activeTabId: string;
18
+ onTabClick: (id: string) => void;
19
+ onTabClose?: (id: string) => void;
20
+ onAddTab?: () => void;
21
+ accentColor?: string;
22
+ /** Falls back to DuiProvider size when omitted. Overrides `height`. */
23
+ size?: DuiSize;
24
+ /** Raw pixel height — prefer `size` for token-aligned sizing. */
25
+ height?: number;
26
+ className?: string;
27
+ }
28
+ export declare function TabBarView({ tabs, activeTabId, onTabClick, onTabClose, onAddTab, accentColor, size, height, className, }: TabBarViewProps): import("react").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from 'react';
2
+ import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from '../../core/DuiTypes';
3
+ export interface TabItem {
4
+ id: string;
5
+ label: string;
6
+ badge?: number;
7
+ dot?: boolean;
8
+ dotColor?: string;
9
+ badgeColor?: string;
10
+ closeable?: boolean;
11
+ /** Custom content rendered after the label */
12
+ extra?: ReactNode;
13
+ }
14
+ export type TabViewVariant = 'pill' | 'underline' | 'gql';
15
+ export interface TabViewProps {
16
+ tabs: TabItem[];
17
+ active: string;
18
+ onChange: (id: string) => void;
19
+ onClose?: (id: string) => void;
20
+ onAdd?: () => void;
21
+ variant?: TabViewVariant;
22
+ /** Falls back to DuiProvider size when omitted. */
23
+ size?: DuiSize;
24
+ accentColor?: string;
25
+ className?: string;
26
+ width?: DuiWidth;
27
+ borderRadius?: DuiRadius | number;
28
+ /** Text color for inactive tabs */
29
+ color?: string;
30
+ /** Color for active tab and indicator */
31
+ activeColor?: string;
32
+ fontStyle?: DuiFontStyle;
33
+ }
34
+ export declare function TabView({ variant, width, ...props }: TabViewProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { DuiSize, DuiRadius, DuiWidth, DuiFontStyle } from './DuiTypes';
2
+ export interface ButtonBaseConfig {
3
+ height: string;
4
+ fontSize: string;
5
+ iconSize: number;
6
+ borderRadius: string;
7
+ paddingX: string;
8
+ gap: string;
9
+ width: string;
10
+ color: string | undefined;
11
+ defaultColor: string | undefined;
12
+ activeColor: string | undefined;
13
+ fontStyle: DuiFontStyle | undefined;
14
+ }
15
+ /** Local override props that any button component can accept. */
16
+ export interface ButtonContainerProps {
17
+ width?: DuiWidth;
18
+ borderRadius?: DuiRadius | number;
19
+ color?: string;
20
+ defaultColor?: string;
21
+ activeColor?: string;
22
+ fontStyle?: DuiFontStyle;
23
+ }
24
+ /**
25
+ * Category base for: ButtonView, IconButtonView, SplitButtonView, AIButtonView, DropDownButtonView.
26
+ * Falls back to DuiProvider values when no local prop is given.
27
+ */
28
+ export declare function useButtonBase(sizeProp?: DuiSize, overrides?: ButtonContainerProps): ButtonBaseConfig;