@lemonsliceai/lemon-slice-widget 1.0.9 → 1.0.12

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.
Files changed (3) hide show
  1. package/README.md +28 -38
  2. package/dist/index.js +30 -30
  3. package/package.json +6 -7
package/README.md CHANGED
@@ -1,49 +1,39 @@
1
- # LemonSlice Agent Widget
1
+ # video-chat-widget
2
2
 
3
- LemonSlice Agent Widget is an embeddable web component that enables real-time video chat with LemonSlice AI agents. It provides a floating or inline widget that connects users to LemonSlice AI agents via video and audio. The widget is distributed as an npm package and can be embedded in any webpage with a single HTML tag.
3
+ ## CLI Commands
4
4
 
5
- LemonSlice agents are created on [https://lemonslice.com/](https://lemonslice.com/)
5
+ ``` bash
6
+ # install dependencies
7
+ pnpm install
6
8
 
7
- ## How to use it
8
- ``` html
9
- <lemon-slice-widget agent-id="agent_id"></lemon-slice-widget>
10
- <script type="module" src="https://unpkg.com/@lemonsliceai/lemon-slice-widget"></script>
11
- ```
12
-
13
- ## Configuration
14
-
15
- ### Attributes
16
-
17
- - **`agent-id`** (required): Your LemonSlice agent ID
18
- - **`inline`**: Display widget inline instead of floating (default: `false`)
19
- - **`show-minimize-button`**: Show/hide the minimize button (default: `true`)
20
- - **`initial-state`**: Initial widget state on load - `"minimized"`, `"active"`, or `"hidden"` (default: `"minimized"`)
21
- - **`controlled-widget-state`**: Dynamically control widget state - `"minimized"`, `"active"`, or `"hidden"`
22
- - **`controlled-show-minimize-button`**: Dynamically control minimize button visibility - `"true"` or `"false"`
9
+ # serve with hot reload at localhost:5177
10
+ pnpm run dev
23
11
 
24
- ### Examples
12
+ # lint the project with eslint to find code style issues
13
+ pnpm run lint
25
14
 
26
- ```html
27
- <!-- Start expanded -->
28
- <lemon-slice-widget agent-id="agent_id" initial-state="active"></lemon-slice-widget>
29
-
30
- <!-- Hide minimize button -->
31
- <lemon-slice-widget agent-id="agent_id" show-minimize-button="false"></lemon-slice-widget>
32
-
33
- <!-- Inline widget -->
34
- <lemon-slice-widget agent-id="agent_id" inline></lemon-slice-widget>
15
+ # run tests with jest and vitest
16
+ pnpm run test
35
17
  ```
36
18
 
37
- ### Dynamic Control
19
+ ## How to Deploy
38
20
 
39
- Control the widget dynamically by updating attributes:
21
+ ``` bash
22
+ # Login to lemon slice npm account
23
+ npm login
40
24
 
41
- ```javascript
42
- const widget = document.querySelector('lemon-slice-widget');
25
+ # Update version by running one of these commands
26
+ npm version patch # 0.0.X
27
+ npm version minor # 0.X.0
28
+ npm version major # X.0.0
43
29
 
44
- // Change widget state
45
- widget.setAttribute('controlled-widget-state', 'active');
30
+ # Build the latest code
31
+ npm run build
46
32
 
47
- // Toggle minimize button
48
- widget.setAttribute('controlled-show-minimize-button', 'false');
49
- ```
33
+ # Publish it
34
+ npm publish --access public
35
+
36
+ # Use it
37
+ # <lemon-slice-widget agent-id="bot_123"></lemon-slice-widget>
38
+ # <script type="module" src="https://unpkg.com/lemon-slice-widget"></script>
39
+ ```