@sesamy/sesamy-components 2.12.0 → 2.12.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.
|
@@ -7872,7 +7872,7 @@ function af(t, e) {
|
|
|
7872
7872
|
await R.auth.loginWithRedirect({
|
|
7873
7873
|
authorizationParams: {
|
|
7874
7874
|
login_hint: u(g),
|
|
7875
|
-
metadata: c.name ? {
|
|
7875
|
+
metadata: c != null && c.name ? {
|
|
7876
7876
|
firstName: u(h),
|
|
7877
7877
|
lastName: u(v)
|
|
7878
7878
|
} : void 0
|
|
@@ -8009,7 +8009,7 @@ function af(t, e) {
|
|
|
8009
8009
|
}), b(Ee, Ae);
|
|
8010
8010
|
};
|
|
8011
8011
|
O(Te, (Ee) => {
|
|
8012
|
-
c.name && Ee(qe);
|
|
8012
|
+
c != null && c.name && Ee(qe);
|
|
8013
8013
|
});
|
|
8014
8014
|
}
|
|
8015
8015
|
b(de, xe);
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
--s-paywall-border-radius: var(--sesamy-paywall-border-radius, 0.5rem);
|
|
44
44
|
--s-paywall-border-radius-desktop: var(--sesamy-paywall-border-radius-desktop, calc(var(--s-paywall-border-radius) * 3));
|
|
45
45
|
}
|
|
46
|
-
`+"</style>";const y=()=>{clearTimeout(s),s=setTimeout(()=>{var B;q(f,ce(((B=Ua.run({email:u(g)}))==null?void 0:B.full)||""))},400)},k=async(B,z)=>{B.preventDefault();try{await z.auth.loginWithRedirect({authorizationParams:{login_hint:u(g),metadata:c.name?{firstName:u(m),lastName:u(v)}:void 0}})}catch(R){console.error("Login failed:",R)}};var x=ae(),C=S(x);kt(C,()=>e.api.auth.isAuthenticated(),null,(B,z)=>{var R=ae(),K=S(R);{var A=E=>{var I=su(),G=S(I),Q=M(G),Y=M(Q);const ee=T(()=>re("w-full rounded-[var(--s-paywall-border-radius)] @xl:rounded-[var(--s-paywall-border-radius-desktop)]",(l==null?void 0:l.showBackground)&&"bg-[var(--s-paywall-bg-color)] text-[var(--s-paywall-text-color)]",(l==null?void 0:l.showBackground)&&(l==null?void 0:l.dropShadow)&&"shadow-md @xl:shadow-lg",h&&"dark"));var F=T(()=>u(ee));Qe(Y,{get class(){return u(F)},children:(J,N)=>{const ie=T(()=>re("gap-2 @md:gap-4 pt-0 w-full max-w-[800px]",(l==null?void 0:l.showBackground)&&"px-2.5 py-4 @sm:p-8 @sm:pb-10 @3xl:p-16 @3xl:pt-10"));var te=T(()=>u(ie));Qe(J,{get class(){return u(te)},up:!0,left:!0,children:(ue,de)=>{var he=lu(),Z=S(he);Qe(Z,{left:!0,class:"w-full gap-6",children:(fe,Ee)=>{var Ce=ru(),Te=S(Ce);{var st=ze=>{var ye=eu();Oe(ye,"src",o),D(Re=>Oe(ye,"alt",Re),[()=>`${e.t("logo_of")} ${a}`]),b(ze,ye)};O(Te,ze=>{i&&ze(st)})}var Ve=$(Te,2);Qe(Ve,{left:!0,class:"gap-3",children:(ze,ye)=>{var Re=tu(),Ye=S(Re);Ye.textContent=r;var Se=$(Ye,2);Ae(Se,e,"below-headline",{},null),b(ze,Re)},$$slots:{default:!0}}),b(fe,Ce)},$$slots:{default:!0}});var se=$(Z,2);Pa(se,{children:(fe,Ee)=>{var Ce=iu(),Te=S(Ce);const st=T(()=>e.t("email"));var Ve=T(()=>u(st));Jt(Te,{onkeyup:y,compact:!0,get placeholder(){return u(Ve)},get value(){return u(g)},set value(Se){q(g,ce(Se))}});var ze=$(Te,2);{var ye=Se=>{var Me=ou();Me.__click=[nu,g,f];var je=M(Me);Kt(je,{class:"text-primary text-xl",name:"info"});var Be=$(je,2),qt=M(Be),$t=$(qt),Xt=M($t,!0);P($t),bt(),P(Be),P(Me),D(At=>{X(qt,`${At??""} `),X(Xt,u(f))},[()=>e.t("did_you_mean")]),b(Se,Me)};O(ze,Se=>{u(f)&&Se(ye)})}var Re=$(ze,2);{var Ye=Se=>{var Me=au(),je=S(Me);const Be=T(()=>e.t("first_name"));var qt=T(()=>u(Be));Jt(je,{compact:!0,get placeholder(){return u(qt)},get value(){return u(m)},set value(St){q(m,ce(St))}});var $t=$(je,2);const Xt=T(()=>e.t("last_name"));var At=T(()=>u(Xt));Jt($t,{compact:!0,get placeholder(){return u(At)},get value(){return u(v)},set value(St){q(v,ce(St))}}),b(Se,Me)};O(Re,Se=>{c.name&&Se(Ye)})}b(fe,Ce)},$$slots:{default:!0}});var ne=$(se,2);Ca(ne,{type:"submit",class:"w-full shadow-md",children:(fe,Ee)=>{bt();var Ce=xt();D(Te=>X(Ce,Te),[()=>e.t("continue")]),b(fe,Ce)},$$slots:{default:!0}}),b(ue,he)},$$slots:{default:!0}})},$$slots:{default:!0}}),P(Q),P(G);var H=$(G,2);on(H,()=>w,!1,!1),Gn("submit",Q,J=>k(J,e.api)),b(E,I)};O(K,E=>{u(z)||E(A)})}b(B,R)}),b(t,x),me()}en(["click"]);var uu=L('<div class="sesamy-paywall" style="display: contents"><!></div>'),du=L('<div class="sesamy-paywall" style="display: contents"><!></div>'),fu=L('<div slot="below-headline"><!></div>'),vu=L(" <!>",1),gu=L("<!> <!> <!>",1);function Ya(t,e){ge(e,!0);let r=it(e,["$$slots","$$events","$$legacy","$$host"]),n=xe(void 0),o=xe(void 0);Vr(()=>{(async()=>{var i;const a=await fetch(r["settings-url"]);q(n,ce(await a.json())),q(o,ce(((i=u(n))==null?void 0:i.settings.template)||void 0))})()}),Nr(t,{children:On,$$slots:{default:(a,i)=>{const l=T(()=>i.api),c=T(()=>i.t);var s=gu();const f=T(()=>e.$$host);var g=S(s);{var m=p=>{var w=uu(),y=M(w);Ae(y,e,"default",Zt({get api(){return u(l)},get t(){return u(c)}},()=>r),null),P(w),b(p,w)};O(g,p=>{r["settings-url"]&&p(m)})}var v=$(g,2);{var d=p=>{var w=du(),y=M(w);Ae(y,e,"default",Zt({get api(){return u(l)},get t(){return u(c)}},()=>r),null),P(w),b(p,w)};O(v,p=>{u(n)||p(d)})}var h=$(v,2);{var _=p=>{var w=vu(),y=S(w),k=$(y);{var x=B=>{Va(B,Zt({get api(){return u(l)},get paywall(){return u(n)},get host(){return u(f)},get t(){return u(c)}},()=>r))},C=B=>{var z=ae(),R=S(z);{var K=E=>{Va(E,Zt({horizontal:!0,get api(){return u(l)},get paywall(){return u(n)},get host(){return u(f)},get t(){return u(c)}},()=>r))},A=E=>{var I=ae(),G=S(I);{var Q=Y=>{cu(Y,Zt({get api(){return u(l)},get t(){return u(c)},get paywall(){return u(n)}},()=>r,{$$slots:{"below-headline":(ee,F)=>{var H=fu(),J=M(H);Ae(J,e,"below-headline",{},null),P(H),b(ee,H)}}}))};O(G,Y=>{u(o)==="LOGIN"&&Y(Q)},!0)}b(E,I)};O(R,E=>{u(o)==="BOXES"?E(K):E(A,!1)},!0)}b(B,z)};O(k,B=>{u(o)==="ARTICLE"?B(x):B(C,!1)})}D(B=>X(y,`${B??""} `),[()=>u(l).log(`sesamy-paywall with template ${u(o)}`)]),b(p,w)};O(h,p=>{u(n)&&p(_)})}b(a,s)}}}),me()}customElements.define("sesamy-paywall",vr(Ya,{},["default","below-headline"],[],!0));function Wa(t,e){ge(e,!0);let r=U(e,"item-src",7,""),n=U(e,"publisher-content-id",7),o=U(e,"pass",7),a=U(e,"access-level",7),i=U(e,"lock-mode",7,"embed"),l=U(e,"locked-content-selector",7);async function c(v){var p,w,y,k;const d=r()||((p=v.content.get(e.$$host))==null?void 0:p.url)||"",h=o()?o().split(";"):(y=(w=v.content.get(e.$$host))==null?void 0:w.pass)==null?void 0:y.split(";"),_=a()||((k=v.content.get(e.$$host))==null?void 0:k.accessLevel)||"entitlement";switch(v.log(`Checking access for ${d} with passes: ${JSON.stringify(h)}, articleUrl: ${d} and access level: ${_}`),_){case"public":return!0;case"logged-in":return v.auth.isAuthenticated();case"entitlement":default:return v.entitlements.hasAccess(d,h)}}function s(v){var _;const d=n()||((_=v.content.get(e.$$host))==null?void 0:_.id)||"",h=new CustomEvent("sesamyUnlocked",{detail:{publisherContentId:d,itemSrc:r()},bubbles:!0,composed:!0});dispatchEvent(h)}async function f(v){var y;if(!v)return;const d=e.$$host;if(!d)return;const h=document.createElement("div");h.setAttribute("position","relative");const _=d.getAttribute("class");_&&h.setAttribute("class",_),h.innerHTML=v;const p=h.querySelectorAll("script"),w=[];p.forEach(k=>{var x;try{if(k.src){const C=document.createElement("script");C.src=k.src,document.head.appendChild(C)}else w.push(k.textContent||"");(x=k.parentNode)==null||x.removeChild(k)}catch(C){console.error("Failed to process script:",C,k)}}),(y=d.parentElement)==null||y.insertBefore(h,d),w.forEach(k=>{try{const x=document.createElement("script");x.textContent=k,document.head.appendChild(x),document.head.removeChild(x)}catch(x){console.error("Failed to execute inline script:",x,k)}})}async function g(v){const d=e.$$host.querySelector('div[slot="content"]');switch(i()){case"encode":const h=(d==null?void 0:d.innerHTML)||"";try{return new TextDecoder().decode(Uint8Array.from(atob(h),_=>_.charCodeAt(0)))}catch(_){return console.error("Error decoding content:",_),""}case"event":return s(v),"";case"proxy":case"signedUrl":return v.content.unlock(e.$$host.parentElement,l());case"embed":return"";default:return console.error("Invalid lock mode"),""}}async function m(v){try{const d=await g(v);await f(d)}catch(d){console.error("Error unlocking content:",d)}}return Nr(t,{applyStyles:!1,children:On,$$slots:{default:(v,d)=>{const h=T(()=>d.api);var _=ae(),p=S(_);kt(p,()=>c(u(h)),w=>{var y=ae(),k=S(y);Ae(k,e,"preview",{},null),b(w,y)},(w,y)=>{var k=ae(),x=S(k);{var C=z=>{var R=ae(),K=S(R);{var A=I=>{var G=ae(),Q=S(G);Ae(Q,e,"content",{},null),b(I,G)},E=I=>{var G=ae(),Q=S(G);kt(Q,()=>m(u(h)),Y=>{var ee=ae(),F=S(ee);Ae(F,e,"preview",{},null),b(Y,ee)},Y=>{}),b(I,G)};O(K,I=>{i()==="embed"?I(A):I(E,!1)})}b(z,R)},B=z=>{var R=ae(),K=S(R);Ae(K,e,"preview",{},null),b(z,R)};O(x,z=>{u(y)?z(C):z(B,!1)})}b(w,k)}),b(v,_)}}}),me({get"item-src"(){return r()},set"item-src"(v=""){r(v),we()},get"publisher-content-id"(){return n()},set"publisher-content-id"(v){n(v),we()},get pass(){return o()},set pass(v){o(v),we()},get"access-level"(){return a()},set"access-level"(v){a(v),we()},get"lock-mode"(){return i()},set"lock-mode"(v="embed"){i(v),we()},get"locked-content-selector"(){return l()},set"locked-content-selector"(v){l(v),we()}})}customElements.define("sesamy-content-container",vr(Wa,{"item-src":{},"publisher-content-id":{},pass:{},"access-level":{},"lock-mode":{},"locked-content-selector":{}},["preview","content"],[],!0));function Za(t,e){ge(e,!1);const r=ya(),n=async()=>{try{return(await r).auth.isAuthenticated()}catch(i){return console.error("Error checking login status:",i),!1}};ua();var o=ae(),a=S(o);kt(a,n,null,(i,l)=>{var c=ae(),s=S(c);{var f=m=>{var v=ae(),d=S(v);Ae(d,e,"logged-in",{},null),b(m,v)},g=m=>{var v=ae(),d=S(v);Ae(d,e,"not-logged-in",{},null),b(m,v)};O(s,m=>{u(l)?m(f):m(g,!1)})}b(i,c)}),b(t,o),me()}customElements.define("sesamy-visibility",vr(Za,{},["logged-in","not-logged-in"],[],!0)),le.Avatar=cn,le.ContentContainer=Wa,le.Login=Ea,le.Paywall=Ya,le.Visibility=Za,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
|
46
|
+
`+"</style>";const y=()=>{clearTimeout(s),s=setTimeout(()=>{var B;q(f,ce(((B=Ua.run({email:u(g)}))==null?void 0:B.full)||""))},400)},k=async(B,z)=>{B.preventDefault();try{await z.auth.loginWithRedirect({authorizationParams:{login_hint:u(g),metadata:c!=null&&c.name?{firstName:u(m),lastName:u(v)}:void 0}})}catch(R){console.error("Login failed:",R)}};var x=ae(),C=S(x);kt(C,()=>e.api.auth.isAuthenticated(),null,(B,z)=>{var R=ae(),K=S(R);{var A=E=>{var I=su(),G=S(I),Q=M(G),Y=M(Q);const ee=T(()=>re("w-full rounded-[var(--s-paywall-border-radius)] @xl:rounded-[var(--s-paywall-border-radius-desktop)]",(l==null?void 0:l.showBackground)&&"bg-[var(--s-paywall-bg-color)] text-[var(--s-paywall-text-color)]",(l==null?void 0:l.showBackground)&&(l==null?void 0:l.dropShadow)&&"shadow-md @xl:shadow-lg",h&&"dark"));var F=T(()=>u(ee));Qe(Y,{get class(){return u(F)},children:(J,N)=>{const ie=T(()=>re("gap-2 @md:gap-4 pt-0 w-full max-w-[800px]",(l==null?void 0:l.showBackground)&&"px-2.5 py-4 @sm:p-8 @sm:pb-10 @3xl:p-16 @3xl:pt-10"));var te=T(()=>u(ie));Qe(J,{get class(){return u(te)},up:!0,left:!0,children:(ue,de)=>{var he=lu(),Z=S(he);Qe(Z,{left:!0,class:"w-full gap-6",children:(fe,Ee)=>{var Ce=ru(),Te=S(Ce);{var st=ze=>{var ye=eu();Oe(ye,"src",o),D(Re=>Oe(ye,"alt",Re),[()=>`${e.t("logo_of")} ${a}`]),b(ze,ye)};O(Te,ze=>{i&&ze(st)})}var Ve=$(Te,2);Qe(Ve,{left:!0,class:"gap-3",children:(ze,ye)=>{var Re=tu(),Ye=S(Re);Ye.textContent=r;var Se=$(Ye,2);Ae(Se,e,"below-headline",{},null),b(ze,Re)},$$slots:{default:!0}}),b(fe,Ce)},$$slots:{default:!0}});var se=$(Z,2);Pa(se,{children:(fe,Ee)=>{var Ce=iu(),Te=S(Ce);const st=T(()=>e.t("email"));var Ve=T(()=>u(st));Jt(Te,{onkeyup:y,compact:!0,get placeholder(){return u(Ve)},get value(){return u(g)},set value(Se){q(g,ce(Se))}});var ze=$(Te,2);{var ye=Se=>{var Me=ou();Me.__click=[nu,g,f];var je=M(Me);Kt(je,{class:"text-primary text-xl",name:"info"});var Be=$(je,2),qt=M(Be),$t=$(qt),Xt=M($t,!0);P($t),bt(),P(Be),P(Me),D(At=>{X(qt,`${At??""} `),X(Xt,u(f))},[()=>e.t("did_you_mean")]),b(Se,Me)};O(ze,Se=>{u(f)&&Se(ye)})}var Re=$(ze,2);{var Ye=Se=>{var Me=au(),je=S(Me);const Be=T(()=>e.t("first_name"));var qt=T(()=>u(Be));Jt(je,{compact:!0,get placeholder(){return u(qt)},get value(){return u(m)},set value(St){q(m,ce(St))}});var $t=$(je,2);const Xt=T(()=>e.t("last_name"));var At=T(()=>u(Xt));Jt($t,{compact:!0,get placeholder(){return u(At)},get value(){return u(v)},set value(St){q(v,ce(St))}}),b(Se,Me)};O(Re,Se=>{c!=null&&c.name&&Se(Ye)})}b(fe,Ce)},$$slots:{default:!0}});var ne=$(se,2);Ca(ne,{type:"submit",class:"w-full shadow-md",children:(fe,Ee)=>{bt();var Ce=xt();D(Te=>X(Ce,Te),[()=>e.t("continue")]),b(fe,Ce)},$$slots:{default:!0}}),b(ue,he)},$$slots:{default:!0}})},$$slots:{default:!0}}),P(Q),P(G);var H=$(G,2);on(H,()=>w,!1,!1),Gn("submit",Q,J=>k(J,e.api)),b(E,I)};O(K,E=>{u(z)||E(A)})}b(B,R)}),b(t,x),me()}en(["click"]);var uu=L('<div class="sesamy-paywall" style="display: contents"><!></div>'),du=L('<div class="sesamy-paywall" style="display: contents"><!></div>'),fu=L('<div slot="below-headline"><!></div>'),vu=L(" <!>",1),gu=L("<!> <!> <!>",1);function Ya(t,e){ge(e,!0);let r=it(e,["$$slots","$$events","$$legacy","$$host"]),n=xe(void 0),o=xe(void 0);Vr(()=>{(async()=>{var i;const a=await fetch(r["settings-url"]);q(n,ce(await a.json())),q(o,ce(((i=u(n))==null?void 0:i.settings.template)||void 0))})()}),Nr(t,{children:On,$$slots:{default:(a,i)=>{const l=T(()=>i.api),c=T(()=>i.t);var s=gu();const f=T(()=>e.$$host);var g=S(s);{var m=p=>{var w=uu(),y=M(w);Ae(y,e,"default",Zt({get api(){return u(l)},get t(){return u(c)}},()=>r),null),P(w),b(p,w)};O(g,p=>{r["settings-url"]&&p(m)})}var v=$(g,2);{var d=p=>{var w=du(),y=M(w);Ae(y,e,"default",Zt({get api(){return u(l)},get t(){return u(c)}},()=>r),null),P(w),b(p,w)};O(v,p=>{u(n)||p(d)})}var h=$(v,2);{var _=p=>{var w=vu(),y=S(w),k=$(y);{var x=B=>{Va(B,Zt({get api(){return u(l)},get paywall(){return u(n)},get host(){return u(f)},get t(){return u(c)}},()=>r))},C=B=>{var z=ae(),R=S(z);{var K=E=>{Va(E,Zt({horizontal:!0,get api(){return u(l)},get paywall(){return u(n)},get host(){return u(f)},get t(){return u(c)}},()=>r))},A=E=>{var I=ae(),G=S(I);{var Q=Y=>{cu(Y,Zt({get api(){return u(l)},get t(){return u(c)},get paywall(){return u(n)}},()=>r,{$$slots:{"below-headline":(ee,F)=>{var H=fu(),J=M(H);Ae(J,e,"below-headline",{},null),P(H),b(ee,H)}}}))};O(G,Y=>{u(o)==="LOGIN"&&Y(Q)},!0)}b(E,I)};O(R,E=>{u(o)==="BOXES"?E(K):E(A,!1)},!0)}b(B,z)};O(k,B=>{u(o)==="ARTICLE"?B(x):B(C,!1)})}D(B=>X(y,`${B??""} `),[()=>u(l).log(`sesamy-paywall with template ${u(o)}`)]),b(p,w)};O(h,p=>{u(n)&&p(_)})}b(a,s)}}}),me()}customElements.define("sesamy-paywall",vr(Ya,{},["default","below-headline"],[],!0));function Wa(t,e){ge(e,!0);let r=U(e,"item-src",7,""),n=U(e,"publisher-content-id",7),o=U(e,"pass",7),a=U(e,"access-level",7),i=U(e,"lock-mode",7,"embed"),l=U(e,"locked-content-selector",7);async function c(v){var p,w,y,k;const d=r()||((p=v.content.get(e.$$host))==null?void 0:p.url)||"",h=o()?o().split(";"):(y=(w=v.content.get(e.$$host))==null?void 0:w.pass)==null?void 0:y.split(";"),_=a()||((k=v.content.get(e.$$host))==null?void 0:k.accessLevel)||"entitlement";switch(v.log(`Checking access for ${d} with passes: ${JSON.stringify(h)}, articleUrl: ${d} and access level: ${_}`),_){case"public":return!0;case"logged-in":return v.auth.isAuthenticated();case"entitlement":default:return v.entitlements.hasAccess(d,h)}}function s(v){var _;const d=n()||((_=v.content.get(e.$$host))==null?void 0:_.id)||"",h=new CustomEvent("sesamyUnlocked",{detail:{publisherContentId:d,itemSrc:r()},bubbles:!0,composed:!0});dispatchEvent(h)}async function f(v){var y;if(!v)return;const d=e.$$host;if(!d)return;const h=document.createElement("div");h.setAttribute("position","relative");const _=d.getAttribute("class");_&&h.setAttribute("class",_),h.innerHTML=v;const p=h.querySelectorAll("script"),w=[];p.forEach(k=>{var x;try{if(k.src){const C=document.createElement("script");C.src=k.src,document.head.appendChild(C)}else w.push(k.textContent||"");(x=k.parentNode)==null||x.removeChild(k)}catch(C){console.error("Failed to process script:",C,k)}}),(y=d.parentElement)==null||y.insertBefore(h,d),w.forEach(k=>{try{const x=document.createElement("script");x.textContent=k,document.head.appendChild(x),document.head.removeChild(x)}catch(x){console.error("Failed to execute inline script:",x,k)}})}async function g(v){const d=e.$$host.querySelector('div[slot="content"]');switch(i()){case"encode":const h=(d==null?void 0:d.innerHTML)||"";try{return new TextDecoder().decode(Uint8Array.from(atob(h),_=>_.charCodeAt(0)))}catch(_){return console.error("Error decoding content:",_),""}case"event":return s(v),"";case"proxy":case"signedUrl":return v.content.unlock(e.$$host.parentElement,l());case"embed":return"";default:return console.error("Invalid lock mode"),""}}async function m(v){try{const d=await g(v);await f(d)}catch(d){console.error("Error unlocking content:",d)}}return Nr(t,{applyStyles:!1,children:On,$$slots:{default:(v,d)=>{const h=T(()=>d.api);var _=ae(),p=S(_);kt(p,()=>c(u(h)),w=>{var y=ae(),k=S(y);Ae(k,e,"preview",{},null),b(w,y)},(w,y)=>{var k=ae(),x=S(k);{var C=z=>{var R=ae(),K=S(R);{var A=I=>{var G=ae(),Q=S(G);Ae(Q,e,"content",{},null),b(I,G)},E=I=>{var G=ae(),Q=S(G);kt(Q,()=>m(u(h)),Y=>{var ee=ae(),F=S(ee);Ae(F,e,"preview",{},null),b(Y,ee)},Y=>{}),b(I,G)};O(K,I=>{i()==="embed"?I(A):I(E,!1)})}b(z,R)},B=z=>{var R=ae(),K=S(R);Ae(K,e,"preview",{},null),b(z,R)};O(x,z=>{u(y)?z(C):z(B,!1)})}b(w,k)}),b(v,_)}}}),me({get"item-src"(){return r()},set"item-src"(v=""){r(v),we()},get"publisher-content-id"(){return n()},set"publisher-content-id"(v){n(v),we()},get pass(){return o()},set pass(v){o(v),we()},get"access-level"(){return a()},set"access-level"(v){a(v),we()},get"lock-mode"(){return i()},set"lock-mode"(v="embed"){i(v),we()},get"locked-content-selector"(){return l()},set"locked-content-selector"(v){l(v),we()}})}customElements.define("sesamy-content-container",vr(Wa,{"item-src":{},"publisher-content-id":{},pass:{},"access-level":{},"lock-mode":{},"locked-content-selector":{}},["preview","content"],[],!0));function Za(t,e){ge(e,!1);const r=ya(),n=async()=>{try{return(await r).auth.isAuthenticated()}catch(i){return console.error("Error checking login status:",i),!1}};ua();var o=ae(),a=S(o);kt(a,n,null,(i,l)=>{var c=ae(),s=S(c);{var f=m=>{var v=ae(),d=S(v);Ae(d,e,"logged-in",{},null),b(m,v)},g=m=>{var v=ae(),d=S(v);Ae(d,e,"not-logged-in",{},null),b(m,v)};O(s,m=>{u(l)?m(f):m(g,!1)})}b(i,c)}),b(t,o),me()}customElements.define("sesamy-visibility",vr(Za,{},["logged-in","not-logged-in"],[],!0)),le.Avatar=cn,le.ContentContainer=Wa,le.Login=Ea,le.Paywall=Ya,le.Visibility=Za,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sesamy/sesamy-components",
|
|
3
3
|
"description": "Shareable web components library built with Vite + Svelte",
|
|
4
|
-
"version": "2.12.
|
|
4
|
+
"version": "2.12.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/lib/sesamy-components.es.js",
|
|
7
7
|
"main": "dist/lib/sesamy-components.umd.js",
|