ordify-chat-widget 1.0.1
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.
- package/CHANGELOG.md +38 -0
- package/LICENSE +21 -0
- package/README.md +225 -0
- package/dist/components/ChatHeader.d.ts +11 -0
- package/dist/components/ChatHeader.d.ts.map +1 -0
- package/dist/components/Conversation.d.ts +18 -0
- package/dist/components/Conversation.d.ts.map +1 -0
- package/dist/components/EmbeddedChat.d.ts +9 -0
- package/dist/components/EmbeddedChat.d.ts.map +1 -0
- package/dist/components/FloatingChat.d.ts +9 -0
- package/dist/components/FloatingChat.d.ts.map +1 -0
- package/dist/components/InlineChat.d.ts +9 -0
- package/dist/components/InlineChat.d.ts.map +1 -0
- package/dist/components/MarkdownRenderer.d.ts +7 -0
- package/dist/components/MarkdownRenderer.d.ts.map +1 -0
- package/dist/components/OrdifyChat.d.ts +4 -0
- package/dist/components/OrdifyChat.d.ts.map +1 -0
- package/dist/components/ProfessionalInput.d.ts +14 -0
- package/dist/components/ProfessionalInput.d.ts.map +1 -0
- package/dist/components/ResizeHandle.d.ts +8 -0
- package/dist/components/ResizeHandle.d.ts.map +1 -0
- package/dist/components/styled/ChatComponents.d.ts +25 -0
- package/dist/components/styled/ChatComponents.d.ts.map +1 -0
- package/dist/hooks/useOrdifyChat.d.ts +4 -0
- package/dist/hooks/useOrdifyChat.d.ts.map +1 -0
- package/dist/hooks/useOrdifyConfig.d.ts +20 -0
- package/dist/hooks/useOrdifyConfig.d.ts.map +1 -0
- package/dist/index.cjs.js +478 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +3177 -0
- package/dist/types/index.d.ts +107 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/api.d.ts +12 -0
- package/dist/utils/api.d.ts.map +1 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +83 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2024-01-16
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- Initial release of Ordify Chat Widget
|
|
12
|
+
- Support for multiple chat modes: floating, embedded, inline, and modal
|
|
13
|
+
- TypeScript support with full type definitions
|
|
14
|
+
- Real-time streaming responses from Ordify AI agents
|
|
15
|
+
- Markdown rendering for AI responses
|
|
16
|
+
- Theme-aware styling (light/dark mode)
|
|
17
|
+
- Resizable chat windows
|
|
18
|
+
- Professional input component with auto-resize
|
|
19
|
+
- Configuration file support for easy customization
|
|
20
|
+
- Multiple positioning options for floating chat
|
|
21
|
+
- Auto-scroll functionality for conversations
|
|
22
|
+
- Professional styling with Tailwind CSS and shadcn/ui components
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
- **Floating Chat**: Bottom-right corner chat button with resizable window
|
|
26
|
+
- **Embedded Chat**: Full-page chat interface for dedicated chat pages
|
|
27
|
+
- **Inline Chat**: Compact chat widget for content pages
|
|
28
|
+
- **Modal Chat**: Overlay chat interface for focused conversations
|
|
29
|
+
- **Customizable**: Colors, themes, positioning, and styling options
|
|
30
|
+
- **Responsive**: Works on desktop and mobile devices
|
|
31
|
+
- **Professional UI**: Clean, modern design with smooth animations
|
|
32
|
+
|
|
33
|
+
### Technical Details
|
|
34
|
+
- Built with React 18+ and TypeScript
|
|
35
|
+
- Uses Vite for fast development and building
|
|
36
|
+
- Integrates with Ordify API endpoints
|
|
37
|
+
- Supports streaming responses
|
|
38
|
+
- Includes comprehensive examples and documentation
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Ordify AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Ordify Chat Widget
|
|
2
|
+
|
|
3
|
+
A professional, production-ready React chat widget that enables seamless integration of Ordify AI agents into any web application. Deploy intelligent conversational interfaces with minimal setup and maximum customization.
|
|
4
|
+
|
|
5
|
+
## 🎯 What You Get
|
|
6
|
+
|
|
7
|
+
- **Zero Configuration**: Drop-in chat widget with no CSS imports or complex setup
|
|
8
|
+
- **Professional UI**: Polished, responsive chat interface that matches your brand
|
|
9
|
+
- **Real-time AI**: Direct integration with your Ordify AI agents for instant responses
|
|
10
|
+
- **Multiple Modes**: Floating chat buttons, embedded interfaces, and custom layouts
|
|
11
|
+
- **Enterprise Ready**: TypeScript support, theme-aware styling, and production-grade performance
|
|
12
|
+
|
|
13
|
+
## 📋 Prerequisites
|
|
14
|
+
|
|
15
|
+
Before integrating the chat widget, ensure you have:
|
|
16
|
+
|
|
17
|
+
- **API Key**: Available in your Ordify dashboard (Account → Settings → API)
|
|
18
|
+
- **Agent ID**: Found in your agent configuration panel within the Ordify application
|
|
19
|
+
- **React Application**: Compatible with React 18+ and modern build tools
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
> **🚀 Try it live!** Visit [app.ordify.ai/widget-demo](https://app.ordify.ai/widget-demo) to see all chat modes in action.
|
|
23
|
+
|
|
24
|
+
## ✨ Features
|
|
25
|
+
|
|
26
|
+
- 🚀 **Zero Configuration**: No CSS imports or additional setup required
|
|
27
|
+
- 🎨 **Multiple Modes**: Floating and embedded chat interfaces
|
|
28
|
+
- 🎯 **TypeScript Support**: Full type safety and IntelliSense
|
|
29
|
+
- 🎨 **Customizable**: Colors, themes, and styling options
|
|
30
|
+
- 📱 **Responsive**: Works perfectly on desktop and mobile devices
|
|
31
|
+
- 🔄 **Real-time**: Streaming responses from Ordify AI agents
|
|
32
|
+
- 🎭 **Theme-aware**: Automatic light/dark mode support
|
|
33
|
+
- 🔧 **Resizable**: User-adjustable chat window height
|
|
34
|
+
- 📝 **Markdown Support**: Rich text rendering for AI responses
|
|
35
|
+
<img width="1919" height="1321" alt="image" src="https://github.com/user-attachments/assets/41f20eb9-7b37-48ef-89bc-e406b73db4bd" />
|
|
36
|
+
|
|
37
|
+
## 🚀 Quick Start
|
|
38
|
+
|
|
39
|
+
### 1. Install the Library
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install @ordify-ai/chat-widget
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Add to Your React App
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { OrdifyChat } from '@ordify-ai/chat-widget'
|
|
49
|
+
|
|
50
|
+
function App() {
|
|
51
|
+
return (
|
|
52
|
+
<OrdifyChat
|
|
53
|
+
agentId="your-agent-id"
|
|
54
|
+
apiKey="your-api-key"
|
|
55
|
+
apiBaseUrl="https://r.ordify.ai"
|
|
56
|
+
chatName="AI Assistant"
|
|
57
|
+
buttonText="Chat with us"
|
|
58
|
+
/>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**That's it!** No CSS imports, no additional setup. The library includes all necessary styles automatically.
|
|
64
|
+
|
|
65
|
+
## 🎨 Chat Modes
|
|
66
|
+
|
|
67
|
+
### Floating Chat (Recommended for websites)
|
|
68
|
+
```tsx
|
|
69
|
+
<OrdifyChat
|
|
70
|
+
agentId="your-agent-id"
|
|
71
|
+
apiKey="your-api-key"
|
|
72
|
+
mode="floating"
|
|
73
|
+
position="bottom-right"
|
|
74
|
+
buttonText="AI Chat"
|
|
75
|
+
/>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Embedded Chat (For dedicated chat pages)
|
|
79
|
+
```tsx
|
|
80
|
+
<OrdifyChat
|
|
81
|
+
agentId="your-agent-id"
|
|
82
|
+
apiKey="your-api-key"
|
|
83
|
+
mode="embedded"
|
|
84
|
+
height="500px"
|
|
85
|
+
chatName="Support Assistant"
|
|
86
|
+
/>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Note**: `embedded` and `inline` modes are identical - both render a full chat interface within your page layout. Use `embedded` for consistency.
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## ⚙️ Configuration Options
|
|
93
|
+
|
|
94
|
+
| Option | Type | Default | Description |
|
|
95
|
+
|--------|------|---------|-------------|
|
|
96
|
+
| `agentId` | string | - | **Required** - Your Ordify agent ID |
|
|
97
|
+
| `apiKey` | string | - | **Required** - Your API key |
|
|
98
|
+
| `apiBaseUrl` | string | - | **Required** - API endpoint URL |
|
|
99
|
+
| `chatName` | string | "Chat Assistant" | Title text in chat header |
|
|
100
|
+
| `buttonText` | string | "AI Chat" | Text on floating button |
|
|
101
|
+
| `placeholder` | string | "Type a message..." | Input placeholder text |
|
|
102
|
+
| `primaryColor` | string | - | Custom header color (optional) |
|
|
103
|
+
| `mode` | string | "floating" | Chat display mode: "floating" or "embedded" |
|
|
104
|
+
| `position` | string | "bottom-right" | Floating button position |
|
|
105
|
+
| `resizable` | boolean | true | Allow user to resize chat |
|
|
106
|
+
| `showHeader` | boolean | true | Show/hide chat header |
|
|
107
|
+
| `height` | number | 400 | Initial chat height (px) |
|
|
108
|
+
| `width` | string | "320px" | Chat width |
|
|
109
|
+
|
|
110
|
+
## 🎯 Theme-Aware Defaults
|
|
111
|
+
|
|
112
|
+
When no `primaryColor` is specified, the header automatically adapts:
|
|
113
|
+
- **Light mode**: White background with dark text
|
|
114
|
+
- **Dark mode**: Dark background with light text
|
|
115
|
+
|
|
116
|
+
## 📚 Examples
|
|
117
|
+
|
|
118
|
+
### Live Demo
|
|
119
|
+
Visit [app.ordify.ai/widget-demo](https://app.ordify.ai/widget-demo) to see all chat modes in action with real functionality.
|
|
120
|
+
|
|
121
|
+
### Integration Examples
|
|
122
|
+
|
|
123
|
+
#### Next.js App Router
|
|
124
|
+
```tsx
|
|
125
|
+
// app/chat/page.tsx
|
|
126
|
+
'use client'
|
|
127
|
+
|
|
128
|
+
import { OrdifyChat } from '@ordify-ai/chat-widget'
|
|
129
|
+
|
|
130
|
+
export default function ChatPage() {
|
|
131
|
+
return (
|
|
132
|
+
<div className="container mx-auto p-4">
|
|
133
|
+
<h1 className="text-2xl font-bold mb-4">Chat with AI</h1>
|
|
134
|
+
<OrdifyChat
|
|
135
|
+
agentId={process.env.NEXT_PUBLIC_ORDIFY_AGENT_ID!}
|
|
136
|
+
apiKey={process.env.NEXT_PUBLIC_ORDIFY_API_KEY!}
|
|
137
|
+
apiBaseUrl="https://r.ordify.ai"
|
|
138
|
+
mode="embedded"
|
|
139
|
+
height="500px"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### React Component
|
|
147
|
+
```tsx
|
|
148
|
+
// components/ChatWidget.tsx
|
|
149
|
+
import { OrdifyChat } from '@ordify-ai/chat-widget'
|
|
150
|
+
|
|
151
|
+
export function ChatWidget() {
|
|
152
|
+
return (
|
|
153
|
+
<OrdifyChat
|
|
154
|
+
agentId="your-agent-id"
|
|
155
|
+
apiKey="your-api-key"
|
|
156
|
+
apiBaseUrl="https://r.ordify.ai"
|
|
157
|
+
mode="floating"
|
|
158
|
+
position="bottom-right"
|
|
159
|
+
buttonText="AI Chat"
|
|
160
|
+
/>
|
|
161
|
+
)
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### Landing Page Integration
|
|
166
|
+
```tsx
|
|
167
|
+
// pages/index.tsx
|
|
168
|
+
import { OrdifyChat } from '@ordify-ai/chat-widget'
|
|
169
|
+
|
|
170
|
+
export default function HomePage() {
|
|
171
|
+
return (
|
|
172
|
+
<div>
|
|
173
|
+
{/* Your existing page content */}
|
|
174
|
+
<h1>Welcome to Our Site</h1>
|
|
175
|
+
<p>Content here...</p>
|
|
176
|
+
|
|
177
|
+
{/* Add chat widget */}
|
|
178
|
+
<OrdifyChat
|
|
179
|
+
agentId="your-agent-id"
|
|
180
|
+
apiKey="your-api-key"
|
|
181
|
+
apiBaseUrl="https://r.ordify.ai"
|
|
182
|
+
mode="floating"
|
|
183
|
+
buttonText="Need Help?"
|
|
184
|
+
/>
|
|
185
|
+
</div>
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## 🔧 Development
|
|
191
|
+
|
|
192
|
+
### Setup
|
|
193
|
+
```bash
|
|
194
|
+
git clone https://github.com/ordify-ai/chat-widget.git
|
|
195
|
+
cd chat-widget
|
|
196
|
+
npm install
|
|
197
|
+
npm run dev
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Build
|
|
201
|
+
```bash
|
|
202
|
+
npm run build
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Integration Examples
|
|
206
|
+
See the [`examples/integration/`](./examples/integration/) directory for ready-to-copy code snippets for different frameworks and use cases.
|
|
207
|
+
|
|
208
|
+
## 📖 Documentation
|
|
209
|
+
|
|
210
|
+
- **[Integration Examples](./examples/integration/)** - Ready-to-copy code snippets for different frameworks
|
|
211
|
+
|
|
212
|
+
## 🤝 Support
|
|
213
|
+
|
|
214
|
+
- **Live Demo**: [app.ordify.ai/widget-demo](https://app.ordify.ai/widget-demo)
|
|
215
|
+
- **Documentation**: [Integration Examples](./examples/integration/)
|
|
216
|
+
- **Issues**: [GitHub Issues](https://github.com/ordify-ai/chat-widget/issues)
|
|
217
|
+
- **Email**: support@ordify.ai
|
|
218
|
+
|
|
219
|
+
## 📄 License
|
|
220
|
+
|
|
221
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
**Built with ❤️ by the Ordify team**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ChatHeaderProps {
|
|
2
|
+
chatName?: string;
|
|
3
|
+
showMinimizeButton?: boolean;
|
|
4
|
+
showCloseButton?: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
primaryColor?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function ChatHeader({ chatName, showCloseButton, onClose, primaryColor, className }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ChatHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../src/components/ChatHeader.tsx"],"names":[],"mappings":"AAGA,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiFD,wBAAgB,UAAU,CAAC,EACzB,QAA2B,EAC3B,eAAsB,EACtB,OAAO,EACP,YAAY,EACZ,SAAS,EACV,EAAE,eAAe,2CAyBjB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ConversationProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface ConversationContentProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
interface ConversationScrollButtonProps {
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function Conversation({ className, children }: ConversationProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function ConversationContent({ className, children }: ConversationContentProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ConversationScrollButton({ className }: ConversationScrollButtonProps): false | import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Conversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../src/components/Conversation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,UAAU,wBAAwB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,UAAU,6BAA6B;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAuDD,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAWtE;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,2CAMpF;AAED,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE,6BAA6B,mDAkBpF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
|
|
2
|
+
|
|
3
|
+
interface EmbeddedChatProps {
|
|
4
|
+
config: OrdifyConfig;
|
|
5
|
+
chat: UseOrdifyChatReturn;
|
|
6
|
+
}
|
|
7
|
+
export declare function EmbeddedChat({ config, chat }: EmbeddedChatProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=EmbeddedChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmbeddedChat.d.ts","sourceRoot":"","sources":["../../src/components/EmbeddedChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAe3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CA8G/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
|
|
2
|
+
|
|
3
|
+
interface FloatingChatProps {
|
|
4
|
+
config: OrdifyConfig;
|
|
5
|
+
chat: UseOrdifyChatReturn;
|
|
6
|
+
}
|
|
7
|
+
export declare function FloatingChat({ config, chat }: FloatingChatProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=FloatingChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FloatingChat.d.ts","sourceRoot":"","sources":["../../src/components/FloatingChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAkB3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CA+J/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
|
|
2
|
+
|
|
3
|
+
interface InlineChatProps {
|
|
4
|
+
config: OrdifyConfig;
|
|
5
|
+
chat: UseOrdifyChatReturn;
|
|
6
|
+
}
|
|
7
|
+
export declare function InlineChat({ config, chat }: InlineChatProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=InlineChat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineChat.d.ts","sourceRoot":"","sources":["../../src/components/InlineChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAe3D,UAAU,eAAe;IACvB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,eAAe,2CAiG3D"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface MarkdownRendererProps {
|
|
2
|
+
content: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function MarkdownRenderer({ content, className }: MarkdownRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=MarkdownRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AAEA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,2CAqG7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrdifyChat.d.ts","sourceRoot":"","sources":["../../src/components/OrdifyChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAItC,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,2CAY7C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface ProfessionalInputProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: string) => void;
|
|
6
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
maxLength?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare const ProfessionalInput: React.ForwardRefExoticComponent<ProfessionalInputProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ProfessionalInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfessionalInput.d.ts","sourceRoot":"","sources":["../../src/components/ProfessionalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,iBAAiB,oGAwC5B,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ResizeHandleProps {
|
|
2
|
+
onResize: (deltaY: number) => void;
|
|
3
|
+
position?: 'top' | 'bottom';
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ResizeHandle({ onResize, position, className }: ResizeHandleProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ResizeHandle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../src/components/ResizeHandle.tsx"],"names":[],"mappings":"AAGA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwCD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAmB,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAsC3F"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const ChatWidget: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const ChatMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
isUser: boolean;
|
|
4
|
+
}>> & string;
|
|
5
|
+
export declare const ChatInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const ProfessionalInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
|
|
7
|
+
export declare const SendButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
8
|
+
export declare const FloatingButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
9
|
+
export declare const ChatWindow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
10
|
+
position: string;
|
|
11
|
+
}>> & string;
|
|
12
|
+
export declare const ChatHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
13
|
+
primaryColor?: string;
|
|
14
|
+
}>> & string;
|
|
15
|
+
export declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
16
|
+
export declare const Conversation: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
17
|
+
export declare const LoadingDots: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
18
|
+
export declare const Timestamp: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
19
|
+
isUser: boolean;
|
|
20
|
+
}>> & string;
|
|
21
|
+
export declare const ErrorMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
22
|
+
export declare const ResizeHandle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
23
|
+
position: string;
|
|
24
|
+
}>> & string;
|
|
25
|
+
//# sourceMappingURL=ChatComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatComponents.d.ts","sourceRoot":"","sources":["../../../src/components/styled/ChatComponents.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,6NAgBtB,CAAA;AAGD,eAAO,MAAM,WAAW;YAAwB,OAAO;YA8BtD,CAAA;AAGD,eAAO,MAAM,SAAS,6NAYrB,CAAA;AAGD,eAAO,MAAM,iBAAiB,+OA4C7B,CAAA;AAGD,eAAO,MAAM,UAAU,yOAgCtB,CAAA;AAGD,eAAO,MAAM,cAAc,yOAgC1B,CAAA;AAGD,eAAO,MAAM,UAAU;cAA0B,MAAM;YAiCtD,CAAA;AAGD,eAAO,MAAM,UAAU;mBAA+B,MAAM;YAqB3D,CAAA;AAGD,eAAO,MAAM,WAAW,yOAqBvB,CAAA;AAGD,eAAO,MAAM,YAAY,6NAuCxB,CAAA;AAGD,eAAO,MAAM,WAAW,6NA+BvB,CAAA;AAGD,eAAO,MAAM,SAAS;YAAwB,OAAO;YAQpD,CAAA;AAGD,eAAO,MAAM,YAAY,6NAUxB,CAAA;AAGD,eAAO,MAAM,YAAY;cAA0B,MAAM;YAwBxD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrdifyChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAKpE,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,mBAAmB,CAoHvE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OrdifyConfig } from '../types';
|
|
2
|
+
|
|
3
|
+
export declare function useOrdifyConfig(config: OrdifyConfig): {
|
|
4
|
+
agentId: string;
|
|
5
|
+
apiKey: string;
|
|
6
|
+
apiBaseUrl: string;
|
|
7
|
+
mode: "floating" | "embedded";
|
|
8
|
+
position: "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
9
|
+
theme: "light" | "dark" | "auto";
|
|
10
|
+
placeholder: string;
|
|
11
|
+
height: string | number;
|
|
12
|
+
className: string;
|
|
13
|
+
buttonStyle: import('react').CSSProperties;
|
|
14
|
+
chatWindowStyle: import('react').CSSProperties;
|
|
15
|
+
showHeader: boolean;
|
|
16
|
+
onMessage: ((message: import('../types').Message) => void) | undefined;
|
|
17
|
+
onError: ((error: Error) => void) | undefined;
|
|
18
|
+
onClose: (() => void) | undefined;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=useOrdifyConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useOrdifyConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;EAiCnD"}
|