@rhinestone/deposit-modal 0.8.1 → 0.9.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.
Files changed (65) hide show
  1. package/README.md +193 -29
  2. package/dist/{chunk-2JPB3PLB.mjs → DepositModalReown-6KUAO5ZC.mjs} +56 -4
  3. package/dist/{chunk-Q3W53BKR.cjs → DepositModalReown-XC5RIU7Z.cjs} +62 -10
  4. package/dist/{caip-C_ZYFIGa.d.cts → caip-523Zrc3r.d.cts} +1 -3
  5. package/dist/{caip-C_ZYFIGa.d.ts → caip-523Zrc3r.d.ts} +1 -3
  6. package/dist/{chunk-D3Y7ZBED.cjs → chunk-22RV33LK.cjs} +2170 -1460
  7. package/dist/chunk-4WB2FHGC.mjs +865 -0
  8. package/dist/chunk-A223BLVC.mjs +801 -0
  9. package/dist/{chunk-HQWZCOMS.cjs → chunk-DIX7M3SP.cjs} +232 -601
  10. package/dist/{chunk-T43VUEJH.mjs → chunk-E4G5BOZP.mjs} +167 -536
  11. package/dist/chunk-H577RJN5.cjs +801 -0
  12. package/dist/{chunk-DABKCJVL.mjs → chunk-ILT2PITN.mjs} +60 -3
  13. package/dist/{chunk-7KHEIMWD.mjs → chunk-KKHLNFSA.mjs} +2436 -1726
  14. package/dist/chunk-LGVJWVSS.mjs +81 -0
  15. package/dist/chunk-NEXUCY4B.cjs +11 -0
  16. package/dist/chunk-NMIMRASD.cjs +1785 -0
  17. package/dist/chunk-OSI2CFGL.mjs +11 -0
  18. package/dist/chunk-PAGMU4RQ.cjs +865 -0
  19. package/dist/chunk-T7LGQFP3.cjs +81 -0
  20. package/dist/chunk-VN4BLZYC.cjs +2273 -0
  21. package/dist/chunk-VOGZAZB2.mjs +2273 -0
  22. package/dist/chunk-WYXBY2MQ.mjs +1785 -0
  23. package/dist/{chunk-4NN7UTWQ.cjs → chunk-YEBXUUH3.cjs} +63 -6
  24. package/dist/claim.cjs +10 -0
  25. package/dist/claim.d.cts +8 -0
  26. package/dist/claim.d.ts +8 -0
  27. package/dist/claim.mjs +10 -0
  28. package/dist/constants.cjs +3 -3
  29. package/dist/constants.d.cts +4 -2
  30. package/dist/constants.d.ts +4 -2
  31. package/dist/constants.mjs +5 -5
  32. package/dist/deposit.cjs +8 -6
  33. package/dist/deposit.d.cts +2 -2
  34. package/dist/deposit.d.ts +2 -2
  35. package/dist/deposit.mjs +7 -5
  36. package/dist/index.cjs +22 -12
  37. package/dist/index.d.cts +15 -2
  38. package/dist/index.d.ts +15 -2
  39. package/dist/index.mjs +21 -11
  40. package/dist/polymarket.cjs +5 -6
  41. package/dist/polymarket.mjs +2 -3
  42. package/dist/server.cjs +96 -0
  43. package/dist/server.d.cts +65 -0
  44. package/dist/server.d.ts +65 -0
  45. package/dist/server.mjs +96 -0
  46. package/dist/styles.css +263 -12
  47. package/dist/types-C0SGf-21.d.cts +606 -0
  48. package/dist/types-C0SGf-21.d.ts +606 -0
  49. package/dist/withdraw.cjs +6 -5
  50. package/dist/withdraw.d.cts +3 -6
  51. package/dist/withdraw.d.ts +3 -6
  52. package/dist/withdraw.mjs +5 -4
  53. package/package.json +53 -6
  54. package/dist/DepositModalReown-4BSHOQ5Y.mjs +0 -63
  55. package/dist/DepositModalReown-UND3DEJH.cjs +0 -63
  56. package/dist/WithdrawModalReown-FVXSSGY5.mjs +0 -46
  57. package/dist/WithdrawModalReown-TVZWJKQI.cjs +0 -46
  58. package/dist/chunk-7OKA6GNA.cjs +0 -4537
  59. package/dist/chunk-NASHLEVQ.mjs +0 -4537
  60. package/dist/chunk-O5OKA27M.mjs +0 -800
  61. package/dist/chunk-U7SVYWVD.cjs +0 -800
  62. package/dist/chunk-WK5AFRSP.mjs +0 -295
  63. package/dist/chunk-XRWQMIBY.cjs +0 -295
  64. package/dist/types--LQWg_4W.d.cts +0 -468
  65. package/dist/types--LQWg_4W.d.ts +0 -468
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rhinestone/deposit-modal",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "React modal component for Rhinestone cross-chain deposits",
5
5
  "author": "Rhinestone <dev@rhinestone.wtf>",
