droplinked-chatbot-next 1.0.6 → 1.0.7
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/components/EmbeddedChatButton.d.ts +2 -1
- package/dist/index.esm.js +10 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface SolidChatButtonProps {
|
|
2
|
+
showIconOnly: boolean;
|
|
2
3
|
onClick: () => void;
|
|
3
4
|
}
|
|
4
|
-
declare function EmbeddedChatButton({ onClick }: SolidChatButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function EmbeddedChatButton({ showIconOnly, onClick }: SolidChatButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default EmbeddedChatButton;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import * as Chakra from '@chakra-ui/react';
|
|
3
|
-
import { VStack, Text, Box, Input, Button, HStack, Image as Image$1, Spacer, IconButton, Link, Grid, Flex, Tooltip as Tooltip$1, Center, DrawerHeader, useDisclosure, DrawerBody } from '@chakra-ui/react';
|
|
3
|
+
import { VStack, Text, Box, Input, Button, HStack, Image as Image$1, Spacer, IconButton, Link, Grid, Flex, Tooltip as Tooltip$1, Center, DrawerHeader, useDisclosure, useBreakpointValue, DrawerBody } from '@chakra-ui/react';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default, { useState, useMemo, useRef, useEffect, useCallback } from 'react';
|
|
6
6
|
|
|
@@ -66257,7 +66257,8 @@ function ChatHeader(_ref) {
|
|
|
66257
66257
|
}
|
|
66258
66258
|
|
|
66259
66259
|
function EmbeddedChatButton(_ref) {
|
|
66260
|
-
var
|
|
66260
|
+
var showIconOnly = _ref.showIconOnly,
|
|
66261
|
+
onClick = _ref.onClick;
|
|
66261
66262
|
return jsxs(Button, {
|
|
66262
66263
|
onClick: onClick,
|
|
66263
66264
|
bg: "transparent",
|
|
@@ -66290,7 +66291,7 @@ function EmbeddedChatButton(_ref) {
|
|
|
66290
66291
|
_focusVisible: {
|
|
66291
66292
|
boxShadow: "0 0 0 2px rgba(43, 207, 161, 0.3)"
|
|
66292
66293
|
},
|
|
66293
|
-
children: ["AI Assistant", jsx(Box, {
|
|
66294
|
+
children: [!showIconOnly && "AI Assistant", jsx(Box, {
|
|
66294
66295
|
position: "absolute",
|
|
66295
66296
|
bottom: 0,
|
|
66296
66297
|
left: 0,
|
|
@@ -66524,6 +66525,7 @@ function FloatingChatButton(_ref) {
|
|
|
66524
66525
|
}
|
|
66525
66526
|
|
|
66526
66527
|
function Chatbot(_ref) {
|
|
66528
|
+
var _useBreakpointValue;
|
|
66527
66529
|
var apiBaseUrl = _ref.apiBaseUrl,
|
|
66528
66530
|
apiKey = _ref.apiKey,
|
|
66529
66531
|
_ref$buttonType = _ref.buttonType,
|
|
@@ -66554,10 +66556,15 @@ function Chatbot(_ref) {
|
|
|
66554
66556
|
handleSendMessage = _useChatbot.handleSendMessage,
|
|
66555
66557
|
handleRetryLastMessage = _useChatbot.handleRetryLastMessage,
|
|
66556
66558
|
clearProcessingMessageId = _useChatbot.clearProcessingMessageId;
|
|
66559
|
+
var showIconOnly = (_useBreakpointValue = useBreakpointValue({
|
|
66560
|
+
base: true,
|
|
66561
|
+
md: false
|
|
66562
|
+
})) !== null && _useBreakpointValue !== void 0 ? _useBreakpointValue : false;
|
|
66557
66563
|
return jsxs(Fragment, {
|
|
66558
66564
|
children: [buttonType === "floating" ? jsx(FloatingChatButton, {
|
|
66559
66565
|
onClick: onOpen
|
|
66560
66566
|
}) : jsx(EmbeddedChatButton, {
|
|
66567
|
+
showIconOnly: showIconOnly,
|
|
66561
66568
|
onClick: onOpen
|
|
66562
66569
|
}), jsxs(ChatDrawer, {
|
|
66563
66570
|
isOpen: isOpen,
|