@frak-labs/components 1.0.12-beta.b9160b52 → 1.0.12-beta.dfcc05ea
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/cdn/{Banner.DwcQ2YSM.js → Banner.Dl3YwoEL.js} +1 -1
- package/cdn/{ButtonShare.CjdlM3aT.js → ButtonShare.B1CGO6_9.js} +1 -1
- package/cdn/{ButtonWallet.DpIXKZFj.js → ButtonWallet.BJmwiurL.js} +1 -1
- package/cdn/{GiftIcon.C59t_j9U.js → GiftIcon.C2M59Q4m.js} +1 -1
- package/cdn/{OpenInAppButton.C7jeqGw5.js → OpenInAppButton.D7NlWUqu.js} +1 -1
- package/cdn/{PostPurchase.B4UygOrN.js → PostPurchase.CA3F9d3o.js} +1 -1
- package/cdn/components.js +1 -1
- package/cdn/{defaults.BjpGmLqu.js → defaults.Cc2Npf8m.js} +1 -1
- package/cdn/loader.js +1 -1
- package/cdn/useGlobalComponents.ChIY6Foy.js +1 -0
- package/cdn/{useLightDomStyles.D9RCvVzN.js → useLightDomStyles.BHMFG8TC.js} +1 -1
- package/cdn/{useReward.DA85BqOf.js → useReward.Dn6zovBQ.js} +1 -1
- package/dist/i18n/defaults.js +1 -1
- package/package.json +3 -3
- package/cdn/useGlobalComponents.J2aYwBMq.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./sharedBaseCss.css.BDzFcWnD.js";import{c as t}from"./clientReady.CPe9C8dP.js";import{d as n,o as r}from"./src-Bigq2qnT.CyWI_ZK9.js";import{d as i,v as a}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{a as o,d as s,f as c,l,m as u,n as d,p as f,s as p,t as m,u as ee}from"./defaults.
|
|
1
|
+
import{t as e}from"./sharedBaseCss.css.BDzFcWnD.js";import{c as t}from"./clientReady.CPe9C8dP.js";import{d as n,o as r}from"./src-Bigq2qnT.CyWI_ZK9.js";import{d as i,v as a}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{a as o,d as s,f as c,l,m as u,n as d,p as f,s as p,t as m,u as ee}from"./defaults.Cc2Npf8m.js";import{a as h,i as g,n as _,r as v,t as y}from"./GiftIcon.C2M59Q4m.js";import{t as b}from"./useGlobalComponents.ChIY6Foy.js";import{t as x}from"./useLightDomStyles.BHMFG8TC.js";import{r as S}from"./rewards.BHoSugMr.js";import{t as C}from"./useReward.Dn6zovBQ.js";var w=`inAppBanner_body__1ibpiy74`,T=`inAppBanner_closeButton__1ibpiy77`,E=`inAppBanner_container__1ibpiy70`,D=`inAppBanner_cta__1ibpiy76`,O=`inAppBanner_description__1ibpiy75`,k=`inAppBanner_header__1ibpiy71`,A=`inAppBanner_iconWrapper__1ibpiy72`,j=`inAppBanner_title__1ibpiy73`;function te({title:e,description:t,cta:n,dismissLabel:r,onAction:i,onDismiss:a,className:o,classNames:s}){return u(`div`,{className:`${E}${o?` ${o}`:``}`,role:`alert`,children:[u(`div`,{className:k,children:[u(`span`,{className:`${A}${s?.icon?` ${s.icon}`:``}`,children:u(_,{width:20,height:20})}),u(`p`,{className:`${j}${s?.title?` ${s.title}`:``}`,children:e})]}),u(`div`,{className:w,children:[u(`p`,{className:`${O}${s?.description?` ${s.description}`:``}`,children:t}),u(`button`,{type:`button`,className:`${D}${s?.cta?` ${s.cta}`:``}`,onClick:i,children:[n,u(g,{width:14,height:14})]})]}),u(`button`,{type:`button`,className:`${T}${s?.close?` ${s.close}`:``}`,onClick:a,"aria-label":r,children:u(h,{width:16,height:16})})]})}var ne=`Banner_frakLogo__1gnumzi9`,re=`Banner_iconSvg__1gnumzi1`,ie=`Banner_referral__1gnumzi2 reset_base__1831jhd0 Banner_rootBase__1gnumzi0`,ae=`Banner_referralBody__1gnumzi5`,oe=`Banner_referralCta__1gnumzi8 sharedBaseCss_buttonReset__7cswil0`,se=`Banner_referralDescription__1gnumzi7 reset_base__1831jhd0`,ce=`Banner_referralIconWrapper__1gnumzi3`,le=`Banner_referralImage__1gnumzi4`,ue=`Banner_referralTitle__1gnumzi6 reset_base__1831jhd0`;function M({placement:h,classname:g=``,interaction:_,referralTitle:w,referralDescription:T,referralCta:E,inappTitle:D,inappDescription:O,inappCta:k,imageUrl:A,preview:j,previewMode:M,allowInappRedirect:N}){let P=!!j,F=o(),I=M===`inapp`?`inapp`:`referral`,L=N===!0||N===`true`,R=d(h),{shouldRender:z,isHidden:B,isClientReady:V}=p();x(`frak-banner`,h,R?.components?.banner?.css,`@keyframes keyframes_fadeIn__mnqmlt0 {
|
|
2
2
|
from {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./clientReady.CPe9C8dP.js";import{t}from"./sharingPage.B8z2OScU.js";import{a as n,m as r,n as i,p as a,s as o,t as s,u as c}from"./defaults.
|
|
1
|
+
import{c as e}from"./clientReady.CPe9C8dP.js";import{t}from"./sharingPage.B8z2OScU.js";import{a as n,m as r,n as i,p as a,s as o,t as s,u as c}from"./defaults.Cc2Npf8m.js";import{t as l}from"./useGlobalComponents.ChIY6Foy.js";import{t as u}from"./useLightDomStyles.BHMFG8TC.js";import{r as d}from"./rewards.BHoSugMr.js";import{t as f}from"./useReward.Dn6zovBQ.js";import{t as p}from"./embeddedWallet.D3GODltA.js";function m({placement:m,text:h,classname:g=``,noRewardText:_,targetInteraction:v,clickAction:y,preview:b}){let x=!!b,S=n(),C=i(m),w=l(),T=C?.components?.buttonShare??w?.buttonShare;u(`frak-button-share`,m,T?.css);let E=c(()=>C?.targetInteraction===void 0?v:C.targetInteraction,[C?.targetInteraction,v]),D=T?.text??h??s[S].buttonShare.text,O=T?.noRewardText??_,k=c(()=>D.includes(`{REWARD}`),[D]),A=c(()=>T?.clickAction??y??`sharing-page`,[T?.clickAction,y]),{shouldRender:j,isHidden:M,isClientReady:N}=o(),{reward:P}=f(k&&N,E),F=c(()=>k?P?d(D,P):O??d(D,void 0):D,[k,D,O,P]),I=a(()=>{if(!x){if(e(window.FrakSetup.client,`share_button_clicked`,{placement:m,target_interaction:E,has_reward:!!P,click_action:A}),A===`embedded-wallet`){p(E,m);return}t(E,m)}},[x,A,E,m,P]);if(!x&&(!j||M))return null;let L=[`button`,`button__fadeIn`,g].filter(Boolean).join(` `);return r(`button`,{type:`button`,disabled:!x&&!N,class:L,onClick:I,children:F})}export{m as ButtonShare};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as e,d as t,f as n,h as r,m as i,n as a,r as o,s,t as c,u as l}from"./defaults.
|
|
1
|
+
import{a as e,d as t,f as n,h as r,m as i,n as a,r as o,s,t as c,u as l}from"./defaults.Cc2Npf8m.js";import{t as u}from"./useReward.Dn6zovBQ.js";import{t as d}from"./embeddedWallet.D3GODltA.js";function f(e){return i(`svg`,{fill:`none`,height:`1em`,viewBox:`0 0 28 28`,width:`1em`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[i(`title`,{children:`Gift icon`}),i(`path`,{d:`m23.14 14v11.43h-18.29v-11.43m9.14 11.43v-17.14m0 0h-5.14c-0.76 0-1.48-0.3-2.02-0.84s-0.84-1.26-0.84-2.020.3-1.480.84-2.02 1.26-0.84 2.02-0.84c4 0 5.14 5.71 5.14 5.71zm0 0h5.14c0.76 0 1.48-0.3 2.02-0.84s0.84-1.260.84-2.02-0.3-1.48-0.84-2.02-1.26-0.84-2.02-0.84c-4 0-5.14 5.71-5.14 5.71zm-11.43 0h22.86v5.71h-22.86z`,stroke:`#fff`,"stroke-linecap":`round`,"stroke-linejoin":`round`})]})}function p(){`vibrate`in navigator?navigator.vibrate(10):console.log(`Vibration not supported`)}function m(e,t){p(),d(e,t)}function h({placement:d,classname:p=``,useReward:h,targetInteraction:g}){let _=e(),v=a(d),y=l(()=>v?.targetInteraction===void 0?g:v.targetInteraction,[v?.targetInteraction,g]),b=l(()=>h===!0,[h]),{shouldRender:x,isHidden:S,isClientReady:C}=s(),{reward:w}=u(b&&C,y),[T,E]=t(`right`);if(n(()=>{let e=v?.components?.buttonWallet?.position,t=window.FrakSetup?.modalWalletConfig?.metadata?.position;E(e??t??`right`)},[v?.components?.buttonWallet?.position]),!x||S)return null;let D=[`button`,`button__fadeIn`,T===`left`?`button__left`:`button__right`,p].filter(Boolean).join(` `);return i(r,{children:[i(`style`,{children:o(`
|
|
2
2
|
.button {
|
|
3
3
|
all: unset;
|
|
4
4
|
position: fixed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./defaults.
|
|
1
|
+
import{m as e}from"./defaults.Cc2Npf8m.js";function t(t){return e(`svg`,{width:`15`,height:`15`,viewBox:`0 0 15 15`,fill:`none`,"aria-hidden":`true`,...t,children:e(`path`,{d:`M7.33 0C11.38 0 14.67 3.28 14.67 7.33C14.67 11.38 11.38 14.67 7.33 14.67C3.28 14.67 0 11.38 0 7.33C0 3.28 3.28 0 7.33 0ZM10.39 4.28C10.15 4.04 9.76 4.04 9.52 4.28L7.33 6.47L5.14 4.28C4.9 4.04 4.52 4.04 4.28 4.28C4.04 4.52 4.04 4.9 4.28 5.14L6.47 7.33L4.28 9.52C4.04 9.76 4.04 10.15 4.28 10.39C4.52 10.63 4.9 10.63 5.14 10.39L7.33 8.2L9.52 10.39C9.76 10.63 10.15 10.63 10.39 10.39C10.63 10.15 10.63 9.76 10.39 9.52L8.2 7.33L10.39 5.14C10.63 4.9 10.63 4.52 10.39 4.28Z`,fill:`currentColor`})})}function n(t){return e(`svg`,{width:`12`,height:`12`,viewBox:`0 0 12 12`,fill:`none`,"aria-hidden":`true`,...t,children:e(`path`,{d:`M5.46 0C5.76 0 6 0.24 6 0.55C6 0.85 5.76 1.09 5.46 1.09H4.36C3.05 1.09 2.28 1.36 1.82 1.82C1.36 2.28 1.09 3.05 1.09 4.36V7.64C1.09 8.95 1.36 9.72 1.82 10.18C2.28 10.64 3.05 10.91 4.36 10.91H7.64C8.95 10.91 9.72 10.64 10.18 10.18C10.64 9.72 10.91 8.95 10.91 7.64V6.55C10.91 6.24 11.15 6 11.46 6C11.76 6 12 6.24 12 6.55V7.64C12 9.05 11.72 10.19 10.95 10.95C10.19 11.72 9.05 12 7.64 12H4.36C2.95 12 1.81 11.72 1.05 10.95C0.28 10.19 6.04e-05 9.05 0 7.64V4.36C0 2.95 0.28 1.81 1.05 1.05C1.81 0.28 2.95 0 4.36 0H5.46ZM11.45 0C11.76 2.2e-05 12 0.24 12 0.55V3.16C12 3.47 11.76 3.71 11.45 3.71C11.15 3.71 10.91 3.46 10.91 3.16V1.86L6.93 5.84C6.72 6.05 6.37 6.05 6.16 5.84C5.95 5.63 5.95 5.28 6.16 5.07L10.14 1.09H8.84C8.54 1.09 8.29 0.85 8.29 0.55C8.29 0.24 8.53 0 8.84 0H11.45Z`,fill:`currentColor`})})}function r(t){return e(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:t.width??`63`,height:t.height??`24`,fill:`none`,viewBox:`0 0 63 24`,...t,children:[e(`title`,{children:`Frak`}),e(`rect`,{width:`24`,height:`24`,rx:`6`,fill:`#0043EF`}),e(`path`,{fill:`white`,d:`M9.77 15.91L5.15 14.35C5.06 14.32 4.97 14.38 4.97 14.47V17.33C4.97 17.39 5.01 17.44 5.06 17.46L9.68 19.02C9.77 19.05 9.86 18.98 9.86 18.89V16.04C9.86 15.98 9.82 15.93 9.77 15.91ZM14.58 10.44L9.95 12C9.9 12.02 9.86 12.07 9.86 12.13V14.98C9.86 15.08 9.95 15.14 10.04 15.11L14.66 13.55C14.72 13.53 14.76 13.48 14.76 13.42V10.57C14.76 10.47 14.66 10.41 14.58 10.44ZM18.92 5.02L11.18 7.51C11.12 7.53 11.08 7.58 11.08 7.64V10.57C11.08 10.62 11.14 10.66 11.2 10.65L18.94 8.15C18.99 8.14 19.03 8.08 19.03 8.02V5.1C19.03 5.04 18.97 5 18.92 5.02Z`}),e(`path`,{fill:`currentColor`,d:`M52.72 9.51C52.83 9.51 52.91 9.6 52.91 9.7L52.84 18.21C52.84 18.31 52.76 18.39 52.66 18.39L52.64 18.39H51.3C51.15 18.39 50.78 18.25 50.39 18C49.86 18.25 49.27 18.39 48.64 18.39H48.39C47.24 18.39 46.19 17.91 45.43 17.14C44.67 16.38 44.2 15.32 44.2 14.15C44.2 12.98 44.67 11.92 45.43 11.15C46.16 10.41 47.16 9.94 48.26 9.91C49.17 9.86 49.99 9.99 50.49 10.5V9.7C50.49 9.6 50.57 9.51 50.68 9.51H52.72ZM35.35 5.62H36.96C37.09 5.62 37.19 5.72 37.19 5.85V7.81C37.19 7.94 37.09 8.04 36.96 8.04H34.92C34.32 8.04 33.63 8.64 33.63 9.25V10.61C34.26 9.98 34.93 9.65 35.35 9.63H36.46C36.59 9.63 36.69 9.73 36.69 9.86V11.82C36.69 11.95 36.59 12.05 36.46 12.05H34.92C34.31 12.05 33.63 12.65 33.63 13.27V18.2C33.63 18.3 33.54 18.39 33.44 18.39H31.39C31.29 18.39 31.21 18.3 31.21 18.2V9.94C31.21 9.87 31.2 9.8 31.2 9.73C31.24 8.88 31.15 5.44 35.35 5.62ZM39.93 9.63C40.04 9.63 40.12 9.72 40.12 9.82V10.61C40.76 9.98 41.58 9.63 41.85 9.63H43.46C43.58 9.63 43.68 9.73 43.69 9.86V11.82C43.68 11.95 43.58 12.05 43.46 12.05H41.41C40.81 12.05 40.12 12.65 40.12 13.27V18.2C40.12 18.3 40.04 18.39 39.93 18.39H37.89C37.79 18.39 37.7 18.3 37.7 18.2V9.82C37.7 9.72 37.79 9.63 37.89 9.63H39.93ZM56.2 7.01C56.3 7.01 56.39 7.09 56.39 7.2V13.45L59.83 10.19C59.87 10.16 59.91 10.14 59.96 10.14H62.28C62.45 10.14 62.54 10.34 62.42 10.46L59.3 13.63L62.8 18.07C62.9 18.2 62.81 18.39 62.65 18.39H60.24C60.18 18.39 60.13 18.36 60.09 18.31L57.67 15.32C57.6 15.23 57.47 15.22 57.39 15.3L56.39 16.29V18.19C56.39 18.3 56.3 18.39 56.2 18.39H54.19C54.08 18.39 54 18.3 54 18.19V7.2C54 7.09 54.08 7.01 54.19 7.01H56.2ZM48.37 11.96C47.78 11.96 47.24 12.21 46.85 12.6C46.46 13 46.22 13.54 46.22 14.14C46.22 14.73 46.46 15.28 46.85 15.67C47.24 16.07 47.78 16.31 48.37 16.31H48.66C49.25 16.31 49.79 16.07 50.18 15.67C50.57 15.28 50.81 14.73 50.81 14.14C50.81 13.54 50.57 12.99 50.18 12.6C49.79 12.21 49.25 11.96 48.66 11.96H48.37Z`})]})}2*Math.PI*11;function i(t){return e(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":`true`,...t,children:e(`path`,{d:`M8 0C12.42 0 16 3.58 16 8C16 12.42 12.42 16 8 16C3.58 16 0 12.42 0 8C0 3.58 3.58 0 8 0ZM8 1.5C4.41 1.5 1.5 4.41 1.5 8C1.5 11.59 4.41 14.5 8 14.5C11.59 14.5 14.5 11.59 14.5 8C14.5 4.41 11.59 1.5 8 1.5ZM8.1 10.21C8.82 10.21 9.24 10.63 9.24 11.33C9.24 12.03 8.82 12.46 8.1 12.46C7.36 12.46 6.97 12.03 6.97 11.33C6.97 10.63 7.36 10.21 8.1 10.21ZM8.85 3.54C9.01 3.54 9.15 3.68 9.15 3.84V4.75L8.84 8.37C8.83 8.53 8.7 8.65 8.54 8.65H7.63C7.47 8.65 7.34 8.52 7.33 8.37L7.08 4.75V3.84C7.09 3.68 7.22 3.54 7.38 3.54H8.85Z`,fill:`currentColor`})})}function a(t){return e(`svg`,{viewBox:`0 0 100 100`,fill:`none`,"aria-hidden":`true`,...t,children:[e(`circle`,{cx:`38`,cy:`28`,r:`23`,fill:`#FFF533`}),e(`path`,{d:`M50 38C30 10 12 30 50 38Z`,stroke:`#222222`,"stroke-width":`4`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),e(`path`,{d:`M50 38C70 10 88 30 50 38Z`,stroke:`#222222`,"stroke-width":`4`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),e(`rect`,{x:`10`,y:`38`,width:`80`,height:`16`,rx:`2`,stroke:`#222222`,"stroke-width":`4`}),e(`path`,{d:`M15 54V89C15 90.6 16.4 92 18 92H82C83.6 92 85 90.6 85 89V54`,stroke:`#222222`,"stroke-width":`4`,"stroke-linecap":`round`,"stroke-linejoin":`round`}),e(`line`,{x1:`50`,y1:`54`,x2:`50`,y2:`92`,stroke:`#222222`,"stroke-width":`4`,"stroke-linecap":`round`})]})}export{t as a,n as i,i as n,r,a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./clientReady.CPe9C8dP.js";import{a as t,l as n,u as r}from"./src-Bigq2qnT.CyWI_ZK9.js";import{a as i,m as a,n as o,s,t as c,u as l}from"./defaults.
|
|
1
|
+
import{c as e}from"./clientReady.CPe9C8dP.js";import{a as t,l as n,u as r}from"./src-Bigq2qnT.CyWI_ZK9.js";import{a as i,m as a,n as o,s,t as c,u as l}from"./defaults.Cc2Npf8m.js";import{t as u}from"./useLightDomStyles.BHMFG8TC.js";function d(t=`wallet`,i){let a=window.FrakSetup?.client;a&&e(a,`open_in_app_clicked`,{path:t,placement:i}),r(`${n}${t}`,{onFallback:()=>{a&&e(a,`app_not_installed`,{path:t,placement:i})}})}function f(){return{isMobile:l(()=>t(),[])}}function p({placement:e,text:t,classname:n=``}){let r=i(),l=o(e),{shouldRender:p,isHidden:m,isClientReady:h}=s(),{isMobile:g}=f();u(`frak-open-in-app`,e,l?.components?.openInApp?.css);let _=l?.components?.openInApp?.text??t??c[r].openInApp.text;if(!g||!p||m)return null;let v=()=>{d(void 0,e)},y=[`button`,`button__fadeIn`,n].filter(Boolean).join(` `);return a(`button`,{type:`button`,"aria-label":c[r].openInApp.ariaLabel,disabled:!h,class:y,onClick:v,children:_})}export{p as OpenInAppButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./sharedBaseCss.css.BDzFcWnD.js";import{E as t,c as n,k as r}from"./clientReady.CPe9C8dP.js";import{m as i,r as a,u as o}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{t as s}from"./sharingPage.B8z2OScU.js";import{n as c}from"./sharingPageProducts.Be0kIfZy.js";import{a as ee,d as l,f as u,l as te,m as d,n as f,p,s as m,t as h,u as g}from"./defaults.
|
|
1
|
+
import{t as e}from"./sharedBaseCss.css.BDzFcWnD.js";import{E as t,c as n,k as r}from"./clientReady.CPe9C8dP.js";import{m as i,r as a,u as o}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{t as s}from"./sharingPage.B8z2OScU.js";import{n as c}from"./sharingPageProducts.Be0kIfZy.js";import{a as ee,d as l,f as u,l as te,m as d,n as f,p,s as m,t as h,u as g}from"./defaults.Cc2Npf8m.js";import{r as ne,t as re}from"./GiftIcon.C2M59Q4m.js";import{t as ie}from"./useGlobalComponents.ChIY6Foy.js";import{t as ae}from"./useLightDomStyles.BHMFG8TC.js";import{i as oe,n as _,r as v}from"./rewards.BHoSugMr.js";var y=`PostPurchase_card__5fv5lh0`,se=`PostPurchase_cardLayout__5fv5lh1`,ce=`PostPurchase_cardLeft__5fv5lh2`,b=`PostPurchase_cardRight__5fv5lh3`,x=`PostPurchase_cta__5fv5lh6 sharedBaseCss_buttonReset__7cswil0`,le=`PostPurchase_customImage__5fv5lha`,ue=`PostPurchase_frakLogo__5fv5lhb`,de=`PostPurchase_giftIcon__5fv5lh8`,fe=`PostPurchase_icon__5fv5lh7`,pe=`PostPurchase_imageWrapper__5fv5lh9`,me=`PostPurchase_message__5fv5lh5`;function he(e,t,n){let r=e?.isReferred?`referee`:`referrer`,i=_(t.rewards,{targetInteraction:`purchase`,currency:n,audience:r});if(!i)return null;let{campaign:a}=i,o=e?.isReferred&&a.referee?`referee`:`referrer`;return{variant:o,reward:o===`referee`?a.referee:a.referrer,merchantDomain:t.onChainMetadata.domain}}function S({customerId:_,orderId:S,token:C,sharingUrl:ge,merchantId:w,placement:T,classname:E=``,variant:D,badgeText:O,referrerText:k,refereeText:A,ctaText:j,preview:M,previewVariant:N,products:P,imageUrl:F}){let I=!!M,{shouldRender:L,isHidden:R,isClientReady:z}=m(),B=f(T),V=ee();ae(`frak-post-purchase`,T,B?.components?.postPurchase?.css,`.PostPurchase_card__5fv5lh0 {
|
|
2
2
|
padding: 16px;
|
|
3
3
|
border-radius: 12px;
|
|
4
4
|
background-color: var(--surface-background__pbq4akc);
|
package/cdn/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import(`https://cdn.jsdelivr.net/npm/@frak-labs/components@beta/cdn/loader.js?v=
|
|
1
|
+
import(`https://cdn.jsdelivr.net/npm/@frak-labs/components@beta/cdn/loader.js?v=1784118936398`);
|
|
@@ -55,4 +55,4 @@ import{n as e,s as t}from"./clientReady.CPe9C8dP.js";var n,r,i,a,o,s,c,l,u,d,f,p
|
|
|
55
55
|
opacity: 1;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
`;function tt(e){return t.getConfig().placements?.[e]}function nt(e){return Y($,Ce(()=>e?tt(e):void 0,[e]))}const rt={en:{buttonShare:{text:`Share and earn!`},postPurchase:{refereeText:`You just earned {REWARD}! Share with friends to earn even more.`,refereeNoRewardText:`You just earned a reward! Share with friends to earn even more.`,referrerText:`Earn {REWARD} by sharing this with your friends!`,referrerNoRewardText:`Share this with your friends and earn rewards!`,ctaText:`Share & earn {REWARD}`,ctaNoRewardText:`Share & earn`},openInApp:{text:`Open in App`,ariaLabel:`Open in Frak Wallet app`},buttonWallet:{ariaLabel:`Open wallet`},banner:{referralTitleReward:`Earn {REWARD} on purchases on this site`,referralTitle:`You've been referred!`,referralDescription:`Earn rewards after your purchase via the Frak partner app.`,referralCta:`Got it`,inappTitle:`Open in your browser`,inappDescription:`For a better experience and to earn your rewards, open this page in your default browser.`,inappCta:`Open browser`,dismissLabel:`Dismiss`}},fr:{buttonShare:{text:`Partagez et gagnez !`},postPurchase:{refereeText:`Vous venez de gagner {REWARD} ! Partagez avec vos amis pour gagner encore plus.`,refereeNoRewardText:`Vous venez de gagner une récompense ! Partagez avec vos amis pour gagner encore plus.`,referrerText:`Gagnez {REWARD} en partageant avec vos amis !`,referrerNoRewardText:`Partagez avec vos amis et gagnez des récompenses !`,ctaText:`Partagez et gagnez {REWARD}`,ctaNoRewardText:`Partagez et gagnez`},openInApp:{text:`Ouvrir dans l'app`,ariaLabel:`Ouvrir dans l'app Frak Wallet`},buttonWallet:{ariaLabel:`Ouvrir le
|
|
58
|
+
`;function tt(e){return t.getConfig().placements?.[e]}function nt(e){return Y($,Ce(()=>e?tt(e):void 0,[e]))}const rt={en:{buttonShare:{text:`Share and earn!`},postPurchase:{refereeText:`You just earned {REWARD}! Share with friends to earn even more.`,refereeNoRewardText:`You just earned a reward! Share with friends to earn even more.`,referrerText:`Earn {REWARD} by sharing this with your friends!`,referrerNoRewardText:`Share this with your friends and earn rewards!`,ctaText:`Share & earn {REWARD}`,ctaNoRewardText:`Share & earn`},openInApp:{text:`Open in App`,ariaLabel:`Open in Frak Wallet app`},buttonWallet:{ariaLabel:`Open wallet`},banner:{referralTitleReward:`Earn {REWARD} on purchases on this site`,referralTitle:`You've been referred!`,referralDescription:`Earn rewards after your purchase via the Frak partner app.`,referralCta:`Got it`,inappTitle:`Open in your browser`,inappDescription:`For a better experience and to earn your rewards, open this page in your default browser.`,inappCta:`Open browser`,dismissLabel:`Dismiss`}},fr:{buttonShare:{text:`Partagez et gagnez !`},postPurchase:{refereeText:`Vous venez de gagner {REWARD} ! Partagez avec vos amis pour gagner encore plus.`,refereeNoRewardText:`Vous venez de gagner une récompense ! Partagez avec vos amis pour gagner encore plus.`,referrerText:`Gagnez {REWARD} en partageant avec vos amis !`,referrerNoRewardText:`Partagez avec vos amis et gagnez des récompenses !`,ctaText:`Partagez et gagnez {REWARD}`,ctaNoRewardText:`Partagez et gagnez`},openInApp:{text:`Ouvrir dans l'app`,ariaLabel:`Ouvrir dans l'app Frak Wallet`},buttonWallet:{ariaLabel:`Ouvrir le portefeuille`},banner:{referralTitleReward:`Gagnez {REWARD} sur vos achats sur ce site`,referralTitle:`Vous avez été parrainé !`,referralDescription:`Gagnez des récompenses après votre achat via l'application partenaire Frak.`,referralCta:`J'ai compris`,inappTitle:`Ouvrez dans votre navigateur`,inappDescription:`Pour une meilleure expérience et pour gagner vos récompenses, ouvrez cette page dans votre navigateur par défaut.`,inappCta:`Ouvrir le navigateur`,dismissLabel:`Fermer`}}};export{Ze as a,Y as c,U as d,W as f,w as h,et as i,Se as l,fe as m,nt as n,$ as o,Ce as p,$e as r,Ye as s,rt as t,G as u};
|
package/cdn/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./sharedBaseCss.css.BDzFcWnD.js";import{t}from"./styleManager.Cun1-fKi.js";import{C as n,S as r,_ as i,a,b as ee,c as o,d as s,f as c,i as l,l as u,m as te,o as ne,p as re,r as ie,s as d,t as f,u as p,v as m,w as h,x as g,y as _}from"./clientReady.CPe9C8dP.js";import{a as v,c as y,d as b,f as x,i as S,l as C,n as w,o as T,r as E,s as D,t as O,u as k}from"./src-Bigq2qnT.CyWI_ZK9.js";import{_ as A,a as j,c as M,d as N,f as P,g as ae,h as F,i as I,l as L,m as R,n as z,o as B,p as V,r as H,s as U,t as W,u as G,v as K}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{t as q}from"./sharingPage.B8z2OScU.js";import{t as J}from"./sharingPageProducts.Be0kIfZy.js";var Y=Object.defineProperty,X=(e,t)=>{let n={};for(var r in e)Y(n,r,{get:e[r],enumerable:!0});return t||Y(n,Symbol.toStringTag,{value:`Module`}),n};function oe(e){document.readyState===`complete`||document.readyState===`interactive`?setTimeout(e,1):document.addEventListener(`DOMContentLoaded`,e)}var se=X({DEEP_LINK_SCHEME:()=>C,FrakContextManager:()=>m,areAddressesEqual:()=>ee,base64urlDecode:()=>r,base64urlEncode:()=>re,baseIframeProps:()=>E,clearAllCache:()=>i,compressJsonToB64:()=>ne,createIFrameFrakClient:()=>w,decompressJsonFromB64:()=>D,deleteQueryParamCaseInsensitive:()=>p,findIframeInOpener:()=>O,formatAmount:()=>l,generateSsoUrl:()=>g,getBackendUrl:()=>_,getClientId:()=>n,getCurrencyAmountKey:()=>ie,getQueryParamCaseInsensitive:()=>u,getSupportedCurrency:()=>a,isIOS:()=>x,isInAppBrowser:()=>b,isMobile:()=>v,mergeAttribution:()=>S,redirectToExternalBrowser:()=>T,sdkConfigStore:()=>d,setupClient:()=>y,ssoPopupFeatures:()=>s,ssoPopupName:()=>c,trackEvent:()=>o,triggerDeepLinkWithFallback:()=>k,withCache:()=>h}),ce=X({REFERRAL_SUCCESS_EVENT:()=>K,displayEmbeddedWallet:()=>ae,displayModal:()=>M,displaySharingPage:()=>L,ensureIdentity:()=>F,getMerchantInformation:()=>R,getMergeToken:()=>N,getUserReferralStatus:()=>G,modalBuilder:()=>V,openSso:()=>te,prepareSso:()=>U,processReferral:()=>j,referralInteraction:()=>W,sendInteraction:()=>A,sendTransaction:()=>P,setupReferral:()=>B,siweAuthenticate:()=>I,trackPurchaseStatus:()=>H,watchWalletStatus:()=>z});const le=[`frak-button-share`,`frak-button-wallet`,`frak-open-in-app`,`frak-post-purchase`,`frak-banner`].join(`,`);function ue(){return typeof document>`u`||document.querySelector(le)===null?[]:[`sharing`]}function de(){return window.FrakSetup.core={...se,...ce},window.FrakSetup?.client?Promise.resolve():h(()=>Z(),{cacheKey:`frak-sdk-init`,cacheTime:1/0}).catch(e=>{o(window.FrakSetup?.client,`sdk_init_failed`,{reason:e instanceof Error?e.message:typeof e==`string`?e:`unknown`,config_missing:!window.FrakSetup?.config})})}async function Z(){if(!window.FrakSetup?.config)throw Error(`[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set.`);console.log(`[Frak SDK] Starting initialization`);let e=await y({config:fe(window.FrakSetup.config)});if(!e)throw Error(`[Frak SDK] Failed to create client`);window.FrakSetup.client=e,console.log(`[Frak SDK] Client initialized successfully`),f(),B(e),pe()}function fe(e){return e.preload===void 0?{...e,preload:ue()}:e}function pe(){let e=new URL(window.location.href);if(u(e.searchParams,`frakAction`)?.toLowerCase()!==`share`)return;console.log(`[Frak SDK] Auto open share via query param`);let t=u(e.searchParams,`link`)??void 0,n=u(e.searchParams,`placement`)??void 0,r=J(u(e.searchParams,`products`));p(e.searchParams,`frakAction`),p(e.searchParams,`link`),p(e.searchParams,`placement`),p(e.searchParams,`products`),window.history.replaceState({},``,e.toString()),q(void 0,n,{link:t,products:r})}t.injectBase(`shared`,e),t.injectBase(`fouce`,`frak-button-share:not(:defined), frak-button-wallet:not(:defined), frak-open-in-app:not(:defined), frak-post-purchase:not(:defined), frak-banner:not(:defined) { display: none !important; }`),oe(de);const Q={"button-share":()=>import(`./ButtonShare.
|
|
1
|
+
import{t as e}from"./sharedBaseCss.css.BDzFcWnD.js";import{t}from"./styleManager.Cun1-fKi.js";import{C as n,S as r,_ as i,a,b as ee,c as o,d as s,f as c,i as l,l as u,m as te,o as ne,p as re,r as ie,s as d,t as f,u as p,v as m,w as h,x as g,y as _}from"./clientReady.CPe9C8dP.js";import{a as v,c as y,d as b,f as x,i as S,l as C,n as w,o as T,r as E,s as D,t as O,u as k}from"./src-Bigq2qnT.CyWI_ZK9.js";import{_ as A,a as j,c as M,d as N,f as P,g as ae,h as F,i as I,l as L,m as R,n as z,o as B,p as V,r as H,s as U,t as W,u as G,v as K}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{t as q}from"./sharingPage.B8z2OScU.js";import{t as J}from"./sharingPageProducts.Be0kIfZy.js";var Y=Object.defineProperty,X=(e,t)=>{let n={};for(var r in e)Y(n,r,{get:e[r],enumerable:!0});return t||Y(n,Symbol.toStringTag,{value:`Module`}),n};function oe(e){document.readyState===`complete`||document.readyState===`interactive`?setTimeout(e,1):document.addEventListener(`DOMContentLoaded`,e)}var se=X({DEEP_LINK_SCHEME:()=>C,FrakContextManager:()=>m,areAddressesEqual:()=>ee,base64urlDecode:()=>r,base64urlEncode:()=>re,baseIframeProps:()=>E,clearAllCache:()=>i,compressJsonToB64:()=>ne,createIFrameFrakClient:()=>w,decompressJsonFromB64:()=>D,deleteQueryParamCaseInsensitive:()=>p,findIframeInOpener:()=>O,formatAmount:()=>l,generateSsoUrl:()=>g,getBackendUrl:()=>_,getClientId:()=>n,getCurrencyAmountKey:()=>ie,getQueryParamCaseInsensitive:()=>u,getSupportedCurrency:()=>a,isIOS:()=>x,isInAppBrowser:()=>b,isMobile:()=>v,mergeAttribution:()=>S,redirectToExternalBrowser:()=>T,sdkConfigStore:()=>d,setupClient:()=>y,ssoPopupFeatures:()=>s,ssoPopupName:()=>c,trackEvent:()=>o,triggerDeepLinkWithFallback:()=>k,withCache:()=>h}),ce=X({REFERRAL_SUCCESS_EVENT:()=>K,displayEmbeddedWallet:()=>ae,displayModal:()=>M,displaySharingPage:()=>L,ensureIdentity:()=>F,getMerchantInformation:()=>R,getMergeToken:()=>N,getUserReferralStatus:()=>G,modalBuilder:()=>V,openSso:()=>te,prepareSso:()=>U,processReferral:()=>j,referralInteraction:()=>W,sendInteraction:()=>A,sendTransaction:()=>P,setupReferral:()=>B,siweAuthenticate:()=>I,trackPurchaseStatus:()=>H,watchWalletStatus:()=>z});const le=[`frak-button-share`,`frak-button-wallet`,`frak-open-in-app`,`frak-post-purchase`,`frak-banner`].join(`,`);function ue(){return typeof document>`u`||document.querySelector(le)===null?[]:[`sharing`]}function de(){return window.FrakSetup.core={...se,...ce},window.FrakSetup?.client?Promise.resolve():h(()=>Z(),{cacheKey:`frak-sdk-init`,cacheTime:1/0}).catch(e=>{o(window.FrakSetup?.client,`sdk_init_failed`,{reason:e instanceof Error?e.message:typeof e==`string`?e:`unknown`,config_missing:!window.FrakSetup?.config})})}async function Z(){if(!window.FrakSetup?.config)throw Error(`[Frak SDK] Configuration not found. Please ensure window.FrakSetup.config is set.`);console.log(`[Frak SDK] Starting initialization`);let e=await y({config:fe(window.FrakSetup.config)});if(!e)throw Error(`[Frak SDK] Failed to create client`);window.FrakSetup.client=e,console.log(`[Frak SDK] Client initialized successfully`),f(),B(e),pe()}function fe(e){return e.preload===void 0?{...e,preload:ue()}:e}function pe(){let e=new URL(window.location.href);if(u(e.searchParams,`frakAction`)?.toLowerCase()!==`share`)return;console.log(`[Frak SDK] Auto open share via query param`);let t=u(e.searchParams,`link`)??void 0,n=u(e.searchParams,`placement`)??void 0,r=J(u(e.searchParams,`products`));p(e.searchParams,`frakAction`),p(e.searchParams,`link`),p(e.searchParams,`placement`),p(e.searchParams,`products`),window.history.replaceState({},``,e.toString()),q(void 0,n,{link:t,products:r})}t.injectBase(`shared`,e),t.injectBase(`fouce`,`frak-button-share:not(:defined), frak-button-wallet:not(:defined), frak-open-in-app:not(:defined), frak-post-purchase:not(:defined), frak-banner:not(:defined) { display: none !important; }`),oe(de);const Q={"button-share":()=>import(`./ButtonShare.B1CGO6_9.js`),"button-wallet":()=>import(`./ButtonWallet.BJmwiurL.js`),"open-in-app":()=>import(`./OpenInAppButton.D7NlWUqu.js`),"post-purchase":()=>import(`./PostPurchase.CA3F9d3o.js`),banner:()=>import(`./Banner.Dl3YwoEL.js`)},me=new MutationObserver(e=>{for(let{addedNodes:t}of e)for(let e of Array.from(t))e.nodeType===Node.ELEMENT_NODE&&$(e)});async function $(e){let t=e instanceof Element?e.tagName.toLowerCase():``,n=t?.startsWith(`frak-`),r=Array.from(e.querySelectorAll(`:not(:defined)`)).map(e=>e.tagName.toLowerCase()).filter(e=>e.startsWith(`frak-`));n&&!customElements.get(t)&&r.push(t);let i=[...new Set(r)];await Promise.allSettled(i.map(e=>he(e)))}async function he(e){if(customElements.get(e))return Promise.resolve();try{let t=e.replace(/^frak-/i,``);if(!(t in Q))throw Error(`Component ${e} is not supported.`);await Q[t]()}catch(e){console.error(e)}}$(document.body),me.observe(document.documentElement,{subtree:!0,childList:!0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e}from"./clientReady.CPe9C8dP.js";import{c as t,o as n}from"./defaults.Cc2Npf8m.js";function r(){return t(n,()=>e.getConfig().components)}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./styleManager.Cun1-fKi.js";import{f as t,i as n}from"./defaults.
|
|
1
|
+
import{t as e}from"./styleManager.Cun1-fKi.js";import{f as t,i as n}from"./defaults.Cc2Npf8m.js";function r(r,i,a,o,s){t(()=>{s&&e.injectBase(`shared`,s),e.injectBase(r,o??n)},[r]),t(()=>{!i||!a||e.injectPlacement(r,i,a)},[r,i,a])}export{r as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as e}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{d as t,f as n}from"./defaults.
|
|
1
|
+
import{m as e}from"./actions-CMPlZ7CH.DZFAhfKm.js";import{d as t,f as n}from"./defaults.Cc2Npf8m.js";import{t as r}from"./rewards.BHoSugMr.js";function i(i,a,o){let[s,c]=t(void 0);return n(()=>{if(!i)return;let t=window.FrakSetup?.client;t&&e(t).then(e=>{let n=r(e.rewards,{currency:t.config.metadata?.currency,targetInteraction:a,audience:o});n&&n.payoutType!==`percentage`&&c(n.formatted)}).catch(()=>{})},[i,a,o]),{reward:s}}export{i as t};
|
package/dist/i18n/defaults.js
CHANGED
|
@@ -53,7 +53,7 @@ const componentDefaults = {
|
|
|
53
53
|
text: "Ouvrir dans l'app",
|
|
54
54
|
ariaLabel: "Ouvrir dans l'app Frak Wallet"
|
|
55
55
|
},
|
|
56
|
-
buttonWallet: { ariaLabel: "Ouvrir le
|
|
56
|
+
buttonWallet: { ariaLabel: "Ouvrir le portefeuille" },
|
|
57
57
|
banner: {
|
|
58
58
|
referralTitleReward: "Gagnez {REWARD} sur vos achats sur ce site",
|
|
59
59
|
referralTitle: "Vous avez été parrainé !",
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "1.0.12-beta.
|
|
14
|
+
"version": "1.0.12-beta.dfcc05ea",
|
|
15
15
|
"description": "Frak Wallet components, helping any person to interact with the Frak wallet.",
|
|
16
16
|
"repository": {
|
|
17
17
|
"url": "https://github.com/frak-id/wallet",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"publish": "echo 'Publishing components...'"
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
|
-
"@frak-labs/core-sdk": "1.2.0-beta.
|
|
96
|
-
"@frak-labs/frame-connector": "0.2.0-beta.
|
|
95
|
+
"@frak-labs/core-sdk": "1.2.0-beta.dfcc05ea",
|
|
96
|
+
"@frak-labs/frame-connector": "0.2.0-beta.dfcc05ea",
|
|
97
97
|
"preact": "^10.29.0",
|
|
98
98
|
"preact-custom-element": "^4.6.0",
|
|
99
99
|
"@frak-labs/design-system": "0.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as e}from"./clientReady.CPe9C8dP.js";import{c as t,o as n}from"./defaults.BjpGmLqu.js";function r(){return t(n,()=>e.getConfig().components)}export{r as t};
|