droplinked-chatbot-next 1.0.6 → 1.0.8
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/Chatbot.d.ts +2 -2
- package/dist/components/EmbeddedChatButton.d.ts +2 -1
- package/dist/index.d.ts +9 -11
- package/dist/index.esm.js +4 -276
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -277
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -66276,280 +66276,12 @@ function ChatHeader(_ref) {
|
|
|
66276
66276
|
});
|
|
66277
66277
|
}
|
|
66278
66278
|
|
|
66279
|
-
function EmbeddedChatButton(_ref) {
|
|
66280
|
-
var onClick = _ref.onClick;
|
|
66281
|
-
return jsxRuntime.jsxs(Chakra.Button, {
|
|
66282
|
-
onClick: onClick,
|
|
66283
|
-
bg: "transparent",
|
|
66284
|
-
color: "white",
|
|
66285
|
-
borderRadius: "12px",
|
|
66286
|
-
px: "12px",
|
|
66287
|
-
py: "8px",
|
|
66288
|
-
h: "36px",
|
|
66289
|
-
minW: "36px",
|
|
66290
|
-
fontWeight: "500",
|
|
66291
|
-
fontSize: "14px",
|
|
66292
|
-
lineHeight: "20px",
|
|
66293
|
-
transition: "all 0.2s ease-in-out",
|
|
66294
|
-
position: "relative",
|
|
66295
|
-
overflow: "hidden",
|
|
66296
|
-
leftIcon: jsxRuntime.jsx(AIMd, {
|
|
66297
|
-
color: "currentColor"
|
|
66298
|
-
}),
|
|
66299
|
-
_hover: {
|
|
66300
|
-
bg: "#2BCFA1",
|
|
66301
|
-
color: "#FFFFFF"
|
|
66302
|
-
},
|
|
66303
|
-
_active: {
|
|
66304
|
-
bg: "#26B894",
|
|
66305
|
-
color: "#FFFFFF"
|
|
66306
|
-
},
|
|
66307
|
-
_focus: {
|
|
66308
|
-
boxShadow: "none"
|
|
66309
|
-
},
|
|
66310
|
-
_focusVisible: {
|
|
66311
|
-
boxShadow: "0 0 0 2px rgba(43, 207, 161, 0.3)"
|
|
66312
|
-
},
|
|
66313
|
-
children: ["AI Assistant", jsxRuntime.jsx(Chakra.Box, {
|
|
66314
|
-
position: "absolute",
|
|
66315
|
-
bottom: 0,
|
|
66316
|
-
left: 0,
|
|
66317
|
-
right: 0,
|
|
66318
|
-
width: "100%",
|
|
66319
|
-
height: "36px",
|
|
66320
|
-
pointerEvents: "none",
|
|
66321
|
-
opacity: 0,
|
|
66322
|
-
transition: "opacity 0.2s ease-in-out",
|
|
66323
|
-
sx: {
|
|
66324
|
-
'.chakra-button:hover &': {
|
|
66325
|
-
opacity: 1
|
|
66326
|
-
},
|
|
66327
|
-
'.chakra-button:active &': {
|
|
66328
|
-
opacity: 1
|
|
66329
|
-
}
|
|
66330
|
-
},
|
|
66331
|
-
children: jsxRuntime.jsxs("svg", {
|
|
66332
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
66333
|
-
width: "100%",
|
|
66334
|
-
height: "100%",
|
|
66335
|
-
viewBox: "0 0 188 48",
|
|
66336
|
-
fill: "none",
|
|
66337
|
-
preserveAspectRatio: "none",
|
|
66338
|
-
children: [jsxRuntime.jsxs("g", {
|
|
66339
|
-
clipPath: "url(#clip0_ai_overlay)",
|
|
66340
|
-
children: [jsxRuntime.jsx("rect", {
|
|
66341
|
-
width: "188",
|
|
66342
|
-
height: "48",
|
|
66343
|
-
rx: "12",
|
|
66344
|
-
fill: "url(#paint0_radial_ai_overlay)"
|
|
66345
|
-
}), jsxRuntime.jsx("g", {
|
|
66346
|
-
style: {
|
|
66347
|
-
mixBlendMode: "hard-light"
|
|
66348
|
-
},
|
|
66349
|
-
filter: "url(#filter0_f_ai_overlay)",
|
|
66350
|
-
children: jsxRuntime.jsx("path", {
|
|
66351
|
-
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",
|
|
66352
|
-
fill: "#2BCFA1"
|
|
66353
|
-
})
|
|
66354
|
-
}), jsxRuntime.jsx("g", {
|
|
66355
|
-
style: {
|
|
66356
|
-
mixBlendMode: "color-dodge"
|
|
66357
|
-
},
|
|
66358
|
-
filter: "url(#filter1_f_ai_overlay)",
|
|
66359
|
-
children: jsxRuntime.jsx("path", {
|
|
66360
|
-
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",
|
|
66361
|
-
fill: "white"
|
|
66362
|
-
})
|
|
66363
|
-
}), jsxRuntime.jsx("g", {
|
|
66364
|
-
style: {
|
|
66365
|
-
mixBlendMode: "plus-lighter"
|
|
66366
|
-
},
|
|
66367
|
-
filter: "url(#filter2_f_ai_overlay)",
|
|
66368
|
-
children: jsxRuntime.jsx("path", {
|
|
66369
|
-
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",
|
|
66370
|
-
fill: "white"
|
|
66371
|
-
})
|
|
66372
|
-
})]
|
|
66373
|
-
}), jsxRuntime.jsxs("defs", {
|
|
66374
|
-
children: [jsxRuntime.jsxs("filter", {
|
|
66375
|
-
id: "filter0_f_ai_overlay",
|
|
66376
|
-
x: "-58.067",
|
|
66377
|
-
y: "1.26699",
|
|
66378
|
-
width: "302.828",
|
|
66379
|
-
height: "77.633",
|
|
66380
|
-
filterUnits: "userSpaceOnUse",
|
|
66381
|
-
colorInterpolationFilters: "sRGB",
|
|
66382
|
-
children: [jsxRuntime.jsx("feFlood", {
|
|
66383
|
-
floodOpacity: "0",
|
|
66384
|
-
result: "BackgroundImageFix"
|
|
66385
|
-
}), jsxRuntime.jsx("feBlend", {
|
|
66386
|
-
mode: "normal",
|
|
66387
|
-
"in": "SourceGraphic",
|
|
66388
|
-
in2: "BackgroundImageFix",
|
|
66389
|
-
result: "shape"
|
|
66390
|
-
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
66391
|
-
stdDeviation: "9.45",
|
|
66392
|
-
result: "effect1_foregroundBlur_ai_overlay"
|
|
66393
|
-
})]
|
|
66394
|
-
}), jsxRuntime.jsxs("filter", {
|
|
66395
|
-
id: "filter1_f_ai_overlay",
|
|
66396
|
-
x: "-61.1716",
|
|
66397
|
-
y: "33.3003",
|
|
66398
|
-
width: "309.038",
|
|
66399
|
-
height: "38.2333",
|
|
66400
|
-
filterUnits: "userSpaceOnUse",
|
|
66401
|
-
colorInterpolationFilters: "sRGB",
|
|
66402
|
-
children: [jsxRuntime.jsx("feFlood", {
|
|
66403
|
-
floodOpacity: "0",
|
|
66404
|
-
result: "BackgroundImageFix"
|
|
66405
|
-
}), jsxRuntime.jsx("feBlend", {
|
|
66406
|
-
mode: "normal",
|
|
66407
|
-
"in": "SourceGraphic",
|
|
66408
|
-
in2: "BackgroundImageFix",
|
|
66409
|
-
result: "shape"
|
|
66410
|
-
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
66411
|
-
stdDeviation: "6.43333",
|
|
66412
|
-
result: "effect1_foregroundBlur_ai_overlay"
|
|
66413
|
-
})]
|
|
66414
|
-
}), jsxRuntime.jsxs("filter", {
|
|
66415
|
-
id: "filter2_f_ai_overlay",
|
|
66416
|
-
x: "-30.5781",
|
|
66417
|
-
y: "27.2",
|
|
66418
|
-
width: "247.85",
|
|
66419
|
-
height: "45.1",
|
|
66420
|
-
filterUnits: "userSpaceOnUse",
|
|
66421
|
-
colorInterpolationFilters: "sRGB",
|
|
66422
|
-
children: [jsxRuntime.jsx("feFlood", {
|
|
66423
|
-
floodOpacity: "0",
|
|
66424
|
-
result: "BackgroundImageFix"
|
|
66425
|
-
}), jsxRuntime.jsx("feBlend", {
|
|
66426
|
-
mode: "normal",
|
|
66427
|
-
"in": "SourceGraphic",
|
|
66428
|
-
in2: "BackgroundImageFix",
|
|
66429
|
-
result: "shape"
|
|
66430
|
-
}), jsxRuntime.jsx("feGaussianBlur", {
|
|
66431
|
-
stdDeviation: "6.15",
|
|
66432
|
-
result: "effect1_foregroundBlur_ai_overlay"
|
|
66433
|
-
})]
|
|
66434
|
-
}), jsxRuntime.jsxs("radialGradient", {
|
|
66435
|
-
id: "paint0_radial_ai_overlay",
|
|
66436
|
-
cx: "0",
|
|
66437
|
-
cy: "0",
|
|
66438
|
-
r: "1",
|
|
66439
|
-
gradientUnits: "userSpaceOnUse",
|
|
66440
|
-
gradientTransform: "translate(94 -5.33333) rotate(90) scale(70.8333 150.489)",
|
|
66441
|
-
children: [jsxRuntime.jsx("stop", {
|
|
66442
|
-
offset: "0.707302",
|
|
66443
|
-
stopOpacity: "0"
|
|
66444
|
-
}), jsxRuntime.jsx("stop", {
|
|
66445
|
-
offset: "0.897964",
|
|
66446
|
-
stopColor: "#2BCFA1"
|
|
66447
|
-
})]
|
|
66448
|
-
}), jsxRuntime.jsx("clipPath", {
|
|
66449
|
-
id: "clip0_ai_overlay",
|
|
66450
|
-
children: jsxRuntime.jsx("rect", {
|
|
66451
|
-
width: "188",
|
|
66452
|
-
height: "48",
|
|
66453
|
-
rx: "12",
|
|
66454
|
-
fill: "white"
|
|
66455
|
-
})
|
|
66456
|
-
})]
|
|
66457
|
-
})]
|
|
66458
|
-
})
|
|
66459
|
-
})]
|
|
66460
|
-
});
|
|
66461
|
-
}
|
|
66462
|
-
|
|
66463
|
-
function FloatingChatButton(_ref) {
|
|
66464
|
-
var onClick = _ref.onClick,
|
|
66465
|
-
_ref$isVisible = _ref.isVisible,
|
|
66466
|
-
isVisible = _ref$isVisible === void 0 ? true : _ref$isVisible;
|
|
66467
|
-
if (!isVisible) return null;
|
|
66468
|
-
return jsxRuntime.jsxs(Chakra.Box, {
|
|
66469
|
-
position: "fixed",
|
|
66470
|
-
bottom: 6,
|
|
66471
|
-
right: 6,
|
|
66472
|
-
zIndex: 1000,
|
|
66473
|
-
onClick: onClick,
|
|
66474
|
-
cursor: "pointer",
|
|
66475
|
-
css: {
|
|
66476
|
-
"&:hover .animated-bg": {
|
|
66477
|
-
transform: "scale(1)"
|
|
66478
|
-
},
|
|
66479
|
-
"&:hover .text-label": {
|
|
66480
|
-
color: "black"
|
|
66481
|
-
}
|
|
66482
|
-
},
|
|
66483
|
-
children: [jsxRuntime.jsx(Chakra.Box, {
|
|
66484
|
-
position: "absolute",
|
|
66485
|
-
inset: 0,
|
|
66486
|
-
borderRadius: "32px",
|
|
66487
|
-
bg: "rgba(43, 207, 161, 0.2)",
|
|
66488
|
-
border: "1px solid rgba(43, 207, 161, 0.10)",
|
|
66489
|
-
backdropFilter: "blur(24px)",
|
|
66490
|
-
transition: "all 0.2s"
|
|
66491
|
-
}), jsxRuntime.jsx(Chakra.Box, {
|
|
66492
|
-
className: "animated-bg",
|
|
66493
|
-
position: "absolute",
|
|
66494
|
-
inset: 0,
|
|
66495
|
-
borderRadius: "32px",
|
|
66496
|
-
bg: "#2BCFA1",
|
|
66497
|
-
transform: "scale(0)",
|
|
66498
|
-
transformOrigin: "20px center",
|
|
66499
|
-
transition: "transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)"
|
|
66500
|
-
}), jsxRuntime.jsxs(Chakra.Flex, {
|
|
66501
|
-
display: "inline-flex",
|
|
66502
|
-
justifyContent: "flex-start",
|
|
66503
|
-
alignItems: "center",
|
|
66504
|
-
position: "relative",
|
|
66505
|
-
zIndex: 1,
|
|
66506
|
-
pl: 1,
|
|
66507
|
-
pr: 4,
|
|
66508
|
-
py: 1,
|
|
66509
|
-
gap: 2,
|
|
66510
|
-
children: [jsxRuntime.jsx(Chakra.Box, {
|
|
66511
|
-
position: "absolute",
|
|
66512
|
-
left: "4px",
|
|
66513
|
-
top: "4px",
|
|
66514
|
-
w: "32px",
|
|
66515
|
-
h: "32px",
|
|
66516
|
-
borderRadius: "24px",
|
|
66517
|
-
bg: "#2BCFA1"
|
|
66518
|
-
}), jsxRuntime.jsx(Chakra.Flex, {
|
|
66519
|
-
justifyContent: "center",
|
|
66520
|
-
alignItems: "center",
|
|
66521
|
-
position: "relative",
|
|
66522
|
-
zIndex: 1,
|
|
66523
|
-
w: "32px",
|
|
66524
|
-
h: "32px",
|
|
66525
|
-
p: 2,
|
|
66526
|
-
borderRadius: "24px",
|
|
66527
|
-
bg: "#2BCFA1",
|
|
66528
|
-
children: jsxRuntime.jsx(AIMd, {
|
|
66529
|
-
color: "black"
|
|
66530
|
-
})
|
|
66531
|
-
}), jsxRuntime.jsx(Chakra.Text, {
|
|
66532
|
-
className: "text-label",
|
|
66533
|
-
position: "relative",
|
|
66534
|
-
zIndex: 1,
|
|
66535
|
-
color: "white",
|
|
66536
|
-
fontSize: "sm",
|
|
66537
|
-
fontWeight: "medium",
|
|
66538
|
-
lineHeight: "tight",
|
|
66539
|
-
transition: "color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
66540
|
-
children: "AI Assistant"
|
|
66541
|
-
})]
|
|
66542
|
-
})]
|
|
66543
|
-
});
|
|
66544
|
-
}
|
|
66545
|
-
|
|
66546
66279
|
function Chatbot(_ref) {
|
|
66547
66280
|
var apiBaseUrl = _ref.apiBaseUrl,
|
|
66548
66281
|
apiKey = _ref.apiKey,
|
|
66549
|
-
_ref$buttonType = _ref.buttonType,
|
|
66550
|
-
buttonType = _ref$buttonType === void 0 ? "floating" : _ref$buttonType,
|
|
66551
66282
|
_ref$user = _ref.user,
|
|
66552
|
-
initialUser = _ref$user === void 0 ? null : _ref$user
|
|
66283
|
+
initialUser = _ref$user === void 0 ? null : _ref$user,
|
|
66284
|
+
drawerTrigger = _ref.drawerTrigger;
|
|
66553
66285
|
var _useDisclosure = Chakra.useDisclosure(),
|
|
66554
66286
|
isOpen = _useDisclosure.isOpen,
|
|
66555
66287
|
onOpen = _useDisclosure.onOpen,
|
|
@@ -66575,11 +66307,7 @@ function Chatbot(_ref) {
|
|
|
66575
66307
|
handleRetryLastMessage = _useChatbot.handleRetryLastMessage,
|
|
66576
66308
|
clearProcessingMessageId = _useChatbot.clearProcessingMessageId;
|
|
66577
66309
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
66578
|
-
children: [
|
|
66579
|
-
onClick: onOpen
|
|
66580
|
-
}) : jsxRuntime.jsx(EmbeddedChatButton, {
|
|
66581
|
-
onClick: onOpen
|
|
66582
|
-
}), jsxRuntime.jsxs(ChatDrawer, {
|
|
66310
|
+
children: [drawerTrigger(onOpen), jsxRuntime.jsxs(ChatDrawer, {
|
|
66583
66311
|
isOpen: isOpen,
|
|
66584
66312
|
onClose: onClose,
|
|
66585
66313
|
currentView: currentView,
|
|
@@ -66623,13 +66351,11 @@ exports.ChatHeader = ChatHeader;
|
|
|
66623
66351
|
exports.ChatPage = ChatPage;
|
|
66624
66352
|
exports.Chatbot = Chatbot;
|
|
66625
66353
|
exports.ChatbotAPI = ChatbotAPI;
|
|
66626
|
-
exports.FloatingChatButton = FloatingChatButton;
|
|
66627
66354
|
exports.GradualMessageDisplay = GradualMessageDisplay;
|
|
66628
66355
|
exports.HelloPage = HelloPage;
|
|
66629
66356
|
exports.MarkdownRenderer = MarkdownRenderer;
|
|
66630
66357
|
exports.MessageInput = MessageInput;
|
|
66631
66358
|
exports.MessageList = MessageList;
|
|
66632
|
-
exports.SolidChatButton = EmbeddedChatButton;
|
|
66633
66359
|
exports.TypingIndicator = TypingIndicator;
|
|
66634
66360
|
exports.formatTimestamp = formatTimestamp;
|
|
66635
66361
|
exports.generateMessageId = generateMessageId;
|