/** * Terminal Block shared design tokens. * * Single source of truth for all repeated style constants across Terminal * sub-components. Centralizes log-level colors, status indicators, primary * glow utilities, and shared button/toggle patterns. * * @module @mks2508/mks-ui/react/blocks/Terminal/tokens */ import type { TLogLevel } from './parsing/LogParser.types'; /** * Style definitions for a single log level. * * Each field maps to a different visual context where the level color * appears (badge, line border, glow, inline text). */ export interface ILogLevelStyle { /** Background, text, and border classes for badges (e.g. TerminalLogBadge, LevelBadge) */ badge: string; /** Left border class for log line rows (e.g. LogLinesViewer) */ border: string; /** Shadow glow class for emphasized/active states */ glow: string; /** Standalone text color class */ text: string; } /** * Centralized log level color mapping. * * Replaces duplicated `LEVEL_COLORS` records in TerminalLogBadge, * LogLineBadges, LogLinesViewer, TerminalFilterTabs, and TerminalFilterDropdown. * * @example * ```tsx * import { LOG_LEVEL_STYLES } from '../Terminal.tokens'; * ERROR * ``` */ export declare const LOG_LEVEL_STYLES: Record; /** Content type identifiers for log entries. */ export type TContentType = 'plain' | 'http' | 'json' | 'table' | 'sql'; /** * Style definitions for content type badges. */ export interface IContentTypeStyle { /** Display label for the badge */ label: string; /** Tailwind class string for the badge */ className: string; } /** * Centralized content type badge styling. * * @example * ```tsx * import { CONTENT_TYPE_STYLES } from '../Terminal.tokens'; * const style = CONTENT_TYPE_STYLES.http; * {style.label} * ``` */ export declare const CONTENT_TYPE_STYLES: Record; /** * Primary color glow shadow utilities. * * Uses `hsl(var(--primary) / opacity)` so the glow automatically * follows the consumer's `--primary` CSS variable. * * Replaces 17+ instances of hardcoded `hsla(330,85%,43%,...)`. * * @example * ```tsx * import { PRIMARY_GLOW } from '../Terminal.tokens'; * * ``` */ export declare const PRIMARY_GLOW: { /** Subtle glow — 0.15 opacity, 8px spread */ readonly sm: "shadow-[0_0_8px_hsl(var(--primary)/0.15)]"; /** Medium glow — 0.2 opacity, 10px spread */ readonly md: "shadow-[0_0_10px_hsl(var(--primary)/0.2)]"; /** Strong glow — 0.3 opacity, 12px spread */ readonly lg: "shadow-[0_0_12px_hsl(var(--primary)/0.3)]"; /** Intense glow — 0.5 opacity, 12px spread (active/focus states) */ readonly xl: "shadow-[0_0_12px_hsl(var(--primary)/0.5)]"; }; /** * Compound primary glow for active tab indicators and accent elements. * Combines multiple shadow layers for depth. */ export declare const PRIMARY_GLOW_COMPOUND: { /** Active tab bar glow — dual shadow layers */ readonly tabBar: "shadow-[0_0_12px_hsl(var(--primary)/0.6),0_0_4px_hsl(var(--primary)/0.8)]"; }; /** Terminal connection status. */ export type TTerminalConnectionStatusToken = 'connected' | 'connecting' | 'disconnected' | 'error'; /** * Style definitions for a connection status. */ export interface IStatusStyle { /** Dot indicator classes (bg + optional shadow/animation) */ dot: string; /** Label text color */ label: string; /** Display text */ text: string; } /** * Centralized connection status color mapping. * * Replaces duplicated `getStatusColor` functions in TerminalPanelHeader, * TerminalSessionTabs, and TerminalSessionControl. * * @example * ```tsx * import { STATUS_COLORS } from '../Terminal.tokens'; *
* ``` */ export declare const STATUS_COLORS: Record; /** * macOS-style traffic light button classes. * * Dots are desaturated by default, colorize on parent group hover * (`group-hover/traffic`), and brighten + scale on individual hover. */ export declare const TRAFFIC_LIGHT_STYLES: { readonly close: "w-3 h-3 rounded-full transition-all duration-200 bg-muted-foreground/30 group-hover/traffic:bg-red-500/90 group-hover/traffic:shadow-[0_0_6px_rgba(239,68,68,0.4)] hover:!bg-red-500 hover:!shadow-[0_0_12px_rgba(239,68,68,0.6)] hover:!scale-110"; readonly minimize: "w-3 h-3 rounded-full transition-all duration-200 bg-muted-foreground/30 group-hover/traffic:bg-yellow-500/90 group-hover/traffic:shadow-[0_0_6px_rgba(234,179,8,0.4)] hover:!bg-yellow-500 hover:!shadow-[0_0_12px_rgba(234,179,8,0.6)] hover:!scale-110"; readonly maximize: "w-3 h-3 rounded-full transition-all duration-200 bg-muted-foreground/30 group-hover/traffic:bg-green-500/90 group-hover/traffic:shadow-[0_0_6px_rgba(34,197,94,0.4)] hover:!bg-green-500 hover:!shadow-[0_0_12px_rgba(34,197,94,0.6)] hover:!scale-110"; }; /** * Segmented control button classes (macOS-style pill toggle). * * Shared by TerminalPanelHeader view mode toggle and * TerminalSettingsPopover renderer/backend selectors. */ export declare const SEGMENTED_BUTTON_STYLES: { /** Base classes applied to all buttons */ readonly base: "flex items-center gap-1.5 px-2.5 py-1 rounded-md text-xs font-medium transition-all"; /** Inactive state — subtle hover */ readonly inactive: "text-muted-foreground hover:text-foreground hover:bg-white/5 hover:shadow-[inset_0_1px_0_0_rgba(255,255,255,0.1)]"; /** Active state — primary tint with glow */ readonly active: "bg-primary/20 text-primary border border-primary/30 shadow-[0_0_8px_hsl(var(--primary)/0.15)]"; }; /** * Toggle button classes (follow cursor, line numbers, etc.). * * Shared by TerminalPanelToolbar and TerminalLogsPanel action bars. */ export declare const TOGGLE_STYLES: { readonly base: "p-2 rounded-md transition-all hover:scale-105 active:scale-95"; readonly inactive: "bg-muted/40 text-muted-foreground hover:bg-muted/60"; readonly active: "bg-primary/20 text-primary border border-primary/40 shadow-[0_0_10px_hsl(var(--primary)/0.2)]"; }; /** * Action button classes (search, clear, download, etc.). * * Shared by TerminalPanelToolbar and TerminalLogsPanel. */ export declare const ACTION_BUTTON_STYLES: { readonly base: "p-2 rounded-md transition-all hover:scale-105 active:scale-95"; readonly default: "bg-muted/40 text-muted-foreground hover:bg-muted/60 hover:text-foreground"; }; /** * Filter button classes for log level filter bar. * * Used by TerminalPanelToolbar and TerminalFilterTabs. */ export declare const FILTER_BUTTON_STYLES: { readonly base: "px-3 py-1.5 rounded-md font-mono text-xs font-bold uppercase tracking-wider transition-all"; readonly inactive: "bg-muted/40 text-muted-foreground hover:bg-muted/60 hover:scale-105 active:scale-95 border border-border/20"; readonly active: "bg-primary/20 text-primary border border-primary/40 shadow-[0_0_10px_hsl(var(--primary)/0.2)] hover:scale-105 active:scale-95"; }; /** * Small icon-only trigger button classes (settings gear, etc.). */ export declare const TRIGGER_BUTTON_STYLES: "h-8 w-8 rounded-md transition-all hover:bg-muted/20 active:bg-muted/30 flex items-center justify-center text-muted-foreground hover:text-foreground flex-shrink-0"; /** * Font size control button classes (+ / −). */ export declare const FONT_BUTTON_STYLES: "h-7 w-7 rounded-md transition-all hover:bg-muted/20 active:bg-muted/30 flex items-center justify-center text-muted-foreground hover:text-foreground disabled:opacity-30 disabled:pointer-events-none"; /** * Terminal background class. * * Uses a CSS custom property `--terminal-bg` with a fallback to the * theme's `--background` variable. Consumers set `--terminal-bg` to * override the terminal area background without affecting the rest of the UI. * * @example * ```css * :root { --terminal-bg: 36 27 47; } * ``` * * @example * ```tsx *
...
* ``` */ export declare const TERMINAL_BG: "bg-[hsl(var(--terminal-bg,var(--background)))]"; /** * Section label classes for settings sections. */ export declare const SECTION_LABEL_STYLES: "text-[10px] font-mono text-muted-foreground uppercase tracking-wider"; /** * Custom toggle switch classes (CRT effect, debug panel). */ export declare const TOGGLE_SWITCH_STYLES: { readonly track: { readonly base: "relative w-9 h-5 rounded-full transition-colors"; readonly active: "bg-primary/60 shadow-[0_0_8px_hsl(var(--primary)/0.15)]"; readonly inactive: "bg-muted/30"; }; readonly thumb: { readonly base: "absolute top-0.5 h-4 w-4 rounded-full bg-foreground transition-all"; readonly active: "left-[18px]"; readonly inactive: "left-0.5"; }; }; //# sourceMappingURL=Terminal.tokens.d.ts.map