@botu/widget-react 0.1.1 → 0.1.3
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/dist/index.d.mts +0 -5
- package/dist/index.d.ts +0 -5
- package/dist/index.js +1 -5
- package/dist/index.mjs +2 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8,11 +8,6 @@ type BotuChatWidgetProps = {
|
|
|
8
8
|
autoload?: boolean;
|
|
9
9
|
shutdownOnUnmount?: boolean;
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* React wrapper for @botu/widget.
|
|
13
|
-
* - If autoload=true (default), calls boot() on mount.
|
|
14
|
-
* - Renders nothing.
|
|
15
|
-
*/
|
|
16
11
|
declare function BotuChatWidget({ projectId, bootOptions, loadOptions, autoload, shutdownOnUnmount, }: BotuChatWidgetProps): null;
|
|
17
12
|
|
|
18
13
|
export { BotuChatWidget, type BotuChatWidgetProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -8,11 +8,6 @@ type BotuChatWidgetProps = {
|
|
|
8
8
|
autoload?: boolean;
|
|
9
9
|
shutdownOnUnmount?: boolean;
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* React wrapper for @botu/widget.
|
|
13
|
-
* - If autoload=true (default), calls boot() on mount.
|
|
14
|
-
* - Renders nothing.
|
|
15
|
-
*/
|
|
16
11
|
declare function BotuChatWidget({ projectId, bootOptions, loadOptions, autoload, shutdownOnUnmount, }: BotuChatWidgetProps): null;
|
|
17
12
|
|
|
18
13
|
export { BotuChatWidget, type BotuChatWidgetProps };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
"use strict";
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -45,11 +46,6 @@ function BotuChatWidget({
|
|
|
45
46
|
});
|
|
46
47
|
return () => {
|
|
47
48
|
if (!shutdownOnUnmount) return;
|
|
48
|
-
try {
|
|
49
|
-
const maybe = import_widget.boot;
|
|
50
|
-
maybe.shutdown?.();
|
|
51
|
-
} catch {
|
|
52
|
-
}
|
|
53
49
|
};
|
|
54
50
|
}, []);
|
|
55
51
|
return null;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
1
3
|
// src/chat-widget.ts
|
|
2
4
|
import { useEffect, useRef } from "react";
|
|
3
5
|
import { boot } from "@botu/widget";
|
|
@@ -18,11 +20,6 @@ function BotuChatWidget({
|
|
|
18
20
|
});
|
|
19
21
|
return () => {
|
|
20
22
|
if (!shutdownOnUnmount) return;
|
|
21
|
-
try {
|
|
22
|
-
const maybe = boot;
|
|
23
|
-
maybe.shutdown?.();
|
|
24
|
-
} catch {
|
|
25
|
-
}
|
|
26
23
|
};
|
|
27
24
|
}, []);
|
|
28
25
|
return null;
|