@hot-labs/kit 1.0.33

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.
Files changed (300) hide show
  1. package/.eslintrc.cjs +11 -0
  2. package/.github/workflows/deploy-example.yml +55 -0
  3. package/.github/workflows/release.yml +74 -0
  4. package/.prettierrc +4 -0
  5. package/.prototools +2 -0
  6. package/.vscode/settings.json +3 -0
  7. package/CHANGELOG.md +1 -0
  8. package/README.md +67 -0
  9. package/build/GoogleConnector.d.ts +20 -0
  10. package/build/GoogleConnector.js +76 -0
  11. package/build/GoogleConnector.js.map +1 -0
  12. package/build/HotConnector.d.ts +91 -0
  13. package/build/HotConnector.js +285 -0
  14. package/build/HotConnector.js.map +1 -0
  15. package/build/OmniConnector.d.ts +95 -0
  16. package/build/OmniConnector.js +123 -0
  17. package/build/OmniConnector.js.map +1 -0
  18. package/build/OmniWallet.d.ts +57 -0
  19. package/build/OmniWallet.js +56 -0
  20. package/build/OmniWallet.js.map +1 -0
  21. package/build/cosmos/connector.d.ts +53 -0
  22. package/build/cosmos/connector.js +207 -0
  23. package/build/cosmos/connector.js.map +1 -0
  24. package/build/cosmos/wallet.d.ts +28 -0
  25. package/build/cosmos/wallet.js +59 -0
  26. package/build/cosmos/wallet.js.map +1 -0
  27. package/build/events.d.ts +42 -0
  28. package/build/events.js +64 -0
  29. package/build/events.js.map +1 -0
  30. package/build/evm/abi.d.ts +17 -0
  31. package/build/evm/abi.js +38 -0
  32. package/build/evm/abi.js.map +1 -0
  33. package/build/evm/connector.d.ts +35 -0
  34. package/build/evm/connector.js +124 -0
  35. package/build/evm/connector.js.map +1 -0
  36. package/build/evm/wallet.d.ts +47 -0
  37. package/build/evm/wallet.js +136 -0
  38. package/build/evm/wallet.js.map +1 -0
  39. package/build/exchange.d.ts +63 -0
  40. package/build/exchange.js +384 -0
  41. package/build/exchange.js.map +1 -0
  42. package/build/hot-wallet/evm.d.ts +1 -0
  43. package/build/hot-wallet/evm.js +33 -0
  44. package/build/hot-wallet/evm.js.map +1 -0
  45. package/build/hot-wallet/hot.d.ts +3 -0
  46. package/build/hot-wallet/hot.js +40 -0
  47. package/build/hot-wallet/hot.js.map +1 -0
  48. package/build/hot-wallet/index.d.ts +4 -0
  49. package/build/hot-wallet/index.js +5 -0
  50. package/build/hot-wallet/index.js.map +1 -0
  51. package/build/hot-wallet/solana/account.d.ts +11 -0
  52. package/build/hot-wallet/solana/account.js +42 -0
  53. package/build/hot-wallet/solana/account.js.map +1 -0
  54. package/build/hot-wallet/solana/index.d.ts +1 -0
  55. package/build/hot-wallet/solana/index.js +85 -0
  56. package/build/hot-wallet/solana/index.js.map +1 -0
  57. package/build/hot-wallet/solana/register.d.ts +2 -0
  58. package/build/hot-wallet/solana/register.js +41 -0
  59. package/build/hot-wallet/solana/register.js.map +1 -0
  60. package/build/hot-wallet/solana/solana-wallet.d.ts +34 -0
  61. package/build/hot-wallet/solana/solana-wallet.js +223 -0
  62. package/build/hot-wallet/solana/solana-wallet.js.map +1 -0
  63. package/build/hot-wallet/solana/utils.d.ts +32 -0
  64. package/build/hot-wallet/solana/utils.js +36 -0
  65. package/build/hot-wallet/solana/utils.js.map +1 -0
  66. package/build/hot-wallet/stellar.d.ts +38 -0
  67. package/build/hot-wallet/stellar.js +32 -0
  68. package/build/hot-wallet/stellar.js.map +1 -0
  69. package/build/hot-wallet/ton.d.ts +1 -0
  70. package/build/hot-wallet/ton.js +49 -0
  71. package/build/hot-wallet/ton.js.map +1 -0
  72. package/build/hot-wallet/wallet.d.ts +1 -0
  73. package/build/hot-wallet/wallet.js +40 -0
  74. package/build/hot-wallet/wallet.js.map +1 -0
  75. package/build/index.d.ts +24 -0
  76. package/build/index.js +25 -0
  77. package/build/index.js.map +1 -0
  78. package/build/near/connector.d.ts +28 -0
  79. package/build/near/connector.js +56 -0
  80. package/build/near/connector.js.map +1 -0
  81. package/build/near/wallet.d.ts +62 -0
  82. package/build/near/wallet.js +233 -0
  83. package/build/near/wallet.js.map +1 -0
  84. package/build/omni/Intents.d.ts +93 -0
  85. package/build/omni/Intents.js +395 -0
  86. package/build/omni/Intents.js.map +1 -0
  87. package/build/omni/bridge.d.ts +3 -0
  88. package/build/omni/bridge.js +34 -0
  89. package/build/omni/bridge.js.map +1 -0
  90. package/build/omni/config.d.ts +99 -0
  91. package/build/omni/config.js +126 -0
  92. package/build/omni/config.js.map +1 -0
  93. package/build/omni/defaultTokens.d.ts +17 -0
  94. package/build/omni/defaultTokens.js +1079 -0
  95. package/build/omni/defaultTokens.js.map +1 -0
  96. package/build/omni/index.d.ts +8 -0
  97. package/build/omni/index.js +9 -0
  98. package/build/omni/index.js.map +1 -0
  99. package/build/omni/nearRpc.d.ts +24 -0
  100. package/build/omni/nearRpc.js +167 -0
  101. package/build/omni/nearRpc.js.map +1 -0
  102. package/build/omni/recipient.d.ts +10 -0
  103. package/build/omni/recipient.js +40 -0
  104. package/build/omni/recipient.js.map +1 -0
  105. package/build/omni/token.d.ts +36 -0
  106. package/build/omni/token.js +136 -0
  107. package/build/omni/token.js.map +1 -0
  108. package/build/omni/tokens.d.ts +14 -0
  109. package/build/omni/tokens.js +57 -0
  110. package/build/omni/tokens.js.map +1 -0
  111. package/build/omni/types.d.ts +41 -0
  112. package/build/omni/types.js +2 -0
  113. package/build/omni/types.js.map +1 -0
  114. package/build/omni/utils.d.ts +24 -0
  115. package/build/omni/utils.js +150 -0
  116. package/build/omni/utils.js.map +1 -0
  117. package/build/settings.d.ts +5 -0
  118. package/build/settings.js +6 -0
  119. package/build/settings.js.map +1 -0
  120. package/build/solana/connector.d.ts +31 -0
  121. package/build/solana/connector.js +138 -0
  122. package/build/solana/connector.js.map +1 -0
  123. package/build/solana/protocol.d.ts +25 -0
  124. package/build/solana/protocol.js +56 -0
  125. package/build/solana/protocol.js.map +1 -0
  126. package/build/solana/wallet.d.ts +47 -0
  127. package/build/solana/wallet.js +188 -0
  128. package/build/solana/wallet.js.map +1 -0
  129. package/build/solana/wallets.d.ts +102 -0
  130. package/build/solana/wallets.js +150 -0
  131. package/build/solana/wallets.js.map +1 -0
  132. package/build/stellar/connector.d.ts +25 -0
  133. package/build/stellar/connector.js +56 -0
  134. package/build/stellar/connector.js.map +1 -0
  135. package/build/stellar/wallet.d.ts +70 -0
  136. package/build/stellar/wallet.js +225 -0
  137. package/build/stellar/wallet.js.map +1 -0
  138. package/build/storage.d.ts +10 -0
  139. package/build/storage.js +12 -0
  140. package/build/storage.js.map +1 -0
  141. package/build/ton/connector.d.ts +25 -0
  142. package/build/ton/connector.js +119 -0
  143. package/build/ton/connector.js.map +1 -0
  144. package/build/ton/utils.d.ts +45 -0
  145. package/build/ton/utils.js +64 -0
  146. package/build/ton/utils.js.map +1 -0
  147. package/build/ton/wallet.d.ts +70 -0
  148. package/build/ton/wallet.js +154 -0
  149. package/build/ton/wallet.js.map +1 -0
  150. package/build/ui/Popup.d.ts +10 -0
  151. package/build/ui/Popup.js +38 -0
  152. package/build/ui/Popup.js.map +1 -0
  153. package/build/ui/connect/AuthPopup.d.ts +2 -0
  154. package/build/ui/connect/AuthPopup.js +48 -0
  155. package/build/ui/connect/AuthPopup.js.map +1 -0
  156. package/build/ui/connect/ConnectWallet.d.ts +9 -0
  157. package/build/ui/connect/ConnectWallet.js +22 -0
  158. package/build/ui/connect/ConnectWallet.js.map +1 -0
  159. package/build/ui/connect/LogoutPopup.d.ts +10 -0
  160. package/build/ui/connect/LogoutPopup.js +8 -0
  161. package/build/ui/connect/LogoutPopup.js.map +1 -0
  162. package/build/ui/connect/WCPopup.d.ts +13 -0
  163. package/build/ui/connect/WCPopup.js +81 -0
  164. package/build/ui/connect/WCPopup.js.map +1 -0
  165. package/build/ui/connect/WCRequest.d.ts +9 -0
  166. package/build/ui/connect/WCRequest.js +13 -0
  167. package/build/ui/connect/WCRequest.js.map +1 -0
  168. package/build/ui/connect/WalletPicker.d.ts +11 -0
  169. package/build/ui/connect/WalletPicker.js +48 -0
  170. package/build/ui/connect/WalletPicker.js.map +1 -0
  171. package/build/ui/icons/arrow-right.d.ts +1 -0
  172. package/build/ui/icons/arrow-right.js +5 -0
  173. package/build/ui/icons/arrow-right.js.map +1 -0
  174. package/build/ui/icons/exchange.d.ts +6 -0
  175. package/build/ui/icons/exchange.js +6 -0
  176. package/build/ui/icons/exchange.js.map +1 -0
  177. package/build/ui/icons/logout.d.ts +1 -0
  178. package/build/ui/icons/logout.js +3 -0
  179. package/build/ui/icons/logout.js.map +1 -0
  180. package/build/ui/icons/pending.d.ts +1 -0
  181. package/build/ui/icons/pending.js +5 -0
  182. package/build/ui/icons/pending.js.map +1 -0
  183. package/build/ui/icons/qr.d.ts +1 -0
  184. package/build/ui/icons/qr.js +5 -0
  185. package/build/ui/icons/qr.js.map +1 -0
  186. package/build/ui/icons/search.d.ts +1 -0
  187. package/build/ui/icons/search.js +5 -0
  188. package/build/ui/icons/search.js.map +1 -0
  189. package/build/ui/icons/switch.d.ts +1 -0
  190. package/build/ui/icons/switch.js +5 -0
  191. package/build/ui/icons/switch.js.map +1 -0
  192. package/build/ui/icons/wallet.d.ts +1 -0
  193. package/build/ui/icons/wallet.js +5 -0
  194. package/build/ui/icons/wallet.js.map +1 -0
  195. package/build/ui/payment/Bridge.d.ts +27 -0
  196. package/build/ui/payment/Bridge.js +340 -0
  197. package/build/ui/payment/Bridge.js.map +1 -0
  198. package/build/ui/payment/DepositQR.d.ts +9 -0
  199. package/build/ui/payment/DepositQR.js +56 -0
  200. package/build/ui/payment/DepositQR.js.map +1 -0
  201. package/build/ui/payment/Payment.d.ts +16 -0
  202. package/build/ui/payment/Payment.js +50 -0
  203. package/build/ui/payment/Payment.js.map +1 -0
  204. package/build/ui/payment/Profile.d.ts +7 -0
  205. package/build/ui/payment/Profile.js +88 -0
  206. package/build/ui/payment/Profile.js.map +1 -0
  207. package/build/ui/payment/SelectRecipient.d.ts +14 -0
  208. package/build/ui/payment/SelectRecipient.js +68 -0
  209. package/build/ui/payment/SelectRecipient.js.map +1 -0
  210. package/build/ui/payment/SelectSender.d.ts +13 -0
  211. package/build/ui/payment/SelectSender.js +23 -0
  212. package/build/ui/payment/SelectSender.js.map +1 -0
  213. package/build/ui/payment/SelectToken.d.ts +13 -0
  214. package/build/ui/payment/SelectToken.js +92 -0
  215. package/build/ui/payment/SelectToken.js.map +1 -0
  216. package/build/ui/payment/TokenCard.d.ts +23 -0
  217. package/build/ui/payment/TokenCard.js +50 -0
  218. package/build/ui/payment/TokenCard.js.map +1 -0
  219. package/build/ui/router.d.ts +37 -0
  220. package/build/ui/router.js +56 -0
  221. package/build/ui/router.js.map +1 -0
  222. package/build/ui/styles.d.ts +11 -0
  223. package/build/ui/styles.js +273 -0
  224. package/build/ui/styles.js.map +1 -0
  225. package/package.json +60 -0
  226. package/skill.md +989 -0
  227. package/src/GoogleConnector.ts +102 -0
  228. package/src/HotConnector.ts +344 -0
  229. package/src/OmniConnector.ts +161 -0
  230. package/src/OmniWallet.ts +94 -0
  231. package/src/cosmos/connector.ts +242 -0
  232. package/src/cosmos/wallet.ts +77 -0
  233. package/src/events.ts +66 -0
  234. package/src/evm/abi.ts +39 -0
  235. package/src/evm/connector.ts +139 -0
  236. package/src/evm/wallet.ts +156 -0
  237. package/src/exchange.ts +426 -0
  238. package/src/hot-wallet/evm.ts +38 -0
  239. package/src/hot-wallet/hot.ts +39 -0
  240. package/src/hot-wallet/index.ts +4 -0
  241. package/src/hot-wallet/solana/account.ts +52 -0
  242. package/src/hot-wallet/solana/index.ts +98 -0
  243. package/src/hot-wallet/solana/register.ts +48 -0
  244. package/src/hot-wallet/solana/solana-wallet.ts +280 -0
  245. package/src/hot-wallet/solana/utils.ts +56 -0
  246. package/src/hot-wallet/stellar.ts +39 -0
  247. package/src/hot-wallet/ton.ts +56 -0
  248. package/src/hot-wallet/wallet.ts +44 -0
  249. package/src/index.ts +30 -0
  250. package/src/near/connector.ts +71 -0
  251. package/src/near/wallet.ts +255 -0
  252. package/src/omni/Intents.ts +454 -0
  253. package/src/omni/bridge.ts +38 -0
  254. package/src/omni/config.ts +130 -0
  255. package/src/omni/defaultTokens.ts +1078 -0
  256. package/src/omni/index.ts +8 -0
  257. package/src/omni/nearRpc.ts +187 -0
  258. package/src/omni/recipient.ts +41 -0
  259. package/src/omni/token.ts +125 -0
  260. package/src/omni/tokens.ts +68 -0
  261. package/src/omni/types.ts +46 -0
  262. package/src/omni/utils.ts +163 -0
  263. package/src/settings.ts +5 -0
  264. package/src/solana/connector.ts +151 -0
  265. package/src/solana/protocol.ts +66 -0
  266. package/src/solana/wallet.ts +230 -0
  267. package/src/solana/wallets.ts +243 -0
  268. package/src/stellar/connector.ts +69 -0
  269. package/src/stellar/wallet.ts +267 -0
  270. package/src/storage.ts +19 -0
  271. package/src/ton/connector.ts +138 -0
  272. package/src/ton/utils.ts +73 -0
  273. package/src/ton/wallet.ts +178 -0
  274. package/src/ui/Popup.tsx +62 -0
  275. package/src/ui/connect/AuthPopup.tsx +78 -0
  276. package/src/ui/connect/ConnectWallet.tsx +63 -0
  277. package/src/ui/connect/LogoutPopup.tsx +20 -0
  278. package/src/ui/connect/WCPopup.tsx +122 -0
  279. package/src/ui/connect/WCRequest.tsx +28 -0
  280. package/src/ui/connect/WalletPicker.tsx +92 -0
  281. package/src/ui/icons/arrow-right.tsx +8 -0
  282. package/src/ui/icons/exchange.tsx +17 -0
  283. package/src/ui/icons/logout.tsx +18 -0
  284. package/src/ui/icons/pending.tsx +18 -0
  285. package/src/ui/icons/qr.tsx +12 -0
  286. package/src/ui/icons/search.tsx +18 -0
  287. package/src/ui/icons/switch.tsx +10 -0
  288. package/src/ui/icons/wallet.tsx +18 -0
  289. package/src/ui/payment/Bridge.tsx +582 -0
  290. package/src/ui/payment/DepositQR.tsx +88 -0
  291. package/src/ui/payment/Payment.tsx +78 -0
  292. package/src/ui/payment/Profile.tsx +140 -0
  293. package/src/ui/payment/SelectRecipient.tsx +111 -0
  294. package/src/ui/payment/SelectSender.tsx +60 -0
  295. package/src/ui/payment/SelectToken.tsx +134 -0
  296. package/src/ui/payment/TokenCard.tsx +83 -0
  297. package/src/ui/router.tsx +92 -0
  298. package/src/ui/styles.ts +284 -0
  299. package/tsconfig.json +22 -0
  300. package/vite.config.ts +17 -0
