@heybello/bello-sdk 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/README.md ADDED
@@ -0,0 +1,108 @@
1
+ # Bello SDK
2
+
3
+ Embed voice agents into any website in minutes.
4
+
5
+ ## Overview
6
+
7
+ Bello SDK is a lightweight JavaScript library that enables you to integrate conversational voice agents into your web applications quickly and easily. Transform your website's user experience with natural voice interactions.
8
+
9
+ **Supports multiple platforms:** HTML/JS, React, WordPress, and Shopify.
10
+
11
+ ## Features
12
+
13
+ - **Multi-Platform Support** - Works with vanilla JS, React, WordPress, and Shopify
14
+ - **Quick Integration** - Get started in minutes with minimal setup
15
+ - **Voice-First Experience** - Natural conversation with your users
16
+ - **Cross-Browser Support** - Works across all modern browsers
17
+ - **Customizable UI** - Adapt the interface to match your brand
18
+ - **Real-time Voice Processing** - Low-latency voice recognition and synthesis
19
+ - **Event-Driven Architecture** - React to conversation events in your application
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ pnpm add @heybello/bello-sdk
25
+ # or
26
+ npm install @heybello/bello-sdk
27
+ ```
28
+
29
+ ## CDN / HTML usage
30
+
31
+ ```html
32
+ <script
33
+ src="https://unpkg.com/@heybello/bello-sdk@latest/dist/bello-embed.iife.js"
34
+ defer
35
+ data-project-id="YOUR_PROJECT_ID"
36
+ data-api-base-url="https://your-api.example.com"
37
+ data-position="bottom-right"
38
+ data-theme="dark"
39
+ data-orb-style="galaxy"
40
+ ></script>
41
+ ```
42
+
43
+ You can also initialize manually:
44
+
45
+ ```html
46
+ <script>
47
+ window.Bello = window.Bello || [];
48
+ window.Bello.push([
49
+ 'init',
50
+ {
51
+ projectId: 'YOUR_PROJECT_ID',
52
+ apiBaseUrl: 'https://your-api.example.com',
53
+ position: 'bottom-right',
54
+ theme: 'dark',
55
+ orbStyle: 'galaxy'
56
+ }
57
+ ]);
58
+ </script>
59
+ ```
60
+
61
+ ## React / Next.js usage
62
+
63
+ ```tsx
64
+ import { BelloWidget } from '@heybello/bello-sdk/react';
65
+
66
+ export default function Page() {
67
+ return (
68
+ <BelloWidget
69
+ projectId="YOUR_PROJECT_ID"
70
+ apiBaseUrl="https://your-api.example.com"
71
+ />
72
+ );
73
+ }
74
+ ```
75
+
76
+ The React package bundles the widget directly and does not require a
77
+ separate script tag.
78
+
79
+ ## Local development and testing
80
+
81
+ ```bash
82
+ pnpm install
83
+ pnpm dev:iife
84
+ ```
85
+
86
+ Open `http://localhost:5174/src/playground-embed.html` to test the CDN
87
+ flow locally.
88
+
89
+ ### Build the npm package
90
+
91
+ ```bash
92
+ pnpm build
93
+ ```
94
+
95
+ Outputs:
96
+
97
+ - `dist/bello-embed.iife.js` (CDN / IIFE)
98
+ - `dist/react.es.js` and `dist/react.cjs` (frameworks)
99
+ - `dist/*.d.ts` (types)
100
+
101
+ ### Test the package locally in another app
102
+
103
+ ```bash
104
+ # from your consuming app
105
+ pnpm add ../bello-sdk
106
+ # or
107
+ npm install ../bello-sdk
108
+ ```
package/dist/api.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { ConnectionDetails, InitOptions, PublicConfig } from './types';
2
+ export declare function fetchPublicConfig(opts: InitOptions): Promise<PublicConfig>;
3
+ export declare function fetchConnectionDetails(opts: InitOptions): Promise<ConnectionDetails>;