solariskit 1.0.0 → 1.1.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.
- package/dist/{WalletButton-DkkREZEg.d.ts → WalletButton-B-bj9FNL.d.ts} +7 -8
- package/dist/{WalletButton-DiROWLU6.js → WalletButton-BWBicKd9.js} +19 -145
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +1 -1
- package/dist/index.d.ts +15 -17
- package/dist/index.js +2 -2
- package/dist/{walletConnectors-CvfKowGR.js → walletConnectors-C02JPPxf.js} +5 -5
- package/dist/wallets/walletConnectors/index.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.js +1 -1
- package/package.json +44 -26
- /package/dist/{Wallet-B3fOxQx_.d.ts → Wallet-epUweMuA.d.ts} +0 -0
- /package/dist/{assets-CTAKUsg7.js → assets-DGFjAppz.js} +0 -0
- /package/dist/{base-BLNzR5ZY.js → base-CioEwoIx.js} +0 -0
- /package/dist/{injectedWallet-Dg7isXIs.js → injectedWallet-Bq0gF2WF.js} +0 -0
- /package/dist/{login-jACia2OZ.js → login-VHg-UliQ.js} +0 -0
- /package/dist/{metaMaskWallet-r9D3peIN.js → metaMaskWallet-Rs3AEK6Y.js} +0 -0
- /package/dist/{safeWallet-B3H2_qec.js → safeWallet-DTOh4YIR.js} +0 -0
- /package/dist/{sign-CzTxopYk.js → sign-DqCbFd_U.js} +0 -0
- /package/dist/{walletConnectWallet-CMhOxkhx.js → walletConnectWallet-Bk6DMfRO.js} +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { o as WalletInstance } from "./Wallet-
|
|
2
|
+
import { o as WalletInstance } from "./Wallet-epUweMuA.js";
|
|
3
3
|
import React, { JSX, ReactNode } from "react";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { Address } from "viem";
|
|
6
5
|
import { Chain } from "wagmi/chains";
|
|
7
6
|
import { RequiredConditionalValue } from "@vanilla-extract/sprinkles";
|
|
@@ -96,7 +95,7 @@ declare const responsiveProperties: {
|
|
|
96
95
|
};
|
|
97
96
|
display: {
|
|
98
97
|
values: {
|
|
99
|
-
|
|
98
|
+
flex: {
|
|
100
99
|
defaultClass: string;
|
|
101
100
|
conditions: {
|
|
102
101
|
smallScreen: string;
|
|
@@ -110,7 +109,7 @@ declare const responsiveProperties: {
|
|
|
110
109
|
largeScreen: string;
|
|
111
110
|
};
|
|
112
111
|
};
|
|
113
|
-
|
|
112
|
+
block: {
|
|
114
113
|
defaultClass: string;
|
|
115
114
|
conditions: {
|
|
116
115
|
smallScreen: string;
|
|
@@ -186,7 +185,7 @@ declare function RainbowKitProvider({
|
|
|
186
185
|
modalSize,
|
|
187
186
|
showRecentTransactions,
|
|
188
187
|
theme
|
|
189
|
-
}: RainbowKitProviderProps):
|
|
188
|
+
}: RainbowKitProviderProps): React.JSX.Element;
|
|
190
189
|
//#endregion
|
|
191
190
|
//#region src/components/RainbowKitProvider/AuthenticationContext.d.ts
|
|
192
191
|
type AuthenticationStatus = "loading" | "unauthenticated" | "authenticated";
|
|
@@ -217,7 +216,7 @@ declare function RainbowKitAuthenticationProvider<Message = unknown>({
|
|
|
217
216
|
children,
|
|
218
217
|
enabled,
|
|
219
218
|
status
|
|
220
|
-
}: RainbowKitAuthenticationProviderProps<Message>):
|
|
219
|
+
}: RainbowKitAuthenticationProviderProps<Message>): React.JSX.Element;
|
|
221
220
|
//#endregion
|
|
222
221
|
//#region src/components/ConnectButton/ConnectButtonRenderer.d.ts
|
|
223
222
|
interface ConnectButtonRendererProps {
|
|
@@ -253,7 +252,7 @@ interface ConnectButtonRendererProps {
|
|
|
253
252
|
}
|
|
254
253
|
declare function ConnectButtonRenderer({
|
|
255
254
|
children
|
|
256
|
-
}: ConnectButtonRendererProps):
|
|
255
|
+
}: ConnectButtonRendererProps): React.JSX.Element;
|
|
257
256
|
declare namespace ConnectButtonRenderer {
|
|
258
257
|
var displayName: string;
|
|
259
258
|
}
|
|
@@ -272,7 +271,7 @@ declare function ConnectButton({
|
|
|
272
271
|
chainStatus,
|
|
273
272
|
label,
|
|
274
273
|
showBalance
|
|
275
|
-
}: ConnectButtonProps):
|
|
274
|
+
}: ConnectButtonProps): React.JSX.Element | null;
|
|
276
275
|
declare namespace ConnectButton {
|
|
277
276
|
var __defaultProps: {
|
|
278
277
|
readonly accountStatus: "full";
|
|
@@ -5,6 +5,7 @@ import { createSprinkles } from "@vanilla-extract/sprinkles/createRuntimeSprinkl
|
|
|
5
5
|
import { useBalance, useConfig, useConnect, useConnection, useConnectionEffect, useConnectors, useDisconnect, useEnsAvatar, useEnsName, usePublicClient, useSignMessage, useSwitchChain } from "wagmi";
|
|
6
6
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import clsx from "clsx";
|
|
8
|
+
import { polyconDataUri } from "@akshatmittal/polycons";
|
|
8
9
|
import { UserRejectedRequestError, formatUnits, isAddress } from "viem";
|
|
9
10
|
import { normalize } from "viem/ens";
|
|
10
11
|
import { mainnet } from "wagmi/chains";
|
|
@@ -1658,125 +1659,6 @@ const SpinnerIcon = ({ height = 21, width = 21 }) => {
|
|
|
1658
1659
|
});
|
|
1659
1660
|
};
|
|
1660
1661
|
|
|
1661
|
-
//#endregion
|
|
1662
|
-
//#region src/components/Avatar/polyconDataUri.ts
|
|
1663
|
-
const neutralPairs = [
|
|
1664
|
-
["#FF5C16", "#FCFCFC"],
|
|
1665
|
-
["#FF5C16", "#131416"],
|
|
1666
|
-
["#D075FF", "#FCFCFC"],
|
|
1667
|
-
["#D075FF", "#131416"],
|
|
1668
|
-
["#BAF24A", "#FCFCFC"],
|
|
1669
|
-
["#BAF24A", "#131416"],
|
|
1670
|
-
["#89B0FF", "#FCFCFC"],
|
|
1671
|
-
["#89B0FF", "#131416"],
|
|
1672
|
-
["#FCFCFC", "#FF5C16"],
|
|
1673
|
-
["#131416", "#FF5C16"],
|
|
1674
|
-
["#FCFCFC", "#D075FF"],
|
|
1675
|
-
["#131416", "#D075FF"],
|
|
1676
|
-
["#FCFCFC", "#BAF24A"],
|
|
1677
|
-
["#131416", "#BAF24A"],
|
|
1678
|
-
["#FCFCFC", "#89B0FF"],
|
|
1679
|
-
["#131416", "#89B0FF"]
|
|
1680
|
-
];
|
|
1681
|
-
const tonalPairs = [
|
|
1682
|
-
["#FFA680", "#FF5C16"],
|
|
1683
|
-
["#661800", "#FF5C16"],
|
|
1684
|
-
["#EAC2FF", "#D075FF"],
|
|
1685
|
-
["#3D065F", "#D075FF"],
|
|
1686
|
-
["#E5FFC3", "#BAF24A"],
|
|
1687
|
-
["#013330", "#BAF24A"],
|
|
1688
|
-
["#CCE7FF", "#89B0FF"],
|
|
1689
|
-
["#190066", "#89B0FF"],
|
|
1690
|
-
["#FF5C16", "#FFA680"],
|
|
1691
|
-
["#FF5C16", "#661800"],
|
|
1692
|
-
["#D075FF", "#EAC2FF"],
|
|
1693
|
-
["#D075FF", "#3D065F"],
|
|
1694
|
-
["#BAF24A", "#E5FFC3"],
|
|
1695
|
-
["#BAF24A", "#013330"],
|
|
1696
|
-
["#89B0FF", "#CCE7FF"],
|
|
1697
|
-
["#89B0FF", "#190066"],
|
|
1698
|
-
["#661800", "#FFA680"],
|
|
1699
|
-
["#FFA680", "#661800"],
|
|
1700
|
-
["#3D065F", "#EAC2FF"],
|
|
1701
|
-
["#EAC2FF", "#3D065F"],
|
|
1702
|
-
["#013330", "#E5FFC3"],
|
|
1703
|
-
["#E5FFC3", "#013330"],
|
|
1704
|
-
["#190066", "#CCE7FF"],
|
|
1705
|
-
["#CCE7FF", "#190066"]
|
|
1706
|
-
];
|
|
1707
|
-
const complementaryPairs = [
|
|
1708
|
-
["#EAC2FF", "#013330"],
|
|
1709
|
-
["#013330", "#EAC2FF"],
|
|
1710
|
-
["#CCE7FF", "#661800"],
|
|
1711
|
-
["#661800", "#CCE7FF"],
|
|
1712
|
-
["#E5FFC3", "#3D065F"],
|
|
1713
|
-
["#3D065F", "#E5FFC3"],
|
|
1714
|
-
["#FFA680", "#190066"],
|
|
1715
|
-
["#190066", "#FFA680"],
|
|
1716
|
-
["#CCE7FF", "#013330"],
|
|
1717
|
-
["#013330", "#CCE7FF"]
|
|
1718
|
-
];
|
|
1719
|
-
const colorPairs = [
|
|
1720
|
-
...neutralPairs,
|
|
1721
|
-
...tonalPairs,
|
|
1722
|
-
...complementaryPairs
|
|
1723
|
-
];
|
|
1724
|
-
function hashSeed(seed) {
|
|
1725
|
-
let hash = 0;
|
|
1726
|
-
for (let i = 0; i < seed.length; i++) hash = seed.charCodeAt(i) + (hash << 6) + (hash << 16) - hash;
|
|
1727
|
-
return hash;
|
|
1728
|
-
}
|
|
1729
|
-
function polyconDataUri(seed, size) {
|
|
1730
|
-
const hash = hashSeed(seed.length < 6 ? seed.padEnd(6, " ") : seed);
|
|
1731
|
-
const [backgroundColor, foregroundColor] = colorPairs[Math.abs(hash) % colorPairs.length] ?? ["#FF5C16", "#FCFCFC"];
|
|
1732
|
-
const grid = 2;
|
|
1733
|
-
const margin = size * .25;
|
|
1734
|
-
const cellSize = (size - 2 * margin) / grid;
|
|
1735
|
-
const filledGrid = Array.from({ length: grid }, () => Array.from({ length: grid }, () => false));
|
|
1736
|
-
const stack = [[Math.floor(grid / 2), Math.floor(grid / 2)]];
|
|
1737
|
-
let pathData = "";
|
|
1738
|
-
if (filledGrid[1]) filledGrid[1][1] = true;
|
|
1739
|
-
while (stack.length > 0) {
|
|
1740
|
-
const currentCell = stack.pop();
|
|
1741
|
-
if (!currentCell) continue;
|
|
1742
|
-
const [x, y] = currentCell;
|
|
1743
|
-
const cellHash = Math.abs(hash >> x * 3 + y * 5) & 15;
|
|
1744
|
-
const neighbors = [];
|
|
1745
|
-
for (const [dx, dy] of [
|
|
1746
|
-
[0, 1],
|
|
1747
|
-
[1, 0],
|
|
1748
|
-
[0, -1],
|
|
1749
|
-
[-1, 0]
|
|
1750
|
-
]) {
|
|
1751
|
-
const nextX = x + dx;
|
|
1752
|
-
const nextY = y + dy;
|
|
1753
|
-
if (nextX >= 0 && nextX < grid && nextY >= 0 && nextY < grid && !filledGrid[nextX]?.[nextY]) neighbors.push([nextX, nextY]);
|
|
1754
|
-
}
|
|
1755
|
-
while (neighbors.length > 0) {
|
|
1756
|
-
const neighborIndex = Math.abs(cellHash + neighbors.length) % neighbors.length;
|
|
1757
|
-
const nextCell = neighbors.splice(neighborIndex, 1)[0];
|
|
1758
|
-
if (!nextCell) continue;
|
|
1759
|
-
const [nextX, nextY] = nextCell;
|
|
1760
|
-
stack.push(nextCell);
|
|
1761
|
-
if (filledGrid[nextX]) filledGrid[nextX][nextY] = true;
|
|
1762
|
-
}
|
|
1763
|
-
const rotation = cellHash % 4 * 90;
|
|
1764
|
-
const isSquare = cellHash % 5 === 0;
|
|
1765
|
-
const cx = margin + x * cellSize;
|
|
1766
|
-
const cy = margin + y * cellSize;
|
|
1767
|
-
if (isSquare) {
|
|
1768
|
-
pathData += `M${cx},${cy} h${cellSize} v${cellSize} h-${cellSize}z `;
|
|
1769
|
-
continue;
|
|
1770
|
-
}
|
|
1771
|
-
if (rotation === 0) pathData += `M${cx},${cy} h${cellSize} v${cellSize}z `;
|
|
1772
|
-
else if (rotation === 90) pathData += `M${cx + cellSize},${cy} v${cellSize} h-${cellSize}z `;
|
|
1773
|
-
else if (rotation === 180) pathData += `M${cx + cellSize},${cy + cellSize} h-${cellSize} v-${cellSize}z `;
|
|
1774
|
-
else pathData += `M${cx},${cy + cellSize} v-${cellSize} h${cellSize}z `;
|
|
1775
|
-
}
|
|
1776
|
-
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${size} ${size}"><rect width="${size}" height="${size}" fill="${backgroundColor}"/><path d="${pathData.trim()}" fill="${foregroundColor}"/></svg>`;
|
|
1777
|
-
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
1662
|
//#endregion
|
|
1781
1663
|
//#region src/components/Avatar/EmojiAvatar.tsx
|
|
1782
1664
|
const EmojiAvatar = ({ address, ensImage, size }) => {
|
|
@@ -2696,7 +2578,7 @@ function setRainbowKitVersion({ version }) {
|
|
|
2696
2578
|
}
|
|
2697
2579
|
function useFingerprint() {
|
|
2698
2580
|
const fingerprint = useCallback(() => {
|
|
2699
|
-
setRainbowKitVersion({ version: "1.
|
|
2581
|
+
setRainbowKitVersion({ version: "1.1.0" });
|
|
2700
2582
|
}, []);
|
|
2701
2583
|
useEffect(() => {
|
|
2702
2584
|
fingerprint();
|
|
@@ -2860,7 +2742,7 @@ function useWalletConnectors(mergeEIP6963WithRkConnectors = false) {
|
|
|
2860
2742
|
|
|
2861
2743
|
//#endregion
|
|
2862
2744
|
//#region src/components/Icons/Assets.tsx
|
|
2863
|
-
const src$1 = async () => (await import("./assets-
|
|
2745
|
+
const src$1 = async () => (await import("./assets-DGFjAppz.js")).default;
|
|
2864
2746
|
const preloadAssetsIcon = () => loadImages(src$1);
|
|
2865
2747
|
const AssetsIcon = () => /* @__PURE__ */ jsx(AsyncImage, {
|
|
2866
2748
|
background: "#d0d5de",
|
|
@@ -2872,7 +2754,7 @@ const AssetsIcon = () => /* @__PURE__ */ jsx(AsyncImage, {
|
|
|
2872
2754
|
|
|
2873
2755
|
//#endregion
|
|
2874
2756
|
//#region src/components/Icons/Login.tsx
|
|
2875
|
-
const src = async () => (await import("./login-
|
|
2757
|
+
const src = async () => (await import("./login-VHg-UliQ.js")).default;
|
|
2876
2758
|
const preloadLoginIcon = () => loadImages(src);
|
|
2877
2759
|
const LoginIcon = () => /* @__PURE__ */ jsx(AsyncImage, {
|
|
2878
2760
|
background: "#d0d5de",
|
|
@@ -3030,7 +2912,7 @@ const CloseButton = ({ "aria-label": ariaLabel = "Close", onClose }) => {
|
|
|
3030
2912
|
|
|
3031
2913
|
//#endregion
|
|
3032
2914
|
//#region src/components/SignIn/SignIn.tsx
|
|
3033
|
-
const signInIcon = async () => (await import("./sign-
|
|
2915
|
+
const signInIcon = async () => (await import("./sign-DqCbFd_U.js")).default;
|
|
3034
2916
|
function SignIn({ onClose, onCloseModal }) {
|
|
3035
2917
|
const [{ status, ...state }, setState] = React.useState({ status: "idle" });
|
|
3036
2918
|
const authAdapter = useAuthenticationAdapter();
|
|
@@ -3481,9 +3363,7 @@ function abbreviateETHBalance(number) {
|
|
|
3481
3363
|
//#endregion
|
|
3482
3364
|
//#region src/components/ConnectButton/formatAddress.ts
|
|
3483
3365
|
function formatAddress(address) {
|
|
3484
|
-
|
|
3485
|
-
const trailingChars = 4;
|
|
3486
|
-
return address.length < leadingChars + trailingChars ? address : `${address.substring(0, leadingChars)}\u2026${address.substring(address.length - trailingChars)}`;
|
|
3366
|
+
return address.length < 8 ? address : `${address.substring(0, 4)}\u2026${address.substring(address.length - 4)}`;
|
|
3487
3367
|
}
|
|
3488
3368
|
|
|
3489
3369
|
//#endregion
|
|
@@ -4808,12 +4688,6 @@ function ConnectDetail({ compactModeEnabled, connectionError, onClose, qrCodeUri
|
|
|
4808
4688
|
|
|
4809
4689
|
//#endregion
|
|
4810
4690
|
//#region src/components/ConnectOptions/DesktopOptions.tsx
|
|
4811
|
-
let WalletStep = /* @__PURE__ */ function(WalletStep) {
|
|
4812
|
-
WalletStep["None"] = "NONE";
|
|
4813
|
-
WalletStep["LearnCompact"] = "LEARN_COMPACT";
|
|
4814
|
-
WalletStep["Connect"] = "CONNECT";
|
|
4815
|
-
return WalletStep;
|
|
4816
|
-
}({});
|
|
4817
4691
|
function DesktopOptions({ onClose }) {
|
|
4818
4692
|
const titleId = "rk_connect_title";
|
|
4819
4693
|
const [selectedOptionId, setSelectedOptionId] = useState();
|
|
@@ -4821,7 +4695,7 @@ function DesktopOptions({ onClose }) {
|
|
|
4821
4695
|
const [qrCodeUri, setQrCodeUri] = useState();
|
|
4822
4696
|
const hasQrCode = !!selectedWallet?.qrCode && qrCodeUri;
|
|
4823
4697
|
const [connectionError, setConnectionError] = useState(false);
|
|
4824
|
-
const [walletStep, setWalletStep] = useState(
|
|
4698
|
+
const [walletStep, setWalletStep] = useState("NONE");
|
|
4825
4699
|
const compactModeEnabled = useContext(ModalSizeContext) === ModalSizeOptions.COMPACT;
|
|
4826
4700
|
const { disclaimer: Disclaimer } = useContext(AppContext);
|
|
4827
4701
|
const safari = isSafari();
|
|
@@ -4858,7 +4732,7 @@ function DesktopOptions({ onClose }) {
|
|
|
4858
4732
|
setQrCodeUri(uri);
|
|
4859
4733
|
setTimeout(() => {
|
|
4860
4734
|
setSelectedWallet(sWallet);
|
|
4861
|
-
changeWalletStep(
|
|
4735
|
+
changeWalletStep("CONNECT");
|
|
4862
4736
|
}, uri ? 0 : 50);
|
|
4863
4737
|
};
|
|
4864
4738
|
const selectWallet = async (wallet) => {
|
|
@@ -4877,7 +4751,7 @@ function DesktopOptions({ onClose }) {
|
|
|
4877
4751
|
selectWalletRef.current = selectWallet;
|
|
4878
4752
|
useEffect(() => {
|
|
4879
4753
|
if (connector && !initialized.current) {
|
|
4880
|
-
setWalletStep(
|
|
4754
|
+
setWalletStep("CONNECT");
|
|
4881
4755
|
selectWalletRef.current?.(connector);
|
|
4882
4756
|
initialized.current = true;
|
|
4883
4757
|
}
|
|
@@ -4898,18 +4772,18 @@ function DesktopOptions({ onClose }) {
|
|
|
4898
4772
|
setConnectionError(false);
|
|
4899
4773
|
}, [walletStep, selectedWallet]);
|
|
4900
4774
|
switch (walletStep) {
|
|
4901
|
-
case
|
|
4775
|
+
case "NONE":
|
|
4902
4776
|
walletContent = /* @__PURE__ */ jsx(ConnectModalIntro, { getWallet: () => window.open(GET_WALLET_URL, "_blank", "noopener,noreferrer") });
|
|
4903
4777
|
break;
|
|
4904
|
-
case
|
|
4778
|
+
case "LEARN_COMPACT":
|
|
4905
4779
|
walletContent = /* @__PURE__ */ jsx(ConnectModalIntro, {
|
|
4906
4780
|
compactModeEnabled,
|
|
4907
4781
|
getWallet: () => window.open(GET_WALLET_URL, "_blank", "noopener,noreferrer")
|
|
4908
4782
|
});
|
|
4909
4783
|
headerLabel = t("intro.title");
|
|
4910
|
-
headerBackButtonLink =
|
|
4784
|
+
headerBackButtonLink = "NONE";
|
|
4911
4785
|
break;
|
|
4912
|
-
case
|
|
4786
|
+
case "CONNECT":
|
|
4913
4787
|
walletContent = selectedWallet && /* @__PURE__ */ jsx(ConnectDetail, {
|
|
4914
4788
|
compactModeEnabled,
|
|
4915
4789
|
connectionError,
|
|
@@ -4919,7 +4793,7 @@ function DesktopOptions({ onClose }) {
|
|
|
4919
4793
|
wallet: selectedWallet
|
|
4920
4794
|
});
|
|
4921
4795
|
headerLabel = hasQrCode && (selectedWallet.name === "WalletConnect" ? t("connect_scan.fallback_title") : t("connect_scan.title", { wallet: selectedWallet.name }));
|
|
4922
|
-
headerBackButtonLink = compactModeEnabled ? connector ? null :
|
|
4796
|
+
headerBackButtonLink = compactModeEnabled ? connector ? null : "NONE" : null;
|
|
4923
4797
|
headerBackButtonCallback = compactModeEnabled ? !connector ? clearSelectedWallet : () => {} : () => {};
|
|
4924
4798
|
break;
|
|
4925
4799
|
default: break;
|
|
@@ -4928,7 +4802,7 @@ function DesktopOptions({ onClose }) {
|
|
|
4928
4802
|
display: "flex",
|
|
4929
4803
|
flexDirection: "row",
|
|
4930
4804
|
style: { maxHeight: compactModeEnabled ? 468 : 504 },
|
|
4931
|
-
children: [(compactModeEnabled ? walletStep ===
|
|
4805
|
+
children: [(compactModeEnabled ? walletStep === "NONE" : true) && /* @__PURE__ */ jsxs(Box, {
|
|
4932
4806
|
className: compactModeEnabled ? "_1c95jmh4" : "_1c95jmh3",
|
|
4933
4807
|
display: "flex",
|
|
4934
4808
|
flexDirection: "column",
|
|
@@ -4941,7 +4815,7 @@ function DesktopOptions({ onClose }) {
|
|
|
4941
4815
|
compactModeEnabled && Disclaimer && /* @__PURE__ */ jsx(Box, {
|
|
4942
4816
|
marginLeft: "16",
|
|
4943
4817
|
width: "28",
|
|
4944
|
-
children: /* @__PURE__ */ jsx(InfoButton, { onClick: () => changeWalletStep(
|
|
4818
|
+
children: /* @__PURE__ */ jsx(InfoButton, { onClick: () => changeWalletStep("LEARN_COMPACT") })
|
|
4945
4819
|
}),
|
|
4946
4820
|
compactModeEnabled && !Disclaimer && /* @__PURE__ */ jsx(Box, {
|
|
4947
4821
|
marginLeft: "16",
|
|
@@ -5038,7 +4912,7 @@ function DesktopOptions({ onClose }) {
|
|
|
5038
4912
|
hover: "grow"
|
|
5039
4913
|
}),
|
|
5040
4914
|
cursor: "pointer",
|
|
5041
|
-
onClick: () => changeWalletStep(
|
|
4915
|
+
onClick: () => changeWalletStep("LEARN_COMPACT"),
|
|
5042
4916
|
paddingY: "4",
|
|
5043
4917
|
style: { willChange: "transform" },
|
|
5044
4918
|
transition: "default",
|
|
@@ -5052,7 +4926,7 @@ function DesktopOptions({ onClose }) {
|
|
|
5052
4926
|
})]
|
|
5053
4927
|
})] })
|
|
5054
4928
|
]
|
|
5055
|
-
}), (compactModeEnabled ? walletStep !==
|
|
4929
|
+
}), (compactModeEnabled ? walletStep !== "NONE" : true) && /* @__PURE__ */ jsxs(Fragment$1, { children: [!compactModeEnabled && /* @__PURE__ */ jsx(Box, {
|
|
5056
4930
|
background: "generalBorder",
|
|
5057
4931
|
minWidth: "1",
|
|
5058
4932
|
width: "1"
|
|
@@ -5137,7 +5011,7 @@ const LoadingSpinner = ({ wallet }) => {
|
|
|
5137
5011
|
const width = 80;
|
|
5138
5012
|
const height = 80;
|
|
5139
5013
|
const radiusFactor = 20;
|
|
5140
|
-
const perimeter = 2 * (
|
|
5014
|
+
const perimeter = 2 * (160 - 4 * radiusFactor);
|
|
5141
5015
|
return /* @__PURE__ */ jsxs("svg", {
|
|
5142
5016
|
className: spinner,
|
|
5143
5017
|
viewBox: "0 0 86 86",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as ConnectButtonProps, d as RainbowKitProviderProps, i as ConnectButton, m as AvatarComponentProps, n as WalletButtonProps, p as AvatarComponent, t as WalletButton, u as RainbowKitProvider } from "../WalletButton-
|
|
3
|
-
import
|
|
2
|
+
import { a as ConnectButtonProps, d as RainbowKitProviderProps, i as ConnectButton, m as AvatarComponentProps, n as WalletButtonProps, p as AvatarComponent, t as WalletButton, u as RainbowKitProvider } from "../WalletButton-B-bj9FNL.js";
|
|
3
|
+
import React from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/Avatar/Avatar.d.ts
|
|
6
6
|
interface AvatarProps {
|
|
@@ -14,7 +14,7 @@ declare function Avatar({
|
|
|
14
14
|
imageUrl,
|
|
15
15
|
loading,
|
|
16
16
|
size
|
|
17
|
-
}: AvatarProps):
|
|
17
|
+
}: AvatarProps): React.JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/components/Avatar/EmojiAvatar.d.ts
|
|
20
20
|
declare const EmojiAvatar: AvatarComponent;
|
|
@@ -136,7 +136,7 @@ interface AccountModalProps {
|
|
|
136
136
|
declare function AccountModal({
|
|
137
137
|
onClose,
|
|
138
138
|
open
|
|
139
|
-
}: AccountModalProps):
|
|
139
|
+
}: AccountModalProps): React.JSX.Element | null;
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region src/components/ChainModal/ChainModal.d.ts
|
|
142
142
|
interface ChainModalProps {
|
|
@@ -146,6 +146,6 @@ interface ChainModalProps {
|
|
|
146
146
|
declare function ChainModal({
|
|
147
147
|
onClose,
|
|
148
148
|
open
|
|
149
|
-
}: ChainModalProps):
|
|
149
|
+
}: ChainModalProps): React.JSX.Element | null;
|
|
150
150
|
//#endregion
|
|
151
151
|
export { AccountModal, type AccountModalProps, Avatar, type AvatarProps, ChainModal, type ChainModalProps, ConnectButton, type ConnectButtonProps, EmojiAvatar, type AvatarComponentProps as EmojiAvatarProps, RainbowKitProvider, type RainbowKitProviderProps, WalletButton, type WalletButtonProps, emojiAvatarForAddress };
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { b as EmojiAvatar, c as ChainModal, f as RainbowKitProvider, l as AccountModal, n as ConnectButton, t as WalletButton, y as Avatar } from "../WalletButton-
|
|
2
|
+
import { b as EmojiAvatar, c as ChainModal, f as RainbowKitProvider, l as AccountModal, n as ConnectButton, t as WalletButton, y as Avatar } from "../WalletButton-BWBicKd9.js";
|
|
3
3
|
|
|
4
4
|
//#region src/components/Avatar/emojiAvatarForAddress.ts
|
|
5
5
|
const colors = [
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as RainbowKitAuthenticationProvider, d as RainbowKitProviderProps, f as Theme, g as ThemeVars, h as DisclaimerComponent, i as ConnectButton, l as createAuthenticationAdapter, o as AuthenticationConfig, p as AvatarComponent, r as WalletButtonRendererProps, s as AuthenticationStatus, t as WalletButton, u as RainbowKitProvider } from "./WalletButton-
|
|
3
|
-
import { a as WalletDetailsParams, i as Wallet, r as RainbowKitWalletConnectParameters, s as WalletList, t as CreateConnector } from "./Wallet-
|
|
4
|
-
import { ReactNode } from "react";
|
|
5
|
-
import * as _$wagmi from "wagmi";
|
|
2
|
+
import { c as RainbowKitAuthenticationProvider, d as RainbowKitProviderProps, f as Theme, g as ThemeVars, h as DisclaimerComponent, i as ConnectButton, l as createAuthenticationAdapter, o as AuthenticationConfig, p as AvatarComponent, r as WalletButtonRendererProps, s as AuthenticationStatus, t as WalletButton, u as RainbowKitProvider } from "./WalletButton-B-bj9FNL.js";
|
|
3
|
+
import { a as WalletDetailsParams, i as Wallet, r as RainbowKitWalletConnectParameters, s as WalletList, t as CreateConnector } from "./Wallet-epUweMuA.js";
|
|
4
|
+
import React, { ReactNode } from "react";
|
|
6
5
|
import { CreateConfigParameters, CreateConnectorFn } from "wagmi";
|
|
7
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
6
|
import { Transport } from "viem";
|
|
9
7
|
import { Chain } from "wagmi/chains";
|
|
10
8
|
|
|
@@ -35,7 +33,7 @@ declare const getDefaultConfig: <chains extends _chains, transports extends _tra
|
|
|
35
33
|
projectId,
|
|
36
34
|
walletConnectParameters,
|
|
37
35
|
...wagmiParameters
|
|
38
|
-
}: GetDefaultConfigParameters<chains, transports>) =>
|
|
36
|
+
}: GetDefaultConfigParameters<chains, transports>) => import("wagmi").Config<chains, transports, import("wagmi").CreateConnectorFn[]>;
|
|
39
37
|
//#endregion
|
|
40
38
|
//#region src/wallets/connectorsForWallets.d.ts
|
|
41
39
|
interface ConnectorsForWalletsParameters {
|
|
@@ -171,6 +169,9 @@ declare const lightTheme: {
|
|
|
171
169
|
selectedWallet: string;
|
|
172
170
|
walletLogo: string;
|
|
173
171
|
};
|
|
172
|
+
fonts: {
|
|
173
|
+
body: string;
|
|
174
|
+
};
|
|
174
175
|
radii: {
|
|
175
176
|
actionButton: string;
|
|
176
177
|
connectButton: string;
|
|
@@ -178,9 +179,6 @@ declare const lightTheme: {
|
|
|
178
179
|
modal: string;
|
|
179
180
|
modalMobile: string;
|
|
180
181
|
};
|
|
181
|
-
fonts: {
|
|
182
|
-
body: string;
|
|
183
|
-
};
|
|
184
182
|
blurs: {
|
|
185
183
|
modalOverlay: string;
|
|
186
184
|
};
|
|
@@ -235,6 +233,9 @@ declare const darkTheme: {
|
|
|
235
233
|
selectedWallet: string;
|
|
236
234
|
walletLogo: string;
|
|
237
235
|
};
|
|
236
|
+
fonts: {
|
|
237
|
+
body: string;
|
|
238
|
+
};
|
|
238
239
|
radii: {
|
|
239
240
|
actionButton: string;
|
|
240
241
|
connectButton: string;
|
|
@@ -242,9 +243,6 @@ declare const darkTheme: {
|
|
|
242
243
|
modal: string;
|
|
243
244
|
modalMobile: string;
|
|
244
245
|
};
|
|
245
|
-
fonts: {
|
|
246
|
-
body: string;
|
|
247
|
-
};
|
|
248
246
|
blurs: {
|
|
249
247
|
modalOverlay: string;
|
|
250
248
|
};
|
|
@@ -299,6 +297,9 @@ declare const midnightTheme: {
|
|
|
299
297
|
selectedWallet: string;
|
|
300
298
|
walletLogo: string;
|
|
301
299
|
};
|
|
300
|
+
fonts: {
|
|
301
|
+
body: string;
|
|
302
|
+
};
|
|
302
303
|
radii: {
|
|
303
304
|
actionButton: string;
|
|
304
305
|
connectButton: string;
|
|
@@ -306,9 +307,6 @@ declare const midnightTheme: {
|
|
|
306
307
|
modal: string;
|
|
307
308
|
modalMobile: string;
|
|
308
309
|
};
|
|
309
|
-
fonts: {
|
|
310
|
-
body: string;
|
|
311
|
-
};
|
|
312
310
|
blurs: {
|
|
313
311
|
modalOverlay: string;
|
|
314
312
|
};
|
|
@@ -335,14 +333,14 @@ declare function DesktopOptions({
|
|
|
335
333
|
onClose
|
|
336
334
|
}: {
|
|
337
335
|
onClose: () => void;
|
|
338
|
-
}):
|
|
336
|
+
}): React.JSX.Element;
|
|
339
337
|
//#endregion
|
|
340
338
|
//#region src/components/ConnectOptions/MobileOptions.d.ts
|
|
341
339
|
declare function MobileOptions({
|
|
342
340
|
onClose
|
|
343
341
|
}: {
|
|
344
342
|
onClose: () => void;
|
|
345
|
-
}):
|
|
343
|
+
}): React.JSX.Element;
|
|
346
344
|
//#endregion
|
|
347
345
|
//#region src/__private__/index.d.ts
|
|
348
346
|
declare const __private__: {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { S as createAuthenticationAdapter, _ as useTransactionStore, a as useConnectModal, d as dialogContentMobile, f as RainbowKitProvider, g as cssObjectFromTheme, h as cssStringFromTheme, i as useChainModal, m as baseTheme, n as ConnectButton, o as MobileOptions, p as lightTheme, r as useAccountModal, s as DesktopOptions, t as WalletButton, u as dialogContent, v as useChainId, x as RainbowKitAuthenticationProvider } from "./WalletButton-
|
|
3
|
-
import { a as injectedWallet, i as getWalletConnectConnector, n as safeWallet, o as base, r as metaMaskWallet, t as walletConnectWallet } from "./walletConnectors-
|
|
2
|
+
import { S as createAuthenticationAdapter, _ as useTransactionStore, a as useConnectModal, d as dialogContentMobile, f as RainbowKitProvider, g as cssObjectFromTheme, h as cssStringFromTheme, i as useChainModal, m as baseTheme, n as ConnectButton, o as MobileOptions, p as lightTheme, r as useAccountModal, s as DesktopOptions, t as WalletButton, u as dialogContent, v as useChainId, x as RainbowKitAuthenticationProvider } from "./WalletButton-BWBicKd9.js";
|
|
3
|
+
import { a as injectedWallet, i as getWalletConnectConnector, n as safeWallet, o as base, r as metaMaskWallet, t as walletConnectWallet } from "./walletConnectors-C02JPPxf.js";
|
|
4
4
|
import { useCallback } from "react";
|
|
5
5
|
import { createConfig, http, useConnection } from "wagmi";
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ const base = ({ appName, appIcon }) => {
|
|
|
11
11
|
name: "Base",
|
|
12
12
|
shortName: "Base",
|
|
13
13
|
rdns: "app.base.account",
|
|
14
|
-
iconUrl: async () => (await import("./base-
|
|
14
|
+
iconUrl: async () => (await import("./base-CioEwoIx.js")).default,
|
|
15
15
|
iconAccent: "#0000FF",
|
|
16
16
|
iconBackground: "#0000FF",
|
|
17
17
|
installed: true,
|
|
@@ -98,7 +98,7 @@ function getInjectedConnector({ flag, namespace, target }) {
|
|
|
98
98
|
const injectedWallet = () => ({
|
|
99
99
|
id: "injected",
|
|
100
100
|
name: "Browser Wallet",
|
|
101
|
-
iconUrl: async () => (await import("./injectedWallet-
|
|
101
|
+
iconUrl: async () => (await import("./injectedWallet-Bq0gF2WF.js")).default,
|
|
102
102
|
iconBackground: "#fff",
|
|
103
103
|
createConnector: getInjectedConnector({})
|
|
104
104
|
});
|
|
@@ -159,7 +159,7 @@ const metaMaskWallet = ({ projectId, walletConnectParameters }) => ({
|
|
|
159
159
|
name: "MetaMask Mobile",
|
|
160
160
|
shortName: "MetaMask",
|
|
161
161
|
rdns: "io.metamask.mobile",
|
|
162
|
-
iconUrl: async () => (await import("./metaMaskWallet-
|
|
162
|
+
iconUrl: async () => (await import("./metaMaskWallet-Rs3AEK6Y.js")).default,
|
|
163
163
|
iconAccent: "#f6851a",
|
|
164
164
|
iconBackground: "#fff",
|
|
165
165
|
mobile: { getUri: (uri) => `https://metamask.app.link/wc?uri=${encodeURIComponent(uri)}` },
|
|
@@ -177,7 +177,7 @@ const safeWallet = () => ({
|
|
|
177
177
|
name: "Safe",
|
|
178
178
|
iconAccent: "#12ff80",
|
|
179
179
|
iconBackground: "#fff",
|
|
180
|
-
iconUrl: async () => (await import("./safeWallet-
|
|
180
|
+
iconUrl: async () => (await import("./safeWallet-DTOh4YIR.js")).default,
|
|
181
181
|
installed: !(typeof window === "undefined") && window?.parent !== window,
|
|
182
182
|
createConnector: (walletDetails) => {
|
|
183
183
|
return createConnector((config) => ({
|
|
@@ -195,7 +195,7 @@ const walletConnectWallet = ({ projectId, options }) => {
|
|
|
195
195
|
id: "walletConnect",
|
|
196
196
|
name: "WalletConnect",
|
|
197
197
|
installed: void 0,
|
|
198
|
-
iconUrl: async () => (await import("./walletConnectWallet-
|
|
198
|
+
iconUrl: async () => (await import("./walletConnectWallet-Bk6DMfRO.js")).default,
|
|
199
199
|
iconBackground: "#3b99fc",
|
|
200
200
|
qrCode: { getUri },
|
|
201
201
|
createConnector: getWalletConnectConnector({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { c as walletConnectWallet, i as Wallet, n as DefaultWalletOptions } from "../../Wallet-
|
|
2
|
+
import { c as walletConnectWallet, i as Wallet, n as DefaultWalletOptions } from "../../Wallet-epUweMuA.js";
|
|
3
3
|
import { BaseAccountParameters } from "wagmi/connectors";
|
|
4
4
|
|
|
5
5
|
//#region src/wallets/walletConnectors/base/base.d.ts
|
|
@@ -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-
|
|
2
|
+
import { a as injectedWallet, n as safeWallet, o as base, r as metaMaskWallet, s as baseAccount, t as walletConnectWallet } from "../../walletConnectors-C02JPPxf.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.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "The best way to connect a wallet",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blockchain",
|
|
@@ -33,58 +33,76 @@
|
|
|
33
33
|
"./components": "./dist/components/index.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@base-org/account": "^2.5.3",
|
|
37
|
-
"@coinbase/wallet-sdk": "^4.3.7",
|
|
38
|
-
"@safe-global/safe-apps-provider": "^0.18.6",
|
|
39
|
-
"@safe-global/safe-apps-sdk": "^9.1.0",
|
|
40
36
|
"@vanilla-extract/css": "1.20.1",
|
|
41
37
|
"@vanilla-extract/dynamic": "2.1.5",
|
|
42
38
|
"@vanilla-extract/sprinkles": "1.6.5",
|
|
43
|
-
"@walletconnect/ethereum-provider": "^2.23.9",
|
|
44
39
|
"clsx": "2.1.1",
|
|
45
40
|
"cuer": "0.0.3",
|
|
46
|
-
"react-remove-scroll": "2.7.2"
|
|
41
|
+
"react-remove-scroll": "2.7.2",
|
|
42
|
+
"@akshatmittal/polycons": "1.1.0"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
45
|
+
"@base-org/account": "^2.5.6",
|
|
49
46
|
"@rollup/plugin-replace": "^6.0.3",
|
|
50
|
-
"@
|
|
47
|
+
"@safe-global/safe-apps-provider": "^0.18.6",
|
|
48
|
+
"@safe-global/safe-apps-sdk": "^9.1.0",
|
|
49
|
+
"@tanstack/react-query": "^5.100.14",
|
|
51
50
|
"@testing-library/dom": "^10.4.1",
|
|
52
51
|
"@testing-library/jest-dom": "^6.9.1",
|
|
53
52
|
"@testing-library/react": "^16.3.2",
|
|
54
53
|
"@testing-library/user-event": "^14.6.1",
|
|
55
54
|
"@types/node": "^24.12.2",
|
|
56
55
|
"@types/postcss-prefix-selector": "^1.16.3",
|
|
57
|
-
"@types/react": "^19.2.
|
|
56
|
+
"@types/react": "^19.2.16",
|
|
58
57
|
"@types/react-dom": "^19.2.3",
|
|
59
58
|
"@vanilla-extract/css-utils": "0.1.6",
|
|
60
59
|
"@vanilla-extract/private": "1.0.9",
|
|
61
60
|
"@vanilla-extract/rollup-plugin": "^1.5.3",
|
|
62
61
|
"@vanilla-extract/vite-plugin": "^5.2.2",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
62
|
+
"@walletconnect/ethereum-provider": "^2.23.9",
|
|
63
|
+
"autoprefixer": "^10.5.0",
|
|
64
|
+
"jsdom": "^29.1.1",
|
|
65
|
+
"msw": "^2.14.6",
|
|
66
|
+
"nock": "^14.0.15",
|
|
67
|
+
"postcss": "^8.5.15",
|
|
68
68
|
"postcss-prefix-selector": "^2.1.1",
|
|
69
|
-
"react": "^19.2.
|
|
70
|
-
"react-dom": "^19.2.
|
|
71
|
-
"tsdown": "^0.
|
|
72
|
-
"typescript": "^6.0.
|
|
73
|
-
"viem": "^2.
|
|
74
|
-
"vite": "^8.0.
|
|
75
|
-
"vitest": "^4.1.
|
|
76
|
-
"wagmi": "^3.6.
|
|
69
|
+
"react": "^19.2.7",
|
|
70
|
+
"react-dom": "^19.2.7",
|
|
71
|
+
"tsdown": "^0.22.1",
|
|
72
|
+
"typescript": "^6.0.3",
|
|
73
|
+
"viem": "^2.52.0",
|
|
74
|
+
"vite": "^8.0.16",
|
|
75
|
+
"vitest": "^4.1.8",
|
|
76
|
+
"wagmi": "^3.6.16",
|
|
77
77
|
"@workspace/typescript-config": "0.0.0"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
+
"@base-org/account": "^2.5.1",
|
|
81
|
+
"@safe-global/safe-apps-provider": "^0.18.6",
|
|
82
|
+
"@safe-global/safe-apps-sdk": "^9.1.0",
|
|
80
83
|
"@tanstack/react-query": ">=5.0.0",
|
|
81
|
-
"
|
|
82
|
-
"react
|
|
83
|
-
"
|
|
84
|
+
"@walletconnect/ethereum-provider": "^2.21.1",
|
|
85
|
+
"react": "^18 || ^19",
|
|
86
|
+
"react-dom": "^18 || ^19",
|
|
87
|
+
"viem": "^2.0.0",
|
|
84
88
|
"wagmi": "^3.0.0"
|
|
85
89
|
},
|
|
90
|
+
"peerDependenciesMeta": {
|
|
91
|
+
"@base-org/account": {
|
|
92
|
+
"optional": true
|
|
93
|
+
},
|
|
94
|
+
"@safe-global/safe-apps-provider": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"@safe-global/safe-apps-sdk": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"@walletconnect/ethereum-provider": {
|
|
101
|
+
"optional": true
|
|
102
|
+
}
|
|
103
|
+
},
|
|
86
104
|
"engines": {
|
|
87
|
-
"node": ">=
|
|
105
|
+
"node": ">=24"
|
|
88
106
|
},
|
|
89
107
|
"scripts": {
|
|
90
108
|
"build": "tsdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|