@chrryai/chrry 1.4.56 → 1.4.58

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
@@ -1899,7 +1899,7 @@ var init_utils = __esm({
1899
1899
  };
1900
1900
  isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes("Firefox");
1901
1901
  config = getSiteConfig(getClientHostname());
1902
- VERSION = config.version || "1.4.56";
1902
+ VERSION = config.version || "1.4.58";
1903
1903
  getSlugFromPathname = (path) => {
1904
1904
  return getAppAndStoreSlugs(path, {
1905
1905
  defaultAppSlug: config.slug,
@@ -24079,7 +24079,7 @@ function DataProvider({ children, ...rest }) {
24079
24079
  const [instructions, setInstructions] = (0, import_react20.useState)([]);
24080
24080
  const [affiliateStats, setAffiliateStats] = (0, import_react20.useState)(null);
24081
24081
  const [loadingAffiliateStats, setLoadingAffiliateStats] = (0, import_react20.useState)(false);
24082
- const VERSION4 = "1.4.56";
24082
+ const VERSION4 = "1.4.58";
24083
24083
  const [weather, setWeather] = useLocalStorage2("weather", user?.weather || guest?.weather || void 0);
24084
24084
  const {
24085
24085
  API_URL: API_URL2,
@@ -26260,8 +26260,8 @@ function ChatProvider({
26260
26260
  }, [searchParams]);
26261
26261
  const [wasIncognito, setWasIncognito] = (0, import_react30.useState)(isIncognito);
26262
26262
  const hasStoreApps = (item) => {
26263
- const i = item && allApps?.find((app2) => app2.id === item?.id);
26264
- return i?.store?.apps.length;
26263
+ const app2 = allApps?.find((app3) => app3.id === item?.id);
26264
+ return app2?.store?.apps.length;
26265
26265
  };
26266
26266
  const [loading, setLoading] = (0, import_react30.useState)(false);
26267
26267
  const setIsNewAppChat = (item) => {
@@ -35809,8 +35809,8 @@ function App({
35809
35809
  /* @__PURE__ */ import_react56.default.createElement(Div, { style: { ...styles4.apps.style } }, appsState.filter((item) => item.id !== popcorn?.id).slice(0, 5)?.map((item, index) => {
35810
35810
  const showAtlasHere = index === 1 && app?.id === chrry?.id;
35811
35811
  const showFocusHere = focus && !showAtlasHere && index === 1;
35812
- const showPacmanHere = index === 2;
35813
- const showSpaceInvaderHere = index === 3;
35812
+ const showPacmanHere = app?.store?.id !== popcorn?.store?.id && index === 2;
35813
+ const showSpaceInvaderHere = app?.store?.id !== popcorn?.store?.id && index === 3;
35814
35814
  const showChrryHere = index === 0 && chrry && app?.id !== chrry.id;
35815
35815
  const showZarathustraHere = !showChrryHere && index === 0 && store?.appId !== zarathustra?.id;
35816
35816
  return /* @__PURE__ */ import_react56.default.createElement(
@@ -35818,11 +35818,15 @@ function App({
35818
35818
  {
35819
35819
  key: item.id,
35820
35820
  id: item.id,
35821
- style: { ...styles4.appItem.style }
35821
+ style: {
35822
+ ...styles4.appItem.style,
35823
+ marginLeft: index === 2 ? "auto" : void 0
35824
+ }
35822
35825
  },
35823
35826
  /* @__PURE__ */ import_react56.default.createElement(import_react56.default.Fragment, null, showChrryHere && /* @__PURE__ */ import_react56.default.createElement(
35824
35827
  Anchor,
35825
35828
  {
35829
+ preventDefault: true,
35826
35830
  href: getAppSlug(chrry),
35827
35831
  onClick: (e) => {
35828
35832
  if (isManagingApp) {
@@ -35839,7 +35843,7 @@ function App({
35839
35843
  ...styles4.chrry.style
35840
35844
  }
35841
35845
  },
35842
- /* @__PURE__ */ import_react56.default.createElement(
35846
+ loadingApp?.id !== chrry?.id ? /* @__PURE__ */ import_react56.default.createElement(
35843
35847
  ImageComponent,
35844
35848
  {
35845
35849
  logo: "chrry",
@@ -35848,12 +35852,13 @@ function App({
35848
35852
  width: 28,
35849
35853
  height: 28
35850
35854
  }
35851
- )
35855
+ ) : /* @__PURE__ */ import_react56.default.createElement(Loading, { size: 28 })
35852
35856
  ), showZarathustraHere && zarathustra && store && store?.apps?.some(
35853
35857
  (app2) => app2.id === zarathustra.id
35854
35858
  ) && /* @__PURE__ */ import_react56.default.createElement(
35855
35859
  Anchor,
35856
35860
  {
35861
+ preventDefault: true,
35857
35862
  href: getAppSlug(zarathustra),
35858
35863
  onClick: (e) => {
35859
35864
  if (isManagingApp) {
@@ -35870,7 +35875,7 @@ function App({
35870
35875
  ...styles4.zarathustra.style
35871
35876
  }
35872
35877
  },
35873
- /* @__PURE__ */ import_react56.default.createElement(
35878
+ loadingApp?.id !== zarathustra?.id ? /* @__PURE__ */ import_react56.default.createElement(
35874
35879
  ImageComponent,
35875
35880
  {
35876
35881
  style: {
@@ -35879,12 +35884,13 @@ function App({
35879
35884
  app: zarathustra,
35880
35885
  size: 24
35881
35886
  }
35882
- )
35887
+ ) : /* @__PURE__ */ import_react56.default.createElement(Loading, { size: 24 })
35883
35888
  ), showPacmanHere ? popcorn && store && store?.appId !== popcorn?.id && store?.apps?.some(
35884
35889
  (app2) => app2.id === popcorn.id
35885
35890
  ) ? /* @__PURE__ */ import_react56.default.createElement(
35886
35891
  Anchor,
35887
35892
  {
35893
+ preventDefault: true,
35888
35894
  href: getAppSlug(popcorn),
35889
35895
  onClick: (e) => {
35890
35896
  if (isManagingApp) {
@@ -35901,7 +35907,7 @@ function App({
35901
35907
  ...styles4.popcorn.style
35902
35908
  }
35903
35909
  },
35904
- /* @__PURE__ */ import_react56.default.createElement(ImageComponent, { app: popcorn, size: 24 })
35910
+ loadingApp?.id !== popcorn?.id ? /* @__PURE__ */ import_react56.default.createElement(ImageComponent, { app: popcorn, size: 24 }) : /* @__PURE__ */ import_react56.default.createElement(Loading, { size: 24 })
35905
35911
  ) : showPacmanHere && /* @__PURE__ */ import_react56.default.createElement(
35906
35912
  Button,
35907
35913
  {
@@ -35968,6 +35974,7 @@ function App({
35968
35974
  Anchor,
35969
35975
  {
35970
35976
  href: getAppSlug(atlas),
35977
+ preventDefault: true,
35971
35978
  onClick: (e) => {
35972
35979
  if (isManagingApp) {
35973
35980
  e.preventDefault();
@@ -35983,7 +35990,7 @@ function App({
35983
35990
  ...styles4.atlas.style
35984
35991
  }
35985
35992
  },
35986
- /* @__PURE__ */ import_react56.default.createElement(ImageComponent, { app: atlas, width: 22, height: 22 })
35993
+ loadingApp?.id === atlas?.id ? /* @__PURE__ */ import_react56.default.createElement(Loading, { size: 22 }) : /* @__PURE__ */ import_react56.default.createElement(ImageComponent, { app: atlas, width: 22, height: 22 })
35987
35994
  ), showFocusHere && /* @__PURE__ */ import_react56.default.createElement(FocusButton, { time }), showSpaceInvaderHere && /* @__PURE__ */ import_react56.default.createElement(
35988
35995
  Button,
35989
35996
  {
@@ -44519,7 +44526,7 @@ function Skeleton({
44519
44526
  const hasHydrated = useHasHydrated();
44520
44527
  const { isEmpty } = useChat();
44521
44528
  const { pathname, setIsNewChat, hasNotification } = useNavigationContext();
44522
- const { isDrawerOpen, setIsDrawerOpen, isSmallDevice } = useTheme2();
44529
+ const { isDrawerOpen, setIsDrawerOpen, isSmallDevice, isMobileDevice } = useTheme2();
44523
44530
  const { isStandalone: isStandalone2 } = usePlatform();
44524
44531
  const { FRONTEND_URL: FRONTEND_URL2 } = useData();
44525
44532
  const { app, isRemovingApp, isSavingApp } = useApp();
@@ -44641,14 +44648,14 @@ function Skeleton({
44641
44648
  ...utilities.button.style,
44642
44649
  ...utilities.transparent.style,
44643
44650
  ...utilities.small.style,
44644
- ...hasHydrated && isMobile && skeletonStyles.blog.style
44651
+ ...hasHydrated && isMobileDevice && skeletonStyles.blog.style
44645
44652
  }
44646
44653
  },
44647
44654
  /* @__PURE__ */ React.createElement(ImageComponent, { logo: "blossom", size: 22 }),
44648
44655
  " ",
44649
44656
  "Blossom"
44650
44657
  )),
44651
- /* @__PURE__ */ React.createElement(Div, { style: { ...skeletonStyles.right.style } }, /* @__PURE__ */ React.createElement(CharacterProfiles, null), /* @__PURE__ */ React.createElement(Subscribe, null), /* @__PURE__ */ React.createElement(SignIn, { showSignIn: false }), /* @__PURE__ */ React.createElement(LanguageSwitcher_default, null))
44658
+ /* @__PURE__ */ React.createElement(Div, { style: { ...skeletonStyles.right.style } }, /* @__PURE__ */ React.createElement(CharacterProfiles, null), /* @__PURE__ */ React.createElement(Subscribe, null), !isMobileDevice ? /* @__PURE__ */ React.createElement(SignIn, { showSignIn: false }) : null, /* @__PURE__ */ React.createElement(LanguageSwitcher_default, null))
44652
44659
  ),
44653
44660
  /* @__PURE__ */ React.createElement(Div, { style: { ...skeletonStyles.contentContainer.style } }, /* @__PURE__ */ React.createElement(React.Fragment, null, children))
44654
44661
  )