@talken/talkenkit 2.4.15 → 2.4.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.
@@ -1,16 +1,11 @@
1
1
  import React, { type ReactNode } from 'react';
2
- export type MobileMode = 'compact-login' | 'compact-list' | 'full' | 'auto';
2
+ export type MobileMode = 'compact-list' | 'full' | 'auto';
3
3
  export interface RainbowKitConfig {
4
4
  /**
5
5
  * Mobile behavior mode
6
6
  * @default 'auto'
7
7
  */
8
8
  mobileMode: MobileMode;
9
- /**
10
- * Wallets to show in compact login mode
11
- * @default ['abcWallet']
12
- */
13
- compactLoginWallets: string[];
14
9
  }
15
10
  export interface RainbowKitConfigProviderProps {
16
11
  config: RainbowKitConfig;
@@ -42,18 +42,12 @@ export interface RainbowKitProviderProps {
42
42
  solanaConfig?: SolanaConfig;
43
43
  /**
44
44
  * Mobile behavior mode
45
- * - 'compact-login': Direct to login on mobile (Email/Google only)
46
45
  * - 'compact-list': Show compact wallet list on mobile
47
46
  * - 'full': Use desktop flow on mobile
48
47
  * - 'auto': Auto-detect based on wallet config
49
48
  * @default 'auto'
50
49
  */
51
50
  mobileMode?: MobileMode;
52
- /**
53
- * Wallets to show in compact login mode
54
- * @default ['abcWallet']
55
- */
56
- compactLoginWallets?: string[];
57
51
  /**
58
52
  * Auto-reconnect to previously connected wallets on page load
59
53
  * Applies to both EVM (wagmi) and Solana (wallet-adapter) wallets
@@ -62,4 +56,4 @@ export interface RainbowKitProviderProps {
62
56
  */
63
57
  autoReconnect?: boolean;
64
58
  }
65
- export declare function RainbowKitProvider({ appInfo, avatar, children, coolMode, autoReconnect, disableAutoPinProvider, id, initialChain, locale, modalSize, showRecentTransactions, theme, solanaConfig, mobileMode, compactLoginWallets, }: RainbowKitProviderProps): React.JSX.Element;
59
+ export declare function RainbowKitProvider({ appInfo, avatar, children, coolMode, autoReconnect, disableAutoPinProvider, id, initialChain, locale, modalSize, showRecentTransactions, theme, solanaConfig, mobileMode, }: RainbowKitProviderProps): React.JSX.Element;
package/dist/index.js CHANGED
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  en_US_default
4
4
  } from "./chunk-X4GSACNW.js";
5
- import {
6
- darkTheme
7
- } from "./chunk-RZWDCITT.js";
8
5
  import {
9
6
  lightTheme
10
7
  } from "./chunk-72HZGUJA.js";
8
+ import {
9
+ darkTheme
10
+ } from "./chunk-RZWDCITT.js";
11
11
  import {
12
12
  midnightTheme
13
13
  } from "./chunk-7ZP3ENJ2.js";
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-TJX4M23U.js";
51
51
 
52
52
  // src/components/ConnectButton/ConnectButton.tsx
53
- import React77, { useContext as useContext29, useEffect as useEffect27, useState as useState32 } from "react";
53
+ import React77, { useContext as useContext29, useEffect as useEffect26, useState as useState31 } from "react";
54
54
 
55
55
  // src/css/sprinkles.css.ts
56
56
  import { createMapValueFn as _51c72 } from "@vanilla-extract/sprinkles/createUtils";
@@ -2289,9 +2289,9 @@ import React75, {
2289
2289
  createContext as createContext15,
2290
2290
  useCallback as useCallback16,
2291
2291
  useContext as useContext27,
2292
- useEffect as useEffect26,
2292
+ useEffect as useEffect25,
2293
2293
  useMemo as useMemo13,
2294
- useState as useState31
2294
+ useState as useState30
2295
2295
  } from "react";
2296
2296
  import { useAccount as useAccount17, useAccountEffect as useAccountEffect3, useConfig as useConfig3 } from "wagmi";
2297
2297
 
