@chrryai/chrry 1.5.32 → 1.5.34

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 CHANGED
@@ -489,7 +489,7 @@ var init_locales = __esm({
489
489
 
490
490
  // utils/siteConfig.ts
491
491
  function detectSiteModeDomain(hostname2, mode) {
492
- const defaultMode = process.env.MODE || import_meta?.env?.VITE_SITE_MODE || mode || "zarathustra";
492
+ const defaultMode = process.env.MODE || import_meta?.env?.VITE_SITE_MODE || mode || "vex";
493
493
  const rawHost = hostname2 || (typeof window !== "undefined" ? window?.location?.hostname : "") || "";
494
494
  let host = rawHost?.trim().toLowerCase();
495
495
  if (host?.includes("://")) {
@@ -505,6 +505,7 @@ function detectSiteModeDomain(hostname2, mode) {
505
505
  const matchesDomain = (host2, domain) => {
506
506
  return host2 === domain || host2.endsWith(`.${domain}`);
507
507
  };
508
+ console.log(`\u{1F50D} Detecting mode for host: "${host}"`);
508
509
  if (matchesDomain(host, "books.chrry.ai")) {
509
510
  return "zarathustra";
510
511
  }
@@ -2092,7 +2093,7 @@ var init_utils = __esm({
2092
2093
  };
2093
2094
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
2094
2095
  config = getSiteConfig(getClientHostname());
2095
- VERSION = config.version || "1.5.32";
2096
+ VERSION = config.version || "1.5.34";
2096
2097
  getSlugFromPathname = (path) => {
2097
2098
  return getAppAndStoreSlugs(path, {
2098
2099
  defaultAppSlug: config.slug,
@@ -23718,10 +23719,9 @@ function AuthProvider({
23718
23719
  );
23719
23720
  const getSlugFromPathname2 = (path) => {
23720
23721
  if (path === "/") return void 0;
23721
- const siteConfig2 = getSiteConfig();
23722
23722
  const { appSlug } = getAppAndStoreSlugs(path, {
23723
- defaultAppSlug: baseApp?.slug || siteConfig2.slug,
23724
- defaultStoreSlug: baseApp?.store?.slug || siteConfig2.storeSlug,
23723
+ defaultAppSlug: baseApp?.slug || siteConfig.slug,
23724
+ defaultStoreSlug: baseApp?.store?.slug || siteConfig.storeSlug,
23725
23725
  excludedRoutes: excludedSlugRoutes,
23726
23726
  locales
23727
23727
  });
@@ -23786,8 +23786,7 @@ function AuthProvider({
23786
23786
  try {
23787
23787
  if (!token || !appId) return;
23788
23788
  const apps2 = await getApp({ token, appId });
23789
- if (loadingAppId || loadingApp) {
23790
- setLoadingApp(void 0);
23789
+ if (loadingAppId) {
23791
23790
  setLoadingAppId(void 0);
23792
23791
  }
23793
23792
  return apps2.store?.apps;
@@ -24415,7 +24414,7 @@ function DataProvider({ children, ...rest }) {
24415
24414
  const [instructions, setInstructions] = (0, import_react21.useState)([]);
24416
24415
  const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
24417
24416
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
24418
- const VERSION4 = "1.5.32";
24417
+ const VERSION4 = "1.5.34";
24419
24418
  const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
24420
24419
  const {
24421
24420
  API_URL: API_URL2,
@@ -41311,6 +41310,7 @@ function Menu({
41311
41310
  return /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, /* @__PURE__ */ import_react62.default.createElement(
41312
41311
  Div,
41313
41312
  {
41313
+ suppressHydrationWarning: true,
41314
41314
  className: "menu blur",
41315
41315
  key: isDrawerOpen ? "open" : "closed",
41316
41316
  ref: innerRef,
@@ -41699,7 +41699,7 @@ function Menu({
41699
41699
  }
41700
41700
  )
41701
41701
  ))
41702
- ), !isLoadingThreads && threads?.threads.length === 0 && /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, /* @__PURE__ */ import_react62.default.createElement(Div, { style: styles4.noThreadsContainer.style }, t5("Nothing here yet"))), threads?.threads.length ? (() => {
41702
+ ), !threads?.totalCount && /* @__PURE__ */ import_react62.default.createElement(import_react62.default.Fragment, null, /* @__PURE__ */ import_react62.default.createElement(Div, { style: styles4.noThreadsContainer.style }, t5("Nothing here yet"))), threads?.threads.length ? (() => {
41703
41703
  const url = `/threads${collaborationStatus ? `?collaborationStatus=${collaborationStatus}` : ""}`;
41704
41704
  return /* @__PURE__ */ import_react62.default.createElement(Div, { style: styles4.loadMoreButtonContainer.style }, /* @__PURE__ */ import_react62.default.createElement(
41705
41705
  Anchor,
@@ -41727,7 +41727,7 @@ function Menu({
41727
41727
  " ",
41728
41728
  t5("Load more")
41729
41729
  ));
41730
- })() : null, threads?.threads && threads?.threads.length < 2 && /* @__PURE__ */ import_react62.default.createElement(EmptyStateTips, { style: { marginTop: 15 } }))
41730
+ })() : null, !threads?.threads?.length || threads?.threads?.length < 2 ? /* @__PURE__ */ import_react62.default.createElement(EmptyStateTips, { style: { marginTop: 15 } }) : null)
41731
41731
  )
41732
41732
  )
41733
41733
  ), /* @__PURE__ */ import_react62.default.createElement(Div, { style: styles4.footer.style }, /* @__PURE__ */ import_react62.default.createElement(