);
}
const honest = { fontFamily: ST.body, fontSize: 13, color: ST.mute, lineHeight: 1.5, margin: 0 };
// ── Step renderers (shared by A card and B column) ─────────────────────────
function EmailStep({ framing = 'signup', s = {} }) {
const title = framing === 'login' ? 'Log in' : 'Create your storefront';
const sub = framing === 'login' ? 'Enter your email and we\u2019ll send you a code to sign in.' : 'Enter your email to begin. No password to create.';
return (
<>
{title}
{s.deliveryFail && The email didn't go out. Try again in a moment — nothing was lost.}
{s.cooldown ? `Resend in ${s.cooldown}s` : 'Send code'}
We'll email you a one-time code. That's all we need.
>
);
}
function CodeStep({ s = {} }) {
const email = s.email || 'mara@studiofern.com';
let err = null;
if (s.codeWrong) err = `That code didn't match — ${s.attempts ?? 2} attempts left.`;
if (s.codeExpired) err = 'That code expired. Send a fresh one below.';
return (
<>
We sent a code to {email}. Wrong address?>}>
Check your email
{s.welcome &&
{s.welcome === 'new' ? 'A new account was created for this email.' : 'Signed in to your existing account.'}
}
{s.codeExhausted && That code is no longer valid. Request a fresh one to keep going.}
The code is good for 10 minutes. If you didn't request it, ignore this.
>
);
}
// ── Direction A — centered card ────────────────────────────────────────────
function SignInA({ step = 'email', framing = 'signup', device = 'desktop', s = {} }) {
const desktop = device === 'desktop';
return (
} right={} />
{step === 'email' ? : }
);
}
// ── Direction B — split (brand rail + form column) ─────────────────────────
function SignInB({ step = 'email', framing = 'signup', device = 'desktop', s = {} }) {
const desktop = device === 'desktop';
if (!desktop) {
return (
Your storefront is yours.
{step === 'email' ? : }
);
}
return (
{step === 'email' ? : }
);
}
// ── States stack ───────────────────────────────────────────────────────────
const { StateBlock: SStateBlock } = window;
function codeNote(text) {
return ◆{text};
}
function SignInStates() {
return (
Resend in 47sOne code per minute keeps inboxes (and abuse) in check.
The email didn't go out — try again. We'd never fake a success.
{codeNote("That code didn't match — 2 attempts left.")}
{codeNote('That code expired. Send a fresh one below.')}
That code is no longer valid. Request a fresh one to keep going.
A new account was created for this email.Signed in to your existing account.