@horneross/embeds 1.0.230 → 1.0.232

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 ADDED
@@ -0,0 +1,157 @@
1
+ # @horneross/embeds
2
+
3
+ Official embed widgets for Horneross AI agents - chatbox and form integrations.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @horneross/embeds
9
+ ```
10
+
11
+ or with pnpm:
12
+
13
+ ```bash
14
+ pnpm add @horneross/embeds
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ### Chatbox Widget
20
+
21
+ Add the chatbox widget to your website:
22
+
23
+ ```html
24
+ <!-- Add this script tag to your HTML -->
25
+ <script src="https://unpkg.com/@horneross/embeds@latest/dist/chatbox/index.js"></script>
26
+ <link rel="stylesheet" href="https://unpkg.com/@horneross/embeds@latest/dist/chatbox/index.css">
27
+
28
+ <script>
29
+ // Initialize the chatbox
30
+ window.hornerossEmbeds.initChatbox({
31
+ agentId: 'your-agent-id',
32
+ apiUrl: 'https://your-api-url.com',
33
+ // Optional configuration
34
+ theme: 'light', // or 'dark'
35
+ position: 'bottom-right', // or 'bottom-left'
36
+ });
37
+ </script>
38
+ ```
39
+
40
+ ### Form Widget
41
+
42
+ Embed a form on your website:
43
+
44
+ ```html
45
+ <!-- Add this script tag to your HTML -->
46
+ <script src="https://unpkg.com/@horneross/embeds@latest/dist/form/index.js"></script>
47
+ <link rel="stylesheet" href="https://unpkg.com/@horneross/embeds@latest/dist/form/index.css">
48
+
49
+ <script>
50
+ // Initialize the form
51
+ window.hornerossEmbeds.initForm({
52
+ formId: 'your-form-id',
53
+ containerId: 'form-container',
54
+ apiUrl: 'https://your-api-url.com',
55
+ });
56
+ </script>
57
+ ```
58
+
59
+ ## CDN Usage
60
+
61
+ You can use the package directly from unpkg CDN without installation:
62
+
63
+ ```html
64
+ <!-- Chatbox -->
65
+ <script src="https://unpkg.com/@horneross/embeds@1.0.230/dist/chatbox/index.js"></script>
66
+ <link rel="stylesheet" href="https://unpkg.com/@horneross/embeds@1.0.230/dist/chatbox/index.css">
67
+
68
+ <!-- Form -->
69
+ <script src="https://unpkg.com/@horneross/embeds@1.0.230/dist/form/index.js"></script>
70
+ <link rel="stylesheet" href="https://unpkg.com/@horneross/embeds@1.0.230/dist/form/index.css">
71
+ ```
72
+
73
+ ## Configuration Options
74
+
75
+ ### Chatbox Configuration
76
+
77
+ | Option | Type | Default | Description |
78
+ |--------|------|---------|-------------|
79
+ | `agentId` | `string` | **required** | Your Horneross agent ID |
80
+ | `apiUrl` | `string` | **required** | API endpoint URL |
81
+ | `theme` | `'light' \| 'dark'` | `'light'` | Widget theme |
82
+ | `position` | `'bottom-right' \| 'bottom-left'` | `'bottom-right'` | Widget position |
83
+ | `primaryColor` | `string` | `'#0066FF'` | Primary brand color |
84
+ | `welcomeMessage` | `string` | - | Custom welcome message |
85
+
86
+ ### Form Configuration
87
+
88
+ | Option | Type | Default | Description |
89
+ |--------|------|---------|-------------|
90
+ | `formId` | `string` | **required** | Your form ID |
91
+ | `containerId` | `string` | **required** | DOM element ID to mount the form |
92
+ | `apiUrl` | `string` | **required** | API endpoint URL |
93
+ | `onSubmit` | `function` | - | Callback after successful submission |
94
+
95
+ ## Examples
96
+
97
+ ### Custom Styled Chatbox
98
+
99
+ ```javascript
100
+ window.hornerossEmbeds.initChatbox({
101
+ agentId: 'agent-123',
102
+ apiUrl: 'https://api.horneross.com',
103
+ theme: 'dark',
104
+ position: 'bottom-left',
105
+ primaryColor: '#FF6B6B',
106
+ welcomeMessage: 'Hi! How can I help you today?',
107
+ });
108
+ ```
109
+
110
+ ### Form with Callback
111
+
112
+ ```javascript
113
+ window.hornerossEmbeds.initForm({
114
+ formId: 'form-456',
115
+ containerId: 'my-form-container',
116
+ apiUrl: 'https://api.horneross.com',
117
+ onSubmit: (data) => {
118
+ console.log('Form submitted:', data);
119
+ alert('Thank you for your submission!');
120
+ },
121
+ });
122
+ ```
123
+
124
+ ## Browser Support
125
+
126
+ - Chrome (latest)
127
+ - Firefox (latest)
128
+ - Safari (latest)
129
+ - Edge (latest)
130
+
131
+ ## Package Size
132
+
133
+ - Chatbox: ~1.5 MB (JS) + 141 KB (CSS)
134
+ - Form: ~856 KB (JS) + 141 KB (CSS)
135
+ - Gzipped: ~724 KB total
136
+
137
+ ## License
138
+
139
+ MIT
140
+
141
+ ## Author
142
+
143
+ Javier Gonzalo Arrayaran
144
+
145
+ ## Links
146
+
147
+ - [GitHub Repository](https://github.com/)
148
+ - [Documentation](https://horneross.com/docs)
149
+ - [Support](https://horneross.com/support)
150
+
151
+ ## Changelog
152
+
153
+ ### 1.0.230
154
+ - Latest stable release
155
+ - Production-ready chatbox and form widgets
156
+ - Full TypeScript support
157
+ - Tailwind CSS styling