solariskit 1.4.0 → 1.6.0

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.
@@ -47,6 +47,7 @@ function getExplicitInjectedProvider(flag) {
47
47
  }
48
48
  function getWindowProviderNamespace(namespace) {
49
49
  const providerSearch = (provider, namespace) => {
50
+ if (provider === null || typeof provider !== "object" && typeof provider !== "function") return;
50
51
  const [property, ...path] = namespace.split(".");
51
52
  if (!property) return;
52
53
  const _provider = provider[property];
@@ -87,7 +88,7 @@ function createInjectedConnector(provider) {
87
88
  };
88
89
  }
89
90
  function getInjectedConnector({ flag, namespace, target }) {
90
- return createInjectedConnector(target ? target : getInjectedProvider({
91
+ return createInjectedConnector(typeof target !== "undefined" ? target : getInjectedProvider({
91
92
  flag,
92
93
  namespace
93
94
  }));
@@ -98,7 +99,7 @@ function getInjectedConnector({ flag, namespace, target }) {
98
99
  const injectedWallet = () => ({
99
100
  id: "injected",
100
101
  name: "Browser Wallet",
101
- iconUrl: async () => (await import("./injectedWallet-Bq0gF2WF.js")).default,
102
+ iconUrl: async () => (await import("./injectedWallet-CnP8-uv5.js").then((n) => n.n)).default,
102
103
  iconBackground: "#fff",
103
104
  createConnector: getInjectedConnector({})
104
105
  });
@@ -1,7 +1,6 @@
1
1
 
2
- import { c as walletConnectWallet, i as Wallet, n as DefaultWalletOptions } from "../../Wallet-epUweMuA.js";
2
+ import { c as walletConnectWallet, i as Wallet, n as DefaultWalletOptions } from "../../Wallet-BhiBD1Pn.js";
3
3
  import { BaseAccountParameters } from "wagmi/connectors";
4
-
5
4
  //#region src/wallets/walletConnectors/base/base.d.ts
6
5
  interface BaseOptions {
7
6
  appName: string;
@@ -22,10 +21,7 @@ declare const injectedWallet: () => Wallet;
22
21
  //#endregion
23
22
  //#region src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.d.ts
24
23
  type MetaMaskWalletOptions = DefaultWalletOptions;
25
- declare const metaMaskWallet: ({
26
- projectId,
27
- walletConnectParameters
28
- }: MetaMaskWalletOptions) => Wallet;
24
+ declare const metaMaskWallet: ({ projectId, walletConnectParameters }: MetaMaskWalletOptions) => Wallet;
29
25
  //#endregion
30
26
  //#region src/wallets/walletConnectors/safeWallet/safeWallet.d.ts
31
27
  declare const safeWallet: () => Wallet;
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- import { a as injectedWallet, n as safeWallet, o as base, r as metaMaskWallet, s as baseAccount, t as walletConnectWallet } from "../../walletConnectors-C02JPPxf.js";
2
+ import { a as injectedWallet, n as safeWallet, o as base, r as metaMaskWallet, s as baseAccount, t as walletConnectWallet } from "../../walletConnectors-okw2Nbqq.js";
3
3
 
4
4
  export { base, baseAccount, injectedWallet, metaMaskWallet, safeWallet, walletConnectWallet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solariskit",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "The best way to connect a wallet",
5
5
  "keywords": [
6
6
  "blockchain",
@@ -29,13 +29,18 @@
29
29
  "exports": {
30
30
  ".": "./dist/index.js",
31
31
  "./styles.css": "./dist/index.css",
32
+ "./solana": {
33
+ "types": "./dist/solana/index.d.ts",
34
+ "import": "./dist/solana/index.js"
35
+ },
36
+ "./solana/styles.css": "./dist/index.css",
32
37
  "./wallets": "./dist/wallets/walletConnectors/index.js",
33
38
  "./components": "./dist/components/index.js"
34
39
  },
35
40
  "dependencies": {
36
- "@vanilla-extract/css": "1.20.1",
41
+ "@vanilla-extract/css": "1.21.1",
37
42
  "@vanilla-extract/dynamic": "2.1.5",
38
- "@vanilla-extract/sprinkles": "1.6.5",
43
+ "@vanilla-extract/sprinkles": "1.7.0",
39
44
  "clsx": "2.1.1",
40
45
  "cuer": "0.0.3",
41
46
  "qr": "0.5.5",
@@ -47,40 +52,44 @@
47
52
  "@rollup/plugin-replace": "^6.0.3",
48
53
  "@safe-global/safe-apps-provider": "^0.18.6",
49
54
  "@safe-global/safe-apps-sdk": "^9.1.0",
55
+ "@solana/connector": "^0.2.4",
56
+ "@solana/kit": "^6.10.0",
50
57
  "@tanstack/react-query": "^5.101.2",
51
58
  "@testing-library/dom": "^10.4.1",
52
59
  "@testing-library/jest-dom": "^6.9.1",
53
60
  "@testing-library/react": "^16.3.2",
54
61
  "@testing-library/user-event": "^14.6.1",
55
- "@types/node": "^24.13.2",
62
+ "@types/node": "^26.1.1",
56
63
  "@types/postcss-prefix-selector": "^1.16.3",
57
64
  "@types/react": "^19.2.17",
58
65
  "@types/react-dom": "^19.2.3",
59
66
  "@vanilla-extract/css-utils": "0.1.6",
60
67
  "@vanilla-extract/private": "1.0.9",
61
68
  "@vanilla-extract/rollup-plugin": "^1.5.3",
62
- "@vanilla-extract/vite-plugin": "^5.2.3",
69
+ "@vanilla-extract/vite-plugin": "^5.2.4",
63
70
  "@walletconnect/ethereum-provider": "^2.23.10",
64
71
  "autoprefixer": "^10.5.2",
65
72
  "jsdom": "^29.1.1",
66
- "msw": "^2.14.6",
73
+ "msw": "^2.15.0",
67
74
  "nock": "^14.0.16",
68
75
  "postcss": "^8.5.16",
69
76
  "postcss-prefix-selector": "^2.1.1",
70
77
  "react": "^19.2.7",
71
78
  "react-dom": "^19.2.7",
72
- "tsdown": "^0.22.3",
79
+ "tsdown": "^0.22.4",
73
80
  "typescript": "^6.0.3",
74
- "viem": "^2.53.1",
75
- "vite": "^8.1.0",
76
- "vitest": "^4.1.9",
77
- "wagmi": "^3.6.21",
81
+ "viem": "^2.54.6",
82
+ "vite": "^8.1.3",
83
+ "vitest": "^4.1.10",
84
+ "wagmi": "^3.7.0",
78
85
  "@workspace/typescript-config": "0.0.0"
79
86
  },
80
87
  "peerDependencies": {
81
88
  "@base-org/account": "^2.5.1",
82
89
  "@safe-global/safe-apps-provider": "^0.18.6",
83
90
  "@safe-global/safe-apps-sdk": "^9.1.0",
91
+ "@solana/connector": "^0.2.4",
92
+ "@solana/kit": "^6.10.0",
84
93
  "@tanstack/react-query": ">=5.0.0",
85
94
  "@walletconnect/ethereum-provider": "^2.21.1",
86
95
  "react": "^18 || ^19",
@@ -98,6 +107,12 @@
98
107
  "@safe-global/safe-apps-sdk": {
99
108
  "optional": true
100
109
  },
110
+ "@solana/connector": {
111
+ "optional": true
112
+ },
113
+ "@solana/kit": {
114
+ "optional": true
115
+ },
101
116
  "@walletconnect/ethereum-provider": {
102
117
  "optional": true
103
118
  }
@@ -1,337 +0,0 @@
1
-
2
- import { o as WalletInstance } from "./Wallet-epUweMuA.js";
3
- import React, { JSX, ReactNode } from "react";
4
- import { Address } from "viem";
5
- import { Chain } from "wagmi/chains";
6
- import { RequiredConditionalValue } from "@vanilla-extract/sprinkles";
7
-
8
- //#region src/css/sprinkles.css.d.ts
9
- declare const themeContractValues: {
10
- colors: {
11
- accentColor: string;
12
- accentColorForeground: string;
13
- actionButtonBorder: string;
14
- actionButtonBorderMobile: string;
15
- actionButtonSecondaryBackground: string;
16
- closeButton: string;
17
- closeButtonBackground: string;
18
- connectButtonBackground: string;
19
- connectButtonBackgroundError: string;
20
- connectButtonInnerBackground: string;
21
- connectButtonText: string;
22
- connectButtonTextError: string;
23
- connectionIndicator: string;
24
- downloadBottomCardBackground: string;
25
- downloadTopCardBackground: string;
26
- error: string;
27
- generalBorder: string;
28
- generalBorderDim: string;
29
- menuItemBackground: string;
30
- modalBackdrop: string;
31
- modalBackground: string;
32
- modalBorder: string;
33
- modalText: string;
34
- modalTextDim: string;
35
- modalTextSecondary: string;
36
- profileAction: string;
37
- profileActionHover: string;
38
- profileForeground: string;
39
- selectedOptionBorder: string;
40
- standby: string;
41
- };
42
- fonts: {
43
- body: string;
44
- };
45
- radii: {
46
- actionButton: string;
47
- connectButton: string;
48
- menuButton: string;
49
- modal: string;
50
- modalMobile: string;
51
- };
52
- shadows: {
53
- connectButton: string;
54
- dialog: string;
55
- profileDetailsAction: string;
56
- selectedOption: string;
57
- selectedWallet: string;
58
- walletLogo: string;
59
- };
60
- blurs: {
61
- modalOverlay: string;
62
- };
63
- };
64
- type ThemeVars = typeof themeContractValues;
65
- declare const responsiveProperties: {
66
- conditions: {
67
- defaultCondition: "smallScreen";
68
- conditionNames: ("smallScreen" | "largeScreen")[];
69
- };
70
- styles: {
71
- alignItems: {
72
- values: {
73
- center: {
74
- defaultClass: string;
75
- conditions: {
76
- smallScreen: string;
77
- largeScreen: string;
78
- };
79
- };
80
- "flex-end": {
81
- defaultClass: string;
82
- conditions: {
83
- smallScreen: string;
84
- largeScreen: string;
85
- };
86
- };
87
- "flex-start": {
88
- defaultClass: string;
89
- conditions: {
90
- smallScreen: string;
91
- largeScreen: string;
92
- };
93
- };
94
- };
95
- };
96
- display: {
97
- values: {
98
- flex: {
99
- defaultClass: string;
100
- conditions: {
101
- smallScreen: string;
102
- largeScreen: string;
103
- };
104
- };
105
- none: {
106
- defaultClass: string;
107
- conditions: {
108
- smallScreen: string;
109
- largeScreen: string;
110
- };
111
- };
112
- block: {
113
- defaultClass: string;
114
- conditions: {
115
- smallScreen: string;
116
- largeScreen: string;
117
- };
118
- };
119
- inline: {
120
- defaultClass: string;
121
- conditions: {
122
- smallScreen: string;
123
- largeScreen: string;
124
- };
125
- };
126
- };
127
- };
128
- };
129
- };
130
- type ResponsiveValue<Value extends string | number | boolean> = RequiredConditionalValue<typeof responsiveProperties, Value>;
131
- //#endregion
132
- //#region src/components/RainbowKitProvider/AppContext.d.ts
133
- type DisclaimerComponent = React.FunctionComponent<{
134
- Text: React.FunctionComponent<{
135
- children: ReactNode;
136
- }>;
137
- Link: React.FunctionComponent<{
138
- children: ReactNode;
139
- href: string;
140
- }>;
141
- }>;
142
- //#endregion
143
- //#region src/components/RainbowKitProvider/AvatarContext.d.ts
144
- type AvatarComponentProps = {
145
- address: string;
146
- ensImage?: string | null;
147
- size: number;
148
- };
149
- type AvatarComponent = React.FunctionComponent<AvatarComponentProps>;
150
- //#endregion
151
- //#region src/components/RainbowKitProvider/ModalSizeContext.d.ts
152
- declare const ModalSizeOptions: {
153
- readonly COMPACT: "compact";
154
- readonly WIDE: "wide";
155
- };
156
- type ModalSizes = (typeof ModalSizeOptions)[keyof typeof ModalSizeOptions];
157
- //#endregion
158
- //#region src/components/RainbowKitProvider/RainbowKitProvider.d.ts
159
- type Theme = ThemeVars | {
160
- lightMode: ThemeVars;
161
- darkMode: ThemeVars;
162
- };
163
- interface RainbowKitProviderProps {
164
- initialChain?: Chain | number;
165
- chainSearchThreshold?: number;
166
- id?: string;
167
- children: ReactNode;
168
- theme?: Theme | null;
169
- showRecentTransactions?: boolean;
170
- appInfo?: {
171
- appName?: string;
172
- learnMoreUrl?: string;
173
- disclaimer?: DisclaimerComponent;
174
- };
175
- avatar?: AvatarComponent;
176
- modalSize?: ModalSizes;
177
- }
178
- declare function RainbowKitProvider({
179
- appInfo,
180
- avatar,
181
- chainSearchThreshold,
182
- children,
183
- id,
184
- initialChain,
185
- modalSize,
186
- showRecentTransactions,
187
- theme
188
- }: RainbowKitProviderProps): React.JSX.Element;
189
- //#endregion
190
- //#region src/components/RainbowKitProvider/AuthenticationContext.d.ts
191
- type AuthenticationStatus = "loading" | "unauthenticated" | "authenticated";
192
- interface AuthenticationAdapter<Message> {
193
- getNonce: () => Promise<string>;
194
- createMessage: (args: {
195
- nonce: string;
196
- address: Address;
197
- chainId: number;
198
- }) => Promise<Message> | Message;
199
- verify: (args: {
200
- message: Message;
201
- signature: string;
202
- }) => Promise<boolean>;
203
- signOut: () => Promise<void>;
204
- }
205
- interface AuthenticationConfig<Message> {
206
- adapter: AuthenticationAdapter<Message>;
207
- status: AuthenticationStatus;
208
- }
209
- declare function createAuthenticationAdapter<Message>(adapter: AuthenticationAdapter<Message>): AuthenticationAdapter<Message>;
210
- interface RainbowKitAuthenticationProviderProps<Message> extends AuthenticationConfig<Message> {
211
- enabled?: boolean;
212
- children: ReactNode;
213
- }
214
- declare function RainbowKitAuthenticationProvider<Message = unknown>({
215
- adapter,
216
- children,
217
- enabled,
218
- status
219
- }: RainbowKitAuthenticationProviderProps<Message>): React.JSX.Element;
220
- //#endregion
221
- //#region src/components/ConnectButton/ConnectButtonRenderer.d.ts
222
- interface ConnectButtonRendererProps {
223
- children: (renderProps: {
224
- account?: {
225
- address: string;
226
- balanceDecimals?: number;
227
- balanceFormatted?: string;
228
- balanceSymbol?: string;
229
- displayBalance?: string;
230
- displayName: string;
231
- ensAvatar?: string;
232
- ensName?: string;
233
- hasPendingTransactions: boolean;
234
- };
235
- chain?: {
236
- hasIcon: boolean;
237
- iconUrl?: string;
238
- iconBackground?: string;
239
- id: number;
240
- name?: string;
241
- unsupported?: boolean;
242
- };
243
- mounted: boolean;
244
- authenticationStatus?: AuthenticationStatus;
245
- openAccountModal: () => void;
246
- openChainModal: () => void;
247
- openConnectModal: () => void;
248
- accountModalOpen: boolean;
249
- chainModalOpen: boolean;
250
- connectModalOpen: boolean;
251
- }) => ReactNode;
252
- }
253
- declare function ConnectButtonRenderer({
254
- children
255
- }: ConnectButtonRendererProps): React.JSX.Element;
256
- declare namespace ConnectButtonRenderer {
257
- var displayName: string;
258
- }
259
- //#endregion
260
- //#region src/components/ConnectButton/ConnectButton.d.ts
261
- type AccountStatus = "full" | "avatar" | "address";
262
- interface ConnectButtonProps {
263
- accountStatus?: ResponsiveValue<AccountStatus>;
264
- showBalance?: ResponsiveValue<boolean>;
265
- label?: string;
266
- }
267
- declare function ConnectButton({
268
- accountStatus,
269
- label,
270
- showBalance
271
- }: ConnectButtonProps): React.JSX.Element | null;
272
- declare namespace ConnectButton {
273
- var __defaultProps: {
274
- readonly accountStatus: "full";
275
- readonly label: "Connect Wallet";
276
- readonly showBalance: {
277
- readonly largeScreen: true;
278
- readonly smallScreen: false;
279
- };
280
- };
281
- var Custom: typeof ConnectButtonRenderer;
282
- }
283
- //#endregion
284
- //#region src/components/ChainSelectButton/ChainSelectButton.d.ts
285
- type ChainStatus = "full" | "icon" | "name" | "none";
286
- interface ChainSelectButtonProps {
287
- chainStatus?: ResponsiveValue<ChainStatus>;
288
- fullWidth?: boolean;
289
- }
290
- declare function ChainSelectButton({
291
- chainStatus,
292
- fullWidth
293
- }: ChainSelectButtonProps): React.JSX.Element | null;
294
- declare namespace ChainSelectButton {
295
- var __defaultProps: {
296
- readonly chainStatus: {
297
- readonly largeScreen: "full";
298
- readonly smallScreen: "icon";
299
- };
300
- };
301
- }
302
- //#endregion
303
- //#region src/wallets/useWalletConnectors.d.ts
304
- interface WalletConnector extends WalletInstance {
305
- ready?: boolean;
306
- connect: WalletInstance["connect"];
307
- showWalletConnectModal?: () => void;
308
- recent: boolean;
309
- getDesktopUri?: () => Promise<string>;
310
- getQrCodeUri?: () => Promise<string>;
311
- getMobileUri?: () => Promise<string>;
312
- }
313
- //#endregion
314
- //#region src/components/WalletButton/WalletButtonRenderer.d.ts
315
- interface WalletButtonRendererProps {
316
- wallet?: string;
317
- children: (renderProps: {
318
- error: boolean;
319
- loading: boolean;
320
- connected: boolean;
321
- ready: boolean;
322
- mounted: boolean;
323
- connector: WalletConnector;
324
- connect: () => Promise<void>;
325
- }) => ReactNode;
326
- }
327
- //#endregion
328
- //#region src/components/WalletButton/WalletButton.d.ts
329
- interface WalletButtonProps {
330
- wallet?: string;
331
- }
332
- declare const WalletButton: {
333
- (props: WalletButtonProps): JSX.Element | undefined;
334
- Custom: (props: WalletButtonRendererProps) => ReactNode;
335
- };
336
- //#endregion
337
- export { AvatarComponentProps as _, ChainSelectButtonProps as a, ConnectButtonProps as c, RainbowKitAuthenticationProvider as d, createAuthenticationAdapter as f, AvatarComponent as g, Theme as h, ChainSelectButton as i, AuthenticationConfig as l, RainbowKitProviderProps as m, WalletButtonProps as n, ChainStatus as o, RainbowKitProvider as p, WalletButtonRendererProps as r, ConnectButton as s, WalletButton as t, AuthenticationStatus as u, DisclaimerComponent as v, ThemeVars as y };