open-ask-ai 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import type { WidgetTexts, Message } from '@/core/types';
2
+ import type { WidgetTexts, Message } from '../../core/types/index.js';
3
3
  interface ChatContainerProps {
4
4
  texts?: WidgetTexts;
5
5
  exampleQuestions?: string[];
@@ -1,2 +1,2 @@
1
- import type { WidgetProps } from '@/core/types';
1
+ import type { WidgetProps } from '../../core/types/index.js';
2
2
  export declare function Widget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { SessionResponse } from '../types';
1
+ import type { SessionResponse } from '../types/index.js';
2
2
  /**
3
3
  * API client for Ask AI widget
4
4
  * Supports dynamic API URL configuration
@@ -1,3 +1,3 @@
1
- export { useChat } from './useChat';
2
- export { useSSE } from './useSSE';
3
- export { useSession } from './useSession';
1
+ export { useChat } from './useChat.js';
2
+ export { useSSE } from './useSSE.js';
3
+ export { useSession } from './useSession.js';
@@ -1,5 +1,5 @@
1
- import type { Message } from '../types';
2
- import type { APIClient } from '../api/client';
1
+ import type { Message } from '../types/index.js';
2
+ import type { APIClient } from '../api/client.js';
3
3
  interface UseChatOptions {
4
4
  apiClient: APIClient;
5
5
  systemPrompt?: string;
@@ -1,4 +1,4 @@
1
- import type { SSEData } from '../types';
1
+ import type { SSEData } from '../types/index.js';
2
2
  interface UseSSEOptions {
3
3
  onConnected?: () => void;
4
4
  onMessage?: (data: SSEData) => void;
@@ -1,4 +1,4 @@
1
- import type { APIClient } from '../api/client';
1
+ import type { APIClient } from '../api/client.js';
2
2
  interface UseSessionOptions {
3
3
  apiClient: APIClient;
4
4
  }
@@ -1,6 +1,6 @@
1
- export { Widget as AskAIWidget } from './components/widget/Widget';
2
- export type { Message, WidgetProps, WidgetTexts, } from './core/types';
3
- export { APIClient } from './core/api/client';
4
- export { useChat, useSession, useSSE, } from './core/hooks';
1
+ export { Widget as AskAIWidget } from './components/widget/Widget.js';
2
+ export type { Message, WidgetProps, WidgetTexts, } from './core/types/index.js';
3
+ export { APIClient } from './core/api/client.js';
4
+ export { useChat, useSession, useSSE, } from './core/hooks/index.js';
5
5
  import './styles/variables.css';
6
6
  import './styles/globals.css';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-ask-ai",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "AI-powered Q&A widget for documentation sites",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",