@@ -3356,7 +3356,7 @@ function InternalPinProvider({
3356
3356
  }
3357
3357
 
3358
3358
  // src/components/RainbowKitProvider/ModalSizeContext.tsx
3359
- import React18, { createContext as createContext11, useContext as useContext8 } from "react";
3359
+ import React19, { createContext as createContext12, useContext as useContext9 } from "react";
3360
3360
 
3361
3361
  // src/hooks/useWindowSize.ts
3362
3362
  import { useEffect as useEffect13, useState as useState12 } from "react";
@@ -3395,16 +3395,35 @@ var useWindowSize = () => {
3395
3395
  return windowSize;
3396
3396
  };
3397
3397
 
3398
+ // src/components/RainbowKitProvider/RainbowKitConfigProvider.tsx
3399
+ import React17, { createContext as createContext10, useContext as useContext8 } from "react";
3400
+ var RainbowKitConfigContext = createContext10(null);
3401
+ function RainbowKitConfigProvider({
3402
+ config: config2,
3403
+ children
3404
+ }) {
3405
+ return /* @__PURE__ */ React17.createElement(RainbowKitConfigContext.Provider, { value: config2 }, children);
3406
+ }
3407
+ function useRainbowKitConfig() {
3408
+ const context = useContext8(RainbowKitConfigContext);
3409
+ if (!context) {
3410
+ throw new Error(
3411
+ "useRainbowKitConfig must be used within RainbowKitProvider"
3412
+ );
3413
+ }
3414
+ return context;
3415
+ }
3416
+
3398
3417
  // src/components/RainbowKitProvider/WalletButtonContext.tsx
3399
- import React17, { createContext as createContext10, useMemo as useMemo8, useState as useState13 } from "react";
3400
- var WalletButtonContext = createContext10({
3418
+ import React18, { createContext as createContext11, useMemo as useMemo8, useState as useState13 } from "react";
3419
+ var WalletButtonContext = createContext11({
3401
3420
  connector: null,
3402
3421
  setConnector: () => {
3403
3422
  }
3404
3423
  });
3405
3424
  function WalletButtonProvider({ children }) {
3406
3425
  const [connector, setConnector] = useState13(null);
3407
- return /* @__PURE__ */ React17.createElement(
3426
+ return /* @__PURE__ */ React18.createElement(
3408
3427
  WalletButtonContext.Provider,
3409
3428
  {
3410
3429
  value: useMemo8(
@@ -3424,7 +3443,7 @@ var ModalSizeOptions = {
3424
3443
  COMPACT: "compact",
3425
3444
  WIDE: "wide"
3426
3445
  };
3427
- var ModalSizeContext = createContext11(
3446
+ var ModalSizeContext = createContext12(
3428
3447
  ModalSizeOptions.WIDE
3429
3448
  );
3430
3449
  function ModalSizeProvider({
@@ -3433,33 +3452,15 @@ function ModalSizeProvider({
3433
3452
  }) {
3434
3453
  const { width } = useWindowSize();
3435
3454
  const isSmallScreen = width && width < largeScreenMinWidth;
3436
- const { connector } = useContext8(WalletButtonContext);
3437
- return /* @__PURE__ */ React18.createElement(
3438
- ModalSizeContext.Provider,
3439
- {
3440
- value: isSmallScreen || connector ? ModalSizeOptions.COMPACT : modalSize
3441
- },
3442
- children
3443
- );
3444
- }
3445
-
3446
- // src/components/RainbowKitProvider/RainbowKitConfigProvider.tsx
3447
- import React19, { createContext as createContext12, useContext as useContext9 } from "react";
3448
- var RainbowKitConfigContext = createContext12(null);
3449
- function RainbowKitConfigProvider({
3450
- config: config2,
3451
- children
3452
- }) {
3453
- return /* @__PURE__ */ React19.createElement(RainbowKitConfigContext.Provider, { value: config2 }, children);
3454
- }
3455
- function useRainbowKitConfig() {
3456
- const context = useContext9(RainbowKitConfigContext);
3457
- if (!context) {
3458
- throw new Error(
3459
- "useRainbowKitConfig must be used within RainbowKitProvider"
3460
- );
3455
+ const { connector } = useContext9(WalletButtonContext);
3456
+ let shouldUseCompactOnMobile = false;
3457
+ try {
3458
+ const config2 = useRainbowKitConfig();
3459
+ shouldUseCompactOnMobile = config2.mobileMode === "full" && isMobile();
3460
+ } catch (_err) {
3461
3461
  }
3462
- return context;
3462
+ const effectiveModalSize = connector || isSmallScreen || shouldUseCompactOnMobile ? ModalSizeOptions.COMPACT : modalSize;
3463
+ return /* @__PURE__ */ React19.createElement(ModalSizeContext.Provider, { value: effectiveModalSize }, children);
3463
3464
  }
3464
3465
 
3465
3466
  // src/components/RainbowKitProvider/ShowRecentTransactionsContext.ts
@@ -3474,7 +3475,7 @@ function setRainbowKitVersion({ version }) {
3474
3475
  }
3475
3476
  function useFingerprint() {
3476
3477
  const fingerprint = useCallback5(() => {
3477
- setRainbowKitVersion({ version: "2.4.15" });
3478
+ setRainbowKitVersion({ version: "2.4.16" });
3478
3479
  }, []);
3479
3480
  useEffect14(() => {
3480
3481
  fingerprint();
@@ -4272,8 +4273,7 @@ function RainbowKitProvider({
4272
4273
  showRecentTransactions = false,
4273
4274
  theme = defaultTheme,
4274
4275
  solanaConfig,
4275
- mobileMode = "auto",
4276
- compactLoginWallets = ["abcWallet"]
4276
+ mobileMode = "auto"
4277
4277
  }) {
4278
4278
  usePreloadImages();
4279
4279
  useFingerprint();
@@ -4291,8 +4291,7 @@ function RainbowKitProvider({
4291
4291
  const avatarContext = avatar ?? defaultAvatar;
4292
4292
  const enableSolana = !!solanaConfig;
4293
4293
  const rainbowKitConfig = {
4294
- mobileMode,
4295
- compactLoginWallets
4294
+ mobileMode
4296
4295
  };
4297
4296
  const providerTree = /* @__PURE__ */ React27.createElement(RainbowKitChainProvider, { initialChain }, /* @__PURE__ */ React27.createElement(RainbowKitConfigProvider, { config: rainbowKitConfig }, /* @__PURE__ */ React27.createElement(WalletButtonProvider, null, /* @__PURE__ */ React27.createElement(I18nProvider, { locale }, /* @__PURE__ */ React27.createElement(CoolModeContext.Provider, { value: coolMode }, /* @__PURE__ */ React27.createElement(ModalSizeProvider, { modalSize }, /* @__PURE__ */ React27.createElement(
4298
4297
  ShowRecentTransactionsContext.Provider,
@@ -4496,7 +4495,13 @@ function DialogContent({
4496
4495
  paddingBottom,
4497
4496
  wide = false
4498
4497
  }) {
4499
- const mobile = isMobile();
4498
+ let mobileMode = "auto";
4499
+ try {
4500
+ const config2 = useRainbowKitConfig();
4501
+ mobileMode = config2.mobileMode;
4502
+ } catch (_err) {
4503
+ }
4504
+ const mobile = mobileMode === "full" ? false : isMobile();
4500
4505
  const modalSize = useContext12(ModalSizeContext);
4501
4506
  const compactModeEnabled = modalSize === ModalSizeOptions.COMPACT;
4502
4507
  return /* @__PURE__ */ React30.createElement(Box, { marginTop }, /* @__PURE__ */ React30.createElement(
@@ -5462,7 +5467,7 @@ import { useAccount as useAccount16, useDisconnect as useDisconnect3 } from "wag
5462
5467
  import {
5463
5468
  WalletContext
5464
5469
  } from "@solana/wallet-adapter-react";
5465
- import React70, { useCallback as useCallback13, useContext as useContext24, useMemo as useMemo12, useState as useState28 } from "react";
5470
+ import React70, { useCallback as useCallback13, useContext as useContext24, useMemo as useMemo12, useState as useState27 } from "react";
5466
5471
 
5467
5472
  // src/wallets/recentSolanaWalletIds.ts
5468
5473
  var storageKey5 = "rk-recent-solana";
@@ -9999,48 +10004,11 @@ function ConnectOptionsModal({
9999
10004
  import React68, {
10000
10005
  useCallback as useCallback12,
10001
10006
  useContext as useContext22,
10002
- useEffect as useEffect25,
10007
+ useEffect as useEffect24,
10003
10008
  useRef as useRef6,
10004
- useState as useState27
10009
+ useState as useState26
10005
10010
  } from "react";
10006
10011
 
10007
- // src/hooks/useDeviceType.ts
10008
- import { useEffect as useEffect24, useState as useState26 } from "react";
10009
- var BREAKPOINTS = {
10010
- mobile: 1024,
10011
- // 0-1024px (includes phones and tablets)
10012
- tablet: 1024
10013
- // Not used (mobile includes tablet)
10014
- // desktop: 1024+ (everything else)
10015
- };
10016
- function getDeviceState(width) {
10017
- const type = width <= BREAKPOINTS.mobile ? "mobile" : width <= BREAKPOINTS.tablet ? "tablet" : "desktop";
10018
- return {
10019
- type,
10020
- isMobile: type === "mobile",
10021
- isTablet: type === "tablet",
10022
- isDesktop: type === "desktop",
10023
- width
10024
- };
10025
- }
10026
- function useDeviceType() {
10027
- const [state, setState] = useState26(() => {
10028
- if (typeof window === "undefined") {
10029
- return getDeviceState(1920);
10030
- }
10031
- return getDeviceState(window.innerWidth);
10032
- });
10033
- useEffect24(() => {
10034
- setState(getDeviceState(window.innerWidth));
10035
- function handleResize() {
10036
- setState(getDeviceState(window.innerWidth));
10037
- }
10038
- window.addEventListener("resize", handleResize);
10039
- return () => window.removeEventListener("resize", handleResize);
10040
- }, []);
10041
- return state;
10042
- }
10043
-
10044
10012
  // src/components/ConnectOptions/MobileOptions.css.ts
10045
10013
  var rotatingBorder = "_4rh9bz2";
10046
10014
  var scroll = "_4rh9bz0";
@@ -10119,7 +10087,7 @@ function WalletButton({
10119
10087
  }
10120
10088
  connect?.();
10121
10089
  }, [connect, getMobileUri, showWalletConnectModal, onClose, name, id]);
10122
- useEffect25(() => {
10090
+ useEffect24(() => {
10123
10091
  if (connecting && !initialized.current) {
10124
10092
  onConnect();
10125
10093
  initialized.current = true;
@@ -10185,17 +10153,6 @@ function WalletButton({
10185
10153
  );
10186
10154
  }
10187
10155
  function MobileOptions({ onClose }) {
10188
- const { isMobile: isSmallScreen } = useDeviceType();
10189
- let config2;
10190
- try {
10191
- config2 = useRainbowKitConfig();
10192
- } catch (_err) {
10193
- config2 = { mobileMode: "auto", compactLoginWallets: ["abcWallet"] };
10194
- }
10195
- const isCompactMode = isSmallScreen && config2?.mobileMode === "compact-login";
10196
- if (isCompactMode) {
10197
- return /* @__PURE__ */ React68.createElement(ConnectOptionsModal, { onClose, compact: true });
10198
- }
10199
10156
  const titleId = "rk_connect_title";
10200
10157
  const wallets = useWalletConnectors().filter(
10201
10158
  (wallet) => wallet.isRainbowKitConnector
@@ -10205,7 +10162,7 @@ function MobileOptions({ onClose }) {
10205
10162
  let walletContent = null;
10206
10163
  let headerBackgroundContrast = false;
10207
10164
  let headerBackButtonLink = null;
10208
- const [walletStep, setWalletStep] = useState27(
10165
+ const [walletStep, setWalletStep] = useState26(
10209
10166
  "CONNECT" /* Connect */
10210
10167
  );
10211
10168
  const { i18n: i18n2 } = useContext22(I18nContext);
@@ -10523,8 +10480,8 @@ function ConnectOptions({ onClose }) {
10523
10480
  };
10524
10481
  }
10525
10482
  }, [walletContext, multiChainContext]);
10526
- const [connectingWallet, setConnectingWallet] = useState28(null);
10527
- const [shouldCloseOnConnect, setShouldCloseOnConnect] = useState28(false);
10483
+ const [connectingWallet, setConnectingWallet] = useState27(null);
10484
+ const [shouldCloseOnConnect, setShouldCloseOnConnect] = useState27(false);
10528
10485
  React70.useEffect(() => {
10529
10486
  if (shouldCloseOnConnect && multiChainContext?.solanaConnected) {
10530
10487
  setShouldCloseOnConnect(false);
@@ -10604,7 +10561,15 @@ function ConnectOptions({ onClose }) {
10604
10561
  groups.Solana = sortedWallets;
10605
10562
  return groups;
10606
10563
  }, [solanaWallets]);
10607
- if (isMobile()) {
10564
+ let useMobileUI = isMobile();
10565
+ try {
10566
+ const config2 = useRainbowKitConfig();
10567
+ if (config2.mobileMode === "full") {
10568
+ useMobileUI = false;
10569
+ }
10570
+ } catch (_err) {
10571
+ }
10572
+ if (useMobileUI) {
10608
10573
  return connector ? /* @__PURE__ */ React70.createElement(MobileStatus, { onClose }) : /* @__PURE__ */ React70.createElement(MobileOptions, { onClose });
10609
10574
  }
10610
10575
  return /* @__PURE__ */ React70.createElement(
@@ -10621,7 +10586,7 @@ function ConnectOptions({ onClose }) {
10621
10586
 
10622
10587
  // src/components/ConnectOptions/MultiChainConnectOptions.tsx
10623
10588
  import { useWallet as useWallet4 } from "@solana/wallet-adapter-react";
10624
- import React73, { useContext as useContext25, useCallback as useCallback15, useState as useState30 } from "react";
10589
+ import React73, { useContext as useContext25, useCallback as useCallback15, useState as useState29 } from "react";
10625
10590
 
10626
10591
  // src/components/ChainSelector/ChainSelector.tsx
10627
10592
  import clsx3 from "clsx";
@@ -10687,7 +10652,7 @@ function ChainSelector({
10687
10652
 
10688
10653
  // src/components/SolanaWalletList/SolanaWalletList.tsx
10689
10654
  import { useWallet as useWallet3 } from "@solana/wallet-adapter-react";
10690
- import React72, { useCallback as useCallback14, useState as useState29 } from "react";
10655
+ import React72, { useCallback as useCallback14, useState as useState28 } from "react";
10691
10656
 
10692
10657
  // src/components/SolanaWalletList/SolanaWalletList.css.ts
10693
10658
  var installButton = "lkxkyzc kwh1ip19 kwh1ip1f";
@@ -10704,7 +10669,7 @@ function SolanaWalletList2({
10704
10669
  onError
10705
10670
  }) {
10706
10671
  const { wallets, select, connect, connecting } = useWallet3();
10707
- const [connectingWallet, setConnectingWallet] = useState29(null);
10672
+ const [connectingWallet, setConnectingWallet] = useState28(null);
10708
10673
  const handleWalletClick = useCallback14(
10709
10674
  async (walletName2) => {
10710
10675
  try {
@@ -10778,11 +10743,19 @@ function MultiChainConnectOptions({
10778
10743
  }) {
10779
10744
  const multiChainContext = useContext25(MultiChainContext);
10780
10745
  const { connector } = useContext25(WalletButtonContext);
10746
+ let useMobileUI = isMobile();
10747
+ try {
10748
+ const config2 = useRainbowKitConfig();
10749
+ if (config2.mobileMode === "full") {
10750
+ useMobileUI = false;
10751
+ }
10752
+ } catch (_err) {
10753
+ }
10781
10754
  if (!multiChainContext) {
10782
- return isMobile() ? connector ? /* @__PURE__ */ React73.createElement(MobileStatus, { onClose }) : /* @__PURE__ */ React73.createElement(MobileOptions, { onClose }) : /* @__PURE__ */ React73.createElement(ConnectOptionsModal, { onClose });
10755
+ return useMobileUI ? connector ? /* @__PURE__ */ React73.createElement(MobileStatus, { onClose }) : /* @__PURE__ */ React73.createElement(MobileOptions, { onClose }) : /* @__PURE__ */ React73.createElement(ConnectOptionsModal, { onClose });
10783
10756
  }
10784
10757
  const { activeChain, setActiveChain } = multiChainContext;
10785
- if (isMobile()) {
10758
+ if (useMobileUI) {
10786
10759
  return connector ? /* @__PURE__ */ React73.createElement(MobileStatus, { onClose }) : /* @__PURE__ */ React73.createElement(MobileOptions, { onClose });
10787
10760
  }
10788
10761
  if (showChainSelector) {
@@ -10800,7 +10773,7 @@ function MultiChainConnectOptions({
10800
10773
  function UnifiedWalletList({ onClose }) {
10801
10774
  const { wallets: solanaWallets, select, connecting } = useWallet4();
10802
10775
  const _multiChainContext = useContext25(MultiChainContext);
10803
- const [connectingWallet, setConnectingWallet] = useState30(null);
10776
+ const [connectingWallet, setConnectingWallet] = useState29(null);
10804
10777
  const handleSolanaWalletClick = useCallback15(
10805
10778
  async (walletName2) => {
10806
10779
  try {
@@ -10923,7 +10896,7 @@ function ConnectModal({ onClose, open }) {
10923
10896
 
10924
10897
  // src/components/RainbowKitProvider/ModalContext.tsx
10925
10898
  function useModalStateValue() {
10926
- const [isModalOpen, setModalOpen] = useState31(false);
10899
+ const [isModalOpen, setModalOpen] = useState30(false);
10927
10900
  return {
10928
10901
  closeModal: useCallback16(() => setModalOpen(false), []),
10929
10902
  isModalOpen,
@@ -10954,7 +10927,7 @@ function ModalProvider({ children }) {
10954
10927
  isModalOpen: chainModalOpen,
10955
10928
  openModal: openChainModal
10956
10929
  } = useModalStateValue();
10957
- const [isWalletConnectModalOpen, setIsWalletConnectModalOpen] = useState31(false);
10930
+ const [isWalletConnectModalOpen, setIsWalletConnectModalOpen] = useState30(false);
10958
10931
  const connectionStatus = useConnectionStatus();
10959
10932
  const { chainId } = useAccount17();
10960
10933
  const { chains } = useConfig3();
@@ -10976,7 +10949,7 @@ function ModalProvider({ children }) {
10976
10949
  onConnect: () => closeModals({ keepConnectModalOpen: isUnauthenticated }),
10977
10950
  onDisconnect: () => closeModals()
10978
10951
  });
10979
- useEffect26(() => {
10952
+ useEffect25(() => {
10980
10953
  if (isUnauthenticated)
10981
10954
  closeModals();
10982
10955
  }, [isUnauthenticated, closeModals]);
@@ -11143,21 +11116,21 @@ function ConnectButton({
11143
11116
  const chains = useRainbowKitChains();
11144
11117
  const connectionStatus = useConnectionStatus();
11145
11118
  const { setShowBalance } = useShowBalance();
11146
- const [ready, setReady] = useState32(false);
11119
+ const [ready, setReady] = useState31(false);
11147
11120
  const { i18n: i18n2 } = useContext29(I18nContext);
11148
11121
  const bitcoinWallet = useBitcoinWallet();
11149
- const [rollingChainIndex, setRollingChainIndex] = useState32(0);
11122
+ const [rollingChainIndex, setRollingChainIndex] = useState31(0);
11150
11123
  const chainTypes = [
11151
11124
  "evm",
11152
11125
  "bitcoin",
11153
11126
  "solana"
11154
11127
  ];
11155
- useEffect27(() => {
11128
+ useEffect26(() => {
11156
11129
  setShowBalance(showBalance);
11157
11130
  if (!ready)
11158
11131
  setReady(true);
11159
11132
  }, [showBalance, setShowBalance]);
11160
- useEffect27(() => {
11133
+ useEffect26(() => {
11161
11134
  const interval = setInterval(() => {
11162
11135
  setRollingChainIndex((prev) => (prev + 1) % chainTypes.length);
11163
11136
  }, 1e4);
@@ -11439,9 +11412,9 @@ var maxWidth = "hk857q1";
11439
11412
  // src/components/WalletButton/WalletButtonRenderer.tsx
11440
11413
  import React78, {
11441
11414
  useContext as useContext30,
11442
- useEffect as useEffect28,
11415
+ useEffect as useEffect27,
11443
11416
  useMemo as useMemo14,
11444
- useState as useState33
11417
+ useState as useState32
11445
11418
  } from "react";
11446
11419
  import { useAccount as useAccount19, useAccountEffect as useAccountEffect4 } from "wagmi";
11447
11420
  function WalletButtonRenderer({
@@ -11459,10 +11432,10 @@ function WalletButtonRenderer({
11459
11432
  throw new Error("Connector not found");
11460
11433
  }
11461
11434
  const connectionStatus = useConnectionStatus();
11462
- const [loading, setLoading] = useState33(false);
11463
- const [isError, setIsError] = useState33(false);
11435
+ const [loading, setLoading] = useState32(false);
11436
+ const [isError, setIsError] = useState32(false);
11464
11437
  const mobile = isMobile();
11465
- useEffect28(() => {
11438
+ useEffect27(() => {
11466
11439
  if (!connectModalOpen && connector)
11467
11440
  setConnector(null);
11468
11441
  }, [connectModalOpen, connector, setConnector]);
@@ -12390,6 +12363,43 @@ var __private__ = {
12390
12363
  MobileOptions
12391
12364
  };
12392
12365
 
12366
+ // src/hooks/useDeviceType.ts
12367
+ import { useEffect as useEffect28, useState as useState33 } from "react";
12368
+ var BREAKPOINTS = {
12369
+ mobile: 1024,
12370
+ // 0-1024px (includes phones and tablets)
12371
+ tablet: 1024
12372
+ // Not used (mobile includes tablet)
12373
+ // desktop: 1024+ (everything else)
12374
+ };
12375
+ function getDeviceState(width) {
12376
+ const type = width <= BREAKPOINTS.mobile ? "mobile" : width <= BREAKPOINTS.tablet ? "tablet" : "desktop";
12377
+ return {
12378
+ type,
12379
+ isMobile: type === "mobile",
12380
+ isTablet: type === "tablet",
12381
+ isDesktop: type === "desktop",
12382
+ width
12383
+ };
12384
+ }
12385
+ function useDeviceType() {
12386
+ const [state, setState] = useState33(() => {
12387
+ if (typeof window === "undefined") {
12388
+ return getDeviceState(1920);
12389
+ }
12390
+ return getDeviceState(window.innerWidth);
12391
+ });
12392
+ useEffect28(() => {
12393
+ setState(getDeviceState(window.innerWidth));
12394
+ function handleResize() {
12395
+ setState(getDeviceState(window.innerWidth));
12396
+ }
12397
+ window.addEventListener("resize", handleResize);
12398
+ return () => window.removeEventListener("resize", handleResize);
12399
+ }, []);
12400
+ return state;
12401
+ }
12402
+
12393
12403
  // src/solana/config.ts
12394
12404
  function getDefaultRpcEndpoint(network) {
12395
12405
  switch (network) {
@@ -14,12 +14,12 @@ import "./chunk-VETRBBA2.js";
14
14
  import {
15
15
  trustWallet
16
16
  } from "./chunk-EM6BREIH.js";
17
- import {
18
- valoraWallet
19
- } from "./chunk-CVUEWUDI.js";
20
17
  import {
21
18
  uniswapWallet
22
19
  } from "./chunk-DLDZUVTB.js";
20
+ import {
21
+ valoraWallet
22
+ } from "./chunk-CVUEWUDI.js";
23
23
  import {
24
24
  walletConnectWallet
25
25
  } from "./chunk-KU5R3WAJ.js";
@@ -41,9 +41,6 @@ import {
41
41
  import {
42
42
  safepalWallet
43
43
  } from "./chunk-LRYS2XBT.js";
44
- import {
45
- subWallet
46
- } from "./chunk-OWSLCYOF.js";
47
44
  import {
48
45
  seifWallet
49
46
  } from "./chunk-Y3E6EZ7J.js";
@@ -51,29 +48,32 @@ import {
51
48
  tahoWallet
52
49
  } from "./chunk-UXRQQZ2M.js";
53
50
  import {
54
- tokenPocketWallet
55
- } from "./chunk-RCZCJUTR.js";
51
+ subWallet
52
+ } from "./chunk-OWSLCYOF.js";
56
53
  import {
57
54
  talismanWallet
58
55
  } from "./chunk-B4IG5R5M.js";
56
+ import {
57
+ tokenPocketWallet
58
+ } from "./chunk-RCZCJUTR.js";
59
59
  import {
60
60
  tokenaryWallet
61
61
  } from "./chunk-U24COF36.js";
62
62
  import {
63
- oneKeyWallet
64
- } from "./chunk-6UGYPEQE.js";
63
+ oneInchWallet
64
+ } from "./chunk-OJT577AY.js";
65
65
  import {
66
66
  paraSwapWallet
67
67
  } from "./chunk-FF7ZXD5C.js";
68
68
  import {
69
69
  phantomWallet
70
70
  } from "./chunk-DMQ4RXIY.js";
71
- import {
72
- rabbyWallet
73
- } from "./chunk-3RMYBZQG.js";
74
71
  import {
75
72
  rainbowWallet
76
73
  } from "./chunk-6C3GUS6I.js";
74
+ import {
75
+ rabbyWallet
76
+ } from "./chunk-3RMYBZQG.js";
77
77
  import {
78
78
  ramperWallet
79
79
  } from "./chunk-OX3PQBV2.js";
@@ -105,20 +105,20 @@ import {
105
105
  omniWallet
106
106
  } from "./chunk-RGPO7AY3.js";
107
107
  import {
108
- oneInchWallet
109
- } from "./chunk-OJT577AY.js";
108
+ oneKeyWallet
109
+ } from "./chunk-6UGYPEQE.js";
110
110
  import {
111
111
  imTokenWallet
112
112
  } from "./chunk-EHE2536P.js";
113
113
  import {
114
114
  injectedWallet
115
115
  } from "./chunk-GDGRUMZB.js";
116
- import {
117
- kaiaWallet
118
- } from "./chunk-KE6RMEB7.js";
119
116
  import {
120
117
  iopayWallet
121
118
  } from "./chunk-A2XAHJNR.js";
119
+ import {
120
+ kaiaWallet
121
+ } from "./chunk-KE6RMEB7.js";
122
122
  import {
123
123
  kaikasWallet
124
124
  } from "./chunk-MUJPEDFF.js";
@@ -155,12 +155,12 @@ import {
155
155
  import {
156
156
  gateWallet
157
157
  } from "./chunk-PKSDTWUF.js";
158
- import {
159
- bloomWallet
160
- } from "./chunk-3KPCADAF.js";
161
158
  import {
162
159
  bitverseWallet
163
160
  } from "./chunk-6HCSSBZY.js";
161
+ import {
162
+ bloomWallet
163
+ } from "./chunk-3KPCADAF.js";
164
164
  import {
165
165
  braveWallet
166
166
  } from "./chunk-EYN3CVFM.js";
@@ -173,12 +173,12 @@ import {
173
173
  import {
174
174
  coin98Wallet
175
175
  } from "./chunk-ZFVYS64S.js";
176
- import {
177
- compassWallet
178
- } from "./chunk-3OO564GS.js";
179
176
  import {
180
177
  coinbaseWallet
181
178
  } from "./chunk-PNEDRY6O.js";
179
+ import {
180
+ compassWallet
181
+ } from "./chunk-3OO564GS.js";
182
182
  import {
183
183
  argentWallet
184
184
  } from "./chunk-XT2WYPN5.js";
@@ -188,20 +188,20 @@ import {
188
188
  import {
189
189
  bestWallet
190
190
  } from "./chunk-OPAPBEA5.js";
191
+ import {
192
+ binanceWallet
193
+ } from "./chunk-TUDZHFVC.js";
194
+ import {
195
+ bitskiWallet
196
+ } from "./chunk-DZB25PZ7.js";
191
197
  import {
192
198
  bifrostWallet
193
199
  } from "./chunk-WXXI4WBF.js";
194
200
  import {
195
201
  bitgetWallet
196
202
  } from "./chunk-ITLTDJ3D.js";
197
- import {
198
- binanceWallet
199
- } from "./chunk-TUDZHFVC.js";
200
203
  import "./chunk-RETKWSKD.js";
201
204
  import "./chunk-PODFK4OS.js";
202
- import {
203
- bitskiWallet
204
- } from "./chunk-DZB25PZ7.js";
205
205
  import "./chunk-MBBGZGXF.js";
206
206
  export {
207
207
  abcWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talken/talkenkit",
3
- "version": "2.4.15",
3
+ "version": "2.4.16",
4
4
  "description": "The best way to connect a wallet 🌈 🧰",
5
5
  "files": [
6
6
  "dist",