import { lazy, Suspense, type ReactNode } from 'react'; import { Alert, AlertContent, AlertDescription, AlertIcon } from '@/components/ui/motion/alert'; import { useBrand } from '../../api/hooks'; import { explainError } from '../../api/errors'; import { MockBanner } from '../../components/common'; import { BrandMark } from './login/BrandMark'; // the 3D hero (three.js) loads after the form is on screen, in its own chunk const ReleaseScene = lazy(() => import('./login/ReleaseScene').then((m) => ({ default: m.ReleaseScene }))); /** beUI fields on a page without Tailwind's reset: no native border on the inner input (the field draws it). */ export const FIELD = { root: 'beui-field', input: 'border-0' }; /** * The frame of every account page (sign in, create an account, forgot, reset). On large screens a black brand * panel with the ember glow on the left (the Astra story and a live 3D scene) and the form on the right, in the app's * own type and accent; on small screens only the form. `title` is the visible heading; `srTitle` adds words for screen * readers only (e.g. "Sign in" + " to Astra"). */ export function AuthShell({ children, label, title, srTitle, sub }: { children: ReactNode; label: string; title: string; srTitle?: string; sub?: ReactNode; }) { const brand = useBrand(); const name = brand.data?.product_name ?? 'Astra'; return (
{name}
Oracle patch testing

Every Oracle update, tested before it goes live.

Three agents read the patch, test your business processes in a real browser and bring you the evidence. You approve and sign off.

    {['Monthly and quarterly updates', 'Real browser, real evidence', 'You stay in charge'].map((t) => (
  • {t}
  • ))}
{name}

{title}{srTitle && {srTitle}}

{sub &&

{sub}

}
{children}

{brand.data?.org_name ? `${brand.data.org_name} ยท ` : ''}{brand.data?.version ? `Version ${brand.data.version}` : ''}

); } /** An account-page problem in plain words, in the animated alert. */ export function AuthError({ err, message, testId }: { err: unknown; message?: string; testId?: string }) { const i = explainError(err); return ( {message ?? [i.message, i.hint].filter(Boolean).join(' ')} ); } /** A finished step ("Check your inbox", "Password changed"): an icon, a heading, one sentence and the next action. */ export function AuthDone({ icon, title, children, action, testId }: { icon?: ReactNode; title: string; children: ReactNode; action: ReactNode; testId?: string }) { return (
{icon &&
{icon}
}

{title}

{children}

{action}
); } /** Links on account pages: the app's global link colour would win over Tailwind, so the colour is forced here. */ export const AUTH_LINK = '!text-[var(--label-2)] underline-offset-4 hover:!text-[var(--label)] hover:underline'; export const AUTH_LINK_STRONG = 'font-medium !text-[var(--accent-text)] underline-offset-4 hover:underline'; /** A secondary action shaped like the primary button. */ export const AUTH_BUTTON_SECONDARY = 'inline-flex h-11 w-full items-center justify-center rounded-lg border border-[var(--sep-strong)] bg-[var(--bg-elev)] !text-[var(--label)] !no-underline hover:bg-[var(--fill)]'; export const AUTH_BUTTON_PRIMARY = 'inline-flex h-11 w-full items-center justify-center rounded-lg bg-[var(--accent)] font-semibold !text-[var(--on-accent)] !no-underline hover:bg-[var(--accent-hover)]';