{"version":3,"sources":["../src/index.ts","../src/app.ts","../src/layout.ts","../src/reactive.ts","../src/widgets.ts"],"sourcesContent":["// ─────────────────────────────────────────────────────\n// @termuijs/quick — Public API\n// ─────────────────────────────────────────────────────\n\n// ── Builder ───────────────────────────────────────────\nexport { app, AppBuilder } from './app.js';\n\n// ── Layout ────────────────────────────────────────────\nexport { row, col, grid, stack, spacer, toWidget } from './layout.js';\nexport type { LayoutChild } from './layout.js';\n\n// ── Widget Shorthands ─────────────────────────────────\nexport {\n    text,\n    gauge,\n    table,\n    list,\n    input,\n    sparkline,\n    status,\n    logView,\n    tree,\n    skeleton,\n    gridWidget,\n    barChart,\n    progressBar,\n    spinner,\n    jsonView,\n    diffView,\n    streamingText,\n    chatMessage,\n    toolCall,\n    commandPalette,\n    multiProgress,\n    tabs,\n    select,\n} from './widgets.js';\n\nexport type {\n    QuickTextOptions,\n    QuickGaugeOptions,\n    QuickTableRow,\n    QuickListOptions,\n    QuickInputOptions,\n    QuickSparklineOptions,\n    QuickStatusOptions,\n    QuickLogViewOptions,\n    QuickTreeOptions,\n    QuickSkeletonOptions,\n    QuickGridOptions,\n    QuickBarChartOptions,\n    QuickProgressBarOptions,\n    QuickSpinnerOptions,\n    TreeNode,\n    BarGroup,\n    BarChartOptions,\n    QuickJSONViewOptions,\n    QuickDiffViewOptions,\n    QuickToolCallOptions,\n    QuickCommand,\n    DiffLine,\n    ToolCallStatus,\n    QuickTabsOptions,\n    QuickSelectOptions,\n} from './widgets.js';\n\n// ── Store (re-exported for convenience) ───────────────\nexport { batch } from '@termuijs/store';\n\n// ── Reactive ──────────────────────────────────────────\nexport { resolve, isReactive } from './reactive.js';\nexport type { Reactive } from './reactive.js';\n\n// ── JSX Hooks (re-exported for convenience) ───────────\nexport {\n    useAsync,\n    useKeymap,\n    useMotion,\n} from '@termuijs/jsx';\nexport type { AsyncState, KeyBinding, MotionPreferences } from '@termuijs/jsx';\n\n// ── Notification Hook (from @termuijs/ui) ─────────────\nexport { useNotifications } from '@termuijs/ui';\nexport type { Notification } from '@termuijs/ui';\n\n// ── Theme Hook (from @termuijs/tss) ───────────────────\nexport { useTheme } from '@termuijs/tss';\n\n// ── Data Hooks (from @termuijs/data) ──────────────────\nexport {\n    useCpu,\n    useMemory,\n    useDisk,\n    useNetwork,\n    useTopProcesses,\n    useSystemInfo,\n    useHttpHealth,\n} from '@termuijs/data';\nexport type {\n    CpuMetrics,\n    MemoryMetrics,\n    DiskMetrics,\n    NetworkMetrics,\n    SystemInfo,\n} from '@termuijs/data';","// ─────────────────────────────────────────────────────\n// @termuijs/quick — AppBuilder: the fluent API entry point\n// ─────────────────────────────────────────────────────\n\nimport { App, type KeyEvent } from '@termuijs/core';\nimport {\n    Box,\n    Text,\n    Widget,\n    Gauge,\n    Sparkline,\n    StatusIndicator,\n    Table,\n    LogView,\n    List,\n    TextInput,\n    BarChart,\n    ProgressBar,\n    Tree,\n    MultiProgress,\n} from '@termuijs/widgets';\nimport type { ProgressItem } from '@termuijs/widgets';\nimport type { LayoutChild } from './layout.js';\nimport { toWidget } from './layout.js';\nimport { resolve, type Reactive } from './reactive.js';\n\n// ── Error display helper ──────────────────────────────\n\n/**\n * Create a simple error display widget — a red-bordered box with the error message.\n * Used as the fallback when the app fails to start.\n */\nfunction createErrorWidget(err: Error): Widget {\n    const box = new Box({\n        flexDirection: 'column',\n        width: '100%',\n        height: '100%',\n        border: 'single',\n        borderColor: { type: 'named', name: 'red' },\n        padding: 1,\n    });\n    box.addChild(new Text('  Application Error', {\n        height: 1,\n        bold: true,\n        fg: { type: 'named', name: 'red' },\n    }));\n    box.addChild(new Text('', { height: 1 }));\n    const message = err.message || String(err);\n    box.addChild(new Text(`  ${message}`, {\n        height: 1,\n        fg: { type: 'named', name: 'yellow' },\n    }));\n    if (err.stack) {\n        box.addChild(new Text('', { height: 1 }));\n        const stackLines = err.stack.split('\\n').slice(1, 5);\n        for (const line of stackLines) {\n            box.addChild(new Text(`  ${line.trim()}`, {\n                height: 1,\n                dim: true,\n            }));\n        }\n    }\n    box.addChild(new Text('', { height: 1 }));\n    box.addChild(new Text('  Press Ctrl+C to exit.', {\n        height: 1,\n        dim: true,\n    }));\n    return box;\n}\n\nexport interface QuickKeyAction {\n    key: string;\n    action: string | (() => void);\n}\n\nfunction parseInterval(interval: string): number {\n    const match = interval.match(/^(\\d+)(ms|s|m)$/);\n    if (!match) return 1000;\n    const value = parseInt(match[1], 10);\n    switch (match[2]) {\n        case 'ms': return value;\n        case 's': return value * 1000;\n        case 'm': return value * 60000;\n        default: return 1000;\n    }\n}\n\n/**\n * Walk a widget tree and collect all widgets matching a predicate.\n */\nfunction walkWidgets(root: Widget, predicate: (w: Widget) => boolean): Widget[] {\n    const result: Widget[] = [];\n    const stack: Widget[] = [root];\n\n    while (stack.length > 0) {\n        const w = stack.pop()!;\n        if (predicate(w)) result.push(w);\n        // Push children in reverse order so pop() visits them left-to-right\n        for (let i = w.children.length - 1; i >= 0; i--) {\n            stack.push(w.children[i]);\n        }\n    }\n\n    return result;\n}\n\n/**\n * The main fluent builder. Users call `app('title')` to start.\n *\n * @example\n * ```ts\n * app('My Dashboard')\n *   .rows(\n *     row(gauge('CPU', cpu.percent), gauge('Mem', memory.percent)),\n *     table('Processes', processes.top(5), ['name', 'cpu%']),\n *   )\n *   .keys({ q: 'quit', r: 'refresh' })\n *   .refresh('1s')\n *   .run();\n * ```\n */\nexport class AppBuilder {\n    private _title: string;\n    private _children: LayoutChild[] = [];\n    private _keyMap: Record<string, string | (() => void)> = {};\n    private _refreshInterval: number | null = null;\n    private _onError: ((err: unknown) => void) | null = null;\n    private _fullscreen = true;\n    private _app: App | null = null;\n\n    constructor(title: string) {\n        this._title = title;\n    }\n\n    /**\n     * Set the layout using vertical rows.\n     */\n    rows(...children: LayoutChild[]): this {\n        this._children = children;\n        return this;\n    }\n\n    /**\n     * Bind hotkeys:\n     * - `'quit'` — exits the app\n     * - `'refresh'` — forces an immediate refresh\n     * - `() => void` — custom handler\n     */\n    keys(map: Record<string, string | (() => void)>): this {\n        this._keyMap = { ...this._keyMap, ...map };\n        return this;\n    }\n\n    /**\n     * Set auto-refresh interval. Accepts: '500ms', '1s', '5s', '1m'.\n     */\n    refresh(interval: string): this {\n        this._refreshInterval = parseInterval(interval);\n        return this;\n    }\n\n    /** Register an error handler for reactive widget errors. */\n    onError(handler: (err: unknown) => void): this {\n        this._onError = handler;\n        return this;\n    }\n\n    /**\n     * Set fullscreen mode (default: true).\n     */\n    fullscreen(enabled: boolean): this {\n        this._fullscreen = enabled;\n        return this;\n    }\n\n    /**\n     * Build the widget tree and run the app.\n     * Returns a promise that resolves when the app exits.\n     *\n     * If widget-tree construction throws, an error panel is shown instead\n     * of crashing the process (analogous to an ErrorBoundary for widget-mode).\n     */\n    async run(): Promise<number> {\n        let root: Box;\n\n        try {\n            root = this._buildRoot();\n        } catch (err) {\n            // Error boundary fallback — display a red-bordered error widget\n            const errWidget = createErrorWidget(\n                err instanceof Error ? err : new Error(String(err)),\n            );\n            const errorRoot = new Box({\n                flexDirection: 'column',\n                width: '100%',\n                height: '100%',\n            });\n            errorRoot.addChild(errWidget);\n            const errorApp = new App(errorRoot, { fullscreen: this._fullscreen, skipFallback: true });\n            errorApp.events.on('key', (event: KeyEvent) => {\n                if (event.ctrl && event.key === 'c') {\n                    errorApp.exit(1);\n                }\n            });\n            return errorApp.mount();\n        }\n\n        return this._runWithRoot(root);\n    }\n\n    /**\n     * Build the root Box widget tree from the configured children, title, and key hints.\n     * Throws on any widget-construction error — caught by run() as an error boundary.\n     */\n    private _buildRoot(): Box {\n        const root = new Box({\n            flexDirection: 'column',\n            width: '100%',\n            height: '100%',\n        });\n\n        // Title bar\n        const titleBar = new Text(`  ${this._title}`, {\n            height: 1,\n            bold: true,\n            fg: { type: 'named', name: 'cyan' },\n        }, { align: 'center' });\n        root.addChild(titleBar);\n\n        // Content area\n        const content = new Box({\n            flexDirection: 'column',\n            flexGrow: 1,\n        });\n        for (const child of this._children) {\n            content.addChild(toWidget(child));\n        }\n        root.addChild(content);\n\n        // Footer with key hints\n        const keyHints = Object.entries(this._keyMap)\n            .map(([key, action]) => {\n                const label = typeof action === 'string' ? action : key;\n                return `${key} ${label}`;\n            })\n            .join('  •  ');\n        if (keyHints) {\n            const footer = new Text(`  ${keyHints}`, {\n                height: 1,\n                dim: true,\n            });\n            root.addChild(footer);\n        }\n\n        return root;\n    }\n\n    /**\n     * Wire up the App, key events, focus management, and refresh loop for a built root widget.\n     */\n    private async _runWithRoot(root: Box): Promise<number> {\n        // Create the App\n        const appInstance = new App(root, { fullscreen: this._fullscreen, skipFallback: true });\n        this._app = appInstance;\n\n        // ── Discover focusable widgets (List, TextInput) in tree order ──\n        const focusableWidgets = walkWidgets(root, w => w instanceof List || w instanceof TextInput) as Array<List | TextInput>;\n\n        // Register focusable widgets with the focus manager\n        let _focusedIdx = -1;\n        let _unsubFocus: (() => void) | undefined;\n        let _unsubBlur: (() => void) | undefined;\n        if (focusableWidgets.length > 0) {\n            focusableWidgets.forEach((w, i) => {\n                appInstance.focus.register({ id: `quick-${i}`, tabIndex: i, focusable: true });\n            });\n            // Auto-focus the first one\n            _focusedIdx = 0;\n            focusableWidgets[0].isFocused = true;\n\n            // Listen for focus changes\n            _unsubFocus = appInstance.focus.on('focus', (evt) => {\n                const idx = parseInt(evt.targetId.replace('quick-', ''), 10);\n                if (!isNaN(idx) && idx < focusableWidgets.length) {\n                    focusableWidgets.forEach(w => (w.isFocused = false));\n                    focusableWidgets[idx].isFocused = true;\n                    _focusedIdx = idx;\n                }\n            });\n            _unsubBlur = appInstance.focus.on('blur', (evt) => {\n                const idx = parseInt(evt.targetId.replace('quick-', ''), 10);\n                if (!isNaN(idx) && idx < focusableWidgets.length) {\n                    focusableWidgets[idx].isFocused = false;\n                }\n            });\n        }\n\n        // ── Wire up key events: dispatch to focused widget + handle app bindings ──\n        const _unsubKey = appInstance.events.on('key', (event: KeyEvent) => {\n            // 1. Always handle Ctrl+C — cannot be overridden by user bindings\n            if (event.ctrl && event.key === 'c') {\n                appInstance.exit();\n                return;\n            }\n\n            // 2. Check app-level key bindings (support modifier-aware tokens)\n            // Build normalized token: prefixed modifiers (ctrl, alt, shift) in that order\n            const modParts: string[] = [];\n            if (event.ctrl) modParts.push('ctrl');\n            if (event.alt) modParts.push('alt');\n            if (event.shift) modParts.push('shift');\n            const baseKey = String(event.key).toLowerCase();\n            const modToken = modParts.length > 0 ? `${modParts.join('+')}+${baseKey}` : baseKey;\n\n            // Lookup order: modifier-specific token first, then exact plain key,\n            // then lowercase plain-key fallback for backward compatibility.\n            const action = this._keyMap[modToken] ?? this._keyMap[event.key] ?? this._keyMap[baseKey];\n            if (action) {\n                if (action === 'quit') {\n                    appInstance.exit();\n                    return;\n                } else if (action === 'refresh') {\n                    this._refreshReactiveWidgets(root);\n                    appInstance.requestRender();\n                    return;\n                } else if (typeof action === 'function') {\n                    action();\n                    appInstance.requestRender();\n                    return;\n                }\n            }\n\n            // 3. Tab cycles focus between focusable widgets\n            if (event.key === 'tab' && focusableWidgets.length > 1) {\n                if (event.shift) {\n                    appInstance.focus.focusPrev();\n                } else {\n                    appInstance.focus.focusNext();\n                }\n                appInstance.requestRender();\n                return;\n            }\n\n            // 4. Dispatch key to the currently focused widget\n            if (_focusedIdx >= 0 && _focusedIdx < focusableWidgets.length) {\n                const focused = focusableWidgets[_focusedIdx];\n\n                if (focused instanceof List) {\n                    switch (event.key) {\n                        case 'up':\n                        case 'k':\n                            focused.selectPrev();\n                            break;\n                        case 'down':\n                        case 'j':\n                            focused.selectNext();\n                            break;\n                        case 'enter':\n                        case ' ':\n                            focused.confirm();\n                            break;\n                        default:\n                            return; // Don't re-render for unhandled keys\n                    }\n                    appInstance.requestRender();\n                    return;\n                }\n\n                if (focused instanceof TextInput) {\n                    switch (event.key) {\n                        case 'left':\n                            focused.moveCursorLeft();\n                            break;\n                        case 'right':\n                            focused.moveCursorRight();\n                            break;\n                        case 'backspace':\n                            focused.deleteBack();\n                            break;\n                        case 'delete':\n                            focused.deleteForward();\n                            break;\n                        case 'home':\n                            focused.moveCursorHome();\n                            break;\n                        case 'end':\n                            focused.moveCursorEnd();\n                            break;\n                        case 'enter':\n                            focused.submit();\n                            focused.clear();\n                            break;\n                        default:\n                            // Printable character\n                            if (event.key.length === 1 && !event.ctrl && !event.alt) {\n                                focused.insertChar(event.key);\n                            }\n                            break;\n                    }\n                    appInstance.requestRender();\n                    return;\n                }\n            }\n        });\n\n        // Set up auto-refresh\n        let refreshTimer: ReturnType<typeof setInterval> | null = null;\n        if (this._refreshInterval) {\n            refreshTimer = setInterval(() => {\n                try {\n                    this._refreshReactiveWidgets(root);\n                    appInstance.requestRender();\n                } catch (err) {\n                    // Reactive widget error — don't crash the process\n                    this._onError?.(err);\n                }\n            }, this._refreshInterval);\n        }\n\n        // Clean up on exit\n        const origExit = appInstance.exit.bind(appInstance);\n        appInstance.exit = (code?: number) => {\n            if (refreshTimer) clearInterval(refreshTimer);\n            _unsubFocus?.();\n            _unsubBlur?.();\n            _unsubKey();\n            origExit(code);\n        };\n\n        return appInstance.mount();\n    }\n\n    /**\n     * Walk the widget tree and update any reactive values.\n     */\n    private _refreshReactiveWidgets(widget: Widget): void {\n        try {\n            const w = widget as any; // as any: reactive metadata is monkey-patched onto Widget instances in widgets.ts\n\n            // Text — reactive content\n            if (widget instanceof Text && w.__reactiveContent) {\n                widget.setContent(resolve(w.__reactiveContent));\n            }\n\n            // Gauge — reactive value\n            if (widget instanceof Gauge && w.__reactiveValue) {\n                widget.setValue(resolve(w.__reactiveValue));\n            }\n\n            // Table — reactive data\n            if (widget instanceof Table && w.__reactiveData) {\n                const data: Record<string, string | number>[] = resolve(w.__reactiveData);\n                widget.setRows(data);\n            }\n\n            // Sparkline — reactive data\n            if (widget instanceof Sparkline && w.__reactiveData) {\n                widget.setData(resolve(w.__reactiveData));\n            }\n\n            // StatusIndicator — reactive status\n            if (widget instanceof StatusIndicator && w.__reactiveStatus) {\n                widget.setStatus(resolve(w.__reactiveStatus));\n            }\n\n            // LogView — reactive lines\n            if (widget instanceof LogView && w.__reactiveLines) {\n                widget.setLines(resolve(w.__reactiveLines));\n            }\n\n            // List — reactive items\n            if (widget instanceof List && w.__reactiveItems) {\n                const items: string[] = resolve(w.__reactiveItems);\n                widget.setItems(items.map(label => ({ label, value: label })));\n            }\n\n            // BarChart — reactive data\n            if (widget instanceof BarChart && w.__reactiveBarData) {\n                widget.setData(resolve(w.__reactiveBarData));\n            }\n\n            // ProgressBar — reactive value\n            if (widget instanceof ProgressBar && w.__reactiveValue) {\n                widget.setValue(resolve(w.__reactiveValue));\n            }\n\n            // Tree — reactive nodes (if data changes)\n            if (widget instanceof Tree && w.__reactiveTreeNodes) {\n                widget.setNodes(resolve(w.__reactiveTreeNodes));\n            }\n\n            // MultiProgress — reactive items\n            if (widget instanceof MultiProgress && w.__reactiveMultiItems) {\n                const items: ProgressItem[] = resolve(w.__reactiveMultiItems);\n                widget.setItems(items);\n            }\n\n            // Recurse into children\n            for (const child of widget.children) {\n                this._refreshReactiveWidgets(child);\n            }\n        } catch (err) {\n            // Reactive widget error — don't crash the process\n            console.error('[quick] reactive widget error:', err);\n        }\n    }\n}\n\n/**\n * Create a new TermUI app with a fluent builder API.\n *\n * @example\n * ```ts\n * import { app, row, gauge } from '@termuijs/quick';\n * import { cpu, memory } from '@termuijs/data';\n *\n * app('System Monitor')\n *   .rows(\n *     row(gauge('CPU', () => cpu.percent / 100)),\n *     row(gauge('Memory', () => memory.percent / 100)),\n *   )\n *   .keys({ q: 'quit' })\n *   .refresh('1s')\n *   .run();\n * ```\n */\nexport function app(title: string): AppBuilder {\n    return new AppBuilder(title);\n}\n","// ─────────────────────────────────────────────────────\n// @termuijs/quick — Layout helpers\n// ─────────────────────────────────────────────────────\n\nimport { Box, Text, Widget } from '@termuijs/widgets';\nimport type { Style } from '@termuijs/core';\nimport type { Reactive } from './reactive.js';\nimport { resolve, isReactive } from './reactive.js';\n\n/** Anything that can go into a layout slot */\nexport type LayoutChild = Widget | string | Reactive<string>;\n\n/**\n * Convert a loose child value into a proper Widget.\n * - Widget → pass through\n * - string → wrap in Text\n * - () => string → wrap in reactive Text (updated externally)\n */\nexport function toWidget(child: LayoutChild, style: Partial<Style> = {}): Widget {\n    if (child instanceof Widget) return child;\n    if (typeof child === 'string') {\n        return new Text(child, { height: 1, ...style });\n    }\n    // Reactive function — create text, will be updated by refresh\n    const text = new Text(resolve(child as Reactive<string>), { height: 1, ...style });\n    return text;\n}\n\n/**\n * Horizontal row layout — children arranged left-to-right.\n */\nexport function row(...children: LayoutChild[]): Widget {\n    const widgets = children.map(child => toWidget(child));\n\n    // Check if ALL children have a fixed height — if so, the row itself should be fixed-height\n    const allFixedHeight = widgets.every(w => {\n        const h = w.style.height;\n        return typeof h === 'number' && h > 0;\n    });\n    // Determine the max fixed height among children (for the row)\n    const maxH = allFixedHeight\n        ? Math.max(...widgets.map(w => (w.style.height as number) || 1))\n        : undefined;\n\n    const box = new Box({\n        flexDirection: 'row',\n        ...(allFixedHeight ? { height: maxH } : { flexGrow: 1 }),\n        gap: 1,\n    });\n\n    for (const widget of widgets) {\n        // Give each child equal horizontal flex if no explicit grow\n        if (!widget.style.flexGrow) {\n            widget.setStyle({ flexGrow: 1 });\n        }\n        box.addChild(widget);\n    }\n    return box;\n}\n\n/**\n * Vertical column layout — children arranged top-to-bottom.\n */\nexport function col(...children: LayoutChild[]): Widget {\n    const box = new Box({\n        flexDirection: 'column',\n        flexGrow: 1,\n    });\n    for (const child of children) {\n        box.addChild(toWidget(child));\n    }\n    return box;\n}\n\n/**\n * Grid layout — equal-sized cells in a rows × cols grid.\n */\nexport function grid(rows: number, cols: number, items: LayoutChild[]): Widget {\n    const container = new Box({\n        flexDirection: 'column',\n        flexGrow: 1,\n    });\n\n    let idx = 0;\n    for (let r = 0; r < rows; r++) {\n        const rowBox = new Box({\n            flexDirection: 'row',\n            flexGrow: 1,\n            gap: 1,\n        });\n        for (let c = 0; c < cols; c++) {\n            if (idx < items.length) {\n                const widget = toWidget(items[idx]);\n                widget.setStyle({ flexGrow: 1 });\n                rowBox.addChild(widget);\n            }\n            idx++;\n        }\n        container.addChild(rowBox);\n    }\n\n    return container;\n}\n\n/**\n * Vertical stack, children top-to-bottom, sized to content rather than\n * growing to fill. Use when col()'s flexGrow is too greedy.\n */\nexport function stack(...children: LayoutChild[]): Widget {\n    const box = new Box({\n        flexDirection: 'column',\n    });\n    for (const child of children) {\n        box.addChild(toWidget(child));\n    }\n    return box;\n}\n\n/**\n * Flexible empty gap. Grows to fill free space and pushes siblings apart.\n * Optional fixed size in cells.\n */\nexport function spacer(size?: number): Widget {\n    return new Box(size !== undefined ? { height: size } : { flexGrow: 1 });\n}\n","// ─────────────────────────────────────────────────────\n// @termuijs/quick — Reactive data binding\n// ─────────────────────────────────────────────────────\n\n/**\n * A reactive value — either a static value or a function that returns one.\n * Functions are re-evaluated on each refresh tick.\n */\nexport type Reactive<T> = T | (() => T);\n\n/**\n * Resolve a reactive value — calls the function if it is one,\n * otherwise returns the static value.\n */\nexport function resolve<T>(value: Reactive<T>): T {\n    return typeof value === 'function' ? (value as () => T)() : value;\n}\n\n/**\n * Check if a value is a reactive function.\n */\nexport function isReactive<T>(value: Reactive<T>): value is () => T {\n    return typeof value === 'function';\n}\n","// ─────────────────────────────────────────────────────\n// @termuijs/quick — Shorthand widget constructors\n// ─────────────────────────────────────────────────────\n\nimport type { Style, Color } from '@termuijs/core';\nimport {\n    Text,\n    Table,\n    List,\n    TextInput,\n    Gauge as GaugeWidget,\n    Sparkline as SparklineWidget,\n    StatusIndicator as StatusWidget,\n    LogView as LogViewWidget,\n    Widget,\n    Tree as TreeWidget,\n    Skeleton as SkeletonWidget,\n    Grid as GridWidget,\n    BarChart as BarChartWidget,\n    ProgressBar as ProgressBarWidget,\n    Spinner as SpinnerWidget,\n    JSONView as JSONViewWidget,\n    DiffView as DiffViewWidget,\n    StreamingText as StreamingTextWidget,\n    ChatMessage as ChatMessageWidget,\n    ToolCall as ToolCallWidget,\n    CommandPalette as CommandPaletteWidget,\n    MultiProgress as MultiProgressWidget,\n} from '@termuijs/widgets';\nimport { Tabs, Select } from '@termuijs/ui';\n\nimport type { TreeNode, TreeOptions } from '@termuijs/widgets';\nimport type { BarGroup, BarChartOptions } from '@termuijs/widgets';\nimport type { SkeletonOptions } from '@termuijs/widgets';\nimport type { GridOptions } from '@termuijs/widgets';\nimport type { JSONViewOptions } from '@termuijs/widgets';\nimport type { DiffLine, DiffViewOptions } from '@termuijs/widgets';\nimport type { StreamingTextOptions } from '@termuijs/widgets';\nimport type { ChatMessageOptions } from '@termuijs/widgets';\nimport type { ToolCallOptions, ToolCallStatus } from '@termuijs/widgets';\nimport type { Command, CommandPaletteOptions } from '@termuijs/widgets';\nimport type { ProgressItem, MultiProgressOptions } from '@termuijs/widgets';\nimport type { Reactive } from './reactive.js';\nimport { resolve } from './reactive.js';\n\n// ── Text ──\n\nexport interface QuickTextOptions {\n    bold?: boolean;\n    dim?: boolean;\n    italic?: boolean;\n    color?: Color;\n    align?: 'left' | 'center' | 'right';\n}\n\nexport function text(content: string | Reactive<string>, opts: QuickTextOptions = {}): Widget {\n    const style: Partial<Style> = {\n        height: 1,\n        bold: opts.bold,\n        dim: opts.dim,\n        italic: opts.italic,\n        fg: opts.color,\n    };\n    const resolved = typeof content === 'function' ? resolve(content) : content;\n    const t = new Text(resolved, style, { align: opts.align });\n    if (typeof content === 'function') {\n        (t as any).__reactiveContent = content; // as any: Widget base has no reactive slot; patched at runtime\n    }\n    return t;\n}\n\n// ── Gauge ──\n\nexport interface QuickGaugeOptions {\n    color?: Color;\n}\n\nexport function gauge(label: string, value: Reactive<number>, opts: QuickGaugeOptions = {}): Widget {\n    const g = new GaugeWidget(label, { height: 1, flexGrow: 1 }, {\n        color: opts.color ?? { type: 'named', name: 'green' },\n        showLabel: true,\n    });\n    g.setValue(resolve(value));\n    (g as any).__reactiveValue = value; // as any: Widget base has no reactive slot; patched at runtime\n    return g;\n}\n\n// ── Table ──\n\nexport type QuickTableRow = Record<string, string | number>;\n\nexport function table(\n    title: string,\n    data: Reactive<QuickTableRow[]>,\n    columns: string[],\n): Widget {\n    const cols = columns.map(key => {\n        return { header: key, key };\n    });\n\n    const resolved = resolve(data);\n    const t = new Table(cols, resolved, {\n        flexGrow: 1,\n        border: 'single',\n        borderColor: { type: 'named', name: 'brightBlack' },\n        padding: 1,\n    }, { stripe: true });\n\n    (t as any).__reactiveData = data; // as any: Widget base has no reactive slot; patched at runtime\n    (t as any).__tableTitle = title; // as any: Widget base has no reactive slot; patched at runtime\n    return t;\n}\n\n// ── List ──\n\nexport interface QuickListOptions {\n    selectable?: boolean;\n    onSelect?: (index: number) => void;\n    renderItem?: (item: string, index: number, selected: boolean) => string;\n}\n\nexport function list(items: Reactive<string[]>, opts: QuickListOptions = {}): Widget {\n    const resolved = resolve(items);\n    const listItems = resolved.map(label => ({ label, value: label }));\n\n    const onSelectCb = opts.onSelect\n        ? (_item: any, idx: number) => opts.onSelect!(idx) // any: List callback provides full item; only index is used here\n        : undefined;\n\n    const l = new List(\n        listItems,\n        { flexGrow: 1, border: 'single', borderColor: { type: 'named', name: 'brightBlack' }, padding: 1 },\n        onSelectCb,\n    );\n\n    (l as any).__reactiveItems = items; // as any: Widget base has no reactive slot; patched at runtime\n    return l;\n}\n\n// ── Input ──\n\nexport interface QuickInputOptions {\n    onSubmit?: (value: string) => void;\n}\n\nexport function input(placeholder: string, opts: QuickInputOptions = {}): Widget {\n    const i = new TextInput(\n        { height: 1 },\n        { placeholder, onSubmit: opts.onSubmit },\n    );\n\n    return i;\n}\n\n// ── Sparkline ──\n\nexport interface QuickSparklineOptions {\n    color?: Color;\n}\n\nexport function sparkline(label: string, data: Reactive<number[]>, opts: QuickSparklineOptions = {}): Widget {\n    const s = new SparklineWidget(label, { height: 1, flexGrow: 1 }, {\n        color: opts.color ?? { type: 'named', name: 'cyan' },\n    });\n    s.setData(resolve(data));\n    (s as any).__reactiveData = data; // as any: Widget base has no reactive slot; patched at runtime\n    return s;\n}\n\n// ── Status ──\n\nexport interface QuickStatusOptions {\n    upColor?: Color;\n    downColor?: Color;\n}\n\nexport function status(label: string, isUp: Reactive<boolean>, opts: QuickStatusOptions = {}): Widget {\n    const s = new StatusWidget(label, resolve(isUp), { height: 1, flexGrow: 1 }, {\n        upColor: opts.upColor ?? { type: 'named', name: 'green' },\n        downColor: opts.downColor ?? { type: 'named', name: 'red' },\n    });\n    (s as any).__reactiveStatus = isUp; // as any: Widget base has no reactive slot; patched at runtime\n    return s;\n}\n\n// ── LogView ──\n\nexport interface QuickLogViewOptions {\n    highlight?: Record<string, Color>;\n}\n\nexport function logView(lines: Reactive<string[]>, opts: QuickLogViewOptions = {}): Widget {\n    const lv = new LogViewWidget(\n        { flexGrow: 1, border: 'single', borderColor: { type: 'named', name: 'brightBlack' }, padding: 1 },\n        { highlight: opts.highlight, autoScroll: true },\n    );\n    lv.setLines(resolve(lines));\n    (lv as any).__reactiveLines = lines; // as any: Widget base has no reactive slot; patched at runtime\n    return lv;\n}\n\n// ── Tree ──\n\nexport interface QuickTreeOptions {\n    onSelect?: (node: TreeNode, path: number[]) => void;\n    indent?: number;\n}\n\nexport function tree(data: TreeNode[], opts: QuickTreeOptions = {}): Widget {\n    const options: TreeOptions = {\n        nodes: data,\n        onSelect: opts.onSelect,\n        indent: opts.indent,\n    };\n    const t = new TreeWidget(options, {\n        flexGrow: 1,\n        border: 'single',\n        borderColor: { type: 'named', name: 'brightBlack' },\n        padding: 1,\n    });\n    (t as any).__reactiveTreeNodes = null; // as any: Widget base has no reactive slot; patched at runtime\n    return t;\n}\n\n// ── Skeleton ──\n\nexport interface QuickSkeletonOptions {\n    variant?: 'pulse' | 'shimmer';\n    intervalMs?: number;\n    color?: Color;\n}\n\nexport function skeleton(opts: QuickSkeletonOptions = {}): Widget {\n    const skeletonOpts: SkeletonOptions = {\n        variant: opts.variant,\n        intervalMs: opts.intervalMs,\n        color: opts.color,\n    };\n    return new SkeletonWidget({ flexGrow: 1, height: 3 }, skeletonOpts);\n}\n\n// ── GridWidget ──\n\nexport interface QuickGridOptions {\n    gap?: number;\n}\n\nexport function gridWidget(columns: number, items: Widget[], opts: QuickGridOptions = {}): Widget {\n    const gridOpts: GridOptions = {\n        columns,\n        gap: opts.gap,\n    };\n    const g = new GridWidget({ flexGrow: 1 }, gridOpts);\n    for (const item of items) {\n        g.addChild(item);\n    }\n    return g;\n}\n\n// ── BarChart ──\n\nexport interface QuickBarChartOptions extends BarChartOptions {}\n\nexport function barChart(data: Reactive<BarGroup[]>, opts: QuickBarChartOptions = {}): Widget {\n    const resolved = resolve(data);\n    const bc = new BarChartWidget(resolved, { flexGrow: 1 }, opts);\n    (bc as any).__reactiveBarData = data; // as any: Widget base has no reactive slot; patched at runtime\n    return bc;\n}\n\n// ── ProgressBar ──\n\nexport interface QuickProgressBarOptions {\n    color?: Color;\n    showLabel?: boolean;\n}\n\nexport function progressBar(value: Reactive<number>, opts: QuickProgressBarOptions = {}): Widget {\n    const resolved = resolve(value);\n    const pb = new ProgressBarWidget(\n        { height: 1, flexGrow: 1 },\n        {\n            value: resolved,\n            fillColor: opts.color ?? { type: 'named', name: 'green' },\n            showLabel: opts.showLabel ?? true,\n        },\n    );\n    (pb as any).__reactiveValue = value; // as any: Widget base has no reactive slot; patched at runtime\n    return pb;\n}\n\n// ── Spinner ──\n\nexport interface QuickSpinnerOptions {\n    label?: string;\n    color?: Color;\n}\n\nexport function spinner(opts: QuickSpinnerOptions = {}): Widget {\n    return new SpinnerWidget(\n        { height: 1 },\n        {\n            label: opts.label,\n            color: opts.color,\n        },\n    );\n}\n\n// ── grid ──────────────────────────────────────────────────────────────────────\n\nexport function grid(columns: number, items: Widget[], opts: QuickGridOptions = {}): Widget {\n    return gridWidget(columns, items, opts);\n}\n\n// ── JSONView ──────────────────────────────────────────────────────────────────\n\nexport interface QuickJSONViewOptions extends Pick<JSONViewOptions, 'onSelect' | 'indent'> {}\n\nexport function jsonView(data: unknown, opts: QuickJSONViewOptions = {}): Widget {\n    return new JSONViewWidget({ data, ...opts }, { flexGrow: 1 });\n}\n\n// ── DiffView ──────────────────────────────────────────────────────────────────\n\nexport interface QuickDiffViewOptions extends Omit<DiffViewOptions, 'lines'> {}\n\nexport function diffView(diff: string | DiffLine[], opts: QuickDiffViewOptions = {}): Widget {\n    const lines: DiffLine[] = typeof diff === 'string'\n        ? diff.split('\\n').map(line => {\n              if (line.startsWith('+')) return { type: 'add' as const, content: line.slice(1) };\n              if (line.startsWith('-')) return { type: 'remove' as const, content: line.slice(1) };\n              return { type: 'context' as const, content: line };\n          })\n        : diff;\n    return new DiffViewWidget({ lines, ...opts }, { flexGrow: 1 });\n}\n\n// ── StreamingText ─────────────────────────────────────────────────────────────\n\nexport function streamingText(opts: StreamingTextOptions, style: Partial<Style> = {}): Widget {\n    return new StreamingTextWidget(opts, { flexGrow: 1, ...style });\n}\n\n// ── ChatMessage ───────────────────────────────────────────────────────────────\n\nexport function chatMessage(opts: ChatMessageOptions, style: Partial<Style> = {}): Widget {\n    return new ChatMessageWidget(opts, { flexGrow: 1, ...style });\n}\n\n// ── ToolCall ──────────────────────────────────────────────────────────────────\n\nexport interface QuickToolCallOptions extends Omit<ToolCallOptions, 'args'> {\n    args?: Record<string, unknown>;\n}\n\nexport function toolCall(opts: QuickToolCallOptions, style: Partial<Style> = {}): Widget {\n    return new ToolCallWidget({ args: {}, ...opts }, { flexGrow: 1, ...style });\n}\n\n// ── CommandPalette ────────────────────────────────────────────────────────────\n\nexport interface QuickCommand extends Omit<Command, 'id'> { id?: string; }\n\nexport function commandPalette(\n    commands: QuickCommand[],\n    opts: Omit<CommandPaletteOptions, 'commands'> = {},\n): Widget {\n    const fullCommands: Command[] = commands.map((c, i) => ({\n        id: c.id ?? `cmd-${i}`,\n        label: c.label,\n        description: c.description,\n        action: c.action,\n    }));\n    return new CommandPaletteWidget({ commands: fullCommands, ...opts }, { flexGrow: 1 });\n}\n\n// ── MultiProgress ─────────────────────────────────────────────────────────────\n\nexport function multiProgress(\n    items: ProgressItem[] | Reactive<ProgressItem[]>,\n    opts: Omit<MultiProgressOptions, 'items'> = {},\n): Widget {\n    const initialItems = resolve(items);\n    const mp = new MultiProgressWidget({ items: initialItems, ...opts }, { flexGrow: 1 });\n    if (typeof items === 'function') {\n        (mp as any).__reactiveMultiItems = items; // as any: Widget base has no reactive slot; patched at runtime\n    }\n    return mp;\n}\n\n// ── Tabs ──────────────────────────────────────────────────────────────────────\n\nexport interface QuickTabsOptions {\n    /** Index of the initially active tab. Default: 0 */\n    active?: number;\n    /** Called when the active tab changes. */\n    onChange?: (index: number) => void;\n}\n\n/** Tabbed container. `tabs` is a list of [label, content] pairs. */\nexport function tabs(items: Array<[string, Widget]>, opts?: QuickTabsOptions): Widget {\n    const formattedTabs = items.map(([label, content]) => ({ label, content }));\n    const t = new Tabs(formattedTabs, {\n        activeIndex: opts?.active ?? 0,\n        active: opts?.active ?? 0\n    } as any); // as any: Tabs constructor options not exported from @termuijs/ui\n\n    if (opts?.onChange) {\n        if (typeof (t as any).on === 'function') { // as any: Tabs constructor options not exported from @termuijs/ui\n            (t as any).on('change', opts.onChange); // as any: Tabs constructor options not exported from @termuijs/ui\n        } else {\n            (t as any).onChange = opts.onChange; // as any: Tabs constructor options not exported from @termuijs/ui\n        }\n    }\n\n    return t;\n}\n\n// ── Select ────────────────────────────────────────────────────────────────────\n\nexport interface QuickSelectOptions {\n    /** Called when an option is chosen. */\n    onSelect?: (value: string, index: number) => void;\n}\n\n/** Single-choice select list from string options. */\nexport function select(options: string[], opts?: QuickSelectOptions): Widget {\n    const formattedOptions = options.map(opt => ({ label: opt, value: opt }));\n    return new Select(formattedOptions, {\n        onSelect: opts?.onSelect \n            ? (option: any, index: number) => opts.onSelect!(option.value, index) // any: Widget base has no reactive slot; patched at runtime\n            : undefined\n    });\n}\n\n// ── Re-export types from @termuijs/widgets for convenience ──\nexport type { TreeNode } from '@termuijs/widgets';\nexport type { BarGroup, BarChartOptions } from '@termuijs/widgets';\nexport type { DiffLine, ToolCallStatus } from '@term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AG,EAAE,UAAU,EAAE,CAAC;AACpF,MAAI,OAAO,UAAU,YAAY;AAC7B,IAAC,GAAW,uBAAuB;AAAA,EACvC;AACA,SAAO;AACX;AAYO,SAAS,KAAK,OAAgC,MAAiC;AAClF,QAAM,gBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,OAAO,OAAO,EAAE,OAAO,QAAQ,EAAE;AAC1E,QAAM,IAAI,IAAI,eAAK,eAAe;AAAA,IAC9B,aAAa,MAAM,UAAU;AAAA,IAC7B,QAAQ,MAAM,UAAU;AAAA,EAC5B,CAAQ;AAER,MAAI,MAAM,UAAU;AAChB,QAAI,OAAQ,EAAU,OAAO,YAAY;AACrC,MAAC,EAAU,GAAG,UAAU,KAAK,QAAQ;AAAA,IACzC,OAAO;AACH,MAAC,EAAU,WAAW,KAAK;AAAA,IAC/B;AAAA,EACJ;AAEA,SAAO;AACX;AAUO,SAAS,OAAO,SAAmB,MAAmC;AACzE,QAAM,mBAAmB,QAAQ,IAAI,UAAQ,EAAE,OAAO,KAAK,OAAO,IAAI,EAAE;AACxE,SAAO,IAAI,iBAAO,kBAAkB;AAAA,IAChC,UAAU,MAAM,WACV,CAAC,QAAa,UAAkB,KAAK,SAAU,OAAO,OAAO,KAAK,IAClE;AAAA,EACV,CAAC;AACL;;;AJ9WA,mBAAsB;AAOtB,iBAIO;AAIP,IAAAC,aAAiC;AAIjC,iBAAyB;AAGzB,kBAQO;","names":["import_widgets","text","stack","import_widgets","GaugeWidget","SparklineWidget","StatusWidget","LogViewWidget","TreeWidget","SkeletonWidget","GridWidget","BarChartWidget","ProgressBarWidget","SpinnerWidget","JSONViewWidget","DiffViewWidget","StreamingTextWidget","ChatMessageWidget","ToolCallWidget","CommandPaletteWidget","MultiProgressWidget","import_ui"]}