@archbee/app-widget 1.1.2 → 1.1.4

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 (2) hide show
  1. package/README.md +24 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -94,11 +94,34 @@ const widgetRef = useRef<AbWidgetRef>(null);
94
94
  ReactDOM.render(<App />, appElement);
95
95
  ```
96
96
 
97
+ ## Component Props
98
+
99
+ | Property | Type | Required | Description |
100
+ |-------------------|------------------|------------|-----------------|
101
+ | `spaceId` | `string` | `required` | Pass the desired id to load your docs.
102
+ | `docId` | `string` | `optional` | The doc where you want to open the widget docs. If `docId` is passed, `widgetType` is ignored, it will open in docs mode regardless of prop passed.
103
+ | `jwt` | `string` | `optional` | Pass the jwt token in order to see jwt protected docs.
104
+ | `shareableToken` | `string` | `optional` | Pass the shareableToken from your private links to protect your docs.
105
+ | `className` | `string` | `optional` | Pass CSS classes to the `div` wrapper
106
+ | `widgetType` | `docs \| search` | `optional` | Default value is `docs``. This opens the widget with the desired behaviour. `docs`` type will open the widget with the default behaviour, `search` will open a search widget bar that shows a search bar with AI support (if included in your subscription)
107
+ | `loadingStrategy` | `eager \| lazy` | `optional` | Default value is `lazy`. Loading strategy method for widget loading.
108
+ | `onWidgetOpen` | `void` | `optional` | Callback that is called after widget opens.
109
+ | `onWidgetClose` | `void` | `optional` | Callback that is called after widget closes.
110
+
111
+ ## Ref Methods
112
+
97
113
  If `ref` is not passed to `ArchbeeAppWidget`, the children will automatically open the modal popup upon click.
98
114
 
115
+ | Property | Type | Description |
116
+ |------------|----------|-----------------|
117
+ | `open` | `method` | Opens widget programatically.
118
+ | `close` | `method` | Closes widget programatically.
119
+ | `instance` | `method` | Returns the instance of the widget.
120
+
121
+
99
122
  ## Demos
100
123
 
101
- Down below is a demo setup in [CodePen](https://codepen.io), which
124
+ Down below is a demo setup in [CodeSandbox](https://codesandbox.io/), which
102
125
  demonstrate various features of archbee-app:
103
126
 
104
127
  * [Demo](https://codesandbox.io/s/funny-austin-gndp8w?file=/src/App.tsx)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archbee/app-widget",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "author": {