@dropins/storefront-auth 0.0.1-alpha14 → 0.0.1-alpha15

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.
@@ -1 +1 @@
1
- import{jsx as i}from"@dropins/tools/preact-jsx-runtime.js";import{lazy as u,Suspense as v}from"@dropins/tools/preact-compat.js";import{useState as E,useMemo as S}from"@dropins/tools/preact-hooks.js";import{S as y}from"../chunks/SkeletonLoader.js";import"@dropins/tools/components.js";const L=function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),P=function(c){return"/"+c},p={},d=function(t,s,a){let l=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),r=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));l=Promise.all(s.map(o=>{if(o=P(o),o in p)return;p[o]=!0;const m=o.endsWith(".css"),f=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${f}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":L,m||(n.as="script",n.crossOrigin=""),n.href=o,r&&n.setAttribute("nonce",r),document.head.appendChild(n),m)return new Promise((_,h)=>{n.addEventListener("load",_),n.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})}))}return l.then(()=>t()).catch(e=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=e,window.dispatchEvent(r),!r.defaultPrevented)throw e})},k=u(()=>d(()=>import("../chunks/index.js"),[])),b=u(()=>d(()=>import("../chunks/index2.js"),[])),w=u(()=>d(()=>import("../chunks/index3.js"),[])),F=({defaultView:c="signInForm",signInFormConfig:t,signUpFormConfig:s,resetPasswordFormConfig:a})=>{const[l,e]=E(c),r=S(()=>({signInForm:i(b,{setActiveComponent:e,...t}),signUpForm:i(w,{setActiveComponent:e,...s}),resetPasswordForm:i(k,{setActiveComponent:e,...a})}),[a,t,s,e]);return i(v,{fallback:i(y,{activeSkeleton:l}),children:i("div",{className:"auth-combine",children:r[l]})})};export{F as AuthCombine,F as default};
1
+ import{jsx as s}from"@dropins/tools/preact-jsx-runtime.js";import{lazy as u,Suspense as v}from"@dropins/tools/preact-compat.js";import{useState as E,useMemo as S}from"@dropins/tools/preact-hooks.js";import{S as y}from"../chunks/SkeletonLoader.js";import"@dropins/tools/components.js";const L=function(){const t=typeof document<"u"&&document.createElement("link").relList;return t&&t.supports&&t.supports("modulepreload")?"modulepreload":"preload"}(),P=function(c){return"/"+c},p={},d=function(t,i,a){let l=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),r=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));l=Promise.all(i.map(o=>{if(o=P(o),o in p)return;p[o]=!0;const m=o.endsWith(".css"),f=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${f}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":L,m||(n.as="script",n.crossOrigin=""),n.href=o,r&&n.setAttribute("nonce",r),document.head.appendChild(n),m)return new Promise((h,_)=>{n.addEventListener("load",h),n.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${o}`)))})}))}return l.then(()=>t()).catch(e=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=e,window.dispatchEvent(r),!r.defaultPrevented)throw e})},k=u(()=>d(()=>import("../chunks/index.js"),[])),b=u(()=>d(()=>import("../chunks/index2.js"),[])),w=u(()=>d(()=>import("../chunks/index3.js"),[])),F=({defaultView:c="signInForm",signInFormConfig:t,signUpFormConfig:i,resetPasswordFormConfig:a})=>{const[l,e]=E(c),r=S(()=>({signInForm:s(b,{setActiveComponent:e,...t}),signUpForm:s(w,{setActiveComponent:e,...i}),resetPasswordForm:s(k,{setActiveComponent:e,...a})}),[a,t,i,e]);return s("div",{children:s(v,{fallback:s(y,{activeSkeleton:l}),children:s("div",{className:"auth-combine",children:r[l]})})})};export{F as AuthCombine,F as default};
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name": "@dropins/storefront-auth", "version": "0.0.1-alpha14", "@dropins/elsie": "0.27.1-alpha591"}
1
+ {"name": "@dropins/storefront-auth", "version": "0.0.1-alpha15", "@dropins/elsie": "0.28.0-beta2"}