@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.
Files changed (37) hide show
  1. package/dist/{W3MFrameProviderSingleton-CTz2n0lO.js → W3MFrameProviderSingleton--HSg3nEz.js} +4029 -3503
  2. package/dist/{W3MFrameProviderSingleton-DQTwz0Iu.cjs → W3MFrameProviderSingleton-SRLqDWgO.cjs} +103 -103
  3. package/dist/ethers.cjs +1 -1
  4. package/dist/ethers.js +1529 -1609
  5. package/dist/{hooks.module-DqUWzNtD.js → hooks.module-B_N3JvEN.js} +1 -1
  6. package/dist/{hooks.module-LKtd6ff7.cjs → hooks.module-CmpdbiRp.cjs} +1 -1
  7. package/dist/{index-D5YBEcNb.js → index-2d-aRmQF.js} +20 -20
  8. package/dist/{index-CmzUtRNr.js → index-3Tles8GF.js} +2 -2
  9. package/dist/{index-Dq2Qc6hQ.cjs → index-3jinrfKR.cjs} +1 -1
  10. package/dist/{index-ChPlSHaF.cjs → index-BBwc05vi.cjs} +2 -2
  11. package/dist/{index-CBKmOjAo.cjs → index-BmU807V9.cjs} +1 -1
  12. package/dist/{index-DFW14Awr.cjs → index-CDAn9JfZ.cjs} +1 -1
  13. package/dist/{index-DSbDKpqj.cjs → index-CIzqgU5q.cjs} +1 -1
  14. package/dist/{index-Bmk1Ohcq.js → index-CJq05jyL.js} +17 -17
  15. package/dist/{index-BtFTDllB.js → index-CO1X8Cxc.js} +2 -2
  16. package/dist/{index-C7kbNRtJ.cjs → index-CQ4-w5mp.cjs} +1 -1
  17. package/dist/{index-CzyxiVR0.js → index-DDwvGjhD.js} +1 -1
  18. package/dist/{index-B7Uy57AM.js → index-DSzXjBUF.js} +2 -2
  19. package/dist/{index-Bn6ujDok.js → index-Dlv7g3Jh.js} +2 -2
  20. package/dist/{index-uB2KGMj2.js → index-_Sw9VWRf.js} +2 -2
  21. package/dist/{index-XWvMwQij.cjs → index-sfhFJZJt.cjs} +1 -1
  22. package/dist/{index-CERtK4zq.cjs → index-v7RnFZTP.cjs} +1 -1
  23. package/dist/{index.es-RYrbKE7v.cjs → index.es-CXs4mA1g.cjs} +2 -2
  24. package/dist/{index.es-Cgrh4cUP.js → index.es-TVTbcEaP.js} +2 -2
  25. package/dist/{metamask-sdk-C0m1muMC.js → metamask-sdk-CaVruToV.js} +1 -1
  26. package/dist/{metamask-sdk-vXyt2FVd.cjs → metamask-sdk-CsUP8MhX.cjs} +1 -1
  27. package/dist/{native-C9YiZkE_.js → native-BiFy-msx.js} +1 -1
  28. package/dist/{native-D13cmGux.cjs → native-gXKXtBE3.cjs} +1 -1
  29. package/dist/{w3m-modal-CHMPq1Um.cjs → w3m-modal-Dc1peoIh.cjs} +4 -4
  30. package/dist/{w3m-modal-7h2X-uBO.js → w3m-modal-DwtACkc9.js} +40 -37
  31. package/dist/wagmi-GgXheXd8.cjs +46 -0
  32. package/dist/wagmi-IogORaa7.js +18186 -0
  33. package/dist/wagmi.cjs +1 -1
  34. package/dist/wagmi.js +7 -7
  35. package/package.json +8 -6
  36. package/dist/wagmi-C7gaobmd.js +0 -26828
  37. package/dist/wagmi-DSpqRjMY.cjs +0 -47
