@toolr/ui-design 0.1.6 → 0.1.7
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/components/hooks/use-click-outside.ts +10 -3
- package/components/hooks/use-modal-behavior.ts +24 -0
- package/components/hooks/use-navigation-history.ts +7 -2
- package/components/hooks/use-resizable-sidebar.ts +38 -0
- package/components/lib/form-colors.ts +40 -0
- package/components/sections/captured-issues/captured-issues-panel.tsx +3 -3
- package/components/sections/captured-issues/use-captured-issues.ts +9 -3
- package/components/sections/prompt-editor/file-type-tabbed-prompt-editor.tsx +4 -40
- package/components/sections/prompt-editor/index.ts +0 -7
- package/components/sections/prompt-editor/simulator-prompt-editor.tsx +4 -40
- package/components/sections/prompt-editor/tabbed-prompt-editor.tsx +4 -36
- package/components/sections/snippets-editor/snippets-editor.tsx +6 -39
- package/components/settings/SettingsHeader.tsx +0 -1
- package/components/settings/SettingsTreeNav.tsx +9 -12
- package/components/ui/action-dialog.tsx +7 -51
- package/components/ui/badge.tsx +4 -20
- package/components/ui/breadcrumb.tsx +6 -66
- package/components/ui/checkbox.tsx +2 -16
- package/components/ui/collapsible-section.tsx +3 -41
- package/components/ui/confirm-badge.tsx +3 -20
- package/components/ui/cookie-consent.tsx +17 -1
- package/components/ui/debounce-border-overlay.tsx +31 -0
- package/components/ui/detail-section.tsx +2 -19
- package/components/ui/editor-placeholder-card.tsx +10 -9
- package/components/ui/execution-details-panel.tsx +2 -7
- package/components/ui/file-structure-section.tsx +3 -18
- package/components/ui/file-tree.tsx +2 -14
- package/components/ui/files-panel.tsx +3 -11
- package/components/ui/form-actions.tsx +6 -5
- package/components/ui/icon-button.tsx +2 -1
- package/components/ui/input.tsx +10 -26
- package/components/ui/label.tsx +3 -17
- package/components/ui/modal.tsx +3 -15
- package/components/ui/nav-card.tsx +2 -17
- package/components/ui/navigation-bar.tsx +8 -69
- package/components/ui/registry-browser.tsx +6 -20
- package/components/ui/registry-card.tsx +3 -7
- package/components/ui/resizable-textarea.tsx +13 -35
- package/components/ui/segmented-toggle.tsx +2 -1
- package/components/ui/select.tsx +2 -11
- package/components/ui/selection-grid.tsx +2 -50
- package/components/ui/setting-row.tsx +1 -3
- package/components/ui/settings-info-box.tsx +5 -22
- package/components/ui/status-card.tsx +2 -13
- package/components/ui/tab-bar.tsx +3 -29
- package/components/ui/toggle.tsx +3 -19
- package/components/ui/tooltip.tsx +6 -18
- package/dist/index.d.ts +60 -137
- package/dist/index.js +1426 -2334
- package/index.ts +8 -7
- package/package.json +1 -1
- package/components/sections/prompt-editor/use-prompt-editor.ts +0 -131
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Info, AlertTriangle, CheckCircle, AlertCircle } from 'lucide-react'
|
|
2
|
+
import { ACCENT_TEXT, type AccentColor } from '../lib/form-colors.ts'
|
|
2
3
|
import { cn } from '../lib/cn.ts'
|
|
3
4
|
|
|
4
|
-
export type SettingsInfoBoxColor =
|
|
5
|
+
export type SettingsInfoBoxColor = AccentColor
|
|
5
6
|
|
|
6
7
|
export interface SettingsInfoBoxProps {
|
|
7
8
|
children: React.ReactNode
|
|
@@ -10,7 +11,7 @@ export interface SettingsInfoBoxProps {
|
|
|
10
11
|
testId?: string
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const
|
|
14
|
+
const INFO_BOX_ICONS: Record<SettingsInfoBoxColor, typeof Info> = {
|
|
14
15
|
neutral: Info,
|
|
15
16
|
blue: Info,
|
|
16
17
|
amber: AlertTriangle,
|
|
@@ -28,24 +29,6 @@ const iconMap: Record<SettingsInfoBoxColor, typeof Info> = {
|
|
|
28
29
|
teal: Info,
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
const iconColorMap: Record<SettingsInfoBoxColor, string> = {
|
|
32
|
-
neutral: 'text-neutral-500',
|
|
33
|
-
blue: 'text-blue-400',
|
|
34
|
-
amber: 'text-amber-400',
|
|
35
|
-
green: 'text-green-400',
|
|
36
|
-
red: 'text-red-400',
|
|
37
|
-
orange: 'text-orange-400',
|
|
38
|
-
cyan: 'text-cyan-400',
|
|
39
|
-
yellow: 'text-yellow-400',
|
|
40
|
-
purple: 'text-purple-400',
|
|
41
|
-
indigo: 'text-indigo-400',
|
|
42
|
-
emerald: 'text-emerald-400',
|
|
43
|
-
violet: 'text-violet-400',
|
|
44
|
-
sky: 'text-sky-400',
|
|
45
|
-
pink: 'text-pink-400',
|
|
46
|
-
teal: 'text-teal-400',
|
|
47
|
-
}
|
|
48
|
-
|
|
49
32
|
const borderColorMap: Record<SettingsInfoBoxColor, string> = {
|
|
50
33
|
neutral: 'border-l-neutral-600',
|
|
51
34
|
blue: 'border-l-blue-500',
|
|
@@ -65,7 +48,7 @@ const borderColorMap: Record<SettingsInfoBoxColor, string> = {
|
|
|
65
48
|
}
|
|
66
49
|
|
|
67
50
|
export function SettingsInfoBox({ children, color = 'neutral', className, testId }: SettingsInfoBoxProps) {
|
|
68
|
-
const Icon =
|
|
51
|
+
const Icon = INFO_BOX_ICONS[color]
|
|
69
52
|
|
|
70
53
|
return (
|
|
71
54
|
<div
|
|
@@ -73,7 +56,7 @@ export function SettingsInfoBox({ children, color = 'neutral', className, testId
|
|
|
73
56
|
style={{ paddingLeft: 10 }}
|
|
74
57
|
data-testid={testId}
|
|
75
58
|
>
|
|
76
|
-
<Icon className={cn('w-4 h-4 mt-0.5 shrink-0',
|
|
59
|
+
<Icon className={cn('w-4 h-4 mt-0.5 shrink-0', ACCENT_TEXT[color])} />
|
|
77
60
|
<div className="text-md text-neutral-500">{children}</div>
|
|
78
61
|
</div>
|
|
79
62
|
)
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
/** Status card displaying a list of labeled items with color-coded status indicators. */
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
Settings, Shield, Database, Globe, Zap, Code, Terminal,
|
|
5
|
-
Star, Cloud, Bell, Heart, Sparkles, Bot, Plug,
|
|
6
|
-
} from 'lucide-react'
|
|
7
|
-
import type { LucideIcon } from 'lucide-react'
|
|
8
|
-
import type { IconName } from './icon-button.tsx'
|
|
3
|
+
import { iconMap, type IconName } from './icon-button.tsx'
|
|
9
4
|
import { cn } from '../lib/cn.ts'
|
|
10
5
|
|
|
11
|
-
const iconSubset: Partial<Record<IconName, LucideIcon>> = {
|
|
12
|
-
settings: Settings, shield: Shield, database: Database, globe: Globe,
|
|
13
|
-
zap: Zap, code: Code, terminal: Terminal, star: Star, cloud: Cloud,
|
|
14
|
-
bell: Bell, heart: Heart, sparkles: Sparkles, bot: Bot, plug: Plug,
|
|
15
|
-
}
|
|
16
|
-
|
|
17
6
|
type StatusType = 'success' | 'warning' | 'error' | 'info' | 'neutral'
|
|
18
7
|
|
|
19
8
|
export interface StatusItem {
|
|
@@ -55,7 +44,7 @@ export function StatusCard({
|
|
|
55
44
|
action,
|
|
56
45
|
className,
|
|
57
46
|
}: StatusCardProps) {
|
|
58
|
-
const Icon = icon ?
|
|
47
|
+
const Icon = icon ? iconMap[icon] : undefined
|
|
59
48
|
|
|
60
49
|
return (
|
|
61
50
|
<div className={cn('rounded-lg border border-neutral-700 bg-neutral-800 overflow-hidden', className)}>
|
|
@@ -1,38 +1,12 @@
|
|
|
1
1
|
/** Tab bar with underline, pill, and card variants, closable tabs, color-coded icons, and auto-collapse to icon-only. */
|
|
2
2
|
|
|
3
3
|
import { useRef, useState, useEffect, useCallback } from 'react'
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
Globe, Star, Users, User, Tag, X,
|
|
7
|
-
Zap, Shield, Sparkles, Eye, Lock, Search, Heart,
|
|
8
|
-
} from 'lucide-react'
|
|
9
|
-
import type { LucideIcon } from 'lucide-react'
|
|
10
|
-
import type { IconName } from './icon-button.tsx'
|
|
4
|
+
import { X } from 'lucide-react'
|
|
5
|
+
import { iconMap, type IconName } from './icon-button.tsx'
|
|
11
6
|
import { Badge, type BadgeColor } from './badge.tsx'
|
|
12
7
|
import { cn } from '../lib/cn.ts'
|
|
13
8
|
import { Tooltip } from './tooltip.tsx'
|
|
14
9
|
|
|
15
|
-
const iconSubset: Partial<Record<IconName, LucideIcon>> = {
|
|
16
|
-
folder: Folder,
|
|
17
|
-
file: File,
|
|
18
|
-
settings: Settings,
|
|
19
|
-
code: Code,
|
|
20
|
-
terminal: Terminal,
|
|
21
|
-
database: Database,
|
|
22
|
-
globe: Globe,
|
|
23
|
-
star: Star,
|
|
24
|
-
users: Users,
|
|
25
|
-
user: User,
|
|
26
|
-
tag: Tag,
|
|
27
|
-
zap: Zap,
|
|
28
|
-
shield: Shield,
|
|
29
|
-
sparkles: Sparkles,
|
|
30
|
-
eye: Eye,
|
|
31
|
-
lock: Lock,
|
|
32
|
-
search: Search,
|
|
33
|
-
heart: Heart,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
10
|
export interface Tab {
|
|
37
11
|
id: string
|
|
38
12
|
label: string
|
|
@@ -102,7 +76,7 @@ function estimateTabsWidth(tabs: Tab[], size: keyof typeof sizeConfig): number {
|
|
|
102
76
|
}
|
|
103
77
|
|
|
104
78
|
function TabIcon({ icon, size, color }: { icon: IconName; size: 'xss' | 'xs' | 'sm' | 'md' | 'lg'; color?: string }) {
|
|
105
|
-
const Icon =
|
|
79
|
+
const Icon = iconMap[icon]
|
|
106
80
|
if (!Icon) return null
|
|
107
81
|
const s = sizeConfig[size]
|
|
108
82
|
const c = getColors(color)
|
package/components/ui/toggle.tsx
CHANGED
|
@@ -7,22 +7,9 @@
|
|
|
7
7
|
* - List items - inline toggle controls
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
| 'red'
|
|
14
|
-
| 'orange'
|
|
15
|
-
| 'cyan'
|
|
16
|
-
| 'yellow'
|
|
17
|
-
| 'purple'
|
|
18
|
-
| 'indigo'
|
|
19
|
-
| 'emerald'
|
|
20
|
-
| 'amber'
|
|
21
|
-
| 'violet'
|
|
22
|
-
| 'neutral'
|
|
23
|
-
| 'sky'
|
|
24
|
-
| 'pink'
|
|
25
|
-
| 'teal'
|
|
10
|
+
import { type AccentColor } from '../lib/form-colors.ts'
|
|
11
|
+
|
|
12
|
+
export type ToggleColor = AccentColor
|
|
26
13
|
|
|
27
14
|
// Border colors per accent
|
|
28
15
|
const BORDER_COLORS: Record<ToggleColor, { idle: string; active: string }> = {
|
|
@@ -90,8 +77,6 @@ const TOGGLE_SIZES: Record<ToggleSize, { track: string; knob: string; translate:
|
|
|
90
77
|
lg: { track: 'w-14 h-7', knob: 'w-6 h-6', translate: 'translate-x-7' },
|
|
91
78
|
}
|
|
92
79
|
|
|
93
|
-
export type ToggleVariant = 'outline' | 'filled'
|
|
94
|
-
|
|
95
80
|
export interface ToggleProps {
|
|
96
81
|
checked: boolean
|
|
97
82
|
onChange: (checked: boolean) => void
|
|
@@ -99,7 +84,6 @@ export interface ToggleProps {
|
|
|
99
84
|
size?: ToggleSize
|
|
100
85
|
className?: string
|
|
101
86
|
color?: ToggleColor
|
|
102
|
-
variant?: ToggleVariant
|
|
103
87
|
/** Test ID for E2E testing */
|
|
104
88
|
testId?: string
|
|
105
89
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useState, useRef, useLayoutEffect, useEffect } from 'react'
|
|
1
|
+
import { useState, useRef, useLayoutEffect, useEffect, useCallback } from 'react'
|
|
2
2
|
import type { ReactNode } from 'react'
|
|
3
3
|
import { createPortal } from 'react-dom'
|
|
4
|
+
import { useClickOutside } from '../hooks/use-click-outside.ts'
|
|
4
5
|
|
|
5
6
|
export interface TooltipContent {
|
|
6
7
|
title?: string
|
|
@@ -201,19 +202,8 @@ export function Tooltip({
|
|
|
201
202
|
}
|
|
202
203
|
|
|
203
204
|
// Click-outside dismissal for click trigger mode
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const handleClickOutside = (e: MouseEvent) => {
|
|
207
|
-
if (
|
|
208
|
-
triggerRef.current && !triggerRef.current.contains(e.target as Node) &&
|
|
209
|
-
tooltipRef.current && !tooltipRef.current.contains(e.target as Node)
|
|
210
|
-
) {
|
|
211
|
-
setIsVisible(false)
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
document.addEventListener('mousedown', handleClickOutside)
|
|
215
|
-
return () => document.removeEventListener('mousedown', handleClickOutside)
|
|
216
|
-
}, [trigger, isVisible])
|
|
205
|
+
const dismissClickTooltip = useCallback(() => setIsVisible(false), [])
|
|
206
|
+
useClickOutside([triggerRef, tooltipRef], isVisible && trigger === 'click', dismissClickTooltip)
|
|
217
207
|
|
|
218
208
|
const updatePosition = () => {
|
|
219
209
|
if (!triggerRef.current) return
|
|
@@ -262,9 +252,7 @@ export function Tooltip({
|
|
|
262
252
|
style={{
|
|
263
253
|
top: coords.top,
|
|
264
254
|
left: coords.left,
|
|
265
|
-
opacity:
|
|
266
|
-
visibility: isVisible ? 'visible' : 'hidden',
|
|
267
|
-
transition: 'opacity 150ms, visibility 150ms',
|
|
255
|
+
opacity: 1,
|
|
268
256
|
...(multiline ? { maxWidth: maxWidth ?? '80vw' } : {}),
|
|
269
257
|
...(maxHeight ? { maxHeight, overflowY: 'auto' as const } : {}),
|
|
270
258
|
}}
|
|
@@ -290,7 +278,7 @@ export function Tooltip({
|
|
|
290
278
|
>
|
|
291
279
|
{children}
|
|
292
280
|
</div>
|
|
293
|
-
{createPortal(tooltipContent, document.body)}
|
|
281
|
+
{isVisible && createPortal(tooltipContent, document.body)}
|
|
294
282
|
</>
|
|
295
283
|
)
|
|
296
284
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,13 @@ import { LucideIcon } from 'lucide-react';
|
|
|
6
6
|
import { ClassValue } from 'clsx';
|
|
7
7
|
|
|
8
8
|
type FormColor = 'blue' | 'green' | 'red' | 'orange' | 'cyan' | 'yellow' | 'purple' | 'indigo' | 'emerald' | 'amber' | 'violet' | 'neutral' | 'sky' | 'pink' | 'teal';
|
|
9
|
+
type AccentColor = FormColor;
|
|
10
|
+
declare const ACCENT_TEXT: Record<AccentColor, string>;
|
|
11
|
+
declare const ACCENT_ICON: Record<FormColor, string>;
|
|
12
|
+
declare const ACCENT_NAV: Record<AccentColor, {
|
|
13
|
+
bg: string;
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
9
16
|
|
|
10
17
|
declare const SCALE_KEYS: readonly ["black", "950", "900", "850", "800", "750", "700", "600", "500", "400", "300", "200"];
|
|
11
18
|
type ScaleKey = (typeof SCALE_KEYS)[number];
|
|
@@ -231,7 +238,7 @@ interface ActionItem {
|
|
|
231
238
|
testId?: string;
|
|
232
239
|
}
|
|
233
240
|
type IconButtonStatus = 'loading' | 'success' | 'warning' | 'error';
|
|
234
|
-
type IconButtonColor =
|
|
241
|
+
type IconButtonColor = AccentColor;
|
|
235
242
|
type IconButtonVariant = 'filled' | 'outline';
|
|
236
243
|
interface IconButtonProps {
|
|
237
244
|
icon: IconName | ReactNode;
|
|
@@ -265,7 +272,7 @@ interface CollapseButtonProps {
|
|
|
265
272
|
}
|
|
266
273
|
declare function CollapseButton({ collapsed, onToggle, size, color, tooltipPosition }: CollapseButtonProps): react_jsx_runtime.JSX.Element;
|
|
267
274
|
|
|
268
|
-
type LabelColor =
|
|
275
|
+
type LabelColor = AccentColor;
|
|
269
276
|
interface LabelProps {
|
|
270
277
|
text: string;
|
|
271
278
|
color: LabelColor;
|
|
@@ -287,23 +294,11 @@ interface LabelProps {
|
|
|
287
294
|
className?: string;
|
|
288
295
|
testId?: string;
|
|
289
296
|
}
|
|
297
|
+
/** Smart capitalize: capitalizes first letter of each word separated by spaces or dashes */
|
|
298
|
+
declare function smartCapitalize(value: string): string;
|
|
290
299
|
declare function Label({ text, color, icon, IconComponent: CustomIcon, tooltip, size, textTransform, progress, onClick, className, testId, }: LabelProps): react_jsx_runtime.JSX.Element;
|
|
291
300
|
|
|
292
|
-
|
|
293
|
-
* Badge - Outline-styled pill badge for displaying counts or short labels
|
|
294
|
-
*
|
|
295
|
-
* Used by:
|
|
296
|
-
* - TabBar, BottomPanelHeader - tab count badges
|
|
297
|
-
* - NavCard - card count badges
|
|
298
|
-
* - Any UI that needs a small inline indicator
|
|
299
|
-
*
|
|
300
|
-
* Features:
|
|
301
|
-
* - Outline variant matching IconButton outline style (border + text, no fill)
|
|
302
|
-
* - Accepts numbers (auto-caps at 99+) or short strings ("New")
|
|
303
|
-
* - 15 color variants
|
|
304
|
-
* - 5 size variants (xss, xs, sm, md, lg)
|
|
305
|
-
*/
|
|
306
|
-
type BadgeColor = 'blue' | 'green' | 'red' | 'orange' | 'cyan' | 'yellow' | 'purple' | 'indigo' | 'emerald' | 'amber' | 'violet' | 'neutral' | 'sky' | 'pink' | 'teal';
|
|
301
|
+
type BadgeColor = AccentColor;
|
|
307
302
|
interface BadgeProps {
|
|
308
303
|
value: number | string;
|
|
309
304
|
color?: BadgeColor;
|
|
@@ -313,19 +308,7 @@ interface BadgeProps {
|
|
|
313
308
|
}
|
|
314
309
|
declare function Badge({ value, color, size, className, testId, }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
315
310
|
|
|
316
|
-
|
|
317
|
-
* ConfirmBadge - Outline-styled check badge for indicating selection/confirmation
|
|
318
|
-
*
|
|
319
|
-
* Used by:
|
|
320
|
-
* - SelectionGrid - selected state indicator on cards
|
|
321
|
-
* - Any UI that needs a small check/confirmed indicator
|
|
322
|
-
*
|
|
323
|
-
* Features:
|
|
324
|
-
* - Outline variant matching IconButton outline style (border + text, no fill)
|
|
325
|
-
* - 15 color variants
|
|
326
|
-
* - 5 size variants (xss, xs, sm, md, lg)
|
|
327
|
-
*/
|
|
328
|
-
type ConfirmBadgeColor = 'blue' | 'green' | 'red' | 'orange' | 'cyan' | 'yellow' | 'purple' | 'indigo' | 'emerald' | 'amber' | 'violet' | 'neutral' | 'sky' | 'pink' | 'teal';
|
|
311
|
+
type ConfirmBadgeColor = AccentColor;
|
|
329
312
|
interface ConfirmBadgeProps {
|
|
330
313
|
color?: ConfirmBadgeColor;
|
|
331
314
|
size?: 'xss' | 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -334,16 +317,8 @@ interface ConfirmBadgeProps {
|
|
|
334
317
|
}
|
|
335
318
|
declare function ConfirmBadge({ color, size, className, testId, }: ConfirmBadgeProps): react_jsx_runtime.JSX.Element;
|
|
336
319
|
|
|
337
|
-
/**
|
|
338
|
-
* Checkbox - Controlled checkbox input with check icon
|
|
339
|
-
*
|
|
340
|
-
* Used by:
|
|
341
|
-
* - Settings forms - boolean preference toggles
|
|
342
|
-
* - Filter panels - multi-select filters
|
|
343
|
-
* - List items - selection state
|
|
344
|
-
*/
|
|
345
320
|
type CheckboxSize = 'xss' | 'xs' | 'sm' | 'md' | 'lg';
|
|
346
|
-
type CheckboxColor =
|
|
321
|
+
type CheckboxColor = AccentColor;
|
|
347
322
|
type CheckboxVariant = 'outline' | 'filled';
|
|
348
323
|
interface CheckboxProps {
|
|
349
324
|
checked: boolean;
|
|
@@ -358,17 +333,8 @@ interface CheckboxProps {
|
|
|
358
333
|
}
|
|
359
334
|
declare function Checkbox({ checked, onChange, disabled, size, color, variant, className, testId, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
360
335
|
|
|
361
|
-
|
|
362
|
-
* Toggle - iOS-style switch toggle
|
|
363
|
-
*
|
|
364
|
-
* Used by:
|
|
365
|
-
* - Settings pages - boolean preferences
|
|
366
|
-
* - Feature flags - enable/disable features
|
|
367
|
-
* - List items - inline toggle controls
|
|
368
|
-
*/
|
|
369
|
-
type ToggleColor = 'blue' | 'green' | 'red' | 'orange' | 'cyan' | 'yellow' | 'purple' | 'indigo' | 'emerald' | 'amber' | 'violet' | 'neutral' | 'sky' | 'pink' | 'teal';
|
|
336
|
+
type ToggleColor = AccentColor;
|
|
370
337
|
type ToggleSize = 'xss' | 'xs' | 'sm' | 'md' | 'lg';
|
|
371
|
-
type ToggleVariant = 'outline' | 'filled';
|
|
372
338
|
interface ToggleProps {
|
|
373
339
|
checked: boolean;
|
|
374
340
|
onChange: (checked: boolean) => void;
|
|
@@ -376,7 +342,6 @@ interface ToggleProps {
|
|
|
376
342
|
size?: ToggleSize;
|
|
377
343
|
className?: string;
|
|
378
344
|
color?: ToggleColor;
|
|
379
|
-
variant?: ToggleVariant;
|
|
380
345
|
/** Test ID for E2E testing */
|
|
381
346
|
testId?: string;
|
|
382
347
|
}
|
|
@@ -430,7 +395,7 @@ interface SegmentedToggleProps<T extends string> {
|
|
|
430
395
|
options: SegmentedToggleOption<T>[];
|
|
431
396
|
value: T;
|
|
432
397
|
onChange: (value: T) => void;
|
|
433
|
-
accentColor?:
|
|
398
|
+
accentColor?: AccentColor;
|
|
434
399
|
/** Visual style: 'filled' (default) has a container background, 'outline' is transparent */
|
|
435
400
|
variant?: 'filled' | 'outline';
|
|
436
401
|
size?: 'xss' | 'xs' | 'sm' | 'md' | 'lg';
|
|
@@ -620,28 +585,21 @@ interface SelectionGridProps {
|
|
|
620
585
|
}
|
|
621
586
|
declare function SelectionGrid({ items: itemsProp, presets, selectedIds, onSelect, mode, layout, columns, className, }: SelectionGridProps): react_jsx_runtime.JSX.Element;
|
|
622
587
|
|
|
623
|
-
|
|
624
|
-
* ExecutionDetailsPanel - Shows AI execution configuration before running actions
|
|
625
|
-
*
|
|
626
|
-
* Displays tool, permissions, output format, CLI flags, and change handling.
|
|
627
|
-
* Optional "Allow direct edits" toggle with warning message.
|
|
628
|
-
* Used inside ActionDialog as the mandatory execution details section.
|
|
629
|
-
*/
|
|
630
|
-
interface ExecutionDetailRow {
|
|
588
|
+
interface DetailRow {
|
|
631
589
|
label: string;
|
|
632
590
|
value: string;
|
|
633
591
|
mono?: boolean;
|
|
634
592
|
}
|
|
635
|
-
interface
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
/**
|
|
641
|
-
|
|
593
|
+
interface DetailSectionProps {
|
|
594
|
+
/** Section title (e.g., "Execution Details") */
|
|
595
|
+
title: string;
|
|
596
|
+
/** Icon before the title */
|
|
597
|
+
icon?: IconName;
|
|
598
|
+
/** Detail rows to display */
|
|
599
|
+
rows: DetailRow[];
|
|
642
600
|
className?: string;
|
|
643
601
|
}
|
|
644
|
-
declare function
|
|
602
|
+
declare function DetailSection({ title, icon, rows, className }: DetailSectionProps): react_jsx_runtime.JSX.Element;
|
|
645
603
|
|
|
646
604
|
interface ActionDialogProps {
|
|
647
605
|
/** Dialog title */
|
|
@@ -697,7 +655,7 @@ interface ActionDialogProps {
|
|
|
697
655
|
/** Scenario grid column count */
|
|
698
656
|
scenarioColumns?: number;
|
|
699
657
|
/** Execution detail rows (Tool, Permissions, Output, CLI Flags, Changes) */
|
|
700
|
-
executionDetails:
|
|
658
|
+
executionDetails: DetailRow[];
|
|
701
659
|
/** Whether direct file edits are allowed */
|
|
702
660
|
allowDirectEdits?: boolean;
|
|
703
661
|
/** Callback to toggle direct edits - shows the toggle when provided */
|
|
@@ -711,6 +669,17 @@ interface ActionDialogProps {
|
|
|
711
669
|
}
|
|
712
670
|
declare function ActionDialog({ title, subtitle, icon, iconColor, onSettings, onCancel, onSubmit, submitLabel, submitIcon, submitColor, submitDisabled, statusText, selectionLabel, items, presets, selectedIds, onSelect, selectionMode, selectionLayout, selectionColumns, scenarioLabel, scenarios, selectedScenarioIds, onSelectScenarios, scenarioLayout, scenarioColumns, executionDetails, allowDirectEdits, onAllowDirectEditsChange, executionWarning, children, className, }: ActionDialogProps): react.ReactPortal;
|
|
713
671
|
|
|
672
|
+
interface ExecutionDetailsPanelProps {
|
|
673
|
+
details: DetailRow[];
|
|
674
|
+
/** Show the "Allow direct edits" toggle */
|
|
675
|
+
allowDirectEdits?: boolean;
|
|
676
|
+
onAllowDirectEditsChange?: (value: boolean) => void;
|
|
677
|
+
/** Warning message shown below the toggle */
|
|
678
|
+
warningMessage?: string;
|
|
679
|
+
className?: string;
|
|
680
|
+
}
|
|
681
|
+
declare function ExecutionDetailsPanel({ details, allowDirectEdits, onAllowDirectEditsChange, warningMessage, className, }: ExecutionDetailsPanelProps): react_jsx_runtime.JSX.Element;
|
|
682
|
+
|
|
714
683
|
interface FileTreeNode {
|
|
715
684
|
name: string;
|
|
716
685
|
type: 'file' | 'directory';
|
|
@@ -874,7 +843,6 @@ declare function DetailViewWrapper({ editorContent, actions, bottomPanel, rightS
|
|
|
874
843
|
|
|
875
844
|
type RegistryItemType = 'skill' | 'hook' | 'agent' | 'command' | 'plugin' | 'mcp' | 'settings';
|
|
876
845
|
type ExtensionSource = 'project' | 'plugin' | 'user' | 'local';
|
|
877
|
-
declare function formatCategory(category: string): string;
|
|
878
846
|
interface SeedrItemStatus {
|
|
879
847
|
updateAvailable: boolean;
|
|
880
848
|
modified: boolean;
|
|
@@ -972,7 +940,6 @@ type RegistryCardProps = SeedrVariant | ClaudePluginsVariant | AitmplVariant | S
|
|
|
972
940
|
declare function RegistryCard(props: RegistryCardProps): react_jsx_runtime.JSX.Element;
|
|
973
941
|
|
|
974
942
|
type PreviewMode = 'format' | 'language' | 'plain';
|
|
975
|
-
type AccentColor = 'blue' | 'green' | 'red' | 'orange' | 'cyan' | 'yellow' | 'purple' | 'indigo' | 'emerald' | 'amber' | 'violet' | 'neutral' | 'sky' | 'pink' | 'teal';
|
|
976
943
|
interface FileStructureSectionProps {
|
|
977
944
|
files: FileTreeNode[] | null;
|
|
978
945
|
rootName: string;
|
|
@@ -2341,51 +2308,6 @@ interface ScenarioOption {
|
|
|
2341
2308
|
}>;
|
|
2342
2309
|
}
|
|
2343
2310
|
|
|
2344
|
-
/**
|
|
2345
|
-
* usePromptEditor — Hook managing prompt editor state
|
|
2346
|
-
*
|
|
2347
|
-
* Part of: Sections > Prompt Editor
|
|
2348
|
-
*
|
|
2349
|
-
* Handles:
|
|
2350
|
-
* - Local content state (separate from saved content for dirty detection)
|
|
2351
|
-
* - Dirty state detection
|
|
2352
|
-
* - Save with Ctrl/Cmd+S keyboard shortcut
|
|
2353
|
-
* - Variable search/filter
|
|
2354
|
-
* - Active tab state
|
|
2355
|
-
*/
|
|
2356
|
-
|
|
2357
|
-
interface UsePromptEditorOptions {
|
|
2358
|
-
/** Prompt content keyed by tool id */
|
|
2359
|
-
prompts: Record<string, string>;
|
|
2360
|
-
/** Called when saving (all modified prompts at once) */
|
|
2361
|
-
onPromptChange: (tool: string, value: string) => void;
|
|
2362
|
-
/** Available tool tabs */
|
|
2363
|
-
tools: ToolTab[];
|
|
2364
|
-
/** Available template variables */
|
|
2365
|
-
variables?: PromptPlaceholder[];
|
|
2366
|
-
}
|
|
2367
|
-
interface UsePromptEditorReturn {
|
|
2368
|
-
/** Currently active tool tab id */
|
|
2369
|
-
activeTab: string;
|
|
2370
|
-
setActiveTab: (tab: string) => void;
|
|
2371
|
-
/** Local editor content (may differ from saved prompts) */
|
|
2372
|
-
localContent: Record<string, string>;
|
|
2373
|
-
/** Current prompt for the active tab */
|
|
2374
|
-
currentPrompt: string;
|
|
2375
|
-
/** Whether any tab has unsaved changes */
|
|
2376
|
-
isDirty: boolean;
|
|
2377
|
-
/** Handle editor content change */
|
|
2378
|
-
handleEditorChange: (value: string | undefined) => void;
|
|
2379
|
-
/** Save all modified prompts */
|
|
2380
|
-
handleSave: () => void;
|
|
2381
|
-
/** Variable search state */
|
|
2382
|
-
variableSearch: string;
|
|
2383
|
-
setVariableSearch: (search: string) => void;
|
|
2384
|
-
/** Filtered variables based on search */
|
|
2385
|
-
filteredVariables: PromptPlaceholder[];
|
|
2386
|
-
}
|
|
2387
|
-
declare function usePromptEditor({ prompts, onPromptChange, tools, variables, }: UsePromptEditorOptions): UsePromptEditorReturn;
|
|
2388
|
-
|
|
2389
2311
|
interface TabbedPromptEditorProps {
|
|
2390
2312
|
/** Prompt content keyed by tool id */
|
|
2391
2313
|
prompts: Record<string, string>;
|
|
@@ -2674,22 +2596,6 @@ interface SnapshotCardProps {
|
|
|
2674
2596
|
}
|
|
2675
2597
|
declare function SnapshotCard({ title, timestamp, status, description, stats, onSync, onView, className, }: SnapshotCardProps): react_jsx_runtime.JSX.Element;
|
|
2676
2598
|
|
|
2677
|
-
interface DetailRow {
|
|
2678
|
-
label: string;
|
|
2679
|
-
value: string;
|
|
2680
|
-
mono?: boolean;
|
|
2681
|
-
}
|
|
2682
|
-
interface DetailSectionProps {
|
|
2683
|
-
/** Section title (e.g., "Execution Details") */
|
|
2684
|
-
title: string;
|
|
2685
|
-
/** Icon before the title */
|
|
2686
|
-
icon?: IconName;
|
|
2687
|
-
/** Detail rows to display */
|
|
2688
|
-
rows: DetailRow[];
|
|
2689
|
-
className?: string;
|
|
2690
|
-
}
|
|
2691
|
-
declare function DetailSection({ title, icon, rows, className }: DetailSectionProps): react_jsx_runtime.JSX.Element;
|
|
2692
|
-
|
|
2693
2599
|
type ConsentChoice = 'accepted' | 'declined' | 'essential';
|
|
2694
2600
|
interface CookieConsentProps {
|
|
2695
2601
|
/** localStorage key used to persist the choice */
|
|
@@ -2706,10 +2612,12 @@ interface CookieConsentProps {
|
|
|
2706
2612
|
declare function CookieConsent({ storageKey, accentColor, heading, description, onConsent, }: CookieConsentProps): react_jsx_runtime.JSX.Element | null;
|
|
2707
2613
|
|
|
2708
2614
|
/**
|
|
2709
|
-
* Close a menu/dropdown when clicking outside its ref element.
|
|
2615
|
+
* Close a menu/dropdown when clicking outside its ref element(s).
|
|
2616
|
+
* Accepts a single ref, an array of refs, or null.
|
|
2617
|
+
* When given an array, closes only if the click is outside ALL refs.
|
|
2710
2618
|
* If ref is null, closes on any mousedown event.
|
|
2711
2619
|
*/
|
|
2712
|
-
declare function useClickOutside(ref: RefObject<HTMLElement | null> | null, isOpen: boolean, onClose: () => void): void;
|
|
2620
|
+
declare function useClickOutside(ref: RefObject<HTMLElement | null> | RefObject<HTMLElement | null>[] | null, isOpen: boolean, onClose: () => void): void;
|
|
2713
2621
|
|
|
2714
2622
|
/**
|
|
2715
2623
|
* Constrains a dropdown menu's height to fit within the viewport.
|
|
@@ -2717,6 +2625,11 @@ declare function useClickOutside(ref: RefObject<HTMLElement | null> | null, isOp
|
|
|
2717
2625
|
*/
|
|
2718
2626
|
declare function useDropdownMaxHeight<T extends HTMLElement>(isOpen: boolean, margin?: number): react.RefObject<T | null>;
|
|
2719
2627
|
|
|
2628
|
+
/**
|
|
2629
|
+
* Shared modal behavior: Escape key to close + body overflow lock.
|
|
2630
|
+
*/
|
|
2631
|
+
declare function useModalBehavior(isOpen: boolean, onClose: () => void): void;
|
|
2632
|
+
|
|
2720
2633
|
/** Hook for managing back/forward navigation history with a breadcrumb segment stack. */
|
|
2721
2634
|
|
|
2722
2635
|
interface UseNavigationHistoryReturn {
|
|
@@ -2731,6 +2644,18 @@ interface UseNavigationHistoryReturn {
|
|
|
2731
2644
|
}
|
|
2732
2645
|
declare function useNavigationHistory(initial?: BreadcrumbSegment[], maxEntries?: number): UseNavigationHistoryReturn;
|
|
2733
2646
|
|
|
2647
|
+
interface UseResizableSidebarOptions {
|
|
2648
|
+
min: number;
|
|
2649
|
+
max: number;
|
|
2650
|
+
defaultWidth: number;
|
|
2651
|
+
/** 'left' = drag right shrinks (sidebar on right), 'right' = drag right grows (sidebar on left) */
|
|
2652
|
+
direction?: 'left' | 'right';
|
|
2653
|
+
}
|
|
2654
|
+
declare function useResizableSidebar({ min, max, defaultWidth, direction }: UseResizableSidebarOptions): {
|
|
2655
|
+
width: number;
|
|
2656
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
2657
|
+
};
|
|
2658
|
+
|
|
2734
2659
|
interface SettingRowBase {
|
|
2735
2660
|
label: string;
|
|
2736
2661
|
description?: string;
|
|
@@ -2743,7 +2668,6 @@ interface SettingRowToggle extends SettingRowBase {
|
|
|
2743
2668
|
onChange: (checked: boolean) => void;
|
|
2744
2669
|
color?: ToggleColor;
|
|
2745
2670
|
size?: ToggleSize;
|
|
2746
|
-
variant?: ToggleVariant;
|
|
2747
2671
|
}
|
|
2748
2672
|
interface SettingRowSelect extends SettingRowBase {
|
|
2749
2673
|
type: 'select';
|
|
@@ -2773,7 +2697,7 @@ interface SettingsCardProps {
|
|
|
2773
2697
|
}
|
|
2774
2698
|
declare function SettingsCard({ children, className, title, description, testId }: SettingsCardProps): react_jsx_runtime.JSX.Element;
|
|
2775
2699
|
|
|
2776
|
-
type SettingsInfoBoxColor =
|
|
2700
|
+
type SettingsInfoBoxColor = AccentColor;
|
|
2777
2701
|
interface SettingsInfoBoxProps {
|
|
2778
2702
|
children: React.ReactNode;
|
|
2779
2703
|
color?: SettingsInfoBoxColor;
|
|
@@ -2838,7 +2762,6 @@ interface SettingsHeaderProps {
|
|
|
2838
2762
|
title: string;
|
|
2839
2763
|
description: string;
|
|
2840
2764
|
};
|
|
2841
|
-
confirmReset?: boolean;
|
|
2842
2765
|
action?: ReactNode;
|
|
2843
2766
|
variant?: 'default' | 'info' | 'warning' | 'danger';
|
|
2844
2767
|
}
|
|
@@ -2846,4 +2769,4 @@ declare function SettingsHeader({ description, icon, onReset, resetTooltip, acti
|
|
|
2846
2769
|
|
|
2847
2770
|
declare function cn(...inputs: ClassValue[]): string;
|
|
2848
2771
|
|
|
2849
|
-
export { ACCENT_DEFS, AI_TOOL_LOGOS, AI_TOOL_NAMES, type AccentColor, type AccentDef, ActionDialog, type ActionDialogProps, type ActionItem, AiActionButton, type AiActionButtonProps, type AiActionStatus, type AiCompletionResult, AiExecutionActionButtons, type AiExecutionActionButtonsProps, type AiToolConfig, AiToolIcon, type AiToolKey, AlertModal, type AlertModalProps, BASE_THEMES, Badge, type BadgeColor, type BadgeProps, BottomPanelHeader, type BottomPanelHeaderProps, Breadcrumb, type BreadcrumbProps, type BreadcrumbSegment, type CapturedError, type CapturedIssuesApi, CapturedIssuesPanel, type CapturedIssuesPanelProps, type ChangedComponents, Checkbox, type CheckboxColor, type CheckboxProps, type CheckboxSize, type CheckboxVariant, type CodingToolId, type CodingToolPresetConfig, CollapseButton, type CollapseButtonProps, CollapsibleSection, type CollapsibleSectionProps, type ComponentVersion, ConfirmBadge, type ConfirmBadgeColor, type ConfirmBadgeProps, ConfirmModal, type ConfirmModalProps, type ConsentChoice, CookieConsent, type CookieConsentProps, type CreateSnapshotResult, DARK_THEMES, DEFAULT_DIMS, DEFAULT_OUTLINE, type DetailRow, DetailSection, type DetailSectionProps, DetailViewWrapper, type DetailViewWrapperProps, type DiffSummary, type DiffTreeNode, type DirectoryStatus, EditorPlaceholderCard, type EditorPlaceholderCardProps, EditorToolbar, type EditorToolbarProps, type ErrorLogger,
|
|
2772
|
+
export { ACCENT_DEFS, ACCENT_ICON, ACCENT_NAV, ACCENT_TEXT, AI_TOOL_LOGOS, AI_TOOL_NAMES, type AccentColor, type AccentDef, ActionDialog, type ActionDialogProps, type ActionItem, AiActionButton, type AiActionButtonProps, type AiActionStatus, type AiCompletionResult, AiExecutionActionButtons, type AiExecutionActionButtonsProps, type AiToolConfig, AiToolIcon, type AiToolKey, AlertModal, type AlertModalProps, BASE_THEMES, Badge, type BadgeColor, type BadgeProps, BottomPanelHeader, type BottomPanelHeaderProps, Breadcrumb, type BreadcrumbProps, type BreadcrumbSegment, type CapturedError, type CapturedIssuesApi, CapturedIssuesPanel, type CapturedIssuesPanelProps, type ChangedComponents, Checkbox, type CheckboxColor, type CheckboxProps, type CheckboxSize, type CheckboxVariant, type CodingToolId, type CodingToolPresetConfig, CollapseButton, type CollapseButtonProps, CollapsibleSection, type CollapsibleSectionProps, type ComponentVersion, ConfirmBadge, type ConfirmBadgeColor, type ConfirmBadgeProps, ConfirmModal, type ConfirmModalProps, type ConsentChoice, CookieConsent, type CookieConsentProps, type CreateSnapshotResult, DARK_THEMES, DEFAULT_DIMS, DEFAULT_OUTLINE, type DetailRow, DetailSection, type DetailSectionProps, DetailViewWrapper, type DetailViewWrapperProps, type DiffSummary, type DiffTreeNode, type DirectoryStatus, EditorPlaceholderCard, type EditorPlaceholderCardProps, EditorToolbar, type EditorToolbarProps, type ErrorLogger, ExecutionDetailsPanel, type ExecutionDetailsPanelProps, type ExecutionStatus, ExtensionListCard, type ExtensionListCardProps, type ExtensionSource, type FileDiffInfo, type FileDiffStatus, FileDiffViewer, type FileDiffViewerProps, type FileEntry, FileStructureSection, type FileStructureSectionProps, FileTree, type FileTreeNode, type FileTreeProps, type FileTypeOption, FileTypeTabbedPromptEditor, type FileTypeTabbedPromptEditorProps, FilesPanel, type FilesPanelProps, FilterDropdown, type FilterDropdownProps, FormActions, type FormActionsProps, type FormColor, FrontmatterFormHeader, type FrontmatterFormHeaderProps, type GoldenLiveDiff, type GoldenMeta, type GoldenSnapshotsApi, type GoldenStatus, GoldenSyncPanel, type GoldenSyncPanelProps, ISSUE_TYPES, IconButton, type IconButtonColor, type IconButtonProps, type IconButtonStatus, type IconButtonVariant, type IconName, Input, type InputProps, type IssueReport, type IssueReportResult, type IssueType, LIGHT_THEMES, Label, type LabelColor, type LabelProps, type LayoutTab, LayoutTabBar, type LayoutTabBarProps, type ModalKind, type ModalSize, NavCard, type NavCardProps, NavigationBar, type NavigationBarProps, NumberInput, type NumberInputProps, type PanelTab, type PreviewMode, type PromptEditorApi, type PromptPlaceholder, type PromptSnapshot, RegistryBrowser, type RegistryBrowserProps, RegistryCard, type RegistryCardProps, RegistryDetail, type RegistryDetailProps, type RegistryItemType, ReportBugForm, type ReportBugFormProps, type ResetResult, ResizableTextarea, type ResizableTextareaProps, SCALE_KEYS, SNIPPET_NAME_REGEX, SURFACE_KEYS, type ScaleKey, type ScenarioOption, ScopeBadge, type ScopeType, type Screenshot, type ScreenshotAttachment, ScreenshotUploader, type ScreenshotUploaderProps, type SeedInfo, type SeedrItemStatus, SegmentedToggle, type SegmentedToggleOption, type SegmentedToggleProps, Select, type SelectOption, type SelectProps, type SelectionCardItem, SelectionGrid, type SelectionGridProps, SettingRow, type SettingRowProps, SettingsCard, type SettingsCardProps, SettingsHeader, type SettingsHeaderProps, SettingsInfoBox, type SettingsInfoBoxColor, type SettingsInfoBoxProps, SettingsPanel, type SettingsPanelProps, SettingsSectionTitle, type SettingsSectionTitleProps, SettingsTreeNav, type SettingsTreeNavProps, type SettingsTreeNode, SimulatorPromptEditor, type SimulatorPromptEditorProps, type SnapshotBrowserApi, SnapshotBrowserPanel, type SnapshotBrowserPanelProps, SnapshotCard, type SnapshotCardProps, type SnapshotCategory, type SnapshotEntry, type SnapshotInfo, type SnapshotItem, SnapshotManager, type SnapshotManagerProps, type SnapshotScope, SnapshotTree, type SnapshotTreeProps, type SnapshotsManifest, type Snippet, type SnippetData, SnippetsEditor, type SnippetsEditorApi, type SnippetsEditorProps, SnippetsPanel, type SnippetsPanelProps, SortDropdown, type SortDropdownProps, type SortField, type StatusBanner, StatusCard, type StatusCardProps, type StatusItem, StatusOverview, type StatusOverviewProps, type SubmittedError, type SurfaceKey, type SystemInfo, TOOLR_APPS, type Tab, TabBar, type TabBarProps, TabbedPromptEditor, type TabbedPromptEditorProps, type ThemeId, Toggle, type ToggleColor, type ToggleProps, type ToggleSize, type ToolDetectionResult, type ToolTab, type ToolrAppId, ToolrAppLogo, type ToolsPathsApi, ToolsPathsPanel, type ToolsPathsPanelProps, Tooltip, type TooltipAlign, TooltipButton, type TooltipContent, type TooltipPosition, type TrackedError, type UseCapturedIssuesOptions, type UseCapturedIssuesReturn, type UseGoldenSyncOptions, type UseGoldenSyncReturn, type UseNavigationHistoryReturn, type UseReportBugOptions, type UseReportBugReturn, type UseResizableSidebarOptions, type UseSnapshotBrowserOptions, type UseSnapshotBrowserReturn, type UseSnippetsEditorOptions, type UseSnippetsEditorReturn, type UseToolsPathsOptions, type UseToolsPathsReturn, VersionManager, type VersionManagerProps, applyTheme, cn, collectDirPaths, collectExpandablePaths, createErrorLogger, filterTree, findNodeByPath, formatBytes, formatDate, generateScale, getAllLeafPaths, getBreadcrumbFromPath, getLanguage, getLanguageFromPath, getParentPaths, hslToHex, iconMap, isLeafNode, isLightTheme, satCurve, smartCapitalize, submitIssueReport, useCapturedIssues, useClickOutside, useDropdownMaxHeight, useGoldenSync, useModalBehavior, useNavigationHistory, useReportBug, useResizableSidebar, useSnapshotBrowser, useSnippetsEditor, useToolsPaths };
|