@eshal-bot/chat-widget 0.1.48 → 0.1.49
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/chat-widget.esm.js +2 -2
- package/dist/chat-widget.js +10 -84
- package/dist/chat-widget.min.js +2 -2
- package/dist/chat-widget.umd.js +2 -2
- package/package.json +1 -1
package/dist/chat-widget.js
CHANGED
|
@@ -58869,88 +58869,6 @@
|
|
|
58869
58869
|
});
|
|
58870
58870
|
};
|
|
58871
58871
|
|
|
58872
|
-
const LOGO_MAX_HEIGHT = "3.5rem";
|
|
58873
|
-
const LOGO_MAX_HEIGHT_COMPACT = "2.5rem";
|
|
58874
|
-
const LOGO_MAX_WIDTH_DEFAULT = "4.5rem";
|
|
58875
|
-
const LOGO_MAX_WIDTH_DEFAULT_COMPACT = "3rem";
|
|
58876
|
-
const LOGO_MAX_WIDTH_WIDE = "9rem";
|
|
58877
|
-
const LOGO_MAX_WIDTH_WIDE_COMPACT = "5.5rem";
|
|
58878
|
-
const STATUS_DOT_SIZE = "0.8rem";
|
|
58879
|
-
const STATUS_DOT_SIZE_COMPACT = "0.65rem";
|
|
58880
|
-
const STATUS_DOT_BORDER_WIDTH = "2px";
|
|
58881
|
-
const STATUS_DOT_BORDER_WIDTH_COMPACT = "1.5px";
|
|
58882
|
-
const STATUS_DOT_DEFAULT_COLOR = "#34d399";
|
|
58883
|
-
const STATUS_DOT_OFFSET = "38%";
|
|
58884
|
-
const STATUS_DOT_OFFSET_COMPACT = "22%";
|
|
58885
|
-
const LogoImage = _ref => {
|
|
58886
|
-
let {
|
|
58887
|
-
src,
|
|
58888
|
-
showStatusDot = false,
|
|
58889
|
-
statusColor = STATUS_DOT_DEFAULT_COLOR,
|
|
58890
|
-
size = "default"
|
|
58891
|
-
} = _ref;
|
|
58892
|
-
const [aspect, setAspect] = reactExports.useState("square");
|
|
58893
|
-
const isCompact = size === "compact";
|
|
58894
|
-
reactExports.useEffect(() => {
|
|
58895
|
-
if (typeof window === "undefined" || !src) {
|
|
58896
|
-
return;
|
|
58897
|
-
}
|
|
58898
|
-
const img = new Image();
|
|
58899
|
-
img.src = src;
|
|
58900
|
-
img.onload = () => {
|
|
58901
|
-
if (img.width > img.height) {
|
|
58902
|
-
setAspect("wide");
|
|
58903
|
-
} else if (img.height > img.width) {
|
|
58904
|
-
setAspect("tall");
|
|
58905
|
-
} else {
|
|
58906
|
-
setAspect("square");
|
|
58907
|
-
}
|
|
58908
|
-
};
|
|
58909
|
-
}, [src]);
|
|
58910
|
-
const containerStyle = {
|
|
58911
|
-
position: "relative",
|
|
58912
|
-
display: "inline-flex"
|
|
58913
|
-
};
|
|
58914
|
-
const imageStyle = {
|
|
58915
|
-
display: "block",
|
|
58916
|
-
objectFit: "cover",
|
|
58917
|
-
height: "100%",
|
|
58918
|
-
width: "100%",
|
|
58919
|
-
// borderRadius:'50%',
|
|
58920
|
-
maxHeight: isCompact ? LOGO_MAX_HEIGHT_COMPACT : LOGO_MAX_HEIGHT,
|
|
58921
|
-
maxWidth: isCompact ? LOGO_MAX_WIDTH_DEFAULT_COMPACT : LOGO_MAX_WIDTH_DEFAULT
|
|
58922
|
-
};
|
|
58923
|
-
if (aspect === "wide") {
|
|
58924
|
-
imageStyle.maxWidth = isCompact ? LOGO_MAX_WIDTH_WIDE_COMPACT : LOGO_MAX_WIDTH_WIDE;
|
|
58925
|
-
}
|
|
58926
|
-
if (aspect === "tall") {
|
|
58927
|
-
imageStyle.maxHeight = isCompact ? "3rem" : "4rem";
|
|
58928
|
-
imageStyle.maxWidth = isCompact ? "3rem" : "4rem";
|
|
58929
|
-
}
|
|
58930
|
-
return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
|
|
58931
|
-
style: containerStyle,
|
|
58932
|
-
children: [/*#__PURE__*/jsxRuntimeExports.jsx("img", {
|
|
58933
|
-
src: src,
|
|
58934
|
-
alt: "Logo",
|
|
58935
|
-
style: imageStyle,
|
|
58936
|
-
loading: "lazy"
|
|
58937
|
-
}), showStatusDot && /*#__PURE__*/jsxRuntimeExports.jsx("span", {
|
|
58938
|
-
style: {
|
|
58939
|
-
position: "absolute",
|
|
58940
|
-
bottom: 0,
|
|
58941
|
-
right: 0,
|
|
58942
|
-
width: isCompact ? STATUS_DOT_SIZE_COMPACT : STATUS_DOT_SIZE,
|
|
58943
|
-
height: isCompact ? STATUS_DOT_SIZE_COMPACT : STATUS_DOT_SIZE,
|
|
58944
|
-
borderRadius: "9999px",
|
|
58945
|
-
backgroundColor: statusColor,
|
|
58946
|
-
border: "".concat(isCompact ? STATUS_DOT_BORDER_WIDTH_COMPACT : STATUS_DOT_BORDER_WIDTH, " solid #ffffff"),
|
|
58947
|
-
transform: "translate(".concat(isCompact ? STATUS_DOT_OFFSET_COMPACT : STATUS_DOT_OFFSET, ", ").concat(isCompact ? STATUS_DOT_OFFSET_COMPACT : STATUS_DOT_OFFSET, ")"),
|
|
58948
|
-
pointerEvents: "none"
|
|
58949
|
-
}
|
|
58950
|
-
})]
|
|
58951
|
-
});
|
|
58952
|
-
};
|
|
58953
|
-
|
|
58954
58872
|
const ChatHeader = _ref => {
|
|
58955
58873
|
let {
|
|
58956
58874
|
conciergeName,
|
|
@@ -59009,8 +58927,16 @@
|
|
|
59009
58927
|
className: "absolute inset-0 bg-gradient-to-br from-white/10 to-transparent pointer-events-none"
|
|
59010
58928
|
}), companyLogo && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
59011
58929
|
className: "w-[48px] h-[48px] rounded-full overflow-hidden flex items-center justify-center bg-white/10",
|
|
59012
|
-
children: /*#__PURE__*/jsxRuntimeExports.jsx(
|
|
59013
|
-
src: companyLogo
|
|
58930
|
+
children: /*#__PURE__*/jsxRuntimeExports.jsx("img", {
|
|
58931
|
+
src: companyLogo,
|
|
58932
|
+
alt: "Logo",
|
|
58933
|
+
style: {
|
|
58934
|
+
display: "block",
|
|
58935
|
+
width: "100%",
|
|
58936
|
+
height: "100%",
|
|
58937
|
+
objectFit: "cover"
|
|
58938
|
+
},
|
|
58939
|
+
loading: "lazy"
|
|
59014
58940
|
})
|
|
59015
58941
|
}), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
|
|
59016
58942
|
className: "flex items-center gap-2 ".concat(!companyLogo ? "px-3" : ""),
|