@@ -1,4 +1,4 @@
1
- import { x as v, z as y, M as n, j as h, O as f, ba as k, r as m, G as C, D as S, R as c, Z as x, T as A, I as E, a as b, b as O, F as w, y as N, bb as L } from "./W3MFrameProviderSingleton-CTz2n0lO.js";
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, i, t) {
128
- var o = arguments.length, s = o < 3 ? e : t === null ? t = Object.getOwnPropertyDescriptor(e, i) : t, a;
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
- s = Reflect.decorate(u, e, i, t);
130
+ o = Reflect.decorate(u, e, t, i);
131
131
  else
132
- for (var r = u.length - 1; r >= 0; r--)
133
- (a = u[r]) && (s = (o < 3 ? a(s) : o > 3 ? a(e, i, s) : a(e, i)) || s);
134
- return o > 3 && s && Object.defineProperty(e, i, s), s;
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 = n.state.open, this.caipAddress = h.state.activeCaipAddress, this.caipNetwork = h.state.activeCaipNetwork, this.isSiweEnabled = f.state.isSiweEnabled, this.shake = n.state.shake, this.initializeTheming(), k.prefetch(), this.unsubscribe.push(n.subscribeKey("open", (e) => e ? this.onOpen() : this.onClose()), n.subscribeKey("shake", (e) => this.shake = e), m.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" });
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", i = c.state.view === "ApproveTransaction";
167
+ const e = c.state.view === "ConnectingSiwe", t = c.state.view === "ApproveTransaction";
168
168
  if (this.isSiweEnabled) {
169
- const { SIWEController: t } = await import("./index-D5YBEcNb.js");
170
- t.state.status !== "success" && (e || i) ? n.shake() : n.close();
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
- n.close();
172
+ r.close();
173
173
  }
174
174
  initializeTheming() {
175
- const { themeVariables: e, themeMode: i } = L.state, t = x.getColorTheme(i);
176
- A(e, t);
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 i;
202
+ var t;
203
203
  this.abortController = new AbortController();
204
- const e = (i = this.shadowRoot) == null ? void 0 : i.querySelector("wui-card");
205
- e == null || e.focus(), window.addEventListener("keydown", (t) => {
206
- if (t.key === "Escape")
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 (t.key === "Tab") {
209
- const { tagName: o } = t.target;
210
- o && !o.includes("W3M-") && !o.includes("WUI-") && (e == null || e.focus());
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" && n.close();
219
+ e === "success" && r.close();
220
220
  }
221
221
  async onNewAddress(e) {
222
- var s;
223
- const i = this.caipAddress ? b.getPlainAddress(this.caipAddress) : void 0, t = e ? b.getPlainAddress(e) : void 0;
224
- if (t && !(i === t) && this.isSiweEnabled) {
225
- const { SIWEController: a } = await import("./index-D5YBEcNb.js"), r = m.state.siweStatus === "success";
226
- !i && t ? this.onSiweNavigation() : r && i && t && i !== t && (s = a.state._client) != null && s.options.signOutOnAccountChange && (await a.signOut(), this.onSiweNavigation());
227
- }
228
- t || n.close(), this.caipAddress = e;
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, s, a, r;
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 i = (s = (o = this.caipNetwork) == null ? void 0 : o.id) == null ? void 0 : s.toString(), t = (a = e == null ? void 0 : e.id) == null ? void 0 : a.toString();
237
- if (i && t && i !== t)
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: p } = await import("./index-D5YBEcNb.js");
240
- (r = p.state._client) != null && r.options.signOutOnNetworkChange ? (await p.signOut(), this.onSiweNavigation()) : c.goBack();
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 === O.CHAIN.EVM;
247
- !(m.state.siweStatus === "success") && e ? this.open ? c.replace("ConnectingSiwe") : n.open({
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
- N("w3m-modal")
272
+ O("w3m-modal")
270
273
  ], l);
271
274
  export {
272
275
  l as W3mModal