@supernal/interface-nextjs 1.0.16 → 1.0.18
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.js +6 -8
- package/dist/index.mjs +6 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -876,8 +876,6 @@ var ChatBubble = ({
|
|
|
876
876
|
const maxHeightVh = 80;
|
|
877
877
|
const dynamicHeight = `min(${maxHeightVh}vh, 700px)`;
|
|
878
878
|
const panelWidth = "min(650px, calc(100vw - 2rem))";
|
|
879
|
-
const glassClasses = glassMode ? "backdrop-blur-xl bg-white/70 dark:bg-gray-900/70 border border-white/20 dark:border-white/10" : "bg-white dark:bg-gray-900 border-gray-200";
|
|
880
|
-
const glassGradient = glassMode ? "bg-gradient-to-br from-white/90 via-white/70 to-white/50 dark:from-gray-900/80 dark:via-gray-900/70 dark:to-gray-900/60" : "bg-white dark:bg-gray-900";
|
|
881
879
|
if (variant === "floating") {
|
|
882
880
|
const recentMessage = messages[messages.length - 1];
|
|
883
881
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -889,7 +887,7 @@ var ChatBubble = ({
|
|
|
889
887
|
...!isDragging && { transition: "transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)" }
|
|
890
888
|
},
|
|
891
889
|
onMouseDown: handlePanelMouseDown,
|
|
892
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className:
|
|
890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: glassMode ? "backdrop-blur-xl bg-white/70 dark:bg-gray-900/70 border border-white/20 dark:border-white/10 rounded-2xl shadow-2xl p-3 max-w-xs" : "bg-white dark:bg-gray-900 border-gray-200 rounded-2xl shadow-2xl border p-3 max-w-xs", children: [
|
|
893
891
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center justify-between mb-2", children: [
|
|
894
892
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex items-center space-x-2", children: [
|
|
895
893
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Avatar, { avatar: config.avatar, size: "small" }),
|
|
@@ -931,7 +929,7 @@ var ChatBubble = ({
|
|
|
931
929
|
onInputChange: setInputValue,
|
|
932
930
|
onSubmit: handleSend,
|
|
933
931
|
placeholder: config.placeholder,
|
|
934
|
-
glassClasses,
|
|
932
|
+
glassClasses: "",
|
|
935
933
|
theme,
|
|
936
934
|
sendButtonLabel: config.sendButtonLabel
|
|
937
935
|
}
|
|
@@ -953,7 +951,7 @@ var ChatBubble = ({
|
|
|
953
951
|
isExpanded && isMinimized && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
954
952
|
"div",
|
|
955
953
|
{
|
|
956
|
-
className:
|
|
954
|
+
className: glassMode ? "absolute backdrop-blur-xl bg-white/70 dark:bg-gray-900/70 border border-white/20 dark:border-white/10 rounded-3xl shadow-2xl p-4 transition-all duration-300" : "absolute bg-white dark:bg-gray-900 border-gray-200 rounded-3xl shadow-2xl border p-4 transition-all duration-300",
|
|
957
955
|
style: {
|
|
958
956
|
...dockClasses.panel,
|
|
959
957
|
width: panelWidth,
|
|
@@ -987,7 +985,7 @@ var ChatBubble = ({
|
|
|
987
985
|
onInputChange: setInputValue,
|
|
988
986
|
onSubmit: handleSend,
|
|
989
987
|
placeholder: config.placeholder,
|
|
990
|
-
glassClasses,
|
|
988
|
+
glassClasses: "",
|
|
991
989
|
theme,
|
|
992
990
|
sendButtonLabel: config.sendButtonLabel
|
|
993
991
|
}
|
|
@@ -999,7 +997,7 @@ var ChatBubble = ({
|
|
|
999
997
|
"div",
|
|
1000
998
|
{
|
|
1001
999
|
ref: panelRef,
|
|
1002
|
-
className: `${isDocked ? "absolute" : "fixed"} ${
|
|
1000
|
+
className: `${isDocked ? "absolute" : "fixed"} ${glassMode ? "bg-gradient-to-br from-white/90 via-white/70 to-white/50 dark:from-gray-900/80 dark:via-gray-900/70 dark:to-gray-900/60" : "bg-white dark:bg-gray-900"} rounded-3xl shadow-2xl border border-white/20 dark:border-white/10 backdrop-blur-xl flex flex-col overflow-hidden transition-all duration-300`,
|
|
1003
1001
|
style: {
|
|
1004
1002
|
width: panelWidth,
|
|
1005
1003
|
height: dynamicHeight,
|
|
@@ -1207,7 +1205,7 @@ var ChatBubble = ({
|
|
|
1207
1205
|
onInputChange: setInputValue,
|
|
1208
1206
|
onSubmit: handleSend,
|
|
1209
1207
|
placeholder: config.placeholder,
|
|
1210
|
-
glassClasses,
|
|
1208
|
+
glassClasses: "",
|
|
1211
1209
|
theme,
|
|
1212
1210
|
inputRef,
|
|
1213
1211
|
sendButtonLabel: config.sendButtonLabel
|
package/dist/index.mjs
CHANGED
|
@@ -835,8 +835,6 @@ var ChatBubble = ({
|
|
|
835
835
|
const maxHeightVh = 80;
|
|
836
836
|
const dynamicHeight = `min(${maxHeightVh}vh, 700px)`;
|
|
837
837
|
const panelWidth = "min(650px, calc(100vw - 2rem))";
|
|
838
|
-
const glassClasses = glassMode ? "backdrop-blur-xl bg-white/70 dark:bg-gray-900/70 border border-white/20 dark:border-white/10" : "bg-white dark:bg-gray-900 border-gray-200";
|
|
839
|
-
const glassGradient = glassMode ? "bg-gradient-to-br from-white/90 via-white/70 to-white/50 dark:from-gray-900/80 dark:via-gray-900/70 dark:to-gray-900/60" : "bg-white dark:bg-gray-900";
|
|
840
838
|
if (variant === "floating") {
|
|
841
839
|
const recentMessage = messages[messages.length - 1];
|
|
842
840
|
return /* @__PURE__ */ jsx3(
|
|
@@ -848,7 +846,7 @@ var ChatBubble = ({
|
|
|
848
846
|
...!isDragging && { transition: "transform 0.3s cubic-bezier(0.4, 0, 0.2, 1)" }
|
|
849
847
|
},
|
|
850
848
|
onMouseDown: handlePanelMouseDown,
|
|
851
|
-
children: /* @__PURE__ */ jsxs("div", { className:
|
|
849
|
+
children: /* @__PURE__ */ jsxs("div", { className: glassMode ? "backdrop-blur-xl bg-white/70 dark:bg-gray-900/70 border border-white/20 dark:border-white/10 rounded-2xl shadow-2xl p-3 max-w-xs" : "bg-white dark:bg-gray-900 border-gray-200 rounded-2xl shadow-2xl border p-3 max-w-xs", children: [
|
|
852
850
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
853
851
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
854
852
|
/* @__PURE__ */ jsx3(Avatar, { avatar: config.avatar, size: "small" }),
|
|
@@ -890,7 +888,7 @@ var ChatBubble = ({
|
|
|
890
888
|
onInputChange: setInputValue,
|
|
891
889
|
onSubmit: handleSend,
|
|
892
890
|
placeholder: config.placeholder,
|
|
893
|
-
glassClasses,
|
|
891
|
+
glassClasses: "",
|
|
894
892
|
theme,
|
|
895
893
|
sendButtonLabel: config.sendButtonLabel
|
|
896
894
|
}
|
|
@@ -912,7 +910,7 @@ var ChatBubble = ({
|
|
|
912
910
|
isExpanded && isMinimized && /* @__PURE__ */ jsxs(
|
|
913
911
|
"div",
|
|
914
912
|
{
|
|
915
|
-
className:
|
|
913
|
+
className: glassMode ? "absolute backdrop-blur-xl bg-white/70 dark:bg-gray-900/70 border border-white/20 dark:border-white/10 rounded-3xl shadow-2xl p-4 transition-all duration-300" : "absolute bg-white dark:bg-gray-900 border-gray-200 rounded-3xl shadow-2xl border p-4 transition-all duration-300",
|
|
916
914
|
style: {
|
|
917
915
|
...dockClasses.panel,
|
|
918
916
|
width: panelWidth,
|
|
@@ -946,7 +944,7 @@ var ChatBubble = ({
|
|
|
946
944
|
onInputChange: setInputValue,
|
|
947
945
|
onSubmit: handleSend,
|
|
948
946
|
placeholder: config.placeholder,
|
|
949
|
-
glassClasses,
|
|
947
|
+
glassClasses: "",
|
|
950
948
|
theme,
|
|
951
949
|
sendButtonLabel: config.sendButtonLabel
|
|
952
950
|
}
|
|
@@ -958,7 +956,7 @@ var ChatBubble = ({
|
|
|
958
956
|
"div",
|
|
959
957
|
{
|
|
960
958
|
ref: panelRef,
|
|
961
|
-
className: `${isDocked ? "absolute" : "fixed"} ${
|
|
959
|
+
className: `${isDocked ? "absolute" : "fixed"} ${glassMode ? "bg-gradient-to-br from-white/90 via-white/70 to-white/50 dark:from-gray-900/80 dark:via-gray-900/70 dark:to-gray-900/60" : "bg-white dark:bg-gray-900"} rounded-3xl shadow-2xl border border-white/20 dark:border-white/10 backdrop-blur-xl flex flex-col overflow-hidden transition-all duration-300`,
|
|
962
960
|
style: {
|
|
963
961
|
width: panelWidth,
|
|
964
962
|
height: dynamicHeight,
|
|
@@ -1166,7 +1164,7 @@ var ChatBubble = ({
|
|
|
1166
1164
|
onInputChange: setInputValue,
|
|
1167
1165
|
onSubmit: handleSend,
|
|
1168
1166
|
placeholder: config.placeholder,
|
|
1169
|
-
glassClasses,
|
|
1167
|
+
glassClasses: "",
|
|
1170
1168
|
theme,
|
|
1171
1169
|
inputRef,
|
|
1172
1170
|
sendButtonLabel: config.sendButtonLabel
|
package/package.json
CHANGED