@@ -0,0 +1,92 @@
1
+ import { HotConnector } from "../HotConnector";
2
+ import { OmniConnector } from "../OmniConnector";
3
+ import { BridgeReview } from "../exchange";
4
+ import { Token } from "../omni/token";
5
+ import { OmniWallet } from "../OmniWallet";
6
+ import { WalletType } from "../omni/config";
7
+ import { Recipient } from "../omni/recipient";
8
+
9
+ import { present } from "./Popup";
10
+ import { Payment } from "./payment/Payment";
11
+ import { LogoutPopup } from "./connect/LogoutPopup";
12
+ import { Bridge } from "./payment/Bridge";
13
+ import { Profile } from "./payment/Profile";
14
+ import { SelectTokenPopup } from "./payment/SelectToken";
15
+ import { WalletPicker } from "./connect/WalletPicker";
16
+ import { BridgeProps } from "./payment/Bridge";
17
+ import { Connector } from "./connect/ConnectWallet";
18
+ import { SelectSender } from "./payment/SelectSender";
19
+ import { SelectRecipient } from "./payment/SelectRecipient";
20
+ import { WCRequest } from "./connect/WCRequest";
21
+
22
+ export const openPayment = (connector: HotConnector, token: Token, amount: bigint, recipient?: Recipient) => {
23
+ return new Promise<Promise<BridgeReview>>((resolve, reject) => {
24
+ present((close) => (
25
+ <Payment //
26
+ onClose={() => (close(), reject(new Error("User rejected")))}
27
+ onProcess={(task) => (close(), resolve(task))}
28
+ connector={connector}
29
+ token={token}
30
+ amount={amount}
31
+ recipient={recipient}
32
+ />
33
+ ));
34
+ });
35
+ };
36
+
37
+ export const openLogoutPopup = (connector: OmniConnector) => {
38
+ return new Promise<void>((resolve, reject) => {
39
+ present((close) => {
40
+ return (
41
+ <LogoutPopup //
42
+ connector={connector}
43
+ onApprove={() => (close(), resolve())}
44
+ onReject={() => (close(), reject(new Error("User rejected")))}
45
+ />
46
+ );
47
+ });
48
+ });
49
+ };
50
+
51
+ export const openBridge = (hot: HotConnector, setup?: BridgeProps["setup"]) => {
52
+ return new Promise<BridgeReview>((resolve, reject) => {
53
+ present((close) => (
54
+ <Bridge //
55
+ hot={hot}
56
+ setup={setup}
57
+ onProcess={resolve}
58
+ onClose={() => (close(), reject(new Error("User rejected")))}
59
+ />
60
+ ));
61
+ });
62
+ };
63
+
64
+ export const openConnector = (hot: HotConnector) => {
65
+ present((close) => <Connector hot={hot} onClose={close} />);
66
+ };
67
+
68
+ export const openProfile = (hot: HotConnector) => {
69
+ present((close) => <Profile hot={hot} onClose={close} />);
70
+ };
71
+
72
+ export const openSelectTokenPopup = ({ hot, initialChain, onSelect }: { hot: HotConnector; initialChain?: number; onSelect: (token: Token, wallet?: OmniWallet) => void }) => {
73
+ present((close) => <SelectTokenPopup hot={hot} initialChain={initialChain} onClose={close} onSelect={(t, w) => (onSelect(t, w), close())} />);
74
+ };
75
+
76
+ export const openWalletPicker = (connector: OmniConnector, onSelect?: (wallet: OmniWallet) => void) => {
77
+ present((close) => <WalletPicker initialConnector={connector} onSelect={onSelect} onClose={close} />);
78
+ };
79
+
80
+ export const openSelectSender = (props: { hot: HotConnector; type: WalletType; onSelect: (wallet?: OmniWallet | "qr") => void }) => {
81
+ present((close) => <SelectSender {...props} onClose={close} />);
82
+ };
83
+
84
+ export const openSelectRecipient = (props: { hot: HotConnector; recipient?: Recipient; type: WalletType; onSelect: (wallet?: Recipient) => void }) => {
85
+ present((close) => <SelectRecipient {...props} onClose={close} />);
86
+ };
87
+
88
+ export const openWCRequest = <T,>(args: { task: () => Promise<T>; deeplink?: string; name: string; icon: string; request: any }): Promise<T> => {
89
+ const taskPromise = args.task();
90
+ present((close) => <WCRequest deeplink={args.deeplink} name={args.name} icon={args.icon} onClose={close} task={taskPromise} />);
91
+ return taskPromise;
92
+ };
@@ -0,0 +1,284 @@
1
+ import styled from "styled-components";
2
+
3
+ const font = `-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"`;
4
+
5
+ export const ModalContainer = styled.div`
6
+ position: fixed;
7
+ top: 0;
8
+ left: 0;
9
+ width: 100%;
10
+ height: 100%;
11
+ z-index: 100000000;
12
+ display: flex;
13
+ justify-content: center;
14
+ align-items: center;
15
+ flex-direction: column;
16
+ transition: opacity 0.2s ease-in-out;
17
+ pointer-events: all;
18
+
19
+ @media (max-width: 600px) {
20
+ justify-content: flex-end;
21
+ }
22
+ `;
23
+
24
+ export const ModalOverlay = styled.div`
25
+ position: absolute;
26
+ top: 0;
27
+ left: 0;
28
+ width: 100%;
29
+ height: 100%;
30
+ z-index: 100000000;
31
+ background-color: rgba(0, 0, 0, 0.2);
32
+ backdrop-filter: blur(10px);
33
+ z-index: 1;
34
+ `;
35
+
36
+ export const ModalContent = styled.div`
37
+ display: flex;
38
+ flex-direction: column;
39
+ align-items: center;
40
+ max-width: 420px;
41
+ max-height: 660px;
42
+ width: 100%;
43
+ border-radius: 24px;
44
+ background: #0d0d0d;
45
+ border: 1.5px solid rgba(255, 255, 255, 0.1);
46
+ transition: transform 0.2s ease-in-out;
47
+ z-index: 2;
48
+
49
+ @media (max-width: 600px) {
50
+ max-width: 100%;
51
+ width: 100%;
52
+ max-height: 90%;
53
+ border-bottom-left-radius: 0;
54
+ border-bottom-right-radius: 0;
55
+ border: none;
56
+ border-top: 1.5px solid rgba(255, 255, 255, 0.1);
57
+ }
58
+ `;
59
+
60
+ export const ModalHeader = styled.div`
61
+ display: flex;
62
+ padding: 16px;
63
+ gap: 16px;
64
+ align-self: stretch;
65
+ align-items: center;
66
+ justify-content: center;
67
+ position: relative;
68
+
69
+ button {
70
+ position: absolute;
71
+ right: 16px;
72
+ top: 16px;
73
+ width: 32px;
74
+ height: 32px;
75
+ border-radius: 12px;
76
+ cursor: pointer;
77
+ transition: background 0.2s ease-in-out;
78
+ border: none;
79
+ background: none;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+
84
+ &:hover {
85
+ background: rgba(255, 255, 255, 0.04);
86
+ }
87
+ }
88
+
89
+ p {
90
+ color: #fff;
91
+ text-align: center;
92
+ font-size: 24px;
93
+ font-style: normal;
94
+ font-weight: 600;
95
+ line-height: normal;
96
+ margin: 0;
97
+ }
98
+ `;
99
+
100
+ export const ModalBody = styled.div`
101
+ display: flex;
102
+ padding: 16px;
103
+ flex-direction: column;
104
+ align-items: flex-start;
105
+ text-align: center;
106
+ gap: 4px;
107
+ overflow: auto;
108
+ border-radius: 24px;
109
+ background: rgba(255, 255, 255, 0.08);
110
+ width: 100%;
111
+ flex: 1;
112
+
113
+ textarea {
114
+ width: 100%;
115
+ padding: 12px;
116
+ border-radius: 12px;
117
+ background: #0d0d0d;
118
+ color: #fff;
119
+ border: 1px solid rgba(255, 255, 255, 0.1);
120
+ outline: none;
121
+ font-size: 12px;
122
+ transition: background 0.2s ease-in-out;
123
+ font-family: monospace;
124
+ }
125
+
126
+ p {
127
+ color: rgba(255, 255, 255, 0.9);
128
+ text-align: center;
129
+ font-size: 16px;
130
+ font-style: normal;
131
+ font-weight: 500;
132
+ line-height: normal;
133
+ letter-spacing: -0.8px;
134
+ }
135
+ `;
136
+
137
+ export const Footer = styled.div`
138
+ width: 100%;
139
+ display: flex;
140
+ align-items: center;
141
+ justify-content: flex-start;
142
+ padding: 16px 24px;
143
+ color: #fff;
144
+ gap: 12px;
145
+
146
+ img {
147
+ width: 24px;
148
+ height: 24px;
149
+ border-radius: 50%;
150
+ object-fit: cover;
151
+ }
152
+
153
+ * {
154
+ white-space: nowrap;
155
+ overflow: hidden;
156
+ text-overflow: ellipsis;
157
+ }
158
+ `;
159
+
160
+ export const GetWalletLink = styled.a`
161
+ color: rgba(255, 255, 255, 0.5);
162
+ text-align: center;
163
+ font-size: 16px;
164
+ font-style: normal;
165
+ font-weight: 500;
166
+ margin-left: auto;
167
+ text-decoration: none;
168
+ transition: color 0.2s ease-in-out;
169
+
170
+ &:hover {
171
+ color: rgba(255, 255, 255, 1);
172
+ }
173
+ `;
174
+
175
+ export const PopupOption = styled.button`
176
+ display: flex;
177
+ padding: 8px;
178
+ align-items: center;
179
+ align-self: stretch;
180
+ cursor: pointer;
181
+ transition: background 0.2s ease-in-out;
182
+ border-radius: 24px;
183
+ outline: none;
184
+ border: none;
185
+ background: transparent;
186
+ gap: 12px;
187
+
188
+ img {
189
+ width: 44px;
190
+ height: 44px;
191
+ border-radius: 16px;
192
+ object-fit: cover;
193
+ flex-shrink: 0;
194
+ }
195
+
196
+ &:hover {
197
+ background: rgba(255, 255, 255, 0.04);
198
+ }
199
+
200
+ p {
201
+ color: rgba(255, 255, 255, 0.9);
202
+ text-align: center;
203
+ font-size: 18px;
204
+ font-style: normal;
205
+ font-weight: 600;
206
+ line-height: normal;
207
+ letter-spacing: -0.36px;
208
+ margin: 0;
209
+ }
210
+ `;
211
+
212
+ export const PopupOptionInfo = styled.div`
213
+ display: flex;
214
+ flex-direction: column;
215
+ align-items: flex-start;
216
+ text-align: left;
217
+ flex: 1;
218
+ margin-top: -2px;
219
+
220
+ .wallet-address {
221
+ color: rgba(255, 255, 255, 0.5);
222
+ font-size: 14px;
223
+ font-style: normal;
224
+ font-weight: 400;
225
+ line-height: normal;
226
+ }
227
+ `;
228
+
229
+ export const PopupButton = styled.button`
230
+ width: 100%;
231
+ padding: 12px;
232
+ border-radius: 24px;
233
+ background: rgb(221, 221, 221);
234
+ color: rgb(20, 20, 20) !important;
235
+ font-weight: bold;
236
+ border: none;
237
+ cursor: pointer;
238
+ font-size: 16px;
239
+ transition: background 0.2s ease-in-out;
240
+ margin-top: 16px;
241
+ height: 56px;
242
+
243
+ &:hover {
244
+ background: rgb(160, 160, 160);
245
+ }
246
+
247
+ &:disabled {
248
+ opacity: 0.5;
249
+ cursor: not-allowed;
250
+ }
251
+ `;
252
+
253
+ export const PopupRoot = styled.div`
254
+ height: 100%;
255
+ h1,
256
+ h2,
257
+ h3,
258
+ h4,
259
+ h5,
260
+ h6,
261
+ p {
262
+ font-family: ${font};
263
+ margin: 0;
264
+ }
265
+
266
+ /* Hide scrollbar for all scrollable elements inside PopupRoot */
267
+ &::-webkit-scrollbar {
268
+ display: none;
269
+ }
270
+ scrollbar-width: none; /* Firefox */
271
+ -ms-overflow-style: none; /* Internet Explorer 10+ */
272
+
273
+ /* Also hide scrollbars for all inner elements */
274
+ * {
275
+ font-family: ${font};
276
+ scrollbar-width: none;
277
+ -ms-overflow-style: none;
278
+ box-sizing: border-box;
279
+ }
280
+
281
+ *::-webkit-scrollbar {
282
+ display: none;
283
+ }
284
+ `;
package/tsconfig.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "esModuleInterop": true,
4
+ "moduleResolution": "bundler",
5
+ "alwaysStrict": true,
6
+ "allowJs": true,
7
+ "strict": true,
8
+ "rootDir": "./src",
9
+ "outDir": "./build",
10
+ "declaration": true,
11
+ "sourceMap": true,
12
+ "allowSyntheticDefaultImports": true,
13
+ "target": "ESNext",
14
+ "skipLibCheck": true,
15
+ "module": "ESNext",
16
+ "lib": ["ESNext", "dom"],
17
+ "jsx": "react-jsx",
18
+ "jsxImportSource": "react",
19
+ "resolveJsonModule": true
20
+ },
21
+ "include": ["src"]
22
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { defineConfig } from "vite";
2
+
3
+ export default defineConfig({
4
+ build: {
5
+ outDir: "build",
6
+ minify: true,
7
+ lib: {
8
+ name: "Wibe3",
9
+ entry: "src/index.ts",
10
+ formats: ["es", "cjs", "iife"],
11
+ fileName: (format) => `wibe3.${format}.js`,
12
+ },
13
+ rollupOptions: {
14
+ external: ["react", "react-dom"],
15
+ },
16
+ },
17
+ });