@jexity/chat-widget 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jexity
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,57 @@
1
+ # @jexity/chat-widget
2
+
3
+ Embeddable AI chat widget for any website. Add customer support chat with a single `<script>` tag or via npm.
4
+
5
+ ## Quick Start
6
+
7
+ ### Script Tag (No Build Tools Required)
8
+
9
+ ```html
10
+ <script
11
+ src="https://unpkg.com/@jexity/chat-widget/dist/widget.js"
12
+ data-org-id="YOUR_ORG_ID"
13
+ ></script>
14
+ ```
15
+
16
+ ### NPM
17
+
18
+ ```bash
19
+ npm install @jexity/chat-widget
20
+ ```
21
+
22
+ ```ts
23
+ import { init } from '@jexity/chat-widget'
24
+
25
+ const widget = init({
26
+ orgId: 'YOUR_ORG_ID',
27
+ })
28
+
29
+ // Later: widget.destroy()
30
+ ```
31
+
32
+ ## Configuration
33
+
34
+ | Option | Type | Default | Description |
35
+ |--------|------|---------|-------------|
36
+ | `orgId` | `string` | *required* | Your organization ID |
37
+ | `container` | `string \| HTMLElement` | auto-created `div` | CSS selector or element to mount into |
38
+ | `position` | `'bottom-right' \| 'bottom-left'` | `'bottom-right'` | Widget position on screen |
39
+ | `theme` | `'light' \| 'dark' \| 'auto'` | `'auto'` | Color theme |
40
+ | `greeting` | `string` | `'Hi there! How can I help?'` | Initial bot message |
41
+ | `title` | `string` | `'Jexity Assistant'` | Chat window header title |
42
+ | `primaryColor` | `string` | `'#0070f3'` | Brand color (hex) |
43
+
44
+ ## Programmatic API
45
+
46
+ ```ts
47
+ const widget = init(options)
48
+
49
+ widget.open() // Open the chat window
50
+ widget.close() // Close the chat window
51
+ widget.toggle() // Toggle open/closed
52
+ widget.destroy() // Remove widget from DOM
53
+ ```
54
+
55
+ ## License
56
+
57
+ MIT