/** * Registration-link block — the shared, pure href/label logic. * * This block renders a call-to-action button pointing at a sign-up URL and is * droppable into any BlockTuple[] content (articles, projects, explainers, * contests, and the contest email body). No server route validates block * content against a schema, so URL safety MUST live in one place and be applied * by every renderer — this module is that single source, imported by the Vue * view (`BlockRegistrationLinkView`) AND the email HTML renderer * (`renderEmailBlocks`). */ /** Default sign-up destination when the block leaves its URL blank. Root-relative * so it resolves against whatever host the instance serves. */ export declare const REGISTRATION_DEFAULT_URL = "/auth/register"; export interface RegistrationLinkContent { /** CTA button label. Blank ⇒ "Register". */ label?: string; /** Destination. Blank or not an allowed anchor target ⇒ REGISTRATION_DEFAULT_URL. */ url?: string; /** Optional referral code (session 229 referralLinks) appended as `?ref=` * for signup attribution. Harmless when referralLinks is off — the register * page simply ignores an unrecognized ref. */ ref?: string; /** Visual style hint. */ variant?: 'primary' | 'secondary'; } type MaybeContent = RegistrationLinkContent | Record; /** * Resolve the SAFE href for a registration-link block. Falls back to the * register page when the URL is blank or not an allowed anchor target * (http(s), root path, fragment, mailto, tel — `URL_LINK_STRICT`; blocks * `javascript:` and other smuggles). A referral code is appended as a query * param, but only to http(s)/root targets (never a fragment/mailto/tel). */ export declare function buildRegistrationHref(content: MaybeContent): string; /** Resolve the button label, defaulting to "Register" when blank. */ export declare function registrationLabel(content: MaybeContent): string; /** The button style hint, defaulting to primary. */ export declare function registrationVariant(content: MaybeContent): 'primary' | 'secondary'; export {}; //# sourceMappingURL=registrationLink.d.ts.map