@reown/appkit-cdn 1.0.7 → 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/{W3MFrameProviderSingleton-CTz2n0lO.js → W3MFrameProviderSingleton--HSg3nEz.js} +4029 -3503
- package/dist/{W3MFrameProviderSingleton-DQTwz0Iu.cjs → W3MFrameProviderSingleton-SRLqDWgO.cjs} +103 -103
- package/dist/ethers.cjs +1 -1
- package/dist/ethers.js +1529 -1609
- package/dist/{hooks.module-DqUWzNtD.js → hooks.module-B_N3JvEN.js} +1 -1
- package/dist/{hooks.module-LKtd6ff7.cjs → hooks.module-CmpdbiRp.cjs} +1 -1
- package/dist/{index-D5YBEcNb.js → index-2d-aRmQF.js} +20 -20
- package/dist/{index-CmzUtRNr.js → index-3Tles8GF.js} +2 -2
- package/dist/{index-Dq2Qc6hQ.cjs → index-3jinrfKR.cjs} +1 -1
- package/dist/{index-ChPlSHaF.cjs → index-BBwc05vi.cjs} +2 -2
- package/dist/{index-CBKmOjAo.cjs → index-BmU807V9.cjs} +1 -1
- package/dist/{index-DFW14Awr.cjs → index-CDAn9JfZ.cjs} +1 -1
- package/dist/{index-DSbDKpqj.cjs → index-CIzqgU5q.cjs} +1 -1
- package/dist/{index-Bmk1Ohcq.js → index-CJq05jyL.js} +17 -17
- package/dist/{index-BtFTDllB.js → index-CO1X8Cxc.js} +2 -2
- package/dist/{index-C7kbNRtJ.cjs → index-CQ4-w5mp.cjs} +1 -1
- package/dist/{index-CzyxiVR0.js → index-DDwvGjhD.js} +1 -1
- package/dist/{index-B7Uy57AM.js → index-DSzXjBUF.js} +2 -2
- package/dist/{index-Bn6ujDok.js → index-Dlv7g3Jh.js} +2 -2
- package/dist/{index-uB2KGMj2.js → index-_Sw9VWRf.js} +2 -2
- package/dist/{index-XWvMwQij.cjs → index-sfhFJZJt.cjs} +1 -1
- package/dist/{index-CERtK4zq.cjs → index-v7RnFZTP.cjs} +1 -1
- package/dist/{index.es-RYrbKE7v.cjs → index.es-CXs4mA1g.cjs} +2 -2
- package/dist/{index.es-Cgrh4cUP.js → index.es-TVTbcEaP.js} +2 -2
- package/dist/{metamask-sdk-C0m1muMC.js → metamask-sdk-CaVruToV.js} +1 -1
- package/dist/{metamask-sdk-vXyt2FVd.cjs → metamask-sdk-CsUP8MhX.cjs} +1 -1
- package/dist/{native-C9YiZkE_.js → native-BiFy-msx.js} +1 -1
- package/dist/{native-D13cmGux.cjs → native-gXKXtBE3.cjs} +1 -1
- package/dist/{w3m-modal-CHMPq1Um.cjs → w3m-modal-Dc1peoIh.cjs} +4 -4
- package/dist/{w3m-modal-7h2X-uBO.js → w3m-modal-DwtACkc9.js} +40 -37
- package/dist/wagmi-GgXheXd8.cjs +46 -0
- package/dist/wagmi-IogORaa7.js +18186 -0
- package/dist/wagmi.cjs +1 -1
- package/dist/wagmi.js +7 -7
- package/package.json +8 -6
- package/dist/wagmi-C7gaobmd.js +0 -26828
- package/dist/wagmi-DSpqRjMY.cjs +0 -47
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as v, D as y, M as r, j as h, O as f, bb as k, r as p, I as C, F as S, R as c, _ as x, U as A, J as E, a as b, b as N, G as w, z as O, bc as L } from "./W3MFrameProviderSingleton--HSg3nEz.js";
|
|
2
2
|
const K = v`
|
|
3
3
|
:host {
|
|
4
4
|
z-index: var(--w3m-z-index);
|
|
@@ -124,19 +124,19 @@ const K = v`
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
`;
|
|
127
|
-
var d = function(u, e,
|
|
128
|
-
var
|
|
127
|
+
var d = function(u, e, t, i) {
|
|
128
|
+
var s = arguments.length, o = s < 3 ? e : i === null ? i = Object.getOwnPropertyDescriptor(e, t) : i, n;
|
|
129
129
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
|
|
130
|
-
|
|
130
|
+
o = Reflect.decorate(u, e, t, i);
|
|
131
131
|
else
|
|
132
|
-
for (var
|
|
133
|
-
(
|
|
134
|
-
return
|
|
132
|
+
for (var a = u.length - 1; a >= 0; a--)
|
|
133
|
+
(n = u[a]) && (o = (s < 3 ? n(o) : s > 3 ? n(e, t, o) : n(e, t)) || o);
|
|
134
|
+
return s > 3 && o && Object.defineProperty(e, t, o), o;
|
|
135
135
|
};
|
|
136
136
|
const g = "scroll-lock";
|
|
137
137
|
let l = class extends y {
|
|
138
138
|
constructor() {
|
|
139
|
-
super(), this.unsubscribe = [], this.abortController = void 0, this.open =
|
|
139
|
+
super(), this.unsubscribe = [], this.abortController = void 0, this.open = r.state.open, this.caipAddress = h.state.activeCaipAddress, this.caipNetwork = h.state.activeCaipNetwork, this.isSiweEnabled = f.state.isSiweEnabled, this.shake = r.state.shake, this.initializeTheming(), k.prefetch(), this.unsubscribe.push(r.subscribeKey("open", (e) => e ? this.onOpen() : this.onClose()), r.subscribeKey("shake", (e) => this.shake = e), p.subscribeKey("siweStatus", (e) => this.onSiweStatusChange(e), "eip155"), h.subscribeKey("activeCaipNetwork", (e) => this.onNewNetwork(e)), h.subscribeKey("activeCaipAddress", (e) => this.onNewAddress(e)), f.subscribeKey("isSiweEnabled", (e) => this.isSiweEnabled = e)), C.sendEvent({ type: "track", event: "MODAL_LOADED" });
|
|
140
140
|
}
|
|
141
141
|
disconnectedCallback() {
|
|
142
142
|
this.unsubscribe.forEach((e) => e()), this.onRemoveKeyboardListener();
|
|
@@ -164,16 +164,16 @@ let l = class extends y {
|
|
|
164
164
|
e.target === e.currentTarget && await this.handleClose();
|
|
165
165
|
}
|
|
166
166
|
async handleClose() {
|
|
167
|
-
const e = c.state.view === "ConnectingSiwe",
|
|
167
|
+
const e = c.state.view === "ConnectingSiwe", t = c.state.view === "ApproveTransaction";
|
|
168
168
|
if (this.isSiweEnabled) {
|
|
169
|
-
const { SIWEController:
|
|
170
|
-
|
|
169
|
+
const { SIWEController: i } = await import("./index-2d-aRmQF.js");
|
|
170
|
+
i.state.status !== "success" && (e || t) ? r.shake() : r.close();
|
|
171
171
|
} else
|
|
172
|
-
|
|
172
|
+
r.close();
|
|
173
173
|
}
|
|
174
174
|
initializeTheming() {
|
|
175
|
-
const { themeVariables: e, themeMode:
|
|
176
|
-
A(e,
|
|
175
|
+
const { themeVariables: e, themeMode: t } = L.state, i = x.getColorTheme(t);
|
|
176
|
+
A(e, i);
|
|
177
177
|
}
|
|
178
178
|
onClose() {
|
|
179
179
|
this.open = !1, this.classList.remove("open"), this.onScrollUnlock(), E.hide(), this.onRemoveKeyboardListener();
|
|
@@ -199,15 +199,15 @@ let l = class extends y {
|
|
|
199
199
|
e && e.remove();
|
|
200
200
|
}
|
|
201
201
|
onAddKeyboardListener() {
|
|
202
|
-
var
|
|
202
|
+
var t;
|
|
203
203
|
this.abortController = new AbortController();
|
|
204
|
-
const e = (
|
|
205
|
-
e == null || e.focus(), window.addEventListener("keydown", (
|
|
206
|
-
if (
|
|
204
|
+
const e = (t = this.shadowRoot) == null ? void 0 : t.querySelector("wui-card");
|
|
205
|
+
e == null || e.focus(), window.addEventListener("keydown", (i) => {
|
|
206
|
+
if (i.key === "Escape")
|
|
207
207
|
this.handleClose();
|
|
208
|
-
else if (
|
|
209
|
-
const { tagName:
|
|
210
|
-
|
|
208
|
+
else if (i.key === "Tab") {
|
|
209
|
+
const { tagName: s } = i.target;
|
|
210
|
+
s && !s.includes("W3M-") && !s.includes("WUI-") && (e == null || e.focus());
|
|
211
211
|
}
|
|
212
212
|
}, this.abortController);
|
|
213
213
|
}
|
|
@@ -216,35 +216,38 @@ let l = class extends y {
|
|
|
216
216
|
(e = this.abortController) == null || e.abort(), this.abortController = void 0;
|
|
217
217
|
}
|
|
218
218
|
onSiweStatusChange(e) {
|
|
219
|
-
e === "success" &&
|
|
219
|
+
e === "success" && r.close();
|
|
220
220
|
}
|
|
221
221
|
async onNewAddress(e) {
|
|
222
|
-
var
|
|
223
|
-
const
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
222
|
+
var n;
|
|
223
|
+
const t = this.caipAddress, i = t ? b.getPlainAddress(t) : void 0, s = e ? b.getPlainAddress(e) : void 0, o = i === s;
|
|
224
|
+
if (this.caipAddress = e, s && !o && this.isSiweEnabled)
|
|
225
|
+
try {
|
|
226
|
+
const { SIWEController: a } = await import("./index-2d-aRmQF.js"), m = p.state.siweStatus === "success";
|
|
227
|
+
!i && s ? this.onSiweNavigation() : m && i && s && i !== s && (n = a.state._client) != null && n.options.signOutOnAccountChange && (await a.signOut(), this.onSiweNavigation());
|
|
228
|
+
} catch (a) {
|
|
229
|
+
throw this.caipAddress = t, a;
|
|
230
|
+
}
|
|
231
|
+
s || r.close();
|
|
229
232
|
}
|
|
230
233
|
async onNewNetwork(e) {
|
|
231
|
-
var o,
|
|
234
|
+
var s, o, n, a;
|
|
232
235
|
if (!this.caipAddress) {
|
|
233
236
|
this.caipNetwork = e, c.goBack();
|
|
234
237
|
return;
|
|
235
238
|
}
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
239
|
+
const t = (o = (s = this.caipNetwork) == null ? void 0 : s.caipNetworkId) == null ? void 0 : o.toString(), i = (n = e == null ? void 0 : e.caipNetworkId) == null ? void 0 : n.toString();
|
|
240
|
+
if (t && i && t !== i)
|
|
238
241
|
if (this.isSiweEnabled) {
|
|
239
|
-
const { SIWEController:
|
|
240
|
-
(
|
|
242
|
+
const { SIWEController: m } = await import("./index-2d-aRmQF.js");
|
|
243
|
+
(a = m.state._client) != null && a.options.signOutOnNetworkChange ? (await m.signOut(), this.onSiweNavigation()) : c.goBack();
|
|
241
244
|
} else
|
|
242
245
|
c.goBack();
|
|
243
246
|
this.caipNetwork = e;
|
|
244
247
|
}
|
|
245
248
|
onSiweNavigation() {
|
|
246
|
-
const e = h.state.activeChain ===
|
|
247
|
-
!(
|
|
249
|
+
const e = h.state.activeChain === N.CHAIN.EVM;
|
|
250
|
+
!(p.state.siweStatus === "success") && e ? this.open ? c.replace("ConnectingSiwe") : r.open({
|
|
248
251
|
view: "ConnectingSiwe"
|
|
249
252
|
}) : c.goBack();
|
|
250
253
|
}
|
|
@@ -266,7 +269,7 @@ d([
|
|
|
266
269
|
w()
|
|
267
270
|
], l.prototype, "shake", void 0);
|
|
268
271
|
l = d([
|
|
269
|
-
|
|
272
|
+
O("w3m-modal")
|
|
270
273
|
], l);
|
|
271
274
|
export {
|
|
272
275
|
l as W3mModal
|