@prohetamine/redstone 0.0.1
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/PhArrowCircleDown-BR-zH4LC.js +14 -0
- package/dist/PhArrowCircleDown-Sb38khBy.mjs +73 -0
- package/dist/PhArrowClockwise-BE5j9P0Z.mjs +73 -0
- package/dist/PhArrowClockwise-BRaehQGe.js +14 -0
- package/dist/PhArrowDown-B_WmmmY9.js +14 -0
- package/dist/PhArrowDown-CFEyR2dR.mjs +73 -0
- package/dist/PhArrowLeft-CYfU7NZj.mjs +73 -0
- package/dist/PhArrowLeft-CkEd70hm.js +14 -0
- package/dist/PhArrowRight-C07Qkx86.js +14 -0
- package/dist/PhArrowRight-EermNu0V.mjs +73 -0
- package/dist/PhArrowSquareOut-BjTBfzOP.js +14 -0
- package/dist/PhArrowSquareOut-DZwTtw54.mjs +73 -0
- package/dist/PhArrowUp-DB4CCSss.js +14 -0
- package/dist/PhArrowUp-xTpLFQkg.mjs +73 -0
- package/dist/PhArrowUpRight-CQbvn6NO.mjs +73 -0
- package/dist/PhArrowUpRight-GpCIMsAh.js +14 -0
- package/dist/PhArrowsClockwise-BgcIUg-Z.js +14 -0
- package/dist/PhArrowsClockwise-DnUYZTVx.mjs +73 -0
- package/dist/PhArrowsDownUp-C8KXUqtu.js +14 -0
- package/dist/PhArrowsDownUp-DgoprEe2.mjs +73 -0
- package/dist/PhArrowsLeftRight-CahChzCj.js +14 -0
- package/dist/PhArrowsLeftRight-FD4AZiLh.mjs +73 -0
- package/dist/PhBank-DIqIL4x_.js +14 -0
- package/dist/PhBank-DbQOQ9zJ.mjs +73 -0
- package/dist/PhBrowser-BCBXK2IM.mjs +73 -0
- package/dist/PhBrowser-laCKtn7T.js +14 -0
- package/dist/PhCaretDown-CnjP-QjZ.mjs +73 -0
- package/dist/PhCaretDown-DDe42xDU.js +14 -0
- package/dist/PhCaretLeft-Cskc5OY9.js +14 -0
- package/dist/PhCaretLeft-DkuXxjf_.mjs +73 -0
- package/dist/PhCaretRight-CBWpghxt.mjs +73 -0
- package/dist/PhCaretRight-DNgI5w_B.js +14 -0
- package/dist/PhCaretUp-CQ-OztBV.mjs +73 -0
- package/dist/PhCaretUp-CUZ4g_Me.js +14 -0
- package/dist/PhCheck-BVV_Dwfo.js +14 -0
- package/dist/PhCheck-t515emYS.mjs +73 -0
- package/dist/PhCircleHalf-BuQTmrKW.mjs +73 -0
- package/dist/PhCircleHalf-DDC7rige.js +14 -0
- package/dist/PhClock-BqynEKWl.js +14 -0
- package/dist/PhClock-D6XkTmM_.mjs +73 -0
- package/dist/PhCompass-2QeeX5Ad.mjs +73 -0
- package/dist/PhCompass-BsuJwXAE.js +14 -0
- package/dist/PhCopy-CO34-_xD.mjs +73 -0
- package/dist/PhCopy-MVqtRS6X.js +14 -0
- package/dist/PhCreditCard-Dq4kdjCw.js +14 -0
- package/dist/PhCreditCard-bfnqYflD.mjs +73 -0
- package/dist/PhCurrencyDollar-6k8UWxal.js +14 -0
- package/dist/PhCurrencyDollar-BekVYPtC.mjs +73 -0
- package/dist/PhDesktop-BkNzf3rT.mjs +73 -0
- package/dist/PhDesktop-CfsXQ0vC.js +14 -0
- package/dist/PhDeviceMobile-BT3Mg_b0.mjs +73 -0
- package/dist/PhDeviceMobile-BnrrDrwf.js +14 -0
- package/dist/PhDotsThree-6LRvhAcL.js +14 -0
- package/dist/PhDotsThree-kpf2OKxJ.mjs +73 -0
- package/dist/PhEnvelope-CHsfC2e0.js +14 -0
- package/dist/PhEnvelope-UFKpKtwf.mjs +73 -0
- package/dist/PhFunnelSimple-CdAqSIhK.mjs +73 -0
- package/dist/PhFunnelSimple-JAk7X9Wo.js +14 -0
- package/dist/PhGlobe-B3RYXl8h.mjs +73 -0
- package/dist/PhGlobe-Tfs4MfpG.js +14 -0
- package/dist/PhIdentificationCard-Dqmd6eY1.js +14 -0
- package/dist/PhIdentificationCard-rSq59Czm.mjs +73 -0
- package/dist/PhImage-aEryzfCi.js +14 -0
- package/dist/PhImage-ynsEnFd_.mjs +73 -0
- package/dist/PhInfo-B7lsWl6m.mjs +73 -0
- package/dist/PhInfo-D6oUrWpA.js +14 -0
- package/dist/PhLightbulb-FQDaMMqu.mjs +73 -0
- package/dist/PhLightbulb-qbEduhPa.js +14 -0
- package/dist/PhMagnifyingGlass-COdRH2k5.js +14 -0
- package/dist/PhMagnifyingGlass-_NXk13-0.mjs +73 -0
- package/dist/PhPaperPlaneRight-BYi7SorW.mjs +73 -0
- package/dist/PhPaperPlaneRight-DrpVAQOZ.js +14 -0
- package/dist/PhPlus-25KQTPHG.mjs +73 -0
- package/dist/PhPlus-BhUXef08.js +14 -0
- package/dist/PhPower-BKl7gzsB.mjs +73 -0
- package/dist/PhPower-BNJf1AGQ.js +14 -0
- package/dist/PhPuzzlePiece-BkZeF8CX.js +14 -0
- package/dist/PhPuzzlePiece-BqUI4GRs.mjs +73 -0
- package/dist/PhQrCode-C-tqZKPP.mjs +73 -0
- package/dist/PhQrCode-C0v0iXQN.js +14 -0
- package/dist/PhQuestion-BBAiRWgt.js +14 -0
- package/dist/PhQuestion-CtYvffyD.mjs +73 -0
- package/dist/PhQuestionMark-BNbtL2yx.mjs +73 -0
- package/dist/PhQuestionMark-BvGUBZ1h.js +14 -0
- package/dist/PhSealCheck-B0TEqWpq.mjs +73 -0
- package/dist/PhSealCheck-BwNkuF7G.js +14 -0
- package/dist/PhSignOut-C1rMSNaS.js +14 -0
- package/dist/PhSignOut-HX2_BVsD.mjs +73 -0
- package/dist/PhSpinner-CoDYLYOX.mjs +73 -0
- package/dist/PhSpinner-nmsGWDQl.js +14 -0
- package/dist/PhTrash-CALlKx3e.js +14 -0
- package/dist/PhTrash-DeQHS8ZP.mjs +73 -0
- package/dist/PhUser-CA0e5OPI.js +14 -0
- package/dist/PhUser-Cy5EY3vX.mjs +73 -0
- package/dist/PhVault-DdXjVOO9.mjs +73 -0
- package/dist/PhVault-DqxV75cz.js +14 -0
- package/dist/PhWallet-CeQrfGYc.mjs +73 -0
- package/dist/PhWallet-CyCuEs2U.js +14 -0
- package/dist/PhWarning-BKaHv_wT.mjs +73 -0
- package/dist/PhWarning-C7oj86bY.js +14 -0
- package/dist/PhWarningCircle-8MWw-QgE.mjs +73 -0
- package/dist/PhWarningCircle-CrNPXGj4.js +14 -0
- package/dist/PhX-9lsrXjyl.js +14 -0
- package/dist/PhX-DgXr_Fb0.mjs +73 -0
- package/dist/ReownAuthentication-Bfv31LzI.mjs +274 -0
- package/dist/ReownAuthentication-d8aYgGOq.js +5 -0
- package/dist/SwapController-4lzoYsYr.js +1 -0
- package/dist/SwapController-DjzUWRyQ.mjs +462 -0
- package/dist/ccip-CvwbEhki.js +1 -0
- package/dist/ccip-TuO68NeE.mjs +150 -0
- package/dist/data-capture-BwdjH2vc.mjs +489 -0
- package/dist/data-capture-xVUNZJ2T.js +242 -0
- package/dist/email-BCZObJCY.js +90 -0
- package/dist/email-m-wo60fN.mjs +338 -0
- package/dist/embedded-wallet-CGSri-4g.js +410 -0
- package/dist/embedded-wallet-DdZmv5qP.mjs +808 -0
- package/dist/features-BJ8kNaE8.js +1 -0
- package/dist/features-CJ34oImB.mjs +6 -0
- package/dist/index-4lfXeo30.js +132 -0
- package/dist/index-B6Mg114Z.mjs +69182 -0
- package/dist/index-BX7gAgT3.mjs +35 -0
- package/dist/index-BYQqNbCe.js +1 -0
- package/dist/index-BmdHwtJo.js +1 -0
- package/dist/index-BvUx3ULC.js +78 -0
- package/dist/index-CD-QGO70.mjs +196 -0
- package/dist/index-CJtXfdoM.mjs +29621 -0
- package/dist/index-CMzdgE-y.mjs +215 -0
- package/dist/index-CjZQCcwG.js +7203 -0
- package/dist/index-D7VuOaCI.js +19 -0
- package/dist/index-DV7SQwgn.mjs +2688 -0
- package/dist/index-DVf4BnNh.mjs +352 -0
- package/dist/index-DhN9vL4k.js +138 -0
- package/dist/index-DvllakY0.mjs +274 -0
- package/dist/index-Ho06VKh2.mjs +151 -0
- package/dist/index-a8mS2Eh1.js +1062 -0
- package/dist/index-aamBi9Tu.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +14 -0
- package/dist/onramp-DLlhSPQg.js +422 -0
- package/dist/onramp-k-EAEepC.mjs +842 -0
- package/dist/parseSignature-D1tZHglo.js +16 -0
- package/dist/parseSignature-DM0lwcDr.mjs +8883 -0
- package/dist/pay-with-exchange---G2M1Ag.js +280 -0
- package/dist/pay-with-exchange-CFIcUXUe.mjs +512 -0
- package/dist/property-Bd8U3_QP.mjs +618 -0
- package/dist/property-DissjCbZ.js +27 -0
- package/dist/receive-B9LCljO6.mjs +228 -0
- package/dist/receive-E8H6GDOX.js +131 -0
- package/dist/send-B-AooLph.js +554 -0
- package/dist/send-DZd_xhsd.mjs +1155 -0
- package/dist/socials-ChWFLEFe.mjs +611 -0
- package/dist/socials-YSUYSh8o.js +250 -0
- package/dist/swaps-DpR9W9Ld.js +1050 -0
- package/dist/swaps-Du7-Ui_V.mjs +1752 -0
- package/dist/transactions-DhsK5-QJ.mjs +35 -0
- package/dist/transactions-VPsz2OLe.js +16 -0
- package/dist/w3m-modal-DhomfjKU.js +891 -0
- package/dist/w3m-modal-KuYD-zqQ.mjs +1759 -0
- package/package.json +51 -0
- package/readme.md +1 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CjZQCcwG.js"),d=require("./index-4lfXeo30.js"),u=require("./ReownAuthentication-d8aYgGOq.js"),g=e.i$1`
|
|
2
|
+
.email-sufixes {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: row;
|
|
5
|
+
gap: var(--wui-spacing-3xs);
|
|
6
|
+
overflow-x: auto;
|
|
7
|
+
max-width: 100%;
|
|
8
|
+
margin-top: var(--wui-spacing-s);
|
|
9
|
+
margin-bottom: calc(-1 * var(--wui-spacing-m));
|
|
10
|
+
padding-bottom: var(--wui-spacing-m);
|
|
11
|
+
margin-left: calc(-1 * var(--wui-spacing-m));
|
|
12
|
+
margin-right: calc(-1 * var(--wui-spacing-m));
|
|
13
|
+
padding-left: var(--wui-spacing-m);
|
|
14
|
+
padding-right: var(--wui-spacing-m);
|
|
15
|
+
|
|
16
|
+
&::-webkit-scrollbar {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`;var m=function(s,t,i,n){var r=arguments.length,a=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,t,i,n);else for(var l=s.length-1;l>=0;l--)(o=s[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};const f=["@gmail.com","@outlook.com","@yahoo.com","@hotmail.com","@aol.com","@icloud.com","@zoho.com"];exports.W3mEmailSuffixesWidget=class extends e.i{constructor(){super(...arguments),this.email=""}render(){const t=f.filter(this.filter.bind(this)).map(this.item.bind(this));return t.length===0?null:e.b`<div class="email-sufixes">${t}</div>`}filter(t){if(!this.email)return!1;const i=this.email.split("@");if(i.length<2)return!0;const n=i.pop();return t.includes(n)&&t!==`@${n}`}item(t){const i=()=>{const n=this.email.split("@");n.length>1&&n.pop();const r=n[0]+t;this.dispatchEvent(new CustomEvent("change",{detail:r,bubbles:!0,composed:!0}))};return e.b`<wui-button variant="neutral" size="sm" @click=${i}
|
|
21
|
+
>${t}</wui-button
|
|
22
|
+
>`}};exports.W3mEmailSuffixesWidget.styles=[g];m([e.n()],exports.W3mEmailSuffixesWidget.prototype,"email",void 0);exports.W3mEmailSuffixesWidget=m([e.customElement("w3m-email-suffixes-widget")],exports.W3mEmailSuffixesWidget);const w=e.i$1`
|
|
23
|
+
.recent-emails {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
padding: var(--wui-spacing-s) 0;
|
|
27
|
+
border-top: 1px solid var(--wui-color-gray-glass-005);
|
|
28
|
+
border-bottom: 1px solid var(--wui-color-gray-glass-005);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.recent-emails-heading {
|
|
32
|
+
margin-bottom: var(--wui-spacing-s);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.recent-emails-list-item {
|
|
36
|
+
--wui-color-gray-glass-002: transparent;
|
|
37
|
+
}
|
|
38
|
+
`;var p=function(s,t,i,n){var r=arguments.length,a=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,t,i,n);else for(var l=s.length-1;l>=0;l--)(o=s[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};exports.W3mRecentEmailsWidget=class extends e.i{constructor(){super(...arguments),this.emails=[]}render(){return this.emails.length===0?null:e.b`<div class="recent-emails">
|
|
39
|
+
<wui-text variant="micro-600" color="fg-200" class="recent-emails-heading"
|
|
40
|
+
>Recently used emails</wui-text
|
|
41
|
+
>
|
|
42
|
+
${this.emails.map(this.item.bind(this))}
|
|
43
|
+
</div>`}item(t){const i=()=>{this.dispatchEvent(new CustomEvent("select",{detail:t,bubbles:!0,composed:!0}))};return e.b`<wui-list-item
|
|
44
|
+
@click=${i}
|
|
45
|
+
?chevron=${!0}
|
|
46
|
+
icon="mail"
|
|
47
|
+
iconVariant="overlay"
|
|
48
|
+
class="recent-emails-list-item"
|
|
49
|
+
>
|
|
50
|
+
<wui-text variant="paragraph-500" color="fg-100">${t}</wui-text>
|
|
51
|
+
</wui-list-item>`}};exports.W3mRecentEmailsWidget.styles=[w];p([e.n()],exports.W3mRecentEmailsWidget.prototype,"emails",void 0);exports.W3mRecentEmailsWidget=p([e.customElement("w3m-recent-emails-widget")],exports.W3mRecentEmailsWidget);var h=function(s,t,i,n){var r=arguments.length,a=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,t,i,n);else for(var l=s.length-1;l>=0;l--)(o=s[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};exports.W3mDataCaptureOtpConfirmView=class extends d.W3mEmailOtpWidget{constructor(){super(...arguments),this.siwx=e.OptionsController.state.siwx,this.onOtpSubmit=async t=>{await this.siwx.confirmEmailOtp({code:t}),e.RouterController.replace("SIWXSignMessage")},this.onOtpResend=async t=>{const i=e.ChainController.getAccountData();if(!(i!=null&&i.caipAddress))throw new Error("No account data found");await this.siwx.requestEmailOtp({email:t,account:i.caipAddress})}}connectedCallback(){(!this.siwx||!(this.siwx instanceof u.ReownAuthentication))&&e.SnackController.showError("ReownAuthentication is not initialized."),super.connectedCallback()}shouldSubmitOnOtpChange(){return this.otp.length===d.W3mEmailOtpWidget.OTP_LENGTH}};h([e.r()],exports.W3mDataCaptureOtpConfirmView.prototype,"siwx",void 0);exports.W3mDataCaptureOtpConfirmView=h([e.customElement("w3m-data-capture-otp-confirm-view")],exports.W3mDataCaptureOtpConfirmView);const x=e.i$1`
|
|
52
|
+
.hero {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
gap: var(--wui-spacing-3xs);
|
|
58
|
+
|
|
59
|
+
transition-property: margin, height;
|
|
60
|
+
transition-duration: var(--wui-duration-md);
|
|
61
|
+
transition-timing-function: var(--wui-ease-out-power-1);
|
|
62
|
+
margin-top: -100px;
|
|
63
|
+
|
|
64
|
+
&[data-state='loading'] {
|
|
65
|
+
margin-top: 0px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
position: relative;
|
|
69
|
+
&:after {
|
|
70
|
+
content: '';
|
|
71
|
+
position: absolute;
|
|
72
|
+
bottom: 0;
|
|
73
|
+
height: 252px;
|
|
74
|
+
width: 360px;
|
|
75
|
+
background: radial-gradient(
|
|
76
|
+
96.11% 53.95% at 50% 51.28%,
|
|
77
|
+
transparent 0%,
|
|
78
|
+
color-mix(in srgb, var(--wui-color-bg-100) 5%, transparent) 49%,
|
|
79
|
+
color-mix(in srgb, var(--wui-color-bg-100) 65%, transparent) 99.43%
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.hero-main-icon {
|
|
85
|
+
width: 176px;
|
|
86
|
+
transition-property: background-color;
|
|
87
|
+
transition-duration: var(--wui-duration-lg);
|
|
88
|
+
transition-timing-function: var(--wui-ease-out-power-1);
|
|
89
|
+
|
|
90
|
+
&[data-state='loading'] {
|
|
91
|
+
width: 56px;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.hero-row {
|
|
96
|
+
display: flex;
|
|
97
|
+
flex-direction: row;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
gap: var(--wui-spacing-3xs);
|
|
101
|
+
flex-wrap: nowrap;
|
|
102
|
+
min-width: fit-content;
|
|
103
|
+
|
|
104
|
+
&:nth-child(1) {
|
|
105
|
+
transform: translateX(-30px);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:nth-child(2) {
|
|
109
|
+
transform: translateX(30px);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:nth-child(4) {
|
|
113
|
+
transform: translateX(40px);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
transition-property: height;
|
|
117
|
+
transition-duration: var(--wui-duration-md);
|
|
118
|
+
transition-timing-function: var(--wui-ease-out-power-1);
|
|
119
|
+
height: 68px;
|
|
120
|
+
|
|
121
|
+
&[data-state='loading'] {
|
|
122
|
+
height: 0px;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.hero-row-icon {
|
|
127
|
+
opacity: 0.1;
|
|
128
|
+
transition-property: opacity;
|
|
129
|
+
transition-duration: var(--wui-duration-md);
|
|
130
|
+
transition-timing-function: var(--wui-ease-out-power-1);
|
|
131
|
+
|
|
132
|
+
&[data-state='loading'] {
|
|
133
|
+
opacity: 0;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
`;var c=function(s,t,i,n){var r=arguments.length,a=r<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,i):n,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(s,t,i,n);else for(var l=s.length-1;l>=0;l--)(o=s[l])&&(a=(r<3?o(a):r>3?o(t,i,a):o(t,i))||a);return r>3&&a&&Object.defineProperty(t,i,a),a};exports.W3mDataCaptureView=class extends e.i{constructor(){var t,i,n,r,a,o,l;super(...arguments),this.email=((t=e.RouterController.state.data)==null?void 0:t.email)??((n=(i=e.ChainController.getAccountData())==null?void 0:i.user)==null?void 0:n.email)??"",this.address=((r=e.ChainController.getAccountData())==null?void 0:r.address)??"",this.loading=!1,this.appName=((a=e.OptionsController.state.metadata)==null?void 0:a.name)??"AppKit",this.siwx=e.OptionsController.state.siwx,this.isRequired=Array.isArray((o=e.OptionsController.state.remoteFeatures)==null?void 0:o.emailCapture)&&((l=e.OptionsController.state.remoteFeatures)==null?void 0:l.emailCapture.includes("required")),this.recentEmails=this.getRecentEmails()}connectedCallback(){(!this.siwx||!(this.siwx instanceof u.ReownAuthentication))&&e.SnackController.showError("ReownAuthentication is not initialized. Please contact support."),super.connectedCallback()}firstUpdated(){this.loading=!1,this.recentEmails=this.getRecentEmails(),this.email&&this.onSubmit()}render(){return e.b`
|
|
137
|
+
<wui-flex flexDirection="column" .padding=${["3xs","m","m","m"]} gap="l">
|
|
138
|
+
${this.hero()} ${this.paragraph()} ${this.emailInput()} ${this.recentEmailsWidget()}
|
|
139
|
+
${this.footerActions()}
|
|
140
|
+
</wui-flex>
|
|
141
|
+
`}hero(){return e.b`
|
|
142
|
+
<div class="hero" data-state=${this.loading?"loading":"default"}>
|
|
143
|
+
${this.heroRow(["id","mail","wallet","x","solana","qrCode"])}
|
|
144
|
+
${this.heroRow(["mail","farcaster","wallet","discord","mobile","qrCode"])}
|
|
145
|
+
<div class="hero-row">
|
|
146
|
+
${this.heroIcon("github")} ${this.heroIcon("bank")}
|
|
147
|
+
<wui-icon-box
|
|
148
|
+
size="xl"
|
|
149
|
+
iconSize="xxl"
|
|
150
|
+
iconColor=${this.loading?"fg-100":"accent-100"}
|
|
151
|
+
backgroundColor=${this.loading?"fg-100":"accent-100"}
|
|
152
|
+
icon=${this.loading?"id":"user"}
|
|
153
|
+
isOpaque
|
|
154
|
+
class="hero-main-icon"
|
|
155
|
+
data-state=${this.loading?"loading":"default"}
|
|
156
|
+
>
|
|
157
|
+
</wui-icon-box>
|
|
158
|
+
${this.heroIcon("id")} ${this.heroIcon("card")}
|
|
159
|
+
</div>
|
|
160
|
+
${this.heroRow(["google","id","github","verify","apple","mobile"])}
|
|
161
|
+
</div>
|
|
162
|
+
`}heroRow(t){return e.b`
|
|
163
|
+
<div class="hero-row" data-state=${this.loading?"loading":"default"}>
|
|
164
|
+
${t.map(this.heroIcon.bind(this))}
|
|
165
|
+
</div>
|
|
166
|
+
`}heroIcon(t){return e.b`
|
|
167
|
+
<wui-icon-box
|
|
168
|
+
size="xl"
|
|
169
|
+
iconSize="xxl"
|
|
170
|
+
iconColor="fg-100"
|
|
171
|
+
backgroundColor="fg-100"
|
|
172
|
+
icon=${t}
|
|
173
|
+
data-state=${this.loading?"loading":"default"}
|
|
174
|
+
isOpaque
|
|
175
|
+
class="hero-row-icon"
|
|
176
|
+
>
|
|
177
|
+
</wui-icon-box>
|
|
178
|
+
`}paragraph(){return this.loading?e.b`
|
|
179
|
+
<wui-text variant="paragraph-400" color="fg-200" align="center"
|
|
180
|
+
>We are verifying your account with email
|
|
181
|
+
<wui-text variant="paragraph-600" color="accent-100">${this.email}</wui-text> and address
|
|
182
|
+
<wui-text variant="paragraph-600" color="fg-100">
|
|
183
|
+
${e.UiHelperUtil.getTruncateString({string:this.address,charsEnd:4,charsStart:4,truncate:"middle"})} </wui-text
|
|
184
|
+
>, please wait a moment.</wui-text
|
|
185
|
+
>
|
|
186
|
+
`:this.isRequired?e.b`
|
|
187
|
+
<wui-text variant="paragraph-600" color="fg-100" align="center">
|
|
188
|
+
${this.appName} requires your email for authentication.
|
|
189
|
+
</wui-text>
|
|
190
|
+
`:e.b`
|
|
191
|
+
<wui-flex flexDirection="column" gap="xs" alignItems="center">
|
|
192
|
+
<wui-text variant="paragraph-600" color="fg-100" align="center" size>
|
|
193
|
+
${this.appName} would like to collect your email.
|
|
194
|
+
</wui-text>
|
|
195
|
+
|
|
196
|
+
<wui-text variant="small-400" color="fg-200" align="center">
|
|
197
|
+
Don't worry, it's optional—you can skip this step.
|
|
198
|
+
</wui-text>
|
|
199
|
+
</wui-flex>
|
|
200
|
+
`}emailInput(){if(this.loading)return null;const t=n=>{n.key==="Enter"&&this.onSubmit()},i=n=>{this.email=n.detail};return e.b`
|
|
201
|
+
<wui-flex flexDirection="column">
|
|
202
|
+
<wui-email-input
|
|
203
|
+
.value=${this.email}
|
|
204
|
+
.disabled=${this.loading}
|
|
205
|
+
@inputChange=${i}
|
|
206
|
+
@keydown=${t}
|
|
207
|
+
></wui-email-input>
|
|
208
|
+
|
|
209
|
+
<w3m-email-suffixes-widget
|
|
210
|
+
.email=${this.email}
|
|
211
|
+
@change=${i}
|
|
212
|
+
></w3m-email-suffixes-widget>
|
|
213
|
+
</wui-flex>
|
|
214
|
+
`}recentEmailsWidget(){if(this.recentEmails.length===0||this.loading)return null;const t=i=>{this.email=i.detail,this.onSubmit()};return e.b`
|
|
215
|
+
<w3m-recent-emails-widget
|
|
216
|
+
.emails=${this.recentEmails}
|
|
217
|
+
@select=${t}
|
|
218
|
+
></w3m-recent-emails-widget>
|
|
219
|
+
`}footerActions(){return e.b`
|
|
220
|
+
<wui-flex flexDirection="row" fullWidth gap="s">
|
|
221
|
+
${this.isRequired?null:e.b`<wui-button
|
|
222
|
+
size="lg"
|
|
223
|
+
variant="neutral"
|
|
224
|
+
fullWidth
|
|
225
|
+
.disabled=${this.loading}
|
|
226
|
+
@click=${this.onSkip.bind(this)}
|
|
227
|
+
>Skip this step</wui-button
|
|
228
|
+
>`}
|
|
229
|
+
|
|
230
|
+
<wui-button
|
|
231
|
+
size="lg"
|
|
232
|
+
variant="main"
|
|
233
|
+
type="submit"
|
|
234
|
+
fullWidth
|
|
235
|
+
.disabled=${!this.email||!this.isValidEmail(this.email)}
|
|
236
|
+
.loading=${this.loading}
|
|
237
|
+
@click=${this.onSubmit.bind(this)}
|
|
238
|
+
>
|
|
239
|
+
Continue
|
|
240
|
+
</wui-button>
|
|
241
|
+
</wui-flex>
|
|
242
|
+
`}async onSubmit(){if(!(this.siwx instanceof u.ReownAuthentication)){e.SnackController.showError("ReownAuthentication is not initialized. Please contact support.");return}const t=e.ChainController.getActiveCaipAddress();if(!t)throw new Error("Account is not connected.");if(!this.isValidEmail(this.email)){e.SnackController.showError("Please provide a valid email.");return}try{this.loading=!0;const i=await this.siwx.requestEmailOtp({email:this.email,account:t});this.pushRecentEmail(this.email),i.uuid===null?e.RouterController.replace("SIWXSignMessage"):e.RouterController.replace("DataCaptureOtpConfirm",{email:this.email})}catch{e.SnackController.showError("Failed to send email OTP"),this.loading=!1}}onSkip(){e.RouterController.replace("SIWXSignMessage")}getRecentEmails(){const t=e.SafeLocalStorage.getItem(e.SafeLocalStorageKeys.RECENT_EMAILS);return(t?t.split(","):[]).filter(this.isValidEmail.bind(this)).slice(0,3)}pushRecentEmail(t){const i=this.getRecentEmails(),n=Array.from(new Set([t,...i])).slice(0,3);e.SafeLocalStorage.setItem(e.SafeLocalStorageKeys.RECENT_EMAILS,n.join(","))}isValidEmail(t){return/^\S+@\S+\.\S+$/u.test(t)}};exports.W3mDataCaptureView.styles=[x];c([e.r()],exports.W3mDataCaptureView.prototype,"email",void 0);c([e.r()],exports.W3mDataCaptureView.prototype,"address",void 0);c([e.r()],exports.W3mDataCaptureView.prototype,"loading",void 0);c([e.r()],exports.W3mDataCaptureView.prototype,"appName",void 0);c([e.r()],exports.W3mDataCaptureView.prototype,"siwx",void 0);c([e.r()],exports.W3mDataCaptureView.prototype,"isRequired",void 0);c([e.r()],exports.W3mDataCaptureView.prototype,"recentEmails",void 0);exports.W3mDataCaptureView=c([e.customElement("w3m-data-capture-view")],exports.W3mDataCaptureView);
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CjZQCcwG.js"),c=require("./index-4lfXeo30.js");var p=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mEmailVerifyOtpView=class extends c.W3mEmailOtpWidget{constructor(){super(...arguments),this.onOtpSubmit=async e=>{var i,o;try{if(this.authConnector){const n=t.ChainController.state.activeChain,r=t.ConnectionController.getConnections(n),a=(i=t.OptionsController.state.remoteFeatures)==null?void 0:i.multiWallet,s=r.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),n)await t.ConnectionController.connectExternal(this.authConnector,n);else throw new Error("Active chain is not set on ChainController");if((o=t.OptionsController.state.remoteFeatures)!=null&&o.emailCapture)return;if(t.OptionsController.state.siwx){t.ModalController.close();return}if(s&&a){t.RouterController.replace("ProfileWallets"),t.SnackController.showSuccess("New Wallet Added");return}t.ModalController.close()}}catch(n){throw t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:t.CoreHelperUtil.parseError(n)}}),n}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};exports.W3mEmailVerifyOtpView=p([t.customElement("w3m-email-verify-otp-view")],exports.W3mEmailVerifyOtpView);const h=t.css`
|
|
2
|
+
wui-icon-box {
|
|
3
|
+
height: ${({spacing:l})=>l[16]};
|
|
4
|
+
width: ${({spacing:l})=>l[16]};
|
|
5
|
+
}
|
|
6
|
+
`;var u=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mEmailVerifyDeviceView=class extends t.i{constructor(){var e;super(),this.email=(e=t.RouterController.state.data)==null?void 0:e.email,this.authConnector=t.ConnectorController.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw new Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw new Error("w3m-email-verify-device-view: No auth connector provided");return t.b`
|
|
7
|
+
<wui-flex
|
|
8
|
+
flexDirection="column"
|
|
9
|
+
alignItems="center"
|
|
10
|
+
.padding=${["6","3","6","3"]}
|
|
11
|
+
gap="4"
|
|
12
|
+
>
|
|
13
|
+
<wui-icon-box size="xl" color="accent-primary" icon="sealCheck"></wui-icon-box>
|
|
14
|
+
|
|
15
|
+
<wui-flex flexDirection="column" alignItems="center" gap="3">
|
|
16
|
+
<wui-flex flexDirection="column" alignItems="center">
|
|
17
|
+
<wui-text variant="md-regular" color="primary">
|
|
18
|
+
Approve the login link we sent to
|
|
19
|
+
</wui-text>
|
|
20
|
+
<wui-text variant="md-regular" color="primary"><b>${this.email}</b></wui-text>
|
|
21
|
+
</wui-flex>
|
|
22
|
+
|
|
23
|
+
<wui-text variant="sm-regular" color="secondary" align="center">
|
|
24
|
+
The code expires in 20 minutes
|
|
25
|
+
</wui-text>
|
|
26
|
+
|
|
27
|
+
<wui-flex alignItems="center" id="w3m-resend-section" gap="2">
|
|
28
|
+
<wui-text variant="sm-regular" color="primary" align="center">
|
|
29
|
+
Didn't receive it?
|
|
30
|
+
</wui-text>
|
|
31
|
+
<wui-link @click=${this.onResendCode.bind(this)} .disabled=${this.loading}>
|
|
32
|
+
Resend email
|
|
33
|
+
</wui-link>
|
|
34
|
+
</wui-flex>
|
|
35
|
+
</wui-flex>
|
|
36
|
+
</wui-flex>
|
|
37
|
+
`}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),t.EventsController.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),t.RouterController.replace("EmailVerifyOtp",{email:this.email})}catch{t.RouterController.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw new Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),t.SnackController.showSuccess("Code email resent")}}catch(e){t.SnackController.showError(e)}finally{this.loading=!1}}};exports.W3mEmailVerifyDeviceView.styles=h;u([t.r()],exports.W3mEmailVerifyDeviceView.prototype,"loading",void 0);exports.W3mEmailVerifyDeviceView=u([t.customElement("w3m-email-verify-device-view")],exports.W3mEmailVerifyDeviceView);const f=t.i$1`
|
|
38
|
+
wui-email-input {
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
form {
|
|
43
|
+
width: 100%;
|
|
44
|
+
display: block;
|
|
45
|
+
position: relative;
|
|
46
|
+
}
|
|
47
|
+
`;var m=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mUpdateEmailWalletView=class extends t.i{constructor(){var e,i;super(...arguments),this.formRef=t.e(),this.initialEmail=((e=t.RouterController.state.data)==null?void 0:e.email)??"",this.redirectView=(i=t.RouterController.state.data)==null?void 0:i.redirectView,this.email="",this.loading=!1}firstUpdated(){var e;(e=this.formRef.value)==null||e.addEventListener("keydown",i=>{i.key==="Enter"&&this.onSubmitEmail(i)})}render(){return t.b`
|
|
48
|
+
<wui-flex flexDirection="column" padding="4" gap="4">
|
|
49
|
+
<form ${t.n$1(this.formRef)} @submit=${this.onSubmitEmail.bind(this)}>
|
|
50
|
+
<wui-email-input
|
|
51
|
+
value=${this.initialEmail}
|
|
52
|
+
.disabled=${this.loading}
|
|
53
|
+
@inputChange=${this.onEmailInputChange.bind(this)}
|
|
54
|
+
>
|
|
55
|
+
</wui-email-input>
|
|
56
|
+
<input type="submit" hidden />
|
|
57
|
+
</form>
|
|
58
|
+
${this.buttonsTemplate()}
|
|
59
|
+
</wui-flex>
|
|
60
|
+
`}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();const i=t.ConnectorController.getAuthConnector();if(!i)throw new Error("w3m-update-email-wallet: Auth connector not found");const o=await i.provider.updateEmail({email:this.email});t.EventsController.sendEvent({type:"track",event:"EMAIL_EDIT"}),o.action==="VERIFY_SECONDARY_OTP"?t.RouterController.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView}):t.RouterController.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView})}catch(i){t.SnackController.showError(i),this.loading=!1}}buttonsTemplate(){const e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return this.redirectView?t.b`
|
|
61
|
+
<wui-flex gap="3">
|
|
62
|
+
<wui-button size="md" variant="neutral" fullWidth @click=${t.RouterController.goBack}>
|
|
63
|
+
Cancel
|
|
64
|
+
</wui-button>
|
|
65
|
+
|
|
66
|
+
<wui-button
|
|
67
|
+
size="md"
|
|
68
|
+
variant="accent-primary"
|
|
69
|
+
fullWidth
|
|
70
|
+
@click=${this.onSubmitEmail.bind(this)}
|
|
71
|
+
.disabled=${!e}
|
|
72
|
+
.loading=${this.loading}
|
|
73
|
+
>
|
|
74
|
+
Save
|
|
75
|
+
</wui-button>
|
|
76
|
+
</wui-flex>
|
|
77
|
+
`:t.b`
|
|
78
|
+
<wui-button
|
|
79
|
+
size="md"
|
|
80
|
+
variant="accent-primary"
|
|
81
|
+
fullWidth
|
|
82
|
+
@click=${this.onSubmitEmail.bind(this)}
|
|
83
|
+
.disabled=${!e}
|
|
84
|
+
.loading=${this.loading}
|
|
85
|
+
>
|
|
86
|
+
Save
|
|
87
|
+
</wui-button>
|
|
88
|
+
`}};exports.W3mUpdateEmailWalletView.styles=f;m([t.r()],exports.W3mUpdateEmailWalletView.prototype,"email",void 0);m([t.r()],exports.W3mUpdateEmailWalletView.prototype,"loading",void 0);exports.W3mUpdateEmailWalletView=m([t.customElement("w3m-update-email-wallet-view")],exports.W3mUpdateEmailWalletView);var E=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mUpdateEmailPrimaryOtpView=class extends c.W3mEmailOtpWidget{constructor(){var e;super(),this.email=(e=t.RouterController.state.data)==null?void 0:e.email,this.onOtpSubmit=async i=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:i}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),t.RouterController.replace("UpdateEmailSecondaryOtp",t.RouterController.state.data))}catch(o){throw t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:t.CoreHelperUtil.parseError(o)}}),o}},this.onStartOver=()=>{t.RouterController.replace("UpdateEmailWallet",t.RouterController.state.data)}}};exports.W3mUpdateEmailPrimaryOtpView=E([t.customElement("w3m-update-email-primary-otp-view")],exports.W3mUpdateEmailPrimaryOtpView);var w=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mUpdateEmailSecondaryOtpView=class extends c.W3mEmailOtpWidget{constructor(){var e,i;super(),this.email=(e=t.RouterController.state.data)==null?void 0:e.newEmail,this.redirectView=(i=t.RouterController.state.data)==null?void 0:i.redirectView,this.onOtpSubmit=async o=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:o}),t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),this.redirectView&&t.RouterController.reset(this.redirectView))}catch(n){throw t.EventsController.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:t.CoreHelperUtil.parseError(n)}}),n}},this.onStartOver=()=>{t.RouterController.replace("UpdateEmailWallet",t.RouterController.state.data)}}};exports.W3mUpdateEmailSecondaryOtpView=w([t.customElement("w3m-update-email-secondary-otp-view")],exports.W3mUpdateEmailSecondaryOtpView);var d=function(l,e,i,o){var n=arguments.length,r=n<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")r=Reflect.decorate(l,e,i,o);else for(var s=l.length-1;s>=0;s--)(a=l[s])&&(r=(n<3?a(r):n>3?a(e,i,r):a(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};exports.W3mEmailLoginView=class extends t.i{constructor(){var e;super(),this.authConnector=t.ConnectorController.getAuthConnector(),this.isEmailEnabled=(e=t.OptionsController.state.remoteFeatures)==null?void 0:e.email,this.isAuthEnabled=this.checkIfAuthEnabled(t.ConnectorController.state.connectors),this.connectors=t.ConnectorController.state.connectors,t.ConnectorController.subscribeKey("connectors",i=>{this.connectors=i,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)})}render(){if(!this.isEmailEnabled)throw new Error("w3m-email-login-view: Email is not enabled");if(!this.isAuthEnabled)throw new Error("w3m-email-login-view: No auth connector provided");return t.b`<wui-flex flexDirection="column" .padding=${["1","3","3","3"]} gap="4">
|
|
89
|
+
<w3m-email-login-widget></w3m-email-login-widget>
|
|
90
|
+
</wui-flex> `}checkIfAuthEnabled(e){const i=e.filter(n=>n.type===t.ConstantsUtil$2.CONNECTOR_TYPE_AUTH).map(n=>n.chain);return t.ConstantsUtil.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(n=>i.includes(n))}};d([t.r()],exports.W3mEmailLoginView.prototype,"connectors",void 0);exports.W3mEmailLoginView=d([t.customElement("w3m-email-login-view")],exports.W3mEmailLoginView);Object.defineProperty(exports,"W3mEmailOtpWidget",{enumerable:!0,get:()=>c.W3mEmailOtpWidget});
|