acecoderz-chat-ui 1.0.3 → 1.0.4
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/README.md +30 -17
- package/package.json +3 -3
- package/dist/browser/Archive.zip +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# acecoderz-chat-ui
|
|
2
2
|
|
|
3
3
|
A framework-agnostic, fully customizable chat UI package that works with React, Solid, Vanilla JS, and any other framework.
|
|
4
4
|
|
|
@@ -10,19 +10,30 @@ A framework-agnostic, fully customizable chat UI package that works with React,
|
|
|
10
10
|
- 💬 **Real-time Support** - WebSocket and HTTP API support
|
|
11
11
|
- 🎯 **TypeScript** - Full TypeScript support
|
|
12
12
|
- 📦 **Modular** - Import only what you need
|
|
13
|
+
- ✅ **Package Manager Compatible** - Works with both npm and pnpm
|
|
13
14
|
|
|
14
15
|
## Installation
|
|
15
16
|
|
|
16
|
-
### npm
|
|
17
|
+
### npm
|
|
17
18
|
|
|
18
19
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
npm install acecoderz-chat-ui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### pnpm
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pnpm add acecoderz-chat-ui
|
|
24
27
|
```
|
|
25
28
|
|
|
29
|
+
### yarn
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yarn add acecoderz-chat-ui
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Note**: This package is compatible with npm, pnpm, and yarn. Use the package manager your project uses.
|
|
36
|
+
|
|
26
37
|
### Browser / CDN (Script Tag)
|
|
27
38
|
|
|
28
39
|
For browser usage without a build step, see [CDN.md](./CDN.md) for detailed documentation.
|
|
@@ -56,6 +67,8 @@ For browser usage without a build step, see [CDN.md](./CDN.md) for detailed docu
|
|
|
56
67
|
**Building for CDN:**
|
|
57
68
|
```bash
|
|
58
69
|
# Build browser bundle
|
|
70
|
+
npm run build:browser
|
|
71
|
+
# or
|
|
59
72
|
pnpm build:browser
|
|
60
73
|
|
|
61
74
|
# Output files will be in dist/browser/:
|
|
@@ -83,13 +96,13 @@ After building, you can embed the chatbot in an iframe:
|
|
|
83
96
|
Import the CSS file in your project:
|
|
84
97
|
|
|
85
98
|
```css
|
|
86
|
-
@import '
|
|
99
|
+
@import 'acecoderz-chat-ui/styles';
|
|
87
100
|
```
|
|
88
101
|
|
|
89
102
|
Or in your JavaScript/TypeScript:
|
|
90
103
|
|
|
91
104
|
```javascript
|
|
92
|
-
import '
|
|
105
|
+
import 'acecoderz-chat-ui/styles';
|
|
93
106
|
```
|
|
94
107
|
|
|
95
108
|
## Usage
|
|
@@ -97,8 +110,8 @@ import '@chatbot/chat-ui/styles';
|
|
|
97
110
|
### React
|
|
98
111
|
|
|
99
112
|
```tsx
|
|
100
|
-
import { ChatUI } from '
|
|
101
|
-
import '
|
|
113
|
+
import { ChatUI } from 'acecoderz-chat-ui/react';
|
|
114
|
+
import 'acecoderz-chat-ui/styles';
|
|
102
115
|
|
|
103
116
|
function App() {
|
|
104
117
|
return (
|
|
@@ -118,7 +131,7 @@ function App() {
|
|
|
118
131
|
Or use the hook directly:
|
|
119
132
|
|
|
120
133
|
```tsx
|
|
121
|
-
import { useChat } from '
|
|
134
|
+
import { useChat } from 'acecoderz-chat-ui/react';
|
|
122
135
|
|
|
123
136
|
function CustomChat() {
|
|
124
137
|
const { messages, input, sendMessage, setInput } = useChat({
|
|
@@ -140,8 +153,8 @@ function CustomChat() {
|
|
|
140
153
|
### Solid
|
|
141
154
|
|
|
142
155
|
```tsx
|
|
143
|
-
import { createChat } from '
|
|
144
|
-
import '
|
|
156
|
+
import { createChat } from 'acecoderz-chat-ui/solid';
|
|
157
|
+
import 'acecoderz-chat-ui/styles';
|
|
145
158
|
|
|
146
159
|
function App() {
|
|
147
160
|
const chat = createChat({
|
|
@@ -168,8 +181,8 @@ function App() {
|
|
|
168
181
|
### Vanilla JS
|
|
169
182
|
|
|
170
183
|
```javascript
|
|
171
|
-
import { createChatUI } from '
|
|
172
|
-
import '
|
|
184
|
+
import { createChatUI } from 'acecoderz-chat-ui/vanilla';
|
|
185
|
+
import 'acecoderz-chat-ui/styles';
|
|
173
186
|
|
|
174
187
|
const container = document.getElementById('chat-container');
|
|
175
188
|
|
|
@@ -190,7 +203,7 @@ const chatUI = createChatUI({
|
|
|
190
203
|
### Core Only (Advanced)
|
|
191
204
|
|
|
192
205
|
```typescript
|
|
193
|
-
import { ChatEngine } from '
|
|
206
|
+
import { ChatEngine } from 'acecoderz-chat-ui/core';
|
|
194
207
|
|
|
195
208
|
const engine = new ChatEngine({
|
|
196
209
|
apiUrl: 'http://localhost:3000/api',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "acecoderz-chat-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "A framework-agnostic, fully customizable chat UI package that works with React, Solid, Vanilla JS, and any other framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"chat",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"scripts": {
|
|
55
55
|
"build": "tsc",
|
|
56
56
|
"build:browser": "node build-browser.js",
|
|
57
|
-
"build:all": "
|
|
57
|
+
"build:all": "npm run build && npm run build:browser",
|
|
58
58
|
"dev": "tsc --watch",
|
|
59
59
|
"check-types": "tsc --noEmit",
|
|
60
60
|
"docs:storybook": "storybook dev -p 6006",
|
|
61
61
|
"docs:storybook:build": "storybook build",
|
|
62
62
|
"docs:typedoc": "typedoc",
|
|
63
|
-
"docs:build": "
|
|
63
|
+
"docs:build": "npm run docs:typedoc && npm run docs:storybook:build",
|
|
64
64
|
"version:patch": "node version-bump.js patch",
|
|
65
65
|
"version:minor": "node version-bump.js minor",
|
|
66
66
|
"version:major": "node version-bump.js major"
|
package/dist/browser/Archive.zip
DELETED
|
Binary file
|