"use strict";
/**
 * @bluefly/bfui - Revolutionary AI-Native React Component Library
 *
 * A cutting-edge collection of React components designed for AI-first applications.
 * Features voice interfaces, real-time collaboration, streaming responses,
 * and intelligent workflow building.
 *
 * @version 0.2.0
 * @author Bluefly Engineering <engineering@bluefly.ai>
 * @license MIT
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamingError = exports.CollaborationError = exports.VoiceInputError = exports.AIComponentError = exports.ComponentPresets = exports.FeatureDetection = exports.BFUI_DESCRIPTION = exports.BFUI_NAME = exports.BFUI_VERSION = exports.AIHooks = exports.AIComponents = exports.useStreamingResponse = exports.useContextVisualization = exports.useAdvancedCollaboration = exports.useRealtimeCollaboration = exports.useAdvancedVoiceInput = exports.useVoiceInput = exports.useAIConversation = exports.AIWorkflowBuilder = exports.CollaborativeCanvas = exports.VoiceCommandInterface = exports.AIConversationCanvas = void 0;
// AI-Native Components
var AIConversationCanvas_1 = require("./components/ai-native/AIConversationCanvas");
Object.defineProperty(exports, "AIConversationCanvas", { enumerable: true, get: function () { return __importDefault(AIConversationCanvas_1).default; } });
var VoiceCommandInterface_1 = require("./components/ai-native/VoiceCommandInterface");
Object.defineProperty(exports, "VoiceCommandInterface", { enumerable: true, get: function () { return __importDefault(VoiceCommandInterface_1).default; } });
var CollaborativeCanvas_1 = require("./components/ai-native/CollaborativeCanvas");
Object.defineProperty(exports, "CollaborativeCanvas", { enumerable: true, get: function () { return __importDefault(CollaborativeCanvas_1).default; } });
var AIWorkflowBuilder_1 = require("./components/ai-native/AIWorkflowBuilder");
Object.defineProperty(exports, "AIWorkflowBuilder", { enumerable: true, get: function () { return __importDefault(AIWorkflowBuilder_1).default; } });
// Advanced Hooks
var useAIConversation_1 = require("./hooks/useAIConversation");
Object.defineProperty(exports, "useAIConversation", { enumerable: true, get: function () { return __importDefault(useAIConversation_1).default; } });
var useVoiceInput_1 = require("./hooks/useVoiceInput");
Object.defineProperty(exports, "useVoiceInput", { enumerable: true, get: function () { return __importDefault(useVoiceInput_1).default; } });
Object.defineProperty(exports, "useAdvancedVoiceInput", { enumerable: true, get: function () { return useVoiceInput_1.useAdvancedVoiceInput; } });
var useRealtimeCollaboration_1 = require("./hooks/useRealtimeCollaboration");
Object.defineProperty(exports, "useRealtimeCollaboration", { enumerable: true, get: function () { return __importDefault(useRealtimeCollaboration_1).default; } });
Object.defineProperty(exports, "useAdvancedCollaboration", { enumerable: true, get: function () { return useRealtimeCollaboration_1.useAdvancedCollaboration; } });
var useContextVisualization_1 = require("./hooks/useContextVisualization");
Object.defineProperty(exports, "useContextVisualization", { enumerable: true, get: function () { return __importDefault(useContextVisualization_1).default; } });
var useStreamingResponse_1 = require("./hooks/useStreamingResponse");
Object.defineProperty(exports, "useStreamingResponse", { enumerable: true, get: function () { return __importDefault(useStreamingResponse_1).default; } });
// AI-Native Component Bundle
exports.AIComponents = {
    AIConversationCanvas,
    VoiceCommandInterface,
    CollaborativeCanvas,
    AIWorkflowBuilder
};
// Advanced Hooks Bundle
exports.AIHooks = {
    useAIConversation,
    useVoiceInput,
    useAdvancedVoiceInput,
    useRealtimeCollaboration,
    useAdvancedCollaboration,
    useContextVisualization,
    useStreamingResponse
};
// Library Metadata
exports.BFUI_VERSION = '0.2.0';
exports.BFUI_NAME = '@bluefly/bfui';
exports.BFUI_DESCRIPTION = 'Revolutionary AI-native React component library';
// Feature Detection Utilities
exports.FeatureDetection = {
    /**
     * Check if the browser supports Web Speech API
     */
    hasVoiceSupport() {
        return typeof window !== 'undefined' && ('SpeechRecognition' in window ||
            'webkitSpeechRecognition' in window ||
            'mozSpeechRecognition' in window ||
            'msSpeechRecognition' in window);
    },
    /**
     * Check if the browser supports WebRTC for real-time collaboration
     */
    hasWebRTCSupport() {
        return typeof window !== 'undefined' && ('RTCPeerConnection' in window ||
            'webkitRTCPeerConnection' in window ||
            'mozRTCPeerConnection' in window);
    },
    /**
     * Check if the browser supports Server-Sent Events for streaming
     */
    hasServerSentEventsSupport() {
        return typeof window !== 'undefined' && 'EventSource' in window;
    },
    /**
     * Check if the browser supports WebSockets for real-time collaboration
     */
    hasWebSocketSupport() {
        return typeof window !== 'undefined' && 'WebSocket' in window;
    },
    /**
     * Check if the browser supports Canvas API for visualizations
     */
    hasCanvasSupport() {
        return typeof window !== 'undefined' && 'HTMLCanvasElement' in window;
    },
    /**
     * Get comprehensive feature support summary
     */
    getFeatureSummary() {
        return {
            voice: this.hasVoiceSupport(),
            webrtc: this.hasWebRTCSupport(),
            serverSentEvents: this.hasServerSentEventsSupport(),
            webSocket: this.hasWebSocketSupport(),
            canvas: this.hasCanvasSupport(),
            aiNativeReady: this.hasVoiceSupport() && this.hasWebSocketSupport() && this.hasServerSentEventsSupport()
        };
    }
};
// Component Configuration Presets
exports.ComponentPresets = {
    /**
     * Minimal AI conversation setup
     */
    minimalConversation: {
        enableVoice: false,
        enableCollaboration: false,
        enableContextVisualization: false
    },
    /**
     * Full-featured AI conversation setup
     */
    fullConversation: {
        enableVoice: true,
        enableCollaboration: true,
        enableContextVisualization: true,
        autoSave: true,
        maxMessages: 100
    },
    /**
     * Voice-first interface setup
     */
    voiceFirst: {
        enableVoice: true,
        continuous: true,
        interimResults: true,
        autoRestart: true,
        confidenceThreshold: 0.7
    },
    /**
     * Collaborative workspace setup
     */
    collaborative: {
        enableCollaboration: true,
        enableVoiceChat: true,
        enableVideoChat: false,
        enableScreenShare: true,
        enableFileSharing: true,
        maxUsers: 10
    },
    /**
     * Workflow automation setup
     */
    workflowBuilder: {
        enableCollaboration: true,
        enableAIAssistant: true,
        width: 1200,
        height: 800
    }
};
// Error Classes
class AIComponentError extends Error {
    constructor(message, component, feature) {
        super(message);
        this.component = component;
        this.feature = feature;
        this.name = 'AIComponentError';
    }
}
exports.AIComponentError = AIComponentError;
class VoiceInputError extends AIComponentError {
    constructor(message, feature) {
        super(message, 'VoiceInput', feature);
        this.name = 'VoiceInputError';
    }
}
exports.VoiceInputError = VoiceInputError;
class CollaborationError extends AIComponentError {
    constructor(message, feature) {
        super(message, 'Collaboration', feature);
        this.name = 'CollaborationError';
    }
}
exports.CollaborationError = CollaborationError;
class StreamingError extends AIComponentError {
    constructor(message, feature) {
        super(message, 'Streaming', feature);
        this.name = 'StreamingError';
    }
}
exports.StreamingError = StreamingError;
// Default Export - Complete AI-Native Library Bundle
const AIComponentLibrary = {
    // Components
    ...exports.AIComponents,
    // Hooks
    ...exports.AIHooks,
    // Utilities
    FeatureDetection: exports.FeatureDetection,
    ComponentPresets: exports.ComponentPresets,
    // Metadata
    version: exports.BFUI_VERSION,
    name: exports.BFUI_NAME,
    description: exports.BFUI_DESCRIPTION,
    // Error Classes
    AIComponentError,
    VoiceInputError,
    CollaborationError,
    StreamingError
};
exports.default = AIComponentLibrary;
// Re-export everything for convenience
__exportStar(require("./components/ai-native/AIConversationCanvas"), exports);
__exportStar(require("./components/ai-native/VoiceCommandInterface"), exports);
__exportStar(require("./components/ai-native/CollaborativeCanvas"), exports);
__exportStar(require("./components/ai-native/AIWorkflowBuilder"), exports);
__exportStar(require("./hooks/useAIConversation"), exports);
__exportStar(require("./hooks/useVoiceInput"), exports);
__exportStar(require("./hooks/useRealtimeCollaboration"), exports);
__exportStar(require("./hooks/useContextVisualization"), exports);
__exportStar(require("./hooks/useStreamingResponse"), exports);
//# sourceMappingURL=index.ai-native.js.map