@supernal/interface-nextjs 1.0.16 → 1.0.19
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 +13 -10
- package/dist/index.mjs +13 -10
- 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
|
}
|
|
@@ -946,14 +944,19 @@ var ChatBubble = ({
|
|
|
946
944
|
className: "fixed z-50",
|
|
947
945
|
style: {
|
|
948
946
|
...dockClasses.container,
|
|
949
|
-
|
|
950
|
-
|
|
947
|
+
...isExpanded ? {
|
|
948
|
+
width: panelWidth,
|
|
949
|
+
height: isMinimized ? "auto" : dynamicHeight
|
|
950
|
+
} : {
|
|
951
|
+
width: "auto",
|
|
952
|
+
height: "auto"
|
|
953
|
+
}
|
|
951
954
|
},
|
|
952
955
|
children: [
|
|
953
956
|
isExpanded && isMinimized && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
954
957
|
"div",
|
|
955
958
|
{
|
|
956
|
-
className:
|
|
959
|
+
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
960
|
style: {
|
|
958
961
|
...dockClasses.panel,
|
|
959
962
|
width: panelWidth,
|
|
@@ -987,7 +990,7 @@ var ChatBubble = ({
|
|
|
987
990
|
onInputChange: setInputValue,
|
|
988
991
|
onSubmit: handleSend,
|
|
989
992
|
placeholder: config.placeholder,
|
|
990
|
-
glassClasses,
|
|
993
|
+
glassClasses: "",
|
|
991
994
|
theme,
|
|
992
995
|
sendButtonLabel: config.sendButtonLabel
|
|
993
996
|
}
|
|
@@ -999,7 +1002,7 @@ var ChatBubble = ({
|
|
|
999
1002
|
"div",
|
|
1000
1003
|
{
|
|
1001
1004
|
ref: panelRef,
|
|
1002
|
-
className: `${isDocked ? "absolute" : "fixed"} ${
|
|
1005
|
+
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
1006
|
style: {
|
|
1004
1007
|
width: panelWidth,
|
|
1005
1008
|
height: dynamicHeight,
|
|
@@ -1207,7 +1210,7 @@ var ChatBubble = ({
|
|
|
1207
1210
|
onInputChange: setInputValue,
|
|
1208
1211
|
onSubmit: handleSend,
|
|
1209
1212
|
placeholder: config.placeholder,
|
|
1210
|
-
glassClasses,
|
|
1213
|
+
glassClasses: "",
|
|
1211
1214
|
theme,
|
|
1212
1215
|
inputRef,
|
|
1213
1216
|
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
|
}
|
|
@@ -905,14 +903,19 @@ var ChatBubble = ({
|
|
|
905
903
|
className: "fixed z-50",
|
|
906
904
|
style: {
|
|
907
905
|
...dockClasses.container,
|
|
908
|
-
|
|
909
|
-
|
|
906
|
+
...isExpanded ? {
|
|
907
|
+
width: panelWidth,
|
|
908
|
+
height: isMinimized ? "auto" : dynamicHeight
|
|
909
|
+
} : {
|
|
910
|
+
width: "auto",
|
|
911
|
+
height: "auto"
|
|
912
|
+
}
|
|
910
913
|
},
|
|
911
914
|
children: [
|
|
912
915
|
isExpanded && isMinimized && /* @__PURE__ */ jsxs(
|
|
913
916
|
"div",
|
|
914
917
|
{
|
|
915
|
-
className:
|
|
918
|
+
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
919
|
style: {
|
|
917
920
|
...dockClasses.panel,
|
|
918
921
|
width: panelWidth,
|
|
@@ -946,7 +949,7 @@ var ChatBubble = ({
|
|
|
946
949
|
onInputChange: setInputValue,
|
|
947
950
|
onSubmit: handleSend,
|
|
948
951
|
placeholder: config.placeholder,
|
|
949
|
-
glassClasses,
|
|
952
|
+
glassClasses: "",
|
|
950
953
|
theme,
|
|
951
954
|
sendButtonLabel: config.sendButtonLabel
|
|
952
955
|
}
|
|
@@ -958,7 +961,7 @@ var ChatBubble = ({
|
|
|
958
961
|
"div",
|
|
959
962
|
{
|
|
960
963
|
ref: panelRef,
|
|
961
|
-
className: `${isDocked ? "absolute" : "fixed"} ${
|
|
964
|
+
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
965
|
style: {
|
|
963
966
|
width: panelWidth,
|
|
964
967
|
height: dynamicHeight,
|
|
@@ -1166,7 +1169,7 @@ var ChatBubble = ({
|
|
|
1166
1169
|
onInputChange: setInputValue,
|
|
1167
1170
|
onSubmit: handleSend,
|
|
1168
1171
|
placeholder: config.placeholder,
|
|
1169
|
-
glassClasses,
|
|
1172
|
+
glassClasses: "",
|
|
1170
1173
|
theme,
|
|
1171
1174
|
inputRef,
|
|
1172
1175
|
sendButtonLabel: config.sendButtonLabel
|
package/package.json
CHANGED