@block-auth.io/blockauth-sdk-react 0.3.1 → 0.4.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/bundle.es.js +8 -8
- package/dist/index-Bak4uhEH.js +88 -0
- package/dist/index-Bak4uhEH.js.map +1 -0
- package/dist/{index-CVnwsF9C.js → index-CLdJ05nx.js} +8 -8
- package/dist/{index-CVnwsF9C.js.map → index-CLdJ05nx.js.map} +1 -1
- package/dist/{main-fe5ztrjo.js → main-h-jNMamK.js} +4670 -3605
- package/dist/{main-BSNnXBCm.cjs.map → main-h-jNMamK.js.map} +1 -1
- package/dist/{w3m-modal-Df39WIir.js → w3m-modal-xOVNG6py.js} +6 -6
- package/dist/{w3m-modal-Df39WIir.js.map → w3m-modal-xOVNG6py.js.map} +1 -1
- package/package.json +17 -10
- package/dist/bundle.cjs.js +0 -2
- package/dist/bundle.cjs.js.map +0 -1
- package/dist/index-BIjreRhR.cjs +0 -2
- package/dist/index-BIjreRhR.cjs.map +0 -1
- package/dist/index-BrxwR1Ko.cjs +0 -65
- package/dist/index-BrxwR1Ko.cjs.map +0 -1
- package/dist/index-CZ74NMDc.js +0 -88
- package/dist/index-CZ74NMDc.js.map +0 -1
- package/dist/main-BSNnXBCm.cjs +0 -11236
- package/dist/main-fe5ztrjo.js.map +0 -1
- package/dist/w3m-modal-CYPQ0c0D.cjs +0 -142
- package/dist/w3m-modal-CYPQ0c0D.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { au as i, av as i$1, aw as ModalController, ax as ChainController, ay as OptionsController, az as ApiController, aA as AccountController, aB as EventsController, aC as
|
|
1
|
+
import { au as i, av as i$1, aw as ModalController, ax as ChainController, ay as OptionsController, az as ApiController, aA as AccountController, aB as EventsController, aC as b, aD as RouterController, aE as ThemeController, U as UiHelperUtil, ap as initializeTheming, aF as SnackController, aG as CoreHelperUtil, aH as ConstantsUtil, aI as r, ao as customElement } from "./main-h-jNMamK.js";
|
|
2
2
|
const styles = i`
|
|
3
3
|
:host {
|
|
4
4
|
z-index: var(--w3m-z-index);
|
|
@@ -158,7 +158,7 @@ let W3mModal = class W3mModal2 extends i$1 {
|
|
|
158
158
|
this.onRemoveKeyboardListener();
|
|
159
159
|
}
|
|
160
160
|
render() {
|
|
161
|
-
return this.open ?
|
|
161
|
+
return this.open ? b`
|
|
162
162
|
<wui-flex @click=${this.onOverlayClick.bind(this)} data-testid="w3m-modal-overlay">
|
|
163
163
|
<wui-card
|
|
164
164
|
shake="${this.shake}"
|
|
@@ -185,7 +185,7 @@ let W3mModal = class W3mModal2 extends i$1 {
|
|
|
185
185
|
const isSiweSignScreen = RouterController.state.view === "ConnectingSiwe";
|
|
186
186
|
const isApproveSignScreen = RouterController.state.view === "ApproveTransaction";
|
|
187
187
|
if (this.isSiweEnabled) {
|
|
188
|
-
const { SIWEController } = await import("./index-
|
|
188
|
+
const { SIWEController } = await import("./index-CLdJ05nx.js");
|
|
189
189
|
const isUnauthenticated = SIWEController.state.status !== "success";
|
|
190
190
|
if (isUnauthenticated && (isSiweSignScreen || isApproveSignScreen)) {
|
|
191
191
|
ModalController.shake();
|
|
@@ -267,7 +267,7 @@ let W3mModal = class W3mModal2 extends i$1 {
|
|
|
267
267
|
const nextConnected = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : void 0;
|
|
268
268
|
const isSameAddress = prevConnected === nextConnected;
|
|
269
269
|
if (nextConnected && !isSameAddress && this.isSiweEnabled) {
|
|
270
|
-
const { SIWEController } = await import("./index-
|
|
270
|
+
const { SIWEController } = await import("./index-CLdJ05nx.js");
|
|
271
271
|
const signed = AccountController.state.siweStatus === "success";
|
|
272
272
|
if (!prevConnected && nextConnected) {
|
|
273
273
|
this.onSiweNavigation();
|
|
@@ -294,7 +294,7 @@ let W3mModal = class W3mModal2 extends i$1 {
|
|
|
294
294
|
const nextNetworkId = (_c = nextCaipNetwork == null ? void 0 : nextCaipNetwork.id) == null ? void 0 : _c.toString();
|
|
295
295
|
if (prevCaipNetworkId && nextNetworkId && prevCaipNetworkId !== nextNetworkId) {
|
|
296
296
|
if (this.isSiweEnabled) {
|
|
297
|
-
const { SIWEController } = await import("./index-
|
|
297
|
+
const { SIWEController } = await import("./index-CLdJ05nx.js");
|
|
298
298
|
if ((_d = SIWEController.state._client) == null ? void 0 : _d.options.signOutOnNetworkChange) {
|
|
299
299
|
await SIWEController.signOut();
|
|
300
300
|
this.onSiweNavigation();
|
|
@@ -345,4 +345,4 @@ W3mModal = __decorate([
|
|
|
345
345
|
export {
|
|
346
346
|
W3mModal
|
|
347
347
|
};
|
|
348
|
-
//# sourceMappingURL=w3m-modal-
|
|
348
|
+
//# sourceMappingURL=w3m-modal-xOVNG6py.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"w3m-modal-Df39WIir.js","sources":["../node_modules/@reown/appkit-scaffold-ui/dist/esm/src/modal/w3m-modal/styles.js","../node_modules/@reown/appkit-scaffold-ui/dist/esm/src/modal/w3m-modal/index.js"],"sourcesContent":["import { css } from 'lit';\nexport default css `\n :host {\n z-index: var(--w3m-z-index);\n display: block;\n backface-visibility: hidden;\n will-change: opacity;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n opacity: 0;\n background-color: var(--wui-cover);\n transition: opacity 0.2s var(--wui-ease-out-power-2);\n will-change: opacity;\n }\n\n :host(.open) {\n opacity: 1;\n }\n\n wui-card {\n max-width: var(--w3m-modal-width);\n width: 100%;\n position: relative;\n animation: zoom-in 0.2s var(--wui-ease-out-power-2);\n animation-fill-mode: backwards;\n outline: none;\n }\n\n wui-card[shake='true'] {\n animation:\n zoom-in 0.2s var(--wui-ease-out-power-2),\n w3m-shake 0.5s var(--wui-ease-out-power-2);\n }\n\n wui-flex {\n overflow-x: hidden;\n overflow-y: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n @media (max-height: 700px) and (min-width: 431px) {\n wui-flex {\n align-items: flex-start;\n }\n\n wui-card {\n margin: var(--wui-spacing-xxl) 0px;\n }\n }\n\n @media (max-width: 430px) {\n wui-flex {\n align-items: flex-end;\n }\n\n wui-card {\n max-width: 100%;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom: none;\n animation: slide-in 0.2s var(--wui-ease-out-power-2);\n }\n\n wui-card[shake='true'] {\n animation:\n slide-in 0.2s var(--wui-ease-out-power-2),\n w3m-shake 0.5s var(--wui-ease-out-power-2);\n }\n }\n\n @keyframes zoom-in {\n 0% {\n transform: scale(0.95) translateY(0);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes slide-in {\n 0% {\n transform: scale(1) translateY(50px);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes w3m-shake {\n 0% {\n transform: scale(1) rotate(0deg);\n }\n 20% {\n transform: scale(1) rotate(-1deg);\n }\n 40% {\n transform: scale(1) rotate(1.5deg);\n }\n 60% {\n transform: scale(1) rotate(-1.5deg);\n }\n 80% {\n transform: scale(1) rotate(1deg);\n }\n 100% {\n transform: scale(1) rotate(0deg);\n }\n }\n\n @keyframes w3m-view-height {\n from {\n height: var(--prev-height);\n }\n to {\n height: var(--new-height);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ApiController, ChainController, CoreHelperUtil, EventsController, ModalController, OptionsController, RouterController, SnackController, ThemeController } from '@reown/appkit-core';\nimport { UiHelperUtil, customElement, initializeTheming } from '@reown/appkit-ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ConstantsUtil } from '@reown/appkit-common';\nconst SCROLL_LOCK = 'scroll-lock';\nlet W3mModal = class W3mModal extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.abortController = undefined;\n this.open = ModalController.state.open;\n this.caipAddress = ChainController.state.activeCaipAddress;\n this.caipNetwork = ChainController.state.activeCaipNetwork;\n this.isSiweEnabled = OptionsController.state.isSiweEnabled;\n this.shake = ModalController.state.shake;\n this.initializeTheming();\n ApiController.prefetch();\n this.unsubscribe.push(...[\n ModalController.subscribeKey('open', val => (val ? this.onOpen() : this.onClose())),\n ModalController.subscribeKey('shake', val => (this.shake = val)),\n AccountController.subscribeKey('siweStatus', val => this.onSiweStatusChange(val), 'eip155'),\n ChainController.subscribeKey('activeCaipNetwork', val => this.onNewNetwork(val)),\n ChainController.subscribeKey('activeCaipAddress', val => this.onNewAddress(val)),\n OptionsController.subscribeKey('isSiweEnabled', val => (this.isSiweEnabled = val))\n ]);\n EventsController.sendEvent({ type: 'track', event: 'MODAL_LOADED' });\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.onRemoveKeyboardListener();\n }\n render() {\n return this.open\n ? html `\n <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid=\"w3m-modal-overlay\">\n <wui-card\n shake=\"${this.shake}\"\n role=\"alertdialog\"\n aria-modal=\"true\"\n tabindex=\"0\"\n data-testid=\"w3m-modal-card\"\n >\n <w3m-header></w3m-header>\n <w3m-router></w3m-router>\n <w3m-snackbar></w3m-snackbar>\n <w3m-alertbar></w3m-alertbar>\n </wui-card>\n </wui-flex>\n <w3m-tooltip></w3m-tooltip>\n `\n : null;\n }\n async onOverlayClick(event) {\n if (event.target === event.currentTarget) {\n await this.handleClose();\n }\n }\n async handleClose() {\n const isSiweSignScreen = RouterController.state.view === 'ConnectingSiwe';\n const isApproveSignScreen = RouterController.state.view === 'ApproveTransaction';\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@reown/appkit-siwe');\n const isUnauthenticated = SIWEController.state.status !== 'success';\n if (isUnauthenticated && (isSiweSignScreen || isApproveSignScreen)) {\n ModalController.shake();\n }\n else {\n ModalController.close();\n }\n }\n else {\n ModalController.close();\n }\n }\n initializeTheming() {\n const { themeVariables, themeMode } = ThemeController.state;\n const defaultThemeMode = UiHelperUtil.getColorTheme(themeMode);\n initializeTheming(themeVariables, defaultThemeMode);\n }\n onClose() {\n this.open = false;\n this.classList.remove('open');\n this.onScrollUnlock();\n SnackController.hide();\n this.onRemoveKeyboardListener();\n }\n onOpen() {\n this.open = true;\n this.classList.add('open');\n this.onScrollLock();\n this.onAddKeyboardListener();\n }\n onScrollLock() {\n const styleTag = document.createElement('style');\n styleTag.dataset['w3m'] = SCROLL_LOCK;\n styleTag.textContent = `\n body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n `;\n document.head.appendChild(styleTag);\n }\n onScrollUnlock() {\n const styleTag = document.head.querySelector(`style[data-w3m=\"${SCROLL_LOCK}\"]`);\n if (styleTag) {\n styleTag.remove();\n }\n }\n onAddKeyboardListener() {\n this.abortController = new AbortController();\n const card = this.shadowRoot?.querySelector('wui-card');\n card?.focus();\n window.addEventListener('keydown', event => {\n if (event.key === 'Escape') {\n this.handleClose();\n }\n else if (event.key === 'Tab') {\n const { tagName } = event.target;\n if (tagName && !tagName.includes('W3M-') && !tagName.includes('WUI-')) {\n card?.focus();\n }\n }\n }, this.abortController);\n }\n onRemoveKeyboardListener() {\n this.abortController?.abort();\n this.abortController = undefined;\n }\n onSiweStatusChange(nextStatus) {\n if (nextStatus === 'success') {\n ModalController.close();\n }\n }\n async onNewAddress(caipAddress) {\n const prevConnected = this.caipAddress\n ? CoreHelperUtil.getPlainAddress(this.caipAddress)\n : undefined;\n const nextConnected = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined;\n const isSameAddress = prevConnected === nextConnected;\n if (nextConnected && !isSameAddress && this.isSiweEnabled) {\n const { SIWEController } = await import('@reown/appkit-siwe');\n const signed = AccountController.state.siweStatus === 'success';\n if (!prevConnected && nextConnected) {\n this.onSiweNavigation();\n }\n else if (signed && prevConnected && nextConnected && prevConnected !== nextConnected) {\n if (SIWEController.state._client?.options.signOutOnAccountChange) {\n await SIWEController.signOut();\n this.onSiweNavigation();\n }\n }\n }\n if (!nextConnected) {\n ModalController.close();\n }\n this.caipAddress = caipAddress;\n }\n async onNewNetwork(nextCaipNetwork) {\n if (!this.caipAddress) {\n this.caipNetwork = nextCaipNetwork;\n RouterController.goBack();\n return;\n }\n const prevCaipNetworkId = this.caipNetwork?.id?.toString();\n const nextNetworkId = nextCaipNetwork?.id?.toString();\n if (prevCaipNetworkId && nextNetworkId && prevCaipNetworkId !== nextNetworkId) {\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@reown/appkit-siwe');\n if (SIWEController.state._client?.options.signOutOnNetworkChange) {\n await SIWEController.signOut();\n this.onSiweNavigation();\n }\n else {\n RouterController.goBack();\n }\n }\n else {\n RouterController.goBack();\n }\n }\n this.caipNetwork = nextCaipNetwork;\n }\n onSiweNavigation() {\n const isEIP155Namespace = ChainController.state.activeChain === ConstantsUtil.CHAIN.EVM;\n const authenticated = AccountController.state.siweStatus === 'success';\n if (!authenticated && isEIP155Namespace) {\n if (this.open) {\n RouterController.replace('ConnectingSiwe');\n }\n else {\n ModalController.open({\n view: 'ConnectingSiwe'\n });\n }\n }\n else {\n RouterController.goBack();\n }\n }\n};\nW3mModal.styles = styles;\n__decorate([\n state()\n], W3mModal.prototype, \"open\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"caipAddress\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"caipNetwork\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"isSiweEnabled\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"shake\", void 0);\nW3mModal = __decorate([\n customElement('w3m-modal')\n], W3mModal);\nexport { W3mModal };\n//# sourceMappingURL=index.js.map"],"names":["css","r","i","W3mModal","LitElement","html","state"],"mappings":";AACA,MAAA,SAAeA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;ACDf,IAAI,aAA0C,SAAU,YAAY,QAAQ,KAAK,MAAM;AACnF,MAAI,IAAI,UAAU,QAAQC,KAAI,IAAI,IAAI,SAAS,SAAS,OAAO,OAAO,OAAO,yBAAyB,QAAQ,GAAG,IAAI,MAAM;AAC3H,MAAI,OAAO,YA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AiB,OAAM;AAAA,IAC3B;AAAA,EACJ;AACJ;AACA,SAAS,SAAS;AAClB,WAAW;AAAA,EACPC,EAAK;AACT,GAAG,SAAS,WAAW,QAAQ,MAAM;AACrC,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,eAAe,MAAM;AAC5C,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,eAAe,MAAM;AAC5C,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,iBAAiB,MAAM;AAC9C,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,SAAS,MAAM;AACtC,WAAW,WAAW;AAAA,EAClB,cAAc,WAAW;AAC7B,GAAG,QAAQ;","x_google_ignoreList":[0,1]}
|
|
1
|
+
{"version":3,"file":"w3m-modal-xOVNG6py.js","sources":["../node_modules/@reown/appkit-scaffold-ui/dist/esm/src/modal/w3m-modal/styles.js","../node_modules/@reown/appkit-scaffold-ui/dist/esm/src/modal/w3m-modal/index.js"],"sourcesContent":["import { css } from 'lit';\nexport default css `\n :host {\n z-index: var(--w3m-z-index);\n display: block;\n backface-visibility: hidden;\n will-change: opacity;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n opacity: 0;\n background-color: var(--wui-cover);\n transition: opacity 0.2s var(--wui-ease-out-power-2);\n will-change: opacity;\n }\n\n :host(.open) {\n opacity: 1;\n }\n\n wui-card {\n max-width: var(--w3m-modal-width);\n width: 100%;\n position: relative;\n animation: zoom-in 0.2s var(--wui-ease-out-power-2);\n animation-fill-mode: backwards;\n outline: none;\n }\n\n wui-card[shake='true'] {\n animation:\n zoom-in 0.2s var(--wui-ease-out-power-2),\n w3m-shake 0.5s var(--wui-ease-out-power-2);\n }\n\n wui-flex {\n overflow-x: hidden;\n overflow-y: auto;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n }\n\n @media (max-height: 700px) and (min-width: 431px) {\n wui-flex {\n align-items: flex-start;\n }\n\n wui-card {\n margin: var(--wui-spacing-xxl) 0px;\n }\n }\n\n @media (max-width: 430px) {\n wui-flex {\n align-items: flex-end;\n }\n\n wui-card {\n max-width: 100%;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom: none;\n animation: slide-in 0.2s var(--wui-ease-out-power-2);\n }\n\n wui-card[shake='true'] {\n animation:\n slide-in 0.2s var(--wui-ease-out-power-2),\n w3m-shake 0.5s var(--wui-ease-out-power-2);\n }\n }\n\n @keyframes zoom-in {\n 0% {\n transform: scale(0.95) translateY(0);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes slide-in {\n 0% {\n transform: scale(1) translateY(50px);\n }\n 100% {\n transform: scale(1) translateY(0);\n }\n }\n\n @keyframes w3m-shake {\n 0% {\n transform: scale(1) rotate(0deg);\n }\n 20% {\n transform: scale(1) rotate(-1deg);\n }\n 40% {\n transform: scale(1) rotate(1.5deg);\n }\n 60% {\n transform: scale(1) rotate(-1.5deg);\n }\n 80% {\n transform: scale(1) rotate(1deg);\n }\n 100% {\n transform: scale(1) rotate(0deg);\n }\n }\n\n @keyframes w3m-view-height {\n from {\n height: var(--prev-height);\n }\n to {\n height: var(--new-height);\n }\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ApiController, ChainController, CoreHelperUtil, EventsController, ModalController, OptionsController, RouterController, SnackController, ThemeController } from '@reown/appkit-core';\nimport { UiHelperUtil, customElement, initializeTheming } from '@reown/appkit-ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport styles from './styles.js';\nimport { ConstantsUtil } from '@reown/appkit-common';\nconst SCROLL_LOCK = 'scroll-lock';\nlet W3mModal = class W3mModal extends LitElement {\n constructor() {\n super();\n this.unsubscribe = [];\n this.abortController = undefined;\n this.open = ModalController.state.open;\n this.caipAddress = ChainController.state.activeCaipAddress;\n this.caipNetwork = ChainController.state.activeCaipNetwork;\n this.isSiweEnabled = OptionsController.state.isSiweEnabled;\n this.shake = ModalController.state.shake;\n this.initializeTheming();\n ApiController.prefetch();\n this.unsubscribe.push(...[\n ModalController.subscribeKey('open', val => (val ? this.onOpen() : this.onClose())),\n ModalController.subscribeKey('shake', val => (this.shake = val)),\n AccountController.subscribeKey('siweStatus', val => this.onSiweStatusChange(val), 'eip155'),\n ChainController.subscribeKey('activeCaipNetwork', val => this.onNewNetwork(val)),\n ChainController.subscribeKey('activeCaipAddress', val => this.onNewAddress(val)),\n OptionsController.subscribeKey('isSiweEnabled', val => (this.isSiweEnabled = val))\n ]);\n EventsController.sendEvent({ type: 'track', event: 'MODAL_LOADED' });\n }\n disconnectedCallback() {\n this.unsubscribe.forEach(unsubscribe => unsubscribe());\n this.onRemoveKeyboardListener();\n }\n render() {\n return this.open\n ? html `\n <wui-flex @click=${this.onOverlayClick.bind(this)} data-testid=\"w3m-modal-overlay\">\n <wui-card\n shake=\"${this.shake}\"\n role=\"alertdialog\"\n aria-modal=\"true\"\n tabindex=\"0\"\n data-testid=\"w3m-modal-card\"\n >\n <w3m-header></w3m-header>\n <w3m-router></w3m-router>\n <w3m-snackbar></w3m-snackbar>\n <w3m-alertbar></w3m-alertbar>\n </wui-card>\n </wui-flex>\n <w3m-tooltip></w3m-tooltip>\n `\n : null;\n }\n async onOverlayClick(event) {\n if (event.target === event.currentTarget) {\n await this.handleClose();\n }\n }\n async handleClose() {\n const isSiweSignScreen = RouterController.state.view === 'ConnectingSiwe';\n const isApproveSignScreen = RouterController.state.view === 'ApproveTransaction';\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@reown/appkit-siwe');\n const isUnauthenticated = SIWEController.state.status !== 'success';\n if (isUnauthenticated && (isSiweSignScreen || isApproveSignScreen)) {\n ModalController.shake();\n }\n else {\n ModalController.close();\n }\n }\n else {\n ModalController.close();\n }\n }\n initializeTheming() {\n const { themeVariables, themeMode } = ThemeController.state;\n const defaultThemeMode = UiHelperUtil.getColorTheme(themeMode);\n initializeTheming(themeVariables, defaultThemeMode);\n }\n onClose() {\n this.open = false;\n this.classList.remove('open');\n this.onScrollUnlock();\n SnackController.hide();\n this.onRemoveKeyboardListener();\n }\n onOpen() {\n this.open = true;\n this.classList.add('open');\n this.onScrollLock();\n this.onAddKeyboardListener();\n }\n onScrollLock() {\n const styleTag = document.createElement('style');\n styleTag.dataset['w3m'] = SCROLL_LOCK;\n styleTag.textContent = `\n body {\n touch-action: none;\n overflow: hidden;\n overscroll-behavior: contain;\n }\n w3m-modal {\n pointer-events: auto;\n }\n `;\n document.head.appendChild(styleTag);\n }\n onScrollUnlock() {\n const styleTag = document.head.querySelector(`style[data-w3m=\"${SCROLL_LOCK}\"]`);\n if (styleTag) {\n styleTag.remove();\n }\n }\n onAddKeyboardListener() {\n this.abortController = new AbortController();\n const card = this.shadowRoot?.querySelector('wui-card');\n card?.focus();\n window.addEventListener('keydown', event => {\n if (event.key === 'Escape') {\n this.handleClose();\n }\n else if (event.key === 'Tab') {\n const { tagName } = event.target;\n if (tagName && !tagName.includes('W3M-') && !tagName.includes('WUI-')) {\n card?.focus();\n }\n }\n }, this.abortController);\n }\n onRemoveKeyboardListener() {\n this.abortController?.abort();\n this.abortController = undefined;\n }\n onSiweStatusChange(nextStatus) {\n if (nextStatus === 'success') {\n ModalController.close();\n }\n }\n async onNewAddress(caipAddress) {\n const prevConnected = this.caipAddress\n ? CoreHelperUtil.getPlainAddress(this.caipAddress)\n : undefined;\n const nextConnected = caipAddress ? CoreHelperUtil.getPlainAddress(caipAddress) : undefined;\n const isSameAddress = prevConnected === nextConnected;\n if (nextConnected && !isSameAddress && this.isSiweEnabled) {\n const { SIWEController } = await import('@reown/appkit-siwe');\n const signed = AccountController.state.siweStatus === 'success';\n if (!prevConnected && nextConnected) {\n this.onSiweNavigation();\n }\n else if (signed && prevConnected && nextConnected && prevConnected !== nextConnected) {\n if (SIWEController.state._client?.options.signOutOnAccountChange) {\n await SIWEController.signOut();\n this.onSiweNavigation();\n }\n }\n }\n if (!nextConnected) {\n ModalController.close();\n }\n this.caipAddress = caipAddress;\n }\n async onNewNetwork(nextCaipNetwork) {\n if (!this.caipAddress) {\n this.caipNetwork = nextCaipNetwork;\n RouterController.goBack();\n return;\n }\n const prevCaipNetworkId = this.caipNetwork?.id?.toString();\n const nextNetworkId = nextCaipNetwork?.id?.toString();\n if (prevCaipNetworkId && nextNetworkId && prevCaipNetworkId !== nextNetworkId) {\n if (this.isSiweEnabled) {\n const { SIWEController } = await import('@reown/appkit-siwe');\n if (SIWEController.state._client?.options.signOutOnNetworkChange) {\n await SIWEController.signOut();\n this.onSiweNavigation();\n }\n else {\n RouterController.goBack();\n }\n }\n else {\n RouterController.goBack();\n }\n }\n this.caipNetwork = nextCaipNetwork;\n }\n onSiweNavigation() {\n const isEIP155Namespace = ChainController.state.activeChain === ConstantsUtil.CHAIN.EVM;\n const authenticated = AccountController.state.siweStatus === 'success';\n if (!authenticated && isEIP155Namespace) {\n if (this.open) {\n RouterController.replace('ConnectingSiwe');\n }\n else {\n ModalController.open({\n view: 'ConnectingSiwe'\n });\n }\n }\n else {\n RouterController.goBack();\n }\n }\n};\nW3mModal.styles = styles;\n__decorate([\n state()\n], W3mModal.prototype, \"open\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"caipAddress\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"caipNetwork\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"isSiweEnabled\", void 0);\n__decorate([\n state()\n], W3mModal.prototype, \"shake\", void 0);\nW3mModal = __decorate([\n customElement('w3m-modal')\n], W3mModal);\nexport { W3mModal };\n//# sourceMappingURL=index.js.map"],"names":["css","r","i","W3mModal","LitElement","html","state"],"mappings":";AACA,MAAA,SAAeA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA;ACDf,IAAI,aAA0C,SAAU,YAAY,QAAQ,KAAK,MAAM;AACnF,MAAI,IAAI,UAAU,QAAQC,KAAI,IAAI,IAAI,SAAS,SAAS,OAAO,OAAO,OAAO,yBAAyB,QAAQ,GAAG,IAAI,MAAM;AAC3H,MAAI,OAAO,YAAY,YAAY,OAAO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A,IAC3B;AAAA,EACJ;AACJ;AACA,SAAS,SAAS;AAClB,WAAW;AAAA,EACPC,EAAK;AACT,GAAG,SAAS,WAAW,QAAQ,MAAM;AACrC,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,eAAe,MAAM;AAC5C,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,eAAe,MAAM;AAC5C,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,iBAAiB,MAAM;AAC9C,WAAW;AAAA,EACPA,EAAK;AACT,GAAG,SAAS,WAAW,SAAS,MAAM;AACtC,WAAW,WAAW;AAAA,EAClB,cAAc,WAAW;AAC7B,GAAG,QAAQ;","x_google_ignoreList":[0,1]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@block-auth.io/blockauth-sdk-react",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
4
|
"description": "Block-Auth Auth SDK is a SaaS service blockchain based authentication service. It provides a simple and secure way to authenticate users in your application.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"src": "./src/main.js",
|
|
8
8
|
"main": "./dist/bundle.umd.js",
|
|
@@ -22,10 +22,6 @@
|
|
|
22
22
|
"./public/output.css": {
|
|
23
23
|
"import": "./public/output.css",
|
|
24
24
|
"require": "./public/output.css"
|
|
25
|
-
},
|
|
26
|
-
"./node_modules/react": {
|
|
27
|
-
"import": "./node_modules/react/index.js",
|
|
28
|
-
"require": "./node_modules/react/index.js"
|
|
29
25
|
}
|
|
30
26
|
},
|
|
31
27
|
"files": [
|
|
@@ -37,7 +33,7 @@
|
|
|
37
33
|
"build:types": "tsc",
|
|
38
34
|
"css": "npx tailwindcss -i \"src/assets/css/input.css\" -o \"src/assets/css/output.css\" -o \"public/output.css\"",
|
|
39
35
|
"css:dev": "npx tailwindcss -i \"./src/assets/css/input.css\" -o \"./src/assets/css/output.css\" -o \"public/output.css\" --watch",
|
|
40
|
-
"test": "jest --collectCoverage --coverageDirectory=\".coverage/\" --ci --reporters=default --reporters=jest-junit --watchAll=false --detectOpenHandles --forceExit",
|
|
36
|
+
"test": "NODE_OPTIONS=--jitless jest --collectCoverage --coverageDirectory=\".coverage/\" --ci --reporters=default --reporters=jest-junit --watchAll=false --detectOpenHandles --forceExit --runInBand",
|
|
41
37
|
"lint": "eslint \"src/**/*.{js,jsx}\" \".storybook/stories/**/*.{js,jsx}\" \"__tests__/**/*test*.{js,jsx}\"",
|
|
42
38
|
"lint:fix": "eslint --fix \"src/**/*.{js,jsx,}\" \".storybook/stories/**/*.{js,jsx}\" \"__tests__/**/*test*.{js,jsx}\"",
|
|
43
39
|
"format": "prettier --write \"src/**/*.{js,jsx,}\" \".storybook/stories/**/*.{js,jsx}\" \"__tests__/**/*test*.{js,jsx}\" --config \".prettier.json\"",
|
|
@@ -56,6 +52,14 @@
|
|
|
56
52
|
"dev:local": "ENV_CONFIG=local vite build --watch"
|
|
57
53
|
},
|
|
58
54
|
"browserslist": "defaults, not ie <= 11",
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": "18.x"
|
|
57
|
+
},
|
|
58
|
+
"resolutions": {
|
|
59
|
+
"chokidar": "4.0.3",
|
|
60
|
+
"lru-cache": "5.1.1",
|
|
61
|
+
"@solana/codecs-numbers": "2.0.0-preview.4"
|
|
62
|
+
},
|
|
59
63
|
"peerDependencies": {
|
|
60
64
|
"@headlessui/react": "^2.0.0",
|
|
61
65
|
"@headlessui/tailwindcss": "^0.2.0"
|
|
@@ -63,17 +67,15 @@
|
|
|
63
67
|
"dependencies": {
|
|
64
68
|
"@azure/msal-browser": "^3.10.0",
|
|
65
69
|
"@azure/msal-react": "^2.0.12",
|
|
70
|
+
"@block-auth.io/blockauth-lib-react": "^0.3.2",
|
|
66
71
|
"@coinbase/wallet-sdk": "4.0.3",
|
|
67
72
|
"@ethersproject/sha2": "^5.7.0",
|
|
68
|
-
"@headlessui/react": "^2.0.0",
|
|
69
|
-
"@headlessui/tailwindcss": "^0.2.0",
|
|
70
73
|
"@heroicons/react": "^2.0.18",
|
|
71
74
|
"@radix-ui/react-slider": "^1.1.2",
|
|
72
75
|
"@react-oauth/google": "^0.12.1",
|
|
73
76
|
"@reown/appkit": "1.0.6",
|
|
74
77
|
"@reown/appkit-adapter-ethers5": "1.0.6",
|
|
75
78
|
"@solana/web3.js": "^1.91.5",
|
|
76
|
-
"@block-auth.io/blockauth-lib-react": "file:../blockauth-lib-react",
|
|
77
79
|
"blockauth-sdk": "^0.1.14",
|
|
78
80
|
"buffer": "^6.0.3",
|
|
79
81
|
"ethers": "5.7.2",
|
|
@@ -96,6 +98,8 @@
|
|
|
96
98
|
"@babel/preset-env": "^7.23.9",
|
|
97
99
|
"@babel/preset-react": "^7.23.3",
|
|
98
100
|
"@chromatic-com/storybook": "^1",
|
|
101
|
+
"@headlessui/react": "^2.0.0",
|
|
102
|
+
"@headlessui/tailwindcss": "^0.2.0",
|
|
99
103
|
"@storybook/addon-essentials": "^8.0.0",
|
|
100
104
|
"@storybook/addon-interactions": "^8.0.0",
|
|
101
105
|
"@storybook/addon-links": "^8.0.0",
|
|
@@ -164,7 +168,10 @@
|
|
|
164
168
|
"^@azure/msal-react": "<rootDir>/node_modules/@azure/msal-react/dist/index.js",
|
|
165
169
|
"^@reown/appkit": "<rootDir>/node_modules/@reown/appkit/dist/esm/exports/react.js",
|
|
166
170
|
"^@reown/appkit-adapter-ethers5": "<rootDir>/node_modules/@reown/appkit-adapter-ethers5/dist/esm/src/index.js",
|
|
167
|
-
"^
|
|
171
|
+
"^framer-motion$": "<rootDir>/mocks/framer-motion.js",
|
|
172
|
+
"^@solana/web3.js$": "<rootDir>/mocks/solana-web3.js",
|
|
173
|
+
"^@block-auth.io/blockauth-lib-react$": "<rootDir>/mocks/blockauth-lib-react.js",
|
|
174
|
+
"^blockauth-lib-react$": "<rootDir>/mocks/blockauth-lib-react.js"
|
|
168
175
|
},
|
|
169
176
|
"setupFilesAfterEnv": [
|
|
170
177
|
"<rootDir>/setupTests.js"
|
package/dist/bundle.cjs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./main-BSNnXBCm.cjs");exports.BtnGmail=t.BtnGmail,exports.BtnMetamask=t.BtnMetamask,exports.BtnMicrosoft=t.BtnMicrosoft,exports.BtnPhantom=t.BtnPhantom,exports.BtnSignin=t.BtnSignin,exports.ContentSignin=t.ContentSignin,exports.ContentSignup=t.ContentSignup,exports.ContentSignupEditable=t.ContentSignupEditable,exports.DropdownProfile=t.DropdownProfile,exports.FlowBlockAuth=t.FlowBlockAuth,exports.cleanUrl=t.cleanUrl,exports.getIp=t.getIp,exports.isValidImgUrl=t.isValidImgUrl,exports.secsToText=t.secsToText,exports.useStoreGoogle=t.useStoreGoogle,exports.useStoreMetamask=t.useStoreMetamask,exports.useStoreMicrosoft=t.useStoreMicrosoft,exports.useStoreModals=t.useStoreModals,exports.useStorePhantom=t.useStorePhantom,exports.useStoreUI=t.useStoreUI,exports.useStoreWS=t.useStoreWS;
|
|
2
|
-
//# sourceMappingURL=bundle.cjs.js.map
|
package/dist/bundle.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index-BIjreRhR.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-BSNnXBCm.cjs");exports.MathUtil=e.MathUtil,exports.TransactionUtil=e.TransactionUtil,exports.UiHelperUtil=e.UiHelperUtil,Object.defineProperty(exports,"WuiAccountButton",{enumerable:!0,get:()=>e.WuiAccountButton}),Object.defineProperty(exports,"WuiAlertBar",{enumerable:!0,get:()=>e.WuiAlertBar}),Object.defineProperty(exports,"WuiAllWalletsImage",{enumerable:!0,get:()=>e.WuiAllWalletsImage}),Object.defineProperty(exports,"WuiAvatar",{enumerable:!0,get:()=>e.WuiAvatar}),Object.defineProperty(exports,"WuiBalance",{enumerable:!0,get:()=>e.WuiBalance}),Object.defineProperty(exports,"WuiBanner",{enumerable:!0,get:()=>e.WuiBanner}),Object.defineProperty(exports,"WuiBannerImg",{enumerable:!0,get:()=>e.WuiBannerImg}),Object.defineProperty(exports,"WuiButton",{enumerable:!0,get:()=>e.WuiButton}),Object.defineProperty(exports,"WuiCard",{enumerable:!0,get:()=>e.WuiCard}),Object.defineProperty(exports,"WuiCardSelect",{enumerable:!0,get:()=>e.WuiCardSelect}),Object.defineProperty(exports,"WuiCardSelectLoader",{enumerable:!0,get:()=>e.WuiCardSelectLoader}),Object.defineProperty(exports,"WuiChip",{enumerable:!0,get:()=>e.WuiChip}),Object.defineProperty(exports,"WuiChipButton",{enumerable:!0,get:()=>e.WuiChipButton}),Object.defineProperty(exports,"WuiCompatibleNetwork",{enumerable:!0,get:()=>e.WuiCompatibleNetwork}),Object.defineProperty(exports,"WuiConnectButton",{enumerable:!0,get:()=>e.WuiConnectButton}),Object.defineProperty(exports,"WuiCtaButton",{enumerable:!0,get:()=>e.WuiCtaButton}),Object.defineProperty(exports,"WuiDetailsGroup",{enumerable:!0,get:()=>e.WuiDetailsGroup}),Object.defineProperty(exports,"WuiDetailsGroupItem",{enumerable:!0,get:()=>e.WuiDetailsGroupItem}),Object.defineProperty(exports,"WuiDropdownMenu",{enumerable:!0,get:()=>e.WuiDropdownMenu}),Object.defineProperty(exports,"WuiEmailInput",{enumerable:!0,get:()=>e.WuiEmailInput}),Object.defineProperty(exports,"WuiEnsInput",{enumerable:!0,get:()=>e.WuiEnsInput}),Object.defineProperty(exports,"WuiFlex",{enumerable:!0,get:()=>e.WuiFlex}),Object.defineProperty(exports,"WuiGrid",{enumerable:!0,get:()=>e.WuiGrid}),Object.defineProperty(exports,"WuiIcon",{enumerable:!0,get:()=>e.WuiIcon}),Object.defineProperty(exports,"WuiIconBox",{enumerable:!0,get:()=>e.WuiIconBox}),Object.defineProperty(exports,"WuiIconButton",{enumerable:!0,get:()=>e.WuiIconButton}),Object.defineProperty(exports,"WuiIconLink",{enumerable:!0,get:()=>e.WuiIconLink}),Object.defineProperty(exports,"WuiImage",{enumerable:!0,get:()=>e.WuiImage}),Object.defineProperty(exports,"WuiInputAmount",{enumerable:!0,get:()=>e.WuiInputAmount}),Object.defineProperty(exports,"WuiInputElement",{enumerable:!0,get:()=>e.WuiInputElement}),Object.defineProperty(exports,"WuiInputNumeric",{enumerable:!0,get:()=>e.WuiInputNumeric}),Object.defineProperty(exports,"WuiInputText",{enumerable:!0,get:()=>e.WuiInputText}),Object.defineProperty(exports,"WuiLink",{enumerable:!0,get:()=>e.WuiLink}),Object.defineProperty(exports,"WuiListAccordion",{enumerable:!0,get:()=>e.WuiListAccordion}),Object.defineProperty(exports,"WuiListAccount",{enumerable:!0,get:()=>e.WuiListAccount}),Object.defineProperty(exports,"WuiListButton",{enumerable:!0,get:()=>e.WuiListButton}),Object.defineProperty(exports,"WuiListContent",{enumerable:!0,get:()=>e.WuiListContent}),Object.defineProperty(exports,"WuiListDescription",{enumerable:!0,get:()=>e.WuiListDescription}),Object.defineProperty(exports,"WuiListItem",{enumerable:!0,get:()=>e.WuiListItem}),Object.defineProperty(exports,"WuiListNetwork",{enumerable:!0,get:()=>e.WuiListNetwork}),Object.defineProperty(exports,"WuiListSocial",{enumerable:!0,get:()=>e.WuiListSocial}),Object.defineProperty(exports,"WuiListToken",{enumerable:!0,get:()=>e.WuiListToken}),Object.defineProperty(exports,"WuiListWallet",{enumerable:!0,get:()=>e.WuiListWallet}),Object.defineProperty(exports,"WuiListWalletTransaction",{enumerable:!0,get:()=>e.WuiListWalletTransaction}),Object.defineProperty(exports,"WuiLoadingHexagon",{enumerable:!0,get:()=>e.WuiLoadingHexagon}),Object.defineProperty(exports,"WuiLoadingSpinner",{enumerable:!0,get:()=>e.WuiLoadingSpinner}),Object.defineProperty(exports,"WuiLoadingThumbnail",{enumerable:!0,get:()=>e.WuiLoadingThumbnail}),Object.defineProperty(exports,"WuiLogo",{enumerable:!0,get:()=>e.WuiLogo}),Object.defineProperty(exports,"WuiLogoSelect",{enumerable:!0,get:()=>e.WuiLogoSelect}),Object.defineProperty(exports,"WuiNetworkButton",{enumerable:!0,get:()=>e.WuiNetworkButton}),Object.defineProperty(exports,"WuiNetworkImage",{enumerable:!0,get:()=>e.WuiNetworkImage}),Object.defineProperty(exports,"WuiNoticeCard",{enumerable:!0,get:()=>e.WuiNoticeCard}),Object.defineProperty(exports,"WuiOtp",{enumerable:!0,get:()=>e.WuiOtp}),Object.defineProperty(exports,"WuiPreviewItem",{enumerable:!0,get:()=>e.WuiPreviewItem}),Object.defineProperty(exports,"WuiProfileButton",{enumerable:!0,get:()=>e.WuiProfileButton}),Object.defineProperty(exports,"WuiProfileButtonV2",{enumerable:!0,get:()=>e.WuiProfileButtonV2}),Object.defineProperty(exports,"WuiPromo",{enumerable:!0,get:()=>e.WuiPromo}),Object.defineProperty(exports,"WuiQrCode",{enumerable:!0,get:()=>e.WuiQrCode}),Object.defineProperty(exports,"WuiSearchBar",{enumerable:!0,get:()=>e.WuiSearchBar}),Object.defineProperty(exports,"WuiSelect",{enumerable:!0,get:()=>e.WuiSelect}),Object.defineProperty(exports,"WuiSeparator",{enumerable:!0,get:()=>e.WuiSeparator}),Object.defineProperty(exports,"WuiShimmer",{enumerable:!0,get:()=>e.WuiShimmer}),Object.defineProperty(exports,"WuiSnackbar",{enumerable:!0,get:()=>e.WuiSnackbar}),Object.defineProperty(exports,"WuiTabs",{enumerable:!0,get:()=>e.WuiTabs}),Object.defineProperty(exports,"WuiTag",{enumerable:!0,get:()=>e.WuiTag}),Object.defineProperty(exports,"WuiText",{enumerable:!0,get:()=>e.WuiText}),Object.defineProperty(exports,"WuiTokenButton",{enumerable:!0,get:()=>e.WuiTokenButton}),Object.defineProperty(exports,"WuiTokenListItem",{enumerable:!0,get:()=>e.WuiTokenListItem}),Object.defineProperty(exports,"WuiTooltip",{enumerable:!0,get:()=>e.WuiTooltip}),Object.defineProperty(exports,"WuiTransactionListItem",{enumerable:!0,get:()=>e.WuiTransactionListItem}),Object.defineProperty(exports,"WuiTransactionListItemLoader",{enumerable:!0,get:()=>e.WuiTransactionListItemLoader}),Object.defineProperty(exports,"WuiTransactionVisual",{enumerable:!0,get:()=>e.WuiTransactionVisual}),Object.defineProperty(exports,"WuiVisual",{enumerable:!0,get:()=>e.WuiVisual}),Object.defineProperty(exports,"WuiVisualThumbnail",{enumerable:!0,get:()=>e.WuiVisualThumbnail}),Object.defineProperty(exports,"WuiWalletImage",{enumerable:!0,get:()=>e.WuiWalletImage}),exports.customElement=e.customElement,exports.initializeTheming=e.initializeTheming,exports.setColorTheme=e.setColorTheme,exports.setThemeVariables=e.setThemeVariables,exports.swapInputMaskBottomSvg=e.swapInputMaskBottomSvg,exports.swapInputMaskTopSvg=e.swapInputMaskTopSvg;
|
|
2
|
-
//# sourceMappingURL=index-BIjreRhR.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BIjreRhR.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index-BrxwR1Ko.cjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./main-BSNnXBCm.cjs"),e=t.proxy({status:"uninitialized"}),n={state:e,subscribeKey:(n,i)=>t.subscribeKey(e,n,i),subscribe:n=>t.subscribe(e,()=>n(e)),_getClient(){if(!e._client)throw new Error("SIWEController client not set");return e._client},async getNonce(t){const e=this._getClient(),n=await e.getNonce(t);return this.setNonce(n),n},async getSession(){try{const t=this._getClient(),e=await t.getSession();return e&&(this.setSession(e),this.setStatus("success")),e||void 0}catch{return}},createMessage(t){const e=this._getClient().createMessage(t);return this.setMessage(e),e},async verifyMessage(t){const e=this._getClient();return await e.verifyMessage(t)},async signIn(){const t=this._getClient();return await t.signIn()},async signOut(){var t;const e=this._getClient();await e.signOut(),this.setStatus("ready"),this.setSession(void 0),null==(t=e.onSignOut)||t.call(e)},onSignIn(t){var e;const n=this._getClient();null==(e=n.onSignIn)||e.call(n,t)},onSignOut(){var t;const e=this._getClient();null==(t=e.onSignOut)||t.call(e)},async setSIWEClient(n){e._client=t.ref(n),e.session=await this.getSession(),e.status=e.session?"success":"ready",t.ChainController.setAccountProp("siweStatus",e.status,"eip155"),t.OptionsController.setIsSiweEnabled(n.options.enabled)},setNonce(t){e.nonce=t},setStatus(n){e.status=n,t.ChainController.setAccountProp("siweStatus",e.status,"eip155")},setMessage(t){e.message=t},setSession(n){e.session=n,e.status=n?"success":"ready",t.ChainController.setAccountProp("siweStatus",e.status,"eip155")}},i=t.i`
|
|
2
|
-
:host {
|
|
3
|
-
display: flex;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
gap: var(--wui-spacing-2xl);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
wui-visual-thumbnail:nth-child(1) {
|
|
9
|
-
z-index: 1;
|
|
10
|
-
}
|
|
11
|
-
`;exports.W3mConnectingSiwe=class extends t.i$1{constructor(){var e,n;super(...arguments),this.dappImageUrl=null==(e=t.OptionsController.state.metadata)?void 0:e.icons,this.walletImageUrl=null==(n=t.AccountController.state.connectedWalletInfo)?void 0:n.icon}firstUpdated(){var t;const e=null==(t=this.shadowRoot)?void 0:t.querySelectorAll("wui-visual-thumbnail");(null==e?void 0:e[0])&&this.createAnimation(e[0],"translate(18px)"),(null==e?void 0:e[1])&&this.createAnimation(e[1],"translate(-18px)")}render(){var e;return t.x`
|
|
12
|
-
<wui-visual-thumbnail
|
|
13
|
-
?borderRadiusFull=${!0}
|
|
14
|
-
.imageSrc=${null==(e=this.dappImageUrl)?void 0:e[0]}
|
|
15
|
-
></wui-visual-thumbnail>
|
|
16
|
-
<wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail>
|
|
17
|
-
`}createAnimation(t,e){t.animate([{transform:"translateX(0px)"},{transform:e}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}},exports.W3mConnectingSiwe.styles=i,exports.W3mConnectingSiwe=function(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}([t.customElement("w3m-connecting-siwe")],exports.W3mConnectingSiwe);var s=function(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r};exports.W3mConnectingSiweView=class extends t.i$1{constructor(){var e;super(...arguments),this.dappName=null==(e=t.OptionsController.state.metadata)?void 0:e.name,this.isSigning=!1,this.isCancelling=!1}render(){return t.x`
|
|
18
|
-
<wui-flex justifyContent="center" .padding=${["2xl","0","xxl","0"]}>
|
|
19
|
-
<w3m-connecting-siwe></w3m-connecting-siwe>
|
|
20
|
-
</wui-flex>
|
|
21
|
-
<wui-flex
|
|
22
|
-
.padding=${["0","4xl","l","4xl"]}
|
|
23
|
-
gap="s"
|
|
24
|
-
justifyContent="space-between"
|
|
25
|
-
>
|
|
26
|
-
<wui-text variant="paragraph-500" align="center" color="fg-100"
|
|
27
|
-
>${this.dappName??"Dapp"} needs to connect to your wallet</wui-text
|
|
28
|
-
>
|
|
29
|
-
</wui-flex>
|
|
30
|
-
<wui-flex
|
|
31
|
-
.padding=${["0","3xl","l","3xl"]}
|
|
32
|
-
gap="s"
|
|
33
|
-
justifyContent="space-between"
|
|
34
|
-
>
|
|
35
|
-
<wui-text variant="small-400" align="center" color="fg-200"
|
|
36
|
-
>Sign this message to prove you own this wallet and proceed. Canceling will disconnect
|
|
37
|
-
you.</wui-text
|
|
38
|
-
>
|
|
39
|
-
</wui-flex>
|
|
40
|
-
<wui-flex .padding=${["l","xl","xl","xl"]} gap="s" justifyContent="space-between">
|
|
41
|
-
<wui-button
|
|
42
|
-
size="lg"
|
|
43
|
-
borderRadius="xs"
|
|
44
|
-
fullWidth
|
|
45
|
-
variant="neutral"
|
|
46
|
-
?loading=${this.isCancelling}
|
|
47
|
-
@click=${this.onCancel.bind(this)}
|
|
48
|
-
data-testid="w3m-connecting-siwe-cancel"
|
|
49
|
-
>
|
|
50
|
-
Cancel
|
|
51
|
-
</wui-button>
|
|
52
|
-
<wui-button
|
|
53
|
-
size="lg"
|
|
54
|
-
borderRadius="xs"
|
|
55
|
-
fullWidth
|
|
56
|
-
variant="main"
|
|
57
|
-
@click=${this.onSign.bind(this)}
|
|
58
|
-
?loading=${this.isSigning}
|
|
59
|
-
data-testid="w3m-connecting-siwe-sign"
|
|
60
|
-
>
|
|
61
|
-
${this.isSigning?"Signing...":"Sign"}
|
|
62
|
-
</wui-button>
|
|
63
|
-
</wui-flex>
|
|
64
|
-
`}async onSign(){var e,i,s;this.isSigning=!0,t.EventsController.sendEvent({event:"CLICK_SIGN_SIWE_MESSAGE",type:"track",properties:{network:(null==(e=t.ChainController.state.activeCaipNetwork)?void 0:e.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}});try{n.setStatus("loading");const e=await n.signIn();return n.setStatus("success"),t.EventsController.sendEvent({event:"SIWE_AUTH_SUCCESS",type:"track",properties:{network:(null==(i=t.ChainController.state.activeCaipNetwork)?void 0:i.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}}),e}catch(o){const e=t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT;return e?t.SnackController.showError("This application might not support Smart Accounts"):t.SnackController.showError("Signature declined"),n.setStatus("error"),t.EventsController.sendEvent({event:"SIWE_AUTH_ERROR",type:"track",properties:{network:(null==(s=t.ChainController.state.activeCaipNetwork)?void 0:s.id)||"",isSmartAccount:e}})}finally{this.isSigning=!1}}async onCancel(){var e;this.isCancelling=!0;t.ChainController.state.activeCaipAddress?(await t.ConnectionController.disconnect(),t.ModalController.close()):t.RouterController.push("Connect"),this.isCancelling=!1,t.EventsController.sendEvent({event:"CLICK_CANCEL_SIWE",type:"track",properties:{network:(null==(e=t.ChainController.state.activeCaipNetwork)?void 0:e.id)||"",isSmartAccount:t.AccountController.state.preferredAccountType===t.W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT}})}},s([t.r()],exports.W3mConnectingSiweView.prototype,"isSigning",void 0),s([t.r()],exports.W3mConnectingSiweView.prototype,"isCancelling",void 0),exports.W3mConnectingSiweView=s([t.customElement("w3m-connecting-siwe-view")],exports.W3mConnectingSiweView),exports.formatMessage=t.Wf,exports.getDidAddress=t.Vi,exports.getDidChainId=t.Yi,exports.SIWEController=n;
|
|
65
|
-
//# sourceMappingURL=index-BrxwR1Ko.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BrxwR1Ko.cjs","sources":["../node_modules/@reown/appkit-siwe/dist/esm/core/controller/SIWEController.js","../node_modules/@reown/appkit-siwe/dist/esm/scaffold/partials/w3m-connecting-siwe/styles.js","../node_modules/@reown/appkit-siwe/dist/esm/scaffold/partials/w3m-connecting-siwe/index.js","../node_modules/@reown/appkit-siwe/dist/esm/scaffold/views/w3m-connecting-siwe-view/index.js"],"sourcesContent":["import { subscribeKey as subKey } from 'valtio/vanilla/utils';\nimport { proxy, ref, subscribe as sub } from 'valtio/vanilla';\nimport { ChainController, OptionsController } from '@reown/appkit-core';\nconst state = proxy({\n status: 'uninitialized'\n});\nexport const SIWEController = {\n state,\n subscribeKey(key, callback) {\n return subKey(state, key, callback);\n },\n subscribe(callback) {\n return sub(state, () => callback(state));\n },\n _getClient() {\n if (!state._client) {\n throw new Error('SIWEController client not set');\n }\n return state._client;\n },\n async getNonce(address) {\n const client = this._getClient();\n const nonce = await client.getNonce(address);\n this.setNonce(nonce);\n return nonce;\n },\n async getSession() {\n try {\n const client = this._getClient();\n const session = await client.getSession();\n if (session) {\n this.setSession(session);\n this.setStatus('success');\n }\n return session || undefined;\n }\n catch {\n return undefined;\n }\n },\n createMessage(args) {\n const client = this._getClient();\n const message = client.createMessage(args);\n this.setMessage(message);\n return message;\n },\n async verifyMessage(args) {\n const client = this._getClient();\n const isValid = await client.verifyMessage(args);\n return isValid;\n },\n async signIn() {\n const client = this._getClient();\n const session = await client.signIn();\n return session;\n },\n async signOut() {\n const client = this._getClient();\n await client.signOut();\n this.setStatus('ready');\n this.setSession(undefined);\n client.onSignOut?.();\n },\n onSignIn(args) {\n const client = this._getClient();\n client.onSignIn?.(args);\n },\n onSignOut() {\n const client = this._getClient();\n client.onSignOut?.();\n },\n async setSIWEClient(client) {\n state._client = ref(client);\n state.session = await this.getSession();\n state.status = state.session ? 'success' : 'ready';\n ChainController.setAccountProp('siweStatus', state.status, 'eip155');\n OptionsController.setIsSiweEnabled(client.options.enabled);\n },\n setNonce(nonce) {\n state.nonce = nonce;\n },\n setStatus(status) {\n state.status = status;\n ChainController.setAccountProp('siweStatus', state.status, 'eip155');\n },\n setMessage(message) {\n state.message = message;\n },\n setSession(session) {\n state.session = session;\n state.status = session ? 'success' : 'ready';\n ChainController.setAccountProp('siweStatus', state.status, 'eip155');\n }\n};\n//# sourceMappingURL=SIWEController.js.map","import { css } from 'lit';\nexport default css `\n :host {\n display: flex;\n justify-content: center;\n gap: var(--wui-spacing-2xl);\n }\n\n wui-visual-thumbnail:nth-child(1) {\n z-index: 1;\n }\n`;\n//# sourceMappingURL=styles.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement } from '@reown/appkit-ui';\nimport { LitElement, html } from 'lit';\nimport styles from './styles.js';\nimport { AccountController, OptionsController } from '@reown/appkit-core';\nlet W3mConnectingSiwe = class W3mConnectingSiwe extends LitElement {\n constructor() {\n super(...arguments);\n this.dappImageUrl = OptionsController.state.metadata?.icons;\n this.walletImageUrl = AccountController.state.connectedWalletInfo?.icon;\n }\n firstUpdated() {\n const visuals = this.shadowRoot?.querySelectorAll('wui-visual-thumbnail');\n if (visuals?.[0]) {\n this.createAnimation(visuals[0], 'translate(18px)');\n }\n if (visuals?.[1]) {\n this.createAnimation(visuals[1], 'translate(-18px)');\n }\n }\n render() {\n return html `\n <wui-visual-thumbnail\n ?borderRadiusFull=${true}\n .imageSrc=${this.dappImageUrl?.[0]}\n ></wui-visual-thumbnail>\n <wui-visual-thumbnail .imageSrc=${this.walletImageUrl}></wui-visual-thumbnail>\n `;\n }\n createAnimation(element, translation) {\n element.animate([{ transform: 'translateX(0px)' }, { transform: translation }], {\n duration: 1600,\n easing: 'cubic-bezier(0.56, 0, 0.48, 1)',\n direction: 'alternate',\n iterations: Infinity\n });\n }\n};\nW3mConnectingSiwe.styles = styles;\nW3mConnectingSiwe = __decorate([\n customElement('w3m-connecting-siwe')\n], W3mConnectingSiwe);\nexport { W3mConnectingSiwe };\n//# sourceMappingURL=index.js.map","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { AccountController, ChainController, ConnectionController, EventsController, ModalController, OptionsController, RouterController, SnackController } from '@reown/appkit-core';\nimport { customElement } from '@reown/appkit-ui';\nimport { LitElement, html } from 'lit';\nimport { state } from 'lit/decorators.js';\nimport { SIWEController } from '../../../core/controller/SIWEController.js';\nimport { W3mFrameRpcConstants } from '@reown/appkit-wallet';\nlet W3mConnectingSiweView = class W3mConnectingSiweView extends LitElement {\n constructor() {\n super(...arguments);\n this.dappName = OptionsController.state.metadata?.name;\n this.isSigning = false;\n this.isCancelling = false;\n }\n render() {\n return html `\n <wui-flex justifyContent=\"center\" .padding=${['2xl', '0', 'xxl', '0']}>\n <w3m-connecting-siwe></w3m-connecting-siwe>\n </wui-flex>\n <wui-flex\n .padding=${['0', '4xl', 'l', '4xl']}\n gap=\"s\"\n justifyContent=\"space-between\"\n >\n <wui-text variant=\"paragraph-500\" align=\"center\" color=\"fg-100\"\n >${this.dappName ?? 'Dapp'} needs to connect to your wallet</wui-text\n >\n </wui-flex>\n <wui-flex\n .padding=${['0', '3xl', 'l', '3xl']}\n gap=\"s\"\n justifyContent=\"space-between\"\n >\n <wui-text variant=\"small-400\" align=\"center\" color=\"fg-200\"\n >Sign this message to prove you own this wallet and proceed. Canceling will disconnect\n you.</wui-text\n >\n </wui-flex>\n <wui-flex .padding=${['l', 'xl', 'xl', 'xl']} gap=\"s\" justifyContent=\"space-between\">\n <wui-button\n size=\"lg\"\n borderRadius=\"xs\"\n fullWidth\n variant=\"neutral\"\n ?loading=${this.isCancelling}\n @click=${this.onCancel.bind(this)}\n data-testid=\"w3m-connecting-siwe-cancel\"\n >\n Cancel\n </wui-button>\n <wui-button\n size=\"lg\"\n borderRadius=\"xs\"\n fullWidth\n variant=\"main\"\n @click=${this.onSign.bind(this)}\n ?loading=${this.isSigning}\n data-testid=\"w3m-connecting-siwe-sign\"\n >\n ${this.isSigning ? 'Signing...' : 'Sign'}\n </wui-button>\n </wui-flex>\n `;\n }\n async onSign() {\n this.isSigning = true;\n EventsController.sendEvent({\n event: 'CLICK_SIGN_SIWE_MESSAGE',\n type: 'track',\n properties: {\n network: ChainController.state.activeCaipNetwork?.id || '',\n isSmartAccount: AccountController.state.preferredAccountType ===\n W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT\n }\n });\n try {\n SIWEController.setStatus('loading');\n const session = await SIWEController.signIn();\n SIWEController.setStatus('success');\n EventsController.sendEvent({\n event: 'SIWE_AUTH_SUCCESS',\n type: 'track',\n properties: {\n network: ChainController.state.activeCaipNetwork?.id || '',\n isSmartAccount: AccountController.state.preferredAccountType ===\n W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT\n }\n });\n return session;\n }\n catch (error) {\n const preferredAccountType = AccountController.state.preferredAccountType;\n const isSmartAccount = preferredAccountType === W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT;\n if (isSmartAccount) {\n SnackController.showError('This application might not support Smart Accounts');\n }\n else {\n SnackController.showError('Signature declined');\n }\n SIWEController.setStatus('error');\n return EventsController.sendEvent({\n event: 'SIWE_AUTH_ERROR',\n type: 'track',\n properties: {\n network: ChainController.state.activeCaipNetwork?.id || '',\n isSmartAccount\n }\n });\n }\n finally {\n this.isSigning = false;\n }\n }\n async onCancel() {\n this.isCancelling = true;\n const caipAddress = ChainController.state.activeCaipAddress;\n if (caipAddress) {\n await ConnectionController.disconnect();\n ModalController.close();\n }\n else {\n RouterController.push('Connect');\n }\n this.isCancelling = false;\n EventsController.sendEvent({\n event: 'CLICK_CANCEL_SIWE',\n type: 'track',\n properties: {\n network: ChainController.state.activeCaipNetwork?.id || '',\n isSmartAccount: AccountController.state.preferredAccountType ===\n W3mFrameRpcConstants.ACCOUNT_TYPES.SMART_ACCOUNT\n }\n });\n }\n};\n__decorate([\n state()\n], W3mConnectingSiweView.prototype, \"isSigning\", void 0);\n__decorate([\n state()\n], W3mConnectingSiweView.prototype, \"isCancelling\", void 0);\nW3mConnectingSiweView = __decorate([\n customElement('w3m-connecting-siwe-view')\n], W3mConnectingSiweView);\nexport { W3mConnectingSiweView };\n//# sourceMappingURL=index.js.map"],"names":["state","proxy","status","SIWEController","subscribeKey","key","callback","subKey","subscribe","sub","_getClient","_client","Error","getNonce","address","client","this","nonce","setNonce","getSession","session","setSession","setStatus","createMessage","args","message","setMessage","verifyMessage","signIn","signOut","_a","onSignOut","call","onSignIn","setSIWEClient","ref","ChainController","setAccountProp","OptionsController","setIsSiweEnabled","options","enabled","styles","css","W3mConnectingSiwe","LitElement","constructor","super","arguments","dappImageUrl","metadata","icons","walletImageUrl","AccountController","connectedWalletInfo","icon","firstUpdated","visuals","shadowRoot","querySelectorAll","createAnimation","render","html","element","translation","animate","transform","duration","easing","direction","iterations","Infinity","decorators","target","desc","d","c","length","r","Object","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__decorate","customElement","W3mConnectingSiweView","dappName","name","isSigning","isCancelling","onCancel","bind","onSign","EventsController","sendEvent","event","type","properties","network","activeCaipNetwork","id","isSmartAccount","preferredAccountType","W3mFrameRpcConstants","ACCOUNT_TYPES","SMART_ACCOUNT","error","SnackController","showError","activeCaipAddress","ConnectionController","disconnect","ModalController","close","RouterController","push","prototype"],"mappings":"uHAGMA,EAAQC,EAAAA,MAAM,CAChBC,OAAQ,kBAECC,EAAiB,CAC1BH,QACAI,aAAA,CAAaC,EAAKC,IACPC,eAAOP,EAAOK,EAAKC,GAE9BE,UAAUF,GACCG,EAAAA,UAAIT,EAAO,IAAMM,EAASN,IAErC,UAAAU,GACI,IAAKV,EAAMW,QACP,MAAM,IAAIC,MAAM,iCAEp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e,EACAvD,kBAAgBpC,MAAM+G,yBAEhCC,EAAAA,qBAAqBC,aAC3BC,EAAAA,gBAAgBC,SAGhBC,EAAAA,iBAAiBC,KAAK,WAE1BrG,KAAK2E,cAAe,EACpBI,EAAAA,iBAAiBC,UAAU,CACvBC,MAAO,oBACPC,KAAM,QACNC,WAAY,CACRC,SAAShE,OAAAA,EAAAA,EAAAA,gBAAgBpC,MAAMqG,4BAAmBC,KAAM,GACxDC,eAAgBlD,EAAAA,kBAAkBrD,MAAMwG,uBACpCC,EAAAA,qBAAqBC,cAAcC,gBAGnD,GAEJtB,EAAW,CACPrF,EAAAA,KACDuF,8BAAsB+B,UAAW,iBAAa,GACjDjC,EAAW,CACPrF,EAAAA,KACDuF,8BAAsB+B,UAAW,oBAAgB,GACpD/B,QAAAA,sBAAwBF,EAAW,CAC/BC,EAAAA,cAAc,6BACfC","x_google_ignoreList":[0,1,2,3]}
|
package/dist/index-CZ74NMDc.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { M, T, U, n, Y, o, p, ab, ag, ah, q, W, t, r, u, ae, af, v, w, x, y, z, A, B, ar, as, e, C, an, D, f, ak, E, F, G, H, a6, am, ao, a7, aj, I, a8, ap, ai, L, a9, g, h, j, O, N, P, Q, a5, R, al, ac, ad, aa, S, V, aq, at, k, X, Z, $, l, _, a1, a0, J, K, a2, m, a3, a4, c, i, s, a, b, d } from "./main-fe5ztrjo.js";
|
|
2
|
-
export {
|
|
3
|
-
M as MathUtil,
|
|
4
|
-
T as TransactionUtil,
|
|
5
|
-
U as UiHelperUtil,
|
|
6
|
-
n as WuiAccountButton,
|
|
7
|
-
Y as WuiAlertBar,
|
|
8
|
-
o as WuiAllWalletsImage,
|
|
9
|
-
p as WuiAvatar,
|
|
10
|
-
ab as WuiBalance,
|
|
11
|
-
ag as WuiBanner,
|
|
12
|
-
ah as WuiBannerImg,
|
|
13
|
-
q as WuiButton,
|
|
14
|
-
W as WuiCard,
|
|
15
|
-
t as WuiCardSelect,
|
|
16
|
-
r as WuiCardSelectLoader,
|
|
17
|
-
u as WuiChip,
|
|
18
|
-
ae as WuiChipButton,
|
|
19
|
-
af as WuiCompatibleNetwork,
|
|
20
|
-
v as WuiConnectButton,
|
|
21
|
-
w as WuiCtaButton,
|
|
22
|
-
x as WuiDetailsGroup,
|
|
23
|
-
y as WuiDetailsGroupItem,
|
|
24
|
-
z as WuiDropdownMenu,
|
|
25
|
-
A as WuiEmailInput,
|
|
26
|
-
B as WuiEnsInput,
|
|
27
|
-
ar as WuiFlex,
|
|
28
|
-
as as WuiGrid,
|
|
29
|
-
e as WuiIcon,
|
|
30
|
-
C as WuiIconBox,
|
|
31
|
-
an as WuiIconButton,
|
|
32
|
-
D as WuiIconLink,
|
|
33
|
-
f as WuiImage,
|
|
34
|
-
ak as WuiInputAmount,
|
|
35
|
-
E as WuiInputElement,
|
|
36
|
-
F as WuiInputNumeric,
|
|
37
|
-
G as WuiInputText,
|
|
38
|
-
H as WuiLink,
|
|
39
|
-
a6 as WuiListAccordion,
|
|
40
|
-
am as WuiListAccount,
|
|
41
|
-
ao as WuiListButton,
|
|
42
|
-
a7 as WuiListContent,
|
|
43
|
-
aj as WuiListDescription,
|
|
44
|
-
I as WuiListItem,
|
|
45
|
-
a8 as WuiListNetwork,
|
|
46
|
-
ap as WuiListSocial,
|
|
47
|
-
ai as WuiListToken,
|
|
48
|
-
L as WuiListWallet,
|
|
49
|
-
a9 as WuiListWalletTransaction,
|
|
50
|
-
g as WuiLoadingHexagon,
|
|
51
|
-
h as WuiLoadingSpinner,
|
|
52
|
-
j as WuiLoadingThumbnail,
|
|
53
|
-
O as WuiLogo,
|
|
54
|
-
N as WuiLogoSelect,
|
|
55
|
-
P as WuiNetworkButton,
|
|
56
|
-
Q as WuiNetworkImage,
|
|
57
|
-
a5 as WuiNoticeCard,
|
|
58
|
-
R as WuiOtp,
|
|
59
|
-
al as WuiPreviewItem,
|
|
60
|
-
ac as WuiProfileButton,
|
|
61
|
-
ad as WuiProfileButtonV2,
|
|
62
|
-
aa as WuiPromo,
|
|
63
|
-
S as WuiQrCode,
|
|
64
|
-
V as WuiSearchBar,
|
|
65
|
-
aq as WuiSelect,
|
|
66
|
-
at as WuiSeparator,
|
|
67
|
-
k as WuiShimmer,
|
|
68
|
-
X as WuiSnackbar,
|
|
69
|
-
Z as WuiTabs,
|
|
70
|
-
$ as WuiTag,
|
|
71
|
-
l as WuiText,
|
|
72
|
-
_ as WuiTokenButton,
|
|
73
|
-
a1 as WuiTokenListItem,
|
|
74
|
-
a0 as WuiTooltip,
|
|
75
|
-
J as WuiTransactionListItem,
|
|
76
|
-
K as WuiTransactionListItemLoader,
|
|
77
|
-
a2 as WuiTransactionVisual,
|
|
78
|
-
m as WuiVisual,
|
|
79
|
-
a3 as WuiVisualThumbnail,
|
|
80
|
-
a4 as WuiWalletImage,
|
|
81
|
-
c as customElement,
|
|
82
|
-
i as initializeTheming,
|
|
83
|
-
s as setColorTheme,
|
|
84
|
-
a as setThemeVariables,
|
|
85
|
-
b as swapInputMaskBottomSvg,
|
|
86
|
-
d as swapInputMaskTopSvg
|
|
87
|
-
};
|
|
88
|
-
//# sourceMappingURL=index-CZ74NMDc.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CZ74NMDc.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|