@chrryai/chrry 1.7.14 → 1.7.16

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
@@ -529,10 +529,14 @@ var init_locales = __esm({
529
529
 
530
530
  // utils/siteConfig.ts
531
531
  function getEnv2() {
532
+ let result = void 0;
532
533
  if (typeof import_meta2 !== "undefined") {
533
- return import_meta2.env;
534
+ result = import_meta2.env;
534
535
  }
535
- return process.env;
536
+ if (typeof process !== "undefined") {
537
+ result = process.env;
538
+ }
539
+ return result || {};
536
540
  }
537
541
  function detectSiteModeDomain(hostname2, mode) {
538
542
  const defaultMode = getEnv2().VITE_SITE_MODE || mode || "vex";
@@ -829,7 +833,7 @@ var init_siteConfig = __esm({
829
833
  isStoreApp: false,
830
834
  mode: "focus",
831
835
  slug: "focus",
832
- version: "26.10.61",
836
+ version: "26.10.62",
833
837
  storeSlug: "blossom",
834
838
  name: "Focus",
835
839
  domain: "focus.chrry.ai",
@@ -3171,7 +3175,7 @@ var init_utils = __esm({
3171
3175
  };
3172
3176
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
3173
3177
  config = getSiteConfig(getClientHostname2());
3174
- VERSION = config.version || "1.7.14";
3178
+ VERSION = config.version || "1.7.16";
3175
3179
  getSlugFromPathname = (path) => {
3176
3180
  return getAppAndStoreSlugs(path, {
3177
3181
  defaultAppSlug: config.slug,
@@ -3861,7 +3865,8 @@ var init_cookies = __esm({
3861
3865
 
3862
3866
  // platform/detection.ts
3863
3867
  function isWeb() {
3864
- return !isNative() && typeof window !== "undefined" && typeof document !== "undefined";
3868
+ return !isNative() && // !isBrowserExtension() &&
3869
+ typeof window !== "undefined" && typeof document !== "undefined";
3865
3870
  }
3866
3871
  function isNative() {
3867
3872
  return typeof navigator !== "undefined" && navigator.product === "ReactNative";
@@ -23715,11 +23720,13 @@ function AuthProvider({
23715
23720
  setToken(sessionData2.user.token);
23716
23721
  setFingerprint(sessionData2.user.fingerprint || void 0);
23717
23722
  setGuest(void 0);
23723
+ sessionData2.userBaseApp && setUserBaseApp(sessionData2.userBaseApp);
23718
23724
  } else if (sessionData2.guest) {
23719
23725
  setGuest(sessionData2.guest);
23720
23726
  setFingerprint(sessionData2.guest.fingerprint);
23721
23727
  setToken(sessionData2.guest.fingerprint);
23722
23728
  setUser(void 0);
23729
+ sessionData2.guestBaseApp && setGuestBaseApp(sessionData2.guestBaseApp);
23723
23730
  }
23724
23731
  setHasNotification(!!sessionData2.hasNotification);
23725
23732
  setVersions(sessionData2.versions);
@@ -23919,6 +23926,7 @@ function AuthProvider({
23919
23926
  const [userBaseApp, setUserBaseApp] = (0, import_react20.useState)(
23920
23927
  session2?.userBaseApp
23921
23928
  );
23929
+ console.log(`\u{1F680} ~ userBaseApp:`, userBaseApp);
23922
23930
  const userBaseStore = userBaseApp?.store;
23923
23931
  const [guestBaseApp, setGuestBaseApp] = (0, import_react20.useState)(
23924
23932
  session2?.guestBaseApp
@@ -24152,7 +24160,7 @@ function AuthProvider({
24152
24160
  }, [canShowFocus]);
24153
24161
  const [store, setStore] = (0, import_react20.useState)(app?.store);
24154
24162
  const apps = storeApps.filter((item) => {
24155
- return app?.store?.apps?.some((app2) => {
24163
+ return app?.store?.app?.store?.apps?.some((app2) => {
24156
24164
  return app2.id === item.id;
24157
24165
  });
24158
24166
  });
@@ -24729,7 +24737,7 @@ function DataProvider({ children, ...rest }) {
24729
24737
  const [instructions, setInstructions] = (0, import_react21.useState)([]);
24730
24738
  const [affiliateStats, setAffiliateStats] = (0, import_react21.useState)(null);
24731
24739
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react21.useState)(false);
24732
- const VERSION4 = "1.7.14";
24740
+ const VERSION4 = "1.7.16";
24733
24741
  const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
24734
24742
  const {
24735
24743
  API_URL: API_URL2,
@@ -25096,7 +25104,9 @@ var init_toast = __esm({
25096
25104
 
25097
25105
  // hooks/useCookieOrLocalStorage.ts
25098
25106
  function useCookieOrLocalStorage(key, initialValue, canReadCookie = false) {
25099
- const { isWeb: isWeb2 } = usePlatform();
25107
+ const { isExtension: isExtension2, isNative: isNative2 } = usePlatform();
25108
+ const isWeb2 = !isExtension2 && !isNative2;
25109
+ console.log(`\u{1F680} ~ isWeb:`, isWeb2);
25100
25110
  const [cookie, setCookieInternal] = useCookie(key, initialValue);
25101
25111
  const [local, setLocalInternal] = useLocalStorage(
25102
25112
  key,
@@ -25317,7 +25327,7 @@ function useOnlineStatus2() {
25317
25327
  window.addEventListener("offline", updateStatus);
25318
25328
  async function checkConnection() {
25319
25329
  try {
25320
- const response = await fetch("/api/health", {
25330
+ const response = await fetch(`${FRONTEND_URL}/api/health`, {
25321
25331
  method: "HEAD",
25322
25332
  cache: "no-store"
25323
25333
  });
@@ -25347,6 +25357,7 @@ var init_useOnlineStatus2 = __esm({
25347
25357
  "hooks/useOnlineStatus.ts"() {
25348
25358
  "use strict";
25349
25359
  import_react26 = require("react");
25360
+ init_utils();
25350
25361
  }
25351
25362
  });
25352
25363
 
@@ -36004,7 +36015,7 @@ function App({
36004
36015
  style: {
36005
36016
  ...utilities.link,
36006
36017
  gap: "0.5rem",
36007
- fontSize: "0.7rem",
36018
+ fontSize: "0.675rem",
36008
36019
  position: "relative"
36009
36020
  },
36010
36021
  key: suggestSaveApp ? "highlights" : "settings",
@@ -36039,6 +36050,7 @@ function App({
36039
36050
  },
36040
36051
  "\u{1F92F}"
36041
36052
  ),
36053
+ t5("Add agent"),
36042
36054
  /* @__PURE__ */ import_react53.default.createElement(
36043
36055
  ImageComponent,
36044
36056
  {