@chrryai/chrry 1.5.0 → 1.5.1
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 +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/globals.scss +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1902,7 +1902,7 @@ var init_utils = __esm({
|
|
|
1902
1902
|
};
|
|
1903
1903
|
isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
|
|
1904
1904
|
config = getSiteConfig(getClientHostname());
|
|
1905
|
-
VERSION = config.version || "1.5.
|
|
1905
|
+
VERSION = config.version || "1.5.1";
|
|
1906
1906
|
getSlugFromPathname = (path) => {
|
|
1907
1907
|
return getAppAndStoreSlugs(path, {
|
|
1908
1908
|
defaultAppSlug: config.slug,
|
|
@@ -24081,7 +24081,7 @@ function DataProvider({ children, ...rest }) {
|
|
|
24081
24081
|
const [instructions, setInstructions] = (0, import_react21.useState)([]);
|
|
24082
24082
|
const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
|
|
24083
24083
|
const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
|
|
24084
|
-
const VERSION4 = "1.5.
|
|
24084
|
+
const VERSION4 = "1.5.1";
|
|
24085
24085
|
const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
|
|
24086
24086
|
const {
|
|
24087
24087
|
API_URL: API_URL2,
|
|
@@ -38654,13 +38654,18 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
38654
38654
|
const distanceFromBottom = documentHeight - (scrollPosition + viewportHeight);
|
|
38655
38655
|
setHasBottomOffset(distanceFromBottom > 100);
|
|
38656
38656
|
};
|
|
38657
|
+
let scrollTimeout = null;
|
|
38657
38658
|
const handleScroll = () => {
|
|
38658
|
-
|
|
38659
|
-
|
|
38660
|
-
|
|
38661
|
-
|
|
38662
|
-
|
|
38663
|
-
|
|
38659
|
+
if (scrollTimeout) return;
|
|
38660
|
+
scrollTimeout = setTimeout(() => {
|
|
38661
|
+
const scrollPosition = window.scrollY;
|
|
38662
|
+
const documentHeight = document.documentElement.scrollHeight;
|
|
38663
|
+
const currentWindowHeight = window.innerHeight;
|
|
38664
|
+
const distanceFromBottom = documentHeight - (scrollPosition + currentWindowHeight);
|
|
38665
|
+
setShowChatInput(distanceFromBottom <= 150);
|
|
38666
|
+
checkBottomOffset();
|
|
38667
|
+
scrollTimeout = null;
|
|
38668
|
+
}, 16);
|
|
38664
38669
|
};
|
|
38665
38670
|
const handleResize = () => {
|
|
38666
38671
|
setWindowHeight(window.innerHeight);
|
|
@@ -38702,6 +38707,9 @@ Return ONLY ONE WORD: ${apps.map((a) => a.name).join(", ")}, or "none"`;
|
|
|
38702
38707
|
if (domChangeTimeout) {
|
|
38703
38708
|
clearTimeout(domChangeTimeout);
|
|
38704
38709
|
}
|
|
38710
|
+
if (scrollTimeout) {
|
|
38711
|
+
clearTimeout(scrollTimeout);
|
|
38712
|
+
}
|
|
38705
38713
|
};
|
|
38706
38714
|
}, [empty]);
|
|
38707
38715
|
const scrollToBottom = (timeout = 500) => {
|