droplinked-chatbot-next 1.0.7 → 1.0.9
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 +75 -13
- package/dist/Chatbot.d.ts +12 -0
- package/dist/components/Chatbot.d.ts +2 -2
- package/dist/index-C40_v4mv.js +48660 -0
- package/dist/index-C40_v4mv.js.map +1 -0
- package/dist/index-z0lPynKU.js +48700 -0
- package/dist/index-z0lPynKU.js.map +1 -0
- package/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.client-n6MaYrH1.js +48658 -0
- package/dist/index.client-n6MaYrH1.js.map +1 -0
- package/dist/index.client.d.ts +12 -0
- package/dist/index.client.js +5 -0
- package/dist/index.client.js.map +1 -0
- package/dist/index.d.ts +10 -11
- package/dist/index.esm.js +5 -284
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -284
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -0
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd-C5JNg43q.js +17719 -0
- package/dist/index.umd-C5JNg43q.js.map +1 -0
- package/dist/index.umd-CUkx0ACx.js +17717 -0
- package/dist/index.umd-CUkx0ACx.js.map +1 -0
- package/dist/index.umd-DUVv0nFT.js +17717 -0
- package/dist/index.umd-DUVv0nFT.js.map +1 -0
- package/package.json +7 -6
package/dist/index.js
CHANGED
|
@@ -66276,282 +66276,12 @@ function ChatHeader(_ref) {
|
|
|
66276
66276
|
});
|
|
66277
66277
|
}
|
|
66278
66278
|
|
|
66279
|
-
function EmbeddedChatButton(_ref) {
|
|
66280
|
-
var showIconOnly = _ref.showIconOnly,
|
|
66281
|
-
onClick = _ref.onClick;
|
|
66282
|
-
return jsxRuntime.jsxs(Chakra.Button, {
|
|
66283
|
-
onClick: onClick,
|
|
66284
|
-
bg: "transparent",
|
|
66285
|
-
color: "white",
|
|
66286
|
-
borderRadius: "12px",
|
|
66287
|
-
px: "12px",
|
|
66288
|
-
py: "8px",
|
|
66289
|
-
h: "36px",
|
|
66290
|
-
minW: "36px",
|
|
66291
|
-
fontWeight: "500",
|
|
66292
|
-
fontSize: "14px",
|
|
66293
|
-
lineHeight: "20px",
|
|
66294
|
-
transition: "all 0.2s ease-in-out",
|
|
66295
|
-
position: "relative",
|
|
66296
|
-
overflow: "hidden",
|
|
66297
|
-
leftIcon: jsxRuntime.jsx(AIMd, {
|
|
66298
|
-
color: "currentColor"
|
|
66299
|
-
}),
|
|
66300
|
-
_hover: {
|
|
66301
|
-
bg: "#2BCFA1",
|
|
66302
|
-
color: "#FFFFFF"
|
|
66303
|
-
},
|
|
66304
|
-
_active: {
|
|
66305
|
-
bg: "#26B894",
|
|
66306
|
-
color: "#FFFFFF"
|
|
66307
|
-
},
|
|
66308
|
-
_focus: {
|
|
66309
|
-
boxShadow: "none"
|
|
66310
|
-
},
|
|
66311
|
-
_focusVisible: {
|
|
66312
|
-
boxShadow: "0 0 0 2px rgba(43, 207, 161, 0.3)"
|
|
66313
|
-
},
|
|
66314
|
-
children: [!showIconOnly && "AI Assistant", jsxRuntime.jsx(Chakra.Box, {
|
|
66315
|
-
position: "absolute",
|
|
66316
|
-
bottom: 0,
|
|
66317
|
-
left: 0,
|
|
66318
|
-
right: 0,
|
|
66319
|
-
width: "100%",
|
|
66320
|
-
height: "36px",
|
|
66321
|
-
pointerEvents: "none",
|
|
66322
|
-
opacity: 0,
|
|
66323
|
-
transition: "opacity 0.2s ease-in-out",
|
|
66324
|
-
sx: {
|
|
66325
|
-
'.chakra-button:hover &': {
|
|
66326
|
-
opacity: 1
|
|
66327
|
-
},
|
|
66328
|
-
'.chakra-button:active &': {
|
|
66329
|
-
opacity: 1
|
|
66330
|
-
}
|
|
66331
|
-
},
|
|
66332
|
-
children: jsxRuntime.jsxs("svg", {
|
|
66333
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
66334
|
-
width: "100%",
|
|
66335
|
-
height: "100%",
|
|
66336
|
-
viewBox: "0 0 188 48",
|
|
66337
|
-
fill: "none",
|
|
66338
|
-
preserveAspectRatio: "none",
|
|
66339
|
-
children: [jsxRuntime.jsxs("g", {
|
|
66340
|
-
clipPath: "url(#clip0_ai_overlay)",
|
|
66341
|
-
children: [jsxRuntime.jsx("rect", {
|
|
66342
|
-
width: "188",
|
|
66343
|
-
height: "48",
|
|
66344
|
-
rx: "12",
|
|
66345
|
-
fill: "url(#paint0_radial_ai_overlay)"
|
|
66346
|
-
}), jsxRuntime.jsx("g", {
|
|
66347
|
-
style: {
|
|
66348
|
-
mixBlendMode: "hard-light"
|
|
66349
|
-
},
|
|
66350
|
-
filter: "url(#filter0_f_ai_overlay)",
|
|
66351
|
-
children: jsxRuntime.jsx("path", {
|
|
66352
|
-
d: "M221.009 20.167C224.17 22.8539 225.861 25.6847 225.861 28.6104C225.861 45.9462 166.533 60 93.3477 60C20.1622 60 -39.167 45.9462 -39.167 28.6104C-39.1668 25.6847 -37.4754 22.8539 -34.3145 20.167C-18.7449 33.4011 32.5139 43.1123 93.3477 43.1123C154.181 43.1123 205.439 33.401 221.009 20.167Z",
|
|
66353
|
-
fill: "#2BCFA1"
|
|
66354
|
-
})
|
|
66355
|
-
}), jsxRuntime.jsx("g", {
|
|
66356
|
-
style: {
|
|
66357
|
-
mixBlendMode: "color-dodge"
|
|
66358
|
-
},
|
|
66359
|
-
filter: "url(#filter1_f_ai_overlay)",
|
|
66360
|
-
children: jsxRuntime.jsx("path", {
|
|
66361
|
-
d: "M229.808 46.167C233.191 47.0105 234.999 47.8979 235 48.8164C235 54.2565 171.58 58.667 93.3474 58.667C15.1147 58.667 -48.3049 54.2565 -48.3049 48.8164C-48.3045 47.8979 -46.4965 47.0105 -43.1145 46.167C-26.4654 50.3193 28.3245 53.3672 93.3474 53.3672C158.369 53.3672 213.158 50.3192 229.808 46.167Z",
|
|
66362
|
-
fill: "white"
|
|
66363
|
-
})
|
|
66364
|
-
}), jsxRuntime.jsx("g", {
|
|
66365
|
-
style: {
|
|
66366
|
-
mixBlendMode: "plus-lighter"
|
|
66367
|
-
},
|
|
66368
|
-
filter: "url(#filter2_f_ai_overlay)",
|
|
66369
|
-
children: jsxRuntime.jsx("path", {
|
|
66370
|
-
d: "M200.885 39.5C203.548 40.8829 204.972 42.3399 204.972 43.8457C204.972 52.7675 154.996 60 93.3469 60C31.6984 60 -18.2778 52.7675 -18.2781 43.8457C-18.2781 42.3401 -16.8545 40.8827 -14.1921 39.5C-1.07789 46.3111 42.1018 51.3086 93.3469 51.3086C144.591 51.3086 187.769 46.3108 200.885 39.5Z",
|
|
66371
|
-
fill: "white"
|
|
66372
|
-
})
|
|
66373
|
-
})]
|
|
66374
|
-
}), jsxRuntime.jsxs("defs", {
|
|
66375
|
-
children: [jsxRuntime.jsxs("filter", {
|
|
66376
|
-
id: "filter0_f_ai_overlay",
|
|
66377
|
-
x: "-58.067",
|
|
66378
|
-
y: "1.26699",
|
|
66379
|
-
width: "302.828",
|
|
66380
|
-
height: "77.633",
|
|
66381
|
-
filterUnits: "userSpaceOnUse",
|
|
66382
|
-
colorInterpolationFilters: "sRGB",
|
|
66383
|
-
children: [jsxRuntime.jsx("feFlood", {
|
|
66384
|
-
floodOpacity: "0",
|
|
66385
|
-
result: "BackgroundImageFix"
|
|
66386
|
-
}), jsxRuntime.jsx("feBlend", {
|
|
66387
|
-
mode: "normal",
|
|
66388
|
-
"in": "SourceGraphic",
|
|
66389
|
-
in2: "BackgroundImageFix",
|
|
66390
|
-
result: "shape"
|
|
66391
|
-
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
66392
|
-
stdDeviation: "9.45",
|
|
66393
|
-
result: "effect1_foregroundBlur_ai_overlay"
|
|
66394
|
-
})]
|
|
66395
|
-
}), jsxRuntime.jsxs("filter", {
|
|
66396
|
-
id: "filter1_f_ai_overlay",
|
|
66397
|
-
x: "-61.1716",
|
|
66398
|
-
y: "33.3003",
|
|
66399
|
-
width: "309.038",
|
|
66400
|
-
height: "38.2333",
|
|
66401
|
-
filterUnits: "userSpaceOnUse",
|
|
66402
|
-
colorInterpolationFilters: "sRGB",
|
|
66403
|
-
children: [jsxRuntime.jsx("feFlood", {
|
|
66404
|
-
floodOpacity: "0",
|
|
66405
|
-
result: "BackgroundImageFix"
|
|
66406
|
-
}), jsxRuntime.jsx("feBlend", {
|
|
66407
|
-
mode: "normal",
|
|
66408
|
-
"in": "SourceGraphic",
|
|
66409
|
-
in2: "BackgroundImageFix",
|
|
66410
|
-
result: "shape"
|
|
66411
|
-
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
66412
|
-
stdDeviation: "6.43333",
|
|
66413
|
-
result: "effect1_foregroundBlur_ai_overlay"
|
|
66414
|
-
})]
|
|
66415
|
-
}), jsxRuntime.jsxs("filter", {
|
|
66416
|
-
id: "filter2_f_ai_overlay",
|
|
66417
|
-
x: "-30.5781",
|
|
66418
|
-
y: "27.2",
|
|
66419
|
-
width: "247.85",
|
|
66420
|
-
height: "45.1",
|
|
66421
|
-
filterUnits: "userSpaceOnUse",
|
|
66422
|
-
colorInterpolationFilters: "sRGB",
|
|
66423
|
-
children: [jsxRuntime.jsx("feFlood", {
|
|
66424
|
-
floodOpacity: "0",
|
|
66425
|
-
result: "BackgroundImageFix"
|
|
66426
|
-
}), jsxRuntime.jsx("feBlend", {
|
|
66427
|
-
mode: "normal",
|
|
66428
|
-
"in": "SourceGraphic",
|
|
66429
|
-
in2: "BackgroundImageFix",
|
|
66430
|
-
result: "shape"
|
|
66431
|
-
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
66432
|
-
stdDeviation: "6.15",
|
|
66433
|
-
result: "effect1_foregroundBlur_ai_overlay"
|
|
66434
|
-
})]
|
|
66435
|
-
}), jsxRuntime.jsxs("radialGradient", {
|
|
66436
|
-
id: "paint0_radial_ai_overlay",
|
|
66437
|
-
cx: "0",
|
|
66438
|
-
cy: "0",
|
|
66439
|
-
r: "1",
|
|
66440
|
-
gradientUnits: "userSpaceOnUse",
|
|
66441
|
-
gradientTransform: "translate(94 -5.33333) rotate(90) scale(70.8333 150.489)",
|
|
66442
|
-
children: [jsxRuntime.jsx("stop", {
|
|
66443
|
-
offset: "0.707302",
|
|
66444
|
-
stopOpacity: "0"
|
|
66445
|
-
}), jsxRuntime.jsx("stop", {
|
|
66446
|
-
offset: "0.897964",
|
|
66447
|
-
stopColor: "#2BCFA1"
|
|
66448
|
-
})]
|
|
66449
|
-
}), jsxRuntime.jsx("clipPath", {
|
|
66450
|
-
id: "clip0_ai_overlay",
|
|
66451
|
-
children: jsxRuntime.jsx("rect", {
|
|
66452
|
-
width: "188",
|
|
66453
|
-
height: "48",
|
|
66454
|
-
rx: "12",
|
|
66455
|
-
fill: "white"
|
|
66456
|
-
})
|
|
66457
|
-
})]
|
|
66458
|
-
})]
|
|
66459
|
-
})
|
|
66460
|
-
})]
|
|
66461
|
-
});
|
|
66462
|
-
}
|
|
66463
|
-
|
|
66464
|
-
function FloatingChatButton(_ref) {
|
|
66465
|
-
var onClick = _ref.onClick,
|
|
66466
|
-
_ref$isVisible = _ref.isVisible,
|
|
66467
|
-
isVisible = _ref$isVisible === void 0 ? true : _ref$isVisible;
|
|
66468
|
-
if (!isVisible) return null;
|
|
66469
|
-
return jsxRuntime.jsxs(Chakra.Box, {
|
|
66470
|
-
position: "fixed",
|
|
66471
|
-
bottom: 6,
|
|
66472
|
-
right: 6,
|
|
66473
|
-
zIndex: 1000,
|
|
66474
|
-
onClick: onClick,
|
|
66475
|
-
cursor: "pointer",
|
|
66476
|
-
css: {
|
|
66477
|
-
"&:hover .animated-bg": {
|
|
66478
|
-
transform: "scale(1)"
|
|
66479
|
-
},
|
|
66480
|
-
"&:hover .text-label": {
|
|
66481
|
-
color: "black"
|
|
66482
|
-
}
|
|
66483
|
-
},
|
|
66484
|
-
children: [jsxRuntime.jsx(Chakra.Box, {
|
|
66485
|
-
position: "absolute",
|
|
66486
|
-
inset: 0,
|
|
66487
|
-
borderRadius: "32px",
|
|
66488
|
-
bg: "rgba(43, 207, 161, 0.2)",
|
|
66489
|
-
border: "1px solid rgba(43, 207, 161, 0.10)",
|
|
66490
|
-
backdropFilter: "blur(24px)",
|
|
66491
|
-
transition: "all 0.2s"
|
|
66492
|
-
}), jsxRuntime.jsx(Chakra.Box, {
|
|
66493
|
-
className: "animated-bg",
|
|
66494
|
-
position: "absolute",
|
|
66495
|
-
inset: 0,
|
|
66496
|
-
borderRadius: "32px",
|
|
66497
|
-
bg: "#2BCFA1",
|
|
66498
|
-
transform: "scale(0)",
|
|
66499
|
-
transformOrigin: "20px center",
|
|
66500
|
-
transition: "transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
66501
|
-
}), jsxRuntime.jsxs(Chakra.Flex, {
|
|
66502
|
-
display: "inline-flex",
|
|
66503
|
-
justifyContent: "flex-start",
|
|
66504
|
-
alignItems: "center",
|
|
66505
|
-
position: "relative",
|
|
66506
|
-
zIndex: 1,
|
|
66507
|
-
pl: 1,
|
|
66508
|
-
pr: 4,
|
|
66509
|
-
py: 1,
|
|
66510
|
-
gap: 2,
|
|
66511
|
-
children: [jsxRuntime.jsx(Chakra.Box, {
|
|
66512
|
-
position: "absolute",
|
|
66513
|
-
left: "4px",
|
|
66514
|
-
top: "4px",
|
|
66515
|
-
w: "32px",
|
|
66516
|
-
h: "32px",
|
|
66517
|
-
borderRadius: "24px",
|
|
66518
|
-
bg: "#2BCFA1"
|
|
66519
|
-
}), jsxRuntime.jsx(Chakra.Flex, {
|
|
66520
|
-
justifyContent: "center",
|
|
66521
|
-
alignItems: "center",
|
|
66522
|
-
position: "relative",
|
|
66523
|
-
zIndex: 1,
|
|
66524
|
-
w: "32px",
|
|
66525
|
-
h: "32px",
|
|
66526
|
-
p: 2,
|
|
66527
|
-
borderRadius: "24px",
|
|
66528
|
-
bg: "#2BCFA1",
|
|
66529
|
-
children: jsxRuntime.jsx(AIMd, {
|
|
66530
|
-
color: "black"
|
|
66531
|
-
})
|
|
66532
|
-
}), jsxRuntime.jsx(Chakra.Text, {
|
|
66533
|
-
className: "text-label",
|
|
66534
|
-
position: "relative",
|
|
66535
|
-
zIndex: 1,
|
|
66536
|
-
color: "white",
|
|
66537
|
-
fontSize: "sm",
|
|
66538
|
-
fontWeight: "medium",
|
|
66539
|
-
lineHeight: "tight",
|
|
66540
|
-
transition: "color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
66541
|
-
children: "AI Assistant"
|
|
66542
|
-
})]
|
|
66543
|
-
})]
|
|
66544
|
-
});
|
|
66545
|
-
}
|
|
66546
|
-
|
|
66547
66279
|
function Chatbot(_ref) {
|
|
66548
|
-
var _useBreakpointValue;
|
|
66549
66280
|
var apiBaseUrl = _ref.apiBaseUrl,
|
|
66550
66281
|
apiKey = _ref.apiKey,
|
|
66551
|
-
_ref$buttonType = _ref.buttonType,
|
|
66552
|
-
buttonType = _ref$buttonType === void 0 ? "floating" : _ref$buttonType,
|
|
66553
66282
|
_ref$user = _ref.user,
|
|
66554
|
-
initialUser = _ref$user === void 0 ? null : _ref$user
|
|
66283
|
+
initialUser = _ref$user === void 0 ? null : _ref$user,
|
|
66284
|
+
drawerTrigger = _ref.drawerTrigger;
|
|
66555
66285
|
var _useDisclosure = Chakra.useDisclosure(),
|
|
66556
66286
|
isOpen = _useDisclosure.isOpen,
|
|
66557
66287
|
onOpen = _useDisclosure.onOpen,
|
|
@@ -66576,17 +66306,8 @@ function Chatbot(_ref) {
|
|
|
66576
66306
|
handleSendMessage = _useChatbot.handleSendMessage,
|
|
66577
66307
|
handleRetryLastMessage = _useChatbot.handleRetryLastMessage,
|
|
66578
66308
|
clearProcessingMessageId = _useChatbot.clearProcessingMessageId;
|
|
66579
|
-
var showIconOnly = (_useBreakpointValue = Chakra.useBreakpointValue({
|
|
66580
|
-
base: true,
|
|
66581
|
-
md: false
|
|
66582
|
-
})) !== null && _useBreakpointValue !== void 0 ? _useBreakpointValue : false;
|
|
66583
66309
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
66584
|
-
children: [
|
|
66585
|
-
onClick: onOpen
|
|
66586
|
-
}) : jsxRuntime.jsx(EmbeddedChatButton, {
|
|
66587
|
-
showIconOnly: showIconOnly,
|
|
66588
|
-
onClick: onOpen
|
|
66589
|
-
}), jsxRuntime.jsxs(ChatDrawer, {
|
|
66310
|
+
children: [drawerTrigger(onOpen), jsxRuntime.jsxs(ChatDrawer, {
|
|
66590
66311
|
isOpen: isOpen,
|
|
66591
66312
|
onClose: onClose,
|
|
66592
66313
|
currentView: currentView,
|
|
@@ -66630,13 +66351,11 @@ exports.ChatHeader = ChatHeader;
|
|
|
66630
66351
|
exports.ChatPage = ChatPage;
|
|
66631
66352
|
exports.Chatbot = Chatbot;
|
|
66632
66353
|
exports.ChatbotAPI = ChatbotAPI;
|
|
66633
|
-
exports.FloatingChatButton = FloatingChatButton;
|
|
66634
66354
|
exports.GradualMessageDisplay = GradualMessageDisplay;
|
|
66635
66355
|
exports.HelloPage = HelloPage;
|
|
66636
66356
|
exports.MarkdownRenderer = MarkdownRenderer;
|
|
66637
66357
|
exports.MessageInput = MessageInput;
|
|
66638
66358
|
exports.MessageList = MessageList;
|
|
66639
|
-
exports.SolidChatButton = EmbeddedChatButton;
|
|
66640
66359
|
exports.TypingIndicator = TypingIndicator;
|
|
66641
66360
|
exports.formatTimestamp = formatTimestamp;
|
|
66642
66361
|
exports.generateMessageId = generateMessageId;
|