@useknest/widget-web 0.1.0-beta.4 → 0.1.0-beta.6

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 CHANGED
@@ -12,27 +12,7 @@ pnpm add @useknest/widget-web
12
12
  yarn add @useknest/widget-web
13
13
  ```
14
14
 
15
- ## Usage
16
-
17
- ### Script Tag (CDN)
18
-
19
- ```html
20
- <script type="module" src="https://unpkg.com/@useknest/widget-web"></script>
21
- <knest-chat publishable-api-key="pk_your_public_key_here"></knest-chat>
22
- ```
23
-
24
- ### ES Module Import
25
-
26
- ```javascript
27
- import '@useknest/widget-web';
28
-
29
- // Then use the custom element in your HTML
30
- document.body.innerHTML = `
31
- <knest-chat publishable-api-key="pk_your_public_key_here"></knest-chat>
32
- `;
33
- ```
34
-
35
- ### UMD (CommonJS)
15
+ ## Usage: Script Tag (CommonJS)
36
16
 
37
17
  ```html
38
18
  <script src="https://unpkg.com/@useknest/widget-web/dist/widget.umd.js"></script>
@@ -41,9 +21,11 @@ document.body.innerHTML = `
41
21
 
42
22
  ## Attributes
43
23
 
44
- | Attribute | Type | Required | Description |
45
- | --------------------- | -------- | -------- | ---------------------------------- |
46
- | `publishable-api-key` | `string` | Yes | Your project's publishable API key |
24
+ | Attribute | Type | Required | Default | Description |
25
+ | --------------------- | ---------------------- | -------- | ---------- | ---------------------------------------------------------- |
26
+ | `publishable-api-key` | `string` | Yes | - | Your project's publishable API key |
27
+ | `mode` | `'inline' \| 'bubble'` | No | `'inline'` | Display mode: inline or floating bubble button |
28
+ | `default-open` | `boolean` | No | `false` | Whether the chat starts open (only applies to bubble mode) |
47
29
 
48
30
  ## Features
49
31
 
@@ -116,6 +98,22 @@ import '@useknest/widget-web';
116
98
  <knest-chat publishable-api-key="pk_your_public_key_here"></knest-chat>
117
99
  ```
118
100
 
101
+ ### Floating Bubble Mode
102
+
103
+ ```html
104
+ <knest-chat publishable-api-key="pk_your_public_key_here" mode="bubble"></knest-chat>
105
+ ```
106
+
107
+ ### Bubble Mode (Auto-Open)
108
+
109
+ ```html
110
+ <knest-chat
111
+ publishable-api-key="pk_your_public_key_here"
112
+ mode="bubble"
113
+ default-open="true"
114
+ ></knest-chat>
115
+ ```
116
+
119
117
  ## Customization
120
118
 
121
119
  The widget automatically loads customization from your project's configuration from useknest.com: