/** * @fileoverview Vowel Instructions Component - Web component for long-form system instructions * * This component provides a clean way to define system instructions (system prompts) * for the AI without having to use awkward HTML attributes or JavaScript strings. * * The component registers itself globally and can be discovered by vowel-voice-widget * components on the same page. * * @module @vowel.to/client/components * @author vowel.to * @license Proprietary */ /** * Props for VowelInstructions component */ export interface VowelInstructionsProps { /** Optional ID for targeting specific widgets */ id?: string; /** The instructions content (can also come from children) */ content?: string; /** React children (text content) */ children?: React.ReactNode; } /** * Global registry for vowel-instructions components */ declare class VowelInstructionsRegistry { private instances; /** * Register an instructions component * * @param id - Unique ID for this instructions component * @param content - The instructions text */ register(id: string, content: string): void; /** * Unregister an instructions component * * @param id - ID of the component to unregister */ unregister(id: string): void; /** * Get instructions by ID * * @param id - ID of the instructions to retrieve * @returns The instructions text, or null if not found */ get(id: string): string | null; /** * Get the first registered instructions * Useful when there's only one instructions component on the page * * @returns The first instructions text, or null if none registered */ getFirst(): string | null; /** * Check if any instructions are registered * * @returns true if at least one instructions component is registered */ hasInstructions(): boolean; /** * Get all registered instructions * * @returns Map of ID to instructions text */ getAll(): Map; } /** * Global singleton instance */ export declare const vowelInstructionsRegistry: VowelInstructionsRegistry; /** * Expose registry globally for web components to discover */ declare global { interface Window { __VOWEL_INSTRUCTIONS__?: VowelInstructionsRegistry; } } /** * VowelInstructions Component * * A component that holds long-form system instructions for the AI. * Automatically registers itself when mounted and unregisters when unmounted. * * @example * ```html * * You are an AI assistant for an e-commerce site. * * Your role is to help users find products and complete purchases. * * Guidelines: * - Be friendly and helpful * - Ask clarifying questions when needed * - Provide product recommendations * * * * * ``` */ export declare function VowelInstructions({ id, content, children, }: VowelInstructionsProps): import("react/jsx-runtime").JSX.Element; /** * Default export for web component conversion */ export default VowelInstructions; //# sourceMappingURL=VowelInstructions.d.ts.map