6
6
  "bugs": {
@@ -41,6 +41,26 @@
41
41
  "default": "./dist/withdraw.cjs"
42
42
  }
43
43
  },
44
+ "./claim": {
45
+ "import": {
46
+ "types": "./dist/claim.d.ts",
47
+ "default": "./dist/claim.mjs"
48
+ },
49
+ "require": {
50
+ "types": "./dist/claim.d.cts",
51
+ "default": "./dist/claim.cjs"
52
+ }
53
+ },
54
+ "./server": {
55
+ "import": {
56
+ "types": "./dist/server.d.ts",
57
+ "default": "./dist/server.mjs"
58
+ },
59
+ "require": {
60
+ "types": "./dist/server.d.cts",
61
+ "default": "./dist/server.cjs"
62
+ }
63
+ },
44
64
  "./constants": {
45
65
  "import": {
46
66
  "types": "./dist/constants.d.ts",
@@ -70,15 +90,16 @@
70
90
  ],
71
91
  "scripts": {
72
92
  "size": "size-limit",
73
- "build": "tsup && bun run scripts/postbuild.ts",
93
+ "build": "bun run scripts/sync-version.ts && tsup && bun run scripts/postbuild.ts",
74
94
  "clean": "rm -rf dist",
75
95
  "typecheck": "tsc --noEmit",
76
96
  "test": "vitest run",
97
+ "test:live": "./scripts/live-seam.sh",
77
98
  "test:watch": "vitest",
78
99
  "test:coverage": "vitest run --coverage",
79
100
  "prepublishOnly": "bun run clean && bun run build && bun run typecheck",
80
101
  "changeset": "changeset",
81
- "changeset:version": "changeset version",
102
+ "changeset:version": "changeset version && bun run scripts/sync-version.ts",
82
103
  "changeset:release": "bun run build && changeset publish"
83
104
  },
84
105
  "peerDependencies": {
@@ -94,6 +115,12 @@
94
115
  "@tanstack/react-query": ">=5"
95
116
  },
96
117
  "peerDependenciesMeta": {
118
+ "@reown/appkit": {
119
+ "optional": true
120
+ },
121
+ "@reown/appkit-adapter-wagmi": {
122
+ "optional": true
123
+ },
97
124
  "@reown/appkit-adapter-solana": {
98
125
  "optional": true
99
126
  },
@@ -139,7 +166,7 @@
139
166
  {
140
167
  "name": "Total Bundle (Everything)",
141
168
  "path": "dist/index.mjs",
142
- "limit": "65 kB",
169
+ "limit": "88 kB",
143
170
  "ignore": [
144
171
  "react",
145
172
  "react-dom",
@@ -159,7 +186,7 @@
159
186
  "name": "Deposit & Withdraw Modals Only",
160
187
  "path": "dist/index.mjs",
161
188
  "import": "{ DepositModal, WithdrawModal }",
162
- "limit": "64 kB",
189
+ "limit": "84 kB",
163
190
  "ignore": [
164
191
  "react",
165
192
  "react-dom",
@@ -178,10 +205,30 @@
178
205
  {
179
206
  "name": "Headless Polymarket Account",
180
207
  "path": "dist/polymarket.mjs",
181
- "limit": "3 kB",
208
+ "limit": "3.5 kB",
182
209
  "ignore": [
183
210
  "viem"
184
211
  ]
212
+ },
213
+ {
214
+ "name": "Claim Modal Only",
215
+ "path": "dist/claim.mjs",
216
+ "import": "{ ClaimModal }",
217
+ "limit": "24 kB",
218
+ "ignore": [
219
+ "react",
220
+ "react-dom",
221
+ "viem",
222
+ "wagmi",
223
+ "@tanstack/react-query",
224
+ "@reown/appkit",
225
+ "@reown/appkit-adapter-wagmi",
226
+ "@walletconnect/ethereum-provider",
227
+ "@coinbase/wallet-sdk",
228
+ "@metamask/sdk",
229
+ "porto",
230
+ "porto/internal"
231
+ ]
185
232
  }
186
233
  ],
187
234
  "keywords": [
@@ -1,63 +0,0 @@
1
- import {
2
- DepositModalInner
3
- } from "./chunk-7KHEIMWD.mjs";
4
- import "./chunk-DABKCJVL.mjs";
5
- import {
6
- ReownWalletProvider,
7
- useReownWallet
8
- } from "./chunk-2JPB3PLB.mjs";
9
- import "./chunk-NASHLEVQ.mjs";
10
- import "./chunk-WK5AFRSP.mjs";
11
- import "./chunk-O5OKA27M.mjs";
12
-
13
- // src/DepositModalReown.tsx
14
- import { useCallback, useMemo } from "react";
15
- import { useAppKitProvider } from "@reown/appkit/react";
16
- import { useAppKitConnection } from "@reown/appkit-adapter-solana/react";
17
- import { jsx } from "react/jsx-runtime";
18
- function DepositModalWithReown(props) {
19
- const reown = useReownWallet();
20
- const enableSolana = props.enableSolana ?? true;
21
- const { walletProvider: solanaWalletProvider } = useAppKitProvider(
22
- enableSolana ? "solana" : "eip155"
23
- );
24
- const { connection: solanaConnection } = useAppKitConnection();
25
- const reownWithSolana = useMemo(
26
- () => ({
27
- ...reown,
28
- solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0,
29
- solanaConnection: enableSolana && reown.isSolana ? solanaConnection : void 0
30
- }),
31
- [enableSolana, reown, solanaWalletProvider, solanaConnection]
32
- );
33
- const handleConnect = useCallback(() => {
34
- reown.openConnect();
35
- }, [reown.openConnect]);
36
- const handleDisconnect = useCallback(() => {
37
- reown.disconnect();
38
- }, [reown.disconnect]);
39
- return /* @__PURE__ */ jsx(
40
- DepositModalInner,
41
- {
42
- ...props,
43
- reownWallet: reownWithSolana,
44
- onConnect: handleConnect,
45
- onDisconnect: handleDisconnect
46
- }
47
- );
48
- }
49
- function DepositModalReown(props) {
50
- return /* @__PURE__ */ jsx(
51
- ReownWalletProvider,
52
- {
53
- projectId: props.reownAppId,
54
- theme: props.theme,
55
- enableSolana: props.enableSolana,
56
- rpcUrls: props.rpcUrls,
57
- children: /* @__PURE__ */ jsx(DepositModalWithReown, { ...props })
58
- }
59
- );
60
- }
61
- export {
62
- DepositModalReown
63
- };
@@ -1,63 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
-
3
- var _chunkD3Y7ZBEDcjs = require('./chunk-D3Y7ZBED.cjs');
4
- require('./chunk-4NN7UTWQ.cjs');
5
-
6
-
7
-
8
- var _chunkQ3W53BKRcjs = require('./chunk-Q3W53BKR.cjs');
9
- require('./chunk-7OKA6GNA.cjs');
10
- require('./chunk-XRWQMIBY.cjs');
11
- require('./chunk-U7SVYWVD.cjs');
12
-
13
- // src/DepositModalReown.tsx
14
- var _react = require('react');
15
- var _react3 = require('@reown/appkit/react');
16
- var _react5 = require('@reown/appkit-adapter-solana/react');
17
- var _jsxruntime = require('react/jsx-runtime');
18
- function DepositModalWithReown(props) {
19
- const reown = _chunkQ3W53BKRcjs.useReownWallet.call(void 0, );
20
- const enableSolana = _nullishCoalesce(props.enableSolana, () => ( true));
21
- const { walletProvider: solanaWalletProvider } = _react3.useAppKitProvider.call(void 0,
22
- enableSolana ? "solana" : "eip155"
23
- );
24
- const { connection: solanaConnection } = _react5.useAppKitConnection.call(void 0, );
25
- const reownWithSolana = _react.useMemo.call(void 0,
26
- () => ({
27
- ...reown,
28
- solanaProvider: enableSolana && reown.isSolana ? solanaWalletProvider : void 0,
29
- solanaConnection: enableSolana && reown.isSolana ? solanaConnection : void 0
30
- }),
31
- [enableSolana, reown, solanaWalletProvider, solanaConnection]
32
- );
33
- const handleConnect = _react.useCallback.call(void 0, () => {
34
- reown.openConnect();
35
- }, [reown.openConnect]);
36
- const handleDisconnect = _react.useCallback.call(void 0, () => {
37
- reown.disconnect();
38
- }, [reown.disconnect]);
39
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
40
- _chunkD3Y7ZBEDcjs.DepositModalInner,
41
- {
42
- ...props,
43
- reownWallet: reownWithSolana,
44
- onConnect: handleConnect,
45
- onDisconnect: handleDisconnect
46
- }
47
- );
48
- }
49
- function DepositModalReown(props) {
50
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
51
- _chunkQ3W53BKRcjs.ReownWalletProvider,
52
- {
53
- projectId: props.reownAppId,
54
- theme: props.theme,
55
- enableSolana: props.enableSolana,
56
- rpcUrls: props.rpcUrls,
57
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DepositModalWithReown, { ...props })
58
- }
59
- );
60
- }
61
-
62
-
63
- exports.DepositModalReown = DepositModalReown;
@@ -1,46 +0,0 @@
1
- import {
2
- WithdrawModalInner
3
- } from "./chunk-T43VUEJH.mjs";
4
- import {
5
- ReownWalletProvider,
6
- useReownWallet
7
- } from "./chunk-2JPB3PLB.mjs";
8
- import "./chunk-NASHLEVQ.mjs";
9
- import "./chunk-WK5AFRSP.mjs";
10
- import "./chunk-O5OKA27M.mjs";
11
-
12
- // src/WithdrawModalReown.tsx
13
- import { useCallback } from "react";
14
- import { jsx } from "react/jsx-runtime";
15
- function WithdrawModalWithReown(props) {
16
- const reown = useReownWallet();
17
- const handleConnect = useCallback(() => {
18
- reown.openConnect();
19
- }, [reown.openConnect]);
20
- const handleDisconnect = useCallback(() => {
21
- reown.disconnect();
22
- }, [reown.disconnect]);
23
- return /* @__PURE__ */ jsx(
24
- WithdrawModalInner,
25
- {
26
- ...props,
27
- reownWallet: reown,
28
- onConnect: handleConnect,
29
- onDisconnect: handleDisconnect
30
- }
31
- );
32
- }
33
- function WithdrawModalReown(props) {
34
- return /* @__PURE__ */ jsx(
35
- ReownWalletProvider,
36
- {
37
- projectId: props.reownAppId,
38
- theme: props.theme,
39
- rpcUrls: props.rpcUrls,
40
- children: /* @__PURE__ */ jsx(WithdrawModalWithReown, { ...props })
41
- }
42
- );
43
- }
44
- export {
45
- WithdrawModalReown
46
- };
@@ -1,46 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkHQWZCOMScjs = require('./chunk-HQWZCOMS.cjs');
4
-
5
-
6
-
7
- var _chunkQ3W53BKRcjs = require('./chunk-Q3W53BKR.cjs');
8
- require('./chunk-7OKA6GNA.cjs');
9
- require('./chunk-XRWQMIBY.cjs');
10
- require('./chunk-U7SVYWVD.cjs');
11
-
12
- // src/WithdrawModalReown.tsx
13
- var _react = require('react');
14
- var _jsxruntime = require('react/jsx-runtime');
15
- function WithdrawModalWithReown(props) {
16
- const reown = _chunkQ3W53BKRcjs.useReownWallet.call(void 0, );
17
- const handleConnect = _react.useCallback.call(void 0, () => {
18
- reown.openConnect();
19
- }, [reown.openConnect]);
20
- const handleDisconnect = _react.useCallback.call(void 0, () => {
21
- reown.disconnect();
22
- }, [reown.disconnect]);
23
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
24
- _chunkHQWZCOMScjs.WithdrawModalInner,
25
- {
26
- ...props,
27
- reownWallet: reown,
28
- onConnect: handleConnect,
29
- onDisconnect: handleDisconnect
30
- }
31
- );
32
- }
33
- function WithdrawModalReown(props) {
34
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
35
- _chunkQ3W53BKRcjs.ReownWalletProvider,
36
- {
37
- projectId: props.reownAppId,
38
- theme: props.theme,
39
- rpcUrls: props.rpcUrls,
40
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WithdrawModalWithReown, { ...props })
41
- }
42
- );
43
- }
44
-
45
-
46
- exports.WithdrawModalReown = WithdrawModalReown;