UNPKG

qnce-engine

Version:

Core QNCE (Quantum Narrative Convergence Engine) - Framework agnostic narrative engine with performance optimization

141 lines 3.59 kB
import { QNCEEngine } from '../engine/core'; /** * Theme configuration for QNCE UI components */ export interface QNCETheme { colors: { primary: string; secondary: string; success: string; warning: string; error: string; disabled: string; background: string; surface: string; text: string; textSecondary: string; }; spacing: { xs: string; sm: string; md: string; lg: string; xl: string; }; borderRadius: { sm: string; md: string; lg: string; }; typography: { fontFamily: string; fontSize: { sm: string; md: string; lg: string; }; fontWeight: { normal: number; medium: number; semibold: number; }; }; shadows: { sm: string; md: string; lg: string; }; } /** * Props for UndoRedoControls component */ export interface UndoRedoControlsProps { /** QNCE Engine instance */ engine: QNCEEngine; /** Custom theme (optional, uses default if not provided) */ theme?: Partial<QNCETheme>; /** Additional CSS class name */ className?: string; /** Custom styling */ style?: React.CSSProperties; /** Disable the controls */ disabled?: boolean; /** Show labels on buttons */ showLabels?: boolean; /** Custom button labels */ labels?: { undo: string; redo: string; }; /** Button size variant */ size?: 'sm' | 'md' | 'lg'; /** Button layout */ layout?: 'horizontal' | 'vertical'; /** Callback when undo is performed */ onUndo?: (result: { success: boolean; description?: string; error?: string; }) => void; /** Callback when redo is performed */ onRedo?: (result: { success: boolean; description?: string; error?: string; }) => void; } /** * Autosave status */ export type AutosaveStatus = 'idle' | 'saving' | 'saved' | 'error' | 'disabled'; /** * Props for AutosaveIndicator component */ export interface AutosaveIndicatorProps { /** QNCE Engine instance */ engine: QNCEEngine; /** Custom theme (optional, uses default if not provided) */ theme?: Partial<QNCETheme>; /** Additional CSS class name */ className?: string; /** Custom styling */ style?: React.CSSProperties; /** Indicator variant */ variant?: 'minimal' | 'detailed' | 'icon-only'; /** Position of the indicator */ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'inline'; /** Custom status messages */ messages?: { idle: string; saving: string; saved: string; error: string; }; /** Show timestamp of last save */ showTimestamp?: boolean; /** Auto-hide after successful save (ms) */ autoHideDelay?: number; } /** * Keyboard shortcuts configuration */ export interface KeyboardShortcutsConfig { /** Enable/disable keyboard shortcuts */ enabled?: boolean; /** Custom key bindings */ bindings?: { undo?: string[]; redo?: string[]; save?: string[]; reset?: string[]; }; /** Prevent default browser behavior */ preventDefault?: boolean; /** Element to attach listeners to (defaults to document) */ target?: HTMLElement | Document; } /** * Default theme for QNCE components */ export declare const defaultTheme: QNCETheme; //# sourceMappingURL=types.d.ts.map